Walls and meshes, one sided ?

Asked by Diego Peinado Martín

Hello Dion,

Is there any reason for having the walls and meshes only one side active?

In my case this can be very problematic because I would like to simulate a rotating cylinder with other geometry inside, so if the mesh is not one-sided, then the modelling can be very simple.

I've changed the function void CElasticWallInteraction<T>::calcForces(), working only with the absolute value of the particle to wall distance, and getting its sign to give the correct sense to the force. The code is as follows

  double dist=(this->m_p->getPos()-this->m_wall->getOrigin())*this->m_wall->getNormal();
  // console.XDebug() << "pos, rad, dist: " << this->m_p->getPos() << " " << this->m_p->getRad() << " " << dist << "\n";
  double absdist = fabs(dist);
  if(absdist<this->m_p->getRad()){
    Vec3 force=m_k*(this->m_p->getRad()-absdist)*this->m_wall->getNormal()*dist/absdist;
    Vec3 pos=this->m_p->getPos()-dist*this->m_wall->getNormal();

I want to make the same with triangular meshes, but I do not know if there is a strong reason for letting this interaction as one-sided.

When the tutorial regarding adding new models is on the launchpad, then I'll finish the new interaction models. when I have them, if you want I can send you the code.

Thanks in advance, best regards,

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Diego Peinado Martín
Solved:
Last query:
Last reply:
Revision history for this message
SteffenAbe (s-abe) said :
#1

There is no strong reason not to have "two-sided" wall or triangle mesh interactions. Both "one-sided" and "two-sided" interactions are valid options.
The reason why we decided to implement the elastic interaction between particles and walls or triangle mesh surfaces as one-sided was that we wanted to avoid the effect that if a particle is "pushed through" a wall, i.e. the particle center ends up on the other side of the wall relative to where the particle was originally located, the force would change its direction.
It may sound counterintutive but due to the linear elastic forces (a good approximation only for small displacements) it is actually possible to push particles to the other side of the wall, in particular if the stiffness (elastic modulus) of the elastic interaction between particle and wall is chosen too small. To avoid this sort of effect it would be possible to implement a non-linear force-displacement law (Hertzian?) between walls and particles - and be very careful regarding the time step size.
Btw, if you implement "two-sided" interactions, the "clean" way would be to implement a new wall (and Trimesh) interaction, something like "CTwoSidedElasticWallInteraction" instead of changing the current one.

Steffen

Revision history for this message
Diego Peinado Martín (diego-peinado) said :
#2

Thanks again for your anwer Dion. I see the problem, in fact I'm experiencing that kind of problems when playing around with parameters for optimizing the time step. Perhaps can be minimized choosing a bigger stiffness for wall particle interaction. Yes, I would like to implement the new interactions in a clean way, but unfortunately I do not know how to make it yet. I'm recompiling Esys each time I have to change one parameter. If I were in Aachen, at this time I could do that without problems :). I'm waiting Steve to post the tutorial regarding this.

Thanks.

Revision history for this message
Diego Peinado Martín (diego-peinado) said :
#3

Oopss, how stupid I am, excuseme Steffen, I did not read and I thought you were Dion.

Revision history for this message
SteffenAbe (s-abe) said :
#4

If you're increasing the stiffness, be careful to reduce the time step accordingly to maintain numerical stability.

Steffen