"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)

:line

fix flow/gauss command :h3

[Syntax:]

fix ID group-ID flow/gauss xflag yflag zflag keyword :pre

ID, group-ID are documented in "fix"_fix.html command :ulb,l
flow/gauss = style name of this fix command :l
xflag,yflag,zflag = 0 or 1 :l
    0 = do not conserve current in this dimension
    1 = conserve current in this dimension :pre
zero or more keyword/value pairs may be appended :l
keyword = {energy} :l
  {energy} value = no or yes
    no = do not compute work done by this fix
    yes = compute work done by this fix :pre
:ule

[Examples:]

fix GD fluid flow/gauss 1 0 0
fix GD fluid flow/gauss 1 1 1 energy yes :pre

[Description:]

This fix implements the Gaussian dynamics (GD) method to simulate a
system at constant mass flux "(Strong)"_#Strong. GD is a
nonequilibrium molecular dynamics simulation method that can be used
to study fluid flows through pores, pipes, and channels. In its
original implementation GD was used to compute the pressure required
to achieve a fixed mass flux through an opening.  The flux can be
conserved in any combination of the directions, x, y, or z, using
xflag,yflag,zflag. This fix does not initialize a net flux through a
system, it only conserves the center-of-mass momentum that is present
when the fix is declared in the input script. Use the
"velocity"_velocity.html command to generate an initial center-of-mass
momentum.

GD applies an external fluctuating gravitational field that acts as a
driving force to keep the system away from equilibrium. To maintain
steady state, a profile-unbiased thermostat must be implemented to
dissipate the heat that is added by the driving force. "Compute
temp/profile"_compute_temp_profile.html can be used to implement a
profile-unbiased thermostat.

A common use of this fix is to compute a pressure drop across a pipe,
pore, or membrane. The pressure profile can be computed in LAMMPS with
"compute stress/atom"_compute_stress_atom.html and "fix
ave/chunk"_fix_ave_chunk.html, or with the hardy method in "fix
atc"_fix_atc.html. Note that the simple "compute
stress/atom"_compute_stress_atom.html method is only accurate away
from inhomogeneities in the fluid, such as fixed wall atoms. Further,
the computed pressure profile must be corrected for the acceleration
applied by GD before computing a pressure drop or comparing it to
other methods, such as the pump method "(Zhu)"_#Zhu. The pressure
correction is discussed and described in "(Strong)"_#Strong.

For a complete example including the considerations discussed
above, see the examples/USER/flow_gauss directory.

NOTE: Only the flux of the atoms in group-ID will be conserved. If the
velocities of the group-ID atoms are coupled to the velocities of
other atoms in the simulation, the flux will not be conserved. For
example, in a simulation with fluid atoms and harmonically constrained
wall atoms, if a single thermostat is applied to group {all}, the
fluid atom velocities will be coupled to the wall atom velocities, and
the flux will not be conserved. This issue can be avoided by
thermostatting the fluid and wall groups separately.

Adding an acceleration to atoms does work on the system. This added
energy can be optionally subtracted from the potential energy for the
thermodynamic output (see below) to check that the timestep is small
enough to conserve energy. Since the applied acceleration is
fluctuating in time, the work cannot be computed from a potential. As
a result, computing the work is slightly more computationally
expensive than usual, so it is not performed by default. To invoke the
work calculation, use the {energy} keyword. The
"fix_modify"_fix_modify.html {energy} option also invokes the work
calculation, and overrides an {energy no} setting here. If neither
{energy yes} or {fix_modify energy yes} are set, the global scalar
computed by the fix will return zero.

NOTE: In order to check energy conservation, any other fixes that do
work on the system must have {fix_modify energy yes} set as well. This
includes thermostat fixes and any constraints that hold the positions
of wall atoms fixed, such as "fix spring/self"_fix_spring_self.html.

If this fix is used in a simulation with the "rRESPA"_run_style.html
integrator, the applied acceleration must be computed and applied at the same
rRESPA level as the interactions between the flowing fluid and the obstacle.
The rRESPA level at which the acceleration is applied can be changed using
the "fix_modify"_fix_modify.html {respa} option discussed below. If the
flowing fluid and the obstacle interact through multiple interactions that are
computed at different rRESPA levels, then there must be a separate flow/gauss
fix for each level. For example, if the flowing fluid and obstacle interact
through pairwise and long-range Coulomb interactions, which are computed at
rRESPA levels 3 and 4, respectively, then there must be two separate
flow/gauss fixes, one that specifies {fix_modify respa 3} and one with
{fix_modify respa 4}.

:line

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

This fix is part of the USER-MISC package.  It is only enabled if
LAMMPS was built with that package.  See the "Build
package"_Build_package.html doc page for more info.

No information about this fix is written to "binary restart
files"_restart.html.

The "fix_modify"_fix_modify.html {energy} option is supported by this
fix to subtract the work done from the
system's potential energy as part of "thermodynamic
output"_thermo_style.html.

The "fix_modify"_fix_modify.html {respa} option is supported by this
fix. This allows the user to set at which level of the "rRESPA"_run_style.html
integrator the fix computes and adds the external acceleration. Default is the
outermost level.

This fix computes a global scalar and a global 3-vector of forces,
which can be accessed by various "output commands"_Howto_output.html.
The scalar is the negative of the work done on the system, see above
discussion.  The vector is the total force that this fix applied to
the group of atoms on the current timestep.  The scalar and vector
values calculated by this fix are "extensive".

No parameter of this fix can be used with the {start/stop} keywords of
the "run"_run.html command.

[Restrictions:] none

[Related commands:]

"fix addforce"_fix_addforce.html, "compute
temp/profile"_compute_temp_profile.html, "velocity"_velocity.html

[Default:]

The option default for the {energy} keyword is energy = no.

:line

:link(Strong)
[(Strong)] Strong and Eaves, J. Phys. Chem. B 121, 189 (2017).

:link(Evans2)
[(Evans)] Evans and Morriss, Phys. Rev. Lett. 56, 2172 (1986).

:link(Zhu)
[(Zhu)] Zhu, Tajkhorshid, and Schulten, Biophys. J. 83, 154 (2002).
