diff -Naur lammps-11Oct08/doc/fix_lineforce.html lammps-17Oct08/doc/fix_lineforce.html --- lammps-11Oct08/doc/fix_lineforce.html 2007-10-10 16:28:11.000000000 -0600 +++ lammps-17Oct08/doc/fix_lineforce.html 2008-10-17 09:49:28.000000000 -0600 @@ -25,10 +25,10 @@

Description:

-

Adjust the forces on each atom in the group so that it's motion will -be along the linear direction specified by the vector (x,y,z). This -is done by subtracting out components of force perpendicular to the -line. +

Adjust the forces on each atom in the group so that only the component +of force along the linear direction specified by the vector (x,y,z) +remains. This is done by subtracting out components of force in the +plane perpendicular to the line.

If the initial velocity of the atom is 0.0 (or along the line), then it should continue to move along the line thereafter. diff -Naur lammps-11Oct08/doc/fix_lineforce.txt lammps-17Oct08/doc/fix_lineforce.txt --- lammps-11Oct08/doc/fix_lineforce.txt 2007-10-10 16:28:11.000000000 -0600 +++ lammps-17Oct08/doc/fix_lineforce.txt 2008-10-17 09:49:28.000000000 -0600 @@ -22,10 +22,10 @@ [Description:] -Adjust the forces on each atom in the group so that it's motion will -be along the linear direction specified by the vector (x,y,z). This -is done by subtracting out components of force perpendicular to the -line. +Adjust the forces on each atom in the group so that only the component +of force along the linear direction specified by the vector (x,y,z) +remains. This is done by subtracting out components of force in the +plane perpendicular to the line. If the initial velocity of the atom is 0.0 (or along the line), then it should continue to move along the line thereafter. diff -Naur lammps-11Oct08/doc/fix_planeforce.html lammps-17Oct08/doc/fix_planeforce.html --- lammps-11Oct08/doc/fix_planeforce.html 2007-10-10 16:28:11.000000000 -0600 +++ lammps-17Oct08/doc/fix_planeforce.html 2008-10-17 09:49:28.000000000 -0600 @@ -25,9 +25,10 @@

Description:

-

Adjust the forces on each atom in the group so that it's motion will -be in the plane specified by the normal vector (x,y,z). This is done -by subtracting out components of force perpendicular to the plane. +

Adjust the forces on each atom in the group so that only the +components of force in the plane specified by the normal vector +(x,y,z) remain. This is done by subtracting out the component of +force perpendicular to the plane.

If the initial velocity of the atom is 0.0 (or in the plane), then it should continue to move in the plane thereafter. diff -Naur lammps-11Oct08/doc/fix_planeforce.txt lammps-17Oct08/doc/fix_planeforce.txt --- lammps-11Oct08/doc/fix_planeforce.txt 2007-10-10 16:28:11.000000000 -0600 +++ lammps-17Oct08/doc/fix_planeforce.txt 2008-10-17 09:49:28.000000000 -0600 @@ -22,9 +22,10 @@ [Description:] -Adjust the forces on each atom in the group so that it's motion will -be in the plane specified by the normal vector (x,y,z). This is done -by subtracting out components of force perpendicular to the plane. +Adjust the forces on each atom in the group so that only the +components of force in the plane specified by the normal vector +(x,y,z) remain. This is done by subtracting out the component of +force perpendicular to the plane. If the initial velocity of the atom is 0.0 (or in the plane), then it should continue to move in the plane thereafter. diff -Naur lammps-11Oct08/doc/pair_gran.html lammps-17Oct08/doc/pair_gran.html --- lammps-11Oct08/doc/pair_gran.html 2008-03-18 14:18:54.000000000 -0600 +++ lammps-17Oct08/doc/pair_gran.html 2008-10-10 16:54:00.000000000 -0600 @@ -21,15 +21,13 @@

Examples:

@@ -39,32 +37,42 @@

The gran styles use the following formula (Silbert) for frictional force between two granular particles that are a distance r -apart when r is less than the contact distance d. +apart when r is less than the contact distance d = Ri + Rj, where Ri +and Rj are the radii of the two particles:

The 1st term is a normal force and the 2nd term is a tangential force. -The other quantities are as follows: +The normal force has 2 parts: a contact force and a damping force. +The tangential force also has 2 parts: a shear force and a damping +force. The shear force is included in pair styles history and +Hertzian, but is not included in pair style no_history. The +tangential damping force is not included if dampflag is set to 0. +The other quantities in the equation are as follows:

The Kn and gamma_n coefficients are set as parameters to the -pair_style command. Xmu is also specified which is the upper limit of -the tangential force through the Coulomb criterion Ft = xmu*Fn. The -tangential force between 2 particles grows according to a tangential -spring and dash-pot model until Ft/Fn = xmu and then is held at Ft = -Fn*xmu until the particles lose contact. +pair_style command. You can also think of Kn as being in mg/d units +where m is mass, g is the gravitational constant, and d is the +characteristic diameter of a particle. +

+

Xmu is also specified in the pair_style command and is the upper limit +of the tangential force through the Coulomb criterion Ft = xmu*Fn. +The tangential force between 2 particles grows according to a +tangential spring and dash-pot model until Ft/Fn = xmu and is then +held at Ft = Fn*xmu until the particles lose contact.

For granular styles there are no individual atom type coefficients that can be set via the pair_coeff command. All diff -Naur lammps-11Oct08/doc/pair_gran.txt lammps-17Oct08/doc/pair_gran.txt --- lammps-11Oct08/doc/pair_gran.txt 2008-03-18 14:18:54.000000000 -0600 +++ lammps-17Oct08/doc/pair_gran.txt 2008-10-10 16:54:00.000000000 -0600 @@ -15,11 +15,10 @@ pair_style style Kn gamma_n xmu dampflag :pre style = {gran/hertzian} or {gran/history} or {gran/no_history} :ulb,l -Kn = spring constant for particle repulsion :l - (mg/d units where m is mass, g is the gravitational constant, d is diameter of a particle) :pre -gamma_n = damping coefficient for normal direction collisions (sqrt(g/d) units) :l -xmu = static yield criterion :l -dampflag = flag (0/1) for whether to (no/yes) include tangential damping :l,ule +Kn = spring constant for particle repulsion (force/distance units) :l +gamma_n = damping coefficient for normal direction collisions (1/time units) :l +xmu = static yield criterion (unitless) :l +dampflag = 0 or 1 if tangential damping force is excluded or included :l,ule [Examples:] @@ -29,33 +28,43 @@ The {gran} styles use the following formula "(Silbert)"_#Silbert for frictional force between two granular particles that are a distance r -apart when r is less than the contact distance d. +apart when r is less than the contact distance d = Ri + Rj, where Ri +and Rj are the radii of the two particles: :c,image(Eqs/pair_granular.jpg) The 1st term is a normal force and the 2nd term is a tangential force. -The other quantities are as follows: +The normal force has 2 parts: a contact force and a damping force. +The tangential force also has 2 parts: a shear force and a damping +force. The shear force is included in pair styles {history} and +{Hertzian}, but is not included in pair style {no_history}. The +tangential damping force is not included if {dampflag} is set to 0. +The other quantities in the equation are as follows: delta = d - r -f(x) = 1 for Hookean contacts used in pair styles {history} and {no_history} -f(x) = sqrt(x) for pair style {hertzian} +f(x) = 1 for Hookean contact used in pair styles {history} and {no_history} +f(x) = sqrt(x) for Hertzian contact used in pair style {hertzian} Kn = elastic constant for normal contact Kt = elastic constant for tangential contact = 2/7 of Kn -gamma_n = viscoelastic constants for normal contact -gamma_t = viscoelastic constants for tangential contact = 1/2 of gamma_n +gamma_n = viscoelastic damping constant for normal contact +gamma_t = viscoelastic damping constant for tangential contact = 1/2 of gamma_n m_eff = Mi Mj / (Mi + Mj) = effective mass of 2 particles of mass Mi and Mj Delta St = tangential displacement vector between the 2 spherical particles \ which is truncated to satisfy a frictional yield criterion -n = a unit vector along the line connecting the centers of the 2 particles +n_ij = unit vector along the line connecting the centers of the 2 particles Vn = normal component of the relative velocity of the 2 particles Vt = tangential component of the relative velocity of the 2 particles :ul The Kn and gamma_n coefficients are set as parameters to the -pair_style command. Xmu is also specified which is the upper limit of -the tangential force through the Coulomb criterion Ft = xmu*Fn. The -tangential force between 2 particles grows according to a tangential -spring and dash-pot model until Ft/Fn = xmu and then is held at Ft = -Fn*xmu until the particles lose contact. +pair_style command. You can also think of Kn as being in mg/d units +where m is mass, g is the gravitational constant, and d is the +characteristic diameter of a particle. + +Xmu is also specified in the pair_style command and is the upper limit +of the tangential force through the Coulomb criterion Ft = xmu*Fn. +The tangential force between 2 particles grows according to a +tangential spring and dash-pot model until Ft/Fn = xmu and is then +held at Ft = Fn*xmu until the particles lose contact. For granular styles there are no individual atom type coefficients that can be set via the "pair_coeff"_pair_coeff.html command. All diff -Naur lammps-11Oct08/doc/pair_hybrid.html lammps-17Oct08/doc/pair_hybrid.html --- lammps-11Oct08/doc/pair_hybrid.html 2008-02-19 14:47:37.000000000 -0700 +++ lammps-17Oct08/doc/pair_hybrid.html 2008-10-09 09:16:41.000000000 -0600 @@ -150,7 +150,8 @@ files, so a pair_style command does not need to specified in an input script that reads a restart file. However, the coefficient information is not stored in the restart file. Thus, -pair_coeff commands need to be specified in the restart input script. +pair_coeff commands need to be re-specified in the restart input +script.

These pair styles support the use of the inner, middle, and outer keywords of the run_style respa command, if diff -Naur lammps-11Oct08/doc/pair_hybrid.txt lammps-17Oct08/doc/pair_hybrid.txt --- lammps-11Oct08/doc/pair_hybrid.txt 2008-02-19 14:47:37.000000000 -0700 +++ lammps-17Oct08/doc/pair_hybrid.txt 2008-10-09 09:16:41.000000000 -0600 @@ -146,7 +146,8 @@ files"_restart.html, so a pair_style command does not need to specified in an input script that reads a restart file. However, the coefficient information is not stored in the restart file. Thus, -pair_coeff commands need to be specified in the restart input script. +pair_coeff commands need to be re-specified in the restart input +script. These pair styles support the use of the {inner}, {middle}, and {outer} keywords of the "run_style respa"_run_style.html command, if diff -Naur lammps-11Oct08/src/fix_line_force.cpp lammps-17Oct08/src/fix_line_force.cpp --- lammps-11Oct08/src/fix_line_force.cpp 2008-01-09 14:56:57.000000000 -0700 +++ lammps-17Oct08/src/fix_line_force.cpp 2008-10-17 09:49:13.000000000 -0600 @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "math.h" #include "string.h" #include "stdlib.h" #include "fix_line_force.h" @@ -30,6 +31,13 @@ xdir = atof(arg[3]); ydir = atof(arg[4]); zdir = atof(arg[5]); + + double len = sqrt(xdir*xdir + ydir*ydir + zdir*zdir); + if (len == 0.0) error->all("Illegal fix lineforce command"); + + xdir /= len; + ydir /= len; + zdir /= len; } /* ---------------------------------------------------------------------- */ diff -Naur lammps-11Oct08/src/fix_plane_force.cpp lammps-17Oct08/src/fix_plane_force.cpp --- lammps-11Oct08/src/fix_plane_force.cpp 2008-01-09 14:56:57.000000000 -0700 +++ lammps-17Oct08/src/fix_plane_force.cpp 2008-10-17 09:49:13.000000000 -0600 @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "math.h" #include "string.h" #include "stdlib.h" #include "fix_plane_force.h" @@ -30,6 +31,13 @@ xdir = atof(arg[3]); ydir = atof(arg[4]); zdir = atof(arg[5]); + + double len = sqrt(xdir*xdir + ydir*ydir + zdir*zdir); + if (len == 0.0) error->all("Illegal fix planeforce command"); + + xdir /= len; + ydir /= len; + zdir /= len; } /* ---------------------------------------------------------------------- */