Initalizing nullptrs, fixing labels, small errors in doc, and sign errors in rot sliding damp
This commit is contained in:
@ -105,7 +105,7 @@ radial normal vector, and :math:`\vec{v}` is the velocity difference
|
||||
between the two particles. Similarly, tangential forces are applied to
|
||||
each atom proportional to the relative differences in sliding
|
||||
velocities with a constant prefactor :math:`\gamma_s` (:ref:`(Wang et
|
||||
al.) <Wang2015>) along with their associated torques. The rolling and
|
||||
al.) <Wang2015>`) along with their associated torques. The rolling and
|
||||
twisting components of the relative angular velocities of the two
|
||||
atoms are also damped by applying torques with prefactors of
|
||||
:math:`\gamma_r` and :math:`\gamma_t`, respectively.
|
||||
@ -117,16 +117,16 @@ or :doc:`read_restart <read_restart>` commands:
|
||||
|
||||
* :math:`k_r` (force/distance units)
|
||||
* :math:`k_s` (force/distance units)
|
||||
* :math:`k_t` (force units)
|
||||
* :math:`k_b` (force units)
|
||||
* :math:`k_t` (force*distance/radians units)
|
||||
* :math:`k_b` (force*distance/radians units)
|
||||
* :math:`f_{r,c}` (force units)
|
||||
* :math:`f_{s,c}` (force units)
|
||||
* :math:`\tau_{b,c}` (force*distance units)
|
||||
* :math:`\tau_{t,c}` (force*distance units)
|
||||
* :math:`\gamma_n` (force/velocity units)
|
||||
* :math:`\gamma_s` (force/velocity units)
|
||||
* :math:`\gamma_r` (distance*force/seconds/radians units)
|
||||
* :math:`\gamma_t` (distance*force/seconds/radians units)
|
||||
* :math:`\gamma_r` (force*distance/velocity units)
|
||||
* :math:`\gamma_t` (force*distance/velocity units)
|
||||
|
||||
By default, pair forces are not calculated between bonded particles.
|
||||
Pair forces can alternatively be overlaid on top of bond forces using
|
||||
|
||||
@ -113,7 +113,7 @@ void BondBPM::init_style()
|
||||
} else {
|
||||
// Require atoms know about all of their bonds and if they break
|
||||
if (force->newton_bond)
|
||||
error->all(FLERR,"Without overlay/pair, BPM bond sytles require Newton bond off");
|
||||
error->all(FLERR,"Without overlay/pair, BPM bond styles require Newton bond off");
|
||||
|
||||
// special lj must be 0 1 1 to censor pair forces between bonded particles
|
||||
// special coulomb must be 1 1 1 to ensure all pairs are included in the
|
||||
|
||||
@ -81,16 +81,16 @@ E: Illegal bond_style command
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
E: Bond style bpm/rotational must include at least one value to output
|
||||
E: Bond style bpm must include at least one value to output
|
||||
|
||||
Must include at least one bond property to store in fix store/local
|
||||
|
||||
E: Bond style bpm/rotational cannot be used with 3,4-body interactions
|
||||
E: Bond style bpm cannot be used with 3,4-body interactions
|
||||
|
||||
No angle, dihedral, or improper styles can be defined when using
|
||||
bond style bpm/rotational.
|
||||
bond style bpm.
|
||||
|
||||
E: Bond style bpm/rotational cannot be used with atom style template
|
||||
E: Bond style bpm cannot be used with atom style template
|
||||
|
||||
This bond style can change the bond topology which is not
|
||||
allowed with this atom style.
|
||||
|
||||
@ -37,6 +37,18 @@ using namespace MathExtra;
|
||||
|
||||
BondBPMRotational::BondBPMRotational(LAMMPS *lmp) : BondBPM(lmp)
|
||||
{
|
||||
Kr = nullptr;
|
||||
Ks = nullptr;
|
||||
Kt = nullptr;
|
||||
Kb = nullptr;
|
||||
Fcr = nullptr;
|
||||
Fcs = nullptr;
|
||||
Tct = nullptr;
|
||||
Tcb = nullptr;
|
||||
gnorm = nullptr;
|
||||
gslide = nullptr;
|
||||
groll = nullptr;
|
||||
gtwist = nullptr;
|
||||
partial_flag = 1;
|
||||
}
|
||||
|
||||
@ -392,16 +404,15 @@ void BondBPMRotational::damping_forces(int i1, int i2, int type, double& Fr,
|
||||
MathExtra::sub3(v[i2], vn2, vt2);
|
||||
|
||||
MathExtra::sub3(vt2, vt1, tmp);
|
||||
MathExtra::scale3(-0.5, tmp);
|
||||
MathExtra::scale3(0.5, tmp);
|
||||
|
||||
MathExtra::cross3(omega[i1], r, s1);
|
||||
MathExtra::scale3(0.5, s1);
|
||||
MathExtra::scale3(-0.5, s1);
|
||||
MathExtra::sub3(s1, tmp, s1); // Eq 12
|
||||
|
||||
MathExtra::cross3(omega[i2], r, s2);
|
||||
MathExtra::scale3(-0.5,s2);
|
||||
MathExtra::scale3(0.5,s2);
|
||||
MathExtra::add3(s2, tmp, s2); // Eq 13
|
||||
MathExtra::scale3(-0.5,s2);
|
||||
|
||||
MathExtra::sub3(s1, s2, tmp);
|
||||
MathExtra::scale3(gslide[type], tmp);
|
||||
@ -409,7 +420,7 @@ void BondBPMRotational::damping_forces(int i1, int i2, int type, double& Fr,
|
||||
|
||||
// Apply corresponding torque
|
||||
MathExtra::cross3(r,tmp,tdamp);
|
||||
MathExtra::scale3(-0.5, tdamp); // 0.5*r points from particle 2 to midpoint
|
||||
MathExtra::scale3(0.5, tdamp);
|
||||
MathExtra::add3(torque1on2, tdamp, torque1on2);
|
||||
MathExtra::add3(torque2on1, tdamp, torque2on1);
|
||||
|
||||
@ -624,7 +635,7 @@ void BondBPMRotational::coeff(int narg, char **arg)
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
check if pair defined and special_bond settings are valid
|
||||
check for correct settings and create fix
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void BondBPMRotational::init_style()
|
||||
|
||||
@ -32,6 +32,9 @@ using namespace LAMMPS_NS;
|
||||
|
||||
BondBPMSpring::BondBPMSpring(LAMMPS *lmp) : BondBPM(lmp)
|
||||
{
|
||||
k = nullptr;
|
||||
ecrit = nullptr;
|
||||
gamma = nullptr;
|
||||
partial_flag = 1;
|
||||
}
|
||||
|
||||
@ -265,7 +268,7 @@ void BondBPMSpring::coeff(int narg, char **arg)
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
check if pair defined and special_bond settings are valid
|
||||
check for correct settings and create fix
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void BondBPMSpring::init_style()
|
||||
|
||||
@ -60,16 +60,8 @@ E: Incorrect args for bond coefficients
|
||||
|
||||
Self-explanatory. Check the input script or data file.
|
||||
|
||||
E: Bond bpm/rotational requires atom style sphere/bpm
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
E: Bond style bpm requires 1-3 and 1-4 special weights of 1.0
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
W: Bond style bpm/rotational not intended for 2d use, may be inefficient
|
||||
|
||||
This bond style will perform a lot of unnecessary calculations in 2d
|
||||
|
||||
*/
|
||||
|
||||
@ -82,7 +82,7 @@ void FixStoreLocal::add_data(double *input_data, int i, int j)
|
||||
if (nvalues == 1) {
|
||||
vector[ncount] = input_data[0];
|
||||
} else {
|
||||
for (int i = 0; i < nvalues; i++) array[ncount][i] = input_data[i];
|
||||
for (int n = 0; n < nvalues; n++) array[ncount][n] = input_data[n];
|
||||
}
|
||||
|
||||
ncount += 1;
|
||||
|
||||
Reference in New Issue
Block a user