Simplifying behavior of bpm bonds without breakage

This commit is contained in:
jtclemm
2024-12-09 11:04:27 -07:00
parent bcd123c882
commit 4c496df934
5 changed files with 19 additions and 6 deletions

View File

@ -154,8 +154,10 @@ page on BPMs.
If the *break* keyword is set to *no*, LAMMPS assumes bonds should not break
during a simulation run. This will prevent some unnecessary calculation.
However, if a bond reaches a damage criterion greater than one,
it will trigger an error.
The recommended bond communication distance no longer depends on bond failure
coefficients (which are ignored) but instead corresponds to the typical heurestic
maximum strain used by typical non-bpm bond styles. One cannot use *break no*
with *smooth yes*.
If the *store/local* keyword is used, an internal fix will track bonds that
break during the simulation. Whenever a bond breaks, data is processed

View File

@ -117,8 +117,10 @@ page on BPMs.
If the *break* keyword is set to *no*, LAMMPS assumes bonds should not break
during a simulation run. This will prevent some unnecessary calculation.
However, if a bond reaches a strain greater than :math:`\epsilon_c`,
it will trigger an error.
The recommended bond communication distance no longer depends on the value of
:math:`\epsilon_c` (which is ignored) but instead corresponds to the typical
heurestic maximum strain used by typical non-bpm bond styles. One cannot use
*break no* with *smooth yes*.
.. versionadded:: TBD

View File

@ -331,6 +331,9 @@ void BondBPM::settings(int narg, char **arg)
double BondBPM::equilibrium_distance(int /*i*/)
{
if (!break_flag)
return r0_max_estimate;
// Ghost atoms may not yet be communicated, this may only be an estimate
if (r0_max_estimate == 0) {
if (!fix_bond_history->restart_reset) {

View File

@ -523,7 +523,7 @@ void BondBPMRotational::compute(int eflag, int vflag)
breaking = elastic_forces(i1, i2, type, r_mag, r0_mag, r_mag_inv, rhat, r, r0, force1on2,
torque1on2, torque2on1);
if (breaking >= 1.0) {
if ((breaking >= 1.0) && break_flag) {
bondlist[n][2] = 0;
process_broken(i1, i2);
continue;
@ -684,6 +684,9 @@ void BondBPMRotational::settings(int narg, char **arg)
error->all(FLERR, "Illegal bond bpm command, invalid argument {}", arg[iarg]);
}
}
if (smooth_flag && !break_flag)
error->all(FLERR, "Illegal bond bpm command, must turn off smoothing with break no option");
}
/* ----------------------------------------------------------------------

View File

@ -245,7 +245,7 @@ void BondBPMSpring::compute(int eflag, int vflag)
r = sqrt(rsq);
e = (r - r0) / r0;
if (fabs(e) > ecrit[type]) {
if ((fabs(e) > ecrit[type]) && break_flag) {
bondlist[n][2] = 0;
process_broken(i1, i2);
@ -485,6 +485,9 @@ void BondBPMSpring::settings(int narg, char **arg)
error->all(FLERR, "Illegal bond bpm command, invalid argument {}", arg[iarg]);
}
}
if (smooth_flag && !break_flag)
error->all(FLERR, "Illegal bond bpm command, must turn off smoothing with break no option");
}
/* ----------------------------------------------------------------------