The friction of HertzianViscoElasticFrictionPrms

Asked by Bin Cheng on 2017-06-11

Hello.

I am using ESyS-Particle to simulate the impact of two RotSpheres with contact model of HertzianViscoElasticFrictionPrms.

I am not sure whether the friction is applied at the contact point or at the particle's center.

And if the friciton is applied at the particle's center, how to change it to the contact point which could generate moments? Is there any tutorial explaining how to modify the code?

Best Regards!

Yours,

Bin

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Dion Weatherley
Solved:
2017-07-31
Last query:
2017-07-31
Last reply:
2017-07-17
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Dion Weatherley (d-weatherley) said : #2

This question needs to be answered

Dion Weatherley (d-weatherley) said : #3

Hi Bin,

It would appear that currently HertzianViscoElasticFrictionPrms only applies the friction force at the centres of the involved particles, rather than generating a moment at the contact point. This is possibly a bug that should be relatively easy to fix.

To apply a moment due to friction, you could possibly copy what is done in the RotFrictionPrms source code:
Model/RotFricInteraction.cpp

Search for "applyMoment" to find the relevant code-fragment.

I hope this helps.

Cheers,

Dion

Bin Cheng (bincheng) said : #4

Hi Dion.

Thanks to your advice and the document "HowToAddInteraction.pdf", I have rewritten this unbonded interaction model successfully.

However, I have some problems when I try to add a new body force because the tutorial online does not include the Single Particle Interactions and Wall/Mesh Interactions. Therefore, may I request a little more detailed document on body force and wall interactions? I should be most grateful if that is possible.

Thank you in advance for your kind assistance, and look forward to receiving your advice soon.

With kind regards,

Yours sincerely,

Bin Cheng

Best Dion Weatherley (d-weatherley) said : #5

Hi Bin,

Additional documentation for programmers of ESyS-Particle is definitely required but, at present, we do not have anything written on that. My suggestion would be to study the way gravity is implemented and modify/copy that for your purposes.

Cheers,

Dion

Bin Cheng (bincheng) said : #6

Hi Dion,

Thanks. I would try to study the code for gravity model as your advice.

Additionally, I have a question on the last part of the code for RotFrciInteraction.cpp:

template<>
void TML_PackedMessageInterface::pack<CRotFrictionInteraction>(...)
template<>
void TML_PackedMessageInterface::unpack<CRotFrictionInteraction>(...)

I have not found this part in other unbonded models, e.g., HertzianViscoElasticFriciton model. What is the function of this part? And when should I add this part?

Looking forward to your reply!

With kind regards,

Yours sincerely,

Bin Cheng.

SteffenAbe (s-abe) said : #7

Hi Bin,

the "pack" and "unpack" functions are implicitely used when interaction data is exchanged between different worker processes. Specifically, the TML_Cart_Comm::shift_cont_packed(..) call in ParallelInteractionStorage_E<..>::exchange_boundary(..) (line 93 in pis/pi_storage_e.hpp) needs it to pack the interaction data into a buffer which is then exchanged via MPI. The reason why some interaction types have those pack/unpack functions and some don't is do to the issue if the respective interactions have persistent data or not. For example elastic interactions generally don't, frictional interactions do.
The fact that HertzianViscoElasticFriction doesn't have such a pack/unpack function is actually a bug (I'm working on fixing it).

Steffen

SteffenAbe (s-abe) said : #8

Hi Bin,

regarding your initial question: after looking at the code it turns out that HertzianViscoElasticFriction actually inherits from APairInteraction, not from ARotPairInteraction (as it probably should), which means that the particle pointers m_p1 and m_p1 are of type CParticle* not CRotParticle* . Therefore all forces are applied to the particle center because CParticle is the non-rotational particle class which therefore doesn't have an applyMoment function.
Changing HertzianViscoElasticFriction to inherit from ARotPairInteraction should be fairly easy. I'll have a look at it after fixing the other bug.

Steffen

Bin Cheng (bincheng) said : #9

Hi Steffen,

Thanks for your quick reply.

Would you mean that the tangential contact history is recorded and exchanged through the ParallelInteractionStorage_ED? In other words, I must add the "pack" and "unpack" functions in MyInteraction.cpp and use ParallelInteractionStorage_ED instead of ParallelInteractionStorage_NE in SubLattice.hpp when the model includes tangential friction?

So, what parameters should I add into the pack function? Only the interaction model parameters (stiffness, dynamicMu), particle ID and tangential friction history? Is these parameters enough?

By the way, do you have a plan to write an additional documentation for programmers about the Data Structures and Program Framework in ESyS-Particle? That will help us a lot.

Thank you in advance for your kind assistance, and look forward to receiving your advice soon.

With kind regards,

Yours sincerely,

Bin Cheng

SteffenAbe (s-abe) said : #10

Hi Bin,

if an interaction contains _any_ history dependent parameters, it needs to be stored in a ParallelInteractionStorage_ED (instead of _NE) and therefore needs to have the pack / unpack functions. So far the tangential displacement part of frictional interactions are indeed the only examples implemented in esys-particle, but other cases could be imagined, for example stuff like time-dependent adhesion.

Btw, which version of the code are you using? I'm just asking because in message #6 you state that "I have not found this part in other unbonded models, e.g., HertzianViscoElasticFriciton model. " but in the current development version (rev. 1182) those functions _do_ exist - see Model/HertzianViscoElasticFrictionInteraction.cpp , lines 687-736. And a look at the revision history suggests that they have always been there.

> So, what parameters should I add into the pack function?
Everything which is required in calcForce.

The additional documentation for programmers is certainly an item on our agenda, but, as all work on esys-particle, it depends on actually having the resources.

Steffen

Bin Cheng (bincheng) said : #11

Hi Steffen,

I am so sorry that I was wrong. The pack/unpack functions do exist in HertzianViscoElasticFrictionInteraction.cpp. but in Parallel/SubLattice.hpp, this model uses ParallelInteractionStorage_NE (I have checked ESyS-Particle-2.3.2 to ESyS-Particle-2.3.5). I think this may be a bug.

Btw, I am trying to add a frictional wall/mesh into this code, do you have some suggestions on this topic? For instance, how to store the tangential history between the particles and the wall/mesh? Are there any existing classes or functions that could contribute to this case? Does the ESyS-Particle include edge contact or corner contact (These would be common in Triangle Mess)?

With kind regards,

Yours sincerely,

Bin Cheng.

SteffenAbe (s-abe) said : #12

Hi Bin,

no worries w.r.t the pack/unpack functions. It did have a useful outcome after all - if you hadn't made the mistake I wouldn't have spotted the bug with the wrong interaction storage class. Btw, the fix for that bug will be committed when I've done some tests, i.e. in the next few days.

W.r.t. frictional mesh walls:
- I remember that Dion and myself did discuss this feature a while ago but ran into some obstacle making the implementation more difficult than expected and therefore didn't go ahead with this. Unfortunately I don't remember what the problem was.

- edge / corner interaction are implemented in the elastic interaction with a mesh. See ETriMeshInteraction and stuff included there.

Steffen

Bin Cheng (bincheng) said : #13

Thanks for your help!

Btw, could you give me some advice on how to add the socalled "moving mesh", which would has translation and rotation according to the force and moment generated by the granular system? In other words, how to get the force vector and contact position of the particle-mesh interaction and how to change the position of all points in the mesh every timestep? Maybe Runnable could do this work?

With kind regards,

Yours sincerely,

Bin Cheng.

Bin Cheng (bincheng) said : #14

Thanks Dion Weatherley, that solved my question.