git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10991 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2013-11-07 20:17:04 +00:00
parent bb589062a3
commit 1cada0b496
26 changed files with 1464 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -0,0 +1,14 @@
\documentclass[12pt]{article}
\begin{document}
$$
\left(\partial_t + e_{i\alpha}\partial_{\alpha}\right)f_i = -\frac{1}{\tau}\left(f_i - f_i^{eq}\right) + W_i
$$
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,14 @@
\documentclass[12pt]{article}
\begin{document}
$$
{\bf F}_{j \alpha} = \gamma \left({\bf v}_n - {\bf u}_f \right) \zeta_{j\alpha}
$$
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,14 @@
\documentclass[12pt]{article}
\begin{document}
$$
\gamma = \frac{2m_um_v}{m_u+m_v}\left(\frac{1}{\Delta t_{collision}}\right)
$$
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -0,0 +1,16 @@
\documentclass[12pt]{article}
\begin{document}
$$
\partial_t \rho + \partial_{\beta}\left(\rho u_{\beta}\right)= 0
$$
$$
\partial_t\left(\rho u_{\alpha}\right) + \partial_{\beta}\left(\rho u_{\alpha} u_{\beta}\right) = \partial_{\beta}\sigma_{\alpha \beta} + F_{\alpha} + \partial_{\beta}\left(\eta_{\alpha \beta \gamma \nu}\partial_{\gamma} u_{\nu}\right)
$$
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,17 @@
\documentclass[12pt]{article}
\begin{document}
$$
\rho = \displaystyle\sum\limits_{i} f_i
$$
$$
\rho u_{\alpha} = \displaystyle\sum\limits_{i} f_i e_{i\alpha}
$$
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

14
doc/Eqs/fix_lb_fluid_stress.tex Executable file
View File

@ -0,0 +1,14 @@
\documentclass[12pt]{article}
\begin{document}
$$
\sigma_{\alpha \beta} = -P_{\alpha \beta} = -\rho a_0 \delta_{\alpha \beta}
$$
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -0,0 +1,14 @@
\documentclass[12pt]{article}
\begin{document}
$$
\eta_{\alpha \beta \gamma \nu} = \eta\left[\delta_{\alpha \gamma}\delta_{\beta \nu} + \delta_{\alpha \nu}\delta_{\beta \gamma} - \frac{2}{3}\delta_{\alpha \beta}\delta_{\gamma \nu}\right] + \Lambda \delta_{\alpha \beta}\delta_{\gamma \nu}
$$
\end{document}

297
doc/fix_lb_fluid.html Normal file
View File

@ -0,0 +1,297 @@
<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 lb/fluid command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID lb/fluid nevery LBtype viscosity density keyword values ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
<LI>lb/fluid = style name of this fix command
<LI>nevery = update the lattice-Boltzmann fluid every this many timesteps
<LI>LBtype = 1 to use the standard finite difference LB integrator,
2 to use the LB integrator of <A HREF = "#Ollila">Ollila et al.</A> &#91;1&#93;
<LI>viscosity = the fluid viscosity (units of mass/(time*length)).
<LI>density = the fluid density.
<LI>zero or more keyword/value pairs may be appended
<PRE>keyword = <I>setArea</I> or <I>setGamma</I> or <I>scaleGamma</I> or <I>dx</I> or <I>dm</I> or <I>a0</I> or <I>noise</I> or <I>calcforce</I> or <I>trilinear</I> or <I>D3Q19</I> or <I>read_restart</I> or <I>write_restart</I> or <I>zwall_velocity</I> or <I>bodyforce</I> or <I>printfluid</I>
<I>setArea</I> values = type node_area
type = atom type (1-N)
node_area = portion of the surface area of the composite object associated with the particular atom type (used when the force coupling constant is set by default).
<I>setGamma</I> values = gamma
gamma = user set value for the force coupling constant.
<I>scaleGamma</I> values = type gammaFactor
type = atom type (1-N)
gammaFactor = factor to scale the <I>setGamma</I> gamma value by, for the specified atom type.
<I>dx</I> values = dx_LB = the lattice spacing.
<I>dm</I> values = dm_LB = the lattice-Boltzmann mass unit.
<I>a0</I> values = a_0_real = the square of the speed of sound in the fluid.
<I>noise</I> values = Temperature seed
Temperature = fluid temperature.
seed = random number generator seed (positive integer)
<I>calcforce</I> values = N forcegroup-ID
N = output the force and torque every N timesteps
forcegroup-ID = ID of the particle group to calculate the force and torque of
<I>trilinear</I> values = none (used to switch from the default Peskin interpolation stencil to the trilinear stencil).
<I>D3Q19</I> values = none (used to switch from the default D3Q15, 15 velocity lattice, to the D3Q19, 19 velocity lattice).
<I>read_restart</I> values = restart file = name of the restart file to use to restart a fluid run.
<I>write_restart</I> values = N = write a restart file every N MD timesteps.
<I>zwall_velocity</I> values = velocity_bottom velocity_top = velocities along the y-direction of the bottom and top walls (located at z=zmin and z=zmax).
<I>bodyforce</I> values = bodyforcex bodyforcey bodyforcez = the x,y and z components of a constant body force added to the fluid.
<I>printfluid</I> values = N = print the fluid density and velocity at each grid point every N timesteps.
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 all lb/fluid 1 2 1.0 1.0 setGamma 13.0 dx 4.0 dm 10.0 calcforce sphere1
fix 1 all lb/fluid 1 1 1.0 0.0009982071 setArea 1 1.144592082 dx 2.0 dm 0.3 trilinear noise 300.0 8979873
</PRE>
<P><B>Description:</B>
</P>
<P>Implement a lattice-Boltzmann fluid on a uniform mesh covering the LAMMPS
simulation domain. The MD particles described by <I>group-ID</I> apply a velocity
dependent force to the fluid.
</P>
<P>The lattice-Boltzmann algorithm solves for the fluid motion governed by
the Navier Stokes equations,
</P>
<CENTER><IMG SRC = "Eqs/fix_lb_fluid_navierstokes.jpg">
</CENTER>
<P>with,
</P>
<CENTER><IMG SRC = "Eqs/fix_lb_fluid_viscosity.jpg">
</CENTER>
<P>where rho is the fluid density, u is the local fluid velocity, sigma is
the stress tensor, F is a local external force, and eta and Lambda are the shear and
bulk viscosities respectively. Here, we have implemented
</P>
<CENTER><IMG SRC = "Eqs/fix_lb_fluid_stress.jpg">
</CENTER>
<P>with a_0 set to 1/3 (dx/dt)^2 by default.
</P>
<P>The algorithm involves tracking the time evolution of a set of partial
distribution functions which evolve according to a velocity discretized version
of the Boltzmann equation,
</P>
<CENTER><IMG SRC = "Eqs/fix_lb_fluid_boltzmann.jpg">
</CENTER>
<P>where the first term on the right hand side represents a single time relaxation
towards the equilibrium distribution function, and tau is a parameter physically
related to the viscosity. On a technical note, we have implemented a 15 velocity
model (D3Q15) as default; however, the user can switch to a 19 velocity model (D3Q19) through the use of the <I>D3Q19</I> keyword. This fix provides the user with the choice of two
algorithms to solve this equation, through the specification of the keyword <I>LBtype</I>. If
<I>LBtype</I> is set equal to 1, the standard finite difference LB integrator is used.
If <I>LBtype</I> is set equal to 2, the algorithm of <A HREF = "#Ollila">Ollila et al.</A> &#91;1&#93; is used.
</P>
<P>Physical variables are then defined in terms of moments of the distribution
functions,
</P>
<CENTER><IMG SRC = "Eqs/fix_lb_fluid_properties.jpg">
</CENTER>
<P>Full details of the lattice-Boltzmann algorithm used can be found in <A HREF = "#Mackay">Mackay et al.</A> &#91;2&#93;.
</P>
<P>The fluid is coupled to the MD particles described by <I>group-ID</I> through a
velocity dependent force. The contribution to the fluid force on a given lattice
mesh site j due to MD particle alpha is calculated as:
</P>
<CENTER><IMG SRC = "Eqs/fix_lb_fluid_fluidforce.jpg">
</CENTER>
<P>where v_n is the velocity of the MD particle, u_f is the fluid velocity
interpolated to the particle location, and gamma is the force coupling constant.
Zeta is a weight assigned to the grid point,
obtained by distributing the particle to the nearest lattice sites. For this,
the user has the choice between a trilinear stencil, which provides a support of
8 lattice sites, or the immersed boundary method Peskin stencil, which provides a
support of 64 lattice sites. While the Peskin stencil is seen to provide more
stable results, the trilinear stencil may be better suited for
simulation of objects close to walls, due to its smaller support. Therefore, by default, the Peskin stencil is used; however the user may switch to the trilinear stencil by specifying the keyword, <I>trilinear</I>.
</P>
<P>By default, the force coupling constant, gamma, is calculated according to
</P>
<CENTER><IMG SRC = "Eqs/fix_lb_fluid_gammadefault.jpg">
</CENTER>
<P>Here, m_v is the mass of the MD particle, m_u is a representative fluid mass at the particle location, and dt_collision is a collision time, chosen such that tau/dt_collision = 1 (see <A HREF = "#Mackay2">Mackay and Denniston</A> &#91;3&#93; for full details). In order to calculate m_u, the fluid density is interpolated to the MD particle location, and multiplied by a volume, node_area*dx_lb, where node_area represents the portion of the surface area of the composite object associated with a given MD particle. By default, node_area is set equal to dx_lb*dx_lb; however specific values for given atom types can be set using the <I>setArea</I> keyword.
</P>
<P>The user also has the option of specifying their own value for the force coupling constant, for all the MD particles associated with the fix, through the use of the <I>setGamma</I> keyword. This may be useful when modelling porous particles. See <A HREF = "#Mackay">Mackay et al.</A> &#91;2&#93; for a detailed description of the method by which the user can choose an appropriate gamma value.
</P>
<P>IMPORTANT NOTE: while this fix applies the force of the particles on the fluid,
it does not apply the force of the fluid to the particles.
When the force coupling constant is set using the default method, there is only one option to include this hydrodynamic force on the particles, and that is through the use of the <A HREF = "fix_lb_viscous.html">lb/viscous</A> fix. This fix adds the hydrodynamic force to the total force acting on the particles, after which any of the built-in LAMMPS integrators can be used to integrate the particle motion. However, if the user specifies their own value for the force coupling constant, as mentioned in <A HREF = "#Mackay">Mackay et al.</A> &#91;2&#93;, the built-in LAMMPS integrators may prove to be unstable. Therefore, we have included our own integrators <A HREF = "fix_lb_rigid_pc_sphere.html">fix lb/rigid/pc/sphere</A>, and <A HREF = "fix_lb_pc.html">fix lb/pc</A>, to solve for the particle motion in these cases. These integrators should not be used with the <A HREF = "fix_lb_viscous.html">lb/viscous</A> fix, as they add hydrodynamic forces to the particles directly. In addition, they can not be used if the force coupling constant has been set the default way.
</P>
<P>IMPORTANT NOTE: if the force coupling constant is set using the default method, and the <A HREF = "fix_lb_viscous.html">lb/viscous</A> fix is NOT used to add the hydrodynamic force to the total force acting on the particles, this physically corresponds to a situation in which an infinitely massive particle is moving through the fluid (since collisions between the particle and the fluid do not act to change the particle's velocity). Therefore, the user should set the mass of the particle to be significantly larger than the mass of the fluid at the particle location, in order to approximate an infinitely massive particle (see the dragforce test run for an example).
</P>
<HR>
<P>Inside the fix, parameters are scaled by the lattice-Boltzmann timestep, dt,
grid spacing, dx, and mass unit, dm. dt is set equal to (nevery*dt_MD), where dt_MD is the MD timestep.
By default, dm is set equal to 1.0, and dx is chosen so that tau/(dt) =
(3*eta*dt)/(rho*dx^2) is approximately equal to 1. However, the user has
the option of specifying their own values for dm, and dx,
by using the optional keywords <I>dm</I>, and <I>dx</I> respectively.
</P>
<P>IMPORTANT NOTE: Care must be taken when choosing both a value for dx, and a simulation domain size. This fix uses the same subdivision of the simulation domain among processors as
the main LAMMPS program. In order to uniformly cover the simulation domain with lattice sites,
the lengths of the individual LAMMPS subdomains must all be evenly divisible by dx.
If the simulation domain size is cubic, with equal lengths in all dimensions, and the default value for dx is used, this
will automatically be satisfied.
</P>
<P>Physical parameters describing the fluid are specified through <I>viscosity</I>,
<I>density</I>, and <I>a0</I>. If the force coupling constant is set the default way, the surface area associated with the MD particles is specified using the <I>setArea</I> keyword. If the user chooses to specify a value for the force coupling constant, this is set using the <I>setGamma</I> keyword.
These parameters should all be given in terms of the mass, distance, and time units
chosen for the main LAMMPS run, as they are scaled by the LB timestep,
lattice spacing, and mass unit, inside the fix.
</P>
<HR>
<P>The <I>setArea</I> keyword allows the user to associate a surface area with a given atom type. For example if a spherical composite object of radius R is represented as a spherical shell of N evenly distributed MD particles, all of the same type, the surface area per particle associated with that atom type should be set equal to 4*pi*R^2/N. This keyword should only be used if the force coupling constant, gamma, is set the default way.
</P>
<P>The <I>setGamma</I> keyword allows the user to specify their own value for the force coupling constant, gamma, instead of using the default value.
</P>
<P>The <I>scaleGamma</I> keyword should be used in conjunction with the <I>setGamma</I> keyword, when the user wishes to specify different gamma values for different atom types. This keyword allows the user to scale the <I>setGamma</I> gamma value by a factor, gammaFactor, for a given atom type.
</P>
<P>The <I>dx</I> keyword allows the user to specify a value for the LB grid spacing.
</P>
<P>The <I>dm</I> keyword allows the user to specify the LB mass unit.
</P>
<P>If the <I>a0</I> keyword is used, the value specified is used for the square of the speed of
sound in the fluid. If this keyword is not present, the speed of sound squared is
set equal to (1/3)*(dx/dt)^2. Setting a0 > (dx/dt)^2 is not allowed, as this may lead to instabilities.
</P>
<P>If the <I>noise</I> keyword is used, followed by a a positive temperature value, and a
positive integer random number seed, a thermal lattice-Boltzmann algorithm is used.
If <I>LBtype</I> is set equal to 1 (i.e. the standard LB integrator is chosen), the thermal LB algorithm of <A HREF = "#Adhikari">Adhikari et al.</A> &#91;4&#93; is used; however if <I>LBtype</I> is set equal to 2 both the LB integrator, and thermal LB algorithm described in <A HREF = "#Ollila">Ollila et al.</A> &#91;1&#93; are used.
</P>
<P>If the <I>calcforce</I> keyword is used, both the fluid force and torque
acting on the specified particle group are printed to the screen every N timesteps.
</P>
<P>If the keyword <I>trilinear</I> is used, the trilinear stencil is used to
interpolate the particle nodes onto the fluid mesh. By default, the
immersed boundary method, Peskin stencil is used. Both of these interpolation methods
are described in <A HREF = "#Mackay">Mackay et al.</A> &#91;2&#93;.
</P>
<P>If the keyword <I>D3Q19</I> is used, the 19 velocity (D3Q19) lattice is used by the
lattice-Boltzmann algorithm. By default, the 15 velocity (D3Q15) lattice is
used.
</P>
<P>If the keyword <I>write_restart</I> is used, followed by a positive integer, N,
a binary restart file is printed every N LB timesteps. This restart file
only contains information about the fluid. Therefore, a LAMMPS restart
file should also be written in order to print out full details of the
simulation.
</P>
<P>IMPORTANT NOTE: When a large number of lattice grid points are used, the
restart files may become quite large.
</P>
<P>In order to restart the fluid portion of the simulation, the keyword <I>read_restart</I>
is specified, followed by the name of the binary lb_fluid restart file to be used.
</P>
<P>If the <I>zwall_velocity</I> keyword is used y-velocities are assigned to
the lower and upper walls. This keyword requires the presence of walls
in the z-direction. This is set by assigning fixed boundary conditions
in the z-direction. If fixed boundary conditions are present in the
z-direction, and this keyword is not used, the walls are assumed to be stationary.
</P>
<P>If the <I>bodyforce</I> keyword is used, a constant body force is added to
the fluid, defined by it's x, y and z components.
</P>
<P>If the <I>printfluid</I> keyword is used, followed by a positive integer, N,
the fluid densities and velocities at each lattice site are printed to the
screen every N timesteps.
</P>
<HR>
<P>For further details, as well as descriptions and results of several test runs,
see <A HREF = "#Mackay">Mackay et al.</A> &#91;2&#93; . Please include a citation to this
paper if the lb_fluid fix is used in work contributing to published research.
</P>
<HR>
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
</P>
<P>Due to the large size of the fluid data, this fix writes it's own
binary restart files, if requested, independent of the main LAMMPS
<A HREF = "restart.html">binary restart files</A>; no information about <I>lb_fluid</I> is
written to the main LAMMPS <A HREF = "restart.html">binary restart files</A>.
</P>
<P>None of the <A HREF = "fix_modify.html">fix_modify</A> options
are relevant to this fix. No global or per-atom quantities are stored
by this fix for access by various <A HREF = "Section_howto.html#4_15">output
commands</A>. 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 can only be used with an orthogonal simulation domain.
</P>
<P>Walls have only been implemented in the z-direction. Therefore, the
boundary conditions, as specified via the main LAMMPS boundary command
must be periodic for x and y, and either fixed or periodic for z.
Shrink-wrapped boundary conditions are not permitted with this fix.
</P>
<P>This fix must be used before any of <A HREF = "fix_lb_viscous.html">fix lb/viscous</A>, <A HREF = "fix_lb_momentum.html">fix lb/momentum</A>,
<A HREF = "fix_lb_rigid_pc_sphere.html">fix lb/rigid/pc/sphere</A>, and/ or <A HREF = "fix_lb_pc.html">fix lb/pc</A> , as
the fluid needs to be initialized before any of these routines try to access its
properties. In addition, in order for the hydrodynamic forces to be added to the particles, this fix must be used in conjunction with the <A HREF = "fix_lb_viscous.html">lb/viscous</A> fix if the force coupling constant is set by default, or either the <A HREF = "fix_lb_viscous.html">lb/viscous</A> fix or one of the <A HREF = "fix_lb_rigid_pc_sphere.html">lb/rigid/pc/sphere</A> or <A HREF = "fix_lb_pc.html">lb/pc</A> integrators, if the user chooses to specifiy their own value for the force coupling constant.
</P>
<P>This fix can only be used if LAMMPS was built with the
"fluid" package. See the <A HREF = "Section_start.html#2_3">Making
LAMMPS</A> section for more info on packages.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_lb_viscous.html">fix lb/viscous</A>, <A HREF = "fix_lb_momentum.html">fix lb/momentum</A>, <A HREF = "fix_lb_rigid_pc_sphere.html">fix lb/rigid/pc/sphere</A>,
<A HREF = "fix_lb_pc.html">fix lb/pc</A>
</P>
<P><B>Default:</B>
</P>
<P>By default, the force coupling constant is set according to
</P>
<CENTER><IMG SRC = "Eqs/fix_lb_fluid_gammadefault.jpg">
</CENTER>
<P>and an area of dx_lb^2 per node, used to calculate the fluid mass at the particle node location, is assumed.
</P>
<P>dx is chosen such that tau/(delta t_LB) =
(3 eta dt_LB)/(rho dx_lb^2) is approximately equal to 1.
dm is set equal to 1.0.
a0 is set equal to (1/3)*(dx_lb/dt_lb)^2.
The Peskin stencil is used as the default interpolation method.
The D3Q15 lattice is used for the lattice-Boltzmann algorithm.
If walls are present, they are assumed to be stationary.
</P>
<HR>
<A NAME = "Ollila"></A>
<P><B>&#91;1&#93; (Ollila et al.)</B> Ollila, S.T.T., Denniston, C., Karttunen, M., and Ala-Nissila, T., Fluctuating lattice-Boltzmann model for complex fluids, J. Chem. Phys. 134 (2011) 064902.
</P>
<A NAME = "Mackay"></A>
<P><B>&#91;2&#93; (Mackay et al.)</B> Mackay, F. E., Ollila, S.T.T., and Denniston, C., Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 184 (2013) 2021-2031.
</P>
<A NAME = "Mackay2"></A>
<P><B>&#91;3&#93; (Mackay and Denniston)</B> Mackay, F. E., and Denniston, C., Coupling MD particles to a lattice-Boltzmann fluid through the use of conservative forces, J. Comput. Phys. 237 (2013) 289-298.
</P>
<A NAME = "Adhikari"></A>
<P><B>&#91;4&#93; (Adhikari et al.)</B> Adhikari, R., Stratford, K., Cates, M. E., and Wagner, A. J., Fluctuating lattice Boltzmann, Europhys. Lett. 71 (2005) 473-479.
</P>
</HTML>

281
doc/fix_lb_fluid.txt Executable file
View File

@ -0,0 +1,281 @@
"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 lb/fluid command :h3
[Syntax:]
fix ID group-ID lb/fluid nevery LBtype viscosity density keyword values ... :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l
lb/fluid = style name of this fix command :l
nevery = update the lattice-Boltzmann fluid every this many timesteps :l
LBtype = 1 to use the standard finite difference LB integrator,
2 to use the LB integrator of "Ollila et al."_#Ollila &#91;1&#93; :l
viscosity = the fluid viscosity (units of mass/(time*length)). :l
density = the fluid density. :l
zero or more keyword/value pairs may be appended :l
keyword = {setArea} or {setGamma} or {scaleGamma} or {dx} or {dm} or {a0} or {noise} or {calcforce} or {trilinear} or {D3Q19} or {read_restart} or {write_restart} or {zwall_velocity} or {bodyforce} or {printfluid}
{setArea} values = type node_area
type = atom type (1-N)
node_area = portion of the surface area of the composite object associated with the particular atom type (used when the force coupling constant is set by default).
{setGamma} values = gamma
gamma = user set value for the force coupling constant.
{scaleGamma} values = type gammaFactor
type = atom type (1-N)
gammaFactor = factor to scale the {setGamma} gamma value by, for the specified atom type.
{dx} values = dx_LB = the lattice spacing.
{dm} values = dm_LB = the lattice-Boltzmann mass unit.
{a0} values = a_0_real = the square of the speed of sound in the fluid.
{noise} values = Temperature seed
Temperature = fluid temperature.
seed = random number generator seed (positive integer)
{calcforce} values = N forcegroup-ID
N = output the force and torque every N timesteps
forcegroup-ID = ID of the particle group to calculate the force and torque of
{trilinear} values = none (used to switch from the default Peskin interpolation stencil to the trilinear stencil).
{D3Q19} values = none (used to switch from the default D3Q15, 15 velocity lattice, to the D3Q19, 19 velocity lattice).
{read_restart} values = restart file = name of the restart file to use to restart a fluid run.
{write_restart} values = N = write a restart file every N MD timesteps.
{zwall_velocity} values = velocity_bottom velocity_top = velocities along the y-direction of the bottom and top walls (located at z=zmin and z=zmax).
{bodyforce} values = bodyforcex bodyforcey bodyforcez = the x,y and z components of a constant body force added to the fluid.
{printfluid} values = N = print the fluid density and velocity at each grid point every N timesteps. :pre
:ule
[Examples:]
fix 1 all lb/fluid 1 2 1.0 1.0 setGamma 13.0 dx 4.0 dm 10.0 calcforce sphere1
fix 1 all lb/fluid 1 1 1.0 0.0009982071 setArea 1 1.144592082 dx 2.0 dm 0.3 trilinear noise 300.0 8979873 :pre
[Description:]
Implement a lattice-Boltzmann fluid on a uniform mesh covering the LAMMPS
simulation domain. The MD particles described by {group-ID} apply a velocity
dependent force to the fluid.
The lattice-Boltzmann algorithm solves for the fluid motion governed by
the Navier Stokes equations,
:c,image(Eqs/fix_lb_fluid_navierstokes.jpg)
with,
:c,image(Eqs/fix_lb_fluid_viscosity.jpg)
where rho is the fluid density, u is the local fluid velocity, sigma is
the stress tensor, F is a local external force, and eta and Lambda are the shear and
bulk viscosities respectively. Here, we have implemented
:c,image(Eqs/fix_lb_fluid_stress.jpg),
with a_0 set to 1/3 (dx/dt)^2 by default.
The algorithm involves tracking the time evolution of a set of partial
distribution functions which evolve according to a velocity discretized version
of the Boltzmann equation,
:c,image(Eqs/fix_lb_fluid_boltzmann.jpg)
where the first term on the right hand side represents a single time relaxation
towards the equilibrium distribution function, and tau is a parameter physically
related to the viscosity. On a technical note, we have implemented a 15 velocity
model (D3Q15) as default; however, the user can switch to a 19 velocity model (D3Q19) through the use of the {D3Q19} keyword. This fix provides the user with the choice of two
algorithms to solve this equation, through the specification of the keyword {LBtype}. If
{LBtype} is set equal to 1, the standard finite difference LB integrator is used.
If {LBtype} is set equal to 2, the algorithm of "Ollila et al."_#Ollila &#91;1&#93; is used.
Physical variables are then defined in terms of moments of the distribution
functions,
:c,image(Eqs/fix_lb_fluid_properties.jpg)
Full details of the lattice-Boltzmann algorithm used can be found in "Mackay et al."_#Mackay &#91;2&#93;.
The fluid is coupled to the MD particles described by {group-ID} through a
velocity dependent force. The contribution to the fluid force on a given lattice
mesh site j due to MD particle alpha is calculated as:
:c,image(Eqs/fix_lb_fluid_fluidforce.jpg)
where v_n is the velocity of the MD particle, u_f is the fluid velocity
interpolated to the particle location, and gamma is the force coupling constant.
Zeta is a weight assigned to the grid point,
obtained by distributing the particle to the nearest lattice sites. For this,
the user has the choice between a trilinear stencil, which provides a support of
8 lattice sites, or the immersed boundary method Peskin stencil, which provides a
support of 64 lattice sites. While the Peskin stencil is seen to provide more
stable results, the trilinear stencil may be better suited for
simulation of objects close to walls, due to its smaller support. Therefore, by default, the Peskin stencil is used; however the user may switch to the trilinear stencil by specifying the keyword, {trilinear}.
By default, the force coupling constant, gamma, is calculated according to
:c,image(Eqs/fix_lb_fluid_gammadefault.jpg).
Here, m_v is the mass of the MD particle, m_u is a representative fluid mass at the particle location, and dt_collision is a collision time, chosen such that tau/dt_collision = 1 (see "Mackay and Denniston"_#Mackay2 &#91;3&#93; for full details). In order to calculate m_u, the fluid density is interpolated to the MD particle location, and multiplied by a volume, node_area*dx_lb, where node_area represents the portion of the surface area of the composite object associated with a given MD particle. By default, node_area is set equal to dx_lb*dx_lb; however specific values for given atom types can be set using the {setArea} keyword.
The user also has the option of specifying their own value for the force coupling constant, for all the MD particles associated with the fix, through the use of the {setGamma} keyword. This may be useful when modelling porous particles. See "Mackay et al."_#Mackay &#91;2&#93; for a detailed description of the method by which the user can choose an appropriate gamma value.
IMPORTANT NOTE: while this fix applies the force of the particles on the fluid,
it does not apply the force of the fluid to the particles.
When the force coupling constant is set using the default method, there is only one option to include this hydrodynamic force on the particles, and that is through the use of the "lb/viscous"_fix_lb_viscous.html fix. This fix adds the hydrodynamic force to the total force acting on the particles, after which any of the built-in LAMMPS integrators can be used to integrate the particle motion. However, if the user specifies their own value for the force coupling constant, as mentioned in "Mackay et al."_#Mackay &#91;2&#93;, the built-in LAMMPS integrators may prove to be unstable. Therefore, we have included our own integrators "fix lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html, and "fix lb/pc"_fix_lb_pc.html, to solve for the particle motion in these cases. These integrators should not be used with the "lb/viscous"_fix_lb_viscous.html fix, as they add hydrodynamic forces to the particles directly. In addition, they can not be used if the force coupling constant has been set the default way.
IMPORTANT NOTE: if the force coupling constant is set using the default method, and the "lb/viscous"_fix_lb_viscous.html fix is NOT used to add the hydrodynamic force to the total force acting on the particles, this physically corresponds to a situation in which an infinitely massive particle is moving through the fluid (since collisions between the particle and the fluid do not act to change the particle's velocity). Therefore, the user should set the mass of the particle to be significantly larger than the mass of the fluid at the particle location, in order to approximate an infinitely massive particle (see the dragforce test run for an example).
:line
Inside the fix, parameters are scaled by the lattice-Boltzmann timestep, dt,
grid spacing, dx, and mass unit, dm. dt is set equal to (nevery*dt_MD), where dt_MD is the MD timestep.
By default, dm is set equal to 1.0, and dx is chosen so that tau/(dt) =
(3*eta*dt)/(rho*dx^2) is approximately equal to 1. However, the user has
the option of specifying their own values for dm, and dx,
by using the optional keywords {dm}, and {dx} respectively.
IMPORTANT NOTE: Care must be taken when choosing both a value for dx, and a simulation domain size. This fix uses the same subdivision of the simulation domain among processors as
the main LAMMPS program. In order to uniformly cover the simulation domain with lattice sites,
the lengths of the individual LAMMPS subdomains must all be evenly divisible by dx.
If the simulation domain size is cubic, with equal lengths in all dimensions, and the default value for dx is used, this
will automatically be satisfied.
Physical parameters describing the fluid are specified through {viscosity},
{density}, and {a0}. If the force coupling constant is set the default way, the surface area associated with the MD particles is specified using the {setArea} keyword. If the user chooses to specify a value for the force coupling constant, this is set using the {setGamma} keyword.
These parameters should all be given in terms of the mass, distance, and time units
chosen for the main LAMMPS run, as they are scaled by the LB timestep,
lattice spacing, and mass unit, inside the fix.
:line
The {setArea} keyword allows the user to associate a surface area with a given atom type. For example if a spherical composite object of radius R is represented as a spherical shell of N evenly distributed MD particles, all of the same type, the surface area per particle associated with that atom type should be set equal to 4*pi*R^2/N. This keyword should only be used if the force coupling constant, gamma, is set the default way.
The {setGamma} keyword allows the user to specify their own value for the force coupling constant, gamma, instead of using the default value.
The {scaleGamma} keyword should be used in conjunction with the {setGamma} keyword, when the user wishes to specify different gamma values for different atom types. This keyword allows the user to scale the {setGamma} gamma value by a factor, gammaFactor, for a given atom type.
The {dx} keyword allows the user to specify a value for the LB grid spacing.
The {dm} keyword allows the user to specify the LB mass unit.
If the {a0} keyword is used, the value specified is used for the square of the speed of
sound in the fluid. If this keyword is not present, the speed of sound squared is
set equal to (1/3)*(dx/dt)^2. Setting a0 > (dx/dt)^2 is not allowed, as this may lead to instabilities.
If the {noise} keyword is used, followed by a a positive temperature value, and a
positive integer random number seed, a thermal lattice-Boltzmann algorithm is used.
If {LBtype} is set equal to 1 (i.e. the standard LB integrator is chosen), the thermal LB algorithm of "Adhikari et al."_#Adhikari &#91;4&#93; is used; however if {LBtype} is set equal to 2 both the LB integrator, and thermal LB algorithm described in "Ollila et al."_#Ollila &#91;1&#93; are used.
If the {calcforce} keyword is used, both the fluid force and torque
acting on the specified particle group are printed to the screen every N timesteps.
If the keyword {trilinear} is used, the trilinear stencil is used to
interpolate the particle nodes onto the fluid mesh. By default, the
immersed boundary method, Peskin stencil is used. Both of these interpolation methods
are described in "Mackay et al."_#Mackay &#91;2&#93;.
If the keyword {D3Q19} is used, the 19 velocity (D3Q19) lattice is used by the
lattice-Boltzmann algorithm. By default, the 15 velocity (D3Q15) lattice is
used.
If the keyword {write_restart} is used, followed by a positive integer, N,
a binary restart file is printed every N LB timesteps. This restart file
only contains information about the fluid. Therefore, a LAMMPS restart
file should also be written in order to print out full details of the
simulation.
IMPORTANT NOTE: When a large number of lattice grid points are used, the
restart files may become quite large.
In order to restart the fluid portion of the simulation, the keyword {read_restart}
is specified, followed by the name of the binary lb_fluid restart file to be used.
If the {zwall_velocity} keyword is used y-velocities are assigned to
the lower and upper walls. This keyword requires the presence of walls
in the z-direction. This is set by assigning fixed boundary conditions
in the z-direction. If fixed boundary conditions are present in the
z-direction, and this keyword is not used, the walls are assumed to be stationary.
If the {bodyforce} keyword is used, a constant body force is added to
the fluid, defined by it's x, y and z components.
If the {printfluid} keyword is used, followed by a positive integer, N,
the fluid densities and velocities at each lattice site are printed to the
screen every N timesteps.
:line
For further details, as well as descriptions and results of several test runs,
see "Mackay et al."_#Mackay &#91;2&#93; . Please include a citation to this
paper if the lb_fluid fix is used in work contributing to published research.
:line
[Restart, fix_modify, output, run start/stop, minimize info:]
Due to the large size of the fluid data, this fix writes it's own
binary restart files, if requested, independent of the main LAMMPS
"binary restart files"_restart.html; no information about {lb_fluid} is
written to the main LAMMPS "binary restart files"_restart.html.
None of the "fix_modify"_fix_modify.html options
are relevant to this fix. No global or per-atom quantities are stored
by this fix for access by various "output
commands"_Section_howto.html#4_15. 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:]
This fix can only be used with an orthogonal simulation domain.
Walls have only been implemented in the z-direction. Therefore, the
boundary conditions, as specified via the main LAMMPS boundary command
must be periodic for x and y, and either fixed or periodic for z.
Shrink-wrapped boundary conditions are not permitted with this fix.
This fix must be used before any of "fix lb/viscous"_fix_lb_viscous.html, "fix lb/momentum"_fix_lb_momentum.html,
"fix lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html, and/ or "fix lb/pc"_fix_lb_pc.html , as
the fluid needs to be initialized before any of these routines try to access its
properties. In addition, in order for the hydrodynamic forces to be added to the particles, this fix must be used in conjunction with the "lb/viscous"_fix_lb_viscous.html fix if the force coupling constant is set by default, or either the "lb/viscous"_fix_lb_viscous.html fix or one of the "lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html or "lb/pc"_fix_lb_pc.html integrators, if the user chooses to specifiy their own value for the force coupling constant.
This fix can only be used if LAMMPS was built with the
"fluid" package. See the "Making
LAMMPS"_Section_start.html#2_3 section for more info on packages.
[Related commands:]
"fix lb/viscous"_fix_lb_viscous.html, "fix lb/momentum"_fix_lb_momentum.html, "fix lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html,
"fix lb/pc"_fix_lb_pc.html
[Default:]
By default, the force coupling constant is set according to
:c,image(Eqs/fix_lb_fluid_gammadefault.jpg)
and an area of dx_lb^2 per node, used to calculate the fluid mass at the particle node location, is assumed.
dx is chosen such that tau/(delta t_LB) =
(3 eta dt_LB)/(rho dx_lb^2) is approximately equal to 1.
dm is set equal to 1.0.
a0 is set equal to (1/3)*(dx_lb/dt_lb)^2.
The Peskin stencil is used as the default interpolation method.
The D3Q15 lattice is used for the lattice-Boltzmann algorithm.
If walls are present, they are assumed to be stationary.
:line
:link(Ollila)
[&#91;1&#93; (Ollila et al.)] Ollila, S.T.T., Denniston, C., Karttunen, M., and Ala-Nissila, T., Fluctuating lattice-Boltzmann model for complex fluids, J. Chem. Phys. 134 (2011) 064902.
:link(Mackay)
[&#91;2&#93; (Mackay et al.)] Mackay, F. E., Ollila, S.T.T., and Denniston, C., Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 184 (2013) 2021-2031.
:link(Mackay2)
[&#91;3&#93; (Mackay and Denniston)] Mackay, F. E., and Denniston, C., Coupling MD particles to a lattice-Boltzmann fluid through the use of conservative forces, J. Comput. Phys. 237 (2013) 289-298.
:link(Adhikari)
[&#91;4&#93; (Adhikari et al.)] Adhikari, R., Stratford, K., Cates, M. E., and Wagner, A. J., Fluctuating lattice Boltzmann, Europhys. Lett. 71 (2005) 473-479.

80
doc/fix_lb_momentum.html Normal file
View File

@ -0,0 +1,80 @@
<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 lb/momentum command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID lb/momentum nevery keyword values ...
</PRE>
<UL><LI>ID, group-ID are documented in the <A HREF = "fix.html">fix</A> command
<LI>lb/momentum = style name of this fix command
<LI>nevery = adjust the momentum every this many timesteps
<LI>zero or more keyword/value pairs may be appended
<PRE>keyword = <I>linear</I>
<I>linear</I> values = xflag yflag zflag
xflag,yflag,zflag = 0/1 to exclude/include each dimension.
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 sphere lb/momentum
fix 1 all lb/momentum linear 1 1 0
</PRE>
<P><B>Description:</B>
</P>
<P>This fix is based on the <A HREF = "fix_momentum.html">fix momentum</A> command, and was
created to be used in place of that command, when a lattice-Boltzmann fluid is present.
</P>
<P>Zero the total linear momentum of the system, including both the atoms specified
by group-ID and the lattice-Boltzmann fluid every nevery timesteps. This is
accomplished by adjusting the particle velocities and the fluid velocities at each
lattice site.
</P>
<P>NOTE: This fix only considers the linear momentum of the system.
</P>
<P>By default, the subtraction is performed for each dimension. This can be changed
by specifying the keyword <I>linear</I>, along with a set of three flags set to 0/1 in order
to exclude/ include the corresponding dimension.
</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. No global or per-atom quantities are stored
by this fix for access by various <A HREF = "Section_howto.html#4_15">output
commands</A>. 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>Can only be used if a lattice-Boltzmann fluid has been created via the
<A HREF = "fix_lb_fluid.html">fix lb/fluid</A> command, and must come after this command.
</P>
<P>This fix can only be used if LAMMPS was built with the
"fluid" package. See the <A HREF = "Section_start.html#2_3">Making
LAMMPS</A> section for more info on packages.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_momentum.html">fix momentum</A>, <A HREF = "fix_lb_fluid.html">fix lb/fluid</A>
</P>
<P><B>Default:</B>
</P>
<P>Zeros the total system linear momentum in each dimension.
</P>
</HTML>

72
doc/fix_lb_momentum.txt Executable file
View File

@ -0,0 +1,72 @@
"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 lb/momentum command :h3
[Syntax:]
fix ID group-ID lb/momentum nevery keyword values ... :pre
ID, group-ID are documented in the "fix"_fix.html command :ulb,l
lb/momentum = style name of this fix command :l
nevery = adjust the momentum every this many timesteps :l
zero or more keyword/value pairs may be appended :l
keyword = {linear}
{linear} values = xflag yflag zflag
xflag,yflag,zflag = 0/1 to exclude/include each dimension. :pre
:ule
[Examples:]
fix 1 sphere lb/momentum
fix 1 all lb/momentum linear 1 1 0 :pre
[Description:]
This fix is based on the "fix momentum"_fix_momentum.html command, and was
created to be used in place of that command, when a lattice-Boltzmann fluid is present.
Zero the total linear momentum of the system, including both the atoms specified
by group-ID and the lattice-Boltzmann fluid every nevery timesteps. This is
accomplished by adjusting the particle velocities and the fluid velocities at each
lattice site.
NOTE: This fix only considers the linear momentum of the system.
By default, the subtraction is performed for each dimension. This can be changed
by specifying the keyword {linear}, along with a set of three flags set to 0/1 in order
to exclude/ include the corresponding dimension.
[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. No global or per-atom quantities are stored
by this fix for access by various "output
commands"_Section_howto.html#4_15. 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:]
Can only be used if a lattice-Boltzmann fluid has been created via the
"fix lb/fluid"_fix_lb_fluid.html command, and must come after this command.
This fix can only be used if LAMMPS was built with the
"fluid" package. See the "Making
LAMMPS"_Section_start.html#2_3 section for more info on packages.
[Related commands:]
"fix momentum"_fix_momentum.html, "fix lb/fluid"_fix_lb_fluid.html
[Default:]
Zeros the total system linear momentum in each dimension.

65
doc/fix_lb_pc.html Normal file
View File

@ -0,0 +1,65 @@
<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 lb/pc command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID lb/pc
</PRE>
<UL><LI>ID, group-ID are documented in the <A HREF = "fix.html">fix</A> command
<LI>lb/pc = style name of this fix command
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 all lb/pc
</PRE>
<P><B>Description:</B>
</P>
<P>Update the positions and velocities of the individual particles described
by <I>group-ID</I>, experiencing velocity-dependent hydrodynamic forces,
using the integration algorithm described in <A HREF = "#Mackay">Mackay et al.</A> &#91;1&#93;. This integration algorithm should only be used if a user-specified value for the force-coupling constant used in <A HREF = "fix_lb_fluid.html">fix lb/fluid</A> has been set; do not use this integration algorithm if the force coupling constant has been set by default.
</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. No global or per-atom quantities are stored
by this fix for access by various <A HREF = "Section_howto.html#4_15">output
commands</A>. 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>Can only be used if a lattice-Boltzmann fluid has been created via the
<A HREF = "fix_lb_fluid.html">fix lb/fluid</A> command, and must come after this command.
</P>
<P> This fix can only be used if LAMMPS was built with the
"fluid" package. See the <A HREF = "Section_start.html#2_3">Making
LAMMPS</A> section for more info on packages.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_lb_fluid.html">fix lb/fluid</A> <A HREF = "fix_lb_rigid_pc_sphere.html">fix lb/rigid/pc/sphere</A>
</P>
<P><B>Default:</B> None.
</P>
<HR>
<A NAME = "Mackay"></A>
<P><B>&#91;1&#93; (Mackay et al.)</B> Mackay, F. E., Ollila, S.T.T., and Denniston, C., Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 184 (2013) 2021-2031.
</P>
</HTML>

58
doc/fix_lb_pc.txt Executable file
View File

@ -0,0 +1,58 @@
"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 lb/pc command :h3
[Syntax:]
fix ID group-ID lb/pc :pre
ID, group-ID are documented in the "fix"_fix.html command :ulb,l
lb/pc = style name of this fix command :l
:ule
[Examples:]
fix 1 all lb/pc :pre
[Description:]
Update the positions and velocities of the individual particles described
by {group-ID}, experiencing velocity-dependent hydrodynamic forces,
using the integration algorithm described in "Mackay et al."_#Mackay &#91;1&#93;. This integration algorithm should only be used if a user-specified value for the force-coupling constant used in "fix lb/fluid"_fix_lb_fluid.html has been set; do not use this integration algorithm if the force coupling constant has been set by default.
[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. No global or per-atom quantities are stored
by this fix for access by various "output
commands"_Section_howto.html#4_15. 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:]
Can only be used if a lattice-Boltzmann fluid has been created via the
"fix lb/fluid"_fix_lb_fluid.html command, and must come after this command.
This fix can only be used if LAMMPS was built with the
"fluid" package. See the "Making
LAMMPS"_Section_start.html#2_3 section for more info on packages.
[Related commands:]
"fix lb/fluid"_fix_lb_fluid.html "fix lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html
[Default:] None.
:line
:link(Mackay)
[&#91;1&#93; (Mackay et al.)] Mackay, F. E., Ollila, S.T.T., and Denniston, C., Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 184 (2013) 2021-2031.

View File

@ -0,0 +1,148 @@
<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 lb/rigid/pc/sphere command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID lb/rigid/pc/sphere bodystyle args keyword values ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
<LI>lb/rigid/pc/sphere = style name of this fix command
<LI>bodystyle = <I>single</I> or <I>molecule</I> or <I>group</I>
<P> <I>single</I> args = none
<I>molecule</I> args = none
<I>group</I> args = N groupID1 groupID2 ...
N = # of groups
</P>
<LI>zero or more keyword/value pairs may be appended
<PRE>keyword = <I>force</I> or <I>torque</I> or <I>innerNodes</I>
<I>force</I> values = M xflag yflag zflag
M = which rigid body from 1-Nbody (see asterisk form below)
xflag,yflag,zflag = off/on if component of center-of-mass force is active
<I>torque</I> values = M xflag yflag zflag
M = which rigid body from 1-Nbody (see asterisk form below)
xflag,yflag,zflag = off/on if component of center-of-mass torque is active
<I>innerNodes</I> values = innergroup-ID
innergroup-ID = ID of the atom group which does not experience a hydrodynamic force from the lattice-Boltzmann fluid
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 spheres lb/rigid/pc/sphere
fix 1 all lb/rigid/pc/sphere force 1 0 0 innerNodes ForceAtoms
</PRE>
<P><B>Description:</B>
</P>
<P>This fix is based on the <A HREF = "fix_rigid.html">fix rigid</A> command, and was
created to be used in place of that fix, to integrate the equations of motion
of spherical rigid bodies when a lattice-Boltzmann fluid is present with a user-specified value of the force-coupling constant.
The fix uses the integration algorithm described in <A HREF = "#Mackay">Mackay et al.</A> &#91;1&#93; to update
the positions, velocities, and orientations of a set of spherical rigid bodies experiencing
velocity dependent hydrodynamic forces. The spherical bodies are assumed to rotate as
solid, uniform density spheres, with moments of inertia calculated using the combined sum of the masses
of all the constituent particles (which are assumed to be point particles).
</P>
<HR>
<P>By default, all of the atoms that this fix acts on experience a hydrodynamic force due to the
presence of the lattice-Boltzmann fluid. However, the <I>innerNodes</I> keyword allows the user
to specify atoms belonging to a rigid object which do not interact with the lattice-Boltzmann
fluid (i.e. these atoms do not feel a hydrodynamic force from the lattice-Boltzmann fluid).
This can be used to distinguish between atoms on the surface of a non-porous object, and
those on the inside.
</P>
<P>This feature can be used, for example, when implementing a hard sphere interaction
between two spherical objects. Instead of interactions occurring between the particles on
the surfaces of the two spheres, it is desirable simply to place an atom at the center of
each sphere, which does not contribute to the hydrodynamic force, and have these central
atoms interact with one another.
</P>
<HR>
<P>Apart from the features described above, this fix is very similar to the rigid fix (although
it includes fewer optional arguments, and assumes the constituent atoms are point particles); see <A HREF = "fix_rigid.html">fix_rigid</A>
for a complete documentation.
</P>
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
</P>
<P>No information about the <I>rigid</I> and <I>rigid/nve</I> fixes are written to
<A HREF = "restart.html">binary restart files</A>.
</P>
<P>Similar to the <A HREF = "fix_rigid.html">fix_rigid</A> command:
&quot; The rigid fix computes a global scalar which can be
accessed by various <A HREF = "Section_howto.html#howto_15">output commands</A>.
The scalar value calculated by these fixes is "intensive". The scalar
is the current temperature of the collection of rigid bodies. This is
averaged over all rigid bodies and their translational and rotational
degrees of freedom. The translational energy of a rigid body is 1/2 m
v^2, where m = total mass of the body and v = the velocity of its
center of mass. The rotational energy of a rigid body is 1/2 I w^2,
where I = the moment of inertia tensor of the body and w = its angular
velocity. Degrees of freedom constrained by the <I>force</I> and <I>torque</I>
keywords are removed from this calculation.&quot;
</P>
<P>&quot;All of these fixes compute a global array of values which can be
accessed by various <A HREF = "Section_howto.html#howto_15">output commands</A>.
The number of rows in the array is equal to the number of rigid
bodies. The number of columns is 15. Thus for each rigid body, 15
values are stored: the xyz coords of the center of mass (COM), the xyz
components of the COM velocity, the xyz components of the force acting
on the COM, the xyz components of the torque acting on the COM, and
the xyz image flags of the COM, which have the same meaning as image
flags for atom positions (see the "dump" command). The force and
torque values in the array are not affected by the <I>force</I> and
<I>torque</I> keywords in the fix rigid command; they reflect values before
any changes are made by those keywords.
</P>
<P>The ordering of the rigid bodies (by row in the array) is as follows.
For the <I>single</I> keyword there is just one rigid body. For the
<I>molecule</I> keyword, the bodies are ordered by ascending molecule ID.
For the <I>group</I> keyword, the list of group IDs determines the ordering
of bodies.
</P>
<P>The array values calculated by these fixes are "intensive", meaning
they are independent of the number of atoms in the simulation.
</P>
<P>No parameter of these fixes can be used with the <I>start/stop</I> keywords
of the <A HREF = "run.html">run</A> command. These fixes are not invoked during
<A HREF = "minimize.html">energy minimization</A>. &quot;
</P>
<P><B>Restrictions:</B>
</P>
<P>Can only be used if a lattice-Boltzmann fluid has been created via the
<A HREF = "fix_lb_fluid.html">fix lb/fluid</A> command, and must come after this command.
Should only be used if the force coupling constant used in <A HREF = "fix_lb_fluid.html">fix lb/fluid</A> has been set by the user; this integration fix cannot be used if the force coupling constant is set by default.
</P>
<P>This fix can only be used if LAMMPS was built with the
"fluid" package. See the <A HREF = "Section_start.html#2_3">Making
LAMMPS</A> section for more info on packages.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_lb_fluid.html">fix lb/fluid</A>, <A HREF = "fix_lb_pc.html">fix lb/pc</A>
</P>
<P><B>Default:</B>
</P>
<P>The defaults are force * on on on, and torque * on on on.
</P>
<HR>
<A NAME = "Mackay"></A>
<P><B>&#91;1&#93; (Mackay et al.)</B> Mackay, F. E., Ollila, S.T.T., and Denniston, C., Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 184 (2013) 2021-2031.
</P>
</HTML>

138
doc/fix_lb_rigid_pc_sphere.txt Executable file
View File

@ -0,0 +1,138 @@
"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 lb/rigid/pc/sphere command :h3
[Syntax:]
fix ID group-ID lb/rigid/pc/sphere bodystyle args keyword values ... :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l
lb/rigid/pc/sphere = style name of this fix command :l
bodystyle = {single} or {molecule} or {group} :l
{single} args = none
{molecule} args = none
{group} args = N groupID1 groupID2 ...
N = # of groups
zero or more keyword/value pairs may be appended :l
keyword = {force} or {torque} or {innerNodes}
{force} values = M xflag yflag zflag
M = which rigid body from 1-Nbody (see asterisk form below)
xflag,yflag,zflag = off/on if component of center-of-mass force is active
{torque} values = M xflag yflag zflag
M = which rigid body from 1-Nbody (see asterisk form below)
xflag,yflag,zflag = off/on if component of center-of-mass torque is active
{innerNodes} values = innergroup-ID
innergroup-ID = ID of the atom group which does not experience a hydrodynamic force from the lattice-Boltzmann fluid :pre
:ule
[Examples:]
fix 1 spheres lb/rigid/pc/sphere
fix 1 all lb/rigid/pc/sphere force 1 0 0 innerNodes ForceAtoms :pre
[Description:]
This fix is based on the "fix rigid"_fix_rigid.html command, and was
created to be used in place of that fix, to integrate the equations of motion
of spherical rigid bodies when a lattice-Boltzmann fluid is present with a user-specified value of the force-coupling constant.
The fix uses the integration algorithm described in "Mackay et al."_#Mackay &#91;1&#93; to update
the positions, velocities, and orientations of a set of spherical rigid bodies experiencing
velocity dependent hydrodynamic forces. The spherical bodies are assumed to rotate as
solid, uniform density spheres, with moments of inertia calculated using the combined sum of the masses
of all the constituent particles (which are assumed to be point particles).
:line
By default, all of the atoms that this fix acts on experience a hydrodynamic force due to the
presence of the lattice-Boltzmann fluid. However, the {innerNodes} keyword allows the user
to specify atoms belonging to a rigid object which do not interact with the lattice-Boltzmann
fluid (i.e. these atoms do not feel a hydrodynamic force from the lattice-Boltzmann fluid).
This can be used to distinguish between atoms on the surface of a non-porous object, and
those on the inside.
This feature can be used, for example, when implementing a hard sphere interaction
between two spherical objects. Instead of interactions occurring between the particles on
the surfaces of the two spheres, it is desirable simply to place an atom at the center of
each sphere, which does not contribute to the hydrodynamic force, and have these central
atoms interact with one another.
:line
Apart from the features described above, this fix is very similar to the rigid fix (although
it includes fewer optional arguments, and assumes the constituent atoms are point particles); see "fix_rigid"_fix_rigid.html
for a complete documentation.
[Restart, fix_modify, output, run start/stop, minimize info:]
No information about the {rigid} and {rigid/nve} fixes are written to
"binary restart files"_restart.html.
Similar to the "fix_rigid"_fix_rigid.html command:
&quot; The rigid fix computes a global scalar which can be
accessed by various "output commands"_Section_howto.html#howto_15.
The scalar value calculated by these fixes is "intensive". The scalar
is the current temperature of the collection of rigid bodies. This is
averaged over all rigid bodies and their translational and rotational
degrees of freedom. The translational energy of a rigid body is 1/2 m
v^2, where m = total mass of the body and v = the velocity of its
center of mass. The rotational energy of a rigid body is 1/2 I w^2,
where I = the moment of inertia tensor of the body and w = its angular
velocity. Degrees of freedom constrained by the {force} and {torque}
keywords are removed from this calculation.&quot;
&quot;All of these fixes compute a global array of values which can be
accessed by various "output commands"_Section_howto.html#howto_15.
The number of rows in the array is equal to the number of rigid
bodies. The number of columns is 15. Thus for each rigid body, 15
values are stored: the xyz coords of the center of mass (COM), the xyz
components of the COM velocity, the xyz components of the force acting
on the COM, the xyz components of the torque acting on the COM, and
the xyz image flags of the COM, which have the same meaning as image
flags for atom positions (see the "dump" command). The force and
torque values in the array are not affected by the {force} and
{torque} keywords in the fix rigid command; they reflect values before
any changes are made by those keywords.
The ordering of the rigid bodies (by row in the array) is as follows.
For the {single} keyword there is just one rigid body. For the
{molecule} keyword, the bodies are ordered by ascending molecule ID.
For the {group} keyword, the list of group IDs determines the ordering
of bodies.
The array values calculated by these fixes are "intensive", meaning
they are independent of the number of atoms in the simulation.
No parameter of these fixes can be used with the {start/stop} keywords
of the "run"_run.html command. These fixes are not invoked during
"energy minimization"_minimize.html. &quot;
[Restrictions:]
Can only be used if a lattice-Boltzmann fluid has been created via the
"fix lb/fluid"_fix_lb_fluid.html command, and must come after this command.
Should only be used if the force coupling constant used in "fix lb/fluid"_fix_lb_fluid.html has been set by the user; this integration fix cannot be used if the force coupling constant is set by default.
This fix can only be used if LAMMPS was built with the
"fluid" package. See the "Making
LAMMPS"_Section_start.html#2_3 section for more info on packages.
[Related commands:]
"fix lb/fluid"_fix_lb_fluid.html, "fix lb/pc"_fix_lb_pc.html
[Default:]
The defaults are force * on on on, and torque * on on on.
:line
:link(Mackay)
[&#91;1&#93; (Mackay et al.)] Mackay, F. E., Ollila, S.T.T., and Denniston, C., Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 184 (2013) 2021-2031.

94
doc/fix_lb_viscous.html Normal file
View File

@ -0,0 +1,94 @@
<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 lb/viscous command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID lb/viscous
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
<PRE>lb/viscous = style name of this fix command
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<P>fix 1 flow lb/viscous
</P>
<P><B>Description:</B>
</P>
<P>This fix is similar to the <A HREF = "fix_viscous.html">fix viscous</A> command, and
is to be used in place of that command when a lattice-Boltzmann fluid
is present, and the user wishes to integrate the particle motion using
one of the built in LAMMPS integrators.
</P>
<P>This fix adds a force, F = - Gamma*(velocity-fluid_velocity), to each
atom, where Gamma is the force coupling constant described in the
<A HREF = "fix_lb_fluid.html">fix lb/fluid</A> command (which applies an equal and opposite
force to the fluid).
</P>
<P>IMPORTANT NOTE: This fix should only be used in conjunction with one of the
built in LAMMPS integrators; it should not be used with the
<A HREF = "fix_lb_pc.html">fix lb/pc</A> or <A HREF = "fix_lb_rigid_pc_sphere.html">fix lb/rigid/pc/sphere</A> integrators,
which already include the hydrodynamic forces. These latter fixes should only be used if the force coupling constant has been set by the user (instead of using the default value); if the default force coupling value is used, then this fix provides the only method for adding the hydrodynamic forces to the particles.
</P>
<HR>
<P>For further details, as well as descriptions and results of several test runs,
see <A HREF = "#Mackay">Mackay et al.</A> &#91;1&#93; . Please include a citation to this
paper if this fix is used in work contributing to published research.
</P>
<HR>
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
</P>
<P>As described in the <A HREF = "fix_viscous.html">fix viscous</A> documentation:
</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. No global or per-atom quantities are stored
by this fix for access by various <A HREF = "Section_howto.html#howto_15">output
commands</A>. No parameter of this fix can
be used with the <I>start/stop</I> keywords of the <A HREF = "run.html">run</A> command.
</P>
<P>The forces due to this fix are imposed during an energy minimization,
invoked by the <A HREF = "minimize.html">minimize</A> command. This fix should only
be used with damped dynamics minimizers that allow for
non-conservative forces. See the <A HREF = "min_style.html">min_style</A> command
for details."
</P>
<P><B>Restrictions:</B>
</P>
<P>Can only be used if a lattice-Boltzmann fluid has been created via the
<A HREF = "fix_lb_fluid.html">fix lb/fluid</A> command, and must come after this command.
</P>
<P>This fix should not be used if either the <A HREF = "fix_lb_pc.html">fix lb/pc</A> or
<A HREF = "fix_lb_rigid_pc_sphere.html">fix lb/rigid/pc/sphere</A> integrator is used.
</P>
<P> This fix can only be used if LAMMPS was built with the
"fluid" package. See the <A HREF = "Section_start.html#2_3">Making
LAMMPS</A> section for more info on packages.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_lb_fluid.html">fix lb/fluid</A>, <A HREF = "fix_lb_pc.html">fix lb/pc</A>, <A HREF = "fix_lb_rigid_pc_sphere.html">fix lb/rigid/pc/sphere</A>
</P>
<P><B>Default:</B> none
</P>
<HR>
<A NAME = "Mackay"></A>
<P><B>&#91;1&#93; (Mackay et al.)</B> Mackay, F. E., Ollila, S.T.T., and Denniston, C., Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 184 (2013) 2021-2031.
</P>
</HTML>

87
doc/fix_lb_viscous.txt Executable file
View File

@ -0,0 +1,87 @@
"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 lb/viscous command :h3
[Syntax:]
fix ID group-ID lb/viscous :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l
lb/viscous = style name of this fix command :pre
:ule
[Examples:]
fix 1 flow lb/viscous
[Description:]
This fix is similar to the "fix viscous"_fix_viscous.html command, and
is to be used in place of that command when a lattice-Boltzmann fluid
is present, and the user wishes to integrate the particle motion using
one of the built in LAMMPS integrators.
This fix adds a force, F = - Gamma*(velocity-fluid_velocity), to each
atom, where Gamma is the force coupling constant described in the
"fix lb/fluid"_fix_lb_fluid.html command (which applies an equal and opposite
force to the fluid).
IMPORTANT NOTE: This fix should only be used in conjunction with one of the
built in LAMMPS integrators; it should not be used with the
"fix lb/pc"_fix_lb_pc.html or "fix lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html integrators,
which already include the hydrodynamic forces. These latter fixes should only be used if the force coupling constant has been set by the user (instead of using the default value); if the default force coupling value is used, then this fix provides the only method for adding the hydrodynamic forces to the particles.
:line
For further details, as well as descriptions and results of several test runs,
see "Mackay et al."_#Mackay &#91;1&#93; . Please include a citation to this
paper if this fix is used in work contributing to published research.
:line
[Restart, fix_modify, output, run start/stop, minimize info:]
As described in the "fix viscous"_fix_viscous.html documentation:
"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. No global or per-atom quantities are stored
by this fix for access by various "output
commands"_Section_howto.html#howto_15. No parameter of this fix can
be used with the {start/stop} keywords of the "run"_run.html command.
The forces due to this fix are imposed during an energy minimization,
invoked by the "minimize"_minimize.html command. This fix should only
be used with damped dynamics minimizers that allow for
non-conservative forces. See the "min_style"_min_style.html command
for details."
[Restrictions:]
Can only be used if a lattice-Boltzmann fluid has been created via the
"fix lb/fluid"_fix_lb_fluid.html command, and must come after this command.
This fix should not be used if either the "fix lb/pc"_fix_lb_pc.html or
"fix lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html integrator is used.
This fix can only be used if LAMMPS was built with the
"fluid" package. See the "Making
LAMMPS"_Section_start.html#2_3 section for more info on packages.
[Related commands:]
"fix lb/fluid"_fix_lb_fluid.html, "fix lb/pc"_fix_lb_pc.html, "fix lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html
[Default:] none
:line
:link(Mackay)
[&#91;1&#93; (Mackay et al.)] Mackay, F. E., Ollila, S.T.T., and Denniston, C., Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 184 (2013) 2021-2031.

View File

@ -61,7 +61,8 @@ Optimization (Procedure 3.1 on p 41).
The "minimization styles"_min_style.html {quickmin} and {fire} perform
damped dynamics using an Euler integration step. Thus they require a
"timestep"_timestep.html be defined, typically the same value used for
"running dynamics"_run.html with the system.
"running dynamics"_run.html with the system, though it may be more
efficient to use a larger timestep.
The objective function being minimized is the total potential energy
of the system as a function of the N atom coordinates:
@ -124,7 +125,7 @@ freedom, such as from the "fix box/relax"_fix_box_relax.html command.
Following minimization, a statistical summary is printed that lists
which convergence criterion caused the minimizer to stop, as well as
information about the energy, force, final line search, and and
information about the energy, force, final line search, and
iteration counts. An example is as follows:
Minimization stats:

View File

@ -12,7 +12,7 @@ units command :h3
units style :pre
style = {lj} or {real} or {metal} or {si} or {cgs} or {electron} :ul
style = {lj} or {real} or {metal} or {si} or {cgs} or {electron} or {micro} or {nano} :ul
[Examples:]
@ -142,6 +142,40 @@ charge = multiple of electron charge (+1.0 is a proton)
dipole moment = Debye
electric field = volts/cm :ul
For style {micro}, these are the units:
mass = picograms
distance = micrometers
time = microseconds
energy = picogram-micrometer^2/microsecond^2
velocity = micrometers/microsecond
force = picogram-micrometer/microsecond^2
torque = picogram-micrometer^2/microsecond^2
temperature = Kelvin
pressure = picogram/(micrometer-microsecond^2)
dynamic viscosity = picogram/(micrometer-microsecond)
charge = picocoulombs
dipole = picocoulomb-micrometer
electric field = volt/micrometer
density = picograms/micrometer^dim :ul
For style {nano}, these are the units:
mass = attograms
distance = nanometers
time = nanoseconds
energy = attogram-nanometer^2/nanosecond^2
velocity = nanometers/nanosecond
force = attogram-nanometer/nanosecond^2
torque = attogram-nanometer^2/nanosecond^2
temperature = Kelvin
pressure = attogram/(nanometer-nanosecond^2)
dynamic viscosity = attogram/(nanometer-nanosecond)
charge = multiple of electron charge (+1.0 is a proton)
dipole = charge-nanometer
electric field = volt/nanometer
density = attograms/nanometer^dim :ul
The units command also sets the timestep size and neighbor skin
distance to default values for each style:
@ -150,7 +184,9 @@ For style {real} these are dt = 1.0 fmsec and skin = 2.0 Angstroms.
For style {metal} these are dt = 0.001 psec and skin = 2.0 Angstroms.
For style {si} these are dt = 1.0e-8 sec and skin = 0.001 meters.
For style {cgs} these are dt = 1.0e-8 sec and skin = 0.1 cm.
For style {electron} these are dt = 0.001 fmsec and skin = 2.0 Bohr. :ul
For style {electron} these are dt = 0.001 fmsec and skin = 2.0 Bohr.
For style {micro} these are dt = 2.0 microsec and skin = 0.1 micrometers.
For style {nano} these are dt = 0.00045 nanosec and skin = 0.1 nanometers. :ul
[Restrictions:]