lammps/doc/fix_wall_gran.html

381 lines
18 KiB
HTML

<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>fix wall/gran command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID wall/gran Kn Kt gamma_n gamma_t xmu dampflag style args ... keyword values ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
<LI>wall/gran = style name of this fix command
<LI>Kn = elastic constant for normal particle repulsion (force/distance units or pressure units - see discussion below)
<LI>Kt = elastic constant for tangential contact (force/distance units or pressure units - see discussion below)
<LI>gamma_n = damping coefficient for collisions in normal direction (1/time units or 1/time-distance units - see discussion below)
<LI>gamma_t = damping coefficient for collisions in tangential direction (1/time units or 1/time-distance units - see discussion below)
<LI>xmu = static yield criterion (unitless fraction between 0.0 and 1.0)
<LI>dampflag = 0 or 1 if tangential damping force is excluded or included
<LI>one or more style/arg pairs may be appended
<LI>style = <I>xlo</I> or <I>xhi</I> or <I>ylo</I> or <I>yhi</I> or <I>zlo</I> or <I>zhi</I> or <I>zcylinder</I>
<LI>args = list of arguments for a particular style
<PRE> <I>xlo</I> or <I>xhi</I> or <I>ylo</I> or <I>yhi</I> or <I>zlo</I> or <I>zhi</I> args = coord vwall
coord = position of wall = constant or variable
constant = number like 0.0 or -30.0 (distance units)
variable = <A HREF = "variable.html">equal-style variable</A> like v_x or v_wiggle
vwall = velocity of wall in normal direction = constant or variable
constant = number like 0.0 or 2.0 (velocity units)
variable = <A HREF = "variable.html">equal-style variable</A> like v_vx or v_wiggle
<I>zcylinder</I> args = rad vrad
rad = radius of cylinder = constant or variable
constant = number like 0.0 or -30.0 (distance units)
variable = <A HREF = "variable.html">equal-style variable</A> like v_rad or v_wiggle
vwall = velocity of radius in normal direction = constant or variable
constant = number like 0.0 or 2.0 (velocity units)
variable = <A HREF = "variable.html">equal-style variable</A> like v_vrad or v_wiggle
</PRE>
<LI>zero or more keyword/value pairs may be appended to args
<LI>keyword = <I>shear</I> or <I>piston</I>
<PRE> <I>shear</I> values = dim vshear
dim = <I>x</I> or <I>y</I> or <I>z</I> or <I>theta</I>
vshear = shear velocity = constant or variable
constant = number like 2.0 or -2.0 (velocity units or radians/time units)
variable = <A HREF = "variable.html">equal-style variable</A> like v_vshear or v_wiggle
<I>piston</I> values = pload pmass
pload = external load on piston = constant or variable
constant = number like 0.0 or 30.0 (force units)
variable = <A HREF = "variable.html">equal-style variable</A> like v_push or v_wiggle
pmass = piston mass (mass units)
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 all wall/gran 200000.0 NULL 50.0 NULL 0.5 0 xlo -10.0 0 xhi 10.0 0
fix 1 all wall/gran 200000.0 NULL 50.0 NULL 0.5 0 zhi v_squeeze shear x v_ramp
fix 2 all wall/gran 100000.0 20000.0 50.0 30.0 0.5 1 zcylinder 15.0 0.0 piston -5000.0 1000.0
</PRE>
<P><B>Description:</B>
</P>
<P>Bound the simulation domain of a granular system with one or more
frictional walls. All particles in the group interact with the wall
when they are close enough to touch it.
</P>
<P>The first set of parameters (<I>Kn</I>, <I>Kt</I>, <I>gamma_n</I>, <I>gamma_t</I>, <I>xmu</I>,
and <I>dampflag</I>) have the same meaning as those specified with the
<A HREF = "pair_gran.html">pair_style granular</A> force fields. This means a NULL
can be used for either <I>Kt</I> or <I>gamma_t</I> as described on that page.
If a NULL is used for <I>Kt</I>, then a default value is used where <I>Kt</I> =
2/7 <I>Kn</I>. If a NULL is used for <I>gamma_t</I>, then a default value is
used where <I>gamma_t</I> = 1/2 <I>gamma_n</I>.
</P>
<P>The nature of the wall/particle interactions are determined by which
pair_style is used in your input script: <I>hooke</I>, <I>hooke/history</I>, or
<I>hertz/history</I>. The equation for the force between the wall and
particles touching it is the same as the corresponding equation on the
<A HREF = "pair_gran.html">pair_style granular</A> doc page, in the limit of one of
the two particles going to infinite radius and mass (flat wall).
I.e. delta = radius - r = overlap of particle with wall, m_eff = mass
of particle, and sqrt(RiRj/Ri+Rj) becomes sqrt(radius of particle).
The units for <I>Kn</I>, <I>Kt</I>, <I>gamma_n</I>, and <I>gamma_t</I> are as described on
that doc page. The meaning of xmu and dampflag are also as described
on that page. Note that you can choose different values for these 6
wall/particle coefficients than for particle/particle interactions, if
you wish your wall to interact differently with the particles, e.g. if
the wall is a different material.
</P>
<P>IMPORTANT NOTE: As discussed on the doc page for <A HREF = "pair_gran.html">pair_style
granular</A>, versions of LAMMPS before 9Jan09 used a
different equation for Hertzian interactions. This means Hertizian
wall/particle interactions have also changed. They now include a
sqrt(radius) term which was not present before. Also the previous
versions used Kn and Kt from the pairwise interaction and hardwired
dampflag to 1, rather than letting them be specified directly. This
means you can set the values of the wall/particle coefficients
appropriately in the current code to reproduce the results of a
prevoius Hertzian monodisperse calculation. For example, for the
common case of a monodisperse system with particles of diameter 1, Kn,
Kt, gamma_n, and gamma_s should be set sqrt(2.0) larger than they were
previously.
</P>
<HR>
<P>One or more wall <I>styles</I> can be specified. The <I>xlo</I>, <I>xhi</I>, <I>ylo</I>,
<I>yhi</I>, <I>zlo</I>, <I>zhi</I> styles are planar faces that push particles back
into the box from one of their sides. E.g. the <I>xlo</I> wall should be
positioned to the left of all particles in the x dimension, so that it
pushes particles to the right, and conversely for the <I>xhi</I> wall. The
<I>zcylinder</I> style is a cylindrical shell with its axis along the
z-axis, centered at x = y = 0.0. The interior surface of the cylinder
pushes particles towards the x = y = 0.0 center axis. The <I>zcylinder</I>
style cannot be specified with any of the <I>xlo</I>, <I>xhi</I>, <I>ylo</I>, <I>yhi</I>
styles, but if can be with the <I>zlo</I> or <I>zhi</I> styles.
</P>
<HR>
<P>For the planer wall styles, <I>coord</I> and <I>vwall</I> arguments are
specified. These are the position and normal velocity of the wall. A
positive velocity means the wall is moving in the positive direction
in the normal dimension, e.g. +x for a <I>xlo</I> or <I>xhi</I> wall. Either or
both of the <I>coord</I> and <I>vwall</I> arguments can be specified as a
constant value or a variable. Note that the force exerted by a wall
on granular particles depends on the velocity of the wall, in both the
normal and tangential directions, so it is important to set <I>vwall</I>
consistent with the <I>coord</I> argument.
</P>
<P>If a numeric constant is specified for <I>coord</I> then the wall is placed
at that position in the appropriate dimension (x, y, or z) and will
never move. Likewise if a constant is specified for <I>vwall</I>, then the
normal velocity of the wall is set to that value and will never
change.
</P>
<P>If <I>coord</I> or <I>vwall</I> is a variable, it should be specified as v_name,
where name is an <A HREF = "variable.html">equal-style variable</A> name. In this
case the variable is evaluated each timestep and the result becomes
the current position or normal velocity of the wall. Equal-style
variables can specify formulas with various mathematical functions,
and include <A HREF = "thermo_style.html">thermo_style</A> command keywords for the
simulation box parameters and timestep and elapsed time. Thus it is
easy to specify a time-dependent wall position and velocity.
</P>
<P>If <I>coord</I> is specified as a constant, then <I>vwall</I> must be specified
as 0.0. If <I>coord</I> is specified as a variable, then <I>vwall</I> must be a
non-zero constant or a variable. If <I>vwall</I> is specified as a
non-zero constant or variable and <I>coord</I> as a constant, then <I>coord</I>
is treated as the initial position of the wall, and the wall position
is updated each timestep by dt*v_current, where dt = the timestep, and
v_current = the current normal velocity.
</P>
<HR>
<P>For the <I>zcylinder</I> wall style, <I>rad</I> and <I>vrad</I> arguments are
specified. These are the radius and radial velocity of the cylinder.
A positive velocity means the radius is growing. Either or both of
the <I>rad</I> and <I>vrad</I> arguments can be specified as a constant value or
a variable. Note that the force exerted by the wall of the cylinder
on granular particles depends on the velocity of the wall, in both the
normal (radial) and tangential directions, so it is important to set
<I>vrad</I> consistent with the <I>rad</I> argument.
</P>
<P>If a numeric constant is specified for <I>rad</I> then the cylinder will
have a fixed radius. Likewise if a constant is specified for <I>vrad</I>,
then the radial velocity of the cylinder is set to that value and will
never change.
</P>
<P>If <I>rad</I> or <I>vrad</I> is a variable, it should be specified as
v_name, where name is an <A HREF = "variable.html">equal-style variable</A> name.
In this case the variable is evaluated each timestep and the result
becomes the current radius or radial velocity of the cylinder.
Equal-style variables can specify formulas with various mathematical
functions, and include <A HREF = "thermo_style.html">thermo_style</A> command
keywords for the simulation box parameters and timestep and elapsed
time. Thus it is easy to specify a time-dependent cylinder radius and
velocity.
</P>
<P>If <I>rad</I> is specified as a constant, then <I>vrad</I> must be specified as
0.0. If <I>rad</I> is specified as a variable, then <I>vrad</I> must be a
non-zero constant or a variable. If <I>vrad</I> is specified as a non-zero
constant or variable and <I>rad</I> as a constant, then <I>rad</I> is treated as
the initial radius of the wall, and the radius is updated each
timestep by dt*v_current, where dt = the timestep, and v_current = the
current radial velocity.
</P>
<HR>
<P>Here are examples of variable definitions that move the wall position
in a time-dependent fashion using equal-style
<A HREF = "variable.html">variables</A>. They also specify the correct normal
velocity of the wall based on the time derivative of the position.
</P>
<PRE>variable ramp equal ramp(0,10)
variable vnorm equal 10/(10000*dt) # 10000 step run
fix 1 all wall/gran ... xlo v_ramp v_vnorm
</PRE>
<PRE>variable linear equal vdisplace(0,20)
fix 1 all wall/gran ... xlo v_linear 20
</PRE>
<PRE>variable omega equal 2*PI/3.0
variable wiggle equal swiggle(0.0,5.0,3.0)
variable vwiggle equal "5.0 * v_omega * cos(v_omega*(timestep-startstep)*dt)"
fix 1 all wall/gran ... xlo v_wiggle v_vwiggle
</PRE>
<PRE>variable omega equal 2*PI/3.0
variable wiggle equal cwiggle(0.0,5.0,3.0)
variable vwiggle equal "5.0 * v_omega * sin(v_omega*(timestep-startstep)*dt)"
fix 1 all wall/gran ... xlo v_wiggle v_vwiggle
</PRE>
<P>The ramp(lo,hi) function adjusts the wall position linearly from lo to
hi over the course of a run. The vdisplace(c0,velocity) function does
something similar using the equation position = c0 + velocity*delta,
where delta is the elapsed time.
</P>
<P>The swiggle(c0,A,period) function causes the wall position to
oscillate sinusoidally according to this equation, where omega = 2 PI
/ period:
</P>
<PRE>position = c0 + A sin(omega*delta)
</PRE>
<P>The cwiggle(c0,A,period) function causes the wall position to
oscillate sinusoidally according to this equation, which will have an
initial wall velocity of 0.0, and thus may impose a gentler
perturbation on the particles:
</P>
<PRE>position = c0 + A (1 - cos(omega*delta))
</PRE>
<HR>
<P>The optional keywords <I>shear</I> and <I>piston</I> are applied to all the
specified wall styles. If you need to apply different options to
different wall styles, then you should use multiple fix wall/gran
commands.
</P>
<HR>
<P>The <I>shear</I> keyword allows specification of one or two tangential
velocities for planar or <I>zcylinder</I> walls. The <I>dim</I> value specifies
the velocity direction. <I>X</I>, <I>y</I>, and <I>z</I> can be used for planar
walls, but not for the direction normal to the wall. <I>Z</I> and <I>theta</I>
can be used for a <I>zcylinder</I> wall. <I>Theta</I> is the azimuthal angle in
the xy plane, i.e. a rotation of the cylinder about its vertical z
axis. Note that a positive theta velocity means increasing theta,
i.e. rotation in a counter-clockwise direction when looking down on
the xy plane from above.
</P>
<P><I>Vshear</I> is the magnitude of the shear velocity and can be specified
as a numeric constant or variable. The units of <I>vshear</I> are velocity
units for dim = <I>x</I>, <I>y</I>, or <I>z</I>. They are units of radians/time for
<I>dim</I> = <I>theta</I>.
</P>
<P>If a numeric constant is used, then then the shear velocity will never
change. If <I>vshear</I> is a variable, it should be specified as v_name,
where name is an <A HREF = "variable.html">equal-style variable</A> name. In this
case the variable is evaluated each timestep and the result becomes
the current shear velocity. Equal-style variables can specify
formulas with various mathematical functions, and include
<A HREF = "thermo_style.html">thermo_style</A> command keywords for the simulation
box parameters and timestep and elapsed time. Thus it is easy to
specify a time-dependent shear velocity.
</P>
<HR>
<P>The <I>piston</I> keyword allows specification of an external loading force
on the wall, which is opposed by granular particles pushing back
against the load. The wall position and normal velocity adjust
dynamically in response to these 2 opposing forces.
</P>
<P><I>Pload</I> is the magnitude of the loading force and can be specified as
a numeric constant or variable. This force must have a value less
than 0.0 which means that it is directed inward towards the particles.
Thus for a <I>xlo</I> wall, a negative values is a force in the +x
direction. For a <I>xhi</I> wall a negative values is a force in the -x
direction. For a <I>zcylinder</I> wall, a negative value is a force
towards the center z axis of the cylinder.
</P>
<P>If a numeric constant is used for <I>pload</I>, then then the load force
will never change. If <I>pload</I> is a variable, it should be specified
as v_name, where name is an <A HREF = "variable.html">equal-style variable</A> name.
In this case the variable is evaluated each timestep and the result
becomes the current load force. Equal-style variables can specify
formulas with various mathematical functions, and include
<A HREF = "thermo_style.html">thermo_style</A> command keywords for the simulation
box parameters and timestep and elapsed time. Thus it is easy to
specify a time-dependent load force.
</P>
<P>When the <I>piston</I> keyword is used, the <I>coord</I> and <I>vwall</I> arguemnts
for each wall style (or <I>rad</I> and <I>vrad</I> arguments for a <I>zcylinder</I>
style) must be numeric constants and are treated as initial values of
the position/radius and velocity/radial-velocity. The initial values
are updated every timestep by integrating these equations in a
velocity-Verlet fashion:
</P>
<PRE>vwall_new = vwall + dt * (Fload + Fparticles) / pmass
xwall_new = xwall + dt * vwall_new
</PRE>
<P>Fload and Fparticles are the force on the wall due to the external
load and interactions with particles respectively. Fparticles is
always a positive value, representing particles pushing outward on the
wall (-x direction for a <I>xlo</I> wall, +x direction for a <I>xhi</I> wall,
radially outward for a <I>zylinder</I> wall). Thus Fload and Fparticles
will always have opposite signs. <I>Pmass</I> is the mass of the wall, as
specified with the <I>piston</I> keyword. Xwall and Vwall are the wall
position (or radius) and normal velocity (or radial velocity) on the
previous timestep. Xwall_new and vwall_new are the updated values.
</P>
<HR>
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
</P>
<P>This fix writes the shear friction state of atoms interacting with the
wall to <A HREF = "restart.html">binary restart files</A>, so that a simulation can
continue correctly if granular potentials with shear "history" effects
are being used. See the <A HREF = "read_restart.html">read_restart</A> command for
info on how to re-specify a fix in an input script that reads a
restart file, so that the operation of the fix continues in an
uninterrupted fashion.
</P>
<P>The fix does not write any information about the walls (e,g, position
or velocity) to the restart file. It is up to you to insure that fix
wall/gran commands you re-specify in a restart input script are
consistent with the previous simulation.
</P>
<P>None of the <A HREF = "fix_modify.html">fix_modify</A> options are relevant to this
fix.
</P>
<P>This fix computes a global vector of values, which can be accessed by
various <A HREF = "Section_howto.html#howto_15">output commands</A>. The length of
the vector is 4*Nstyle, where Nstyle is the number of styles
specified.
</P>
<P>The 4 values (per style) are as follows:
</P>
<PRE>(1) position (or radius) of wall (distance units)
(2) normal (or radial) velocity of wall (velocity or radians/time units)
(3) positive force on wall due to particles (force units)
(4) negative force on wall due to external load (force units)
</PRE>
<P>The sign conventions for these values are as described above. The 4th
value will be 0.0 if the <I>piston</I> keyword is not used. The vector
values calculated by this fix are "extensive".
</P>
<P>No parameter of this fix can be used with the <I>start/stop</I> keywords of
the <A HREF = "run.html">run</A> command. This fix is not invoked during <A HREF = "minimize.html">energy
minimization</A>.
</P>
<P><B>Restrictions:</B>
</P>
<P>This fix is part of the GRANULAR package. It is only enabled if
LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P>Any dimension (xyz) that has a granular wall must be non-periodic.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_move.html">fix_move</A>, <A HREF = "pair_gran.html">pair_style granular</A>
</P>
<P><B>Default:</B>
</P>
<P>The default shear velocities are 0.0.
</P>
</HTML>