2006-09-22 00:22:34 +08:00
|
|
|
<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 gravity command
|
|
|
|
</H3>
|
2011-06-09 05:46:03 +08:00
|
|
|
<H3>fix gravity/cuda command
|
|
|
|
</H3>
|
2006-09-22 00:22:34 +08:00
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
2007-07-09 22:09:39 +08:00
|
|
|
<PRE>fix ID group gravity style magnitude args
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
|
|
|
<UL><LI>ID, group are documented in <A HREF = "fix.html">fix</A> command
|
|
|
|
|
|
|
|
<LI>gravity = style name of this fix command
|
|
|
|
|
2007-07-09 22:09:39 +08:00
|
|
|
<LI>magnitude = size of acceleration (force/mass units)
|
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
<LI>style = <I>chute</I> or <I>spherical</I> or <I>gradient</I> or <I>vector</I>
|
|
|
|
|
|
|
|
<PRE> <I>chute</I> args = angle
|
2007-07-09 22:09:39 +08:00
|
|
|
angle = angle in +x away from -z or -y axis in 3d/2d (in degrees)
|
2006-09-22 00:22:34 +08:00
|
|
|
<I>spherical</I> args = phi theta
|
|
|
|
phi = azimuthal angle from +x axis (in degrees)
|
2007-07-09 22:09:39 +08:00
|
|
|
theta = angle from +z or +y axis in 3d/2d (in degrees)
|
2006-09-22 00:22:34 +08:00
|
|
|
<I>gradient</I> args = phi theta phi_grad theta_grad
|
|
|
|
phi = azimuthal angle from +x axis (in degrees)
|
2007-07-09 22:09:39 +08:00
|
|
|
theta = angle from +z or +y axis in 3d/2d (in degrees)
|
2006-09-22 00:22:34 +08:00
|
|
|
phi_grad = rate of change of angle phi (full rotations per time unit)
|
2007-07-09 22:09:39 +08:00
|
|
|
theta_grad = rate of change of angle theta (full rotations per time unit)
|
|
|
|
<I>vector</I> args = x y z
|
2006-09-22 00:22:34 +08:00
|
|
|
x y z = vector direction to apply the acceleration
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
2007-07-09 22:09:39 +08:00
|
|
|
<PRE>fix 1 all gravity 1.0 chute 24.0
|
|
|
|
fix 1 all gravity 1.0 spherical 0.0 -180.0
|
|
|
|
fix 1 all gravity 1.0 gradient 0.0 -180.0 0.0 0.1
|
|
|
|
fix 1 all gravity 100.0 vector 1 1 0
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
2007-07-09 22:09:39 +08:00
|
|
|
<P>Impose an additional acceleration on each particle in the group. This
|
|
|
|
fix is typically used with granular systems to include a "gravity"
|
|
|
|
term acting on the macroscopic particles. More generally, it can
|
|
|
|
represent any kind of driving field, e.g. a pressure gradient inducing
|
2008-03-01 09:13:20 +08:00
|
|
|
a Poiseuille flow in a fluid. Note that this fix operates differently
|
2007-07-09 22:09:39 +08:00
|
|
|
than the <A HREF = "fix_addforce.html">fix addforce</A> command. The addforce fix
|
|
|
|
adds the same force to each atom, independent of its mass. This
|
|
|
|
command imparts the same acceleration to each atom (force/mass).
|
|
|
|
</P>
|
|
|
|
<P>The <I>magnitude</I> of the acceleration is specified in force/mass units.
|
|
|
|
For granular systems (LJ units) this is typically 1.0. See the
|
|
|
|
<A HREF = "units.html">units</A> command for details.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2007-07-09 22:09:39 +08:00
|
|
|
<P>Style <I>chute</I> is typically used for simulations of chute flow where
|
|
|
|
the specified angle is the chute angle, with flow occurring in the +x
|
|
|
|
direction. For 3d systems, the tilt is away from the z axis; for 2d
|
|
|
|
systems, the tilt is away from the y axis.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2007-07-09 22:09:39 +08:00
|
|
|
<P>Style <I>spherical</I> allows an arbitrary 3d direction to be specified for
|
|
|
|
the acceleration vector. Phi and theta are defined in the usual
|
|
|
|
spherical coordinates. Thus for acceleration acting in the -z
|
|
|
|
direction, theta would be 180.0 (or -180.0). Theta = 90.0 and phi =
|
|
|
|
-90.0 would mean acceleration acts in the -y direction. For 2d
|
|
|
|
systems, <I>phi</I> is ignored and <I>theta</I> is an angle in the xy plane
|
|
|
|
where theta = 0.0 is the y-axis.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2007-07-09 22:09:39 +08:00
|
|
|
<P>Style <I>gradient</I> is the same as style <I>spherical</I> except that the
|
|
|
|
direction of the acceleration vector is time dependent. The units of
|
|
|
|
the gradient arguments are in full rotations per time unit. E.g. a
|
|
|
|
timestep of 0.001 and a gradient of 0.1 means the acceleration vector
|
|
|
|
would rotate thru 360 degrees every 10,000 timesteps. For the
|
|
|
|
time-dependent case, the initial direction of the acceleration vector
|
2009-12-04 02:37:34 +08:00
|
|
|
is set to phi,theta when the fix is specified and evolves thereafter.
|
|
|
|
For 2d systems, <I>phi</I> and <I>phi_grad</I> are ignored.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2007-07-09 22:09:39 +08:00
|
|
|
<P>Style <I>vector</I> imposes an acceleration in the vector direction given
|
|
|
|
by (x,y,z). For 2d systems, the z component is ignored.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
2011-06-09 05:46:03 +08:00
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>Styles with a <I>cuda</I> suffix are functionally the same as the
|
|
|
|
corresponding style without the suffix. They have been optimized to
|
|
|
|
run faster, depending on your available hardware, as discussed in
|
|
|
|
<A HREF = "Section_accelerate.html">this section</A> of the manual. The accelerated
|
|
|
|
styles take the same arguments and should produce the same results,
|
|
|
|
except for round-off and precision issues.
|
|
|
|
</P>
|
2011-08-27 02:53:00 +08:00
|
|
|
<P>These accelerated styles are part of the USER-CUDA package. They are
|
|
|
|
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.
|
2011-06-09 05:46:03 +08:00
|
|
|
</P>
|
|
|
|
<P>You can specify the accelerated styles explicitly in your input script
|
2011-08-26 00:46:23 +08:00
|
|
|
by including their suffix, or you can use the <A HREF = "Section_start.html#start_6">-suffix command-line
|
|
|
|
switch</A> when you invoke LAMMPS, or you can
|
|
|
|
use the <A HREF = "suffix.html">suffix</A> command in your input script.
|
2011-06-09 05:46:03 +08:00
|
|
|
</P>
|
|
|
|
<P>See <A HREF = "Section_accelerate.html">this section</A> of the manual for more
|
|
|
|
instructions on how to use the accelerated styles effectively.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
2007-10-11 06:28:11 +08:00
|
|
|
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
|
2007-06-26 08:03:39 +08:00
|
|
|
</P>
|
|
|
|
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
|
2011-08-28 04:35:24 +08:00
|
|
|
files</A>.
|
|
|
|
</P>
|
|
|
|
<P>The <A HREF = "fix_modify.html">fix_modify</A> <I>energy</I> option is supported by this
|
|
|
|
fix to add the gravitational potential energy of the system to the
|
|
|
|
system's potential energy as part of <A HREF = "thermo_style.html">thermodynamic
|
|
|
|
output</A>.
|
|
|
|
</P>
|
|
|
|
<P>This fix computes a global scalar which can be accessed by various
|
|
|
|
<A HREF = "Section_howto.html#howto_15">output commands</A>. This scalar is the
|
|
|
|
gravitational potential energy of the particles in the defined field,
|
|
|
|
namely mass * (g dot x) for each particles, where x and mass are the
|
|
|
|
particles position and mass, and g is the gravitational field. The
|
|
|
|
scalar value calculated by this fix is "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>.
|
2007-06-26 08:03:39 +08:00
|
|
|
</P>
|
2007-07-09 22:09:39 +08:00
|
|
|
<P><B>Restrictions:</B> none
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
2011-04-14 05:39:34 +08:00
|
|
|
<P><A HREF = "atom_style.html">atom_style sphere</A>, <A HREF = "fix_addforce.html">fix addforce</A>
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Default:</B> none
|
|
|
|
</P>
|
|
|
|
</HTML>
|