Sign Error in fix_wall_gran relating to cwl_->add_wall_1

richti83's picture
Submitted by richti83 on Sun, 01/11/2015 - 16:43

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.

AttachmentSize
Plain text icon in_pp.txt2.63 KB
Plain text icon lid.stl_.txt309 bytes
Plain text icon in_v.txt2.53 KB
Plain text icon v.stl_.txt649 bytes
Image icon correct.png30.98 KB
Image icon wrong.png31.09 KB
ckloss's picture

ckloss | Wed, 01/14/2015 - 19:10

Hi Christian,

correct! I'll fix it for the next release

Many thanks
Christoph