Hello Team, greetings. I'm trying to account for the van der waals forces in my simulation. In order to that
1. I first started with copy-pasting and editing the existing cohesion model and very soon found that ".is_wall" in surfacesClose( ) is always false. That means, it does not detect the presence of walls. There is also a post on this and its implementation is in progress.
2. I then edited the normal_model_hooke.h and added vdw component to the surfacesIntersect and surfacesClose functions. The math is correct, vdw forces are written out to terminal for both these functions (using cout statements). But when I post-process the case, the force contribution from surfacesClose is always zero even when there is a non-zero vdw force. I can see force contribution from surfacesIntersect function though.
Originally surfacesClose is as shown below.
void surfacesClose(SurfacesCloseData &scdata, ForceData&, ForceData&)
{
if (scdata.contact_flags)
*scdata.contact_flags |= CONTACT_NORMAL_MODEL;
dissipateElasticPotential(scdata);
}
and now I add the vdw force to this as
void surfacesClose(SurfacesCloseData &scdata, ForceData & i_forces, ForceData & j_forces)
{
if (scdata.contact_flags)
*scdata.contact_flags |= CONTACT_NORMAL_MODEL;
dissipateElasticPotential(scdata);
// All code related to vdw force
//i_forces and j_forces if else lines
}
What could have gone wrong in this?
Thank you,
Jagan Mohan.
Daniel Queteschiner | Mon, 11/16/2020 - 09:51
Indicate force update
Have you set
scdata.has_force_update = true;
in your surfacesClose method? cf.
https://github.com/CFDEMproject/LIGGGHTS-PUBLIC/blob/master/src/pair_gra...
https://github.com/CFDEMproject/LIGGGHTS-PUBLIC/blob/master/src/pair_gra...
jagan1mohan | Mon, 11/16/2020 - 23:23
Hello Daniel
Thank you for your reply. Yes, the above said flag is updated to true and the model is now working fine. I forgot to update it here.