forked from lijiext/lammps
avoid undesired negative forces for high particle velocities in granular models
This commit is contained in:
parent
167a51538e
commit
066123007c
|
@ -183,6 +183,7 @@ void PairGranHertzHistory::compute(int eflag, int vflag)
|
|||
ccel = kn*(radsum-r)*rinv - damp;
|
||||
polyhertz = sqrt((radsum-r)*radi*radj / radsum);
|
||||
ccel *= polyhertz;
|
||||
if (ccel < 0.0) ccel = 0.0;
|
||||
|
||||
// relative velocities
|
||||
|
||||
|
@ -390,6 +391,7 @@ double PairGranHertzHistory::single(int i, int j, int itype, int jtype,
|
|||
ccel = kn*(radsum-r)*rinv - damp;
|
||||
polyhertz = sqrt((radsum-r)*radi*radj / radsum);
|
||||
ccel *= polyhertz;
|
||||
if (ccel < 0.0) ccel = 0.0;
|
||||
|
||||
// relative velocities
|
||||
|
||||
|
|
|
@ -161,6 +161,7 @@ void PairGranHooke::compute(int eflag, int vflag)
|
|||
|
||||
damp = meff*gamman*vnnr*rsqinv;
|
||||
ccel = kn*(radsum-r)*rinv - damp;
|
||||
if (ccel < 0.0) ccel = 0.0;
|
||||
|
||||
// relative velocities
|
||||
|
||||
|
@ -302,6 +303,7 @@ double PairGranHooke::single(int i, int j, int itype, int jtype, double rsq,
|
|||
|
||||
damp = meff*gamman*vnnr*rsqinv;
|
||||
ccel = kn*(radsum-r)*rinv - damp;
|
||||
if (ccel < 0.0) ccel = 0.0;
|
||||
|
||||
// relative velocities
|
||||
|
||||
|
|
|
@ -223,6 +223,7 @@ void PairGranHookeHistory::compute(int eflag, int vflag)
|
|||
|
||||
damp = meff*gamman*vnnr*rsqinv;
|
||||
ccel = kn*(radsum-r)*rinv - damp;
|
||||
if (ccel < 0.0) ccel = 0.0;
|
||||
|
||||
// relative velocities
|
||||
|
||||
|
@ -687,6 +688,7 @@ double PairGranHookeHistory::single(int i, int j, int itype, int jtype,
|
|||
|
||||
damp = meff*gamman*vnnr*rsqinv;
|
||||
ccel = kn*(radsum-r)*rinv - damp;
|
||||
if (ccel < 0.0) ccel = 0.0;
|
||||
|
||||
// relative velocities
|
||||
|
||||
|
|
Loading…
Reference in New Issue