Sign Error in fix_wall_gran relating to cwl_->add_wall_1

Submitted by richti83 on
Attachment Size
in_pp.txt 2.63 KB
lid.stl_.txt 293 bytes
in_v.txt 2.53 KB
v.stl_.txt 649 bytes
correct.png 30.98 KB
wrong.png 31.09 KB

I think after the last changes in FixWallGran::post_force_eval_contact the line

vectorAdd3D(x_[cdata.i],cdata.delta,contactPoint);

Should be

vectorSubtract3D(x_[cdata.i],cdata.delta,contactPoint);

because the sign of delta has changed in the past.
One can check this with the script attached and having a look in post/fwc*.dump, the expected contact points are at z=0 and z=0.009 (wall bottom and top) but they are at the opposite side of the particle which touches the plane . (particles are expected to wiggle between bottom and top because cor=1 and gravity is off)

edit: added 2nd testscript with diagonal wall (in_V.txt) and two images to show the difference/problem.