Tangential damping force

Submitted by robin on Tue, 06/07/2016 - 11:06

Hi to all of you,

I did a little test case for the tangential damping model. It's a pair of indented particles with only tangential damping forces.
The forces computed by ligggths are compared to the theoretical damping force, computed with the velocities. The test case is attached.

The relative error on the force given by compute pair/gran/local is machine zero, which is fine.
The relative error on the force given for the atoms is much larger, and depends on the time step.

Is something wrong with my test case? Thanks for any hints!

Cheers,

Robin

AttachmentSize
Plain text icon damping3.43 KB
ckloss's picture

ckloss | Tue, 06/14/2016 - 23:06

Hi Robin,

I'll put it on my list of things to look at for the next release!

best wishes from Linz
Christoph

ckloss's picture

ckloss | Fri, 08/26/2016 - 16:21

Hi Robin,

unfortunately it seems we had some issues with our website regarding attachments - apologies. Could you please re-upload the attachment?

Thanks
Christoph

robin | Sat, 08/27/2016 - 14:16

Christoph,
I can edit the post, but for some reason the newly uploaded file leads to 404 Not Found.
I send it to you by e-mail.
Cheers

ckloss's picture

ckloss | Tue, 08/30/2016 - 18:00

Hi Robin,

thanks for the hint regarding the website - we'll forward that to the agency which manages our website
And thanks for sending the file!

It's correct, all the output is done at the end of the time-step, where position has advanced a half time-step
from the point where the force calculations is done.

I'll add this note to the doc, thanks for the hint that this was missing!

best wishes
Christoph

ckloss's picture

ckloss | Tue, 08/30/2016 - 18:04

Addition: Since compute pair/gran/local is a pure post-processing functionality, half a time-step offset is typically not an issue
If you really need exact (machine) precision, a printf in the tangential model might be an option

Best wishes
Christoph

ckloss's picture

ckloss | Tue, 08/30/2016 - 18:06

Addition 2: In your example, the compute was invoked by output, which is at the end of the time-step-
You could write a fix that invokes the compute at the right time you want, to get the machine-precision values for the contact forces

Best wishes
Christoph

robin | Sat, 09/03/2016 - 11:21

Hi Christoph,

Thanks for your answers. Indeed, half a time step is not necessarly a huge issue to display or vizualise results.
However, in a developing and testing context, we need a systematic method to validate the contact models we develop and use.

If I understand well, you suggest two ways ot proceed:
- output the results directly from within the code eg with printf calls
- write custom computes to control when in the time steps the results are taken

If anyone uses a different strategies, or has comments on that issue... Thanks for the hints!

Cheers

ckloss's picture

ckloss | Mon, 10/03/2016 - 11:12

Hi Robin,

yes either dojng it with prints or write a customized output command would be feasible.
However, computes are always called when they are invoked from the input script, this means typically at the end of the timestep

So if you write a customized compute, it would have to have a callback from the pair style.
Or you write a fix, then you can control at which point it is executed!

Best wishes
Christoph