forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1051 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
5c6bb9cd70
commit
1e414cd924
|
@ -323,7 +323,7 @@ of each style or click on the style itself for a full description:
|
|||
<TR ALIGN="center"><TD ><A HREF = "fix_npt_asphere.html">npt/asphere</A></TD><TD ><A HREF = "fix_nve.html">nve</A></TD><TD ><A HREF = "fix_nve_asphere.html">nve/asphere</A></TD><TD ><A HREF = "fix_nve_dipole.html">nve/dipole</A></TD><TD ><A HREF = "fix_nve_gran.html">nve/gran</A></TD><TD ><A HREF = "fix_nve_limit.html">nve/limit</A></TD><TD ><A HREF = "fix_nve_noforce.html">nve/noforce</A></TD><TD ><A HREF = "fix_nvt.html">nvt</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_nvt_asphere.html">nvt/asphere</A></TD><TD ><A HREF = "fix_nvt_sllod.html">nvt/sllod</A></TD><TD ><A HREF = "fix_orient_fcc.html">orient/fcc</A></TD><TD ><A HREF = "fix_planeforce.html">planeforce</A></TD><TD ><A HREF = "fix_poems.html">poems</A></TD><TD ><A HREF = "fix_pour.html">pour</A></TD><TD ><A HREF = "fix_print.html">print</A></TD><TD ><A HREF = "fix_rdf.html">rdf</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_recenter.html">recenter</A></TD><TD ><A HREF = "fix_rigid.html">rigid</A></TD><TD ><A HREF = "fix_setforce.html">setforce</A></TD><TD ><A HREF = "fix_shake.html">shake</A></TD><TD ><A HREF = "fix_spring.html">spring</A></TD><TD ><A HREF = "fix_spring_rg.html">spring/rg</A></TD><TD ><A HREF = "fix_spring_self.html">spring/self</A></TD><TD ><A HREF = "fix_temp_rescale.html">temp/rescale</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_tmd.html">tmd</A></TD><TD ><A HREF = "fix_viscous.html">viscous</A></TD><TD ><A HREF = "fix_wall_gran.html">wall/gran</A></TD><TD ><A HREF = "fix_wall_lj126.html">wall/lj126</A></TD><TD ><A HREF = "fix_wall_lj93.html">wall/lj93</A></TD><TD ><A HREF = "fix_wall_reflect.html">wall/reflect</A></TD><TD ><A HREF = "fix_wiggle.html">wiggle</A>
|
||||
<TR ALIGN="center"><TD ><A HREF = "fix_tmd.html">tmd</A></TD><TD ><A HREF = "fix_viscosity.html">viscosity</A></TD><TD ><A HREF = "fix_viscous.html">viscous</A></TD><TD ><A HREF = "fix_wall_gran.html">wall/gran</A></TD><TD ><A HREF = "fix_wall_lj126.html">wall/lj126</A></TD><TD ><A HREF = "fix_wall_lj93.html">wall/lj93</A></TD><TD ><A HREF = "fix_wall_reflect.html">wall/reflect</A></TD><TD ><A HREF = "fix_wiggle.html">wiggle</A>
|
||||
</TD></TR></TABLE></DIV>
|
||||
|
||||
<HR>
|
||||
|
|
|
@ -424,6 +424,7 @@ of each style or click on the style itself for a full description:
|
|||
"spring/self"_fix_spring_self.html,
|
||||
"temp/rescale"_fix_temp_rescale.html,
|
||||
"tmd"_fix_tmd.html,
|
||||
"viscosity"_fix_viscosity.html,
|
||||
"viscous"_fix_viscous.html,
|
||||
"wall/gran"_fix_wall_gran.html,
|
||||
"wall/lj126"_fix_wall_lj126.html,
|
||||
|
|
|
@ -751,6 +751,9 @@ deform</A> should be set to "remap v", since that is what
|
|||
<A HREF = "fix_nvt_sllod.html">fix nvt/sllod</A> assumes to generate a velocity
|
||||
profile consistent with the applied shear strain rate.
|
||||
</P>
|
||||
<P>An alternative method for calculating viscosities is provided via the
|
||||
<A HREF = "fix_viscosity.html">fix viscosity</A> command.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<A NAME = "4_14"></A><H4>4.14 Aspherical particles
|
||||
|
|
|
@ -744,6 +744,9 @@ deform"_fix_deform.html should be set to "remap v", since that is what
|
|||
"fix nvt/sllod"_fix_nvt_sllod.html assumes to generate a velocity
|
||||
profile consistent with the applied shear strain rate.
|
||||
|
||||
An alternative method for calculating viscosities is provided via the
|
||||
"fix viscosity"_fix_viscosity.html command.
|
||||
|
||||
:line
|
||||
|
||||
4.14 Aspherical particles :link(4_14),h4
|
||||
|
|
|
@ -130,6 +130,7 @@ for individual fixes for info on which ones can be restarted.
|
|||
<LI><A HREF = "fix_spring_self.html">spring/self</A> - spring from each atom to its origin
|
||||
<LI><A HREF = "fix_temp_rescale.html">temp/rescale</A> - temperature control by velocity rescaling
|
||||
<LI><A HREF = "fix_tmd.html">tmd</A> - guide a group of atoms to a new configuration
|
||||
<LI><A HREF = "fix_viscosity.html">viscosity</A> - Muller-Plathe momentum exchange for viscosity calculation
|
||||
<LI><A HREF = "fix_viscous.html">viscous</A> - viscous damping for granular simulations
|
||||
<LI><A HREF = "fix_wall_gran.html">wall/gran</A> - frictional wall(s) for granular simulations
|
||||
<LI><A HREF = "fix_wall_lj126.html">wall/lj126</A> - Lennard-Jones 12-6 wall
|
||||
|
|
|
@ -134,6 +134,8 @@ Here is an alphabetic list of fix styles available in LAMMPS:
|
|||
"temp/rescale"_fix_temp_rescale.html - temperature control by \
|
||||
velocity rescaling
|
||||
"tmd"_fix_tmd.html - guide a group of atoms to a new configuration
|
||||
"viscosity"_fix_viscosity.html - Muller-Plathe momentum exchange for \
|
||||
viscosity calculation
|
||||
"viscous"_fix_viscous.html - viscous damping for granular simulations
|
||||
"wall/gran"_fix_wall_gran.html - frictional wall(s) for \
|
||||
granular simulations
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
<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 viscosity command
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<PRE>fix ID group-ID viscosity N vdim pdim Nbin
|
||||
</PRE>
|
||||
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
||||
<LI>viscosity = style name of this fix command
|
||||
<LI>N = perform momentum exchange every N steps
|
||||
<LI>vdim = <I>x</I> or <I>y</I> or <I>z</I> = which momentum component to exchange
|
||||
<LI>pdim = <I>x</I> or <I>y</I> or <I>z</I> = direction of momentum transfer
|
||||
<LI>Nbin = # of layers in pdim direction
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>fix 1 all viscosity 100 x z 20
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>Use the Muller-Plathe algorithm described in <A HREF = "#Muller-Plathe">this
|
||||
paper</A> to exchange momenta between two particles in
|
||||
different regions of the simulation box every N steps. This induces a
|
||||
shear velocity profile in the system. As described below this enables
|
||||
a viscosity of the fluid to be calculated. This algorithm is
|
||||
sometimes called a reverse non-equilibrium MD (reverse NEMD) approach
|
||||
to computing viscosity. This is because the usual NEMD approach is to
|
||||
impose a shear velocity profile on the system and measure the response
|
||||
via an off-diagonal component of the stress tensor, which is
|
||||
proportional to the momentum flux. In the Muller-Plathe method, the
|
||||
momentum flux is imposed, and the shear velocity profile is the
|
||||
system's response.
|
||||
</P>
|
||||
<P>The simulation box is divided into <I>Nbin</I> layers in the <I>pdim</I>
|
||||
direction. Every N steps, two atoms are chosen in the following
|
||||
manner. Only atoms in the fix group are considered. The atom in the
|
||||
bottom layer with the most positive momentum component in the <I>vdim</I>
|
||||
direction is the first atom. The atom in the middle later with the
|
||||
most negative momentum component in the <I>vdim</I> direction is the second
|
||||
atom. The <I>vdim</I> momenta components of these two atoms are swapped,
|
||||
which resets their velocities, typically in opposite directions. Over
|
||||
time, this induces a shear velocity profile in the system which can be
|
||||
measured using commands such as the following, which writes the
|
||||
profile to the file tmp.profile:
|
||||
</P>
|
||||
<PRE>compute c1 all attribute/atom vx
|
||||
fix f1 all ave/spatial 100 10 1000 z lower 0.05 tmp.profile &
|
||||
compute c1 units reduced
|
||||
</PRE>
|
||||
<P>As described below, the total momentum transferred by these velocity
|
||||
swaps is computed by the fix and can be output. Dividing this
|
||||
quantity by time and the cross-sectional area of the simulation box
|
||||
yields a momentum flux. The ratio of momentum flux to the slope of
|
||||
the shear velocity profile is the viscosity of the fluid, in
|
||||
appopriate units. See the <A HREF = "#Muller-Plathe">Muller-Plathe paper</A> for
|
||||
details.
|
||||
</P>
|
||||
<P>An alternative method for calculating a viscosity is to run a NEMD
|
||||
simulation, as described in <A HREF = "Section_howto.html#4_13">this section</A> of
|
||||
the manual. NEMD simulations deform the simmulation box via the <A HREF = "fix_deform.html">fix
|
||||
deform</A> command. Thus they cannot be run on a charged
|
||||
system using a <A HREF = "kspace_style.html">PPPM solver</A> since PPPM does not
|
||||
currently support non-orthogonal boxes. Using fix viscosity keeps the
|
||||
box orthogonal; thus it does not suffer from this limitation.
|
||||
</P>
|
||||
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
|
||||
</P>
|
||||
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
|
||||
files</A>. None of the <A HREF = "fix_modify.html">fix_modify</A> options
|
||||
are relevant to this fix.
|
||||
</P>
|
||||
<P>The cummulative momentum transferred between the bottom and middle of
|
||||
the simulatoin box (in the <I>pdim</I> direction) is stored as a scalar
|
||||
quantity by this fix. This quantity is zeroed when the fix is defined
|
||||
and accumlates thereafter, once every N steps. The units of the
|
||||
quantity are momentum = mass*velocity. This quantity can be
|
||||
accessed by various <A HREF = "Section_howto.html#4_15">output commands</A>, such as
|
||||
<A HREF = "thermo_style.html">thermo_style custom</A>.
|
||||
</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>If the masses of the atom pairs are the same, the swaps conserve both
|
||||
momentum and kinetic energy. Thus you should not need to thermostat
|
||||
the system. If you do use a thermostat, you may want to apply it only
|
||||
to the non-swapped dimensions (other than <I>vdim</I>).
|
||||
</P>
|
||||
<P>You should not swap velocities of atoms that are in constrained
|
||||
molecules, e.g. via <A HREF = "fix_shake.html">fix shake</A> or <A HREF = "fix_rigid.html">fix
|
||||
rigid</A>, since application of the constraints will alter
|
||||
the amount of transferred momentum. You should, however, be able to
|
||||
use flexible molecules with this approach. LAMMPS does not check that
|
||||
this advice is followed.
|
||||
</P>
|
||||
<P>When running a simulation with large, massive particles or molecules
|
||||
in a background solvent, you may want to only exchange momenta bewteen
|
||||
solvent particles.
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
<P><A HREF = "fix_ave_spatial.html">fix ave/spatial</A>, <A HREF = "fix_nvt_sllod.html">fix
|
||||
nvt/sllod</A>
|
||||
</P>
|
||||
<P><B>Default:</B> none
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<A NAME = "Muller-Plathe"></A>
|
||||
|
||||
<P><B>(Muller-Plathe)</B> Muller-Plathe, Phys Rev E, 59, 4894-4898 (1999).
|
||||
</P>
|
||||
</HTML>
|
|
@ -0,0 +1,119 @@
|
|||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix viscosity command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group-ID viscosity N vdim pdim Nbin :pre
|
||||
|
||||
ID, group-ID are documented in "fix"_fix.html command
|
||||
viscosity = style name of this fix command
|
||||
N = perform momentum exchange every N steps
|
||||
vdim = {x} or {y} or {z} = which momentum component to exchange
|
||||
pdim = {x} or {y} or {z} = direction of momentum transfer
|
||||
Nbin = # of layers in pdim direction :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 1 all viscosity 100 x z 20 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Use the Muller-Plathe algorithm described in "this
|
||||
paper"_#Muller-Plathe to exchange momenta between two particles in
|
||||
different regions of the simulation box every N steps. This induces a
|
||||
shear velocity profile in the system. As described below this enables
|
||||
a viscosity of the fluid to be calculated. This algorithm is
|
||||
sometimes called a reverse non-equilibrium MD (reverse NEMD) approach
|
||||
to computing viscosity. This is because the usual NEMD approach is to
|
||||
impose a shear velocity profile on the system and measure the response
|
||||
via an off-diagonal component of the stress tensor, which is
|
||||
proportional to the momentum flux. In the Muller-Plathe method, the
|
||||
momentum flux is imposed, and the shear velocity profile is the
|
||||
system's response.
|
||||
|
||||
The simulation box is divided into {Nbin} layers in the {pdim}
|
||||
direction. Every N steps, two atoms are chosen in the following
|
||||
manner. Only atoms in the fix group are considered. The atom in the
|
||||
bottom layer with the most positive momentum component in the {vdim}
|
||||
direction is the first atom. The atom in the middle later with the
|
||||
most negative momentum component in the {vdim} direction is the second
|
||||
atom. The {vdim} momenta components of these two atoms are swapped,
|
||||
which resets their velocities, typically in opposite directions. Over
|
||||
time, this induces a shear velocity profile in the system which can be
|
||||
measured using commands such as the following, which writes the
|
||||
profile to the file tmp.profile:
|
||||
|
||||
compute c1 all attribute/atom vx
|
||||
fix f1 all ave/spatial 100 10 1000 z lower 0.05 tmp.profile &
|
||||
compute c1 units reduced :pre
|
||||
|
||||
As described below, the total momentum transferred by these velocity
|
||||
swaps is computed by the fix and can be output. Dividing this
|
||||
quantity by time and the cross-sectional area of the simulation box
|
||||
yields a momentum flux. The ratio of momentum flux to the slope of
|
||||
the shear velocity profile is the viscosity of the fluid, in
|
||||
appopriate units. See the "Muller-Plathe paper"_#Muller-Plathe for
|
||||
details.
|
||||
|
||||
An alternative method for calculating a viscosity is to run a NEMD
|
||||
simulation, as described in "this section"_Section_howto.html#4_13 of
|
||||
the manual. NEMD simulations deform the simmulation box via the "fix
|
||||
deform"_fix_deform.html command. Thus they cannot be run on a charged
|
||||
system using a "PPPM solver"_kspace_style.html since PPPM does not
|
||||
currently support non-orthogonal boxes. Using fix viscosity keeps the
|
||||
box orthogonal; thus it does not suffer from this limitation.
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
No information about this fix is written to "binary restart
|
||||
files"_restart.html. None of the "fix_modify"_fix_modify.html options
|
||||
are relevant to this fix.
|
||||
|
||||
The cummulative momentum transferred between the bottom and middle of
|
||||
the simulatoin box (in the {pdim} direction) is stored as a scalar
|
||||
quantity by this fix. This quantity is zeroed when the fix is defined
|
||||
and accumlates thereafter, once every N steps. The units of the
|
||||
quantity are momentum = mass*velocity. This quantity can be
|
||||
accessed by various "output commands"_Section_howto.html#4_15, such as
|
||||
"thermo_style custom"_thermo_style.html.
|
||||
|
||||
No parameter of this fix can be used with the {start/stop} keywords of
|
||||
the "run"_run.html command. This fix is not invoked during "energy
|
||||
minimization"_minimize.html.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
If the masses of the atom pairs are the same, the swaps conserve both
|
||||
momentum and kinetic energy. Thus you should not need to thermostat
|
||||
the system. If you do use a thermostat, you may want to apply it only
|
||||
to the non-swapped dimensions (other than {vdim}).
|
||||
|
||||
You should not swap velocities of atoms that are in constrained
|
||||
molecules, e.g. via "fix shake"_fix_shake.html or "fix
|
||||
rigid"_fix_rigid.html, since application of the constraints will alter
|
||||
the amount of transferred momentum. You should, however, be able to
|
||||
use flexible molecules with this approach. LAMMPS does not check that
|
||||
this advice is followed.
|
||||
|
||||
When running a simulation with large, massive particles or molecules
|
||||
in a background solvent, you may want to only exchange momenta bewteen
|
||||
solvent particles.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"fix ave/spatial"_fix_ave_spatial.html, "fix
|
||||
nvt/sllod"_fix_nvt_sllod.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Muller-Plathe)
|
||||
[(Muller-Plathe)] Muller-Plathe, Phys Rev E, 59, 4894-4898 (1999).
|
Loading…
Reference in New Issue