diff -Naur lammps-10Apr08/doc/bond_class2.html lammps-11Apr08/doc/bond_class2.html --- lammps-10Apr08/doc/bond_class2.html 2007-06-25 08:36:36.000000000 -0600 +++ lammps-11Apr08/doc/bond_class2.html 2008-04-09 11:29:51.000000000 -0600 @@ -37,8 +37,8 @@

Restrictions:

diff -Naur lammps-10Apr08/doc/bond_class2.txt lammps-11Apr08/doc/bond_class2.txt --- lammps-10Apr08/doc/bond_class2.txt 2007-06-25 18:03:39.000000000 -0600 +++ lammps-11Apr08/doc/bond_class2.txt 2008-04-09 11:29:51.000000000 -0600 @@ -34,8 +34,8 @@ R0 (distance) K2 (energy/distance^2) -K3 (energy/distance^2) -K4 (energy/distance^2) :ul +K3 (energy/distance^3) +K4 (energy/distance^4) :ul [Restrictions:] diff -Naur lammps-10Apr08/doc/fix_langevin.html lammps-11Apr08/doc/fix_langevin.html --- lammps-10Apr08/doc/fix_langevin.html 2008-04-04 15:15:50.000000000 -0600 +++ lammps-11Apr08/doc/fix_langevin.html 2008-04-09 11:29:51.000000000 -0600 @@ -173,6 +173,8 @@

The option defaults are axes = 1 1 1, scale = 1.0 for all types, no region, and weight = 1.0.

+
+

(Dunweg) Dunweg and Paul, Int J of Modern Physics C, 2, 817-27 (1991). diff -Naur lammps-10Apr08/doc/fix_langevin.txt lammps-11Apr08/doc/fix_langevin.txt --- lammps-10Apr08/doc/fix_langevin.txt 2008-04-04 15:15:50.000000000 -0600 +++ lammps-11Apr08/doc/fix_langevin.txt 2008-04-09 11:29:51.000000000 -0600 @@ -164,5 +164,7 @@ The option defaults are axes = 1 1 1, scale = 1.0 for all types, no region, and weight = 1.0. +:line + :link(Dunweg) [(Dunweg)] Dunweg and Paul, Int J of Modern Physics C, 2, 817-27 (1991). diff -Naur lammps-10Apr08/doc/fix_wall_gran.html lammps-11Apr08/doc/fix_wall_gran.html --- lammps-10Apr08/doc/fix_wall_gran.html 2007-10-10 16:28:11.000000000 -0600 +++ lammps-11Apr08/doc/fix_wall_gran.html 2008-04-09 11:29:51.000000000 -0600 @@ -24,7 +24,7 @@

  • args = list of arguments for a particular style
      xplane or yplane or zplane args = lo hi gamma xmu
    -    lo, hi = position of lower and upper plane (either can be NULL)
    +    lo,hi = position of lower and upper plane (distance units), either can be NULL)
         gamman = damping coeff for normal direction collisions with wall
         xmu = friction coeff for the wall
       zcylinder args = radius gamma xmu
    @@ -34,11 +34,15 @@
     
  • zero or more keyword/value pairs may be appended to args -
      keyword = wiggle
    -    values = dim amplitude period
    -      dim = x or y or z
    -      amplitude = size of oscillation (distance units)
    -      period = time of oscillation (time units) 
    +
  • keyword = wiggle or shear + +
      wiggle values = dim amplitude period
    +    dim = x or y or z
    +    amplitude = size of oscillation (distance units)
    +    period = time of oscillation (time units)
    +  shear values = dim vshear
    +    dim = x or y or z
    +    vshear = magnitude of shear velocity (velocity units) 
     
    @@ -62,20 +66,38 @@ For all wallstyles, a damping and friction coefficient for particle-wall interactions are also specified.

    -

    Optionally, a wall can be oscillated, similar to the oscillations of -frozen particles specified by the fix_wiggle -command. This is useful in packing simulations of granular particles. -If the keyword wiggle is appended to the argument list, then a -dimension for the motion, as well as it's amplitude and period is -specified. Each timestep, the position of the wall in the appropriate -dim is set according to this equation: +

    Optionally, the wall can be moving, if the wiggle or shear +keywords are appended. Both keywords cannot be used together. +

    +

    For the wiggle keyword, the wall oscillates sinusoidally, similar to +the oscillations of frozen particles specified by the +fix_wiggle command. This is useful in packing +simulations of granular particles. The arguments to the wiggle +keyword specify a dimension for the motion, as well as it's +amplitude and period. Note that if the dimension is in the plane +of the wall, this is effectively a shearing motion. If the dimension +is perpendicular to the wall, it is more of a shaking motion. A +zcylinder wall can only be wiggled in the z dimension. +

    +

    Each timestep, the position of a wiggled wall in the appropriate dim +is set according to this equation:

    position = pos0 + A - A cos (omega * delta) 
     

    where pos0 is the position at the time the fix was specified, A is the amplitude, omega is 2 PI / period, and delta is the elapsed time since the fix was specified. The velocity of the wall is -also set to the derivative of this expression. +set to the derivative of this expression. +

    +

    For the shear keyword, the wall moves continuously in the specified +dimension with velocity vshear. The dimension must be tangential to +walls with a planar wallstyle, e.g. in the y or z directions for +an xplane wall. For zcylinder walls, a dimension of z means the +cylinder is moving in the z-direction along it's axis. A dimension of +x or y means the cylinder is spinning around the z-axis, either in +the clockwise direction for vshear > 0 or counter-clockwise for +vshear < 0. In this case, vshear is the tangential velocity of +the wall at whatever radius has been defined.

    Restart, fix_modify, output, run start/stop, minimize info:

    @@ -102,8 +124,6 @@

    Any dimension (xyz) that has a granular wall must be non-periodic.

    -

    A zcylinder wall can only be oscillated in the z dimension. -

    Related commands:

    fix_wiggle diff -Naur lammps-10Apr08/doc/fix_wall_gran.txt lammps-11Apr08/doc/fix_wall_gran.txt --- lammps-10Apr08/doc/fix_wall_gran.txt 2007-10-10 16:28:11.000000000 -0600 +++ lammps-11Apr08/doc/fix_wall_gran.txt 2008-04-09 11:29:51.000000000 -0600 @@ -17,7 +17,7 @@ style = {xplane} or {yplane} or {zplane} or {zcylinder} :l args = list of arguments for a particular style :l {xplane} or {yplane} or {zplane} args = lo hi gamma xmu - lo, hi = position of lower and upper plane (either can be NULL) + lo,hi = position of lower and upper plane (distance units), either can be NULL) gamman = damping coeff for normal direction collisions with wall xmu = friction coeff for the wall {zcylinder} args = radius gamma xmu @@ -25,11 +25,14 @@ gamman = damping coeff for normal direction collisions with wall xmu = friction coeff for the wall :pre zero or more keyword/value pairs may be appended to args :l - keyword = {wiggle} - values = dim amplitude period - dim = {x} or {y} or {z} - amplitude = size of oscillation (distance units) - period = time of oscillation (time units) :pre +keyword = {wiggle} or {shear} :l + {wiggle} values = dim amplitude period + dim = {x} or {y} or {z} + amplitude = size of oscillation (distance units) + period = time of oscillation (time units) + {shear} values = dim vshear + dim = {x} or {y} or {z} + vshear = magnitude of shear velocity (velocity units) :pre :ule [Examples:] @@ -52,20 +55,38 @@ For all wallstyles, a damping and friction coefficient for particle-wall interactions are also specified. -Optionally, a wall can be oscillated, similar to the oscillations of -frozen particles specified by the "fix_wiggle"_fix_wiggle.html -command. This is useful in packing simulations of granular particles. -If the keyword {wiggle} is appended to the argument list, then a -dimension for the motion, as well as it's {amplitude} and {period} is -specified. Each timestep, the position of the wall in the appropriate -{dim} is set according to this equation: +Optionally, the wall can be moving, if the {wiggle} or {shear} +keywords are appended. Both keywords cannot be used together. + +For the {wiggle} keyword, the wall oscillates sinusoidally, similar to +the oscillations of frozen particles specified by the +"fix_wiggle"_fix_wiggle.html command. This is useful in packing +simulations of granular particles. The arguments to the {wiggle} +keyword specify a dimension for the motion, as well as it's +{amplitude} and {period}. Note that if the dimension is in the plane +of the wall, this is effectively a shearing motion. If the dimension +is perpendicular to the wall, it is more of a shaking motion. A +{zcylinder} wall can only be wiggled in the z dimension. + +Each timestep, the position of a wiggled wall in the appropriate {dim} +is set according to this equation: position = pos0 + A - A cos (omega * delta) :pre where {pos0} is the position at the time the fix was specified, {A} is the {amplitude}, {omega} is 2 PI / {period}, and {delta} is the elapsed time since the fix was specified. The velocity of the wall is -also set to the derivative of this expression. +set to the derivative of this expression. + +For the {shear} keyword, the wall moves continuously in the specified +dimension with velocity {vshear}. The dimension must be tangential to +walls with a planar {wallstyle}, e.g. in the {y} or {z} directions for +an {xplane} wall. For {zcylinder} walls, a dimension of {z} means the +cylinder is moving in the z-direction along it's axis. A dimension of +{x} or {y} means the cylinder is spinning around the z-axis, either in +the clockwise direction for {vshear} > 0 or counter-clockwise for +{vshear} < 0. In this case, {vshear} is the tangential velocity of +the wall at whatever {radius} has been defined. [Restart, fix_modify, output, run start/stop, minimize info:] @@ -92,8 +113,6 @@ Any dimension (xyz) that has a granular wall must be non-periodic. -A zcylinder wall can only be oscillated in the z dimension. - [Related commands:] "fix_wiggle"_fix_wiggle.html diff -Naur lammps-10Apr08/src/GRANULAR/fix_wall_gran.cpp lammps-11Apr08/src/GRANULAR/fix_wall_gran.cpp --- lammps-10Apr08/src/GRANULAR/fix_wall_gran.cpp 2008-01-09 14:56:57.000000000 -0700 +++ lammps-11Apr08/src/GRANULAR/fix_wall_gran.cpp 2008-04-09 11:29:57.000000000 -0600 @@ -94,6 +94,7 @@ // check for trailing keyword/values wiggle = 0; + wshear = 0; while (iarg < narg) { if (strcmp(arg[iarg],"wiggle") == 0) { @@ -106,6 +107,15 @@ period = atof(arg[iarg+3]); wiggle = 1; iarg += 4; + } else if (strcmp(arg[iarg],"shear") == 0) { + if (iarg+3 > narg) error->all("Illegal fix wall/gran command"); + if (strcmp(arg[iarg+1],"x") == 0) axis = 0; + else if (strcmp(arg[iarg+1],"y") == 0) axis = 1; + else if (strcmp(arg[iarg+1],"z") == 0) axis = 2; + else error->all("Illegal fix wall/gran command"); + vshear = atof(arg[iarg+2]); + wshear = 1; + iarg += 3; } else error->all("Illegal fix wall/gran command"); } @@ -118,8 +128,15 @@ if (wallstyle == ZCYLINDER && (domain->xperiodic || domain->yperiodic)) error->all("Cannot use wall in periodic dimension"); - if (wallstyle == ZCYLINDER && wiggle) - if (axis != 2) error->all("Can only wiggle zcylinder wall in z dim"); + if (wiggle && wshear) error->all("Cannot wiggle and shear fix wall/gran"); + if (wiggle && wallstyle == ZCYLINDER && axis != 2) + error->all("Invalid wiggle direction for fix wall/gran"); + if (wshear && wallstyle == XPLANE && axis == 0) + error->all("Invalid shear direction for fix wall/gran"); + if (wshear && wallstyle == YPLANE && axis == 1) + error->all("Invalid shear direction for fix wall/gran"); + if (wshear && wallstyle == ZPLANE && axis == 2) + error->all("Invalid shear direction for fix wall/gran"); // setup oscillations @@ -208,7 +225,7 @@ double vwall[3],dx,dy,dz,del1,del2,delxy,delr,rsq; // set position of wall to initial settings and velocity to 0.0 - // if wiggle, set wall position and velocity accordingly + // if wiggle or shear, set wall position and velocity accordingly double wlo = lo; double whi = hi; @@ -217,13 +234,13 @@ double arg = omega * (update->ntimestep - time_origin) * dt; wlo = lo + amplitude - amplitude*cos(arg); whi = hi + amplitude - amplitude*cos(arg); - vwall[axis] = dt * amplitude*omega*sin(arg); - } + vwall[axis] = amplitude*omega*sin(arg); + } else if (wshear) vwall[axis] = vshear; // loop over all my atoms // rsq = distance from wall // dx,dy,dz = signed distance from wall - // in cylinder case + // for rotating cylinder, reset vwall based on particle position // skip atom if not close enough to wall // if wall was set to NULL, it's skipped since lo/hi are infinity // compute force and torque on atom if close enough to wall @@ -267,6 +284,11 @@ else { dx = -delr/delxy * x[i][0]; dy = -delr/delxy * x[i][1]; + if (wshear && axis != 2) { + vwall[0] = vshear * x[i][1]/delxy; + vwall[1] = -vshear * x[i][0]/delxy; + vwall[2] = 0.0; + } } } @@ -302,7 +324,7 @@ { double r,vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3; double wr1,wr2,wr3,xmeff,damp,ccel,vtr1,vtr2,vtr3,vrel; - double fn,fs,ft,fs1,fs2,fs3,ccelx,ccely,ccelz,tor1,tor2,tor3; + double fn,fs,ft,fs1,fs2,fs3,ccelx,ccely,ccelz,tor1,tor2,tor3,rinv; r = sqrt(rsq); @@ -381,9 +403,10 @@ // torques - tor1 = dy*fs3 - dz*fs2; - tor2 = dz*fs1 - dx*fs3; - tor3 = dx*fs2 - dy*fs1; + rinv = 1/r; + tor1 = rinv * (dy*fs3 - dz*fs2); + tor2 = rinv * (dz*fs1 - dx*fs3); + tor3 = rinv * (dx*fs2 - dy*fs1); torque[0] -= radius*tor1; torque[1] -= radius*tor2; torque[2] -= radius*tor3; @@ -525,7 +548,7 @@ double r,vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3; double wr1,wr2,wr3,xmeff,damp,ccel,vtr1,vtr2,vtr3,vrel; double fn,fs,fs1,fs2,fs3,ccelx,ccely,ccelz,tor1,tor2,tor3; - double shrmag,rsht,rhertz; + double shrmag,rsht,rhertz,rinv; r = sqrt(rsq); @@ -634,9 +657,10 @@ // torques - tor1 = dy*fs3 - dz*fs2; - tor2 = dz*fs1 - dx*fs3; - tor3 = dx*fs2 - dy*fs1; + rinv = 1/r; + tor1 = rinv * (dy*fs3 - dz*fs2); + tor2 = rinv * (dz*fs1 - dx*fs3); + tor3 = rinv * (dx*fs2 - dy*fs1); torque[0] -= radius*tor1; torque[1] -= radius*tor2; torque[2] -= radius*tor3; diff -Naur lammps-10Apr08/src/GRANULAR/fix_wall_gran.h lammps-11Apr08/src/GRANULAR/fix_wall_gran.h --- lammps-10Apr08/src/GRANULAR/fix_wall_gran.h 2008-01-09 14:56:57.000000000 -0700 +++ lammps-11Apr08/src/GRANULAR/fix_wall_gran.h 2008-04-09 11:29:57.000000000 -0600 @@ -39,11 +39,11 @@ void reset_dt(); private: - int wallstyle,pairstyle,wiggle,axis; + int wallstyle,pairstyle,wiggle,wshear,axis; double xkk,xkkt,gamman,xmu; double lo,hi,cylradius; double dt,gamman_dl,gammas_dl; - double amplitude,period,omega,time_origin; + double amplitude,period,omega,time_origin,vshear; int *touch; double **shear;