Merge pull request #3167 from CDenniston/develop

Update LATBOLTZ package to new version
This commit is contained in:
Axel Kohlmeyer
2022-03-16 12:22:48 -04:00
committed by GitHub
63 changed files with 10485 additions and 198096 deletions

View File

@ -97,8 +97,6 @@ OPT.
* :doc:`latte <fix_latte>`
* :doc:`lb/fluid <fix_lb_fluid>`
* :doc:`lb/momentum <fix_lb_momentum>`
* :doc:`lb/pc <fix_lb_pc>`
* :doc:`lb/rigid/pc/sphere <fix_lb_rigid_pc_sphere>`
* :doc:`lb/viscous <fix_lb_viscous>`
* :doc:`lineforce <fix_lineforce>`
* :doc:`manifoldforce <fix_manifoldforce>`

View File

@ -240,8 +240,6 @@ accelerated styles exist.
* :doc:`latte <fix_latte>` - wrapper on LATTE density-functional tight-binding code
* :doc:`lb/fluid <fix_lb_fluid>` -
* :doc:`lb/momentum <fix_lb_momentum>` -
* :doc:`lb/pc <fix_lb_pc>` -
* :doc:`lb/rigid/pc/sphere <fix_lb_rigid_pc_sphere>` -
* :doc:`lb/viscous <fix_lb_viscous>` -
* :doc:`lineforce <fix_lineforce>` - constrain atoms to move in a line
* :doc:`manifoldforce <fix_manifoldforce>` - restrain atoms to a manifold during minimization

View File

@ -12,55 +12,63 @@ Syntax
* ID, group-ID are documented in :doc:`fix <fix>` command
* lb/fluid = style name of this fix command
* nevery = update the lattice-Boltzmann fluid every this many timesteps
* LBtype = 1 to use the standard finite difference LB integrator,
2 to use the LB integrator of :ref:`Ollila et al. <Ollila>`
* nevery = update the lattice-Boltzmann fluid every this many timesteps (should normally be 1)
* viscosity = the fluid viscosity (units of mass/(time\*length)).
* density = the fluid density.
* zero or more keyword/value pairs may be appended
* 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*
* keyword = *dx* or *dm* or *noise* or *stencil* or *read_restart* or *write_restart* or *zwall_velocity* or *pressurebcx* or *bodyforce* or *D3Q19* or *dumpxdmf* or *dof* or *scaleGamma* or *a0* or *npits* or *wp* or *sw*
.. parsed-literal::
*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).
*stencil* values = 2 (trilinear stencil, the default), 3 (3-point immersed boundary stencil), or 4 (4-point Keys' interpolation stencil)
*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).
*pressurebcx* values = pgradav = imposes a pressure jump at the (periodic) x-boundary of pgradav*Lx*1000.
*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.
*D3Q19* values = none (used to switch from the default D3Q15, 15 velocity lattice, to the D3Q19, 19 velocity lattice).
*dumpxdmf* values = N file timeI
N = output the force and torque every N timesteps
file = output file name
timeI = 1 (use simulation time to index xdmf file), 0 (use output frame number to index xdmf file)
*dof* values = dof = specify the number of degrees of freedom for temperature calculation
*scaleGamma* values = type gammaFactor
type = atom type (1-N)
gammaFactor = factor to scale the *setGamma* gamma value by, for the specified atom type.
*a0* values = a_0_real = the square of the speed of sound in the fluid.
*npits* values = npits h_p l_p l_pp l_e
npits = number of pit regions
h_p = z-height of pit regions (floor to bottom of slit)
l_p = x-length of pit regions
l_pp = x-length of slit regions between consecutive pits
l_e = x-length of slit regions at ends
*wp* values = w_p = y-width of slit regions (defaults to full width if not present or if sw active)
*sw* values = none (turns on y-sidewalls (in xz plane) if npits option active)
Examples
""""""""
.. code-block:: LAMMPS
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
fix 1 all lb/fluid 1 1.0 0.0009982071 dx 1.2 dm 0.001
fix 1 all lb/fluid 1 1.0 0.0009982071 dx 1.2 dm 0.001 noise 300.0 2761
fix 1 all lb/fluid 1 1.0 1.0 dx 4.0 dm 10.0 dumpxdmf 500 fflow 0 pressurebcx 0.01 npits 2 20 40 5 0 wp 30
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.
Implement a lattice-Boltzmann fluid on a uniform mesh covering the
LAMMPS simulation domain. Note that this fix was updated in 2021 and is
not backward compatible with the previous version. If you need the
previous version, please download an older version of LAMMPS. 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,
@ -86,28 +94,23 @@ respectively. Here, we have implemented
\sigma_{\alpha \beta} = -P_{\alpha \beta} = -\rho a_0 \delta_{\alpha \beta}
with :math:`a_0` set to :math:`\frac{1}{3} \frac{dx}{dt}^2` by default.
You should not normally need to change this 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,
distribution functions which evolve according to a velocity discretized
version of the Boltzmann equation,
.. math::
\left(\partial_t + e_{i\alpha}\partial_{\alpha}\right)f_i = -\frac{1}{\tau}\left(f_i - f_i^{eq}\right) + W_i
where the first term on the right hand side represents a single time
relaxation towards the equilibrium distribution function, and :math:`\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 :ref:`Ollila et al. <Ollila>` is used.
Physical variables are then defined in terms of moments of the distribution
functions,
relaxation towards the equilibrium distribution function, and
:math:`\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. Physical variables are then
defined in terms of moments of the distribution functions,
.. math::
@ -115,7 +118,7 @@ functions,
\rho u_{\alpha} = & \displaystyle\sum\limits_{i} f_i e_{i\alpha}
Full details of the lattice-Boltzmann algorithm used can be found in
:ref:`Mackay et al. <fluid-Mackay>`.
:ref:`Denniston et al. <fluid-Denniston>`.
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
@ -127,92 +130,66 @@ calculated as:
{\bf F}_{j \alpha} = \gamma \left({\bf v}_n - {\bf u}_f \right) \zeta_{j\alpha}
where :math:`\mathbf{v}_n` is the velocity of the MD particle,
:math:`\mathbf{u}_f` is the fluid
velocity interpolated to the particle location, and :math:`\gamma` is the force
coupling constant. :math:`\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*\ .
:math:`\mathbf{u}_f` is the fluid velocity interpolated to the particle
location, and :math:`\gamma` is the force coupling constant. This
force, as with most forces in LAMMPS, and hence the velocities, are
calculated at the half-time step. :math:`\zeta` is a weight assigned to
the grid point, obtained by distributing the particle to the nearest
lattice sites.
By default, the force coupling constant, :math:`\gamma`, is calculated
The force coupling constant, :math:`\gamma`, is calculated
according to
.. math::
\gamma = \frac{2m_um_v}{m_u+m_v}\left(\frac{1}{\Delta t_{collision}}\right)
\gamma = \frac{2m_um_v}{m_u+m_v}\left(\frac{1}{\Delta t}\right)
Here, :math:`m_v` is the mass of the MD particle, :math:`m_u` is a
representative fluid mass at the particle location, and :math:`\Delta
t_{collision}` is a collision time, chosen such that
:math:`\frac{\tau}{\Delta t_{collision}} = 1` (see :ref:`Mackay and
Denniston <Mackay2>` for full details). In order to calculate :math:`m_u`,
the fluid density is interpolated to the MD particle location, and
multiplied by a volume, node_area * :math:`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 :math:`dx_{LB}^2`; 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 :ref:`Mackay et al. <fluid-Mackay>` for a
detailed description of the method by which the user can choose an
appropriate :math:`\gamma` value.
representative fluid mass at the particle location, and :math:`\Delta t`
is the time step. The fluid mass :math:`m_u` that the MD particle
interacts with is calculated internally. This coupling is chosen to
constrain the particle and associated fluid velocity to match at the end
of the time step. As with other constraints, such as :doc:`shake
<fix_shake>`, this constraint can remove degrees of freedom from the
simulation which are accounted for internally in the algorithm.
.. 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 :doc:`lb/viscous <fix_lb_viscous>` 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
:ref:`Mackay et al. <fluid-Mackay>`, the built-in LAMMPS integrators may prove to
be unstable. Therefore, we have included our own integrators
:doc:`fix lb/rigid/pc/sphere <fix_lb_rigid_pc_sphere>`, and
:doc:`fix lb/pc <fix_lb_pc>`, to solve for the particle motion in these
cases. These integrators should not be used with the
:doc:`lb/viscous <fix_lb_viscous>` 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.
.. note::
if the force coupling constant is set using the default method,
and the :doc:`lb/viscous <fix_lb_viscous>` fix is NOT used to add the
While this fix applies the force of the particles on the fluid, it
does not apply the force of the fluid to the particles. There is
only one option to include this hydrodynamic force on the particles,
and that is through the use of the :doc:`lb/viscous <fix_lb_viscous>`
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. If the
:doc:`lb/viscous <fix_lb_viscous>` 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).
In this case, setting *scaleGamma* to -1 for the corresponding
particle type will explicitly take this limit (of infinite particle
mass) in computing the force coupling for the fluid force.
----------
Inside the fix, parameters are scaled by the lattice-Boltzmann
Physical parameters describing the fluid are specified through
*viscosity* and *density*. 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.
The *dx* keyword allows the user to specify a value for the LB grid
spacing and the *dm* keyword allows the user to specify the LB mass
unit. Inside the fix, parameters are scaled by the lattice-Boltzmann
timestep, :math:`dt_{LB}`, grid spacing, :math:`dx_{LB}`, and mass unit,
:math:`dm_{LB}`. :math:`dt_{LB}` is set equal to
:math:`\mathrm{nevery}\cdot dt_{MD}`, where :math:`dt_{MD}` is the MD timestep.
By default,
:math:`dm_{LB}` is set equal to 1.0, and :math:`dx_{LB}` is chosen so that
:math:`\frac{\tau}{dt} = \frac{3\eta dt}{\rho dx^2}` is approximately equal to 1.
However, the user has the option of specifying their own values for
:math:`dm_{LB}`, and :math:`dx_{LB}`, by using
the optional keywords *dm*, and *dx* respectively.
:math:`\mathrm{nevery}\cdot dt_{MD}`, where :math:`dt_{MD}` is the MD
timestep. By default, :math:`dm_{LB}` is set equal to 1.0, and
:math:`dx_{LB}` is chosen so that :math:`\frac{\tau}{dt} = \frac{3\eta
dt}{\rho dx^2}` is approximately equal to 1.
.. note::
.. note::
Care must be taken when choosing both a value for :math:`dx_{LB}`,
and a simulation domain size. This fix uses the same subdivision of
@ -223,74 +200,27 @@ the optional keywords *dm*, and *dx* respectively.
with equal lengths in all dimensions, and the default value for
:math:`dx_{LB}` 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.
----------
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 :math:`\frac{4\pi R^2}{N}`.
This keyword should only be used if the force coupling constant,
:math:`\gamma`, is set the default way.
The *setGamma* keyword allows the user to specify their own value for
the force coupling constant, :math:`\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 :math:`\gamma`
values for different atom types. This keyword allows the user to
scale the *setGamma* :math:`\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
:math:`\frac{1}{3}\left(\frac{dx_{LB}}{dt_{LB}}\right)^2`.
Setting :math:`a0 > (\frac{dx_{LB}}{dt_{LB}})^2` is not allowed,
as this may lead to instabilities.
If the *noise* keyword is used, followed by 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 :ref:`Adhikari et al. <Adhikari>` is used; however if *LBtype* is set
equal to 2 both the LB integrator, and thermal LB algorithm described
in :ref:`Ollila et al. <Ollila>` are used.
value, and a positive integer random number seed, the thermal LB algorithm
of :ref:`Adhikari et al. <Adhikari>` is 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 *stencil* is used, the value sets the number of
interpolation points used in each direction. For this, the user has the
choice between a trilinear stencil (*stencil* 2), which provides a
support of 8 lattice sites, or the 3-point immersed boundary method
stencil (*stencil* 3), which provides a support of 27 lattice sites, or
the 4-point Keys' interpolation stencil (stencil 4), which provides a
support of 64 lattice sites. The trilinear stencil is the default as it
is better suited for simulation of objects close to walls or other
objects, due to its smaller support. The 3-point stencil provides
smoother motion of the lattice and is suitable for particles not likely
to be to close to walls or other objects.
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 :ref:`Mackay et al. <fluid-Mackay>`.
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.
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.
.. note::
@ -308,19 +238,100 @@ 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 *pressurebcx* keyword is used, a pressure jump (implemented by a
step jump in density) is imposed at the (periodic) x-boundary. The
value set specifies what would be the resulting equilibrium average
pressure gradient in the x-direction if the system had a constant
cross-section (i.e. resistance to flow). It is converted to a pressure
jump by multiplication by the system size in the x-direction. As this
value should normally be quite small, it is also assumed to be scaled
by 1000.
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.
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 *dumpxdmf* keyword is used, followed by a positive integer, N,
and a file name, the fluid densities and velocities at each lattice site
are output to an xdmf file every N timesteps. This is a binary file
format that can be read by visualization packages such as `Paraview
<https://www.paraview.org/>`_ . The xdmf file format contains a time
index for each frame dump and the value timeI = 1 uses simulation time
while 0 uses the output frame number to index xdmf file. The later can
be useful if the :doc:`dump vtk <dump_vtk>` command is used to output
the particle positions at the same timesteps and you want to visualize
both the fluid and particle data together in `Paraview
<https://www.paraview.org/>`_ .
The *scaleGamma* keyword allows the user to scale the :math:`\gamma`
value by a factor, gammaFactor, for a given atom type. Setting
*scaleGamma* to -1 for the corresponding particle type will explicitly
take the limit of infinite particle mass in computing the force coupling
for the fluid force (see note above).
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
:math:`\frac{1}{3}\left(\frac{dx_{LB}}{dt_{LB}}\right)^2`. Setting
:math:`a0 > (\frac{dx_{LB}}{dt_{LB}})^2` is not allowed, as this may
lead to instabilities. As the speed of sound should usually be much
larger than any fluid velocity of interest, its value does not normally
have a significant impact on the results. As such, it is usually best
to use the default for this option.
The *npits* keyword (followed by integer arguments: npits, h_p, l_p,
l_pp, l_e) sets the fluid domain to the pits geometry. These arguments
should only be used if you actually want something more complex than a
rectangular/cubic geometry. The npits value sets the number of pits
regions (arranged along x). The remaining arguments are sizes measured
in multiples of dx_lb: h_p is the z-height of the pit regions, l_p is
the x-length of the pit regions, l_pp is the length of the region
between consecutive pits (referred to as a "slit" region), and l_e is
the x-length of the slit regions at each end of the channel. The pit
geometry must fill the system in the x-direction but can be longer, in
which case it is truncated (which enables asymmetric entrance/exit end
sections). The additional *wp* keyword allows the width (in
y-direction) of the pit to be specified (the default is full width) and
the *sw* keyword indicates that there should be sidewalls in the
y-direction (default is periodic in y-direction). These parameters are
illustrated below::
Sideview (in xz plane) of pit geometry:
______________________________________________________________________
slit slit slit ^
|
<---le---><---------lp-------><---lpp---><-------lp--------><---le---> hs = (Nbz-1) - hp
|
__________ __________ __________ v
| | | | ^ z
| | | | | |
| pit | | pit | hp +-x
| | | | |
|__________________| |__________________| v
Endview (in yz plane) of pit geometry (no sw so wp is active):
_____________________
^
|
hs
|
_____________________ v
| | ^
| | | z
|<---wp--->| hp |
| | | +-y
|__________| v
----------
For further details, as well as descriptions and results of several
test runs, see :ref:`Mackay et al. <fluid-Mackay>`. Please include a citation to
this paper if the lb_fluid fix is used in work contributing to
published research.
For further details, as well as descriptions and results of several test
runs, see :ref:`Denniston et al. <fluid-Denniston>`. Please include a
citation to this paper if the lb_fluid fix is used in work contributing
to published research.
----------
@ -333,68 +344,77 @@ binary restart files, if requested, independent of the main LAMMPS
is written to the main LAMMPS :doc:`binary restart files <restart>`.
None of the :doc:`fix_modify <fix_modify>` options are relevant to this
fix. No global or per-atom quantities are stored by this fix for
access by various :doc:`output commands <Howto_output>`. No parameter
of this fix can be used with the *start/stop* keywords of the
:doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.
fix.
The fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the current
temperature of the group of particles described by *group-ID* along with
the fluid constrained to move with them. The temperature is computed via
the kinetic energy of the group and fluid constrained to move with them
and the total number of degrees of freedom (calculated internally). If
the particles are not integrated independently (such as via :doc:`fix
NVE <fix_nve>`) but have additional constraints imposed on them (such as
via integration using :doc:`fix rigid <fix_rigid>`) the degrees of
freedom removed from these additional constraints will not be properly
accounted for. In this case, the user can specify the total degrees of
freedom independently using the *dof* keyword.
The fix also computes a global array of values which can be accessed by
various :doc:`output commands <Howto_output>`. There are 5 entries in
the array. The first entry is the temperature of the fluid, the second
entry is the total mass of the fluid plus particles, the third through
fifth entries give the x, y, and z total momentum of the fluid plus
particles.
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
This fix is part of the LATBOLTZ package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package <Build_package>` page for more info.
was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
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.
The boundary conditions for the fluid are specified independently to the
particles. However, these should normally be specified consistently via
the main LAMMPS :doc:`boundary <boundary>` command (p p p, p p f, and p
f f are the only consistent possibilities). Shrink-wrapped boundary
conditions are not permitted with this fix.
This fix must be used before any of :doc:`fix lb/viscous <fix_lb_viscous>`, :doc:`fix lb/momentum <fix_lb_momentum>`, :doc:`fix lb/rigid/pc/sphere <fix_lb_rigid_pc_sphere>`, and/ or :doc:`fix lb/pc <fix_lb_pc>` , 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
:doc:`lb/viscous <fix_lb_viscous>` fix if the force coupling constant is
set by default, or either the :doc:`lb/viscous <fix_lb_viscous>` fix or
one of the :doc:`lb/rigid/pc/sphere <fix_lb_rigid_pc_sphere>` or
:doc:`lb/pc <fix_lb_pc>` integrators, if the user chooses to specify
their own value for the force coupling constant.
This fix must be used before any of :doc:`fix lb/viscous
<fix_lb_viscous>` and :doc:`fix lb/momentum <fix_lb_momentum>` 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
:doc:`lb/viscous <fix_lb_viscous>` fix.
This fix needs to be used in conjunction with a standard LAMMPS
integrator such as :doc:`fix NVE <fix_nve>` or :doc:`fix rigid
<fix_rigid>`.
Related commands
""""""""""""""""
:doc:`fix lb/viscous <fix_lb_viscous>`, :doc:`fix lb/momentum <fix_lb_momentum>`, :doc:`fix lb/rigid/pc/sphere <fix_lb_rigid_pc_sphere>`, :doc:`fix lb/pc <fix_lb_pc>`
:doc:`fix lb/viscous <fix_lb_viscous>`, :doc:`fix lb/momentum <fix_lb_momentum>`
Default
"""""""
By default, the force coupling constant is set according to
.. math::
\gamma = \frac{2m_um_v}{m_u+m_v}\left(\frac{1}{\Delta t_{collision}}\right)
and an area of :math:`dx_{LB}^2` per node, used to calculate the fluid mass at
the particle node location, is assumed.
*dx* is chosen such that :math:`\frac{\tau}{dt_{LB}} =
\frac{3\eta dt_{LB}}{\rho dx_{LB}^2}` is approximately equal to 1.
*dx* is chosen such that :math:`\frac{\tau}{dt_{LB}} = \frac{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 :math:`\frac{1}{3}\left(\frac{dx_{LB}}{dt_{LB}}\right)^2`.
The Peskin stencil is used as the default interpolation method.
The trilinear 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.
----------
.. _Ollila:
.. _fluid-Denniston:
**(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.
.. _fluid-Mackay:
**(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.
**(Denniston et al.)** Denniston, C., Afrasiabian, N., Cole-Andre, M.G., Mackay, F. E., Ollila, S.T.T., and Whitehead, T., LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 275 (2022) `108318 <https://doi.org/10.1016/j.cpc.2022.108318>`_ .
.. _Mackay2:
@ -403,3 +423,4 @@ If walls are present, they are assumed to be stationary.
.. _Adhikari:
**(Adhikari et al.)** Adhikari, R., Stratford, K., Cates, M. E., and Wagner, A. J., Fluctuating lattice Boltzmann, Europhys. Lett. 71 (2005) 473-479.

View File

@ -38,7 +38,7 @@ 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
timesteps. If there are no atoms specified by group-ID only the fluid momentum is affected. This is accomplished by adjusting the particle velocities
and the fluid velocities at each lattice site.
.. note::

View File

@ -1,65 +0,0 @@
.. index:: fix lb/pc
fix lb/pc command
=================
Syntax
""""""
.. parsed-literal::
fix ID group-ID lb/pc
* ID, group-ID are documented in the :doc:`fix <fix>` command
* lb/pc = style name of this fix command
Examples
""""""""
.. code-block:: LAMMPS
fix 1 all lb/pc
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 :ref:`Mackay et al. <Mackay1>`. This integration algorithm should only be used if a
user-specified value for the force-coupling constant used in :doc:`fix lb/fluid <fix_lb_fluid>` 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 :doc:`binary restart files <restart>`. None of the :doc:`fix_modify <fix_modify>` options
are relevant to this fix. No global or per-atom quantities are stored
by this fix for access by various :doc:`output commands <Howto_output>`.
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
This fix is part of the LATBOLTZ package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package <Build_package>` page for more info.
Can only be used if a lattice-Boltzmann fluid has been created via the
:doc:`fix lb/fluid <fix_lb_fluid>` command, and must come after this
command.
Related commands
""""""""""""""""
:doc:`fix lb/fluid <fix_lb_fluid>` :doc:`fix lb/rigid/pc/sphere <fix_lb_rigid_pc_sphere>`
Default
"""""""
none.
----------
.. _Mackay1:
**(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

@ -1,167 +0,0 @@
.. index:: fix lb/rigid/pc/sphere
fix lb/rigid/pc/sphere command
==============================
Syntax
""""""
.. parsed-literal::
fix ID group-ID lb/rigid/pc/sphere bodystyle args keyword values ...
* ID, group-ID are documented in :doc:`fix <fix>` command
* lb/rigid/pc/sphere = style name of this fix command
* bodystyle = *single* or *molecule* or *group*
.. parsed-literal::
*single* args = none
*molecule* args = none
*group* args = N groupID1 groupID2 ...
N = # of groups
* zero or more keyword/value pairs may be appended
* keyword = *force* or *torque* or *innerNodes*
.. parsed-literal::
*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
Examples
""""""""
.. code-block:: LAMMPS
fix 1 spheres lb/rigid/pc/sphere
fix 1 all lb/rigid/pc/sphere force 1 0 0 innerNodes ForceAtoms
Description
"""""""""""
This fix is based on the :doc:`fix rigid <fix_rigid>` 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 :ref:`Mackay et
al. <Mackay>` 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).
----------
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.
----------
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
:doc:`fix rigid <fix_rigid>` 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
:doc:`binary restart files <restart>`.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution due to the added forces on atoms to
both the global pressure and per-atom stress of the system via the
:doc:`compute pressure <compute_pressure>` and :doc:`compute
stress/atom <compute_stress_atom>` commands. The former can be
accessed by :doc:`thermodynamic output <thermo_style>`. The default
setting for this fix is :doc:`fix_modify virial yes <fix_modify>`.
Similar to the :doc:`fix rigid <fix_rigid>` command: The rigid fix
computes a global scalar which can be accessed by various :doc:`output
commands <Howto_output>`. 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.
All of these fixes compute a global array of values which can be
accessed by various :doc:`output commands <Howto_output>`. 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 :doc:`run <run>` command. These fixes are not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
This fix is part of the LATBOLTZ package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
Can only be used if a lattice-Boltzmann fluid has been created via the
:doc:`fix lb/fluid <fix_lb_fluid>` command, and must come after this
command. Should only be used if the force coupling constant used in
:doc:`fix lb/fluid <fix_lb_fluid>` has been set by the user; this
integration fix cannot be used if the force coupling constant is set
by default.
Related commands
""""""""""""""""
:doc:`fix lb/fluid <fix_lb_fluid>`, :doc:`fix lb/pc <fix_lb_pc>`
Default
"""""""
The defaults are force \* on on on, and torque \* on on on.
----------
.. _Mackay:
**(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

@ -25,27 +25,14 @@ Description
This fix is similar to the :doc:`fix viscous <fix_viscous>` 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.
is present using the :doc:`fix lb/fluid <fix_lb_fluid>`. This should be used in conjunction with one of the built-in LAMMPS integrators, such as :doc:`fix NVE <fix_nve>` or :doc:`fix rigid <fix_rigid>`.
This fix adds a force, F = - Gamma\*(velocity-fluid_velocity), to each
atom, where Gamma is the force coupling constant described in the :doc:`fix lb/fluid <fix_lb_fluid>` command (which applies an equal and
opposite force to the fluid).
.. note::
This fix should only be used in conjunction with one of the
built in LAMMPS integrators; it should not be used with the :doc:`fix lb/pc <fix_lb_pc>` or :doc:`fix lb/rigid/pc/sphere <fix_lb_rigid_pc_sphere>` 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.
This fix adds a viscous force to each atom to cause it move with the same velocity as the fluid (an equal and opposite force is applied to the fluid via :doc:`fix lb/fluid <fix_lb_fluid>`). When :doc:`fix lb/fluid <fix_lb_fluid>` is called with the noise option, the atoms will also experience random forces which will thermalize them to the same temperature as the fluid. In this way, the combination of this fix with :doc:`fix lb/fluid <fix_lb_fluid>` and a LAMMPS integrator like :doc:`fix NVE <fix_nve>` is analogous to :doc:`fix langevin <fix_langevin>` except here the fluid is explicit. The temperature of the particles can be monitored via the scalar output of :doc:`fix lb/fluid <fix_lb_fluid>`.
----------
For further details, as well as descriptions and results of several
test runs, see :ref:`Mackay et al. <Mackay3>`. Please include a citation to
For details of this fix, as well as descriptions and results of several
test runs, see :ref:`Denniston et al. <fluid-Denniston2>`. Please include a citation to
this paper if this fix is used in work contributing to published
research.
@ -78,14 +65,11 @@ Can only be used if a lattice-Boltzmann fluid has been created via the
:doc:`fix lb/fluid <fix_lb_fluid>` command, and must come after this
command.
This fix should not be used if either the :doc:`fix lb/pc <fix_lb_pc>`
or :doc:`fix lb/rigid/pc/sphere <fix_lb_rigid_pc_sphere>` integrator is
used.
Related commands
""""""""""""""""
:doc:`fix lb/fluid <fix_lb_fluid>`, :doc:`fix lb/pc <fix_lb_pc>`, :doc:`fix lb/rigid/pc/sphere <fix_lb_rigid_pc_sphere>`
:doc:`fix lb/fluid <fix_lb_fluid>`
Default
"""""""
@ -94,6 +78,6 @@ none
----------
.. _Mackay3:
.. _fluid-Denniston2:
**(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.
**(Denniston et al.)** Denniston, C., Afrasiabian, N., Cole-Andre, M.G., Mackay, F. E., Ollila, S.T.T., and Whitehead, T., LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 275 (2022) `108318 <https://doi.org/10.1016/j.cpc.2022.108318>`_ .

View File

@ -42,6 +42,7 @@ advect
advection
advects
affine
Afrasiabian
Afshar
agilio
Agilio
@ -2291,6 +2292,7 @@ Nmin
Nmols
nn
nnodes
npits
nO
Nocedal
nocite
@ -3319,6 +3321,7 @@ THz
Tigran
Tij
Tildesley
timeI
timespan
timestamp
timestamps
@ -3658,6 +3661,7 @@ xcm
Xcm
Xcode
xCORE
xdmf
Xeon
xflag
xhi

View File

@ -6,10 +6,10 @@
# 280 x 280 x 101 lattice-Boltzmann grid sites. #
# #
# This simulation is used to illustrate the simulation time of a realistic #
# implementation of the lb_fluid fix. #
# implementation of the lb/fluid fix. #
# The data file "confinedcolloids.dat" is quite large and so is not #
# included here. It can be obtained from: #
# http://www.apmaths.uwo.ca/~cdennist/confinedcolloids.dat.gz #
# http://publish.uwo.ca/~cdennist/confinedcolloids.dat.gz #
# #
# Sample output from this run can be found in the file: #
# results64.out #
@ -19,7 +19,10 @@ units micro
dimension 3
boundary p p f
atom_style molecular
read_data confinedcolloids.dat
# try to download
shell test -f confinedcolloids.dat.gz || curl -L -o confinedcolloids.dat.gz http://publish.uwo.ca/~cdennist/confinedcolloids.dat.gz
read_data confinedcolloids.dat.gz
mass * 0.00010287
@ -62,23 +65,18 @@ pair_coeff * * 0.0 0.0 1.572
pair_coeff 1 1 10.0 1.400492785 1.572
pair_modify shift yes
timestep 0.0006
timestep 0.001
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particles specified through FluidAtoms
# (however, this fix does not explicitly apply a force back on to these
# particles...this is accomplished through the use of the viscous_lb fix).
# Use the standard LB integration scheme, a fluid density = 1.0,
# fluid viscosity = 1.0, lattice spacing dx=0.06, and mass unit, dm=0.00003.
# Use the default method to calculate the interaction force between the
# particles and the fluid. This calculation makes use of the surface area
# of the composite object represented by each particle node. Since this is
# not equal to dx*dx, it is input through the setArea keyword (i.e.
# particles of type 2 correspond to a surface area of 0.0018337299).
# Implement walls moving at speeds of 20.0 in opposite directions.
# particles...this is accomplished through the use of the lb/viscous fix).
# Use a fluid density = 1.0, fluid viscosity = 1.0, (water at STP) and a
# lattice spacing dx=0.06.
# Implement top/bottomw walls moving at speeds of 20.0 in opposite directions
#----------------------------------------------------------------------------
fix 1 FluidAtoms lb/fluid 1 1 1.0 1.0 dx 0.06 dm 0.00003 setArea 2 0.0018337299 zwall_velocity -20.0 20.0
fix 1 FluidAtoms lb/fluid 1 1.0 1.0 dx 0.06 zwall_velocity -20.0 20.0
#----------------------------------------------------------------------------
# Apply the force due to the fluid onto the FluidAtoms particles (again,
@ -105,4 +103,7 @@ fix walllo ForceAtoms wall/lj126 zlo 0.0 20.0 0.8071542386 0.906 units box
#dump ParticleTracking ForceAtoms custom 50 test.track id mol x y z vx vy vz
run 400
thermo 50
#run 400
run 100

View File

@ -0,0 +1,190 @@
LAMMPS (17 Feb 2022)
#===========================================================================#
# System of colloidal particles under shear. #
# #
# Run consists of 10x12x4 particles, each composed of 3613 particle nodes #
# (3612 particles forming a spherical shell, and 1 central particle). #
# 280 x 280 x 101 lattice-Boltzmann grid sites. #
# #
# This simulation is used to illustrate the simulation time of a realistic #
# implementation of the lb/fluid fix. #
# The data file "confinedcolloids.dat" is quite large and so is not #
# included here. It can be obtained from: #
# http://publish.uwo.ca/~cdennist/confinedcolloids.dat.gz #
# #
# Sample output from this run can be found in the file: #
# results64.out #
#===========================================================================#
units micro
dimension 3
boundary p p f
atom_style molecular
read_data confinedcolloids.dat
Reading data file ...
orthogonal box = (0 0 0) to (16.8 16.8 6)
2 by 2 by 1 MPI processor grid
reading atoms ...
1734240 atoms
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
0 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
special bonds CPU = 0.372 seconds
read_data CPU = 34.950 seconds
mass * 0.00010287
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 0.03 bin
neigh_modify delay 0 every 1
neigh_modify exclude type 2 2
neigh_modify exclude type 2 1
#----------------------------------------------------------------------------
# ForceAtoms are the particles at the center of each colloidal object which
# do not interact with the fluid, but are used to implement the hard-sphere
# interactions.
#----------------------------------------------------------------------------
group ForceAtoms type 1
480 atoms in group ForceAtoms
#----------------------------------------------------------------------------
# FluidAtoms are the particles representing the surface of the colloidal
# object which do interact with the fluid.
#----------------------------------------------------------------------------
group FluidAtoms type 2
1733760 atoms in group FluidAtoms
#----------------------------------------------------------------------------
# Implement a hard-sphere interaction between the particles at the center of
# each colloidal object (use a truncated and shifted Lennard-Jones
# potential).
#----------------------------------------------------------------------------
pair_style lj/cut 1.572
pair_coeff * * 0.0 0.0 1.572
pair_coeff 1 1 10.0 1.400492785 1.572
pair_modify shift yes
timestep 0.001
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particles specified through FluidAtoms
# (however, this fix does not explicitly apply a force back on to these
# particles...this is accomplished through the use of the lb/viscous fix).
# Use a fluid density = 1.0, fluid viscosity = 1.0, (water at STP) and a
# lattice spacing dx=0.06.
# Implement top/bottomw walls moving at speeds of 20.0 in opposite directions
#----------------------------------------------------------------------------
fix 1 FluidAtoms lb/fluid 1 1.0 1.0 dx 0.06 zwall_velocity -20.0 20.0
Using a lattice-Boltzmann grid of 280 by 280 by 101 total grid points. (../fix_lb_fluid.cpp:486)
Local Grid Geometry created. (../fix_lb_fluid.cpp:1018)
#----------------------------------------------------------------------------
# Apply the force due to the fluid onto the FluidAtoms particles (again,
# these atoms represent the surface of the colloidal object, which should
# interact with the fluid).
#----------------------------------------------------------------------------
fix 2 FluidAtoms lb/viscous
#----------------------------------------------------------------------------
# Each colloidal object (spherical shell of particles and central particle)
# is specified as a separate molecule in the confinedcolloids.dat data
# file. Integrate the motion of each of these sets of particles as rigid
# objects which move and rotate together.
#----------------------------------------------------------------------------
fix 3 all rigid molecule
480 rigid bodies with 1734240 atoms
#----------------------------------------------------------------------------
# Implement a repulsive interaction between the ForceAtoms particles, and the
# upper and lower z-walls. (A truncated and shifted Lennard-Jones potential
# is used).
#----------------------------------------------------------------------------
fix wallhi ForceAtoms wall/lj126 zhi 5.88 20.0 0.8071542386 0.906 units box
fix walllo ForceAtoms wall/lj126 zlo 0.0 20.0 0.8071542386 0.906 units box
#dump ParticleTracking ForceAtoms custom 50 test.track id mol x y z vx vy vz
thermo 50
#run 400
run 100
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix lb/fluid command:
@Article{Denniston et al.,
author = {C. Denniston, N. Afrasiabian, M.G. Cole-Andre,F.E. Mackay, S.T.T. Ollila, T. Whitehead},
title = {LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid}, journal = {Comp.~Phys.~Comm.},
year = 2022,
volume = 275,
pages = {108318}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 1.602
ghost atom cutoff = 1.602
binsize = 0.801, bins = 21 21 8
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 373.3 | 373.3 | 373.3 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 0 0 0 0
50 4511970.8 0 0 89.610701 0.21526205
100 16113793 0 0 320.0305 -0.54714356
Loop time of 2168.87 on 4 procs for 100 steps with 1734240 atoms
Performance: 3983.646 ns/day, 0.006 hours/ns, 0.046 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.67377 | 0.70143 | 0.72779 | 2.5 | 0.03
Bond | 4.19e-05 | 6.0825e-05 | 7.85e-05 | 0.0 | 0.00
Neigh | 1978.7 | 1982.4 | 1985.9 | 6.3 | 91.40
Comm | 9.4132 | 12.886 | 16.538 | 78.3 | 0.59
Output | 0.0089264 | 0.016853 | 0.024638 | 4.3 | 0.00
Modify | 171.19 | 171.23 | 171.27 | 0.3 | 7.89
Other | | 1.598 | | | 0.07
Nlocal: 433560 ave 433560 max 433560 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Nghost: 397888 ave 397888 max 397888 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Neighs: 60 ave 60 max 60 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Total # of neighbors = 240
Ave neighs/atom = 0.00013838915
Ave special neighs/atom = 0
Neighbor list builds = 16
Dangerous builds = 0
Total wall time: 0:39:00

View File

@ -1,41 +0,0 @@
LAMMPS (22 Feb 2013)
Scanning data file ...
Reading data file ...
orthogonal box = (0 0 0) to (16.8 16.8 6)
4 by 8 by 2 MPI processor grid
1734240 atoms
Finding 1-2 1-3 1-4 neighbors ...
0 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
480 atoms in group ForceAtoms
1733760 atoms in group FluidAtoms
Using a lattice-Boltzmann grid of 280 by 280 by 101 total grid points. (fix_lb_fluid.cpp:341)
480 rigid bodies with 1734240 atoms
Setting up run ...
Memory usage per processor = 79.5765 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 0 0 0 0
400 65143387 608.21941 0 1902.0097 4.5858406
Loop time of 503.932 on 64 procs for 400 steps with 1734240 atoms
Pair time (%) = 0.151149 (0.0299939)
Bond time (%) = 0.000111468 (2.21197e-05)
Neigh time (%) = 308.546 (61.2278)
Comm time (%) = 88.6413 (17.5899)
Outpt time (%) = 0.00124746 (0.000247546)
Other time (%) = 106.592 (21.152)
Nlocal: 27097.5 ave 27415 max 26825 min
Histogram: 8 0 12 12 8 0 8 4 8 4
Nghost: 159582 ave 161567 max 158145 min
Histogram: 32 0 0 0 0 4 12 0 0 16
Neighs: 3.75 ave 6 max 2 min
Histogram: 16 0 16 0 0 16 0 0 0 16
Total # of neighbors = 240
Ave neighs/atom = 0.000138389
Ave special neighs/atom = 0
Neighbor list builds = 68
Dangerous builds = 0

View File

@ -0,0 +1,207 @@
#===========================================================================#
# Large colloidal sphere difusing around. #
# #
# In the first stage, the sphere is constructed by condensing atoms onto #
# the surface of a spherical region. There are a flag you can change to #
# either bond atoms into a spherical shell or integrate them as a rigid body#
# #
# To run this example, LAMMPS needs to be compiled with a the following #
# packages: RIGID, LATBOTLZ #
# #
# If you uncomment the "dump..." line, sample output from this run #
# can be found in the file: #
# 'dump.trapnewsphere.lammpstrj' #
# and viewed using, e.g., the VMD software. #
# #
#===========================================================================#
units nano
dimension 3
boundary p p p
region mybox block -24 24 -24 24 -24 24
# flag indicating whether sphere will be bonded or rigid, 0 or 1
variable is_bonded equal 0
# timestep for the LB run (setup uses different timesteps)
variable tstep equal 0.00025
# number of stencil points in any direction. could be 2, 3, or 4
variable stpts equal 2
if "${is_bonded} == 1" then &
"create_box 1 mybox bond/types 10 extra/bond/per/atom 12" &
else &
"create_box 1 mybox"
#----------------------------------------------------------------------------
# Create a spherical region and then fill it with atoms
#----------------------------------------------------------------------------
region mysphereinside sphere 0 0 0 4.0
#variable n_nodes equal 216
variable n_nodes equal 284
create_atoms 1 random ${n_nodes} 1234 mysphereinside units box
pair_style soft 1.0
pair_coeff * * 0.0
variable prefactor equal ramp(0,30)
fix 1 all adapt 1 pair soft a * * v_prefactor
mass * 1.0
#----------------------------------------------------------------------------
# Set up and do an initial run to push the atoms apart as the random creation
# could have them overlapping too much for stability.
#----------------------------------------------------------------------------
timestep 0.002
# Define sphere where minimum of wall potential is at r=4 so
# regions is 4 + (2/5)^(1/6) sigma
region mysphere sphere 0 0 0 5.28756
fix wall all wall/region mysphere lj93 15.0 1.5 5.28
fix 2 all nve
#dump mydump all atom 10000 dump.trapnewsphere.lammpstrj
run 20000
unfix wall
fix wall all wall/region mysphere lj93 50.0 1.5 5.68
unfix 1
#----------------------------------------------------------------------------
# Do a run to condense the atoms onto the spherical surface and anneal them
# so they will be orderly aranged onto a semi-triangular mesh on the sphere
#----------------------------------------------------------------------------
pair_style lj/cut 1.68359
#pair_coeff * * 0.002 1.5 1.68369
pair_coeff * * 0.0005 1.5 1.68369
fix 3 all langevin 1.5 0.01 100.0 5678
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
comm_modify cutoff 2.5
run 500000
minimize 0.0 1.0e-8 1000 100000
unfix wall
unfix 2
unfix 3
#----------------------------------------------------------------------------
# If bonded, bond the atoms together at something close to their current
# configuration
#----------------------------------------------------------------------------
variable total_mass equal 0.002398
variable node_mass equal "v_total_mass / v_n_nodes"
mass * ${node_mass}
if "${is_bonded} == 1" then &
"bond_style harmonic" &
"bond_coeff 1 25.0 0.869333" &
"bond_coeff 2 25.0 0.948" &
"bond_coeff 3 25.0 1.026666" &
"bond_coeff 4 25.0 1.105333" &
"bond_coeff 5 25.0 1.184" &
"bond_coeff 6 25.0 1.262666" &
"bond_coeff 7 25.0 1.341333" &
"bond_coeff 8 25.0 1.42" &
"bond_coeff 9 25.0 1.498666" &
"bond_coeff 10 25.0 1.577333" &
"create_bonds many all all 1 0.83 0.908666" &
"create_bonds many all all 2 0.908667 0.987333" &
"create_bonds many all all 3 0.987334 1.066" &
"create_bonds many all all 4 1.066001 1.144666" &
"create_bonds many all all 5 1.144667 1.223333" &
"create_bonds many all all 6 1.223334 1.302" &
"create_bonds many all all 7 1.302001 1.380666" &
"create_bonds many all all 8 1.380667 1.459333" &
"create_bonds many all all 9 1.459334 1.538" &
"create_bonds many all all 10 1.538001 1.61667"
if "${is_bonded} == 1" then &
"pair_style lj/cut 5.05108" &
"pair_coeff * * 0.5 4.5" &
else &
"pair_style lj/cut 1.2" &
"pair_coeff * * 0.0 0.0"
timestep ${tstep}
#----------------------------------------------------------------------------
# You could uncomment the following lines and then turn off the noise and
# comment out the trap (following) to instead do a run that drags the
# sphere through the fluid to measure the drag force.
#----------------------------------------------------------------------------
#variable total_force equal 8.0
#variable node_force equal "v_total_force / v_n_nodes"
#variable oscillateY equal cos(step*0.0005)/(-0.004+50*v_tstep)/v_n_nodes
#variable oscillateZ equal cos(step*0.0003)/(-0.004+50*v_tstep)/v_n_nodes
#fix drag all addforce ${node_force} v_oscillateY v_oscillateZ
#----------------------------------------------------------------------------
# Trap the sphere along x (could be done experimentally using optical
# tweezers.
#----------------------------------------------------------------------------
variable fx atom -x*4.14195/284.0
fix trap all addforce v_fx 0.0 0.0 # needs to go before fix lb/fluid and lb/viscous
#----------------------------------------------------------------------------
# Set up the lb/fluid parameters for water and at a temperature of 300 K. If
# the colloid is integrated with the rigid fix, the dof are not
# automatically calculated correctly but as this would then be a rigid
# sphere it is clear it should have 6 degrees of freedom.
#----------------------------------------------------------------------------
if "${is_bonded} == 1" then &
"fix FL all lb/fluid 1 1.0 0.0009982071 stencil ${stpts} dx 1.2 noise 300.0 181920" &
else &
"fix FL all lb/fluid 1 1.0 0.0009982071 stencil ${stpts} dx 1.2 noise 300.0 181920 dof 6"
fix 2 all lb/viscous
if "${is_bonded} == 1" then &
"fix 3 all nve" &
else &
"fix 3 all rigid group 1 all"
#equilibration run
run 10000
unfix 2
unfix FL
# data gathering run
reset_timestep 0
if "${is_bonded} == 1" then &
"fix FL all lb/fluid 1 1.0 0.0009982071 stencil ${stpts} dx 1.2 noise 300.0 181920" &
else &
"fix FL all lb/fluid 1 1.0 0.0009982071 stencil ${stpts} dx 1.2 noise 300.0 181920 dof 6"
fix 2 all lb/viscous
#----------------------------------------------------------------------------
# Create variables containing the positions/velocity of the colloids center
# of mass.
#----------------------------------------------------------------------------
variable cmx equal xcm(all,x)
variable cmy equal xcm(all,y)
variable cmz equal xcm(all,z)
variable vcmx equal vcm(all,x)
variable vcmy equal vcm(all,y)
variable vcmz equal vcm(all,z)
if "${is_bonded} == 1" then &
"variable comdatafile string trap_nb${n_nodes}_st${stpts}_dt${tstep}.out" &
else &
"variable comdatafile string trap_n${n_nodes}_st${stpts}_dt${tstep}.out"
#fix printCM all print 10 "$(step) $(f_FL) ${cmx} ${cmy} ${cmz} ${vcmx} ${vcmy} ${vcmz}" file ${comdatafile} screen no
run 10000
#run 25000000

View File

@ -0,0 +1,388 @@
LAMMPS (17 Feb 2022)
#===========================================================================#
# Large colloidal sphere difusing around. #
# #
# In the first stage, the sphere is constructed by condensing atoms onto #
# the surface of a spherical region. There are a flag you can change to #
# either bond atoms into a spherical shell or integrate them as a rigid body#
# #
# To run this example, LAMMPS needs to be compiled with a the following #
# packages: RIGID, LATBOTLZ #
# #
# If you uncomment the "dump..." line, sample output from this run #
# can be found in the file: #
# 'dump.trapnewsphere.lammpstrj' #
# and viewed using, e.g., the VMD software. #
# #
#===========================================================================#
units nano
dimension 3
boundary p p p
region mybox block -24 24 -24 24 -24 24
# flag indicating whether sphere will be bonded or rigid, 0 or 1
variable is_bonded equal 0
# timestep for the LB run (setup uses different timesteps)
variable tstep equal 0.00025
# number of stencil points in any direction. could be 2, 3, or 4
variable stpts equal 2
if "${is_bonded} == 1" then "create_box 1 mybox bond/types 10 extra/bond/per/atom 12" else "create_box 1 mybox"
create_box 1 mybox
Created orthogonal box = (-24 -24 -24) to (24 24 24)
1 by 2 by 2 MPI processor grid
#----------------------------------------------------------------------------
# Create a spherical region and then fill it with atoms
#----------------------------------------------------------------------------
region mysphereinside sphere 0 0 0 4.0
#variable n_nodes equal 216
variable n_nodes equal 284
create_atoms 1 random ${n_nodes} 1234 mysphereinside units box
create_atoms 1 random 284 1234 mysphereinside units box
Created 284 atoms
using box units in orthogonal box = (-24 -24 -24) to (24 24 24)
create_atoms CPU = 0.001 seconds
pair_style soft 1.0
pair_coeff * * 0.0
variable prefactor equal ramp(0,30)
fix 1 all adapt 1 pair soft a * * v_prefactor
mass * 1.0
#----------------------------------------------------------------------------
# Set up and do an initial run to push the atoms apart as the random creation
# could have them overlapping too much for stability.
#----------------------------------------------------------------------------
timestep 0.002
# Define sphere where minimum of wall potential is at r=4 so
# regions is 4 + (2/5)^(1/6) sigma
region mysphere sphere 0 0 0 5.28756
fix wall all wall/region mysphere lj93 15.0 1.5 5.28
fix 2 all nve
#dump mydump all atom 10000 dump.trapnewsphere.lammpstrj
run 20000
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 1.1
ghost atom cutoff = 1.1
binsize = 0.55, bins = 88 88 88
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair soft, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 3.944 | 3.944 | 3.944 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 0 0 0 0
20000 317.05614 618.63581 0 2476.8578 0.030715
Loop time of 0.573686 on 4 procs for 20000 steps with 284 atoms
Performance: 6024197.192 ns/day, 0.000 hours/ns, 34862.252 timesteps/s
100.0% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.062609 | 0.070036 | 0.076149 | 1.8 | 12.21
Neigh | 0.21074 | 0.2209 | 0.2305 | 1.5 | 38.51
Comm | 0.17847 | 0.19084 | 0.21153 | 3.0 | 33.26
Output | 1.74e-05 | 2.58e-05 | 5.02e-05 | 0.0 | 0.00
Modify | 0.079214 | 0.082596 | 0.085481 | 0.8 | 14.40
Other | | 0.009288 | | | 1.62
Nlocal: 71 ave 73 max 69 min
Histogram: 1 0 0 0 0 2 0 0 0 1
Nghost: 54.75 ave 57 max 53 min
Histogram: 2 0 0 0 0 0 0 1 0 1
Neighs: 107.25 ave 127 max 85 min
Histogram: 1 0 0 1 0 0 0 0 1 1
Total # of neighbors = 429
Ave neighs/atom = 1.5105634
Neighbor list builds = 1996
Dangerous builds = 1993
unfix wall
fix wall all wall/region mysphere lj93 50.0 1.5 5.68
unfix 1
#----------------------------------------------------------------------------
# Do a run to condense the atoms onto the spherical surface and anneal them
# so they will be orderly aranged onto a semi-triangular mesh on the sphere
#----------------------------------------------------------------------------
pair_style lj/cut 1.68359
#pair_coeff * * 0.002 1.5 1.68369
pair_coeff * * 0.0005 1.5 1.68369
fix 3 all langevin 1.5 0.01 100.0 5678
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
comm_modify cutoff 2.5
run 500000
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 1.98369
ghost atom cutoff = 2.5
binsize = 0.991845, bins = 49 49 49
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 3.277 | 3.277 | 3.277 Mbytes
Step Temp E_pair E_mol TotEng Press
20000 317.05614 626.83186 0 2485.0538 0.034256287
520000 0.20789564 780.54747 0 781.76592 0.028916791
Loop time of 12.8226 on 4 procs for 500000 steps with 284 atoms
Performance: 6738089.440 ns/day, 0.000 hours/ns, 38993.573 timesteps/s
100.0% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 2.6508 | 3.1904 | 3.6443 | 20.0 | 24.88
Neigh | 0.68551 | 0.75012 | 0.80362 | 5.1 | 5.85
Comm | 3.7915 | 4.3143 | 4.922 | 19.6 | 33.65
Output | 2.26e-05 | 3.335e-05 | 6.29e-05 | 0.0 | 0.00
Modify | 3.1825 | 3.2495 | 3.3155 | 2.6 | 25.34
Other | | 1.318 | | | 10.28
Nlocal: 71 ave 74 max 69 min
Histogram: 1 0 1 0 1 0 0 0 0 1
Nghost: 109.75 ave 113 max 105 min
Histogram: 1 0 0 0 0 1 0 0 1 1
Neighs: 613.25 ave 718 max 495 min
Histogram: 1 0 0 1 0 0 0 1 0 1
Total # of neighbors = 2453
Ave neighs/atom = 8.6373239
Neighbor list builds = 13515
Dangerous builds = 0
minimize 0.0 1.0e-8 1000 100000
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Per MPI rank memory allocation (min/avg/max) = 4.402 | 4.402 | 4.402 Mbytes
Step Temp E_pair E_mol TotEng Press
520000 0.20789564 780.54747 0 781.76592 0.028916791
520004 0.20789564 780.00993 0 781.22838 0.02889732
Loop time of 0.00296133 on 4 procs for 4 steps with 284 atoms
99.8% CPU use with 4 MPI tasks x no OpenMP threads
Minimization stats:
Stopping criterion = linesearch alpha is zero
Energy initial, next-to-last, final =
780.547473373201 780.009929329778 780.009929329778
Force two-norm initial, final = 40.166574 13.723713
Force max component initial, final = 4.2404394 1.5423956
Final line search alpha, max atom move = 6.0381565e-11 9.3132257e-11
Iterations, force evaluations = 4 69
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.0009509 | 0.0010909 | 0.0014002 | 0.5 | 36.84
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.0007064 | 0.0010256 | 0.0011795 | 0.6 | 34.63
Output | 0 | 0 | 0 | 0.0 | 0.00
Modify | 0.000204 | 0.00024405 | 0.0002982 | 0.0 | 8.24
Other | | 0.0006008 | | | 20.29
Nlocal: 71 ave 72 max 69 min
Histogram: 1 0 0 0 0 0 1 0 0 2
Nghost: 109.75 ave 113 max 107 min
Histogram: 1 1 0 0 0 0 1 0 0 1
Neighs: 612.75 ave 726 max 504 min
Histogram: 1 0 0 1 0 0 1 0 0 1
Total # of neighbors = 2451
Ave neighs/atom = 8.6302817
Neighbor list builds = 0
Dangerous builds = 0
unfix wall
unfix 2
unfix 3
#----------------------------------------------------------------------------
# If bonded, bond the atoms together at something close to their current
# configuration
#----------------------------------------------------------------------------
variable total_mass equal 0.002398
variable node_mass equal "v_total_mass / v_n_nodes"
mass * ${node_mass}
mass * 8.44366197183099e-06
if "${is_bonded} == 1" then "bond_style harmonic" "bond_coeff 1 25.0 0.869333" "bond_coeff 2 25.0 0.948" "bond_coeff 3 25.0 1.026666" "bond_coeff 4 25.0 1.105333" "bond_coeff 5 25.0 1.184" "bond_coeff 6 25.0 1.262666" "bond_coeff 7 25.0 1.341333" "bond_coeff 8 25.0 1.42" "bond_coeff 9 25.0 1.498666" "bond_coeff 10 25.0 1.577333" "create_bonds many all all 1 0.83 0.908666" "create_bonds many all all 2 0.908667 0.987333" "create_bonds many all all 3 0.987334 1.066" "create_bonds many all all 4 1.066001 1.144666" "create_bonds many all all 5 1.144667 1.223333" "create_bonds many all all 6 1.223334 1.302" "create_bonds many all all 7 1.302001 1.380666" "create_bonds many all all 8 1.380667 1.459333" "create_bonds many all all 9 1.459334 1.538" "create_bonds many all all 10 1.538001 1.61667"
if "${is_bonded} == 1" then "pair_style lj/cut 5.05108" "pair_coeff * * 0.5 4.5" else "pair_style lj/cut 1.2" "pair_coeff * * 0.0 0.0"
pair_style lj/cut 1.2
pair_coeff * * 0.0 0.0
timestep ${tstep}
timestep 0.00025
#----------------------------------------------------------------------------
# You could uncomment the following lines and then turn off the noise and
# comment out the trap (following) to instead do a run that drags the
# sphere through the fluid to measure the drag force.
#----------------------------------------------------------------------------
#variable total_force equal 8.0
#variable node_force equal "v_total_force / v_n_nodes"
#variable oscillateY equal cos(step*0.0005)/(-0.004+50*v_tstep)/v_n_nodes
#variable oscillateZ equal cos(step*0.0003)/(-0.004+50*v_tstep)/v_n_nodes
#fix drag all addforce ${node_force} v_oscillateY v_oscillateZ
#----------------------------------------------------------------------------
# Trap the sphere along x (could be done experimentally using optical
# tweezers.
#----------------------------------------------------------------------------
variable fx atom -x*4.14195/284.0
fix trap all addforce v_fx 0.0 0.0 # needs to go before fix lb/fluid and lb/viscous
#----------------------------------------------------------------------------
# Set up the lb/fluid parameters for water and at a temperature of 300 K. If
# the colloid is integrated with the rigid fix, the dof are not
# automatically calculated correctly but as this would then be a rigid
# sphere it is clear it should have 6 degrees of freedom.
#----------------------------------------------------------------------------
if "${is_bonded} == 1" then "fix FL all lb/fluid 1 1.0 0.0009982071 stencil ${stpts} dx 1.2 noise 300.0 181920" else "fix FL all lb/fluid 1 1.0 0.0009982071 stencil ${stpts} dx 1.2 noise 300.0 181920 dof 6"
fix FL all lb/fluid 1 1.0 0.0009982071 stencil ${stpts} dx 1.2 noise 300.0 181920 dof 6
fix FL all lb/fluid 1 1.0 0.0009982071 stencil 2 dx 1.2 noise 300.0 181920 dof 6
Using a lattice-Boltzmann grid of 40 by 40 by 40 total grid points. (../fix_lb_fluid.cpp:486)
Local Grid Geometry created. (../fix_lb_fluid.cpp:1018)
fix 2 all lb/viscous
if "${is_bonded} == 1" then "fix 3 all nve" else "fix 3 all rigid group 1 all"
fix 3 all rigid group 1 all
1 rigid bodies with 284 atoms
#equilibration run
run 10000
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix lb/fluid command:
@Article{Denniston et al.,
author = {C. Denniston, N. Afrasiabian, M.G. Cole-Andre,F.E. Mackay, S.T.T. Ollila, T. Whitehead},
title = {LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid}, journal = {Comp.~Phys.~Comm.},
year = 2022,
volume = 275,
pages = {108318}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Per MPI rank memory allocation (min/avg/max) = 5.306 | 5.306 | 5.306 Mbytes
Step Temp E_pair E_mol TotEng Press
520004 8.9102565e-07 0 0 1.8452924e-08 6.7761632e-05
530004 3.474402 0 0 0.071954018 -0.00061159689
Loop time of 238.57 on 4 procs for 10000 steps with 284 atoms
Performance: 905.396 ns/day, 0.027 hours/ns, 41.916 timesteps/s
100.0% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.07901 | 0.086329 | 0.095378 | 2.0 | 0.04
Neigh | 0.012928 | 0.013445 | 0.013795 | 0.3 | 0.01
Comm | 0.18848 | 0.1969 | 0.20455 | 1.3 | 0.08
Output | 4.07e-05 | 5.9575e-05 | 0.0001157 | 0.0 | 0.00
Modify | 238.01 | 238.02 | 238.03 | 0.1 | 99.77
Other | | 0.2536 | | | 0.11
Nlocal: 71 ave 84 max 59 min
Histogram: 1 1 0 0 0 0 0 0 1 1
Nghost: 110.75 ave 121 max 101 min
Histogram: 1 1 0 0 0 0 0 0 1 1
Neighs: 243.25 ave 285 max 209 min
Histogram: 1 1 0 0 0 0 1 0 0 1
Total # of neighbors = 973
Ave neighs/atom = 3.4260563
Neighbor list builds = 52
Dangerous builds = 0
# data gathering run
reset_timestep 0
#----------------------------------------------------------------------------
# Create variables containing the positions/velocity of the colloids center
# of mass.
#----------------------------------------------------------------------------
variable cmx equal xcm(all,x)
variable cmy equal xcm(all,y)
variable cmz equal xcm(all,z)
variable vcmx equal vcm(all,x)
variable vcmy equal vcm(all,y)
variable vcmz equal vcm(all,z)
if "${is_bonded} == 1" then "variable comdatafile string trap_nb${n_nodes}_st${stpts}_dt${tstep}.out" else "variable comdatafile string trap_n${n_nodes}_st${stpts}_dt${tstep}.out"
variable comdatafile string trap_n${n_nodes}_st${stpts}_dt${tstep}.out
variable comdatafile string trap_n284_st${stpts}_dt${tstep}.out
variable comdatafile string trap_n284_st2_dt${tstep}.out
variable comdatafile string trap_n284_st2_dt0.00025.out
#fix printCM all print 10 "$(step) $(f_FL) ${cmx} ${cmy} ${cmz} ${vcmx} ${vcmy} ${vcmz}" file ${comdatafile} screen no
run 10000
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Per MPI rank memory allocation (min/avg/max) = 5.306 | 5.306 | 5.306 Mbytes
Step Temp E_pair E_mol TotEng Press
0 3.474402 0 0 0.071954018 0.00181615
10000 2.6284662 0 0 0.054434894 0.00098091301
Loop time of 237.772 on 4 procs for 10000 steps with 284 atoms
Performance: 908.435 ns/day, 0.026 hours/ns, 42.057 timesteps/s
100.0% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.079283 | 0.087287 | 0.095198 | 2.6 | 0.04
Neigh | 0.0133 | 0.013789 | 0.014439 | 0.3 | 0.01
Comm | 0.18949 | 0.1975 | 0.20661 | 1.8 | 0.08
Output | 2.88e-05 | 4.3675e-05 | 8.58e-05 | 0.0 | 0.00
Modify | 237.21 | 237.22 | 237.22 | 0.0 | 99.77
Other | | 0.253 | | | 0.11
Nlocal: 71 ave 87 max 54 min
Histogram: 1 0 0 0 0 2 0 0 0 1
Nghost: 110 ave 125 max 100 min
Histogram: 1 1 0 0 1 0 0 0 0 1
Neighs: 243.25 ave 264 max 207 min
Histogram: 1 0 0 0 0 0 1 0 1 1
Total # of neighbors = 973
Ave neighs/atom = 3.4260563
Neighbor list builds = 53
Dangerous builds = 0
#run 25000000
Total wall time: 0:08:09

File diff suppressed because it is too large Load Diff

View File

@ -1,80 +0,0 @@
#===========================================================================#
# Drag force on a single sphere. #
# #
# Here, gamma (used in the calculation of the particle-fluid interaction #
# force) is calculated by default. The resulting equilibrium drag force #
# should correspond to the Stokes drag force on a sphere with a slightly #
# larger "hydrodynamic" radius, than that given by the placement of the #
# particle nodes. #
# #
# Sample output from this run can be found in the file: #
# 'defaultgamma_drag.out' #
#===========================================================================#
units micro
dimension 3
boundary p p f
atom_style atomic
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 1.0 bin
neigh_modify delay 0 every 1
read_data data.one_radius16d2
#----------------------------------------------------------------------------
# None of the particles comprising the spherical colloidal object should
# interact with one another.
#----------------------------------------------------------------------------
pair_style lj/cut 2.45
pair_coeff * * 0.0 0.0 2.45
neigh_modify exclude type 1 1
#----------------------------------------------------------------------------
# Need to use a large particle mass in order to approximate an infintely
# massive particle, moving at constant velocity through the fluid.
#----------------------------------------------------------------------------
mass * 10000.0
timestep 3.0
velocity all set 0.0 0.0001 0.0 units box
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# All of the particles in the simulation apply a force to the fluid.
# Use the standard LB integration scheme, a fluid density = 1.0,
# fluid viscosity = 1.0, lattice spacing dx=4.0, and mass unit, dm=10.0.
# Use the default method to calculate the interaction force between the
# particles and the fluid. This calculation requires the surface area
# of the composite object represented by each particle node. By default
# this area is assumed equal to dx*dx; however, since this is not the case
# here, it is input through the setArea keyword (i.e. particles of type 1
# correspond to a surface area of 10.3059947).
# Use the trilinear interpolation stencil to distribute the force from
# a given particle onto the fluid mesh (results in a smaller hydrodynamic
# radius than if the Peskin stencil is used).
# Print the force and torque acting on the particle to the screen at each
# timestep.
#----------------------------------------------------------------------------
fix 1 all lb/fluid 1 1 1.0 1.0 setArea 1 10.3059947 dx 4.0 dm 10.0 trilinear calcforce 10 all
#---------------------------------------------------------------------------
# For this simulation the colloidal particle moves at a constant velocity
# through the fluid. As such, we do not wish to apply the force from
# the fluid back onto the object. Therefore, we do not use any of the
# viscous_lb, rigid_pc_sphere, or pc fixes, and simply integrate the
# particle motion using one of the built-in LAMMPS integrators.
#---------------------------------------------------------------------------
fix 2 all nve
run 100000

View File

@ -0,0 +1,141 @@
#===========================================================================#
# single particle drag tests #
# #
# Run consists of a colloidal particle being dragged with a constant force #
# through an LB-fluid. The colloidal particle could be single atom or #
# be a composite particle. Composite particles could be bonded or just #
# rigidly constrained to stay together. You can set flags in the script to #
# change these. #
# #
# Sample output from this run can be found in the files with "log." #
# located in the same directory. #
#===========================================================================#
units nano
dimension 3
boundary p p f
atom_style molecular
region mydomain block -24.0 24.0 -24.0 24.0 -24.0 24.0
#----------------------------------------------------------------------------
# Set up particles with n_nodes and decide if bonded or rigid
#----------------------------------------------------------------------------
variable n_nodes equal 4 # 1, 4, 6 are options with definitions below
variable is_bonded equal 0 # 0 or 1 (1 only if n_nodes > 1,
# bond parameters set for n_node = 4 case)
variable stpts equal 3 # 2, 3, 4 number of stencil points in any direction.
variable tstep equal 0.00025
if "${is_bonded} == 1" then &
"create_box 1 mydomain bond/types 1 extra/bond/per/atom 6" &
else &
"create_box 1 mydomain"
if "${n_nodes} == 1" then &
"create_atoms 1 single 0.0 0.0 0.0" &
elif "${n_nodes} == 4" &
"create_atoms 1 single 0.0 0.0 0.204124" &
"create_atoms 1 single -0.096225 -0.166667 -0.0680414" &
"create_atoms 1 single -0.096225 0.166667 -0.0680414" &
"create_atoms 1 single 0.19245 0. -0.0680414" &
elif "${n_nodes} == 6" &
"create_atoms 1 single 0.204124 0.0000000 0.0000000" &
"create_atoms 1 single -0.204124 0.0000000 0.0000000" &
"create_atoms 1 single 0.0000000 0.204124 0.0000000" &
"create_atoms 1 single 0.0000000 -0.204124 0.0000000" &
"create_atoms 1 single 0.0000000 0.0000000 0.204124" &
"create_atoms 1 single 0.0000000 0.0000000 -0.204124"
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
comm_modify cutoff 2.5 # cutoff for communcation shoud be at least 2 dx
#----------------------------------------------------------------------------
# Implement a hard-sphere interactions between particles & create bonds
#----------------------------------------------------------------------------
pair_style lj/cut 5.88
pair_coeff * * 0.0 0.0 5.88
variable total_mass equal 0.002398 # particle mass
variable node_mass equal "v_total_mass / v_n_nodes"
mass * ${node_mass}
if "${is_bonded} == 1" then &
"bond_style harmonic" &
"bond_coeff 1 1.0 0.333333333" &
"create_bonds many all all 1 0.3 0.35"
#velocity all set 0.02 0.0 0.0
#----------------------------------------------------------------------------
# Define external forces (SHOULD COME BEFORE lb/fluid and lb/viscous FIXes)
# to drag particles through the fluid.
#----------------------------------------------------------------------------
variable total_force equal 1.0 # total external force on the particle
variable node_force equal "v_total_force / v_n_nodes"
variable oscillateY equal cos(step*0.0005)/(-0.03+400*v_tstep)/v_n_nodes
variable oscillateZ equal cos(step*0.0003)/(-0.03+400*v_tstep)/v_n_nodes
fix drag all addforce ${node_force} v_oscillateY v_oscillateZ
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particle (group all here)
# (however, this fix does not explicity apply a force back on to these
# particles...this is accomplished through the use of the lb/viscous fix).
# Use a fluid viscosity = 1.0, fluid density= 0.0009982071,(i.e. water) and
# lattice spacing dx=1.2.
# Different ".log" files in this directory show the output with the stencil
# option being stencil 2, stencil 3, and stencil 4 (triliner, IBM, Key's).
#----------------------------------------------------------------------------
timestep ${tstep}
fix FL all lb/fluid 1 1.0 0.0009982071 stencil ${stpts} dx 1.2
#dumpxdmf 1000 fflow
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining them to move and rotate together as a single rigid
# spherical object or an elastically bonded object
#----------------------------------------------------------------------------
fix 2 all lb/viscous
if "${n_nodes} == 1 || ${is_bonded} == 1" then &
"fix 3 all nve" &
else &
"fix 3 all rigid group 1 all"
#----------------------------------------------------------------------------
# Create variables containing the positions/velocity of the colloids center
# of mass.
#----------------------------------------------------------------------------
variable cmx equal xcm(all,x)
variable cmy equal xcm(all,y)
variable cmz equal xcm(all,z)
variable vcmx equal vcm(all,x)
variable vcmy equal vcm(all,y)
variable vcmz equal vcm(all,z)
if "${is_bonded} == 1" then &
"variable comdatafile string drag_nb${n_nodes}_st${stpts}_dt${tstep}.out" &
else &
"variable comdatafile string drag_n${n_nodes}_st${stpts}_dt${tstep}.out"
#fix printCM all print 100 "$(step) ${cmx} ${cmy} ${cmz} ${vcmx} ${vcmy} ${vcmz}" file ${comdatafile} screen no
run 10000
#run 100000

View File

@ -1,68 +0,0 @@
#===========================================================================#
# Drag force on a single sphere. #
# #
# Here, gamma (used in the calculation of the particle-fluid interaction #
# force) is set by the user (gamma = 13.0 for this simulation.) This #
# type of simulation is used to calibrate the value for gamma which will #
# give the desired Stokes drag force. #
# #
# Sample output from this run can be found in the file: #
# 'setgamma13d0_drag.out' #
#===========================================================================#
units micro
dimension 3
boundary p p f
atom_style atomic
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 1.0 bin
neigh_modify delay 0 every 1
read_data data.one_radius16d2
#----------------------------------------------------------------------------
# None of the particles comprising the spherical colloidal object should
# interact with one another.
#----------------------------------------------------------------------------
pair_style lj/cut 2.45
pair_coeff * * 0.0 0.0 2.45
neigh_modify exclude type 1 1
mass * 1.0
timestep 4.0
velocity all set 0.0 0.0001 0.0 units box
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# All of the particles in the simulation apply a force to the fluid.
# Use the LB integration scheme of Ollila et. al. (for stability reasons,
# this integration scheme should be used when a large user set value for
# gamma is specified), a fluid density = 1.0, fluid viscosity = 1.0, value
# for gamma=13.0, lattice spacing dx=4.0, and mass unit, dm=10.0.
# Print the force and torque acting on the particle to the screen at each
# timestep.
#----------------------------------------------------------------------------
fix 1 all lb/fluid 1 2 1.0 1.0 setGamma 13.0 dx 4.0 dm 10.0 calcforce 10 all
#---------------------------------------------------------------------------
# For this simulation the colloidal particle moves at a constant velocity
# through the fluid. As such, we do not wish to apply the force from
# the fluid back onto the object. Therefore, we do not use any of the
# viscous_lb, rigid_pc_sphere, or pc fixes, and simply integrate the
# particle motion using one of the built-in LAMMPS integrators.
#---------------------------------------------------------------------------
fix 2 all nve
run 100000

View File

@ -0,0 +1,212 @@
LAMMPS (17 Feb 2022)
#===========================================================================#
# single particle drag tests #
# #
# Run consists of a colloidal particle being dragged with a constant force #
# through an LB-fluid. The colloidal particle could be single atom or #
# be a composite particle. Composite particles could be bonded or just #
# rigidly constrained to stay together. You can set flags in the script to #
# change these. #
# #
# Sample output from this run can be found in the files with "log." #
# located in the same directory. #
#===========================================================================#
units nano
dimension 3
boundary p p f
atom_style molecular
region mydomain block -24.0 24.0 -24.0 24.0 -24.0 24.0
#----------------------------------------------------------------------------
# Set up particles with n_nodes and decide if bonded or rigid
#----------------------------------------------------------------------------
variable n_nodes equal 4 # 1, 4, 6 are options with definitions below
variable is_bonded equal 0 # 0 or 1 (1 only if n_nodes > 1,
# bond parameters set for n_node = 4 case)
variable stpts equal 3 # 2, 3, 4 number of stencil points in any direction.
variable tstep equal 0.00025
if "${is_bonded} == 1" then "create_box 1 mydomain bond/types 1 extra/bond/per/atom 6" else "create_box 1 mydomain"
create_box 1 mydomain
Created orthogonal box = (-24 -24 -24) to (24 24 24)
1 by 1 by 1 MPI processor grid
if "${n_nodes} == 1" then "create_atoms 1 single 0.0 0.0 0.0" elif "${n_nodes} == 4" "create_atoms 1 single 0.0 0.0 0.204124" "create_atoms 1 single -0.096225 -0.166667 -0.0680414" "create_atoms 1 single -0.096225 0.166667 -0.0680414" "create_atoms 1 single 0.19245 0. -0.0680414" elif "${n_nodes} == 6" "create_atoms 1 single 0.204124 0.0000000 0.0000000" "create_atoms 1 single -0.204124 0.0000000 0.0000000" "create_atoms 1 single 0.0000000 0.204124 0.0000000" "create_atoms 1 single 0.0000000 -0.204124 0.0000000" "create_atoms 1 single 0.0000000 0.0000000 0.204124" "create_atoms 1 single 0.0000000 0.0000000 -0.204124"
create_atoms 1 single 0.0 0.0 0.204124
Created 1 atoms
using lattice units in orthogonal box = (-24 -24 -24) to (24 24 24)
create_atoms CPU = 0.001 seconds
create_atoms 1 single -0.096225 -0.166667 -0.0680414
Created 1 atoms
using lattice units in orthogonal box = (-24 -24 -24) to (24 24 24)
create_atoms CPU = 0.001 seconds
create_atoms 1 single -0.096225 0.166667 -0.0680414
Created 1 atoms
using lattice units in orthogonal box = (-24 -24 -24) to (24 24 24)
create_atoms CPU = 0.000 seconds
create_atoms 1 single 0.19245 0. -0.0680414
Created 1 atoms
using lattice units in orthogonal box = (-24 -24 -24) to (24 24 24)
create_atoms CPU = 0.000 seconds
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
comm_modify cutoff 2.5 # cutoff for communcation shoud be at least 2 dx
#----------------------------------------------------------------------------
# Implement a hard-sphere interactions between particles & create bonds
#----------------------------------------------------------------------------
pair_style lj/cut 5.88
pair_coeff * * 0.0 0.0 5.88
variable total_mass equal 0.002398 # particle mass
variable node_mass equal "v_total_mass / v_n_nodes"
mass * ${node_mass}
mass * 0.0005995
if "${is_bonded} == 1" then "bond_style harmonic" "bond_coeff 1 1.0 0.333333333" "create_bonds many all all 1 0.3 0.35"
#velocity all set 0.02 0.0 0.0
#----------------------------------------------------------------------------
# Define external forces (SHOULD COME BEFORE lb/fluid and lb/viscous FIXes)
# to drag particles through the fluid.
#----------------------------------------------------------------------------
variable total_force equal 1.0 # total external force on the particle
variable node_force equal "v_total_force / v_n_nodes"
variable oscillateY equal cos(step*0.0005)/(-0.03+400*v_tstep)/v_n_nodes
variable oscillateZ equal cos(step*0.0003)/(-0.03+400*v_tstep)/v_n_nodes
fix drag all addforce ${node_force} v_oscillateY v_oscillateZ
fix drag all addforce 0.25 v_oscillateY v_oscillateZ
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particle (group all here)
# (however, this fix does not explicity apply a force back on to these
# particles...this is accomplished through the use of the lb/viscous fix).
# Use a fluid viscosity = 1.0, fluid density= 0.0009982071,(i.e. water) and
# lattice spacing dx=1.2.
# Different ".log" files in this directory show the output with the stencil
# option being stencil 2, stencil 3, and stencil 4 (triliner, IBM, Key's).
#----------------------------------------------------------------------------
timestep ${tstep}
timestep 0.00025
fix FL all lb/fluid 1 1.0 0.0009982071 stencil ${stpts} dx 1.2
fix FL all lb/fluid 1 1.0 0.0009982071 stencil 3 dx 1.2
Using a lattice-Boltzmann grid of 40 by 40 by 41 total grid points. (../fix_lb_fluid.cpp:486)
Local Grid Geometry created. (../fix_lb_fluid.cpp:1018)
#dumpxdmf 1000 fflow
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining them to move and rotate together as a single rigid
# spherical object or an elastically bonded object
#----------------------------------------------------------------------------
fix 2 all lb/viscous
if "${n_nodes} == 1 || ${is_bonded} == 1" then "fix 3 all nve" else "fix 3 all rigid group 1 all"
fix 3 all rigid group 1 all
1 rigid bodies with 4 atoms
#----------------------------------------------------------------------------
# Create variables containing the positions/velocity of the colloids center
# of mass.
#----------------------------------------------------------------------------
variable cmx equal xcm(all,x)
variable cmy equal xcm(all,y)
variable cmz equal xcm(all,z)
variable vcmx equal vcm(all,x)
variable vcmy equal vcm(all,y)
variable vcmz equal vcm(all,z)
if "${is_bonded} == 1" then "variable comdatafile string drag_nb${n_nodes}_st${stpts}_dt${tstep}.out" else "variable comdatafile string drag_n${n_nodes}_st${stpts}_dt${tstep}.out"
variable comdatafile string drag_n${n_nodes}_st${stpts}_dt${tstep}.out
variable comdatafile string drag_n4_st${stpts}_dt${tstep}.out
variable comdatafile string drag_n4_st3_dt${tstep}.out
variable comdatafile string drag_n4_st3_dt0.00025.out
#fix printCM all print 100 "$(step) ${cmx} ${cmy} ${cmz} ${vcmx} ${vcmy} ${vcmz}" file ${comdatafile} screen no
run 10000
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix lb/fluid command:
@Article{Denniston et al.,
author = {C. Denniston, N. Afrasiabian, M.G. Cole-Andre,F.E. Mackay, S.T.T. Ollila, T. Whitehead},
title = {LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid}, journal = {Comp.~Phys.~Comm.},
year = 2022,
volume = 275,
pages = {108318}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 6.18
ghost atom cutoff = 6.18
binsize = 3.09, bins = 16 16 16
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
WARNING: Communication cutoff adjusted to 6.18 (../comm.cpp:732)
Per MPI rank memory allocation (min/avg/max) = 7.15 | 7.15 | 7.15 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 0 0 0 2.1529156e-12
10000 0.021008983 0 0 0.00043509092 1.4149298e-08
Loop time of 185.434 on 1 procs for 10000 steps with 4 atoms
Performance: 1164.837 ns/day, 0.021 hours/ns, 53.928 timesteps/s
100.0% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.02024 | 0.02024 | 0.02024 | 0.0 | 0.01
Bond | 0.0011585 | 0.0011585 | 0.0011585 | 0.0 | 0.00
Neigh | 8.88e-05 | 8.88e-05 | 8.88e-05 | 0.0 | 0.00
Comm | 0.011615 | 0.011615 | 0.011615 | 0.0 | 0.01
Output | 8.32e-05 | 8.32e-05 | 8.32e-05 | 0.0 | 0.00
Modify | 185.36 | 185.36 | 185.36 | 0.0 | 99.96
Other | | 0.04469 | | | 0.02
Nlocal: 4 ave 4 max 4 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 6 ave 6 max 6 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 6
Ave neighs/atom = 1.5
Ave special neighs/atom = 0
Neighbor list builds = 9
Dangerous builds = 0
#run 100000
Total wall time: 0:03:05

View File

@ -0,0 +1,212 @@
LAMMPS (17 Feb 2022)
#===========================================================================#
# single particle drag tests #
# #
# Run consists of a colloidal particle being dragged with a constant force #
# through an LB-fluid. The colloidal particle could be single atom or #
# be a composite particle. Composite particles could be bonded or just #
# rigidly constrained to stay together. You can set flags in the script to #
# change these. #
# #
# Sample output from this run can be found in the files with "log." #
# located in the same directory. #
#===========================================================================#
units nano
dimension 3
boundary p p f
atom_style molecular
region mydomain block -24.0 24.0 -24.0 24.0 -24.0 24.0
#----------------------------------------------------------------------------
# Set up particles with n_nodes and decide if bonded or rigid
#----------------------------------------------------------------------------
variable n_nodes equal 4 # 1, 4, 6 are options with definitions below
variable is_bonded equal 0 # 0 or 1 (1 only if n_nodes > 1,
# bond parameters set for n_node = 4 case)
variable stpts equal 3 # 2, 3, 4 number of stencil points in any direction.
variable tstep equal 0.00025
if "${is_bonded} == 1" then "create_box 1 mydomain bond/types 1 extra/bond/per/atom 6" else "create_box 1 mydomain"
create_box 1 mydomain
Created orthogonal box = (-24 -24 -24) to (24 24 24)
1 by 2 by 2 MPI processor grid
if "${n_nodes} == 1" then "create_atoms 1 single 0.0 0.0 0.0" elif "${n_nodes} == 4" "create_atoms 1 single 0.0 0.0 0.204124" "create_atoms 1 single -0.096225 -0.166667 -0.0680414" "create_atoms 1 single -0.096225 0.166667 -0.0680414" "create_atoms 1 single 0.19245 0. -0.0680414" elif "${n_nodes} == 6" "create_atoms 1 single 0.204124 0.0000000 0.0000000" "create_atoms 1 single -0.204124 0.0000000 0.0000000" "create_atoms 1 single 0.0000000 0.204124 0.0000000" "create_atoms 1 single 0.0000000 -0.204124 0.0000000" "create_atoms 1 single 0.0000000 0.0000000 0.204124" "create_atoms 1 single 0.0000000 0.0000000 -0.204124"
create_atoms 1 single 0.0 0.0 0.204124
Created 1 atoms
using lattice units in orthogonal box = (-24 -24 -24) to (24 24 24)
create_atoms CPU = 0.001 seconds
create_atoms 1 single -0.096225 -0.166667 -0.0680414
Created 1 atoms
using lattice units in orthogonal box = (-24 -24 -24) to (24 24 24)
create_atoms CPU = 0.000 seconds
create_atoms 1 single -0.096225 0.166667 -0.0680414
Created 1 atoms
using lattice units in orthogonal box = (-24 -24 -24) to (24 24 24)
create_atoms CPU = 0.000 seconds
create_atoms 1 single 0.19245 0. -0.0680414
Created 1 atoms
using lattice units in orthogonal box = (-24 -24 -24) to (24 24 24)
create_atoms CPU = 0.001 seconds
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
comm_modify cutoff 2.5 # cutoff for communcation shoud be at least 2 dx
#----------------------------------------------------------------------------
# Implement a hard-sphere interactions between particles & create bonds
#----------------------------------------------------------------------------
pair_style lj/cut 5.88
pair_coeff * * 0.0 0.0 5.88
variable total_mass equal 0.002398 # particle mass
variable node_mass equal "v_total_mass / v_n_nodes"
mass * ${node_mass}
mass * 0.0005995
if "${is_bonded} == 1" then "bond_style harmonic" "bond_coeff 1 1.0 0.333333333" "create_bonds many all all 1 0.3 0.35"
#velocity all set 0.02 0.0 0.0
#----------------------------------------------------------------------------
# Define external forces (SHOULD COME BEFORE lb/fluid and lb/viscous FIXes)
# to drag particles through the fluid.
#----------------------------------------------------------------------------
variable total_force equal 1.0 # total external force on the particle
variable node_force equal "v_total_force / v_n_nodes"
variable oscillateY equal cos(step*0.0005)/(-0.03+400*v_tstep)/v_n_nodes
variable oscillateZ equal cos(step*0.0003)/(-0.03+400*v_tstep)/v_n_nodes
fix drag all addforce ${node_force} v_oscillateY v_oscillateZ
fix drag all addforce 0.25 v_oscillateY v_oscillateZ
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particle (group all here)
# (however, this fix does not explicity apply a force back on to these
# particles...this is accomplished through the use of the lb/viscous fix).
# Use a fluid viscosity = 1.0, fluid density= 0.0009982071,(i.e. water) and
# lattice spacing dx=1.2.
# Different ".log" files in this directory show the output with the stencil
# option being stencil 2, stencil 3, and stencil 4 (triliner, IBM, Key's).
#----------------------------------------------------------------------------
timestep ${tstep}
timestep 0.00025
fix FL all lb/fluid 1 1.0 0.0009982071 stencil ${stpts} dx 1.2
fix FL all lb/fluid 1 1.0 0.0009982071 stencil 3 dx 1.2
Using a lattice-Boltzmann grid of 40 by 40 by 41 total grid points. (../fix_lb_fluid.cpp:486)
Local Grid Geometry created. (../fix_lb_fluid.cpp:1018)
#dumpxdmf 1000 fflow
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining them to move and rotate together as a single rigid
# spherical object or an elastically bonded object
#----------------------------------------------------------------------------
fix 2 all lb/viscous
if "${n_nodes} == 1 || ${is_bonded} == 1" then "fix 3 all nve" else "fix 3 all rigid group 1 all"
fix 3 all rigid group 1 all
1 rigid bodies with 4 atoms
#----------------------------------------------------------------------------
# Create variables containing the positions/velocity of the colloids center
# of mass.
#----------------------------------------------------------------------------
variable cmx equal xcm(all,x)
variable cmy equal xcm(all,y)
variable cmz equal xcm(all,z)
variable vcmx equal vcm(all,x)
variable vcmy equal vcm(all,y)
variable vcmz equal vcm(all,z)
if "${is_bonded} == 1" then "variable comdatafile string drag_nb${n_nodes}_st${stpts}_dt${tstep}.out" else "variable comdatafile string drag_n${n_nodes}_st${stpts}_dt${tstep}.out"
variable comdatafile string drag_n${n_nodes}_st${stpts}_dt${tstep}.out
variable comdatafile string drag_n4_st${stpts}_dt${tstep}.out
variable comdatafile string drag_n4_st3_dt${tstep}.out
variable comdatafile string drag_n4_st3_dt0.00025.out
#fix printCM all print 100 "$(step) ${cmx} ${cmy} ${cmz} ${vcmx} ${vcmy} ${vcmz}" file ${comdatafile} screen no
run 10000
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix lb/fluid command:
@Article{Denniston et al.,
author = {C. Denniston, N. Afrasiabian, M.G. Cole-Andre,F.E. Mackay, S.T.T. Ollila, T. Whitehead},
title = {LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid}, journal = {Comp.~Phys.~Comm.},
year = 2022,
volume = 275,
pages = {108318}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 6.18
ghost atom cutoff = 6.18
binsize = 3.09, bins = 16 16 16
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
WARNING: Communication cutoff adjusted to 6.18 (../comm.cpp:732)
Per MPI rank memory allocation (min/avg/max) = 6.763 | 6.857 | 7.138 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 0 0 0 2.1529156e-12
10000 0.021008983 0 0 0.00043509092 1.4149298e-08
Loop time of 154.466 on 4 procs for 10000 steps with 4 atoms
Performance: 1398.367 ns/day, 0.017 hours/ns, 64.739 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.013169 | 0.01792 | 0.021577 | 2.3 | 0.01
Bond | 0.0019565 | 0.0021447 | 0.0023408 | 0.4 | 0.00
Neigh | 7.55e-05 | 9.69e-05 | 0.0001173 | 0.0 | 0.00
Comm | 0.07056 | 0.076818 | 0.084499 | 2.1 | 0.05
Output | 2.85e-05 | 4.4925e-05 | 9.24e-05 | 0.0 | 0.00
Modify | 154.16 | 154.17 | 154.18 | 0.1 | 99.81
Other | | 0.1998 | | | 0.13
Nlocal: 1 ave 4 max 0 min
Histogram: 3 0 0 0 0 0 0 0 0 1
Nghost: 3 ave 4 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 3
Neighs: 1.5 ave 6 max 0 min
Histogram: 3 0 0 0 0 0 0 0 0 1
Total # of neighbors = 6
Ave neighs/atom = 1.5
Ave special neighs/atom = 0
Neighbor list builds = 9
Dangerous builds = 0
#run 100000
Total wall time: 0:02:34

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,84 +0,0 @@
#===========================================================================#
# System of 2 pairs of rigid particles moving towards one another. #
# At each timestep, the hydrodynamic force acting on one of these four #
# rigid particles is printed to the screen. #
# #
# Here, gamma (used in the calculation of the particle-fluid interaction #
# force) is calculated by default. Thus, the colloidal objects will have #
# slightly larger "hydrodynamic" radii than given by the placement of the #
# particle nodes. #
# #
# Sample output from this run can be found in the file: #
# 'fourspheres_velocity0d0001_defaultgamma.out' #
#===========================================================================#
units micro
dimension 3
boundary p p p
atom_style atomic
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 1.0 bin
neigh_modify delay 0 every 1 exclude type 1 1
read_data data.four
#----------------------------------------------------------------------------
# None of the particles interact with one another.
#----------------------------------------------------------------------------
pair_style lj/cut 2.45
pair_coeff * * 0.0 0.0 2.45
#----------------------------------------------------------------------------
# Need to use a large particle mass in order to approximate an infintely
# massive particle, moving at constant velocity through the fluid.
#----------------------------------------------------------------------------
mass * 10000.0
timestep 3.0
group sphere1 id <> 1 320
group sphere2 id <> 321 640
group sphere3 id <> 641 960
group sphere4 id <> 961 1280
velocity sphere1 set 0.0 0.0001 0.0 units box
velocity sphere2 set 0.0 -0.0001 0.0 units box
velocity sphere3 set 0.0 0.0001 0.0 units box
velocity sphere4 set 0.0 -0.0001 0.0 units box
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# All of the particles in the simulation apply a force to the fluid.
# Use the standard LB integration scheme, a fluid density = 1.0,
# fluid viscosity = 1.0, lattice spacing dx=4.0, and mass unit, dm=10.0.
# Use the default method to calculate the interaction force between the
# particles and the fluid. This calculation requires the surface area
# of the composite object represented by each particle node. By default
# this area is assumed equal to dx*dx; however, since this is not the case
# here, it is input through the setArea keyword (i.e. particles of type 1
# correspond to a surface area of 2.640508625).
# Print the force and torque acting on one of the spherical colloidal objects
# to the screen at each timestep.
#----------------------------------------------------------------------------
fix 1 all lb/fluid 1 1 1.0 1.0 setArea 1 2.640508625 dx 4.0 dm 10.0 calcforce 20 sphere1
#---------------------------------------------------------------------------
# For this simulation the colloidal particles move at a constant velocity
# through the fluid. As such, we do not wish to apply the force from
# the fluid back onto these objects. Therefore, we do not use any of the
# viscous_lb, rigid_pc_sphere, or pc fixes, and simply integrate the
# particle motions using one of the built-in LAMMPS integrators.
#---------------------------------------------------------------------------
fix 2 all nve
run 300000

View File

@ -1,76 +0,0 @@
#===========================================================================#
# System of 2 pairs of rigid particles moving towards one another. #
# At each timestep, the hydrodynamic force acting on one of these four #
# rigid particles is printed to the screen. #
# #
# Here, gamma (used in the calculation of the particle-fluid interaction #
# force) is set by the user (gamma = 3.303 for this simulation...this #
# value has been calibrated a priori through simulations of the drag #
# force acting on a single particle of the same radius). #
# #
# Sample output from this run can be found in the file: #
# 'fourspheres_velocity0d0001_setgamma.out' #
#===========================================================================#
units micro
dimension 3
boundary p p p
atom_style atomic
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 1.0 bin
neigh_modify delay 0 every 1 exclude type 1 1
read_data data.four
#----------------------------------------------------------------------------
# None of the particles interact with one another.
#----------------------------------------------------------------------------
pair_style lj/cut 2.45
pair_coeff * * 0.0 0.0 2.45
mass * 1.0
timestep 4.0
group sphere1 id <> 1 320
group sphere2 id <> 321 640
group sphere3 id <> 641 960
group sphere4 id <> 961 1280
velocity sphere1 set 0.0 0.0001 0.0 units box
velocity sphere2 set 0.0 -0.0001 0.0 units box
velocity sphere3 set 0.0 0.0001 0.0 units box
velocity sphere4 set 0.0 -0.0001 0.0 units box
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# All of the particles in the simulation apply a force to the fluid.
# Use the LB integration scheme of Ollila et. al. (for stability reasons,
# this integration scheme should be used when a large user set value for
# gamma is specified), a fluid density = 1.0, fluid viscosity = 1.0, value
# for gamma=3.303, lattice spacing dx=4.0, and mass unit, dm=10.0.
# Print the force and torque acting on one of the spherical colloidal objects
# to the screen at each timestep.
#----------------------------------------------------------------------------
fix 1 all lb/fluid 1 2 1.0 1.0 setGamma 3.303 dx 4.0 dm 10.0 calcforce 20 sphere1
#---------------------------------------------------------------------------
# For this simulation the colloidal particles move at a constant velocity
# through the fluid. As such, we do not wish to apply the force from
# the fluid back onto these objects. Therefore, we do not use any of the
# viscous_lb, rigid_pc_sphere, or pc fixes, and simply integrate the
# particle motions using one of the built-in LAMMPS integrators.
#---------------------------------------------------------------------------
fix 2 all nve
run 300000

View File

@ -4,13 +4,9 @@
# Run consists of 2 colloidal particles undergoing Brownian motion in a #
# thermal lattice-Boltzmann fluid. #
# #
# Here, gamma (used in the calculation of the particle-fluid interaction #
# force) is calculated by default. Thus, the colloidal objects will have #
# a slightly larger "hydrodynamic" radii than given by the placement of #
# the particle nodes. #
# #
# Sample output from this run can be found in the file: #
# 'microrheology_setgamma.out' #
# If you uncomment the "fix printCM..." line, sample output from this run #
# can be found in the file: #
# 'twocolloid.out' #
#===========================================================================#
units nano
@ -35,6 +31,8 @@ neigh_modify delay 0 every 1
neigh_modify exclude type 2 2
neigh_modify exclude type 2 1
comm_modify cutoff 2.5 # cutoff for communcation shoud be at least 2 dx
#----------------------------------------------------------------------------
# Implement a hard-sphere interaction between the particles at the center of
# each colloidal object (use a truncated and shifted Lennard-Jones
@ -62,22 +60,16 @@ group FluidAtoms type 2
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particles specified through FluidAtoms
# (however, this fix does not explicitly apply a force back on to these
# particles...this is accomplished through the use of the viscous_lb fix).
# Use the standard LB integration scheme, a fluid viscosity = 1.0, fluid
# density= 0.0009982071, lattice spacing dx=1.2, and mass unit, dm=0.003.
# Use the default method to calculate the interaction force between the
# particles and the fluid. This calculation requires the surface area
# of the composite object represented by each particle node. By default
# this area is assumed equal to dx*dx; however, since this is not the case
# here, it is input through the setArea keyword (i.e. particles of type 2
# correspond to a surface area of 0.3015928947).
# particles...this is accomplished through the use of the lb/viscous fix).
# Use a fluid viscosity = 1.0, fluid density= 0.0009982071 (water), and a
# lattice spacing dx=1.2.
# Use the trilinear interpolation stencil to distribute the force from
# a given particle onto the fluid mesh.
# Use a thermal lattice-Boltzmann fluid (temperature 300K, random number
# seed=2762). This enables the particles to undergo Brownian motion in
# the fluid.
#----------------------------------------------------------------------------
fix 1 FluidAtoms lb/fluid 1 1 1.0 0.0009982071 setArea 2 0.3015928947 dx 1.2 dm 0.003 trilinear noise 300.0 2762
fix 1 FluidAtoms lb/fluid 1 1.0 0.0009982071 dx 1.2 stencil 2 noise 300.0 2762
#----------------------------------------------------------------------------
# Apply the force due to the fluid onto the FluidAtoms particles (again,
@ -96,10 +88,10 @@ fix 3 all rigid molecule
#----------------------------------------------------------------------------
# To ensure that numerical errors do not lead to a buildup of momentum in the
# system, the momentum_lb fix is used every 10000 timesteps to zero out the
# system, the momentum_lb fix is used every 50000 timesteps to zero out the
# total (particle plus fluid) momentum in the system.
#----------------------------------------------------------------------------
fix 4 all lb/momentum 10000 linear 1 1 1
fix 4 all lb/momentum 50000 linear 1 1 1
#----------------------------------------------------------------------------
# Create variables containing the positions of the central atoms (these
@ -113,7 +105,9 @@ variable x2 equal x[242]
variable y2 equal y[242]
variable z2 equal z[242]
thermo_style custom v_x1 v_y1 v_z1 v_x2 v_y2 v_z2
thermo 1
#fix printCM all print 100 "$(step) ${x1} ${y1} ${z1} ${x2} ${y2} ${z2}" file twocolloid.out screen no
thermo_style custom step v_x1 v_y1 v_z1 v_x2 v_y2 v_z2
thermo 100
run 2000000000
run 2000
#run 2000000000

View File

@ -1,113 +0,0 @@
#===========================================================================#
# 2 particle microrheology test #
# #
# Run consists of 2 colloidal particles undergoing Brownian motion in a #
# thermal lattice-Boltzmann fluid. #
# #
# Here, gamma (used in the calculation of the particle-fluid interaction #
# force) is set by the user (gamma = 1.4692 for this simulation...this #
# value has been calibrated a priori through simulations of the drag #
# force acting on a single particle of the same radius). #
# #
# Sample output from this run can be found in the file: #
# 'microrheology_setgamma.out' #
#===========================================================================#
units nano
dimension 3
boundary p p p
atom_style molecular
read_data data.two
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 0.3 bin
neigh_modify delay 0 every 1
neigh_modify exclude type 2 2
neigh_modify exclude type 2 1
#----------------------------------------------------------------------------
# Implement a hard-sphere interaction between the particles at the center of
# each colloidal object (use a truncated and shifted Lennard-Jones
# potential).
#----------------------------------------------------------------------------
pair_style lj/cut 5.88
pair_coeff * * 0.0 0.0 5.88
pair_coeff 1 1 100.0 5.238484463 5.88
pair_modify shift yes
mass * 0.0002398
timestep 0.00045
#----------------------------------------------------------------------------
# ForceAtoms are the particles at the center of each colloidal object which
# do not interact with the fluid, but are used to implement the hard-sphere
# interactions.
# FluidAtoms are the particles representing the surface of the colloidal
# object which do interact with the fluid.
#----------------------------------------------------------------------------
group ForceAtoms type 1
group FluidAtoms type 2
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particles specified through FluidAtoms
# (however, this fix does not explicitly apply a force back on to these
# particles...this is accomplished through the use of the rigid_pc_sphere
# fix).
# Use the LB integration scheme of Ollila et. al. (for stability reasons,
# this integration scheme should be used when a large user set value for
# gamma is specified), a fluid viscosity = 1.0, fluid density= 0.0009982071,
# value for gamma=1.4692, lattice spacing dx=1.2, and mass unit, dm=0.003.
# Use a thermal lattice-Boltzmann fluid (temperature 300K, random number
# seed=2762). This enables the particles to undergo Brownian motion in
# the fluid.
#----------------------------------------------------------------------------
fix 1 FluidAtoms lb/fluid 1 2 1.0 0.0009982071 setGamma 1.4692 dx 1.2 dm 0.003 noise 300.0 2762
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining them to move and rotate together as a single rigid
# spherical object.
# Since both the ForceAtoms (central atoms), and the FluidAtoms (spherical
# shell) should move and rotate together, this fix is applied to all of
# the atoms in the system. However, since the central atoms should not
# feel a force due to the fluid, they are excluded from the fluid force
# calculation through the use of the 'innerNodes' keyword.
# NOTE: This fix should only be used when the user specifies a value for
# gamma (through the setGamma keyword) in the lb_fluid fix.
#----------------------------------------------------------------------------
fix 2 all lb/rigid/pc/sphere molecule innerNodes ForceAtoms
#----------------------------------------------------------------------------
# To ensure that numerical errors do not lead to a buildup of momentum in the
# system, the momentum_lb fix is used every 10000 timesteps to zero out the
# total (particle plus fluid) momentum in the system.
#----------------------------------------------------------------------------
fix 3 all lb/momentum 10000 linear 1 1 1
#----------------------------------------------------------------------------
# Create variables containing the positions of the central atoms (these
# values should correspond to the center of mass of each composite
# colloidal particle), and output these quantities to the screen.
#----------------------------------------------------------------------------
variable x1 equal x[1]
variable y1 equal y[1]
variable z1 equal z[1]
variable x2 equal x[242]
variable y2 equal y[242]
variable z2 equal z[242]
thermo_style custom v_x1 v_y1 v_z1 v_x2 v_y2 v_z2
thermo 1
run 2000000000

View File

@ -0,0 +1,216 @@
LAMMPS (17 Feb 2022)
#===========================================================================#
# 2 particle microrheology test #
# #
# Run consists of 2 colloidal particles undergoing Brownian motion in a #
# thermal lattice-Boltzmann fluid. #
# #
# If you uncomment the "fix printCM..." line, sample output from this run #
# can be found in the file: #
# 'twocolloid.out' #
#===========================================================================#
units nano
dimension 3
boundary p p p
atom_style molecular
read_data data.two
Reading data file ...
orthogonal box = (-48 -48 -48) to (48 48 48)
1 by 2 by 2 MPI processor grid
reading atoms ...
482 atoms
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
0 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
special bonds CPU = 0.000 seconds
read_data CPU = 0.033 seconds
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 0.3 bin
neigh_modify delay 0 every 1
neigh_modify exclude type 2 2
neigh_modify exclude type 2 1
comm_modify cutoff 2.5 # cutoff for communcation shoud be at least 2 dx
#----------------------------------------------------------------------------
# Implement a hard-sphere interaction between the particles at the center of
# each colloidal object (use a truncated and shifted Lennard-Jones
# potential).
#----------------------------------------------------------------------------
pair_style lj/cut 5.88
pair_coeff * * 0.0 0.0 5.88
pair_coeff 1 1 100.0 5.238484463 5.88
pair_modify shift yes
mass * 0.0002398
timestep 0.00025
#----------------------------------------------------------------------------
# ForceAtoms are the particles at the center of each colloidal object which
# do not interact with the fluid, but are used to implement the hard-sphere
# interactions.
# FluidAtoms are the particles representing the surface of the colloidal
# object which do interact with the fluid.
#----------------------------------------------------------------------------
group ForceAtoms type 1
2 atoms in group ForceAtoms
group FluidAtoms type 2
480 atoms in group FluidAtoms
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particles specified through FluidAtoms
# (however, this fix does not explicitly apply a force back on to these
# particles...this is accomplished through the use of the lb/viscous fix).
# Use a fluid viscosity = 1.0, fluid density= 0.0009982071 (water), and a
# lattice spacing dx=1.2.
# Use the trilinear interpolation stencil to distribute the force from
# a given particle onto the fluid mesh.
# Use a thermal lattice-Boltzmann fluid (temperature 300K, random number
# seed=2762). This enables the particles to undergo Brownian motion in
# the fluid.
#----------------------------------------------------------------------------
fix 1 FluidAtoms lb/fluid 1 1.0 0.0009982071 dx 1.2 stencil 2 noise 300.0 2762
Using a lattice-Boltzmann grid of 80 by 80 by 80 total grid points. (../fix_lb_fluid.cpp:486)
Local Grid Geometry created. (../fix_lb_fluid.cpp:1018)
#----------------------------------------------------------------------------
# Apply the force due to the fluid onto the FluidAtoms particles (again,
# these atoms represent the surface of the colloidal object, which should
# interact with the fluid).
#----------------------------------------------------------------------------
fix 2 FluidAtoms lb/viscous
#----------------------------------------------------------------------------
# Each colloidal object (spherical shell of particles and central particle)
# is specified as a separate molecule in the confinedcolloids.dat data
# file. Integrate the motion of these sets of particles as rigid objects
# which each move and rotate together.
#----------------------------------------------------------------------------
fix 3 all rigid molecule
2 rigid bodies with 482 atoms
#----------------------------------------------------------------------------
# To ensure that numerical errors do not lead to a buildup of momentum in the
# system, the momentum_lb fix is used every 50000 timesteps to zero out the
# total (particle plus fluid) momentum in the system.
#----------------------------------------------------------------------------
fix 4 all lb/momentum 50000 linear 1 1 1
#----------------------------------------------------------------------------
# Create variables containing the positions of the central atoms (these
# values should correspond to the center of mass of each composite
# colloidal particle), and output these quantities to the screen.
#----------------------------------------------------------------------------
variable x1 equal x[1]
variable y1 equal y[1]
variable z1 equal z[1]
variable x2 equal x[242]
variable y2 equal y[242]
variable z2 equal z[242]
#fix printCM all print 100 "$(step) ${x1} ${y1} ${z1} ${x2} ${y2} ${z2}" file twocolloid.out screen no
thermo_style custom step v_x1 v_y1 v_z1 v_x2 v_y2 v_z2
thermo 100
run 2000
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix lb/fluid command:
@Article{Denniston et al.,
author = {C. Denniston, N. Afrasiabian, M.G. Cole-Andre,F.E. Mackay, S.T.T. Ollila, T. Whitehead},
title = {LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid}, journal = {Comp.~Phys.~Comm.},
year = 2022,
volume = 275,
pages = {108318}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 6.18
ghost atom cutoff = 6.18
binsize = 3.09, bins = 32 32 32
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
WARNING: Communication cutoff adjusted to 6.18 (../comm.cpp:732)
Per MPI rank memory allocation (min/avg/max) = 7.071 | 7.133 | 7.196 Mbytes
Step v_x1 v_y1 v_z1 v_x2 v_y2 v_z2
0 -6 -6 -6 6 6 6
100 -5.9728258 -6.0005827 -5.9442685 5.9742978 6.0301171 5.9331116
200 -5.9160265 -5.9832234 -5.9485519 6.0258914 6.0954103 5.8748455
300 -5.859605 -5.9503512 -5.9827305 6.0472442 6.0610438 5.8531801
400 -5.8495832 -5.923183 -6.0205706 6.1502952 5.9975714 5.8964144
500 -5.8229958 -5.9256007 -5.963852 6.1738854 5.8961268 5.8723276
600 -5.7813718 -5.9423848 -5.9309537 6.2083705 5.866578 5.9308017
700 -5.7652512 -5.8737534 -5.9083059 6.2502919 5.757157 5.9690204
800 -5.7586139 -5.8559089 -5.8863028 6.2708214 5.7307727 5.9443721
900 -5.7200104 -5.8603762 -5.8944329 6.28719 5.7723113 5.9660136
1000 -5.7224239 -5.8487095 -5.9013071 6.3156272 5.8026721 5.9558441
1100 -5.576187 -5.8604571 -5.9254376 6.3778561 5.7655467 5.9702619
1200 -5.5348377 -5.8086817 -5.9982829 6.3979309 5.8028207 5.930579
1300 -5.5937473 -5.7733457 -6.0596682 6.3630776 5.937045 5.9662317
1400 -5.6207137 -5.7027974 -6.0641922 6.3079248 5.9631009 5.9707377
1500 -5.6648138 -5.6229854 -6.0989624 6.2784552 5.9448163 5.9254903
1600 -5.6905161 -5.5479418 -6.0704567 6.3133179 5.941372 5.8933924
1700 -5.6878847 -5.5415566 -6.0222328 6.3633902 5.9957476 5.7994115
1800 -5.6500526 -5.5204331 -5.9767389 6.4081067 5.9651289 5.7297962
1900 -5.7221835 -5.4972898 -5.9670446 6.4470403 5.9161644 5.6902098
2000 -5.7427378 -5.4637388 -6.0196569 6.3668465 5.9127502 5.6931183
Loop time of 358.9 on 4 procs for 2000 steps with 482 atoms
Performance: 120.368 ns/day, 0.199 hours/ns, 5.573 timesteps/s
100.0% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.0026566 | 0.0054654 | 0.0084461 | 3.6 | 0.00
Bond | 0.0003946 | 0.000476 | 0.0005288 | 0.0 | 0.00
Neigh | 0.0011268 | 0.0045933 | 0.0080717 | 5.0 | 0.00
Comm | 0.053156 | 0.057764 | 0.062919 | 1.9 | 0.02
Output | 0.0009824 | 0.0018621 | 0.0043906 | 3.4 | 0.00
Modify | 358.62 | 358.63 | 358.64 | 0.0 | 99.93
Other | | 0.1963 | | | 0.05
Nlocal: 120.5 ave 241 max 0 min
Histogram: 2 0 0 0 0 0 0 0 0 2
Nghost: 181 ave 297 max 80 min
Histogram: 2 0 0 0 0 0 0 0 1 1
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Ave special neighs/atom = 0
Neighbor list builds = 20
Dangerous builds = 0
#run 2000000000
Total wall time: 0:05:59

View File

@ -2,9 +2,9 @@
320 atoms
1 atom types
-160.0 160.0 xlo xhi
-160.0 160.0 ylo yhi
-160.0 160.0 zlo zhi
-120.0 120.0 xlo xhi
-100.0 100.0 ylo yhi
-120.0 120.0 zlo zhi
Atoms

View File

@ -1,16 +1,16 @@
#===========================================================================#
# Rigid sphere freely moving near a stationary plane wall in a system #
# undergoing shear flow. #
# Every 10 time steps the center of mass velocity and angular velocity of #
# the sphere are printed to the screen. #
# #
# Here, gamma (used in the calculation of the particle-fluid interaction #
# force) is set by the user (gamma = 13.655 for this simulation...this #
# value has been calibrated a priori through simulations of the drag #
# force acting on a single particle of the same radius). #
# Rigid sphere freely moving in a system with pressure driven flow through #
# a pit geometry. #
# #
# Sample output from this run can be found in the file: #
# 'wall_setgamma.out' #
# If uncommented, the example produces several output files: #
# 'flow.xdmf', 'flow.raw' ... xdmf and accompanying binary file for the #
# fluid density and velocity which can be read#
# and plotted using Paraview. #
# 'dumpatomsXX.vtp', 'dumpatomsXX_boundingBox.vtr' ... produces by the #
# dumpvtk routine (requires that lammps be #
# compiled with the vtk package). These filed#
# can also be read and plotted using Paraview.#
# XX is the timestep of the dump output. #
#===========================================================================#
units micro
@ -42,7 +42,7 @@ pair_coeff * * 0.0 0.0 2.45
neigh_modify exclude type 1 1
mass * 100.0
timestep 4.0
timestep 2.0
group sphere1 id <> 1 320
@ -54,26 +54,48 @@ velocity all set 0.0 0.0 0.0 units box
#----------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# All of the particles in the simulation apply a force to the fluid.
# (however, this fix does not explicitly apply a force back on to these
# particles...this is accomplished through the use of the rigid_pc_sphere
# fix).
# Use the LB integration scheme of Ollila et. al. (for stability reasons,
# this integration scheme should be used when a large user set value for
# gamma is specified), a fluid density = 1.0, fluid viscosity = 1.0, value
# for gamma=13.655, lattice spacing dx=4.0, and mass unit, dm=10.0.
# Create shear in the system, by giving the upper z-wall a velocity of 0.0001
# along the y-direction, while keeping the lower z-wall stationary.
# (however, this fix does not explicity apply a force back on to these
# particles...this is accomplished through the use of the lb/viscous fix).
# Set the fluid density = 1.0, fluid viscosity = 1.0 (water), and lattice
# spacing dx=4.0.
# dumpxdmf is set to output to the xdmf file (fflow.xdmf and fflow.raw) every
# 2500 steps, indexed by the frame number (rather than timestep).
# The flow is generated via a pressure jump at the otherwise periodic x-
# boundary using the pressurebcx option.
# The initial conditions are set as linear interpolation between boundary
# values using the linearInit option.
#-----------------------------------------------------------------------------
fix 1 all lb/fluid 1 2 1.0 1.0 setGamma 13.655 dx 4.0 dm 10.0 zwall_velocity 0.0 0.0001
fix 1 all lb/fluid 1 1.0 1.0 dx 4.0 linearInit pressurebcx 0.01 npits 2 20 40 5 0 wp 30 # dumpxdmf 2500 fflow 0
#-----------------------------------------------------------------------------
# You can get some other interesting geometries by replacing the npits options
# at the end of the above lb/fluid fix with one of the following:
#-----------------------------------------------------------------------------
# Channel with 2 pits placed symmetrically about center in x:
#npits 2 20 20 10 5 sw
# Channel with 1 pit placed at center:
#npits 1 20 20 20 sw
# Full channel with 1 "speedbump" placed in right end of the channel:
#npits 2 20 40 5 0 sw
# Channel with 2 "potholes" placed symmetrically about center in x:
#npits 2 20 15 10 10 wp 30
# Channel with T-shaped cross-section with a "speedbump" in right end:
#npits 2 20 40 5 0 wp 30
# Long rectangular channel (all pit, no slit):
#npits 1 20 65 5 0 sw
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining them to move and rotate together as a single rigid
# spherical object.
# NOTE: This fix should only be used when the user specifies a value for
# gamma (through the setGamma keyword) in the lb_fluid fix.
#----------------------------------------------------------------------------
fix 2 all lb/rigid/pc/sphere group 1 sphere1
#----------------------------------------------------------------------------
fix 2 all lb/viscous
fix 3 all rigid group 1 sphere1
#----------------------------------------------------------------------------
# Create variables for the center-of-mass and angular velocities, and output
@ -86,7 +108,9 @@ variable omegax equal omega(all,x)
variable omegay equal omega(all,y)
variable omegaz equal omega(all,z)
thermo_style custom v_vx v_vy v_vz v_omegax v_omegay v_omegaz
thermo 10
thermo_style custom step f_1[2] v_vx v_vy v_vz v_omegax v_omegay v_omegaz
thermo 500
run 200000
#dump dumpvtk all vtk 2500 dumpatoms*.vtp vx vy vz
run 2500

View File

@ -0,0 +1,193 @@
LAMMPS (17 Feb 2022)
#===========================================================================#
# Rigid sphere freely moving in a system with pressure driven flow through #
# a pit geometry. #
# #
# If uncommented, the example produces several output files: #
# 'flow.xdmf', 'flow.raw' ... xdmf and accompanying binary file for the #
# fluid density and velocity which can be read#
# and plotted using Paraview. #
# 'dumpatomsXX.vtp', 'dumpatomsXX_boundingBox.vtr' ... produces by the #
# dumpvtk routine (requires that lammps be #
# compiled with the vtk package). These filed#
# can also be read and plotted using Paraview.#
# XX is the timestep of the dump output. #
#===========================================================================#
units micro
dimension 3
boundary p p f
atom_style atomic
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 1.0 bin
neigh_modify delay 0 every 1
read_data data.one_radius16d2
Reading data file ...
orthogonal box = (-120 -100 -120) to (120 100 120)
1 by 1 by 1 MPI processor grid
reading atoms ...
320 atoms
read_data CPU = 0.010 seconds
#----------------------------------------------------------------------------
# None of the particles interact with one another.
#----------------------------------------------------------------------------
pair_style lj/cut 2.45
pair_coeff * * 0.0 0.0 2.45
neigh_modify exclude type 1 1
mass * 100.0
timestep 2.0
group sphere1 id <> 1 320
320 atoms in group sphere1
#----------------------------------------------------------------------------
# Colloidal particle is initially stationary.
#----------------------------------------------------------------------------
velocity all set 0.0 0.0 0.0 units box
#----------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# All of the particles in the simulation apply a force to the fluid.
# (however, this fix does not explicity apply a force back on to these
# particles...this is accomplished through the use of the lb/viscous fix).
# Set the fluid density = 1.0, fluid viscosity = 1.0 (water), and lattice
# spacing dx=4.0.
# dumpxdmf is set to output to the xdmf file (fflow.xdmf and fflow.raw) every
# 2500 steps, indexed by the frame number (rather than timestep).
# The flow is generated via a pressure jump at the otherwise periodic x-
# boundary using the pressurebcx option.
# The initial conditions are set as linear interpolation between boundary
# values using the linearInit option.
#-----------------------------------------------------------------------------
fix 1 all lb/fluid 1 1.0 1.0 dx 4.0 linearInit pressurebcx 0.01 npits 2 20 40 5 0 wp 30 # dumpxdmf 2500 fflow 0
Using a lattice-Boltzmann grid of 60 by 50 by 61 total grid points. (../fix_lb_fluid.cpp:486)
length of pits and end segments larger than system size in x-direction: truncation will occur (../fix_lb_fluid.cpp:505)
Local Grid Geometry created. (../fix_lb_fluid.cpp:1018)
#-----------------------------------------------------------------------------
# You can get some other interesting geometries by replacing the npits options
# at the end of the above lb/fluid fix with one of the following:
#-----------------------------------------------------------------------------
# Channel with 2 pits placed symmetrically about center in x:
#npits 2 20 20 10 5 sw
# Channel with 1 pit placed at center:
#npits 1 20 20 20 sw
# Full channel with 1 "speedbump" placed in right end of the channel:
#npits 2 20 40 5 0 sw
# Channel with 2 "potholes" placed symmetrically about center in x:
#npits 2 20 15 10 10 wp 30
# Channel with T-shaped cross-section with a "speedbump" in right end:
#npits 2 20 40 5 0 wp 30
# Long rectangular channel (all pit, no slit):
#npits 1 20 65 5 0 sw
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining them to move and rotate together as a single rigid
# spherical object.
#----------------------------------------------------------------------------
fix 2 all lb/viscous
fix 3 all rigid group 1 sphere1
1 rigid bodies with 320 atoms
#----------------------------------------------------------------------------
# Create variables for the center-of-mass and angular velocities, and output
# these quantities to the screen.
#----------------------------------------------------------------------------
variable vx equal vcm(all,x)
variable vy equal vcm(all,y)
variable vz equal vcm(all,z)
variable omegax equal omega(all,x)
variable omegay equal omega(all,y)
variable omegaz equal omega(all,z)
thermo_style custom step f_1[2] v_vx v_vy v_vz v_omegax v_omegay v_omegaz
thermo 500
#dump dumpvtk all vtk 2500 dumpatoms*.vtp vx vy vz
run 2500
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix lb/fluid command:
@Article{Denniston et al.,
author = {C. Denniston, N. Afrasiabian, M.G. Cole-Andre,F.E. Mackay, S.T.T. Ollila, T. Whitehead},
title = {LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid}, journal = {Comp.~Phys.~Comm.},
year = 2022,
volume = 275,
pages = {108318}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.45
ghost atom cutoff = 3.45
binsize = 1.725, bins = 140 116 140
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 14.01 | 14.01 | 14.01 Mbytes
Step f_1[2] v_vx v_vy v_vz v_omegax v_omegay v_omegaz
0 10054461 0 0 0 0 0 0
500 10055203 0.008268321 2.9442616e-05 0.0019660229 -5.0307394e-07 2.1873981e-05 2.2701522e-07
1000 10055487 0.015301314 4.219514e-05 0.0029217734 -6.9936017e-07 6.8198965e-05 5.2031048e-07
1500 10055663 0.02117119 2.9194379e-05 0.002365636 -7.5401298e-07 0.00011557032 4.0311183e-07
2000 10055781 0.02523262 -9.149834e-06 -0.0001724854 -2.5872732e-07 0.00014864932 3.7644295e-07
2500 10055866 0.02651785 -5.2469712e-05 -0.0030476651 2.9151609e-07 0.00014663544 7.8650891e-07
Loop time of 111.461 on 1 procs for 2500 steps with 320 atoms
Performance: 3875808849.457 ns/day, 0.000 hours/ns, 22.429 timesteps/s
100.0% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.0072314 | 0.0072314 | 0.0072314 | 0.0 | 0.01
Neigh | 0.26791 | 0.26791 | 0.26791 | 0.0 | 0.24
Comm | 0.0092553 | 0.0092553 | 0.0092553 | 0.0 | 0.01
Output | 0.0054858 | 0.0054858 | 0.0054858 | 0.0 | 0.00
Modify | 111.15 | 111.15 | 111.15 | 0.0 | 99.72
Other | | 0.01779 | | | 0.02
Nlocal: 320 ave 320 max 320 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 176
Dangerous builds = 0
Total wall time: 0:01:51

View File

@ -0,0 +1,193 @@
LAMMPS (17 Feb 2022)
#===========================================================================#
# Rigid sphere freely moving in a system with pressure driven flow through #
# a pit geometry. #
# #
# If uncommented, the example produces several output files: #
# 'flow.xdmf', 'flow.raw' ... xdmf and accompanying binary file for the #
# fluid density and velocity which can be read#
# and plotted using Paraview. #
# 'dumpatomsXX.vtp', 'dumpatomsXX_boundingBox.vtr' ... produces by the #
# dumpvtk routine (requires that lammps be #
# compiled with the vtk package). These filed#
# can also be read and plotted using Paraview.#
# XX is the timestep of the dump output. #
#===========================================================================#
units micro
dimension 3
boundary p p f
atom_style atomic
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
#----------------------------------------------------------------------------
neighbor 1.0 bin
neigh_modify delay 0 every 1
read_data data.one_radius16d2
Reading data file ...
orthogonal box = (-120 -100 -120) to (120 100 120)
2 by 1 by 2 MPI processor grid
reading atoms ...
320 atoms
read_data CPU = 0.012 seconds
#----------------------------------------------------------------------------
# None of the particles interact with one another.
#----------------------------------------------------------------------------
pair_style lj/cut 2.45
pair_coeff * * 0.0 0.0 2.45
neigh_modify exclude type 1 1
mass * 100.0
timestep 2.0
group sphere1 id <> 1 320
320 atoms in group sphere1
#----------------------------------------------------------------------------
# Colloidal particle is initially stationary.
#----------------------------------------------------------------------------
velocity all set 0.0 0.0 0.0 units box
#----------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# All of the particles in the simulation apply a force to the fluid.
# (however, this fix does not explicity apply a force back on to these
# particles...this is accomplished through the use of the lb/viscous fix).
# Set the fluid density = 1.0, fluid viscosity = 1.0 (water), and lattice
# spacing dx=4.0.
# dumpxdmf is set to output to the xdmf file (fflow.xdmf and fflow.raw) every
# 2500 steps, indexed by the frame number (rather than timestep).
# The flow is generated via a pressure jump at the otherwise periodic x-
# boundary using the pressurebcx option.
# The initial conditions are set as linear interpolation between boundary
# values using the linearInit option.
#-----------------------------------------------------------------------------
fix 1 all lb/fluid 1 1.0 1.0 dx 4.0 linearInit pressurebcx 0.01 npits 2 20 40 5 0 wp 30 # dumpxdmf 2500 fflow 0
Using a lattice-Boltzmann grid of 60 by 50 by 61 total grid points. (../fix_lb_fluid.cpp:486)
length of pits and end segments larger than system size in x-direction: truncation will occur (../fix_lb_fluid.cpp:505)
Local Grid Geometry created. (../fix_lb_fluid.cpp:1018)
#-----------------------------------------------------------------------------
# You can get some other interesting geometries by replacing the npits options
# at the end of the above lb/fluid fix with one of the following:
#-----------------------------------------------------------------------------
# Channel with 2 pits placed symmetrically about center in x:
#npits 2 20 20 10 5 sw
# Channel with 1 pit placed at center:
#npits 1 20 20 20 sw
# Full channel with 1 "speedbump" placed in right end of the channel:
#npits 2 20 40 5 0 sw
# Channel with 2 "potholes" placed symmetrically about center in x:
#npits 2 20 15 10 10 wp 30
# Channel with T-shaped cross-section with a "speedbump" in right end:
#npits 2 20 40 5 0 wp 30
# Long rectangular channel (all pit, no slit):
#npits 1 20 65 5 0 sw
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining them to move and rotate together as a single rigid
# spherical object.
#----------------------------------------------------------------------------
fix 2 all lb/viscous
fix 3 all rigid group 1 sphere1
1 rigid bodies with 320 atoms
#----------------------------------------------------------------------------
# Create variables for the center-of-mass and angular velocities, and output
# these quantities to the screen.
#----------------------------------------------------------------------------
variable vx equal vcm(all,x)
variable vy equal vcm(all,y)
variable vz equal vcm(all,z)
variable omegax equal omega(all,x)
variable omegay equal omega(all,y)
variable omegaz equal omega(all,z)
thermo_style custom step f_1[2] v_vx v_vy v_vz v_omegax v_omegay v_omegaz
thermo 500
#dump dumpvtk all vtk 2500 dumpatoms*.vtp vx vy vz
run 2500
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix lb/fluid command:
@Article{Denniston et al.,
author = {C. Denniston, N. Afrasiabian, M.G. Cole-Andre,F.E. Mackay, S.T.T. Ollila, T. Whitehead},
title = {LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid}, journal = {Comp.~Phys.~Comm.},
year = 2022,
volume = 275,
pages = {108318}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.45
ghost atom cutoff = 3.45
binsize = 1.725, bins = 140 116 140
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 6.973 | 6.973 | 6.973 Mbytes
Step f_1[2] v_vx v_vy v_vz v_omegax v_omegay v_omegaz
0 10054461 0 0 0 0 0 0
500 10055203 0.008268321 2.9442616e-05 0.0019660229 -5.0307394e-07 2.1873981e-05 2.2701522e-07
1000 10055487 0.015301314 4.219514e-05 0.0029217734 -6.9936017e-07 6.8198965e-05 5.2031048e-07
1500 10055663 0.02117119 2.9194379e-05 0.002365636 -7.5401298e-07 0.00011557032 4.0311183e-07
2000 10055781 0.02523262 -9.149834e-06 -0.0001724854 -2.5872732e-07 0.00014864932 3.7644295e-07
2500 10055866 0.02651785 -5.2469712e-05 -0.0030476651 2.9151609e-07 0.00014663544 7.8650891e-07
Loop time of 86.7379 on 4 procs for 2500 steps with 320 atoms
Performance: 4980523049.256 ns/day, 0.000 hours/ns, 28.822 timesteps/s
99.1% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.005625 | 0.0081021 | 0.011663 | 2.9 | 0.01
Neigh | 0.25946 | 0.26966 | 0.28604 | 2.0 | 0.31
Comm | 0.032947 | 0.047576 | 0.069872 | 7.0 | 0.05
Output | 0.0038996 | 0.0041104 | 0.0047328 | 0.6 | 0.00
Modify | 86.297 | 86.325 | 86.351 | 0.3 | 99.52
Other | | 0.08361 | | | 0.10
Nlocal: 80 ave 219 max 0 min
Histogram: 2 0 0 0 1 0 0 0 0 1
Nghost: 17.75 ave 36 max 0 min
Histogram: 2 0 0 0 0 0 0 0 0 2
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 176
Dangerous builds = 0
Total wall time: 0:01:26

View File

@ -2,9 +2,9 @@
320 atoms
1 atom types
-160.0 160.0 xlo xhi
-160.0 160.0 ylo yhi
-40.0 280.0 zlo zhi
-120.0 120.0 xlo xhi
-120.0 120.0 ylo yhi
-120.0 120.0 zlo zhi
Atoms

View File

@ -1,16 +1,11 @@
#===========================================================================#
# Rigid sphere freely moving near a stationary plane wall in a system #
# undergoing shear flow. #
# undergoing shear flow. #
# Every 10 time steps the center of mass velocity and angular velocity of #
# the sphere are printed to the screen. #
# #
# Here, gamma (used in the calculation of the particle-fluid interaction #
# force) is calculated by default. Thus, the colloidal objects will have #
# a slightly larger "hydrodynamic" radii than given by the placement of #
# the particle nodes. #
# the sphere are printed to the screen. #
# To run this example, LAMMPS needs to be compiled with a the following #
# packages: RIGID, LATBOLTZ #
# #
# Sample output from this run can be found in the file: #
# 'wall_defaultgamma.out' #
#===========================================================================#
units micro
@ -28,9 +23,12 @@ atom_style atomic
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
# The communcation cutoff is set to 2.5 dx to ensure that all particles in the
# processor ghost fluid region (of width 2dx) are known to local processor.
#----------------------------------------------------------------------------
neighbor 1.0 bin
neigh_modify delay 0 every 1
comm_modify cutoff 10.0
read_data data.one_radius16d2
@ -41,8 +39,9 @@ pair_style lj/cut 2.45
pair_coeff * * 0.0 0.0 2.45
neigh_modify exclude type 1 1
mass * 100.0
timestep 3.0
mass * 1.0
timestep 4.0
group sphere1 id <> 1 320
@ -55,21 +54,15 @@ velocity all set 0.0 0.0 0.0 units box
# Create a lattice-Boltzmann fluid covering the simulation domain.
# All of the particles in the simulation apply a force to the fluid.
# (however, this fix does not explicitly apply a force back on to these
# particles...this is accomplished through the use of the viscous_lb fix.
# Use the standard LB integration scheme, a fluid density = 1.0,
# fluid viscosity = 1.0, lattice spacing dx=4.0, and mass unit, dm=10.0.
# Use the default method to calculate the interaction force between the
# particles and the fluid. This calculation requires the surface area
# of the composite object represented by each particle node. By default
# this area is assumed equal to dx*dx; however, since this is not the case
# here, it is input through the setArea keyword (i.e. particles of type 1
# correspond to a surface area of 10.3059947).
# Use the trilinear interpolation stencil to distribute the force from
# a given particle onto the fluid mesh.
# particles...this is accomplished through the use of the lb/viscous fix.
# Use a fluid density = 1.0, fluid viscosity = 1.0 (water), and a lattice
# spacing dx=4.0.
# Use the trilinear interpolation stencil (default) to distribute the force
# from a given particle onto the fluid mesh.
# Create shear in the system, by giving the upper z-wall a velocity of 0.0001
# along the y-direction, while keeping the lower z-wall stationary.
#-----------------------------------------------------------------------------
fix 1 all lb/fluid 1 1 1.0 1.0 setArea 1 10.3059947 dx 4.0 dm 10.0 trilinear zwall_velocity 0.0 0.0001
fix 1 all lb/fluid 1 1.0 1.0 dx 4.0 zwall_velocity 0.0 0.0001
#----------------------------------------------------------------------------
# Apply the force due to the fluid onto the particles.
@ -78,13 +71,18 @@ fix 2 all lb/viscous
#----------------------------------------------------------------------------
# Integrate the motion of the particles, constraining them to move and
# rotate together as a single rigid spherical object.
# rotate together as a single rigid spherical object. Use the first
# version to allow the sphere to freely rotate and move with the fluid
# and the 2nd version to measure the force and torque on a fixed sphere
# in the shear flow which will allow you to measure the Stokes drag and
# torque on the sphere.
#----------------------------------------------------------------------------
fix 3 all rigid group 1 sphere1
fix 3 all rigid group 1 sphere1
#fix 3 all rigid group 1 sphere1 force * off off off torque * off off off
#----------------------------------------------------------------------------
# Create variables for the center-of-mass and angular velocities, and output
# these quantities to the screen.
# Create variables for the center-of-mass velocities, angular velocities, and
# force and torque on the CM. Then output these quantities to the screen.
#----------------------------------------------------------------------------
variable vx equal vcm(all,x)
variable vy equal vcm(all,y)
@ -92,8 +90,14 @@ variable vz equal vcm(all,z)
variable omegax equal omega(all,x)
variable omegay equal omega(all,y)
variable omegaz equal omega(all,z)
variable fx equal fcm(all,x)
variable fy equal fcm(all,y)
variable fz equal fcm(all,z)
variable tx equal torque(all,x)
variable ty equal torque(all,y)
variable tz equal torque(all,z)
thermo_style custom v_vx v_vy v_vz v_omegax v_omegay v_omegaz
thermo 10
thermo_style custom v_vx v_vy v_vz v_omegax v_omegay v_omegaz v_fx v_fy v_fz v_tx v_ty v_tz
thermo 100
run 200000
run 7500

View File

@ -0,0 +1,249 @@
LAMMPS (17 Feb 2022)
#===========================================================================#
# Rigid sphere freely moving near a stationary plane wall in a system #
# undergoing shear flow. #
# Every 10 time steps the center of mass velocity and angular velocity of #
# the sphere are printed to the screen. #
# To run this example, LAMMPS needs to be compiled with a the following #
# packages: RIGID, LATBOLTZ #
# #
#===========================================================================#
units micro
dimension 3
boundary p p f
atom_style atomic
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The arguments for neigh_modify have been set to "delay 0 every 1", again
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid. However, these values can likely
# be somewhat increased without issue. If a problem does arise (a particle
# is outside of its processors LB grid) an error message is printed and
# the simulation is terminated.
# The communcation cutoff is set to 2.5 dx to ensure that all particles in the
# processor ghost fluid region (of width 2dx) are known to local processor.
#----------------------------------------------------------------------------
neighbor 1.0 bin
neigh_modify delay 0 every 1
comm_modify cutoff 10.0
read_data data.one_radius16d2
Reading data file ...
orthogonal box = (-120 -120 -120) to (120 120 120)
1 by 2 by 2 MPI processor grid
reading atoms ...
320 atoms
read_data CPU = 0.015 seconds
#----------------------------------------------------------------------------
# None of the particles interact with one another.
#----------------------------------------------------------------------------
pair_style lj/cut 2.45
pair_coeff * * 0.0 0.0 2.45
neigh_modify exclude type 1 1
mass * 1.0
timestep 4.0
group sphere1 id <> 1 320
320 atoms in group sphere1
#----------------------------------------------------------------------------
# Colloidal particle is initially stationary.
#----------------------------------------------------------------------------
velocity all set 0.0 0.0 0.0 units box
#----------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# All of the particles in the simulation apply a force to the fluid.
# (however, this fix does not explicitly apply a force back on to these
# particles...this is accomplished through the use of the lb/viscous fix.
# Use a fluid density = 1.0, fluid viscosity = 1.0 (water), and a lattice
# spacing dx=4.0.
# Use the trilinear interpolation stencil (default) to distribute the force
# from a given particle onto the fluid mesh.
# Create shear in the system, by giving the upper z-wall a velocity of 0.0001
# along the y-direction, while keeping the lower z-wall stationary.
#-----------------------------------------------------------------------------
fix 1 all lb/fluid 1 1.0 1.0 dx 4.0 zwall_velocity 0.0 0.0001
Using a lattice-Boltzmann grid of 60 by 60 by 61 total grid points. (../fix_lb_fluid.cpp:486)
Local Grid Geometry created. (../fix_lb_fluid.cpp:1018)
#----------------------------------------------------------------------------
# Apply the force due to the fluid onto the particles.
#----------------------------------------------------------------------------
fix 2 all lb/viscous
#----------------------------------------------------------------------------
# Integrate the motion of the particles, constraining them to move and
# rotate together as a single rigid spherical object. Use the first
# version to allow the sphere to freely rotate and move with the fluid
# and the 2nd version to measure the force and torque on a fixed sphere
# in the shear flow which will allow you to measure the Stokes drag and
# torque on the sphere.
#----------------------------------------------------------------------------
fix 3 all rigid group 1 sphere1
1 rigid bodies with 320 atoms
#fix 3 all rigid group 1 sphere1 force * off off off torque * off off off
#----------------------------------------------------------------------------
# Create variables for the center-of-mass velocities, angular velocities, and
# force and torque on the CM. Then output these quantities to the screen.
#----------------------------------------------------------------------------
variable vx equal vcm(all,x)
variable vy equal vcm(all,y)
variable vz equal vcm(all,z)
variable omegax equal omega(all,x)
variable omegay equal omega(all,y)
variable omegaz equal omega(all,z)
variable fx equal fcm(all,x)
variable fy equal fcm(all,y)
variable fz equal fcm(all,z)
variable tx equal torque(all,x)
variable ty equal torque(all,y)
variable tz equal torque(all,z)
thermo_style custom v_vx v_vy v_vz v_omegax v_omegay v_omegaz v_fx v_fy v_fz v_tx v_ty v_tz
thermo 100
run 7500
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix lb/fluid command:
@Article{Denniston et al.,
author = {C. Denniston, N. Afrasiabian, M.G. Cole-Andre,F.E. Mackay, S.T.T. Ollila, T. Whitehead},
title = {LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid}, journal = {Comp.~Phys.~Comm.},
year = 2022,
volume = 275,
pages = {108318}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.45
ghost atom cutoff = 10
binsize = 1.725, bins = 140 140 140
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 8.426 | 8.426 | 8.426 Mbytes
v_vx v_vy v_vz v_omegax v_omegay v_omegaz v_fx v_fy v_fz v_tx v_ty v_tz
0 0 0 0 0 0 0 0 0 0 0 0
-2.3202888e-15 6.0709101e-09 -2.4412623e-13 -3.320168e-10 -1.1339769e-14 3.4045799e-14 -4.5990491e-16 3.6944668e-08 -1.4797148e-12 -3.3087894e-07 -3.2319943e-12 4.0825356e-11
2.2614166e-13 3.5465948e-07 -9.9990351e-12 -1.2716738e-08 -5.1515303e-13 1.1802563e-12 4.4099503e-13 6.2398067e-07 -1.4010079e-11 -3.2779726e-06 -5.5610241e-11 3.8420418e-10
9.9446526e-13 1.6203654e-06 -2.9965809e-11 -4.2770461e-08 -1.8551769e-12 3.935908e-12 7.0873308e-13 1.3654678e-06 -1.6036096e-11 -4.7351845e-06 -9.5164548e-11 5.5370816e-10
1.8577304e-12 3.6408926e-06 -4.7867194e-11 -7.6340276e-08 -3.4227185e-12 7.0027746e-12 6.4525598e-13 1.8162442e-06 -1.2450308e-11 -4.49885e-06 -9.721214e-11 5.2404154e-10
2.5784818e-12 6.0541618e-06 -6.1511675e-11 -1.0586215e-07 -4.8340636e-12 9.6842864e-12 5.0954806e-13 2.0115015e-06 -9.6836459e-12 -3.7358552e-06 -8.3756951e-11 4.3294805e-10
3.1388911e-12 8.606157e-06 -7.2849939e-11 -1.2968814e-07 -5.9880947e-12 1.18341e-11 3.9602348e-13 2.0531243e-06 -8.7301633e-12 -2.9477e-06 -6.7497759e-11 3.3979481e-10
3.5088487e-12 1.1153105e-05 -8.4778552e-11 -1.4827121e-07 -6.9042127e-12 1.3490413e-11 1.4926704e-13 2.012457e-06 -1.1121284e-11 -2.2774279e-06 -5.6689366e-11 2.5766138e-10
3.6203369e-12 1.3620493e-05 -1.0074918e-10 -1.6255823e-07 -7.6327828e-12 1.4733197e-11 2.8190134e-14 1.9308502e-06 -1.3951766e-11 -1.743828e-06 -4.5410719e-11 1.9387811e-10
3.5893239e-12 1.5972746e-05 -1.1992769e-10 -1.7347444e-07 -8.2060683e-12 1.5658564e-11 -7.5902354e-14 1.8309433e-06 -1.6655785e-11 -1.3300214e-06 -3.6956327e-11 1.4453207e-10
3.4369216e-12 1.8195336e-05 -1.4242882e-10 -1.8179239e-07 -8.6609693e-12 1.6339062e-11 -1.5582523e-13 1.7248165e-06 -1.9125572e-11 -1.0126439e-06 -3.0479042e-11 1.0521684e-10
3.1272907e-12 2.0284863e-05 -1.6693014e-10 -1.8812271e-07 -9.0539095e-12 1.6840547e-11 -3.2806998e-13 1.6187734e-06 -1.7338933e-11 -7.7034531e-07 -4.18956e-11 7.893297e-11
2.6336268e-12 2.2243653e-05 -1.8945116e-10 -1.9293745e-07 -9.4581385e-12 1.720649e-11 -4.4473581e-13 1.5159979e-06 -1.8187251e-11 -5.858335e-07 -3.9427386e-11 5.7483932e-11
2.0046303e-12 2.4076859e-05 -2.0991971e-10 -1.9659836e-07 -9.7540611e-12 1.7464607e-11 -5.3232938e-13 1.417998e-06 -1.33357e-11 -4.4535934e-07 -2.2183067e-11 4.087927e-11
1.8043659e-12 2.57909e-05 -2.251392e-10 -1.9938137e-07 -9.9135163e-12 1.7702226e-11 -8.1829532e-14 1.3253893e-06 -1.1758285e-11 -3.3855787e-07 -1.1111144e-11 3.6790045e-11
1.6716765e-12 2.7392642e-05 -2.3970723e-10 -2.0149677e-07 -1.0039419e-11 1.7837499e-11 -9.9475985e-14 1.2383189e-06 -1.1662512e-11 -2.5732441e-07 -9.4988118e-12 2.1805637e-11
1.4587868e-12 2.8888967e-05 -2.5363201e-10 -2.0310437e-07 -1.0169348e-11 1.7892616e-11 -5.6898373e-14 1.1566938e-06 -9.8557007e-12 -1.9551474e-07 -1.9984471e-11 4.8846772e-12
1.4100591e-12 3.0286556e-05 -2.6363101e-10 -2.0432561e-07 -1.0375492e-11 1.7885827e-11 -2.116508e-13 1.0803004e-06 -7.2760242e-12 -1.484988e-07 -1.9669998e-11 -3.7541543e-12
5.0115337e-13 3.1591785e-05 -2.7207072e-10 -2.0525299e-07 -1.040677e-11 1.7783826e-11 -8.2321665e-13 1.0088701e-06 -4.5772437e-12 -1.1272217e-07 4.4307683e-12 -3.0620406e-12
-5.8233e-13 3.2810682e-05 -2.7706702e-10 -2.0595685e-07 -1.0331077e-11 1.7711421e-11 -9.0024161e-13 9.4212051e-07 -1.7450813e-12 -8.552747e-08 1.6465807e-11 -1.1919394e-11
-1.2278986e-12 3.3948917e-05 -2.7737567e-10 -2.0649056e-07 -1.0269686e-11 1.7690544e-11 -2.7606089e-13 8.7976413e-07 1.1137199e-12 -6.4828506e-08 5.969611e-12 6.1895863e-12
-1.5406065e-12 3.5011807e-05 -2.7530664e-10 -2.0689506e-07 -1.0230405e-11 1.7713982e-11 -2.4182843e-13 8.2152268e-07 2.0572801e-12 -4.9118994e-08 6.9332841e-12 4.3109123e-12
-1.8436988e-12 3.6004328e-05 -2.7268697e-10 -2.0720139e-07 -1.0182673e-11 1.7730423e-11 -2.4623511e-13 7.6712961e-07 2.060507e-12 -3.7177338e-08 8.304141e-12 2.8568851e-12
-2.1592812e-12 3.693113e-05 -2.7044735e-10 -2.074331e-07 -1.0124124e-11 1.7740913e-11 -2.6133386e-13 7.1633405e-07 1.4428527e-12 -2.8098731e-08 9.7066289e-12 1.8079946e-12
-2.1007619e-12 3.7796564e-05 -2.6680968e-10 -2.0760821e-07 -9.9957059e-12 1.7730904e-11 3.5315241e-13 6.689009e-07 3.8443622e-12 -2.1224576e-08 2.4710992e-11 -1.7986278e-12
-1.9557805e-12 3.860469e-05 -2.5957119e-10 -2.0774047e-07 -9.8753834e-12 1.7718848e-11 -2.9478921e-14 6.2460647e-07 6.106131e-12 -1.6021507e-08 1.1023998e-11 4.1076291e-12
-2.032736e-12 3.9359303e-05 -2.5158305e-10 -2.0784005e-07 -9.7873438e-12 1.7712473e-11 -5.9512464e-14 5.8324585e-07 6.1916716e-12 -1.2039909e-08 1.2585113e-11 -1.3834171e-12
-2.1127776e-12 4.0063946e-05 -2.440354e-10 -2.0791478e-07 -9.6912281e-12 1.7690577e-11 -6.3724538e-14 5.4462318e-07 5.7542824e-12 -9.0191552e-09 1.4276089e-11 -2.3574292e-12
-2.3902344e-12 4.0721927e-05 -2.3654619e-10 -2.0797067e-07 -9.6167465e-12 1.7704683e-11 -4.4176097e-13 5.0855857e-07 6.2479839e-12 -6.7282157e-09 6.7015199e-12 9.6977453e-12
-2.9449998e-12 4.1336337e-05 -2.2904024e-10 -2.0801226e-07 -9.5792815e-12 1.7759253e-11 -4.1120238e-13 4.7488125e-07 5.6719561e-12 -4.9923338e-09 5.5881453e-12 9.0637113e-12
-3.4106994e-12 4.191006e-05 -2.2244742e-10 -2.0804302e-07 -9.5439345e-12 1.7819348e-11 -3.2449553e-13 4.4343429e-07 4.8497242e-12 -3.6777395e-09 5.1150823e-12 9.0947463e-12
-3.5852249e-12 4.2445791e-05 -2.1618947e-10 -2.080656e-07 -9.4749377e-12 1.7845812e-11 1.0655839e-13 4.1407045e-07 5.2707815e-12 -2.6881271e-09 1.5541392e-11 -1.5116726e-12
-3.4019698e-12 4.2946045e-05 -2.1010849e-10 -2.0808201e-07 -9.3573737e-12 1.7835452e-11 1.6858729e-13 3.8665059e-07 4.4152799e-12 -1.938804e-09 1.7265863e-11 -1.6678153e-12
-3.1820565e-12 4.3413174e-05 -2.0519131e-10 -2.0809376e-07 -9.2323294e-12 1.782123e-11 2.7307342e-13 3.6104485e-07 4.5405606e-12 -1.381731e-09 7.844705e-12 -2.1593177e-11
-1.9265518e-12 4.3849368e-05 -1.9974093e-10 -2.081021e-07 -9.2365556e-12 1.7734315e-11 9.3143689e-13 3.3713551e-07 4.5961813e-12 -9.3911384e-10 -1.0492532e-11 -3.4710604e-11
-7.5558483e-13 4.4256676e-05 -1.9451038e-10 -2.0810757e-07 -9.2981772e-12 1.7593311e-11 8.8290403e-13 3.1481065e-07 3.7293121e-12 -5.9201041e-10 -1.920229e-12 -4.5261347e-12
-6.8078423e-14 4.4637011e-05 -1.9017e-10 -2.0811091e-07 -9.2985302e-12 1.7560504e-11 2.3613824e-13 2.9396314e-07 2.8306791e-12 -3.6072498e-10 1.919591e-12 5.7324777e-14
-2.6872645e-13 4.4992159e-05 -1.8489448e-10 -2.081129e-07 -9.1988109e-12 1.7585096e-11 -3.7386314e-13 2.7449607e-07 4.3641203e-12 -2.0179873e-10 1.7903185e-11 9.4883417e-12
-7.6146932e-13 4.5323788e-05 -1.7973612e-10 -2.0811387e-07 -9.067395e-12 1.7625673e-11 -4.0029726e-13 2.5631874e-07 3.8153502e-12 -7.7154264e-11 1.864561e-11 7.0852862e-12
-1.0073144e-12 4.5633459e-05 -1.7567167e-10 -2.0811405e-07 -8.9461618e-12 1.7602722e-11 -8.8146729e-14 2.3934617e-07 2.900483e-12 1.3609831e-11 1.8144897e-11 -1.0950951e-12
-1.1183452e-12 4.5922622e-05 -1.7267861e-10 -2.0811371e-07 -8.8220108e-12 1.7567954e-11 -8.7131925e-14 2.2349647e-07 1.9871901e-12 7.3396979e-11 1.8201205e-11 -3.3808282e-12
-1.2336249e-12 4.6192637e-05 -1.7082009e-10 -2.0811304e-07 -8.6931853e-12 1.7534253e-11 -1.0358975e-13 2.0869604e-07 9.8971584e-13 1.1034572e-10 1.8570854e-11 -4.1945968e-12
-1.395039e-12 4.644477e-05 -1.7090836e-10 -2.0811204e-07 -8.5394724e-12 1.7470422e-11 -2.2192138e-13 1.9487513e-07 -1.0653437e-12 1.5048013e-10 2.2960595e-11 -7.9254026e-12
-1.5887239e-12 4.6680205e-05 -1.726235e-10 -2.0811078e-07 -8.3735722e-12 1.7394789e-11 5.3191009e-14 1.8196634e-07 -1.4136613e-12 2.2963534e-10 2.654505e-11 -1.8261053e-12
-1.4689452e-12 4.6900047e-05 -1.7480066e-10 -2.081091e-07 -8.2058094e-12 1.7351678e-11 1.2094829e-13 1.6991911e-07 -2.6013388e-12 2.4677201e-10 1.76692e-11 -7.1825235e-12
-1.3595687e-12 4.7105333e-05 -1.7899795e-10 -2.081074e-07 -8.0435813e-12 1.7311436e-11 -2.3058185e-13 1.586669e-07 -5.9352116e-12 2.143538e-10 3.2425344e-11 -1.0330713e-11
-1.6431943e-12 4.7297025e-05 -1.8929524e-10 -2.0810597e-07 -7.7996954e-12 1.7199148e-11 -2.3195078e-13 1.4815965e-07 -9.1089087e-12 2.0069043e-10 2.7268474e-11 -1.5424889e-11
-1.9503819e-12 4.7476021e-05 -2.0221518e-10 -2.0810468e-07 -7.655314e-12 1.7080428e-11 -2.618849e-13 1.383469e-07 -1.0767028e-11 1.6168876e-10 1.2892606e-11 -1.6616695e-11
-2.293052e-12 4.7643164e-05 -2.1485895e-10 -2.0810355e-07 -7.6010878e-12 1.6957401e-11 -2.8846319e-13 1.2918561e-07 -9.5229628e-12 1.583733e-10 4.7988904e-12 -1.7439504e-11
-2.5677362e-12 4.7799238e-05 -2.3224794e-10 -2.0810274e-07 -7.733652e-12 1.6817843e-11 4.7024153e-15 1.2062891e-07 -1.6977112e-11 1.0067875e-10 -5.9706483e-12 -6.6309632e-12
-2.5737947e-12 4.7944975e-05 -2.542538e-10 -2.0810213e-07 -7.6510888e-12 1.676216e-11 -3.154599e-14 1.1264034e-07 -1.7155189e-11 8.6731774e-11 1.320634e-11 -5.9239428e-12
-3.3012431e-12 4.808106e-05 -2.7606974e-10 -2.0810154e-07 -7.5285751e-12 1.6730121e-11 -5.5195274e-13 1.051819e-07 -1.8102675e-11 7.9086408e-11 2.549833e-11 3.8248179e-12
-4.0407963e-12 4.8208133e-05 -2.9913872e-10 -2.0810087e-07 -7.3675841e-12 1.6729661e-11 -1.056947e-13 9.8215693e-08 -2.0564122e-11 8.9889186e-11 9.0969559e-12 -5.0411456e-12
-4.0017866e-12 4.8326792e-05 -3.2578824e-10 -2.0810019e-07 -7.3309734e-12 1.6685377e-11 3.9903591e-14 9.1714102e-08 -2.2544733e-11 9.4144708e-11 -9.2931714e-12 5.3254879e-12
-3.7606866e-12 4.8437596e-05 -3.5569049e-10 -2.080996e-07 -7.4780802e-12 1.6680934e-11 2.7466593e-13 8.5641003e-08 -2.425075e-11 7.7669196e-11 -2.2631547e-11 5.8077979e-13
-3.4574887e-12 4.8541063e-05 -3.8545474e-10 -2.0809901e-07 -7.6093713e-12 1.6646067e-11 2.5876746e-14 7.997313e-08 -2.317586e-11 1.0544046e-10 -1.5314944e-11 6.8357155e-12
-2.9114149e-12 4.8637681e-05 -4.1425452e-10 -2.0809838e-07 -7.7070087e-12 1.6659672e-11 6.2786281e-13 7.4677646e-08 -2.2436087e-11 8.9235324e-11 -1.3645085e-11 1.4694507e-11
-2.2825362e-12 4.8727902e-05 -4.4462584e-10 -2.0809808e-07 -7.7463431e-12 1.6727387e-11 4.986996e-13 6.973271e-08 -2.3823592e-11 4.8349103e-11 -4.917953e-12 1.0180248e-11
-1.6721448e-12 4.881215e-05 -4.7395477e-10 -2.080978e-07 -7.798864e-12 1.6781065e-11 5.8461703e-13 6.5116697e-08 -2.2923269e-11 3.3917578e-11 -1.4512356e-11 3.0753823e-12
-1.0108835e-12 4.889082e-05 -5.0054848e-10 -2.0809742e-07 -7.8734886e-12 1.6821117e-11 5.5262937e-13 6.0804995e-08 -2.0048603e-11 6.7540691e-11 -9.5748309e-12 5.1419531e-12
-5.2913704e-13 4.8964281e-05 -5.2361079e-10 -2.0809688e-07 -7.9342525e-12 1.6809498e-11 1.7857863e-13 5.6779412e-08 -1.7008275e-11 8.4873628e-11 -8.0821684e-12 -1.3432203e-11
-6.0869323e-13 4.9032877e-05 -5.4391464e-10 -2.0809612e-07 -7.9700834e-12 1.6669189e-11 -2.2181063e-13 5.3018043e-08 -1.6188875e-11 1.2254388e-10 -3.4719243e-12 -2.5582696e-11
5.3160987e-14 4.909693e-05 -5.685844e-10 -2.0809534e-07 -7.8445232e-12 1.6543112e-11 3.7931128e-13 4.9508006e-08 -2.3478774e-11 1.0539577e-10 3.8278786e-11 -1.7435743e-11
6.9879599e-13 4.9156741e-05 -6.0029127e-10 -2.0809434e-07 -7.4710339e-12 1.6485438e-11 5.2135936e-13 4.6228138e-08 -2.7953013e-11 1.1306415e-10 3.9827585e-11 -4.0676347e-12
1.3291032e-12 4.921259e-05 -6.3478917e-10 -2.0809343e-07 -7.1919325e-12 1.6475734e-11 8.0744289e-13 4.3164468e-08 -2.9352787e-11 1.9393928e-10 2.1395748e-11 -1.3540015e-11
1.9099631e-12 4.9264739e-05 -6.713946e-10 -2.0809198e-07 -7.14109e-12 1.6362552e-11 5.0399245e-13 4.0306735e-08 -3.0085714e-11 2.4238628e-10 -1.2562062e-11 -3.1127285e-11
2.5888559e-12 4.9313435e-05 -7.0699965e-10 -2.0809031e-07 -7.149238e-12 1.6227991e-11 5.2667785e-13 3.7637786e-08 -2.8432993e-11 2.6235217e-10 -2.232043e-12 -2.2764185e-11
3.2694582e-12 4.9358908e-05 -7.414765e-10 -2.0808825e-07 -7.1300019e-12 1.6100817e-11 5.4583215e-13 3.5147252e-08 -2.5050106e-11 3.5891383e-10 3.6724193e-12 -1.8864321e-11
3.3319364e-12 4.9401369e-05 -7.717209e-10 -2.0808576e-07 -7.1044853e-12 1.6070581e-11 -1.2307553e-12 3.2817485e-08 -1.9476032e-11 3.1425065e-10 2.5407039e-13 2.4318892e-12
1.3098859e-12 4.9441018e-05 -7.9443484e-10 -2.0808358e-07 -7.0912957e-12 1.6079833e-11 -1.9382883e-12 3.0644803e-08 -1.7818422e-11 3.1668434e-10 -1.5502234e-12 -3.3879027e-12
-9.4132416e-13 4.9478041e-05 -8.1438431e-10 -2.0808148e-07 -7.0899773e-12 1.6074809e-11 -1.1537277e-12 2.8614527e-08 -1.2295571e-11 2.623115e-10 -1.1222739e-12 6.3245613e-12
-1.6613373e-12 4.9512612e-05 -8.2794953e-10 -2.0807969e-07 -7.0886692e-12 1.6035491e-11 -3.2150631e-13 2.6719935e-08 -1.0632544e-11 2.5483461e-10 -7.889241e-13 -4.5931115e-12
-2.0923849e-12 4.9544894e-05 -8.4103126e-10 -2.080779e-07 -7.0787296e-12 1.598084e-11 -3.6458701e-13 2.4950759e-08 -1.0668225e-11 2.5363261e-10 2.557409e-12 -7.4330019e-12
-2.6074079e-12 4.9575038e-05 -8.5484831e-10 -2.0807608e-07 -7.0458889e-12 1.5917995e-11 -4.6370161e-13 2.3298683e-08 -1.1706817e-11 2.5798545e-10 6.4493257e-12 -9.0570787e-12
-3.1912867e-12 4.9603187e-05 -8.7103016e-10 -2.0807419e-07 -6.9729658e-12 1.5869196e-11 -5.4662034e-13 2.1756065e-08 -1.4183469e-11 2.6950321e-10 1.2401403e-11 -9.1121813e-12
-2.6896504e-12 4.9629471e-05 -8.8354072e-10 -2.0807269e-07 -6.9518789e-12 1.5862597e-11 7.7697632e-13 2.0315473e-08 -9.1356461e-12 1.9455164e-10 -5.2929772e-13 -4.0871645e-12
Loop time of 348.592 on 4 procs for 7500 steps with 320 atoms
Performance: 7435633235.428 ns/day, 0.000 hours/ns, 21.515 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.024506 | 0.025477 | 0.026424 | 0.6 | 0.01
Neigh | 0.030494 | 0.03257 | 0.034614 | 1.0 | 0.01
Comm | 0.2132 | 0.21532 | 0.22048 | 0.6 | 0.06
Output | 0.011234 | 0.016341 | 0.031613 | 6.9 | 0.00
Modify | 347.96 | 347.98 | 348 | 0.1 | 99.83
Other | | 0.3181 | | | 0.09
Nlocal: 80 ave 86 max 74 min
Histogram: 1 1 0 0 0 0 0 0 1 1
Nghost: 122.75 ave 126 max 120 min
Histogram: 1 0 0 1 0 1 0 0 0 1
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 2
Dangerous builds = 0
Total wall time: 0:05:48

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,11 +4,10 @@
# Run consists of a lone 32-bead coarse-grained polymer #
# undergoing Brownian motion in thermal lattice-Boltzmann fluid. #
# #
# Here, gamma (used in the calculation of the monomer-fluid interaction #
# force) is set by the user (gamma = 0.03 for this simulation...this #
# value has been calibrated a priori through simulations of the drag #
# force acting on a single particle of the same radius). #
# Sample output from this run can be found in the file: #
# To run this example, LAMMPS needs to be compiled with a the following #
# packages: MOLECULE, RIGID, LATBOTLZ #
# #
# If uncommented, sample output from this run can be found in the file: #
# 'dump.polymer.lammpstrj' #
# and viewed using, e.g., the VMD software. #
# #
@ -16,23 +15,26 @@
units nano
dimension 3
boundary p p p
boundary p p f
atom_style hybrid molecular
special_bonds fene
read_data data.polymer
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
#----------------------------------------------------------------------------
# that processors lattice-Boltzmann grid.
# The communcation cutoff is set to 2.5 dx to ensure that all particles in the
# processor ghost fluid region (of width 2dx) are known to local processor.
#----------------------------------------------------------------------------
neighbor 0.5 bin
neigh_modify delay 0 every 1 check yes
neigh_modify exclude type 2 2
neigh_modify exclude type 2 1
comm_modify cutoff 2.5
#----------------------------------------------------------------------------
# Implement a hard-sphere interaction between the particles at the center of
# Implement a hard-sphere interaction between the particles at the center of
# each monomer (use a truncated and shifted Lennard-Jones potential).
#----------------------------------------------------------------------------
bond_style fene
@ -42,66 +44,68 @@ pair_coeff 1 1 4.14195 1.5 1.68369
pair_coeff 1 2 4.14195 1.5 1.68369
pair_coeff 2 2 0 1.0
mass * 0.000000771064
timestep 0.00003
# The mass is set 4/3 PI r^3 fluid_density/31 , where r=0.617, 31 is number of
# nodes in a single monomer
mass * 0.00000318
timestep 0.0001
#----------------------------------------------------------------------------
# ForceAtoms are the particles at the center of each monomer which
# ForceAtoms are the particles at the center of each monomer which
# do not interact with the fluid, but are used to implement the hard-sphere
# interactions.
# interactions.
# FluidAtoms are the particles representing the surface of the monomer
# which do interact with the fluid. Monomer surface is shell of radius 0.7
# which do interact with the fluid.
#----------------------------------------------------------------------------
group ForceAtoms type 1
group FluidAtoms type 2
#----------------------------------------------------------------------------
# Placement of a trap (similar to an 1D optical trap) for the polymer
# Note that the addforce fix needs to go before the lb/fluid and lb/viscous
# fix as these fixes rescale the forces to account for the added mass of the
# fluid that gets dragged around with the particle so need prior knowledge of
# all forces applied to the particles involved in these fixes before they are
# called.
#----------------------------------------------------------------------------
variable fx atom -(x-20.0)*20.0/31.0
fix trap all addforce v_fx 0.0 0.0 # call before fix lb/fluid and lb/viscous
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particles specified through FluidAtoms
# (however, this fix does not explicitly apply a force back on to these
# particles. This is accomplished through the use of the lb/viscous
# fix).
# Uses the standard LB integration scheme, fluid viscosity = 0.023333333,
# fluid density= 0.0000166368, lattice spacing dx=1.0, and mass unit,
# dm=0.0000166368.
# Use the default method to calculate the interaction force between the
# particles and the fluid. This calculation requires the surface area
# of the composite object represented by each particle node. By default
# this area is assumed equal to dx*dx; however, since this is not the case
# here, it is input through the setArea keyword (i.e. particles of type 2
# correspond to a surface area of 0.2025=4 Pi R^2/N ).
# Use the trilinear interpolation stencil to distribute the force from
# a given particle onto the fluid mesh (results in a smaller hydrodynamic
# radius than if the Peskin stencil is used).
# Use a thermal lattice-Boltzmann fluid (temperature 300K, random number
# seed=15003). This enables the particles to undergo Brownian motion in
# This fluid feels a force due to the particles specified through FluidAtoms
# (however, this fix does not explicity apply a force back on to these
# particles. This is accomplished through the use of the lb/viscous fix).
# We set fluid viscosity = 0.1 and fluid density = 0.00009982071 which
# means the kinematic viscosity is idential to that of water but the
# dynamic viscosity is a factor of 10 less than that of water which
# increases the diffusive dynamics by a corresponding factor of 10.
# lattice spacing dx=1.0.
# Use a thermal lattice-Boltzmann fluid (temperature 300K, random number
# seed=15003). This enables the particles to undergo Brownian motion in
# the fluid.
#----------------------------------------------------------------------------
fix 1 FluidAtoms lb/fluid 3 1 0.023333333 0.0000166368 setArea 2 0.20525 dx 1.0 dm 0.0000166368 noise 300.0 15003
fix 1 all lb/fluid 1 0.1 0.00009982071 dx 1.0 noise 300.0 15003
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining them to move and rotate together as a single rigid
# spherical object.
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining each monomerto move and rotate as a single rigid
# spherical object.
# Since both the ForceAtoms (central atoms), and the FluidAtoms (spherical
# shell) should move and rotate together, this fix is applied to all of
# the atoms in the system. However, since the central atoms should not
# feel a force due to the fluid, they are excluded from the fluid force
# calculation.
# shell) should move and rotate together, this fix is applied to all of
# the atoms in the system.
#----------------------------------------------------------------------------
fix 2 FluidAtoms lb/viscous
fix 3 all rigid molecule
fix 2 all lb/viscous
fix 3 all rigid/small molecule
#----------------------------------------------------------------------------
# To ensure that numerical errors do not lead to a buildup of momentum in the
# system, the momentum_lb fix is used every 10000 timesteps to zero out the
# system, the momentum_lb fix is used every 100000 timesteps to zero out the
# total (particle plus fluid) momentum in the system.
#----------------------------------------------------------------------------
fix 4 all lb/momentum 10000 linear 1 1 1
fix 4 all lb/momentum 100000 linear 1 1 1
#----------------------------------------------------------------------------
# Write position and velocity coordinates into a file every 2000 time steps.
#----------------------------------------------------------------------------
dump 1 ForceAtoms custom 2000 dump.polymer_default_gamma.lammpstrj id x y z vx vy vz
run 2000001
#dump 1 ForceAtoms custom 10 trapped_polymer.lammpstrj id x y z vx vy vz
#run 2000001
run 10000

View File

@ -1,105 +0,0 @@
#===========================================================================#
# polymer test #
# #
# Run consists of a lone 32-bead coarse-grained polymer #
# undergoing Brownian motion in thermal lattice-Boltzmann fluid. #
# #
# Here, gamma (used in the calculation of the monomer-fluid interaction #
# force) is set by the user (gamma = 0.03 for this simulation...this #
# value has been calibrated a priori through simulations of the drag #
# force acting on a single particle of the same radius). #
# Sample output from this run can be found in the file: #
# 'dump.polymer.lammpstrj' #
# and viewed using, e.g., the VMD software. #
# #
# Santtu Ollila #
# santtu.ollila@aalto.fi #
# Aalto University #
# August 14, 2013 #
#===========================================================================#
units nano
dimension 3
boundary p p p
atom_style hybrid molecular
special_bonds fene
read_data data.polymer
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
#----------------------------------------------------------------------------
neighbor 0.5 bin
neigh_modify delay 0 every 1 check yes
neigh_modify exclude type 2 2
neigh_modify exclude type 2 1
#----------------------------------------------------------------------------
# Implement a hard-sphere interaction between the particles at the center of
# each monomer (use a truncated and shifted Lennard-Jones potential).
#----------------------------------------------------------------------------
bond_style fene
bond_coeff 1 60.0 2.25 4.14195 1.5
pair_style lj/cut 1.68369
pair_coeff 1 1 4.14195 1.5 1.68369
pair_coeff 1 2 4.14195 1.5 1.68369
pair_coeff 2 2 0 1.0
mass * 0.000000771064
timestep 0.00003
#----------------------------------------------------------------------------
# ForceAtoms are the particles at the center of each monomer which
# do not interact with the fluid, but are used to implement the hard-sphere
# interactions.
# FluidAtoms are the particles representing the surface of the monomer
# which do interact with the fluid.
#----------------------------------------------------------------------------
group ForceAtoms type 1
group FluidAtoms type 2
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particles specified through FluidAtoms
# (however, this fix does not explicitly apply a force back on to these
# particles. This is accomplished through the use of the rigid_pc_sphere
# fix).
# Use the LB integration scheme of Ollila et. al. (for stability reasons,
# this integration scheme should be used when a large user set value for
# gamma is specified), a fluid viscosity = 0.023333333,
# fluid density= 0.0000166368,
# value for gamma=0.03, lattice spacing dx=1.0, and mass unit, dm=0.0000166368.
# Use a thermal lattice-Boltzmann fluid (temperature 300K, random number
# seed=15003). This enables the particles to undergo Brownian motion in
# the fluid.
#----------------------------------------------------------------------------
fix 1 FluidAtoms lb/fluid 5 1 0.023333333 0.0000166368 setGamma 0.03 dx 1.0 dm 0.0000166368 noise 300.0 15003
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining them to move and rotate together as a single rigid
# spherical object.
# Since both the ForceAtoms (central atoms), and the FluidAtoms (spherical
# shell) should move and rotate together, this fix is applied to all of
# the atoms in the system. However, since the central atoms should not
# feel a force due to the fluid, they are excluded from the force
# calculation through the use of the 'innerNodes' keyword.
# NOTE: This fix should only be used when the user specifies a value for
# gamma (through the setGamma keyword) in the lb_fluid fix.
#----------------------------------------------------------------------------
fix 2 all lb/rigid/pc/sphere molecule innerNodes ForceAtoms
#----------------------------------------------------------------------------
# To ensure that numerical errors do not lead to a buildup of momentum in the
# system, the momentum_lb fix is used every 10000 timesteps to zero out the
# total (particle plus fluid) momentum in the system.
#----------------------------------------------------------------------------
fix 3 all lb/momentum 10000 linear 1 1 1
#----------------------------------------------------------------------------
# Write position and velocity coordinates into a file every 2000 time steps.
#----------------------------------------------------------------------------
dump 1 ForceAtoms custom 2000 dump.polymer_setgamma.lammpstrj id x y z vx vy vz
run 2000001

View File

@ -0,0 +1,199 @@
LAMMPS (17 Feb 2022)
#===========================================================================#
# polymer test #
# #
# Run consists of a lone 32-bead coarse-grained polymer #
# undergoing Brownian motion in thermal lattice-Boltzmann fluid. #
# #
# To run this example, LAMMPS needs to be compiled with a the following #
# packages: MOLECULE, RIGID, LATBOTLZ #
# #
# If uncommented, sample output from this run can be found in the file: #
# 'dump.polymer.lammpstrj' #
# and viewed using, e.g., the VMD software. #
# #
#===========================================================================#
units nano
dimension 3
boundary p p f
atom_style hybrid molecular
special_bonds fene
read_data data.polymer
Reading data file ...
orthogonal box = (0 0 0) to (40 40 40)
1 by 2 by 2 MPI processor grid
reading atoms ...
992 atoms
scanning bonds ...
1 = max bonds/atom
reading bonds ...
31 bonds
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 1 1
special bond factors coul: 0 1 1
2 = max # of 1-2 neighbors
2 = max # of special neighbors
special bonds CPU = 0.000 seconds
read_data CPU = 0.037 seconds
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The communcation cutoff is set to 2.5 dx to ensure that all particles in the
# processor ghost fluid region (of width 2dx) are known to local processor.
#----------------------------------------------------------------------------
neighbor 0.5 bin
neigh_modify delay 0 every 1 check yes
neigh_modify exclude type 2 2
neigh_modify exclude type 2 1
comm_modify cutoff 2.5
#----------------------------------------------------------------------------
# Implement a hard-sphere interaction between the particles at the center of
# each monomer (use a truncated and shifted Lennard-Jones potential).
#----------------------------------------------------------------------------
bond_style fene
bond_coeff 1 60.0 2.25 4.14195 1.5
pair_style lj/cut 1.68369
pair_coeff 1 1 4.14195 1.5 1.68369
pair_coeff 1 2 4.14195 1.5 1.68369
pair_coeff 2 2 0 1.0
# The mass is set 4/3 PI r^3 fluid_density/31 , where r=0.617, 31 is number of
# nodes in a single monomer
mass * 0.00000318
timestep 0.0001
#----------------------------------------------------------------------------
# ForceAtoms are the particles at the center of each monomer which
# do not interact with the fluid, but are used to implement the hard-sphere
# interactions.
# FluidAtoms are the particles representing the surface of the monomer
# which do interact with the fluid.
#----------------------------------------------------------------------------
group ForceAtoms type 1
32 atoms in group ForceAtoms
group FluidAtoms type 2
960 atoms in group FluidAtoms
#----------------------------------------------------------------------------
# Placement of a trap (similar to an 1D optical trap) for the polymer
# Note that the addforce fix needs to go before the lb/fluid and lb/viscous
# fix as these fixes rescale the forces to account for the added mass of the
# fluid that gets dragged around with the particle so need prior knowledge of
# all forces applied to the particles involved in these fixes before they are
# called.
#----------------------------------------------------------------------------
variable fx atom -(x-20.0)*20.0/31.0
fix trap all addforce v_fx 0.0 0.0 # call before fix lb/fluid and lb/viscous
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particles specified through FluidAtoms
# (however, this fix does not explicity apply a force back on to these
# particles. This is accomplished through the use of the lb/viscous fix).
# We set fluid viscosity = 0.1 and fluid density = 0.00009982071 which
# means the kinematic viscosity is idential to that of water but the
# dynamic viscosity is a factor of 10 less than that of water which
# increases the diffusive dynamics by a corresponding factor of 10.
# lattice spacing dx=1.0.
# Use a thermal lattice-Boltzmann fluid (temperature 300K, random number
# seed=15003). This enables the particles to undergo Brownian motion in
# the fluid.
#----------------------------------------------------------------------------
fix 1 all lb/fluid 1 0.1 0.00009982071 dx 1.0 noise 300.0 15003
Using a lattice-Boltzmann grid of 40 by 40 by 41 total grid points. (../fix_lb_fluid.cpp:486)
Local Grid Geometry created. (../fix_lb_fluid.cpp:1018)
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining each monomerto move and rotate as a single rigid
# spherical object.
# Since both the ForceAtoms (central atoms), and the FluidAtoms (spherical
# shell) should move and rotate together, this fix is applied to all of
# the atoms in the system.
#----------------------------------------------------------------------------
fix 2 all lb/viscous
fix 3 all rigid/small molecule
create bodies CPU = 0.000 seconds
32 rigid bodies with 992 atoms
0.70010803 = max distance from body owner to body atom
#----------------------------------------------------------------------------
# To ensure that numerical errors do not lead to a buildup of momentum in the
# system, the momentum_lb fix is used every 100000 timesteps to zero out the
# total (particle plus fluid) momentum in the system.
#----------------------------------------------------------------------------
fix 4 all lb/momentum 100000 linear 1 1 1
#dump 1 ForceAtoms custom 10 trapped_polymer.lammpstrj id x y z vx vy vz
#run 2000001
run 10000
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix lb/fluid command:
@Article{Denniston et al.,
author = {C. Denniston, N. Afrasiabian, M.G. Cole-Andre,F.E. Mackay, S.T.T. Ollila, T. Whitehead},
title = {LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid}, journal = {Comp.~Phys.~Comm.},
year = 2022,
volume = 275,
pages = {108318}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 2.18369
ghost atom cutoff = 2.5
binsize = 1.091845, bins = 37 37 37
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
WARNING: Communication cutoff 2.5 is shorter than a bond length based estimate of 2.6825. This may lead to errors. (../comm.cpp:723)
Per MPI rank memory allocation (min/avg/max) = 7.861 | 9.842 | 11.95 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -8.2758489 2790.7741 2782.4982 0.85835765
10000 15.559756 -10.240592 2817.6714 2827.7319 -0.0015697449
Loop time of 269.705 on 4 procs for 10000 steps with 992 atoms
Performance: 320.351 ns/day, 0.075 hours/ns, 37.078 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.01457 | 0.047368 | 0.1221 | 20.3 | 0.02
Bond | 0.010081 | 0.022047 | 0.043793 | 9.3 | 0.01
Neigh | 0.61943 | 0.62713 | 0.63223 | 0.7 | 0.23
Comm | 0.10937 | 0.33658 | 0.61517 | 39.3 | 0.12
Output | 3.44e-05 | 7.7575e-05 | 0.0001653 | 0.0 | 0.00
Modify | 268.04 | 268.34 | 268.53 | 1.2 | 99.49
Other | | 0.3359 | | | 0.12
Nlocal: 248 ave 802 max 0 min
Histogram: 2 0 1 0 0 0 0 0 0 1
Nghost: 113.25 ave 190 max 42 min
Histogram: 2 0 0 0 0 0 0 0 0 2
Neighs: 4.25 ave 15 max 0 min
Histogram: 2 1 0 0 0 0 0 0 0 1
Total # of neighbors = 17
Ave neighs/atom = 0.017137097
Ave special neighs/atom = 0.0625
Neighbor list builds = 495
Dangerous builds = 0
Total wall time: 0:04:29

View File

@ -1,83 +0,0 @@
LAMMPS (10 Aug 2015)
Reading data file ...
orthogonal box = (0 0 0) to (40 40 40)
2 by 2 by 4 MPI processor grid
reading atoms ...
992 atoms
scanning bonds ...
1 = max bonds/atom
reading bonds ...
31 bonds
Finding 1-2 1-3 1-4 neighbors ...
Special bond factors lj: 0 1 1
Special bond factors coul: 0 1 1
2 = max # of 1-2 neighbors
2 = max # of special neighbors
32 atoms in group ForceAtoms
960 atoms in group FluidAtoms
Using a lattice-Boltzmann grid of 40 by 40 by 40 total grid points. (../fix_lb_fluid.cpp:385)
32 rigid bodies with 992 atoms
Neighbor list info ...
1 neighbor list requests
update every 1 steps, delay 0 steps, check yes
master list distance cutoff = 2.18369
ghost atom cutoff = 2.18369
Setting up Verlet run ...
Unit style : nano
Current step: 0
Time step : 3e-05
Memory usage per processor = 0.111926 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -8.2758489 2790.7741 2782.4982 1.9081958e-20
2000001 4.3017148 0 2792.6037 2798.2163 -0.00077006865
Loop time of 51900 on 16 procs for 2000001 steps with 992 atoms
Pair time (%) = 4.33729 (0.00835701)
Bond time (%) = 3.33134 (0.00641876)
Neigh time (%) = 35.1247 (0.0676777)
Comm time (%) = 61.528 (0.118551)
Outpt time (%) = 0.361813 (0.000697135)
Other time (%) = 51795.3 (99.7983)
Nlocal: 62 ave 465 max 0 min
Histogram: 11 0 3 1 0 0 0 0 0 1
Nghost: 94.8125 ave 340 max 0 min
Histogram: 9 0 0 0 4 0 0 1 0 2
Neighs: 0.25 ave 2 max 0 min
Histogram: 13 0 0 0 0 2 0 0 0 1
Total # of neighbors = 4
Ave neighs/atom = 0.00403226
Ave special neighs/atom = 0.0625
Neighbor list builds = 23853
Dangerous builds = 0
------------------------------------------------------------
Sender: LSF System <lsfadmin@lsfhost.localdomain>
Subject: Job 883849: </opt/hpmpi/bin/mpirun -srun ./lmp_mpi -in in.polymer_default_gamma> Done
Job </opt/hpmpi/bin/mpirun -srun ./lmp_mpi -in in.polymer_default_gamma> was submitted from host <req770> by user <colin>.
Job was executed on host(s) <16*lsfhost.localdomain>, in queue <mpi>, as user <colin>.
</home/colin> was used as the home directory.
</home/colin/lammps-10Aug15/examples/USER/lb/tested/polymer_default> was used as the working directory.
Started at Mon Aug 24 11:13:12 2015
Results reported at Tue Aug 25 01:38:50 2015
Your job looked like:
------------------------------------------------------------
# LSBATCH: User input
/opt/hpmpi/bin/mpirun -srun ./lmp_mpi -in in.polymer_default_gamma
------------------------------------------------------------
Successfully completed.
Resource usage summary:
CPU time : 829343.88 sec.
Max Memory : 43 MB
Max Swap : 805 MB
The output (if any) is above this job summary.

View File

@ -1,83 +0,0 @@
LAMMPS (10 Aug 2015)
Reading data file ...
orthogonal box = (0 0 0) to (40 40 40)
2 by 2 by 4 MPI processor grid
reading atoms ...
992 atoms
scanning bonds ...
1 = max bonds/atom
reading bonds ...
31 bonds
Finding 1-2 1-3 1-4 neighbors ...
Special bond factors lj: 0 1 1
Special bond factors coul: 0 1 1
2 = max # of 1-2 neighbors
2 = max # of special neighbors
32 atoms in group ForceAtoms
960 atoms in group FluidAtoms
Using a lattice-Boltzmann grid of 40 by 40 by 40 total grid points. (../fix_lb_fluid.cpp:385)
32 rigid bodies with 992 atoms
Neighbor list info ...
1 neighbor list requests
update every 1 steps, delay 0 steps, check yes
master list distance cutoff = 2.18369
ghost atom cutoff = 2.18369
Setting up Verlet run ...
Unit style : nano
Current step: 0
Time step : 3e-05
Memory usage per processor = 0.108554 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -8.2758489 2790.7741 2782.4982 -0.00085093693
2000001 0.5548925 0 2792.3403 2803.7286 -0.0037777326
Loop time of 50862.3 on 16 procs for 2000001 steps with 992 atoms
Pair time (%) = 4.10128 (0.0080635)
Bond time (%) = 3.29621 (0.00648066)
Neigh time (%) = 40.0195 (0.0786822)
Comm time (%) = 89.3201 (0.175612)
Outpt time (%) = 1.05399 (0.00207224)
Other time (%) = 50724.5 (99.7291)
Nlocal: 62 ave 501 max 0 min
Histogram: 14 0 0 0 0 0 0 0 0 2
Nghost: 29 ave 259 max 0 min
Histogram: 14 0 0 0 0 0 0 1 0 1
Neighs: 0.375 ave 3 max 0 min
Histogram: 14 0 0 0 0 0 0 0 0 2
Total # of neighbors = 6
Ave neighs/atom = 0.00604839
Ave special neighs/atom = 0.0625
Neighbor list builds = 30671
Dangerous builds = 0
------------------------------------------------------------
Sender: LSF System <lsfadmin@lsfhost.localdomain>
Subject: Job 883848: </opt/hpmpi/bin/mpirun -srun ./lmp_mpi -in in.polymer> Done
Job </opt/hpmpi/bin/mpirun -srun ./lmp_mpi -in in.polymer> was submitted from host <req770> by user <colin>.
Job was executed on host(s) <16*lsfhost.localdomain>, in queue <mpi>, as user <colin>.
</home/colin> was used as the home directory.
</home/colin/lammps-10Aug15/examples/USER/lb/tested/polymer> was used as the working directory.
Started at Mon Aug 24 11:12:37 2015
Results reported at Tue Aug 25 01:20:46 2015
Your job looked like:
------------------------------------------------------------
# LSBATCH: User input
/opt/hpmpi/bin/mpirun -srun ./lmp_mpi -in in.polymer
------------------------------------------------------------
Successfully completed.
Resource usage summary:
CPU time : 812767.44 sec.
Max Memory : 44 MB
Max Swap : 812 MB
The output (if any) is above this job summary.

View File

@ -0,0 +1,502 @@
#===========================================================================#
# Toy car driving down a system with a floor and ceiling. #
# #
# The car is first constructed by condensing particles onto various regions#
# that make up the car's parts. Then the car moves in a lattice Boltzmann #
# fluid. This requires compilation with the RIGID and LATBOLTZ packages #
# You will need to uncomment the dump options to get useful output. #
#===========================================================================#
units cgs
dimension 3
boundary p p f
atom_style atomic
#-------------------------------------------------------------------------#
# Set up the simulation box
#-------------------------------------------------------------------------#
variable dx equal 1.5
variable more equal 6.5
variable xl equal "-32*v_dx"
variable xh equal "32*v_dx"
variable yl equal "-60*v_dx"
variable yh equal "420*v_dx"
variable zl equal "-6*v_dx"
variable zh equal "58*v_dx"
region mybox block ${xl} ${xh} ${yl} ${yh} ${zl} ${zh}
create_box 14 mybox
#-------------------------------------------------------------------------#
# Creating the regions and filling them with atoms assigned to surge_group
#-------------------------------------------------------------------------#
variable density equal 0.001184
variable sigma equal "1.2*v_dx" #"1.2*v_dx"
variable rcutlj equal "v_sigma*2^(1/6)"
variable rcutlj93 equal "v_sigma*(2/5)^(1/6)"
#-------------------------------------------------------------------------#
# Creating the cylinder
#-------------------------------------------------------------------------#
variable c1 equal 12.5
variable c2 equal -1.5
variable radius equal 6.0
variable lo equal 9.5
variable hi equal 12.5
region mycylinderinside1 cylinder x ${c1} ${c2} ${radius} ${lo} ${hi}
variable n_nodes_Cy_1 equal "round(v_more*0.28*((2*PI*v_radius*(v_hi-v_lo))+(2*PI*(v_radius)^2)))"
create_atoms 1 random ${n_nodes_Cy_1} 1234 mycylinderinside1 units box
variable radius_2 equal "v_radius + v_rcutlj93"
variable hi_2 equal "v_hi + 2*v_rcutlj93"
variable lo_2 equal "v_lo - v_rcutlj93"
region mycylinder1 cylinder x ${c1} ${c2} ${radius_2} ${lo_2} ${hi_2}
group gcylinder1 region mycylinder1
#-------------------------------------------------------------------------#
# Creating the cylinder
#-------------------------------------------------------------------------#
variable c1 equal -9.0
variable c2 equal -1.5
variable radius equal 6.0
variable lo equal 9.5
variable hi equal 12.5
region mycylinderinside2 cylinder x ${c1} ${c2} ${radius} ${lo} ${hi}
variable n_nodes_Cy_2 equal "round(v_more*0.28*((2*PI*v_radius*(v_hi-v_lo))+(2*PI*(v_radius)^2)))"
create_atoms 2 random ${n_nodes_Cy_2} 1234 mycylinderinside2 units box
variable radius_2 equal "v_radius + v_rcutlj93"
variable hi_2 equal "v_hi + 2*v_rcutlj93"
variable lo_2 equal "v_lo - v_rcutlj93"
region mycylinder2 cylinder x ${c1} ${c2} ${radius_2} ${lo_2} ${hi_2}
group gcylinder2 region mycylinder2
#-------------------------------------------------------------------------#
# Creating the cylinder
#-------------------------------------------------------------------------#
variable c1 equal -9.0
variable c2 equal -1.5
variable radius equal 6.0
variable lo equal -12.5
variable hi equal -9.5
region mycylinderinside3 cylinder x ${c1} ${c2} ${radius} ${lo} ${hi}
variable n_nodes_Cy_3 equal "round(v_more*0.28*((2*PI*v_radius*(v_hi-v_lo))+(2*PI*(v_radius)^2)))"
create_atoms 3 random ${n_nodes_Cy_3} 1234 mycylinderinside3 units box
variable radius_2 equal "v_radius + v_rcutlj93"
variable hi_2 equal "v_hi + v_rcutlj93"
variable lo_2 equal "v_lo - 2*v_rcutlj93"
region mycylinder3 cylinder x ${c1} ${c2} ${radius_2} ${lo_2} ${hi_2}
group gcylinder3 region mycylinder3
#-------------------------------------------------------------------------#
# Creating the cylinder
#-------------------------------------------------------------------------#
variable c1 equal 12.0
variable c2 equal -1.5
variable radius equal 6.0
variable lo equal -12.5
variable hi equal -9.5
region mycylinderinside4 cylinder x ${c1} ${c2} ${radius} ${lo} ${hi}
variable n_nodes_Cy_4 equal "round(v_more*0.28*((2*PI*v_radius*(v_hi-v_lo))+(2*PI*(v_radius)^2)))"
create_atoms 4 random ${n_nodes_Cy_4} 1234 mycylinderinside4 units box
variable radius_2 equal "v_radius + v_rcutlj93"
variable hi_2 equal "v_hi + v_rcutlj93"
variable lo_2 equal "v_lo - 2*v_rcutlj93"
region mycylinder4 cylinder x ${c1} ${c2} ${radius_2} ${lo_2} ${hi_2}
group gcylinder4 region mycylinder4
#-------------------------------------------------------------------------#
# Creating the prism
#-------------------------------------------------------------------------#
variable xlo1 equal -5.0
variable xhi1 equal 5.0
variable ylo1 equal -15.0
variable yhi1 equal 15.0
variable zlo1 equal -6.0
variable zhi1 equal 6.0
region myprisminside1 block ${xlo1} ${xhi1} ${ylo1} ${yhi1} ${zlo1} ${zhi1}
variable n_nodes_P_1 equal "(round(v_more*3.4*(6*(10.0)^2)/(PI*v_dx^2)))"
create_atoms 5 random ${n_nodes_P_1} 1234 myprisminside1 units box
variable xlo1_2 equal "v_xlo1 - v_rcutlj93/2"
variable xhi1_2 equal "v_xhi1 + v_rcutlj93/2"
variable ylo1_2 equal "v_ylo1 - v_rcutlj93/2"
variable yhi1_2 equal "v_yhi1 + v_rcutlj93/2"
variable zlo1_2 equal "v_zlo1 - v_rcutlj93/2"
variable zhi1_2 equal "v_zhi1 + v_rcutlj93/2"
region myprism1 block ${xlo1_2} ${xhi1_2} ${ylo1_2} ${yhi1_2} ${zlo1_2} ${zhi1_2}
group gprism1 region myprism1
#-------------------------------------------------------------------------#
# Creating the rear wing
#-------------------------------------------------------------------------#
variable xlo2 equal -10.0
variable xhi2 equal 10.0
variable ylo2 equal 14.0
variable yhi2 equal 22.0
variable zlo2 equal 10.0
variable zhi2 equal 12.0
region myprisminside2 block ${xlo2} ${xhi2} ${ylo2} ${yhi2} ${zlo2} ${zhi2}
variable n_nodes_P_2 equal "(round(v_more*0.93*(6*(7.0)^2)/(PI*v_dx^2)))"
create_atoms 6 random ${n_nodes_P_2} 1234 myprisminside2 units box
variable xlo2_2 equal "v_xlo2 - v_rcutlj93/2"
variable xhi2_2 equal "v_xhi2 + v_rcutlj93/2"
variable ylo2_2 equal "v_ylo2 - v_rcutlj93/2"
variable yhi2_2 equal "v_yhi2 + v_rcutlj93/2"
variable zlo2_2 equal "v_zlo2 - v_rcutlj93/2"
variable zhi2_2 equal "v_zhi2 + v_rcutlj93/2"
region myprism2 block ${xlo2_2} ${xhi2_2} ${ylo2_2} ${yhi2_2} ${zlo2_2} ${zhi2_2}
group gprism2 region myprism2
#-------------------------------------------------------------------------#
# Creating the rear wing stand
#-------------------------------------------------------------------------#
variable xlo3 equal -2.0
variable xhi3 equal 2.0
variable ylo3 equal 17.0
variable yhi3 equal 19.0
variable zlo3 equal -2.0
variable zhi3 equal 7.0
region myprisminside3 block ${xlo3} ${xhi3} ${ylo3} ${yhi3} ${zlo3} ${zhi3}
variable n_nodes_P_3 equal "(round(v_more*0.32*(6*(6.0)^2)/(PI*v_dx^2)))"
create_atoms 7 random ${n_nodes_P_3} 1234 myprisminside3 units box
variable xlo3_2 equal "v_xlo3 - v_rcutlj93/2"
variable xhi3_2 equal "v_xhi3 + v_rcutlj93/2"
variable ylo3_2 equal "v_ylo3 - v_rcutlj93/2"
variable yhi3_2 equal "v_yhi3 + v_rcutlj93/2"
variable zlo3_2 equal "v_zlo3 - v_rcutlj93/2"
variable zhi3_2 equal "v_zhi3 + v_rcutlj93/2"
region myprism3 block ${xlo3_2} ${xhi3_2} ${ylo3_2} ${yhi3_2} ${zlo3_2} ${zhi3_2}
group gprism3 region myprism3
#-------------------------------------------------------------------------#
# Creating the front wing
#-------------------------------------------------------------------------#
variable xlo4 equal -10.0
variable xhi4 equal 10.0
variable ylo4 equal -26.5
variable yhi4 equal -22.0
variable zlo4 equal -5.0
variable zhi4 equal -3.0
region myprisminside4 block ${xlo4} ${xhi4} ${ylo4} ${yhi4} ${zlo4} ${zhi4}
variable n_nodes_P_4 equal "(round(v_more*1.47*(6*(4.0)^2)/(PI*v_dx^2)))"
create_atoms 8 random ${n_nodes_P_4} 1234 myprisminside4 units box
variable xlo4_2 equal "v_xlo4 - v_rcutlj93/2"
variable xhi4_2 equal "v_xhi4 + v_rcutlj93/2"
variable ylo4_2 equal "v_ylo4 - v_rcutlj93/2"
variable yhi4_2 equal "v_yhi4 + v_rcutlj93/2"
variable zlo4_2 equal "v_zlo4 - v_rcutlj93/2"
variable zhi4_2 equal "v_zhi4 + v_rcutlj93/2"
region myprism4 block ${xlo4_2} ${xhi4_2} ${ylo4_2} ${yhi4_2} ${zlo4_2} ${zhi4_2}
group gprism4 region myprism4
#-------------------------------------------------------------------------#
# Creating the front wing stand
#-------------------------------------------------------------------------#
variable xlo5 equal -4.0
variable xhi5 equal 4.0
variable ylo5 equal -20.0
variable yhi5 equal -18.0
variable zlo5 equal -5.0
variable zhi5 equal 3.0
region myprisminside5 block ${xlo5} ${xhi5} ${ylo5} ${yhi5} ${zlo5} ${zhi5}
variable n_nodes_P_5 equal "(round(v_more*2.15*(6*(3.0)^2)/(PI*v_dx^2)))"
create_atoms 9 random ${n_nodes_P_5} 1234 myprisminside5 units box
variable xlo5_2 equal "v_xlo5 - v_rcutlj93/2"
variable xhi5_2 equal "v_xhi5 + v_rcutlj93/2"
variable ylo5_2 equal "v_ylo5 - v_rcutlj93/2"
variable yhi5_2 equal "v_yhi5 + v_rcutlj93/2"
variable zlo5_2 equal "v_zlo5 - v_rcutlj93/2"
variable zhi5_2 equal "v_zhi5 + v_rcutlj93/2"
region myprism5 block ${xlo5_2} ${xhi5_2} ${ylo5_2} ${yhi5_2} ${zlo5_2} ${zhi5_2}
group gprism5 region myprism5
#-------------------------------------------------------------------------#
# Creating the driver
#-------------------------------------------------------------------------#
variable radius2 equal 1.0
variable xloc equal 0.0
variable yloc equal 3.0
variable zloc equal 9.5
region mysphereinside2 sphere ${xloc} ${yloc} ${zloc} ${radius2}
variable n_nodes_S_2 equal "(round(v_more*2.0*(2*v_radius2^2/v_dx^2)))"
create_atoms 10 random ${n_nodes_S_2} 1234 mysphereinside2 units box
variable radius2_2 equal "v_radius2 + v_rcutlj93"
region mysphere2 sphere ${xloc} ${yloc} ${zloc} ${radius2_2}
group gball2 region mysphere2
#-------------------------------------------------------------------------#
# Creating the rear wing side
#-------------------------------------------------------------------------#
variable xlo5 equal 12.0
variable xhi5 equal 14.25
variable ylo5 equal 14.0
variable yhi5 equal 22.0
variable zlo5 equal 10.0
variable zhi5 equal 14.0
region myprisminside6 block ${xlo5} ${xhi5} ${ylo5} ${yhi5} ${zlo5} ${zhi5}
variable n_nodes_P_6 equal "(round(v_more*1.0*(6*(3.0)^2)/(PI*v_dx^2)))"
create_atoms 11 random ${n_nodes_P_6} 1234 myprisminside6 units box
variable xlo5_2 equal "v_xlo5 - v_rcutlj93/2"
variable xhi5_2 equal "v_xhi5 + v_rcutlj93/2"
variable ylo5_2 equal "v_ylo5 - v_rcutlj93/2"
variable yhi5_2 equal "v_yhi5 + v_rcutlj93/2"
variable zlo5_2 equal "v_zlo5 - v_rcutlj93/2"
variable zhi5_2 equal "v_zhi5 + v_rcutlj93/2"
region myprism6 block ${xlo5_2} ${xhi5_2} ${ylo5_2} ${yhi5_2} ${zlo5_2} ${zhi5_2}
group gprism6 region myprism6
#-------------------------------------------------------------------------#
# Creating the rear wing side
#-------------------------------------------------------------------------#
variable xlo5 equal -14.25
variable xhi5 equal -12.0
variable ylo5 equal 14.0
variable yhi5 equal 22.0
variable zlo5 equal 10.0
variable zhi5 equal 14.0
region myprisminside7 block ${xlo5} ${xhi5} ${ylo5} ${yhi5} ${zlo5} ${zhi5}
variable n_nodes_P_7 equal "(round(v_more*1.0*(6*(3.0)^2)/(PI*v_dx^2)))"
create_atoms 12 random ${n_nodes_P_7} 1234 myprisminside7 units box
variable xlo5_2 equal "v_xlo5 - v_rcutlj93/2"
variable xhi5_2 equal "v_xhi5 + v_rcutlj93/2"
variable ylo5_2 equal "v_ylo5 - v_rcutlj93/2"
variable yhi5_2 equal "v_yhi5 + v_rcutlj93/2"
variable zlo5_2 equal "v_zlo5 - v_rcutlj93/2"
variable zhi5_2 equal "v_zhi5 + v_rcutlj93/2"
region myprism7 block ${xlo5_2} ${xhi5_2} ${ylo5_2} ${yhi5_2} ${zlo5_2} ${zhi5_2}
group gprism7 region myprism7
#-------------------------------------------------------------------------#
# Creating the front wing side
#-------------------------------------------------------------------------#
variable xlo5 equal 12.0
variable xhi5 equal 14.25
variable ylo5 equal -26.0
variable yhi5 equal -20.0
variable zlo5 equal -5.0
variable zhi5 equal -1.0
region myprisminside8 block ${xlo5} ${xhi5} ${ylo5} ${yhi5} ${zlo5} ${zhi5}
variable n_nodes_P_8 equal "(round(v_more*1.8*(6*(2.0)^2)/(PI*v_dx^2)))"
create_atoms 11 random ${n_nodes_P_8} 1234 myprisminside8 units box
variable xlo5_2 equal "v_xlo5 - v_rcutlj93/2"
variable xhi5_2 equal "v_xhi5 + v_rcutlj93/2"
variable ylo5_2 equal "v_ylo5 - v_rcutlj93/2"
variable yhi5_2 equal "v_yhi5 + v_rcutlj93/2"
variable zlo5_2 equal "v_zlo5 - v_rcutlj93/2"
variable zhi5_2 equal "v_zhi5 + v_rcutlj93/2"
region myprism8 block ${xlo5_2} ${xhi5_2} ${ylo5_2} ${yhi5_2} ${zlo5_2} ${zhi5_2}
group gprism8 region myprism8
#-------------------------------------------------------------------------#
# Creating the front wing side
#-------------------------------------------------------------------------#
variable xlo5 equal -14.25
variable xhi5 equal -12.0
variable ylo5 equal -26.0
variable yhi5 equal -20.0
variable zlo5 equal -5.0
variable zhi5 equal -1.0
region myprisminside9 block ${xlo5} ${xhi5} ${ylo5} ${yhi5} ${zlo5} ${zhi5}
variable n_nodes_P_9 equal "(round(v_more*1.8*(6*(2.0)^2)/(PI*v_dx^2)))"
create_atoms 12 random ${n_nodes_P_9} 1234 myprisminside9 units box
variable xlo5_2 equal "v_xlo5 - v_rcutlj93/2"
variable xhi5_2 equal "v_xhi5 + v_rcutlj93/2"
variable ylo5_2 equal "v_ylo5 - v_rcutlj93/2"
variable yhi5_2 equal "v_yhi5 + v_rcutlj93/2"
variable zlo5_2 equal "v_zlo5 - v_rcutlj93/2"
variable zhi5_2 equal "v_zhi5 + v_rcutlj93/2"
region myprism9 block ${xlo5_2} ${xhi5_2} ${ylo5_2} ${yhi5_2} ${zlo5_2} ${zhi5_2}
group gprism9 region myprism9
#------------------------------------------------------------------------#
# creating the union between the regions
#------------------------------------------------------------------------#
group wheels union gcylinder1 gcylinder2 gcylinder3 gcylinder4
group not_wheels union gprism1 gprism2 gprism3 gprism4 gprism5 gball2 gprism6 gprism7 gprism8 gprism9
group aero_group union gprism2 gprism3 gprism4 gprism5 gball2 gprism6 gprism7 gprism8 gprism9
region aero union 9 myprism2 myprism3 myprism4 myprism5 mysphere2 myprism6 myprism7 myprism8 myprism9
group chassis_group union gcylinder1 gcylinder2 gcylinder3 gcylinder4 gprism1
region chassis union 5 mycylinder1 mycylinder2 mycylinder3 mycylinder4 myprism1
group surge_group union aero_group chassis_group
region surge union 2 aero chassis
#------------------------------------------------------------------------#
# Soft Potential
#------------------------------------------------------------------------#
variable softlength equal "0.5*v_rcutlj"
pair_style soft ${softlength}
pair_coeff * * 0.0
variable prefactor equal ramp(0,4.14e-8)
fix 1 all adapt 1 pair soft a * * v_prefactor
#------------------------------------------------------------------------#
# Run parameters and set up dump
#------------------------------------------------------------------------#
timestep 0.2
mass * 1.0e-6
variable nbin equal "v_rcutlj / (4/3)"
neighbor ${nbin} bin
neigh_modify delay 0 every 1 check yes
#variable commcutoff equal "v_dx*2"
#comm_modify cutoff ${commcutoff}
#dump mydump all atom 10000 out.lammpstrj
thermo 5000
#------------------------------------------------------------------------#
# Computes initial interaction
#------------------------------------------------------------------------#
variable epsilon equal 10.0e-10
variable cutofflj93 equal 7.0
fix wall surge_group wall/region surge lj93 ${epsilon} ${sigma} ${cutofflj93}
fix 3 all langevin 31000000.0 50000.0 100.0 5678
fix 2 all nve
#restart 100000 ParticleRestart
run 100000
unfix 1
unfix 2
unfix 3
unfix wall
#------------------------------------------------------------------------#
# Phase 2 : annealing
#------------------------------------------------------------------------#
#------------------------------------------------------------------------#
# Soft Potential
#------------------------------------------------------------------------#
variable softlength equal "0.475*v_rcutlj"
pair_style soft ${softlength}
pair_coeff * * 4.14e-8
#------------------------------------------------------------------------#
# Computes initial interaction
#------------------------------------------------------------------------#
variable epsilon equal 20.0e-10
variable cutofflj93 equal 7.0
fix wall surge_group wall/region surge lj93 ${epsilon} ${sigma} ${cutofflj93}
fix 3 all langevin 100000.0 5000.0 100.0 5678
fix 2 all nve
run 200000
minimize 0.0 1.0e-8 1000 100000
unfix wall
unfix 2
unfix 3
#-------------------------------------------------------------------------#
# The lb/fluid simulation
#
# The sphere travels through the simulation, being pushed by the fluid
#-------------------------------------------------------------------------#
variable number_all equal count(all)
variable node_mass equal "500000 / v_number_all"
mass 5* ${node_mass}
variable wheel_mass equal "v_node_mass/1000"
mass *4 ${wheel_mass}
variable dx equal 1.0
variable density equal 0.001184
neighbor 0.5 bin
neigh_modify delay 0 every 1 check yes
comm_modify cutoff 3.0
pair_style lj/cut 1.2
pair_coeff * * 0.0 0.0
timestep 0.025
unfix FL
reset_timestep 0
#variable total_force equal 0.2
#variable node_force equal "v_total_force / 178"
#fix drag all addforce 0.0 0.0 0.0
velocity all set 0.0 -7.5.0 0.0 units box
# viscosity of air is 0.0001847
fix FL all lb/fluid 1 0.0002 ${density} stencil 2 dx ${dx} zwall_velocity 0 0 # dumpxdmf 1000 sflow 0
variable vx equal vcm(all,x)
variable vy equal vcm(all,y)
variable vz equal vcm(all,z)
#dump mydumpvtk all vtk 1000 out*.vtp vx vy vz
fix 2 all lb/viscous
fix 4 not_wheels nve
fix 3 wheels rigid group 4 gcylinder1 gcylinder2 gcylinder3 gcylinder4 force * off off off torque * on off off
fix 5 not_wheels setforce 0.0 0.0 0.0
thermo_style custom step v_number_all v_node_mass f_FL[2] f_5[1] f_5[2] f_5[3]
thermo 100
run 5000
#-------------------------------------------------------------------------#

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,182 @@
#===========================================================================#
# Immersed Boundary Wall #
# #
# Run consists of a 32-bead coarse-grained polymer #
# translocating through a solid-state atomistic wall #
# under pressure-driven lattice-Boltzmann fluid flow #
# #
# To run this example, LAMMPS needs to be compiled with a the following #
# packages: MOLECULE, RIGID, LATBOLTZ, USER-VTK #
# #
#To run this example on N cores, use command: #
# mpirun -n N /LAMMPS/EXE/FILE -in in.polymer > output.out #
# #
# If uncommented: #
# Sample output for polymer from this run can be found in the file: #
# 'translocationdump.lammpstrj' #
# and viewed using, the VMD software. #
# OR #
# 'dump.translocation.vtk' #
# and viewed using the Paraview software. #
# #
# Sample output for the wall from this run can be found in the file: #
# 'walldump.xyz' #
# and can be viewed using the VMD or Paraview Software. #
#===========================================================================#
units nano
dimension 3
boundary p p p
atom_style hybrid molecular
special_bonds fene
read_data data.translocation
#---------------------------------------------------------------------------
#Creating a atomistic wall on an FCC lattice and removing the block from the
#middle to create the nanopore
#---------------------------------------------------------------------------
lattice fcc 1.0
region wall block 28 38 0 32 0 32
create_atoms 3 region wall
region hole block 28 38 14 18 14 18
delete_atoms region hole compress no
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The communcation cutoff is set to 2.5 dx to ensure that all particles in the
# processor ghost fluid region (of width 2dx) are known to local processor.
#----------------------------------------------------------------------------
neighbor 0.5 bin
neigh_modify delay 0 every 1 check yes
neigh_modify exclude type 2 2
neigh_modify exclude type 2 1
neigh_modify exclude type 2 3
neigh_modify exclude type 3 3
comm_modify cutoff 2.5
#----------------------------------------------------------------------------
# Implement a hard-sphere interaction between the particles at the center of
# each monomer with each other and the wall atoms
# (use a truncated and shifted Lennard-Jones potential).
#----------------------------------------------------------------------------
bond_style fene
bond_coeff 1 60.0 2.25 4.14195 1.5
pair_style lj/cut 1.68369
pair_coeff * * 0 1.5
pair_coeff 1 1 4.14195 1.5 1.68369
pair_coeff 1 3 4.14195 1.5 1.68369
#-----------------------------------------------------------------------------
# The mass is set 4/3 PI r^3 fluid_density/31 , where r=0.617, 31 is number of
# nodes in a single monomer. The mass of wall atoms is chosen heavy as they
# are fixed.
# ----------------------------------------------------------------------------
mass * 0.00000318
#-----------------------------------------------------------------------------
timestep 0.00005
#----------------------------------------------------------------------------
# ForceAtoms are the particles at the center of each monomer which
# do not interact with the fluid, but are used to implement the hard-sphere
# interactions.
# FluidAtoms are the particles representing the surface of the monomer
# which do interact with the fluid. The nanopore particles are also included
# in this group as they interact with the fluid.
# Polymer is the entire set of monomers of the composite polymer chain.
# WallAtoms are the particles of the nanopore.
#----------------------------------------------------------------------------
group ForceAtoms type 1
group FluidAtoms type 2 3
group Polymer type 1 2
group WallAtoms type 3
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particles specified through FluidAtoms
# (however, this fix does not explicity apply a force back on to these
# particles. This is accomplished through the use of the lb/viscous fix).
# We set fluid viscosity = 0.1 and fluid density = 0.00009982071 which
# means the kinematic viscosity is idential to that of water but the
# dynamic viscosity is a factor of 10 less than that of water which
# increases the diffusive dynamics by a corresponding factor of 10.
# lattice spacing dx=1.0, and mass unit, dm=0.00009982071 (makes density 1)
# Use a thermal lattice-Boltzmann fluid (temperature 300K, random number
# seed=5252). This enables the particles to undergo Brownian motion in
# the fluid.
# In this case we use the scaleGamma argument to set the mass of the WallAtoms
# to infinity.
# The commented out line can be substituted to look at the flow without noise
# which should be similar to the average flow field in the case with noise.
#----------------------------------------------------------------------------
fix 1 FluidAtoms lb/fluid 1 0.1 0.00009982071 dx 1.0 scaleGamma 3 -1 stencil 2 pressurebcx 1200 noise 300.0 5252
#fix 1 FluidAtoms lb/fluid 1 0.1 0.00009982071 dx 1.0 scaleGamma 3 -1 stencil 2 pressurebcx 1200 dumpxdmf 1000 flow 0
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining each monomer to move and rotate as a single rigid
# spherical object.
# Since both the ForceAtoms (central atoms), and the FluidAtoms (spherical
# shell) should move and rotate together, this fix is applied to all Polymer
# of atoms in the system.
# The wall atoms are frozen in space and all the calculated forces on the atoms
# are set to zero at each timestep.
#----------------------------------------------------------------------------#
fix 2 FluidAtoms lb/viscous
fix 3 Polymer rigid/small molecule
fix freeze WallAtoms setforce 0 0 0
#----------------------------------------------------------------------------
# Write position and velocity coordinates into a file every 2000 time steps.
#----------------------------------------------------------------------------
#variable x1 equal x[1]
#variable y1 equal y[1]
#variable z1 equal z[1]
#variable vx1 equal vx[1]
#variable vy1 equal vy[1]
#variable vz1 equal vz[1]
#variable x2 equal x[249]
#variable y2 equal y[249]
#variable z2 equal z[249]
#variable vx2 equal vx[249]
#variable vy2 equal vy[249]
#variable vz2 equal vz[249]
#variable x3 equal x[497]
#variable y3 equal y[497]
#variable z3 equal z[497]
#variable vx3 equal vx[497]
#variable vy3 equal vy[497]
#variable vz3 equal vz[497]
#variable x4 equal x[745]
#variable y4 equal y[745]
#variable z4 equal z[745]
#variable vx4 equal vx[745]
#variable vy4 equal vy[745]
#variable vz4 equal vz[745]
#thermo_style custom v_x1 v_y1 v_z1 v_vx1 v_vy1 v_vz1 v_x2 v_y2 v_z2 v_vx2 v_vy2 v_vz2 v_x3 v_y3 v_z3 v_vx3 v_vy3 v_vz3 v_x4 v_y4 v_z4 v_x4 v_y4 v_z4
#thermo 10
#---------------------------------------------------------------------------------
# Write coordinates of the centre of mass and radius of gyration tensor components
#---------------------------------------------------------------------------------
compute centre ForceAtoms com
compute rg ForceAtoms gyration
thermo_style custom c_rg c_rg[1] c_rg[2] c_rg[3] c_rg[4] c_rg[5] c_rg[6] c_centre[1] c_centre[2] c_centre[3]
thermo 1000
#--------------------------------------------------------------------------------
# Define number of steps variable. Write dump files for the polymer in both LAMMPS
# trajectory and vtk format (commented out here). Write xyz dump file
#--------------------------------------------------------------------------------
variable numofsteps equal 400001
#dump 1 ForceAtoms custom 500 translocationdump.lammpstrj id xu yu zu vx vy vz
#dump 2 ForceAtoms vtk 1000 dump*.translocation.vtk id xu yu zu vx vy vz
#dump 4 WallAtoms xyz $(v_numofsteps-1) walldump.xyz
#restart 50000 4nmrestart.*
run ${numofsteps} # For 250001 steps without noise, 16 minutes on AMD Ryzen Threadripper 1950X 16-Core, 41 mintues on Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz 4-core

View File

@ -0,0 +1,678 @@
LAMMPS (17 Feb 2022)
#===========================================================================#
# Immersed Boundary Wall #
# #
# Run consists of a 32-bead coarse-grained polymer #
# translocating through a solid-state atomistic wall #
# under pressure-driven lattice-Boltzmann fluid flow #
# #
# To run this example, LAMMPS needs to be compiled with a the following #
# packages: MOLECULE, RIGID, LATBOLTZ, USER-VTK #
# #
#To run this example on N cores, use command: #
# mpirun -n N /LAMMPS/EXE/FILE -in in.polymer > output.out #
# #
# If uncommented: #
# Sample output for polymer from this run can be found in the file: #
# 'translocationdump.lammpstrj' #
# and viewed using, the VMD software. #
# OR #
# 'dump.translocation.vtk' #
# and viewed using the Paraview software. #
# #
# Sample output for the wall from this run can be found in the file: #
# 'walldump.xyz' #
# and can be viewed using the VMD or Paraview Software. #
#===========================================================================#
units nano
dimension 3
boundary p p p
atom_style hybrid molecular
special_bonds fene
read_data data.translocation
Reading data file ...
orthogonal box = (0 0 0) to (48 32 32)
2 by 1 by 2 MPI processor grid
reading atoms ...
992 atoms
scanning bonds ...
1 = max bonds/atom
reading bonds ...
31 bonds
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 1 1
special bond factors coul: 0 1 1
2 = max # of 1-2 neighbors
2 = max # of special neighbors
special bonds CPU = 0.000 seconds
read_data CPU = 0.044 seconds
#---------------------------------------------------------------------------
#Creating a atomistic wall on an FCC lattice and removing the block from the
#middle to create the nanopore
#---------------------------------------------------------------------------
lattice fcc 1.0
Lattice spacing in x,y,z = 1 1 1
region wall block 28 38 0 32 0 32
create_atoms 3 region wall
Created 43008 atoms
using lattice units in orthogonal box = (0 0 0) to (48 32 32)
create_atoms CPU = 0.011 seconds
region hole block 28 38 14 18 14 18
delete_atoms region hole compress no
Deleted 851 atoms, new total = 43149
#----------------------------------------------------------------------------
# Need a neighbor bin size smaller than the lattice-Boltzmann grid spacing
# to ensure that the particles belonging to a given processor remain inside
# that processors lattice-Boltzmann grid.
# The communcation cutoff is set to 2.5 dx to ensure that all particles in the
# processor ghost fluid region (of width 2dx) are known to local processor.
#----------------------------------------------------------------------------
neighbor 0.5 bin
neigh_modify delay 0 every 1 check yes
neigh_modify exclude type 2 2
neigh_modify exclude type 2 1
neigh_modify exclude type 2 3
neigh_modify exclude type 3 3
comm_modify cutoff 2.5
#----------------------------------------------------------------------------
# Implement a hard-sphere interaction between the particles at the center of
# each monomer with each other and the wall atoms
# (use a truncated and shifted Lennard-Jones potential).
#----------------------------------------------------------------------------
bond_style fene
bond_coeff 1 60.0 2.25 4.14195 1.5
pair_style lj/cut 1.68369
pair_coeff * * 0 1.5
pair_coeff 1 1 4.14195 1.5 1.68369
pair_coeff 1 3 4.14195 1.5 1.68369
#-----------------------------------------------------------------------------
# The mass is set 4/3 PI r^3 fluid_density/31 , where r=0.617, 31 is number of
# nodes in a single monomer. The mass of wall atoms is chosen heavy as they
# are fixed.
# ----------------------------------------------------------------------------
mass * 0.00000318
#-----------------------------------------------------------------------------
timestep 0.00005
#----------------------------------------------------------------------------
# ForceAtoms are the particles at the center of each monomer which
# do not interact with the fluid, but are used to implement the hard-sphere
# interactions.
# FluidAtoms are the particles representing the surface of the monomer
# which do interact with the fluid. The nanopore particles are also included
# in this group as they interact with the fluid.
# Polymer is the entire set of monomers of the composite polymer chain.
# WallAtoms are the particles of the nanopore.
#----------------------------------------------------------------------------
group ForceAtoms type 1
32 atoms in group ForceAtoms
group FluidAtoms type 2 3
43117 atoms in group FluidAtoms
group Polymer type 1 2
992 atoms in group Polymer
group WallAtoms type 3
42157 atoms in group WallAtoms
#---------------------------------------------------------------------------
# Create a lattice-Boltzmann fluid covering the simulation domain.
# This fluid feels a force due to the particles specified through FluidAtoms
# (however, this fix does not explicity apply a force back on to these
# particles. This is accomplished through the use of the lb/viscous fix).
# We set fluid viscosity = 0.1 and fluid density = 0.00009982071 which
# means the kinematic viscosity is idential to that of water but the
# dynamic viscosity is a factor of 10 less than that of water which
# increases the diffusive dynamics by a corresponding factor of 10.
# lattice spacing dx=1.0, and mass unit, dm=0.00009982071 (makes density 1)
# Use a thermal lattice-Boltzmann fluid (temperature 300K, random number
# seed=5252). This enables the particles to undergo Brownian motion in
# the fluid.
# In this case we use the scaleGamma argument to set the mass of the WallAtoms
# to infinity.
# The commented out line can be substituted to look at the flow without noise
# which should be similar to the average flow field in the case with noise.
#----------------------------------------------------------------------------
fix 1 FluidAtoms lb/fluid 1 0.1 0.00009982071 dx 1.0 scaleGamma 3 -1 stencil 2 pressurebcx 1200 noise 300.0 5252
Using a lattice-Boltzmann grid of 48 by 32 by 32 total grid points. (../fix_lb_fluid.cpp:486)
Local Grid Geometry created. (../fix_lb_fluid.cpp:1018)
#fix 1 FluidAtoms lb/fluid 1 0.1 0.00009982071 dx 1.0 scaleGamma 3 -1 stencil 2 pressurebcx 1200 dumpxdmf 1000 flow 0
#----------------------------------------------------------------------------
# Apply the force from the fluid to the particles, and integrate their
# motion, constraining each monomer to move and rotate as a single rigid
# spherical object.
# Since both the ForceAtoms (central atoms), and the FluidAtoms (spherical
# shell) should move and rotate together, this fix is applied to all Polymer
# of atoms in the system.
# The wall atoms are frozen in space and all the calculated forces on the atoms
# are set to zero at each timestep.
#----------------------------------------------------------------------------#
fix 2 FluidAtoms lb/viscous
fix 3 Polymer rigid/small molecule
create bodies CPU = 0.001 seconds
32 rigid bodies with 992 atoms
0.70019686 = max distance from body owner to body atom
fix freeze WallAtoms setforce 0 0 0
#----------------------------------------------------------------------------
# Write position and velocity coordinates into a file every 2000 time steps.
#----------------------------------------------------------------------------
#variable x1 equal x[1]
#variable y1 equal y[1]
#variable z1 equal z[1]
#variable vx1 equal vx[1]
#variable vy1 equal vy[1]
#variable vz1 equal vz[1]
#variable x2 equal x[249]
#variable y2 equal y[249]
#variable z2 equal z[249]
#variable vx2 equal vx[249]
#variable vy2 equal vy[249]
#variable vz2 equal vz[249]
#variable x3 equal x[497]
#variable y3 equal y[497]
#variable z3 equal z[497]
#variable vx3 equal vx[497]
#variable vy3 equal vy[497]
#variable vz3 equal vz[497]
#variable x4 equal x[745]
#variable y4 equal y[745]
#variable z4 equal z[745]
#variable vx4 equal vx[745]
#variable vy4 equal vy[745]
#variable vz4 equal vz[745]
#thermo_style custom v_x1 v_y1 v_z1 v_vx1 v_vy1 v_vz1 v_x2 v_y2 v_z2 v_vx2 v_vy2 v_vz2 v_x3 v_y3 v_z3 v_vx3 v_vy3 v_vz3 v_x4 v_y4 v_z4 v_x4 v_y4 v_z4
#thermo 10
#---------------------------------------------------------------------------------
# Write coordinates of the centre of mass and radius of gyration tensor components
#---------------------------------------------------------------------------------
compute centre ForceAtoms com
compute rg ForceAtoms gyration
thermo_style custom c_rg c_rg[1] c_rg[2] c_rg[3] c_rg[4] c_rg[5] c_rg[6] c_centre[1] c_centre[2] c_centre[3]
thermo 1000
#--------------------------------------------------------------------------------
# Define number of steps variable. Write dump files for the polymer in both LAMMPS
# trajectory and vtk format (commented out here). Write xyz dump file
#--------------------------------------------------------------------------------
variable numofsteps equal 400001
#dump 1 ForceAtoms custom 500 translocationdump.lammpstrj id xu yu zu vx vy vz
#dump 2 ForceAtoms vtk 1000 dump*.translocation.vtk id xu yu zu vx vy vz
#dump 4 WallAtoms xyz $(v_numofsteps-1) walldump.xyz
#restart 50000 4nmrestart.*
run ${numofsteps} # For 250001 steps without noise, 16 minutes on AMD Ryzen Threadripper 1950X 16-Core, 41 mintues on Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz 4-core
run 400001
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- fix lb/fluid command:
@Article{Denniston et al.,
author = {C. Denniston, N. Afrasiabian, M.G. Cole-Andre,F.E. Mackay, S.T.T. Ollila, T. Whitehead},
title = {LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid}, journal = {Comp.~Phys.~Comm.},
year = 2022,
volume = 275,
pages = {108318}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
generated 0 of 3 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 2.18369
ghost atom cutoff = 2.5
binsize = 1.091845, bins = 44 30 30
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
WARNING: Communication cutoff 2.5 is shorter than a bond length based estimate of 2.6825. This may lead to errors. (../comm.cpp:723)
Per MPI rank memory allocation (min/avg/max) = 11.44 | 20.02 | 30.41 Mbytes
c_rg c_rg[1] c_rg[2] c_rg[3] c_rg[4] c_rg[5] c_rg[6] c_centre[1] c_centre[2] c_centre[3]
5.6791248 22.61273 5.110682 4.5290465 6.700106 3.8164024 3.4765595 12.000543 11.573384 10.635513
5.5867637 21.257084 5.1321825 4.822662 5.634175 3.7281301 3.6276614 11.962266 11.452708 10.387815
5.668832 21.596665 5.6165458 4.9224455 5.647044 4.0344015 4.0048875 11.821122 11.451665 10.569963
5.6598062 20.600614 6.0567785 5.3760133 6.6053545 4.0554069 4.415185 11.9427 11.557594 10.571476
5.8889045 23.387471 6.0242487 5.2674768 7.6894041 4.652066 4.2066414 11.8858 11.664507 10.642731
6.1002855 26.57562 5.2572121 5.3806503 7.2669892 5.4963641 3.9022322 12.020013 11.658221 10.555459
6.3802913 30.250297 4.3928513 6.0649685 7.4030928 6.8471704 3.7581107 11.942494 11.656142 10.62799
6.4211512 30.052916 4.0869264 7.0913409 6.4493764 7.3015592 4.274762 11.983282 11.552276 10.499697
6.4029294 29.889365 4.0196733 7.0884671 6.5903461 6.8110154 4.0382413 11.9905 11.501962 10.425593
6.3161388 28.57849 3.8057293 7.5093902 5.7575295 6.6646378 4.1567522 12.113646 11.531039 10.529351
6.4338248 29.706116 3.4974686 8.1905167 5.5124312 7.9019084 4.5042964 12.426431 11.340065 10.399931
6.5364361 30.677501 3.6562753 8.3912202 5.1990078 7.3140488 4.8107991 12.472307 11.438123 10.425278
6.6943364 31.785713 3.6152177 9.4132091 5.6058833 7.7153622 5.1164739 12.583773 11.540381 10.504743
6.7208928 32.711587 3.7061318 8.7526817 6.8070192 6.7581599 4.5471865 12.517937 11.50458 10.470699
6.6375209 30.970999 3.6881577 9.3975267 7.3010233 5.4926275 4.1912585 12.684547 11.592933 10.675434
6.8324705 33.049694 4.0146629 9.6182957 8.7999601 7.2978407 4.3307267 12.660956 11.750078 10.71392
6.779281 33.083238 3.9016444 8.9737675 8.7458049 7.7168786 4.3419836 12.501914 11.814334 10.76077
6.6792036 32.828561 3.2387228 8.5444765 7.7842222 8.5969674 3.4661156 12.790705 11.968511 10.642253
6.5389782 31.772538 3.0722036 7.9134935 6.9299213 8.9153301 3.3680216 12.861509 11.85712 10.51657
6.4748361 31.540469 3.0212413 7.3617912 6.3057097 8.4191336 3.2625709 12.657649 11.704529 10.392716
6.3985321 29.710818 2.6283214 8.6020734 5.8853082 9.3362301 3.397929 12.688643 11.780723 10.424565
6.5059208 31.090823 2.6100712 8.6261116 6.5141681 10.225958 3.6286489 12.725294 12.0647 10.108992
6.4892221 30.985335 2.4997331 8.6249351 6.4886837 10.018904 3.3600422 12.855965 12.036702 9.9287436
6.4795231 30.758266 2.8637784 8.3621758 7.1748369 10.562754 3.5302178 12.896069 12.260403 10.11639
6.4439652 28.968436 2.3431114 10.21314 6.6140604 10.553576 3.2945616 12.721326 12.375786 10.216421
6.4585206 28.635315 2.1556643 10.921509 6.5660708 11.04493 3.0441915 12.688395 12.432736 10.446406
6.4828021 29.600008 2.0553059 10.371409 6.1193108 11.704064 2.6435946 12.670355 12.450579 10.754392
6.562285 30.709961 1.9685065 10.385117 5.9437889 12.632018 2.3117868 12.914159 12.707126 10.756693
6.6264405 31.273462 2.410996 10.225256 7.2739788 12.4541 2.9699821 12.81881 12.66146 10.672797
6.7415185 32.457723 2.3242798 10.666069 7.2496003 13.12296 2.9964595 12.784276 12.647643 10.60663
6.9008565 33.656929 2.7042837 11.260607 8.5449163 14.476583 3.8202075 12.710092 12.579311 10.58884
7.061302 35.296351 3.5107103 11.054924 10.064083 15.035769 4.4216887 13.175009 12.627831 10.482424
7.1032842 36.482445 3.6799052 10.294296 10.673901 14.749052 4.3151465 13.200713 12.621232 10.584217
7.1414828 36.185373 4.297132 10.518271 11.586979 15.307501 5.1527843 13.234596 12.688071 10.498004
6.9448583 33.990665 2.8733935 11.366998 8.6757703 15.425795 3.8675398 13.552629 12.904762 10.360584
7.0012016 32.933829 3.6133714 12.469623 9.9078147 16.084749 4.8325968 13.711685 12.775596 10.565942
7.0165074 33.824117 3.4135972 11.993662 9.4449537 15.727888 4.3550075 13.648024 12.818681 10.403745
7.0456647 33.8123 3.8273095 12.001781 9.9901691 15.354572 4.7262984 13.704142 12.865313 10.379126
7.0704851 35.593578 4.4753601 9.922821 10.815193 14.191266 4.3671704 13.568897 12.968225 10.27463
7.2622103 36.997176 5.0189577 10.723566 11.931013 15.173822 5.1502453 13.704027 12.992135 10.023658
7.3237142 36.361814 5.4045676 11.870409 12.36988 16.523084 5.9090879 13.732808 12.986696 9.6059086
7.4085072 37.338445 4.6635913 12.883943 11.559431 18.221441 5.9749906 13.822776 13.056276 9.4491435
7.5435451 38.642986 4.8108253 13.451262 11.762286 19.25048 6.2716652 13.76389 13.028638 9.3396345
7.5041212 37.242572 4.2407367 14.828527 10.397401 20.55556 6.0212974 13.656341 13.093764 9.1329939
7.4871925 37.814264 4.2622814 13.981507 10.161983 20.447606 5.7021938 13.637928 13.132284 8.9440227
7.3541675 36.518431 4.6241377 12.941211 10.094391 18.64877 5.616799 13.607907 13.208134 8.8058927
7.3886114 36.915543 4.9408074 12.735228 10.630813 18.896827 5.7094032 13.752166 13.333961 8.6671299
7.2634179 32.71655 5.167184 14.873507 10.523039 19.079411 6.3878762 13.935234 13.303392 8.6048102
7.3106746 33.990367 5.5659367 13.88966 11.693262 18.632011 6.5331934 13.883039 13.479355 8.6248803
7.2557189 35.200297 4.4884764 12.956683 10.303503 17.915053 5.6282044 13.728328 13.609539 8.6112695
7.3353193 37.845973 3.3837009 12.577235 8.6243964 18.581563 3.7985161 13.536049 13.443702 8.4039237
7.6187173 41.73183 4.4262573 11.886765 10.443613 18.59631 3.7033134 13.201011 13.445133 8.1443418
7.6874247 44.184475 4.0611444 10.850879 10.846122 17.980387 3.5984272 12.76067 13.517519 8.0974318
7.5889076 42.515998 3.8244222 11.251099 9.9966093 17.458176 3.1726154 12.592342 13.578402 8.0274103
7.7744651 44.148982 4.2129835 12.080342 11.586008 18.953803 4.6881973 12.781052 13.744522 8.1609444
7.8762095 46.571962 4.2336595 11.229055 11.956938 18.998552 4.4303527 12.78768 13.885168 8.5476521
7.5991537 41.910661 4.1811631 11.655312 11.231672 18.166889 4.3773455 12.90303 13.93913 8.622434
7.5180184 41.555253 4.1818325 10.783516 11.789934 16.439025 4.5300192 12.834806 13.889747 8.7422201
7.3943137 38.451129 3.5281391 12.696607 10.233182 17.033555 4.7102974 13.063809 13.856187 8.8178674
7.4384703 37.718734 2.9933066 14.6188 8.9987509 18.607817 4.5600437 13.330138 13.653329 8.830152
7.3814288 36.318864 2.9682884 15.198339 8.1447589 18.551238 4.1590099 13.403412 13.460209 8.9327916
7.5394784 38.362656 3.0647462 15.416333 8.1640602 19.326608 4.2298797 13.537652 13.374601 8.977215
7.7262621 40.829884 2.5614313 16.30381 7.5956765 20.560929 3.8808909 13.585574 13.235011 8.8738183
7.7634714 41.306228 2.512465 16.452796 7.6669614 20.470645 3.057384 13.7604 13.0761 8.9920836
7.7392158 41.493078 2.8531936 15.54919 8.0431313 20.099662 3.1955265 13.9152 13.113045 9.058674
7.5985272 40.439807 2.7690182 14.528791 7.9171761 19.019929 2.8658568 13.989693 13.357516 9.1564434
7.4219615 37.367221 2.4948211 15.22347 6.0308738 18.93324 1.504212 14.267885 13.404543 9.4027912
7.4337577 38.2949 2.2630142 14.702839 5.9811355 19.032103 2.0157301 14.111907 13.14959 9.3652
7.576974 39.734563 2.1660892 15.509883 5.9136162 19.743031 2.2197614 13.948861 13.028721 9.3094866
7.613064 39.552571 2.2430107 16.163162 5.2452948 20.628821 1.761766 13.91542 13.11386 9.2609839
7.4304964 37.395035 2.0924773 15.724764 3.8024501 19.174766 1.0800892 13.818389 13.282354 9.3579447
7.402555 37.586705 1.8744432 15.336672 3.8833298 19.105844 1.3149418 14.039309 13.154403 9.4725339
7.5729264 39.147513 1.8465945 16.355106 4.0187048 19.517631 0.85864085 13.933538 13.221032 9.7537823
7.4623367 38.270725 2.1423167 15.273427 3.5813645 19.406363 0.65838543 13.993137 13.355732 9.8478173
7.4989252 39.056297 2.6612859 14.516296 5.6581214 18.561801 1.7589597 13.944902 13.213684 9.7703358
7.7287706 43.107187 2.2708932 14.355815 4.6914188 18.398569 1.0662384 14.078863 13.122087 9.9631384
7.5071044 40.795006 1.9069526 13.654657 4.4827488 17.290511 1.4705619 14.047894 13.114412 10.182659
7.4914737 40.312354 1.6018488 14.207975 3.9314181 17.263651 1.5478043 13.954595 13.077267 10.41147
7.4199565 41.391456 1.6731137 11.991185 4.1824224 15.97579 1.5685213 13.871744 12.989602 10.275845
7.416902 41.912411 1.4033732 11.694651 3.3726716 15.637815 1.0273218 13.976518 13.128562 10.295669
7.2867427 39.805835 1.4707718 11.820012 3.6671966 14.765029 0.94291607 13.805058 12.923892 10.395765
7.2100193 38.434131 1.6766904 11.873557 4.0495584 14.141072 0.97411651 13.926 12.986124 10.072457
7.239882 39.960159 1.5194968 10.936236 3.655041 13.912396 0.69783599 14.044768 13.266022 10.243697
7.1116791 38.675014 1.5083442 10.392622 2.9874908 13.979515 0.16801424 14.044827 13.246321 10.276334
7.0609051 38.430038 1.6243388 9.8020035 4.0093371 13.867168 0.64290222 14.023211 13.135387 10.277262
7.0792993 39.369331 1.5654066 9.1817415 3.771563 13.117196 0.85780388 13.911868 12.999595 10.224534
7.2965527 41.010706 1.846273 10.382702 4.7894996 13.831259 1.6966178 14.099587 13.097114 9.9952306
7.5967021 45.678132 2.2037669 9.827984 5.7691461 15.144652 1.8629728 14.056023 13.048002 9.9193112
7.7387204 47.023532 2.6300635 10.234199 7.4223621 16.142687 2.6995584 14.008434 13.160588 9.6458891
7.7861056 48.298371 2.434936 9.8901328 6.9942023 15.25314 2.233011 14.156387 12.920426 9.52413
7.8750729 50.116698 2.4912142 9.4088616 7.2648067 15.153074 2.1075436 14.241748 12.83115 9.536023
8.0561165 52.922219 2.3358083 9.6429863 7.5204461 16.248453 2.5969094 14.368041 12.813963 9.6838946
7.8601155 50.667202 2.5823911 8.5318218 8.9387409 15.288841 2.637965 14.575368 12.790655 9.512189
7.9519001 53.153145 2.8035923 7.275977 9.3280485 14.607831 2.5512231 14.593888 12.59324 9.529756
8.1215546 56.268574 2.6955302 6.9955446 9.9637943 14.68746 2.7194749 14.562912 12.33595 9.6964953
8.0814716 56.147365 2.5708169 6.5920012 9.6516918 14.956238 2.6988067 14.619295 12.31588 9.5657035
8.0391672 55.40859 2.6706226 6.5489961 9.9815392 14.849532 2.8236448 14.69406 12.413215 9.4677972
7.954281 54.664753 2.2430897 6.3627438 9.1919581 14.531337 2.6262796 14.618053 12.50302 9.5639771
7.9220365 52.728419 3.302899 6.7273453 11.667906 15.582432 3.5889199 14.647553 12.624881 9.7498354
7.9190175 52.316868 3.3224972 7.0714731 11.652483 16.20396 3.6776506 14.63116 12.666085 9.7865207
8.1861926 56.449341 2.8594222 7.704986 11.547243 17.95085 3.7347565 14.571249 12.591979 9.9582757
8.235899 56.694016 2.9928433 8.1431725 11.757348 18.761684 3.703153 14.538856 12.883352 9.6600736
8.2040264 54.969892 3.2151096 9.1210464 12.126997 19.689953 4.0892792 14.49866 12.971747 9.6995321
8.4703361 57.01259 3.326592 11.407412 12.544071 22.70592 4.6661337 14.206986 13.007482 9.7586369
8.3333572 54.140021 3.6896475 11.615174 13.092043 22.055729 5.040511 14.117051 13.204378 9.3697137
8.3796917 54.911236 3.9620237 11.345974 14.024061 21.699122 5.4642459 14.161918 13.223347 9.289839
8.5274099 55.046071 5.2649951 12.405654 16.3991 22.539097 6.7267852 14.235824 13.267759 9.4445772
8.65292 54.358364 6.2485939 14.266066 17.832367 24.641453 8.1490606 14.365197 13.254637 9.4257221
8.406672 51.102236 5.9722191 13.59768 16.81161 23.489353 7.7106841 14.511228 13.048101 9.5571201
8.497874 51.425254 7.2045406 13.584068 18.685944 23.179709 8.6806038 14.444355 12.957985 9.9555803
8.2530171 48.193496 6.2020179 13.716778 16.510431 22.887262 8.0573488 14.546862 13.181599 10.115182
8.5769734 53.146725 7.0307589 13.386989 18.590549 24.076393 8.4487937 14.337882 13.531309 10.238789
8.7349734 56.048538 6.7991794 13.452043 18.790811 25.452642 8.5714374 14.497072 13.477217 10.167778
8.8229687 55.758952 7.5702425 14.515583 19.992558 26.012857 9.5321547 14.47072 13.342111 10.034618
8.9610843 59.19793 7.0951607 14.00794 19.809197 25.778019 8.6862122 14.205504 13.292836 9.9369183
8.8651356 58.274774 7.9490777 12.366778 20.806012 23.389167 8.4413757 14.552846 13.404983 9.7934121
8.840204 57.726476 8.6137658 11.808964 21.541871 23.090188 8.9235658 14.607078 13.507897 9.8225028
8.9027501 58.704007 8.9712417 11.583711 22.000137 23.216096 8.801928 14.887846 13.604962 9.8413585
9.1106818 61.907467 9.9118505 11.185206 23.650567 23.315968 8.6502934 14.809455 13.515307 9.9278773
9.2953169 64.881336 11.225659 10.295921 25.877991 22.909757 8.7180531 15.05584 13.602844 10.030766
9.112855 62.24612 10.300246 10.49776 24.357801 22.730586 8.6773679 15.392899 13.664771 10.210303
9.1613574 64.084769 9.2183066 10.627393 23.685295 23.43904 8.6964146 15.602023 13.550211 10.317227
9.364004 70.040734 7.8720897 9.7717468 22.803607 23.243647 7.6992269 15.633623 13.501114 10.288972
9.6117123 73.839199 8.4993505 10.046464 24.089826 24.453729 8.28423 15.757243 13.614362 10.491274
9.6088911 74.64098 8.3839188 9.3058903 23.835952 23.83324 7.8115082 15.939103 13.697601 10.468357
9.5499408 73.710692 7.9641757 9.5265009 22.796676 24.356785 7.7627539 16.255989 13.522966 10.598448
9.7603599 77.414208 8.1078856 9.7425316 23.451155 25.174127 7.8052431 16.504506 13.52755 10.515104
9.9292472 81.730209 7.0835751 9.7761673 22.620637 25.8336 7.3736019 16.781396 13.708308 10.657181
10.192593 85.934429 7.3870649 10.56746 23.446329 28.103023 7.9755157 17.016784 13.675975 10.64552
10.331132 89.530187 6.2069617 10.995145 21.548171 29.48513 7.7085803 17.214236 13.776577 10.864792
10.689564 96.387474 5.8761902 12.003123 21.778969 31.996275 7.8703615 17.382617 13.809472 10.852016
10.981417 101.04867 6.774335 12.768511 24.191039 34.360184 8.8031364 17.474652 13.70242 10.917676
11.231157 106.64521 6.938227 12.555452 25.060127 34.981471 8.7636491 17.698073 13.78739 11.044
11.484032 111.87421 6.8621336 13.146654 25.168546 37.03647 8.7658063 17.98786 13.904238 11.121442
11.838947 119.6339 7.1586245 13.368149 27.029666 38.8442 8.8328013 18.402276 13.862771 11.111164
12.014911 124.06467 7.0986951 13.194712 27.395345 39.251378 8.7398688 19.069209 13.890573 11.197392
12.236161 129.68558 6.4713826 13.566678 27.009763 40.869816 8.5636631 19.415507 13.879153 11.303454
12.578499 138.52623 5.5654176 14.126975 26.582002 42.792685 8.1170979 19.783952 13.972292 11.278972
12.656684 140.67809 5.466318 14.047226 26.364908 42.734682 7.9352326 20.266129 14.101967 11.422896
12.752092 142.96749 5.02464 14.623712 25.719841 43.781275 7.636268 20.672222 14.17167 11.485268
12.611155 141.59429 4.8234995 12.623442 24.948494 40.530937 7.0767823 21.184353 14.289871 11.727502
12.683493 145.08077 4.3368659 11.453361 24.0622 38.833151 6.3988595 21.60257 14.413808 11.850319
12.512817 141.67117 3.689281 11.210137 21.235542 37.597965 5.6125332 22.143814 14.721444 11.990917
12.704453 146.43903 3.4774081 11.486701 20.597768 39.234772 5.5359685 22.331494 14.81428 12.15573
12.815748 149.86579 3.1401554 11.237454 19.076249 39.326212 4.8900888 22.767125 15.060961 12.246987
12.521903 143.8947 2.8556577 10.047707 16.062093 36.463196 3.9921116 23.438929 15.26232 12.464667
12.613831 147.19107 2.682535 9.2351194 14.851406 35.622125 3.5000243 23.80227 15.402101 12.603147
12.482231 145.47155 2.4422563 7.8922776 13.212049 32.29911 2.9125789 24.324959 15.340398 12.82213
12.447731 145.55257 2.2483828 7.1450659 12.085221 30.905315 2.5006962 24.813595 15.253097 13.02677
12.349556 143.73867 1.8600156 6.9128495 10.367745 30.499356 2.1590445 25.259756 15.16605 13.294286
12.289733 142.27701 1.6864662 7.0740564 10.371615 30.693661 2.1892249 25.770131 15.126038 13.365296
12.233296 143.13767 1.5342447 4.981619 9.66231 25.278909 1.7780183 26.269715 15.093825 13.456342
12.144896 142.12134 1.1700884 4.2070784 6.3134975 22.970694 1.0775416 26.662779 15.034491 13.6381
12.128171 141.65813 1.1500513 4.2843476 6.0320681 23.119673 1.0560618 27.16529 15.091221 13.656038
11.905649 137.19034 1.0214698 3.532676 6.308578 20.166583 1.0702176 27.575125 15.084415 13.823778
11.941392 137.93049 0.97803476 3.688319 5.4908192 20.385825 0.8404333 28.14823 15.301132 13.816009
11.823384 135.90594 0.88231549 3.0041477 6.63445 17.746732 0.84827604 28.59174 15.392449 13.935096
11.736173 133.82936 0.90518628 3.0032057 6.0140779 17.802498 0.8743252 28.985566 15.285766 14.139273
11.600228 131.35983 0.95197593 2.2534848 5.2039166 15.384852 0.77267503 29.334688 15.089752 14.416467
11.536021 130.72093 0.82865117 1.5302055 3.7620337 12.126608 0.49685567 29.895513 15.024208 14.486482
11.478085 129.78662 0.91499731 1.0448077 5.3415729 8.598068 0.5645909 30.482392 15.060175 14.420855
11.551755 131.69353 0.93437291 0.81514768 4.8624628 8.1786544 0.45258372 30.977203 14.871154 14.586073
11.507361 130.37964 1.2980456 0.74167715 3.6758434 7.9904883 0.32692917 31.520994 14.780583 14.669823
11.251615 124.34563 1.4365745 0.81664285 2.3486181 8.4154278 0.31422704 32.135749 14.738362 14.739556
11.142902 122.20679 1.3311756 0.62630334 1.1333202 5.875869 0.10015954 32.585121 14.82025 14.999557
10.982122 118.66528 1.3532551 0.58846199 1.312964 4.1427323 0.14481468 33.020173 14.658882 15.019613
10.816787 114.83646 1.209846 0.95656112 1.8096975 7.0244666 0.15052237 33.45427 14.676057 15.145043
10.824365 115.28692 0.95824744 0.921717 0.96866532 6.1412539 0.23384688 34.159319 14.61995 15.045396
10.713341 112.76624 0.99489784 1.0145443 -1.8214753 5.9985652 0.12103208 34.824629 14.619453 14.949615
10.522314 108.70422 1.0091966 1.005669 -3.2372581 5.7335046 -0.01123867 35.029149 14.743713 14.951909
10.189953 102.19633 0.76715497 0.87165451 -2.084873 3.8860192 0.030455278 35.369954 14.770215 15.069377
10.074498 99.787094 0.9041367 0.80427237 -3.3962643 3.6634151 -0.043441217 35.823958 14.642649 15.12475
9.7661424 93.31002 1.1170317 0.95048618 -3.8114099 2.9618091 -0.02345537 35.878016 14.499936 15.103992
9.8498867 94.625733 1.3764552 1.0180792 -6.701149 3.535721 -0.037249813 36.666686 14.162756 15.124738
9.5989713 89.228633 1.8154405 1.0961763 -7.8006574 1.5835489 0.13021931 37.167106 13.990285 14.969628
9.2033402 81.57259 1.9204535 1.2084269 -7.0645858 2.1611971 0.09842416 37.562805 13.874481 14.969086
8.9877974 76.990067 2.4170989 1.3733373 -9.1087997 1.3096519 0.097999203 38.066619 13.662552 15.035676
8.7829715 73.605802 2.2579761 1.2768102 -8.7941502 -0.44896604 0.18825728 38.422838 13.892116 15.068356
8.397007 67.218861 2.2107222 1.0801438 -8.4589407 -0.45291515 0.047795153 38.810192 13.849268 15.144182
8.0905137 62.300348 2.0974772 1.058587 -7.7635826 -1.0685684 0.017977598 39.180301 13.889395 15.19939
7.7981356 57.036019 2.4603766 1.3145236 -7.6714317 -0.53318452 -0.047331367 39.464185 13.777564 15.291879
7.5443615 52.977221 2.6940256 1.2461435 -7.4916753 -0.85689842 -0.22809064 39.874658 13.607154 15.218349
7.1773963 47.268991 2.9555555 1.2904718 -7.2729937 -1.1225327 -0.55546599 40.271409 13.531953 15.262524
6.7924737 42.473982 2.3591076 1.304609 -5.9650995 -1.3559334 -0.24619431 40.613216 13.67053 15.371721
6.4047034 37.203058 2.3661236 1.4510451 -5.5505069 -0.12997502 -0.65030005 40.929995 13.854641 15.494995
6.2503417 34.846931 2.3757913 1.8440492 -5.3250854 -0.17786419 -0.71703595 41.467913 14.016842 15.665216
6.0014877 31.154735 2.405378 2.4577425 -5.0096739 -0.78194846 -0.76074897 41.854729 14.081133 15.718179
5.887118 29.54717 2.3319974 2.7789908 -5.4405019 -1.2580317 -0.46737957 42.446816 13.953535 15.614717
5.574017 25.069953 2.4199473 3.5797646 -5.1716175 -1.0796429 -0.4835057 42.716947 14.05713 15.529155
5.3004178 21.658925 2.4098165 4.0256872 -4.5606869 -1.0774066 -0.76683329 42.888021 14.169997 15.505613
4.9869336 17.529506 2.9898206 4.3501803 -4.1362824 -1.4796469 -0.89222052 43.033969 14.176224 15.379232
4.9161194 16.56842 3.2911843 4.3086261 -3.9823287 -1.4544137 -0.58264462 43.481542 14.185446 15.483539
4.6377006 13.780308 3.426219 4.3017398 -2.8661271 -1.2542922 -0.80206871 43.800739 14.452403 15.186856
4.5779793 13.358376 3.6145625 3.9849558 -3.1410198 -1.2689514 -0.81196038 44.26284 14.492727 15.293513
4.3558567 11.118081 4.1614317 3.6939748 -2.9206635 -1.2620703 -1.0462379 44.279566 14.511776 15.123432
4.2316899 9.9094447 4.3522028 3.6455517 -2.7079343 -1.1229082 -1.0152041 44.277457 14.542006 15.184649
4.0973213 7.0665053 5.1766146 4.5449219 -2.4919015 -1.2646603 -1.1840197 43.827378 14.516317 15.199573
4.0369645 5.4884313 5.5872525 5.2213983 -2.0301732 -0.60144938 -1.7426943 43.897785 14.606111 15.549478
3.9372665 5.1123696 4.5327829 5.8569151 -2.0383544 -0.37554517 -1.834787 44.108415 14.363606 15.8062
3.9505011 3.9623488 5.7818776 5.862233 -1.5966156 -0.71519013 -1.8878703 44.125426 14.234378 15.884472
3.9867338 4.378454 5.9708226 5.5447697 -2.5757451 -0.82923393 -1.4216003 44.269448 13.843056 16.176811
3.9384941 4.3546117 5.746576 5.410548 -2.663256 -1.6902046 -0.7406017 44.362091 13.870045 16.184167
3.9763807 4.0479998 5.4568714 6.3067322 -2.5759549 -1.5670163 -0.74305505 44.425507 13.924274 16.272621
4.0049376 3.6417944 5.9713996 6.4263314 -2.2901498 -1.746341 -0.48906445 44.617519 14.111966 16.310168
3.9541586 3.1115966 5.7828363 6.7409373 -1.8577256 -1.5543545 -0.27982275 44.867515 14.207829 16.201679
3.8533299 3.0314915 5.8909658 5.9256943 -1.6293009 -1.7132056 -0.010559507 44.836046 14.488851 16.028364
3.9895085 3.5031592 5.950735 6.4622843 -1.6585642 -2.5014698 0.11728467 44.781597 14.528264 16.028654
3.9940102 4.0020763 5.5358121 6.4142294 -2.3087704 -2.4575058 0.28218356 45.143694 14.583388 16.065903
3.9692902 4.2879215 5.0967267 6.3706161 -2.4149231 -2.4980495 0.8858943 45.204629 14.571685 16.123752
3.8421748 3.7849975 4.1227714 6.8545384 -2.1040008 -1.9247714 0.66599537 45.53101 14.444278 15.995847
3.7935321 3.7744776 3.8823407 6.7340676 -1.9128781 -2.451945 -0.015014488 45.645701 14.07631 15.83423
3.7326193 3.055587 3.9467223 6.9301373 -1.6924685 -2.0643253 0.14702661 45.946585 13.793587 15.781884
3.7359179 3.2941368 3.9325633 6.7303821 -1.8538621 -2.274301 0.22171433 46.212794 13.378101 15.333826
3.7256331 3.2103198 4.3800893 6.2899328 -2.298079 -2.007437 0.62638132 47.061956 13.080221 15.041718
3.8753869 2.5157988 5.0588949 7.44393 -2.1676604 -1.8944353 1.6770649 46.518508 13.013152 15.10783
3.9023118 1.9305785 5.3800954 7.9173636 -1.9137619 -1.6751959 1.4526051 45.881152 12.853569 15.389121
4.0189136 2.6780922 5.2420445 8.2315299 -2.5019725 -1.6368197 0.86779881 46.084494 12.845175 15.522119
3.9926202 2.6026239 5.0934213 8.2449706 -2.2714439 -1.2360538 0.95942249 46.319586 12.746254 15.376264
4.0387441 3.5865607 4.5449838 8.1799097 -2.9054897 -0.82379878 0.71259555 46.587969 12.627339 15.443048
3.9766944 2.3395126 4.580221 8.8943646 -2.0494558 -1.1504118 0.99107053 47.06753 12.583063 15.218376
3.9765639 2.6424201 4.5926326 8.5780079 -2.2235036 -0.99634958 1.8929828 47.247294 12.379867 15.523906
4.0987093 2.8568789 4.809096 9.1334434 -2.6522513 -1.4016198 1.5518783 47.081103 11.984745 15.606367
4.194169 3.2207999 4.7313502 9.6389033 -2.8831215 -1.9409707 1.6945333 46.965711 11.853961 15.602458
4.3216351 4.0928708 4.8676973 9.7159623 -3.4545408 -2.6395808 2.3621192 47.071457 11.909102 15.643973
4.3864348 4.5047703 5.053936 9.6821041 -3.4445662 -3.0848073 1.9994037 47.387407 11.587947 15.591975
4.339865 4.5552555 4.3672854 9.9118872 -3.3188277 -2.3915438 2.1301363 46.703739 11.489745 15.673039
4.5565062 5.8906262 4.046224 10.824899 -3.8590697 -3.9130435 2.6364135 46.714562 11.461297 15.60172
4.4725627 4.762759 4.5618408 10.679217 -3.8621369 -3.6363438 3.1654225 47.029131 11.611145 15.59931
4.4907163 4.2192216 4.9271816 11.020129 -3.704867 -3.0770143 3.0251226 46.907436 11.55507 15.635882
4.4642996 4.0790286 4.7983732 11.052569 -3.6113365 -2.7907197 2.6348566 46.995925 11.754609 15.80292
4.4359211 3.0508163 5.5426878 11.083892 -3.2733365 -2.5605532 2.9179747 46.855962 11.632278 15.771247
4.3715274 2.8131166 5.105503 11.191632 -2.8808974 -1.6375638 2.1311445 47.285733 11.671954 15.774169
4.6333803 2.5994199 5.9589165 12.909876 -2.8993818 -1.690807 2.2046427 46.764617 11.923644 15.983254
4.517438 1.9131221 5.5366037 12.95752 -1.9125567 -1.1177095 2.9652408 46.830446 12.119265 16.135206
4.5857777 1.484764 6.255807 13.288786 -1.9516938 -0.97176 3.2169069 46.939013 12.410832 15.872185
4.5534986 0.92734596 6.485236 13.321768 -1.3175099 -0.75125589 3.3439168 46.784883 12.769785 16.089404
4.7279336 0.8923972 7.8910845 13.569874 -1.3267294 -0.32312416 4.0209551 46.228477 13.095816 16.13785
4.8037021 0.93752873 7.6154607 14.522564 -1.5243785 -0.11076943 3.6530215 46.306736 12.895618 16.22695
4.8699089 1.0186177 7.5554346 15.14196 -1.4714226 -0.24479035 4.8689726 46.312269 12.863162 16.039795
4.7980286 1.0340386 7.6742517 14.312789 -1.5300336 -0.72113788 5.0882836 46.085204 12.998744 15.788456
4.7815318 1.0765442 8.1307974 13.655704 -1.1934196 -0.72776865 5.6247712 46.14481 12.919244 15.775921
4.8891819 1.2244934 8.4315643 14.248042 -1.4903131 -1.4333131 6.258274 46.095732 12.500237 15.637396
4.8794287 0.81103975 9.5245578 13.473227 0.38828946 -0.1377745 6.689661 45.962502 12.55481 15.903187
4.8841026 0.89176089 8.7533616 14.209336 0.34801124 -0.34214608 7.0399818 46.43523 12.390685 15.827212
4.7684035 1.1368727 9.3503706 12.250428 -0.5991286 -1.3411687 6.3995302 46.469366 12.435198 15.883666
4.7498479 1.3754779 9.9669611 11.218616 -1.0251618 -1.8569607 6.551669 46.494143 12.439745 15.918217
4.6802973 1.1747087 9.6744732 11.056001 -0.87924008 -1.2475387 6.541228 46.895476 12.46288 16.071081
4.6518692 1.3927457 8.9670705 11.280071 -1.231736 -0.87513691 6.3981534 46.920091 12.300636 16.259108
4.7937659 1.8648274 9.6822253 11.433139 -2.1921179 -2.1035441 6.8287399 47.061606 12.131104 16.203364
4.8582278 2.1761468 11.018829 10.407402 -2.2354138 -1.9775656 6.7273396 47.097981 12.262677 16.064456
4.9420618 2.682449 11.940928 9.8005977 -2.6721307 -2.7663811 6.2239463 46.979317 12.366378 15.995629
4.8140015 2.666399 11.364318 9.143894 -2.5312589 -2.9668601 5.0193648 46.988493 12.598349 16.002225
4.8674087 3.7566739 11.588736 8.3462578 -3.63029 -3.8106606 5.0000967 47.307753 12.826366 15.682552
4.8134629 4.1577906 10.868092 8.1435426 -3.8956627 -3.817069 4.6317654 47.393748 12.906032 15.607951
4.8373582 3.7740897 10.696188 8.9297563 -3.3937745 -4.022708 5.1044598 46.965685 12.95605 15.798003
4.7431176 2.7375414 11.412625 8.3469982 -2.0636543 -2.7075287 4.652172 47.222039 12.843726 15.524819
4.8666966 3.2216686 11.486129 8.9769382 -2.9196895 -3.5233085 4.5883204 47.087583 12.850841 15.625265
5.037894 3.2595191 13.043842 9.0770148 -3.2854139 -3.6246625 5.3103558 46.968439 12.69909 15.477103
5.1354747 3.0195718 13.556952 9.7965771 -3.0086155 -3.5275377 6.2926524 46.914288 12.61929 15.490817
5.054951 2.4031463 13.532406 9.6169768 -1.2395914 -2.7096846 6.7796891 47.153728 12.687835 15.547549
5.1875014 2.8542159 13.822039 10.233915 -1.7656771 -3.4026285 6.7763376 46.932243 12.574265 15.530689
5.3019622 3.9944755 15.109192 9.0071357 -3.1953743 -4.1898153 6.6344592 47.075196 12.325246 15.393783
5.3255707 3.8317248 15.802103 8.7278756 -4.1715054 -3.9795648 6.8259417 47.121191 12.516509 15.204247
5.2847174 3.7739204 15.007351 9.1469671 -4.1312495 -3.9781887 6.6652294 47.092124 12.349478 14.827379
5.3070504 4.4177545 15.308537 8.4384918 -4.1694142 -4.1176497 6.30043 47.417358 12.186134 14.337053
5.1428545 4.2350341 13.79701 8.4169078 -3.0858756 -4.175597 5.5550527 47.798181 12.19826 14.371919
5.0916931 4.007808 13.990142 7.9273894 -2.6284962 -3.664652 5.1801099 47.826648 12.271166 14.258512
5.1207812 3.0987536 15.035017 8.0886292 -1.8579952 -2.8963623 5.7510295 48.074404 12.425036 14.209401
5.261392 3.7892449 16.095191 7.7978105 -2.2084374 -3.4785142 6.0787394 48.346573 12.106015 14.005575
5.2299037 3.1378252 15.405364 8.808704 -1.9940029 -3.2472718 7.0223582 48.13258 12.207942 14.122991
5.0847232 3.0195371 14.26044 8.5744329 -2.2280699 -3.3160048 6.6211968 48.305579 12.243192 14.218207
5.2099944 2.3848725 15.070904 9.6882649 -1.9512085 -2.758946 8.1652211 48.70264 12.448375 14.162726
5.0829609 2.4079855 14.198566 9.2299398 -0.9342553 -2.3918926 7.7071932 48.615337 12.145483 14.026161
4.9123966 1.7986032 13.288541 9.0444956 0.34077689 -1.1884354 6.6680966 48.636387 12.273546 14.099622
5.0656194 1.7079031 13.157745 10.794852 -0.60083161 -1.7378669 7.1113577 48.813855 12.432387 14.292583
5.001624 1.9357936 13.500103 9.5803462 -0.97433049 -1.7387712 6.7082753 48.673352 12.341789 14.486154
4.9651268 2.0730461 12.717704 9.8617343 -1.0168677 -1.6024948 6.4680566 48.135245 12.509397 14.755566
4.8126691 2.0883287 11.286475 9.7869793 -0.84779713 -1.477076 6.1596891 47.866821 12.565848 15.001587
4.8160878 2.0771316 12.242252 8.8753183 -0.97460749 -1.4414824 5.985179 47.686466 12.380114 14.987609
4.8691495 2.7111742 11.456276 9.5411665 -1.5433713 -2.2467648 5.9775239 47.692273 12.389246 14.857638
4.8352157 2.7953682 11.544482 9.0394613 -2.1478063 -2.5269499 5.9691609 47.644873 12.348664 14.963463
5.0029789 2.7155984 13.2236 9.0905992 -2.3926933 -2.5705056 6.8758642 47.427248 12.213002 14.771164
4.8762424 3.0317147 13.189144 7.5568805 -3.0435753 -2.5884095 5.6381539 47.4553 12.218161 14.757811
4.8714154 3.2730476 12.976807 7.4808337 -3.5804478 -2.5203488 5.3017019 47.488117 12.17796 14.86696
4.816237 3.5152062 12.295509 7.3854234 -3.621571 -2.5162143 5.330831 47.598877 12.098728 14.828357
4.8644505 4.5256588 12.177703 6.9595173 -4.4911417 -3.0146957 5.2675583 47.835598 11.876627 14.750142
4.7597795 5.0725051 10.489555 7.0934406 -4.4621198 -3.0430192 4.3256409 47.751655 11.657782 14.932432
4.712697 4.5661784 10.722356 6.9209786 -4.424569 -3.1123913 4.2768529 47.976117 11.747798 14.987024
4.7795598 4.8454367 10.838063 7.1606927 -4.3825176 -3.0851771 3.9220545 48.496146 11.500963 15.03332
4.7751697 5.0979552 10.310951 7.3933399 -4.3281042 -3.5972836 4.4343041 48.432067 11.299763 15.144499
4.7501689 4.8063868 10.668985 7.0887323 -4.1586067 -3.5006871 4.6206011 48.578509 11.130533 14.999507
4.6057607 3.5361519 10.771159 6.9057208 -3.6956854 -2.6270431 4.7428592 48.567827 10.93894 14.973509
4.7274945 3.5803166 12.435177 6.3337108 -3.998566 -2.940014 4.8136799 48.555172 10.797277 14.892997
4.6972196 3.3453085 12.399958 6.3186056 -3.3634229 -3.1970773 4.3544656 48.517463 10.735992 14.863037
4.7936833 3.8716061 12.836185 6.2716078 -4.2443681 -3.510684 4.6990533 48.536463 10.537689 14.80494
4.7122692 3.2184871 12.925674 6.0613197 -4.1878842 -2.9433308 4.7523611 48.978408 10.308125 14.671497
4.8400401 4.2642953 12.863633 6.2980597 -4.9482047 -3.7839933 4.9855124 48.881193 10.397308 14.639498
4.8030887 3.4592658 13.583574 6.0268204 -4.2772212 -3.2314243 4.9607782 48.737213 10.415148 14.550388
4.6884371 3.3883236 12.880371 5.7127476 -4.5649682 -3.0061128 4.7109307 48.312545 10.586365 14.49501
4.7413483 2.7099369 14.054976 5.7154709 -4.139199 -2.5247799 5.326198 48.473265 10.906804 14.653157
4.6544387 3.1020521 13.575386 4.986361 -4.4223666 -2.367089 3.3886744 48.584014 11.027768 14.765362
4.649186 3.3640975 13.462647 4.788186 -3.9190557 -2.6219302 2.6191128 48.634892 11.230035 14.657533
4.5798923 3.7733448 12.237732 4.9643369 -3.9456077 -2.7427012 2.225175 48.369607 11.406487 14.458891
4.7319155 5.3672149 12.516272 4.5075374 -5.8404228 -2.8186498 1.8950981 48.194425 11.294903 14.52376
4.730338 6.0211054 12.124734 4.2302578 -5.7206698 -3.3151249 2.0206706 48.145366 11.256584 14.586986
4.8004476 5.7171938 12.711686 4.6154181 -5.8509494 -3.1802943 1.9953782 47.983024 11.141295 14.420433
4.7826925 5.4183756 13.161437 4.294335 -5.7204903 -2.7245837 2.1746648 47.722469 10.937735 14.284407
4.83525 5.6895061 13.578545 4.1115914 -5.9970867 -2.5790855 2.2884952 47.891887 10.856459 14.453546
5.0400427 6.4952118 15.230844 3.6759749 -7.3050276 -2.5874154 1.9040862 48.261678 10.91544 14.398724
5.072689 6.5174505 15.689186 3.5255366 -8.0512743 -1.8210629 1.5565397 48.387813 10.789155 14.456136
5.0223577 5.9084341 14.962557 4.3530863 -7.5025876 -1.3010758 1.4712225 48.88755 10.728223 14.660474
5.0969893 5.7626384 15.674689 4.5419728 -7.625301 -1.3603609 2.4328528 49.305565 10.765331 14.313751
5.258256 7.1737927 15.949883 4.5255803 -8.8733934 -1.5581634 2.8790811 49.315394 10.804717 14.29178
5.4271348 7.4335597 17.280954 4.7392793 -9.699372 -1.6979891 3.5320035 49.343766 11.042891 14.304331
5.6778785 8.4193558 19.154107 4.6648423 -10.985457 -2.0982065 4.1399965 49.307767 11.322321 14.082537
5.6946531 7.8911055 19.427763 5.1102054 -10.76297 -2.5213523 4.1442149 49.426788 11.307042 13.909045
5.589667 7.841533 17.840603 5.5622416 -10.419549 -2.8064807 4.1639596 49.698999 11.001171 14.174651
5.6850452 8.5171271 18.307472 5.4951393 -11.119565 -2.7254304 3.6038449 49.892709 11.08694 13.993214
5.7151529 9.3437619 17.85509 5.4641212 -11.501407 -2.9513946 4.1202551 49.966637 11.187887 13.89124
5.7928615 11.523836 16.078628 5.954781 -12.13624 -3.6479227 4.0957847 49.82478 11.236984 13.931047
5.6366145 11.35929 14.562029 5.8501049 -11.614836 -3.7178687 3.6361083 49.791833 11.006793 13.981714
5.400482 11.135341 12.504864 5.5250011 -10.387605 -3.6011704 2.8322929 49.84837 10.916611 14.03206
5.6306067 14.617081 12.00229 5.0843613 -11.901231 -3.5946713 2.5497592 49.762242 11.033612 14.076177
5.6496381 13.930884 12.527231 5.4602952 -11.996037 -3.7910037 2.9880041 49.942748 10.891029 13.908555
5.7491194 15.537621 11.815971 5.6987816 -12.343997 -3.9020828 2.9992533 50.001245 11.017732 13.651003
5.8822575 15.332473 13.514564 5.7539156 -13.120536 -4.2016184 4.0823636 50.024463 10.683174 13.490053
5.9004414 16.675607 12.688568 5.4510337 -13.057612 -4.4044529 4.0658867 49.718625 10.530073 13.579294
5.8822436 17.818915 11.576515 5.20536 -13.102577 -3.6903119 3.3343492 49.725182 10.235 13.623812
5.9198631 17.784191 11.855425 5.4051634 -13.36147 -3.4480186 2.8926961 49.970879 10.290723 13.899078
6.0563912 18.987194 12.594474 5.0982054 -14.024394 -3.7450006 2.9019224 50.043188 10.489077 14.001096
5.9199326 18.182297 10.793037 6.0702689 -12.397294 -4.3011167 2.3298232 50.166771 10.020193 14.179405
6.1098236 18.758885 11.311768 7.2592908 -12.651175 -5.5446433 3.2699991 50.096632 9.8920853 14.179255
6.057545 17.686764 10.812244 8.1948428 -12.103304 -7.3511096 4.7757228 50.346112 9.9146259 14.21011
5.883733 14.994472 10.500829 9.1230133 -10.947978 -7.242834 4.5879819 50.676948 9.7362112 14.221819
5.8069312 14.201059 10.118952 9.4004391 -10.466011 -7.2530884 4.0800716 50.553819 9.6846589 13.968674
5.7375945 12.593074 11.145339 9.1815776 -10.226911 -5.7533575 3.5143309 50.578267 9.7066159 14.079792
5.7083577 12.04293 11.232739 9.3096788 -10.215849 -5.5956652 3.8189316 50.415963 9.7479403 14.225723
5.7748329 12.637318 10.745286 9.9660917 -10.251909 -5.7186114 3.4741449 50.440551 9.4304799 14.29028
5.7563569 13.612632 10.406434 9.1165793 -10.650474 -5.9744553 3.2244103 50.397118 9.1040767 14.259411
5.8434702 14.698344 10.507691 8.9401094 -10.826606 -5.8919676 2.9823519 50.549914 9.1847107 14.205456
5.8436512 14.807353 10.943627 8.3972796 -10.845671 -5.0332368 1.8886558 50.710018 8.9398774 13.985354
5.8755258 14.721121 10.818262 8.9824196 -10.13763 -5.2749013 1.1991439 50.912448 8.7967624 13.790997
5.7088832 13.402399 10.808647 8.3803012 -8.6778137 -5.135244 0.50162529 51.10606 8.6566422 13.735342
5.6255541 12.164987 11.206002 8.2758691 -8.025322 -5.3792409 1.1986695 51.611135 8.5875627 13.566069
5.5133857 11.606727 10.723956 8.0667388 -7.7006341 -5.2202906 1.9875435 51.388763 8.7848101 13.507427
5.4265893 10.157731 10.818492 8.4716483 -7.2474454 -5.5265731 2.3854803 51.641035 9.0938068 13.599211
5.3182965 8.9651318 10.943437 8.3757082 -6.2007545 -5.056881 1.1368514 51.610352 8.8929902 13.581376
5.3652496 8.7911989 10.665272 9.3294322 -6.021771 -5.8424869 1.5414913 51.493178 8.8854513 13.589163
5.3805842 9.6022799 10.412131 8.9362757 -6.4477204 -6.2779449 1.5157437 51.327589 9.1502737 13.533597
5.2813743 9.1701671 10.023078 8.6996694 -6.0616833 -6.4098214 1.8031144 51.511357 9.2882162 13.650399
5.3364358 9.231983 11.525441 7.7201223 -6.9372423 -6.0456921 2.1560811 51.415333 9.3789596 13.489693
5.2216315 9.0360698 10.74146 7.4879054 -6.7659877 -5.938263 2.4099896 51.579168 9.3391723 13.574691
5.2693755 8.8173745 11.502891 7.4460527 -6.5889143 -5.7866818 2.2888995 52.060607 9.3152636 13.482747
5.4527243 8.5751661 11.995218 9.1618189 -6.9426365 -5.9167953 2.7288445 52.217794 9.3216261 13.5881
5.5407737 9.0460762 12.020147 9.6339496 -7.3040599 -6.139166 2.6263873 52.032689 8.9970713 13.417335
5.4925322 8.3617555 12.50312 9.3030345 -6.6442559 -6.1599685 2.4847009 51.93956 9.095662 13.106108
5.4926197 8.7073708 11.787574 9.6739262 -6.5363865 -6.1921413 2.0929306 51.793926 9.2630432 13.163065
5.4150044 9.0159527 11.803322 8.5029979 -6.7351289 -5.7640713 1.6928394 51.827107 9.4306778 13.249457
5.548641 8.5050176 13.749623 8.5327765 -7.6118043 -5.0191659 2.2519682 52.060941 9.5239621 13.306295
5.5564204 9.1514243 14.595798 7.1265851 -8.5613345 -4.1757282 2.0741589 52.01808 9.6698309 13.145877
5.5699457 9.7851734 14.35299 6.8861324 -9.1237528 -4.9959942 2.8960143 52.052156 9.5620341 13.337446
5.5749693 10.703974 13.128121 7.2481879 -8.9798879 -5.7134968 2.3496775 51.721725 9.7689869 13.356096
5.638834 11.099617 12.820822 7.8760101 -9.506886 -6.1070228 2.6709612 51.794599 9.6156719 13.48407
5.6598728 10.885534 12.78006 8.368566 -9.4902335 -5.5729542 2.3342113 52.174765 9.8576644 13.478152
5.5904285 10.369004 11.992327 8.8915605 -8.76821 -6.5618387 3.193141 52.02322 9.81365 13.359337
5.3741317 9.2405221 11.282499 8.3582708 -8.3727501 -5.8355484 3.3370204 51.866988 9.6388128 13.149419
5.2958639 7.1886261 12.977706 7.8798428 -8.1460083 -4.3881982 3.1812473 51.731285 9.4481046 13.141767
5.402274 7.7470987 12.805009 8.6324567 -8.2179556 -5.2078319 3.1582169 51.804468 9.3848268 13.29982
5.6483697 9.1018115 13.787511 9.0147582 -9.5567762 -5.2509413 3.01344 51.996155 9.1895779 13.300818
5.601747 9.3576298 13.664124 8.3578152 -9.1305397 -5.6217469 3.1180397 52.111675 9.0877198 13.152291
5.5124655 8.9590865 13.684809 7.7433812 -8.7096272 -4.9754549 2.3270945 52.254841 8.8351679 13.21258
5.3988525 8.3910773 12.905567 7.8509638 -7.5245856 -5.0395065 2.3481322 52.263451 8.6620437 13.36041
5.3040294 7.1552401 13.671387 7.3061011 -6.4221018 -4.6709838 2.4084256 52.472518 8.5802722 13.163192
5.3191867 8.2855513 13.241158 6.7670382 -6.7383913 -5.0033962 2.180615 52.183195 8.4360708 13.155001
5.3566829 9.1699753 12.113433 7.410643 -6.9922004 -5.2635118 2.1340211 52.182193 8.6892458 12.963203
5.2008701 8.5170789 12.263922 6.2680487 -6.167442 -4.7136418 1.8542571 52.273008 8.793237 12.860908
4.9919839 7.5835928 11.100441 6.2358693 -5.5481586 -4.3678074 2.2821251 52.335558 8.6666578 12.845611
5.1501062 7.7815697 13.038317 5.7037072 -6.8790721 -3.6697847 2.040492 52.205555 8.4930645 12.655618
5.1693291 8.0359508 12.95638 5.7296317 -7.0564916 -3.8355504 1.9139954 51.959464 8.6423307 12.53081
5.2077361 8.8897921 12.530741 5.6999822 -7.3764196 -3.4364468 0.90215052 51.838638 8.8383661 12.569833
5.1502621 9.0122487 11.77156 5.741391 -7.5423335 -3.5938885 0.88296798 51.822123 8.8415423 12.937326
5.1896461 9.2854716 11.585603 6.0613521 -7.9119183 -3.6359858 0.5268641 51.860261 8.8721682 12.909944
5.2091113 9.6776461 11.157445 6.2997493 -8.1731907 -3.4404707 0.52470693 51.955093 9.1847066 12.772563
5.1487426 9.9171868 11.039362 5.5530018 -8.1346651 -2.7100655 -0.081164579 51.895699 8.999741 12.652846
5.1505237 9.8208447 11.636584 5.0704661 -8.0048156 -2.9229925 -0.38313937 51.846388 9.0258296 12.575848
5.0498117 9.2192048 11.698429 4.582964 -8.0200334 -2.3752653 -0.36708212 51.782671 9.3279563 12.544301
5.0573261 9.5294354 11.88401 4.1631027 -7.5144401 -2.4806001 -0.65999869 51.913647 9.3854399 12.401641
5.0811302 9.3959886 11.808889 4.6130067 -7.0405242 -2.5037582 -1.2769295 52.005268 9.6317929 12.370306
5.1166203 9.3288823 12.45974 4.3911809 -7.2243887 -2.5156447 -1.0041202 52.088074 9.6003874 12.346141
5.2045026 10.450174 12.394069 4.2426047 -7.9173751 -2.3028313 -1.1127183 52.287028 9.4892589 12.53898
4.9696787 9.062347 11.35845 4.2769086 -5.9385609 -2.12694 -1.6437193 52.757473 9.3837415 12.690198
4.9877386 9.1392669 11.48237 4.2558994 -5.5388281 -2.4000297 -1.4755205 52.764043 9.6175641 12.662539
4.8284868 7.8848934 11.225247 4.2041439 -5.3018102 -1.8375233 -1.5376081 53.041399 9.451146 12.688581
4.8237993 7.3389077 11.55467 4.3754617 -5.6106066 -1.4157198 -1.5132442 53.279168 9.5338443 12.633672
4.8314395 7.3896489 11.215416 4.7377428 -6.0145077 -1.7225945 -0.69655935 53.818846 9.5420479 12.368433
4.8765154 8.0784101 10.572769 5.1292237 -6.3322936 -1.8164643 -0.64830774 53.966255 9.5234973 12.344916
4.9186704 8.6712371 10.378472 5.1436092 -6.5208107 -2.2558782 -0.71144157 53.70529 9.6007242 12.232148
4.9251997 7.5655071 11.081228 5.610857 -6.3320091 -2.1481047 -1.5093486 53.793445 9.7713313 12.221771
4.8304168 7.0698238 10.038672 6.2244307 -5.0756276 -2.9001352 -1.4313228 53.859149 9.7696343 12.172882
4.7501946 7.6420634 8.8240346 6.0982512 -4.983994 -2.7043286 -1.3804654 53.836157 10.006061 12.283256
4.7494587 8.0630304 8.6152981 5.879029 -5.1608283 -2.6103501 -1.0780193 53.72011 10.254128 12.239037
4.7488472 8.0743919 8.6038151 5.8733427 -5.1682417 -2.6109895 -1.0859021 53.721404 10.254774 12.239811
Loop time of 13125.6 on 4 procs for 400001 steps with 43149 atoms
Performance: 131.651 ns/day, 0.182 hours/ns, 30.475 timesteps/s
99.2% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 2.1325 | 53.155 | 102.87 | 679.4 | 0.40
Bond | 1.1958 | 1.5762 | 2.4077 | 38.6 | 0.01
Neigh | 546.84 | 548 | 549.18 | 4.6 | 4.18
Comm | 186.71 | 228.91 | 309.92 | 321.6 | 1.74
Output | 0.13475 | 0.18939 | 0.30625 | 16.1 | 0.00
Modify | 12088 | 12129 | 12174 | 27.8 | 92.41
Other | | 164.7 | | | 1.25
Nlocal: 10787.2 ave 21162 max 24 min
Histogram: 2 0 0 0 0 0 0 0 0 2
Nghost: 6082.25 ave 11981 max 60 min
Histogram: 2 0 0 0 0 0 0 0 0 2
Neighs: 3 ave 12 max 0 min
Histogram: 3 0 0 0 0 0 0 0 0 1
Total # of neighbors = 12
Ave neighs/atom = 0.0002781061
Ave special neighs/atom = 0.0014368815
Neighbor list builds = 7486
Dangerous builds = 0
Total wall time: 3:38:45

View File

@ -1,15 +1,11 @@
This package contains a LAMMPS implementation of a background
Lattice-Boltzmann fluid, which can be used to model MD particles
influenced by hydrodynamic forces. Details are described in these two
papers:
influenced by hydrodynamic forces. Details of the package is
describe in :
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.
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.
C. Denniston, N. Afrasiabian, M.G. Cole-Andre, F.E. Mackay, S.T.T. Ollila, and T. Whitehead, LAMMPS lb/fluid fix version 2: Improved Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer
Physics Communications 275 (2022) 108318.
or https://doi.org/10.1016/j.cpc.2022.108318
See the doc page for the fix lb/fluid command to get started, and see
brief descriptions of other fixes below, each of which have their own
@ -21,19 +17,18 @@ examples/PACKAGES/latboltz.
IMPORTANT NOTE: This package can only be used if LAMMPS is compiled
with MPI (i.e. the serial makefile should not be used to compile the
code). Also, several of the test examples provided make use of the
rigid fix. Therefore, this should be included in the LAMMPS build by
typing "make yes-rigid" prior to the usual compilation (see the
"Including/excluding packages" section of the LAMMPS manual).
rigid fix and molecule packages. Therefore, these should be included
in the LAMMPS build (see the "Including/excluding packages" section of
the LAMMPS manual).
The creators of this package are as follows:
Frances Mackay
Santtu Ollila
Tyson Whitehead
Colin Denniston, cdennist@uwo.ca
University of Western Ontario
fmackay@uwo.ca
Dr. Colin Denniston
University of Western Ontario
cdennist@uwo.ca
--------------------------------------------------------------------------
@ -45,10 +40,5 @@ fix_lb_fluid.cpp: fix used to create the lattice-Boltzmann fluid on a
fix_momentum_lb.cpp: fix used to subtract off the total (atom plus fluid)
linear momentum from the system.
fix_pc.cpp: integration algorithm for individual atoms.
fix_rigid_pc_sphere.cpp: integration algorithm for rigid spherical
collections of atoms.
fix_viscous_lb.cpp: fix to add the fluid force to the atoms when using a
built-in LAMMPS integrator.

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* -*- c++ -*- -----------------------------------------------------------
LAMMPS 2003 (July 31) - Molecular Dynamics Simulator
Sandia National Laboratories, www.cs.sandia.gov/~sjplimp/lammps.html
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
@ -8,7 +8,7 @@
certain rights in this software. This software is distributed under
the GNU General Public License.
For more info, see the README file in the top-level LAMMPS directory.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------ */
#ifdef FIX_CLASS
@ -30,8 +30,6 @@ namespace LAMMPS_NS {
class FixLbFluid : public Fix {
friend class FixLbMomentum;
friend class FixLbRigidPCSphere;
friend class FixLbPC;
friend class FixLbViscous;
public:
@ -42,6 +40,7 @@ class FixLbFluid : public Fix {
void initial_integrate(int) override;
void setup(int) override;
void post_force(int) override;
void final_integrate() override;
void end_of_step() override;
void grow_arrays(int) override;
@ -49,9 +48,14 @@ class FixLbFluid : public Fix {
int pack_exchange(int, double *) override;
int unpack_exchange(int, double *) override;
double compute_scalar() override;
double compute_vector(int) override;
void dump(int);
private:
double viscosity, densityinit_real, a_0_real, T;
int setdx, seta0;
int setdx, seta0, setdof;
int numvel;
double dm_lb, dx_lb, dt_lb; // Lattice units for mass, distance, time.
@ -59,21 +63,36 @@ class FixLbFluid : public Fix {
int Nbx, Nby, Nbz; // Total # of x,y,z grid points.
int subNbx, subNby, subNbz; // # of x,y,z, grid points (including buffer)
// on local processor.
int me, nprocs; // MPI variables: processor ID, # of processors
MPI_Datatype oneslice; // MPI datatypes to pass arrays.
int fluid_local_n0[3]; // Size of local including both lower and upper end points
int fluid_global_o0[3]; // Offset of local in global from lower end point
int fluid_global_n0[3]; // Size of global including both lower and upper end points
int me, nprocs; // MPI variables: processor ID, # of processors
MPI_Datatype oneslice; // MPI datatypes to pass arrays.
MPI_Datatype passxu, passyu, passzu;
MPI_Datatype passxf, passyf, passzf;
MPI_Datatype passxrho, passyrho, passzrho;
MPI_Datatype passxtemp, passytemp, passztemp;
MPI_Datatype passxWtemp, passyWtemp, passzWtemp;
MPI_Datatype fluid_density_2_mpitype;
MPI_Datatype fluid_velocity_2_mpitype;
MPI_Datatype realType3_mpitype; // MPI type for a 3-vector
double kB, densityinit, a_0; // Boltzmann constant, initial density,
// and a_0 all in lattice units.
double *Gamma;
double *NodeArea;
int setGamma, setArea;
double **hydroF;
double *massp;
int groupbit_viscouslb, groupbit_pc, groupbit_rigid_pc_sphere;
int dump_interval, dump_time_index;
std::string dump_file_name_xdmf;
std::string dump_file_name_raw;
FILE *dump_file_handle_xdmf;
MPI_File dump_file_handle_raw;
MPI_Datatype dump_file_mpitype;
int groupbit_viscouslb;
double ***density_lb; // fluid density
double ****u_lb; // fluid velocity
@ -81,84 +100,109 @@ class FixLbFluid : public Fix {
double ****fnew; // used in the calculation of the new
// distributions.
double ****feq; // equilibrium distributions
double ****feqold; // equilibrium distributions from previous
// timestep
double ****feqn; // equilibrium distributions without noise.
double ****feqoldn; // equilibrium distributions from previous
// timestep without noise.
double ****Ff; // Force from the MD particles on the fluid.
double ****Fftempx;
double ****Fftempy;
double ****Fftempz;
double ****Ff, ***Wf; // Force, total weight, from the MD particles on the fluid.
double ****Fftempx, ***Wftempx;
double ****Fftempy, ***Wftempy;
double ****Fftempz, ***Wftempz;
double *Ng_lb; // Lattice Boltzmann variables.
double *w_lb;
double **mg_lb;
int **e;
double tau;
double expminusdtovertau;
double Dcoeff;
double tau; // Lattice Boltzmann variables.
double K_0;
double dtoverdtcollision;
int step;
double ****buf; // arrays used to output data.
double ****buf2;
double ****altogether;
double ****altogether2;
int n_stencil; // Number of points for spread/interpolate stencil
double bodyforcex, bodyforcey, bodyforcez; // Body Forces acting on the fluid (default=0)
double vwtp, vwbt; // Velocities of the z walls in the y
// direction. (must have fixed boundary
// conditions in z)
int pressure; // pressure boundary conditions on/off
double rhofactor; // factor for density/pressure jump at boundary
double rhoH, rhoL; // density target for high/low side of jump
double meanrho1, meanrhoLx; // current densities at boundary on high/low side of jump
int noisestress; // 1 to include noise in the system,
// 0 otherwise.
int lin_init; // 1 to initialize with linear interpolation
// between boundaries.
// 0 initialize to uniform density, 0.0 velocities.
double namp, noisefactor;
int seed;
class RanMars *random;
int force_diagnostic; // 1 to print out the force action on a group
// of particles, 0 otherwise.
int igroupforce; // the group for which the force is to be
// printed.
int typeLB;
int trilinear_stencil; // 1 to use the trilinear stencil, 0 to use the
// peskin stencil.
int readrestart; // 1 to read in data from a restart file.
MPI_File pFileRead;
int printrestart; // 1 to write data to a restart file.
MPI_File pFileWrite;
int printfluid;
double timeEqb, timeUpdate, timePCalc, timefluidForce, timeCorrectU;
double dof_lb;
int fixviscouslb;
void rescale();
void (FixLbFluid::*initializeLB)();
void initializeLB15();
void initializeLB19();
void initialize_feq();
void rescale(void);
void SetupBuffers(void);
void InitializeFirstRun(void);
void initializeLB(void);
void initialize_feq(void);
void (FixLbFluid::*equilibriumdist)(int, int, int, int, int, int);
void equilibriumdist15(int, int, int, int, int, int);
void equilibriumdist19(int, int, int, int, int, int);
void parametercalc_part(int, int, int, int, int, int);
void parametercalc_full();
void correctu_part(int, int, int, int, int, int);
void parametercalc_full(void);
void update_periodic(int, int, int, int, int, int);
void (FixLbFluid::*update_full)();
void update_full15();
void update_full19();
void streamout();
void read_restartfile();
void write_restartfile();
void peskin_interpolation(int);
void trilinear_interpolation(int);
void calc_fluidforce();
void correctu_full(void);
void calc_mass_momentum(double &totalmass, double totalmomentum[3]);
void calc_MPT(double &totalmass, double totalmomentum[3], double &Tave);
void (FixLbFluid::*update_full)(void);
void update_full15(void);
void update_full19(void);
void read_restartfile(void);
void write_restartfile(void);
void (FixLbFluid::*interpolate)(int, int);
void (FixLbFluid::*interpolationweight)(int);
void keys_interpolation(int, int);
void keys_interpolationweight(int);
void trilinear_interpolation(int, int);
void trilinear_interpolationweight(int);
void IBM3_interpolation(int, int);
void IBM3_interpolationweight(int);
void calc_fluidforceI(void);
void calc_fluidforceII(void);
void calc_fluidforceweight(void);
int adjust_dof_fix();
double dof_compute();
/* nanopit parameters */
int npits; // number of nanopits
int h_s; // slit height
int h_p; // pit height
int w_p; // pit width
int l_p; // pit length
int l_pp; // distance between consecutive pits
int l_e; // length of end segments
int sw; // side walls on/off
int openingsites; // Number of active fluid sites at x=0
class Site ***sublattice, ***wholelattice; // lattice geometry
/* nanopit routines */
void addslit(int &, int, int, int, int);
void addpit(int &, int, int, int, int, int);
void initializeGeometry(void);
void initializeGlobalGeometry(void);
};
} // namespace LAMMPS_NS
#endif

View File

@ -1,4 +1,3 @@
// clang-format off
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
@ -21,26 +20,27 @@
#include "fix_lb_momentum.h"
#include <cstring>
#include "atom.h"
#include "group.h"
#include "comm.h"
#include "domain.h"
#include "error.h"
#include "fix_lb_fluid.h"
#include "group.h"
#include "modify.h"
#include "latboltz_const.h"
using namespace LAMMPS_NS;
using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixLbMomentum::FixLbMomentum(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), fix_lb_fluid(nullptr)
{
if (narg < 4) error->all(FLERR,"Illegal fix lb/momentum command");
nevery = atoi(arg[3]);
if (nevery <= 0) error->all(FLERR,"Illegal fix lb/momentum command");
if (narg < 4) error->all(FLERR, "Illegal fix lb/momentum command");
nevery = utils::inumeric(FLERR, arg[3], false, lmp);
if (nevery <= 0) error->all(FLERR, "Illegal fix lb/momentum command");
linear = 1;
xflag = 1;
@ -49,34 +49,22 @@ FixLbMomentum::FixLbMomentum(LAMMPS *lmp, int narg, char **arg) :
int iarg = 4;
while (iarg < narg) {
if (strcmp(arg[iarg],"linear") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal fix lb/momentum command");
if (strcmp(arg[iarg], "linear") == 0) {
if (iarg + 4 > narg) error->all(FLERR, "Illegal fix lb/momentum command");
linear = 1;
xflag = atoi(arg[iarg+1]);
yflag = atoi(arg[iarg+2]);
zflag = atoi(arg[iarg+3]);
xflag = utils::inumeric(FLERR, arg[iarg + 1], false, lmp);
yflag = utils::inumeric(FLERR, arg[iarg + 2], false, lmp);
zflag = utils::inumeric(FLERR, arg[iarg + 3], false, lmp);
iarg += 4;
} else error->all(FLERR,"Illegal fix lb/momentum command");
} else
error->all(FLERR, "Illegal fix lb/momentum command");
}
if (linear == 0)
error->all(FLERR,"Illegal fix lb/momentum command");
if (linear == 0) error->all(FLERR, "Illegal fix lb/momentum command");
if (linear)
if (xflag < 0 || xflag > 1 || yflag < 0 || yflag > 1 ||
zflag < 0 || zflag > 1) error->all(FLERR,"Illegal fix lb/momentum command");
// cannot have 0 atoms in group
if (group->count(igroup) == 0.0)
error->all(FLERR,"Fix lb/momentum group has no atoms");
for (int ifix=0; ifix<modify->nfix; ifix++)
if (strcmp(modify->fix[ifix]->style,"lb/fluid")==0)
fix_lb_fluid = (FixLbFluid *)modify->fix[ifix];
if (xflag < 0 || xflag > 1 || yflag < 0 || yflag > 1 || zflag < 0 || zflag > 1)
error->all(FLERR, "Illegal fix lb/momentum command");
}
/* ---------------------------------------------------------------------- */
@ -92,208 +80,108 @@ int FixLbMomentum::setmask()
void FixLbMomentum::init()
{
masstotal = group->mass(igroup);
// warn if 0 atoms in group
if ((count = group->count(igroup)) == 0)
error->warning(FLERR, "Fix lb/momentum group has no atoms: Only fluid momentum affected");
auto ifix = modify->get_fix_by_style("lb/fluid");
if (ifix.size() > 0) fix_lb_fluid = (FixLbFluid *) ifix[0];
count ? masstotal = group->mass(igroup) : 0;
}
/* ---------------------------------------------------------------------- */
void FixLbMomentum::end_of_step()
{
double masslb,masslbloc;
double momentumlbloc[3],momentumlb[3];
double vcmtotal[3];
const int numvel = fix_lb_fluid->numvel;
double etacov[19]; // = double etacov[numvel]; i.e. 15 or 19
double rho;
// particle com velcity
double vcmp[3] = {0, 0, 0};
if (count) group->vcm(igroup, masstotal, vcmp);
if (linear) {
double vcm[3];
group->vcm(igroup,masstotal,vcm);
// total fluid mass and momentum.
double masslb, momentumlb[3];
fix_lb_fluid->calc_mass_momentum(masslb, momentumlb);
// adjust velocities by vcm to zero linear momentum
// only adjust a component if flag is set
//Calculate the center of mass velocity of the particles + fluid.
double vcmall[3];
vcmall[0] = (masstotal * vcmp[0] + momentumlb[0]) / (masslb + masstotal);
vcmall[1] = (masstotal * vcmp[1] + momentumlb[1]) / (masslb + masstotal);
vcmall[2] = (masstotal * vcmp[2] + momentumlb[2]) / (masslb + masstotal);
// adjust velocities to zero net linear momentum
// only adjust a component if flag is set
//Subtract vcmall from the particles.
if (count) {
double **v = atom->v;
int *mask = atom->mask;
int nlocal = atom->nlocal;
int typeLB = fix_lb_fluid->typeLB;
int subNbx = fix_lb_fluid->subNbx;
int subNby = fix_lb_fluid->subNby;
int subNbz = fix_lb_fluid->subNbz;
double ***density_lb = fix_lb_fluid->density_lb;
double ****f_lb = fix_lb_fluid->f_lb;
double ****u_lb = fix_lb_fluid->u_lb;
double dm_lb = fix_lb_fluid->dm_lb;
double dx_lb = fix_lb_fluid->dx_lb;
double dt_lb = fix_lb_fluid->dt_lb;
double *Ng_lb = fix_lb_fluid->Ng_lb;
double *w_lb = fix_lb_fluid->w_lb;
double **mg_lb = fix_lb_fluid->mg_lb;
double ucmx,ucmy,ucmz;
//Calculate the total fluid mass and momentum.
masslbloc = 0.0;
momentumlbloc[0] = momentumlbloc[1] = momentumlbloc[2] = 0.0;
for (int i = 1; i<subNbx-1; i++)
for (int j = 1; j<subNby-1; j++)
for (int k = 1; k<subNbz-1; k++) {
masslbloc += density_lb[i][j][k];
momentumlbloc[0] += density_lb[i][j][k]*u_lb[i][j][k][0];
momentumlbloc[1] += density_lb[i][j][k]*u_lb[i][j][k][1];
momentumlbloc[2] += density_lb[i][j][k]*u_lb[i][j][k][2];
}
MPI_Allreduce(&masslbloc,&masslb,1,MPI_DOUBLE,MPI_SUM,world);
MPI_Allreduce(&momentumlbloc[0],&momentumlb[0],3,MPI_DOUBLE,MPI_SUM,world);
momentumlb[0] *= dm_lb*dx_lb/dt_lb;
momentumlb[1] *= dm_lb*dx_lb/dt_lb;
momentumlb[2] *= dm_lb*dx_lb/dt_lb;
masslb *= dm_lb;
//Calculate the center of mass velocity of the entire system.
vcmtotal[0] = (masstotal*vcm[0] + momentumlb[0])/(masslb + masstotal);
vcmtotal[1] = (masstotal*vcm[1] + momentumlb[1])/(masslb + masstotal);
vcmtotal[2] = (masstotal*vcm[2] + momentumlb[2])/(masslb + masstotal);
//Subtract vcm from the particles.
for (int i = 0; i < nlocal; i++)
if (mask[i] & groupbit) {
if (xflag) v[i][0] -= vcmtotal[0];
if (yflag) v[i][1] -= vcmtotal[1];
if (zflag) v[i][2] -= vcmtotal[2];
if (xflag) v[i][0] -= vcmall[0];
if (yflag) v[i][1] -= vcmall[1];
if (zflag) v[i][2] -= vcmall[2];
}
vcmtotal[0] *= dt_lb/dx_lb;
vcmtotal[1] *= dt_lb/dx_lb;
vcmtotal[2] *= dt_lb/dx_lb;
ucmx = ucmy = ucmz = 0.0;
double density_old;
double u_old[3];
int **e = fix_lb_fluid->e;
//Subtract vcm from the fluid.
for (int i=0; i<subNbx; i++)
for (int j=0; j<subNby; j++)
for (int k=0; k<subNbz; k++) {
rho = density_lb[i][j][k];
if (xflag) ucmx = vcmtotal[0];
if (yflag) ucmy = vcmtotal[1];
if (zflag) ucmz = vcmtotal[2];
if (numvel==15) {
etacov[0]=0.0;
etacov[1]=rho*ucmx;
etacov[2]=rho*ucmy;
etacov[3]=rho*ucmz;
etacov[4]=rho*(2.*u_lb[i][j][k][0]*ucmx-ucmx*ucmx);
etacov[5]=rho*(2.*u_lb[i][j][k][1]*ucmy-ucmy*ucmy);
etacov[6]=rho*(2.*u_lb[i][j][k][2]*ucmz-ucmz*ucmz);
etacov[7]=rho*(u_lb[i][j][k][0]*ucmy+u_lb[i][j][k][1]*ucmx-ucmx*ucmy);
etacov[8]=rho*(u_lb[i][j][k][1]*ucmz+u_lb[i][j][k][2]*ucmy-ucmy*ucmz);
etacov[9]=rho*(u_lb[i][j][k][0]*ucmz+u_lb[i][j][k][2]*ucmx-ucmx*ucmz);
etacov[10]=0.0;
etacov[11]=0.0;
etacov[12]=0.0;
etacov[13]=rho*(u_lb[i][j][k][0]*u_lb[i][j][k][1]*ucmz+u_lb[i][j][k][0]*ucmy*u_lb[i][j][k][2]-
u_lb[i][j][k][0]*ucmy*ucmz+ucmx*u_lb[i][j][k][1]*u_lb[i][j][k][2]-
ucmx*u_lb[i][j][k][1]*ucmz-ucmx*ucmy*u_lb[i][j][k][2]+
ucmx*ucmy*ucmz);
etacov[14]=0.0;
} else {
etacov[0] = 0.0;
etacov[1] = rho*ucmx;
etacov[2] = rho*ucmy;
etacov[3] = rho*ucmz;
etacov[4]=rho*(2.*u_lb[i][j][k][0]*ucmx-ucmx*ucmx);
etacov[5]=rho*(2.*u_lb[i][j][k][1]*ucmy-ucmy*ucmy);
etacov[6]=rho*(2.*u_lb[i][j][k][2]*ucmz-ucmz*ucmz);
etacov[7]=rho*(u_lb[i][j][k][0]*ucmy+u_lb[i][j][k][1]*ucmx-ucmx*ucmy);
etacov[8]=rho*(u_lb[i][j][k][0]*ucmz+u_lb[i][j][k][2]*ucmx-ucmx*ucmz);
etacov[9]=rho*(u_lb[i][j][k][1]*ucmz+u_lb[i][j][k][2]*ucmy-ucmy*ucmz);
etacov[10] = 0.0;
etacov[11] = 0.0;
etacov[12] = 0.0;
etacov[13] = 0.0;
etacov[14] = 0.0;
etacov[15] = 0.0;
etacov[16] = 0.0;
etacov[17] = 0.0;
etacov[18] = 0.0;
}
for (int l=0; l<numvel; l++)
for (int ii=0; ii<numvel; ii++) {
f_lb[i][j][k][l] -= w_lb[l]*mg_lb[ii][l]*etacov[ii]*Ng_lb[ii];
}
if (typeLB == 2) {
double ****feqold = fix_lb_fluid->feqold;
double ****feqoldn = fix_lb_fluid->feqoldn;
density_old = 0.0;
u_old[0] = u_old[1] = u_old[2] = 0.0;
for (int l=0; l<numvel; l++) {
density_old += feqold[i][j][k][l];
u_old[0] += feqold[i][j][k][l]*e[l][0];
u_old[1] += feqold[i][j][k][l]*e[l][1];
u_old[2] += feqold[i][j][k][l]*e[l][2];
}
u_old[0] = u_old[0]/density_old;
u_old[1] = u_old[1]/density_old;
u_old[2] = u_old[2]/density_old;
if (numvel==15) {
etacov[0]=0.0;
etacov[1]=density_old*ucmx;
etacov[2]=density_old*ucmy;
etacov[3]=density_old*ucmz;
etacov[4]=density_old*(2.*u_old[0]*ucmx-ucmx*ucmx);
etacov[5]=density_old*(2.*u_old[1]*ucmy-ucmy*ucmy);
etacov[6]=density_old*(2.*u_old[2]*ucmz-ucmz*ucmz);
etacov[7]=density_old*(u_old[0]*ucmy+u_old[1]*ucmx-ucmx*ucmy);
etacov[8]=density_old*(u_old[1]*ucmz+u_old[2]*ucmy-ucmy*ucmz);
etacov[9]=density_old*(u_old[0]*ucmz+u_old[2]*ucmx-ucmx*ucmz);
etacov[10]=0.0;
etacov[11]=0.0;
etacov[12]=0.0;
etacov[13]=density_old*(u_old[0]*u_old[1]*ucmz+u_old[0]*ucmy*u_old[2]-
u_old[0]*ucmy*ucmz+ucmx*u_old[1]*u_old[2]-
ucmx*u_old[1]*ucmz-ucmx*ucmy*u_old[2]+
ucmx*ucmy*ucmz);
etacov[14]=0.0;
} else {
etacov[0] = 0.0;
etacov[1] = density_old*ucmx;
etacov[2] = density_old*ucmy;
etacov[3] = density_old*ucmz;
etacov[4] = density_old*(2.*u_lb[i][j][k][0]*ucmx-ucmx*ucmx);
etacov[5] = density_old*(2.*u_lb[i][j][k][1]*ucmy-ucmy*ucmy);
etacov[6] = density_old*(2.*u_lb[i][j][k][2]*ucmz-ucmz*ucmz);
etacov[7] = density_old*(u_lb[i][j][k][0]*ucmy+u_lb[i][j][k][1]*ucmx-ucmx*ucmy);
etacov[8] = density_old*(u_lb[i][j][k][0]*ucmz+u_lb[i][j][k][2]*ucmx-ucmx*ucmz);
etacov[9] = density_old*(u_lb[i][j][k][1]*ucmz+u_lb[i][j][k][2]*ucmy-ucmy*ucmz);
etacov[10] = 0.0;
etacov[11] = 0.0;
etacov[12] = 0.0;
etacov[13] = 0.0;
etacov[14] = 0.0;
etacov[15] = 0.0;
etacov[16] = 0.0;
etacov[17] = 0.0;
etacov[18] = 0.0;
}
for (int l=0; l<numvel; l++)
for (int ii=0; ii<numvel; ii++) {
feqold[i][j][k][l] -= w_lb[l]*mg_lb[ii][l]*etacov[ii]*Ng_lb[ii];
feqoldn[i][j][k][l] -= w_lb[l]*mg_lb[ii][l]*etacov[ii]*Ng_lb[ii];
}
}
}
}
fix_lb_fluid->parametercalc_full();
//Subtract vcmall from the fluid.
// convert vcmall to lattice units used in lb/fluid
double dx_lb = fix_lb_fluid->dx_lb;
double dt_lb = fix_lb_fluid->dt_lb;
vcmall[0] *= dt_lb / dx_lb;
vcmall[1] *= dt_lb / dx_lb;
vcmall[2] *= dt_lb / dx_lb;
double ucmx, ucmy, ucmz;
ucmx = xflag ? vcmall[0] : 0.0;
ucmy = yflag ? vcmall[1] : 0.0;
ucmz = zflag ? vcmall[2] : 0.0;
int numvel = fix_lb_fluid->numvel;
double etacov[14]; // This is for changes and only moments up to 13 are affected
double rho;
int subNbx = fix_lb_fluid->subNbx;
int subNby = fix_lb_fluid->subNby;
int subNbz = fix_lb_fluid->subNbz;
double ***density_lb = fix_lb_fluid->density_lb;
double ****f_lb = fix_lb_fluid->f_lb;
double ****u_lb = fix_lb_fluid->u_lb;
etacov[0] = etacov[10] = etacov[11] = etacov[12] = etacov[13] = 0.0;
for (int i = 0; i < subNbx; i++)
for (int j = 0; j < subNby; j++)
for (int k = 0; k < subNbz; k++) {
rho = density_lb[i][j][k];
etacov[1] = rho * ucmx;
etacov[2] = rho * ucmy;
etacov[3] = rho * ucmz;
etacov[4] = rho * (2.0 * u_lb[i][j][k][0] * ucmx - ucmx * ucmx);
etacov[5] = rho * (2.0 * u_lb[i][j][k][1] * ucmy - ucmy * ucmy);
etacov[6] = rho * (2.0 * u_lb[i][j][k][2] * ucmz - ucmz * ucmz);
etacov[7] = rho * (u_lb[i][j][k][0] * ucmy + u_lb[i][j][k][1] * ucmx - ucmx * ucmy);
etacov[8] = rho * (u_lb[i][j][k][1] * ucmz + u_lb[i][j][k][2] * ucmy - ucmy * ucmz);
etacov[9] = rho * (u_lb[i][j][k][0] * ucmz + u_lb[i][j][k][2] * ucmx - ucmx * ucmz);
if (numvel == 15) {
etacov[13] = rho *
(u_lb[i][j][k][0] * u_lb[i][j][k][1] * ucmz +
u_lb[i][j][k][0] * ucmy * u_lb[i][j][k][2] - u_lb[i][j][k][0] * ucmy * ucmz +
ucmx * u_lb[i][j][k][1] * u_lb[i][j][k][2] - ucmx * u_lb[i][j][k][1] * ucmz -
ucmx * ucmy * u_lb[i][j][k][2] + ucmx * ucmy * ucmz);
for (int l = 0; l < 15; l++)
for (int ii = 1; ii < 14; ii++)
f_lb[i][j][k][l] -= w_lb15[l] * mg_lb15[ii][l] * etacov[ii] * Ng_lb15[ii];
} else // 19-velocity model
for (int l = 0; l < 19; l++)
for (int ii = 1; ii < 14; ii++)
f_lb[i][j][k][l] -= w_lb19[l] * mg_lb19[ii][l] * etacov[ii] * Ng_lb19[ii];
if (xflag) u_lb[i][j][k][0] -= vcmall[0];
if (yflag) u_lb[i][j][k][1] -= vcmall[1];
if (zflag) u_lb[i][j][k][2] -= vcmall[2];
}
}

View File

@ -35,6 +35,7 @@ class FixLbMomentum : public Fix {
int linear;
int xflag, yflag, zflag;
double masstotal;
int count;
class FixLbFluid *fix_lb_fluid;
};

View File

@ -1,469 +0,0 @@
// clang-format off
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing authors: Frances Mackay, Santtu Ollila, Colin Denniston (UWO)
------------------------------------------------------------------------- */
#include "fix_lb_pc.h"
#include <cmath>
#include <cstring>
#include "atom.h"
#include "force.h"
#include "update.h"
#include "error.h"
#include "memory.h"
#include "domain.h"
#include "fix_lb_fluid.h"
#include "modify.h"
#include "group.h"
using namespace LAMMPS_NS;
using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixLbPC::FixLbPC(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
{
if (narg < 3)
error->all(FLERR,"Illegal fix lb/pc command");
time_integrate = 1;
// perform initial allocation of atom-based array
// register with Atom class
force_old = nullptr;
up = nullptr;
up_old = nullptr;
grow_arrays(atom->nmax);
atom->add_callback(Atom::GROW);
Gamma_MD = new double[atom->ntypes+1];
int groupbit_lb_fluid = 0;
for (int ifix=0; ifix<modify->nfix; ifix++)
if (strcmp(modify->fix[ifix]->style,"lb/fluid")==0) {
fix_lb_fluid = (FixLbFluid *)modify->fix[ifix];
groupbit_lb_fluid = group->bitmask[modify->fix[ifix]->igroup];
}
if (groupbit_lb_fluid == 0)
error->all(FLERR,"the lb/fluid fix must also be used if using the lb/pc fix");
int *mask = atom->mask;
int nlocal = atom->nlocal;
for (int j=0; j<nlocal; j++) {
if ((mask[j] & groupbit) && !(mask[j] & groupbit_lb_fluid))
error->one(FLERR,"can only use the lb/pc fix for an atom if also using the lb/fluid fix for that atom");
}
}
/* ---------------------------------------------------------------------- */
FixLbPC::~FixLbPC() {
atom->delete_callback(id,Atom::GROW);
memory->destroy(force_old);
memory->destroy(up);
memory->destroy(up_old);
delete [] Gamma_MD;
}
/* ---------------------------------------------------------------------- */
int FixLbPC::setmask()
{
int mask = 0;
mask |= INITIAL_INTEGRATE;
mask |= FINAL_INTEGRATE;
return mask;
}
/* ---------------------------------------------------------------------- */
void FixLbPC::init()
{
double *Gamma = fix_lb_fluid->Gamma;
double dm_lb = fix_lb_fluid->dm_lb;
double dt_lb = fix_lb_fluid->dt_lb;
MPI_Comm_rank(world,&me);
dtv = update->dt;
dtf = update->dt * force->ftm2v;
for (int i=0; i<=atom->ntypes; i++)
Gamma_MD[i] = Gamma[i]*dm_lb/dt_lb;
}
/* ---------------------------------------------------------------------- */
void FixLbPC::initial_integrate(int /*vflag*/) {
double dtfm;
double **x = atom->x;
double dx[3];
double **v = atom->v;
double **f = atom->f;
double *mass = atom->mass;
double *rmass = atom->rmass;
int *type = atom->type;
int *mask = atom->mask;
int nlocal = atom->nlocal;
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
compute_up();
for (int i=0; i<nlocal; i++) {
up_old[i][0] = up[i][0];
up_old[i][1] = up[i][1];
up_old[i][2] = up[i][2];
force_old[i][0] = f[i][0];
force_old[i][1] = f[i][1];
force_old[i][2] = f[i][2];
}
if (rmass) {
for (int i = 0; i < nlocal; i++) {
if (mask[i] & groupbit) {
dtfm = dtf/rmass[i];
expminusdttimesgamma = exp(-dtv*Gamma_MD[type[i]]/rmass[i]);
dx[0] = dtv*v[i][0] + 0.5*(f[i][0]*force->ftm2v - Gamma_MD[type[i]]*(v[i][0]-up[i][0]))*dtv*dtv/rmass[i];
dx[1] = dtv*v[i][1] + 0.5*(f[i][1]*force->ftm2v - Gamma_MD[type[i]]*(v[i][1]-up[i][1]))*dtv*dtv/rmass[i];
dx[2] = dtv*v[i][2] + 0.5*(f[i][2]*force->ftm2v - Gamma_MD[type[i]]*(v[i][2]-up[i][2]))*dtv*dtv/rmass[i];
x[i][0] += dx[0];
x[i][1] += dx[1];
x[i][2] += dx[2];
// Approximation for v
if (Gamma_MD[type[i]] == 0.0) {
v[i][0] += f[i][0]*dtfm;
v[i][1] += f[i][1]*dtfm;
v[i][2] += f[i][2]*dtfm;
} else {
v[i][0] = (v[i][0]-up[i][0]-f[i][0]*force->ftm2v/Gamma_MD[type[i]])*expminusdttimesgamma +
f[i][0]*force->ftm2v/Gamma_MD[type[i]] + up[i][0];
v[i][1] = (v[i][1]-up[i][1]-f[i][1]*force->ftm2v/Gamma_MD[type[i]])*expminusdttimesgamma +
f[i][1]*force->ftm2v/Gamma_MD[type[i]] + up[i][1];
v[i][2] = (v[i][2]-up[i][2]-f[i][2]*force->ftm2v/Gamma_MD[type[i]])*expminusdttimesgamma +
f[i][2]*force->ftm2v/Gamma_MD[type[i]] + up[i][2];
}
}
}
} else {
// this does NOT take varying masses into account
for (int i = 0; i < nlocal; i++) {
if (mask[i] & groupbit) {
dtfm = dtf/mass[type[i]];
expminusdttimesgamma = exp(-dtv*Gamma_MD[type[i]]/mass[type[i]]);
dx[0] = dtv*v[i][0] + 0.5*(f[i][0]*force->ftm2v - Gamma_MD[type[i]]*(v[i][0]-up[i][0]))*dtv*dtv/mass[type[i]];
dx[1] = dtv*v[i][1] + 0.5*(f[i][1]*force->ftm2v - Gamma_MD[type[i]]*(v[i][1]-up[i][1]))*dtv*dtv/mass[type[i]];
dx[2] = dtv*v[i][2] + 0.5*(f[i][2]*force->ftm2v - Gamma_MD[type[i]]*(v[i][2]-up[i][2]))*dtv*dtv/mass[type[i]];
x[i][0] += dx[0];
x[i][1] += dx[1];
x[i][2] += dx[2];
// Approximation for v
if (Gamma_MD[type[i]] == 0.0) {
v[i][0] += f[i][0]*dtfm;
v[i][1] += f[i][1]*dtfm;
v[i][2] += f[i][2]*dtfm;
} else {
v[i][0] = (v[i][0]-up[i][0]-f[i][0]*force->ftm2v/Gamma_MD[type[i]])*expminusdttimesgamma +
f[i][0]*force->ftm2v/Gamma_MD[type[i]] + up[i][0];
v[i][1] = (v[i][1]-up[i][1]-f[i][1]*force->ftm2v/Gamma_MD[type[i]])*expminusdttimesgamma +
f[i][1]*force->ftm2v/Gamma_MD[type[i]] + up[i][1];
v[i][2] = (v[i][2]-up[i][2]-f[i][2]*force->ftm2v/Gamma_MD[type[i]])*expminusdttimesgamma +
f[i][2]*force->ftm2v/Gamma_MD[type[i]] + up[i][2];
}
}
}
}
}
/* ---------------------------------------------------------------------- */
void FixLbPC::final_integrate()
{
double dtfm;
double **v = atom->v;
double **f = atom->f;
double *mass = atom->mass;
double *rmass = atom->rmass;
int *type = atom->type;
int *mask = atom->mask;
int nlocal = atom->nlocal;
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
compute_up();
if (rmass) {
for (int i = 0; i < nlocal; i++) {
if (mask[i] & groupbit) {
dtfm = dtf/rmass[i];
expminusdttimesgamma = exp(-dtv*Gamma_MD[type[i]]/rmass[i]);
DMDcoeff = (dtv - rmass[i]*(1.0-expminusdttimesgamma)/Gamma_MD[type[i]]);
if (Gamma_MD[type[i]] == 0.0) {
v[i][0] += 0.5*(f[i][0] - force_old[i][0])*dtfm;
v[i][1] += 0.5*(f[i][1] - force_old[i][1])*dtfm;
v[i][2] += 0.5*(f[i][2] - force_old[i][2])*dtfm;
} else {
v[i][0] += DMDcoeff*((f[i][0] - force_old[i][0])*force->ftm2v/Gamma_MD[type[i]] + up[i][0] - up_old[i][0])/dtv;
v[i][1] += DMDcoeff*((f[i][1] - force_old[i][1])*force->ftm2v/Gamma_MD[type[i]] + up[i][1] - up_old[i][1])/dtv;
v[i][2] += DMDcoeff*((f[i][2] - force_old[i][2])*force->ftm2v/Gamma_MD[type[i]] + up[i][2] - up_old[i][2])/dtv;
}
}
}
} else {
// this does NOT take varying masses into account
for (int i = 0; i < nlocal; i++) {
if (mask[i] & groupbit) {
dtfm = dtf/mass[type[i]];
expminusdttimesgamma = exp(-dtv*Gamma_MD[type[i]]/mass[type[i]]);
DMDcoeff = (dtv - mass[type[i]]*(1.0-expminusdttimesgamma)/Gamma_MD[type[i]]);
if (Gamma_MD[type[i]] == 0.0) {
v[i][0] += 0.5*(f[i][0] - force_old[i][0])*dtfm;
v[i][1] += 0.5*(f[i][1] - force_old[i][1])*dtfm;
v[i][2] += 0.5*(f[i][2] - force_old[i][2])*dtfm;
} else {
v[i][0] += DMDcoeff*((f[i][0] - force_old[i][0])*force->ftm2v/Gamma_MD[type[i]] + up[i][0] - up_old[i][0])/dtv;
v[i][1] += DMDcoeff*((f[i][1] - force_old[i][1])*force->ftm2v/Gamma_MD[type[i]] + up[i][1] - up_old[i][1])/dtv;
v[i][2] += DMDcoeff*((f[i][2] - force_old[i][2])*force->ftm2v/Gamma_MD[type[i]] + up[i][2] - up_old[i][2])/dtv;
}
}
}
}
}
/* ----------------------------------------------------------------------
allocate atom-based array
------------------------------------------------------------------------- */
void FixLbPC::grow_arrays(int nmax)
{
memory->grow(force_old,nmax,3,"FixLbPC:force_old");
memory->grow(up_old,nmax,3,"FixLbPC:up_old");
memory->grow(up,nmax,3,"FixLbPC:up");
}
/* ----------------------------------------------------------------------
copy values within local atom-based array
------------------------------------------------------------------------- */
void FixLbPC::copy_arrays(int i, int j, int /*delflag*/)
{
force_old[j][0] = force_old[i][0];
force_old[j][1] = force_old[i][1];
force_old[j][2] = force_old[i][2];
up_old[j][0] = up_old[i][0];
up_old[j][1] = up_old[i][1];
up_old[j][2] = up_old[i][2];
up[j][0] = up[i][0];
up[j][1] = up[i][1];
up[j][2] = up[i][2];
}
/* ----------------------------------------------------------------------
pack values in local atom-based array for exchange with another proc
------------------------------------------------------------------------- */
int FixLbPC::pack_exchange(int i, double *buf)
{
buf[0] = force_old[i][0];
buf[1] = force_old[i][1];
buf[2] = force_old[i][2];
buf[3] = up_old[i][0];
buf[4] = up_old[i][1];
buf[5] = up_old[i][2];
buf[6] = up[i][0];
buf[7] = up[i][1];
buf[8] = up[i][2];
return 9;
}
/* ----------------------------------------------------------------------
unpack values in local atom-based array from exchange with another proc
------------------------------------------------------------------------- */
int FixLbPC::unpack_exchange(int nlocal, double *buf)
{
force_old[nlocal][0] = buf[0];
force_old[nlocal][1] = buf[1];
force_old[nlocal][2] = buf[2];
up_old[nlocal][0] = buf[3];
up_old[nlocal][1] = buf[4];
up_old[nlocal][2] = buf[5];
up[nlocal][0] = buf[6];
up[nlocal][1] = buf[7];
up[nlocal][2] = buf[8];
return 9;
}
/* ---------------------------------------------------------------------- */
void FixLbPC::compute_up()
{
int *mask = atom->mask;
int nlocal = atom->nlocal;
double **x = atom->x;
int i,k;
int ix,iy,iz;
int ixp,iyp,izp;
double dx1,dy1,dz1;
int isten,ii,jj,kk;
double r,rsq,weightx,weighty,weightz;
double ****u_lb = fix_lb_fluid->u_lb;
int subNbx = fix_lb_fluid->subNbx;
int subNby = fix_lb_fluid->subNby;
int subNbz = fix_lb_fluid->subNbz;
double dx_lb = fix_lb_fluid->dx_lb;
double dt_lb = fix_lb_fluid->dt_lb;
double FfP[64];
int trilinear_stencil = fix_lb_fluid->trilinear_stencil;
for (i=0; i<nlocal; i++) {
if (mask[i] & groupbit) {
//Calculate nearest leftmost grid point.
//Since array indices from 1 to subNb-2 correspond to the
// local subprocessor domain (not indices from 0), use the
// ceiling value.
ix = (int)ceil((x[i][0]-domain->sublo[0])/dx_lb);
iy = (int)ceil((x[i][1]-domain->sublo[1])/dx_lb);
iz = (int)ceil((x[i][2]-domain->sublo[2])/dx_lb);
//Calculate distances to the nearest points.
dx1 = x[i][0] - (domain->sublo[0] + (ix-1)*dx_lb);
dy1 = x[i][1] - (domain->sublo[1] + (iy-1)*dx_lb);
dz1 = x[i][2] - (domain->sublo[2] + (iz-1)*dx_lb);
// Need to convert these to lattice units:
dx1 = dx1/dx_lb;
dy1 = dy1/dx_lb;
dz1 = dz1/dx_lb;
up[i][0]=0.0; up[i][1]=0.0; up[i][2]=0.0;
if (trilinear_stencil==0) {
isten=0;
for (ii=-1; ii<3; ii++) {
rsq=(-dx1+ii)*(-dx1+ii);
if (rsq>=4) {
weightx=0.0;
} else {
r=sqrt(rsq);
if (rsq>1) {
weightx=(5.0-2.0*r-sqrt(-7.0+12.0*r-4.0*rsq))/8.;
} else {
weightx=(3.0-2.0*r+sqrt(1.0+4.0*r-4.0*rsq))/8.;
}
}
for (jj=-1; jj<3; jj++) {
rsq=(-dy1+jj)*(-dy1+jj);
if (rsq>=4) {
weighty=0.0;
} else {
r=sqrt(rsq);
if (rsq>1) {
weighty=(5.0-2.0*r-sqrt(-7.0+12.0*r-4.0*rsq))/8.;
} else {
weighty=(3.0-2.0*r+sqrt(1.0+4.0*r-4.0*rsq))/8.;
}
}
for (kk=-1; kk<3; kk++) {
rsq=(-dz1+kk)*(-dz1+kk);
if (rsq>=4) {
weightz=0.0;
} else {
r=sqrt(rsq);
if (rsq>1) {
weightz=(5.0-2.0*r-sqrt(-7.0+12.0*r-4.0*rsq))/8.;
} else {
weightz=(3.0-2.0*r+sqrt(1.0+4.0*r-4.0*rsq))/8.;
}
}
ixp = ix+ii;
iyp = iy+jj;
izp = iz+kk;
if (ixp==-1) ixp=subNbx+2;
if (iyp==-1) iyp=subNby+2;
if (izp==-1) izp=subNbz+2;
FfP[isten] = weightx*weighty*weightz;
// interpolated velocity based on delta function.
for (k=0; k<3; k++) {
up[i][k] += u_lb[ixp][iyp][izp][k]*FfP[isten];
}
}
}
}
} else {
FfP[0] = (1.-dx1)*(1.-dy1)*(1.-dz1);
FfP[1] = (1.-dx1)*(1.-dy1)*dz1;
FfP[2] = (1.-dx1)*dy1*(1.-dz1);
FfP[3] = (1.-dx1)*dy1*dz1;
FfP[4] = dx1*(1.-dy1)*(1.-dz1);
FfP[5] = dx1*(1.-dy1)*dz1;
FfP[6] = dx1*dy1*(1.-dz1);
FfP[7] = dx1*dy1*dz1;
ixp = (ix+1);
iyp = (iy+1);
izp = (iz+1);
for (k=0; k<3; k++) { // tri-linearly interpolated velocity at node
up[i][k] = u_lb[ix][iy][iz][k]*FfP[0]
+ u_lb[ix][iy][izp][k]*FfP[1]
+ u_lb[ix][iyp][iz][k]*FfP[2]
+ u_lb[ix][iyp][izp][k]*FfP[3]
+ u_lb[ixp][iy][iz][k]*FfP[4]
+ u_lb[ixp][iy][izp][k]*FfP[5]
+ u_lb[ixp][iyp][iz][k]*FfP[6]
+ u_lb[ixp][iyp][izp][k]*FfP[7];
}
}
for (k=0; k<3; k++)
up[i][k] = up[i][k]*dx_lb/dt_lb;
}
}
}

View File

@ -1,60 +0,0 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef FIX_CLASS
// clang-format off
FixStyle(lb/pc,FixLbPC);
// clang-format on
#else
#ifndef LMP_FIX_LB_PC_H
#define LMP_FIX_LB_PC_H
#include "fix.h"
namespace LAMMPS_NS {
class FixLbPC : public Fix {
public:
FixLbPC(class LAMMPS *, int, char **);
~FixLbPC() override;
int setmask() override;
void init() override;
void initial_integrate(int) override;
void final_integrate() override;
void grow_arrays(int) override;
void copy_arrays(int, int, int) override;
// void set_arrays(int);
int pack_exchange(int, double *) override;
int unpack_exchange(int, double *) override;
private:
double dtv, dtf;
int me;
double *Gamma_MD;
double expminusdttimesgamma;
double DMDcoeff;
double **force_old;
double **up;
double **up_old;
void compute_up();
class FixLbFluid *fix_lb_fluid;
};
} // namespace LAMMPS_NS
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,109 +0,0 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef FIX_CLASS
// clang-format off
FixStyle(lb/rigid/pc/sphere,FixLbRigidPCSphere);
// clang-format on
#else
#ifndef LMP_FIX_LB_RIGID_PC_SPHERE_H
#define LMP_FIX_LB_RIGID_PC_SPHERE_H
#include "fix.h"
namespace LAMMPS_NS {
class FixLbRigidPCSphere : public Fix {
public:
FixLbRigidPCSphere(class LAMMPS *, int, char **);
~FixLbRigidPCSphere() override;
int setmask() override;
void init() override;
void setup(int) override;
void initial_integrate(int) override;
void final_integrate() override;
double compute_scalar() override;
double memory_usage() override;
void grow_arrays(int) override;
void copy_arrays(int, int, int) override;
void set_arrays(int) override;
int pack_exchange(int, double *) override;
int unpack_exchange(int, double *) override;
void pre_neighbor() override;
int dof(int) override;
void reset_dt() override;
double compute_array(int, int) override;
private:
double **up;
double **up_old;
double *Gamma_MD;
double expminusdttimesgamma, DMDcoeff;
double expminusdttimesgammadiv2;
double force_factor, torque_factor;
double dtv, dtf;
int nbody; // # of rigid bodies
int *nrigid; // # of atoms in each rigid body
int *nrigid_shell;
double *masstotal; // total mass of each rigid body
double *masstotal_shell;
double *sphereradius;
double **xcm; // coords of center-of-mass of each rigid body
double **xcm_old;
double **vcm; // velocity of center-of-mass of each
double **ucm;
double **ucm_old;
double **fcm; // force on center-of-mass of each
double **fcm_old;
double **fcm_fluid;
double **omega; // angular momentum of each in space coords
double **torque; // torque on each rigid body in space coords
double **torque_old;
double **torque_fluid;
double **torque_fluid_old;
double **rotate;
imageint *imagebody; // image flags of xcm of each rigid body
double **fflag; // flag for on/off of center-of-mass force
double **tflag; // flag for on/off of center-of-mass torque
int *body; // which body each atom is part of (-1 if none)
double **sum, **all; // work vectors for each rigid body
int **remapflag; // PBC remap flags for each rigid body
double tfactor; // scale factor on temperature of rigid bodies
int inner_nodes; // ==1 if certain particle are inside the rigid
// body and should not interact with the fluid.
// ==0 otherwise.
int igroupinner; // specifies the particles which are inside the
// spherical rigid body, and do not interact with
// the fluid.
void set_xv();
void set_v();
void compute_up();
class FixLbFluid *fix_lb_fluid;
};
} // namespace LAMMPS_NS
#endif
#endif

View File

@ -1,4 +1,3 @@
// clang-format off
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
@ -17,14 +16,14 @@
------------------------------------------------------------------------- */
#include "fix_lb_viscous.h"
#include <cstring>
#include "atom.h"
#include "update.h"
#include "respa.h"
#include "error.h"
#include "fix_lb_fluid.h"
#include "modify.h"
#include "group.h"
#include "modify.h"
#include "respa.h"
#include "update.h"
using namespace LAMMPS_NS;
using namespace FixConst;
@ -32,29 +31,26 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixLbViscous::FixLbViscous(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), fix_lb_fluid(nullptr)
{
if (narg < 3) error->all(FLERR,"Illegal fix lb/viscous command");
if (narg < 3) error->all(FLERR, "Illegal fix lb/viscous command");
int groupbit_lb_fluid = 0;
for (int ifix=0; ifix<modify->nfix; ifix++)
if (strcmp(modify->fix[ifix]->style,"lb/fluid")==0) {
fix_lb_fluid = (FixLbFluid *)modify->fix[ifix];
groupbit_lb_fluid = group->bitmask[modify->fix[ifix]->igroup];
}
if (groupbit_lb_fluid == 0)
error->all(FLERR,"the lb/fluid fix must also be used if using the lb/viscous fix");
auto ifix = modify->get_fix_by_style("lb/fluid");
if (ifix.size() > 0) {
fix_lb_fluid = (FixLbFluid *) ifix[0];
groupbit_lb_fluid = group->bitmask[ifix[0]->igroup];
} else {
error->all(FLERR, "the lb/fluid fix must also be used if using the lb/viscous fix");
}
int *mask = atom->mask;
int nlocal = atom->nlocal;
for (int j=0; j<nlocal; j++) {
for (int j = 0; j < nlocal; j++) {
if ((mask[j] & groupbit) && !(mask[j] & groupbit_lb_fluid))
error->one(FLERR,"to apply a fluid force onto an atom, the lb/fluid fix must be used for that atom.");
error->one(FLERR, "Atoms must be in the fix lb/fluid group to apply a fluid force to them");
}
}
/* ---------------------------------------------------------------------- */
@ -72,24 +68,21 @@ int FixLbViscous::setmask()
void FixLbViscous::init()
{
if (utils::strmatch(update->integrate_style,"^respa"))
if (utils::strmatch(update->integrate_style, "^respa"))
nlevels_respa = ((Respa *) update->integrate)->nlevels;
}
/* ---------------------------------------------------------------------- */
void FixLbViscous::setup(int vflag)
{
if (utils::strmatch(update->integrate_style,"^verlet"))
if (utils::strmatch(update->integrate_style, "^verlet"))
post_force(vflag);
else {
((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1);
post_force_respa(vflag,nlevels_respa-1,0);
((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1);
((Respa *) update->integrate)->copy_flevel_f(nlevels_respa - 1);
post_force_respa(vflag, nlevels_respa - 1, 0);
((Respa *) update->integrate)->copy_f_flevel(nlevels_respa - 1);
}
}
/* ---------------------------------------------------------------------- */
@ -108,25 +101,43 @@ void FixLbViscous::post_force(int /*vflag*/)
// magnitude depends on atom type
double **f = atom->f;
double *rmass = atom->rmass;
double *mass = atom->mass;
int *type = atom->type;
int *mask = atom->mask;
int nlocal = atom->nlocal;
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
double *massp = fix_lb_fluid->massp;
double massfactor;
double **hydroF = fix_lb_fluid->hydroF;
for (int i = 0; i < nlocal; i++)
if (mask[i] & groupbit) {
f[i][0] += hydroF[i][0];
f[i][1] += hydroF[i][1];
f[i][2] += hydroF[i][2];
if (rmass) {
for (int i = 0; i < nlocal; i++)
if (mask[i] & groupbit) {
massfactor = rmass[i] / (rmass[i] + massp[i]);
}
f[i][0] = hydroF[i][0] + massfactor * f[i][0];
f[i][1] = hydroF[i][1] + massfactor * f[i][1];
f[i][2] = hydroF[i][2] + massfactor * f[i][2];
}
} else {
for (int i = 0; i < nlocal; i++)
if (mask[i] & groupbit) {
massfactor = mass[type[i]] / (mass[type[i]] + massp[i]);
f[i][0] = hydroF[i][0] + massfactor * f[i][0];
f[i][1] = hydroF[i][1] + massfactor * f[i][1];
f[i][2] = hydroF[i][2] + massfactor * f[i][2];
}
}
}
/* ---------------------------------------------------------------------- */
void FixLbViscous::post_force_respa(int vflag, int ilevel, int /*iloop*/)
{
if (ilevel == nlevels_respa-1) post_force(vflag);
if (ilevel == nlevels_respa - 1) post_force(vflag);
}
/* ---------------------------------------------------------------------- */
@ -135,4 +146,3 @@ void FixLbViscous::min_post_force(int vflag)
{
post_force(vflag);
}

View File

@ -0,0 +1,181 @@
/* -*- c++ -*- -----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------ */
#ifndef LMP_LATBOLTZ_CONST_H
#define LMP_LATBOLTZ_CONST_H
#include "math_const.h"
using LAMMPS_NS::MathConst::MY_ISQRT2;
using LAMMPS_NS::MathConst::MY_SQRT2;
static constexpr double kappa_lb = 0.0;
// 15-velocity lattice propogation vectors
static constexpr int e15[15][3] = {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {-1, 0, 0}, {0, -1, 0},
{0, 0, 1}, {0, 0, -1}, {1, 1, 1}, {-1, 1, 1}, {-1, -1, 1},
{1, -1, 1}, {1, 1, -1}, {-1, 1, -1}, {-1, -1, -1}, {1, -1, -1}};
// 15-velocity weights
static constexpr double w_lb15[15] = {2. / 9., 1. / 9., 1. / 9., 1. / 9., 1. / 9.,
1. / 9., 1. / 9., 1. / 72., 1. / 72., 1. / 72.,
1. / 72., 1. / 72., 1. / 72., 1. / 72., 1. / 72.};
// 15-velocity normalizations
static constexpr double Ng_lb15[15] = {1., 3., 3., 3., 9. / 2., 9. / 2., 9. / 2., 9.,
9., 9., 27. / 2., 27. / 2., 27. / 2., 9., 1.};
// 15-velcity transformation matrix for f_i to moments
// clang-format off
static constexpr double mg_lb15[15][15] = {
{ 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.},
{ 0., 1., 0., -1., 0., 0., 0., 1., -1., -1., 1., 1., -1., -1., 1.},
{ 0., 0., 1., 0., -1., 0., 0., 1., 1., -1., -1., 1., 1., -1., -1.},
{ 0., 0., 0., 0., 0., 1., -1., 1., 1., 1., 1., -1., -1., -1., -1.},
{ -1./3., 2./3., -1./3., 2./3., -1./3., -1./3., -1./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3.},
{ -1./3., -1./3., 2./3., -1./3., 2./3., -1./3., -1./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3.},
{ -1./3., -1./3., -1./3., -1./3., -1./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3.},
{ 0., 0., 0., 0., 0., 0., 0., 1., -1., 1., -1., 1., -1., 1., -1.},
{ 0., 0., 0., 0., 0., 0., 0., 1., 1., -1., -1., -1., -1., 1., 1.},
{ 0., 0., 0., 0., 0., 0., 0., 1., -1., -1., 1., -1., 1., 1., -1.},
{ 0., 0., -1./3., 0., 1./3., 0., 0., 2./3., 2./3., -2./3., -2./3., 2./3., 2./3., -2./3., -2./3.},
{ 0., 0., 0., 0., 0., -1./3., 1./3., 2./3., 2./3., 2./3., 2./3., -2./3., -2./3., -2./3., -2./3.},
{ 0., -1./3., 0., 1./3., 0., 0., 0., 2./3., -2./3., -2./3., 2./3., 2./3., -2./3., -2./3., 2./3.},
{ 0., 0., 0., 0., 0., 0., 0., 1., -1., 1., -1., -1., 1., -1., 1.},
{MY_SQRT2,-MY_ISQRT2,-MY_ISQRT2,-MY_ISQRT2,-MY_ISQRT2,-MY_ISQRT2,-MY_ISQRT2,MY_SQRT2,MY_SQRT2,MY_SQRT2,MY_SQRT2,MY_SQRT2,MY_SQRT2,MY_SQRT2,MY_SQRT2}
};
// clang-format on
// 15-velocity opposite lattice directions for bounce-back, i.e. od[i] = j such that e15[j]=-e15[i]
static constexpr int od[15] = {0, 3, 4, 1, 2, 6, 5, 13, 14, 11, 12, 9, 10, 7, 8};
// 15-velocity bounce-back list
// bbl[i][0] = number of bounce-back directions for orientation i
// bbl[i][j]...bbl[i][bbl[i][0]] directions that would be coming from inside the wall so need to come from bounce-back
// bbl[i][[bbl[i][0]+1]...bbl[i][16] directions where standard propogation can proceed (pointing into or along wall)
// inside edge has 1/4 inside domain, 3/4 outside domain
// outside edge has 3/4 outside domain, 1/4 inside domain
// Note: 1. This list is not exhaustive (eg. there should be 12 inside and 12 outside edges possible, it just covers cases
// accessible in the pit routines. Could be generalized to include other geometries
// 2. Need better labelling for corners (particularly in-out) that distinguishes different cases (e.g. 10 and 29 are NOT same, also 11,31)
// ori wall normals (point into domain)
// 0 not relevent, ori==0 only for lattice type 0 (standard bulk fluid) and 2 (outside domain)
// 1 wall +x
// 2 wall +y
// 3 wall +z
// 4 outside edge +x,+z
// 5 inside edge +x,+z
// 6 inside edge +y,+z
// 7 outside edge +y,+z
// 8 inside edge -x,-y
// 9 inside edge -x,+y
// 10 in-out corner +x,+y,+z
// 11 in-out corner +x,-y,+z
// 12 inside corner -x,+y,+z
// 13 inside corner -x,-y,+z
// 14 wall -x
// 15 wall -y
// 16 wall -z
// 17 outside edge -x,+z
// 18 inside edge -x,+z
// 19 inside edge -y,+z
// 20 outside edge -y,+z
// 21 inside edge +x,-y
// 22 inside edge +x,+y
// 23 in-out corner -x,+y,+z
// 24 in-out corner -x,-y,+z
// 25 inside corner +x,+y,+z
// 26 inside corner +x,-y,+z
// 27 inside edge +y,-z
// 28 inside edge -y,-z
// 29 in-out corner +x,+y,+z
// 30 in-out corner +x,-y,+z
// 31 in-out corner -x,+y,+z
// 32 in-out corner -x,-y,+z
// clang-format off
static constexpr int bbl[33][16] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 5, 1, 7, 10, 11, 14, 0, 2, 3, 4, 5, 6, 8, 9, 12, 13},
{ 5, 2, 7, 8, 11, 12, 0, 1, 3, 4, 5, 6, 9, 10, 13, 14},
{ 5, 5, 7, 8, 9, 10, 0, 1, 2, 3, 4, 6, 11, 12, 13, 14},
{ 4, 7, 10, 1, 5, 0, 2, 3, 4, 6, 8, 9, 11, 12, 13, 14},
{ 8, 1, 5, 7, 10, 8, 9, 11, 14, 0, 2, 3, 4, 6, 12, 13},
{ 8, 2, 5, 7, 8, 9, 10, 11, 12, 0, 1, 3, 4, 6, 13, 14},
{ 4, 2, 5, 7, 8, 0, 1, 3, 4, 6, 9, 10, 11, 12, 13, 14},
{ 8, 3, 4, 9, 13, 8, 10, 12, 14, 0, 1, 2, 5, 6, 7, 11},
{ 8, 2, 3, 8, 12, 7, 9, 11, 13, 0, 1, 4, 5, 6, 10, 14},
{ 3, 7, 8, 10, 0, 1, 2, 3, 4, 5, 6, 9, 11, 12, 13, 14},
{ 3, 7, 9, 10, 0, 1, 2, 3, 4, 5, 6, 8, 11, 12, 13, 14},
{10, 2, 3, 5, 8, 7, 9, 10, 11, 12, 13, 0, 1, 4, 6, 14},
{10, 3, 4, 5, 9, 7, 8, 10, 12, 13, 14, 0, 1, 2, 6, 11},
{ 5, 3, 8, 9, 12, 13, 0, 1, 2, 4, 5, 6, 7, 10, 11, 14},
{ 5, 4, 9, 10, 13, 14, 0, 1, 2, 3, 5, 6, 7, 8, 11, 12},
{ 5, 6, 11, 12, 13, 14, 0, 1, 2, 3, 4, 5, 7, 8, 9, 10},
{ 4, 8, 9, 3, 5, 0, 1, 2, 4, 6, 7, 10, 11, 12, 13, 14},
{ 8, 3, 5, 8, 9, 7, 10, 12, 13, 0, 1, 2, 4, 6, 11, 14},
{ 8, 4, 5, 9, 10, 7, 8, 13, 14, 0, 1, 2, 3, 6, 11, 12},
{ 4, 4, 5, 9, 10, 0, 1, 2, 3, 6, 7, 8, 11, 12, 13, 14},
{ 8, 1, 4, 10, 14, 7, 9, 11, 13, 0, 2, 3, 5, 6, 8, 12},
{ 8, 1, 2, 7, 11, 8, 10, 12, 14, 0, 3, 4, 5, 6, 9, 13},
{ 3, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13, 14},
{ 3, 8, 9, 10, 0, 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 14},
{10, 1, 2, 5, 7, 8, 9, 10, 11, 12, 14, 0, 3, 4, 6, 13},
{10, 1, 4, 5, 10, 7, 8, 9, 11, 13, 14, 0, 2, 3, 6, 12},
{ 8, 2, 6, 11, 12, 7, 8, 13, 14, 0, 1, 3, 4, 5, 9, 10},
{ 8, 4, 6, 13, 14, 9, 10, 11, 12, 0, 1, 2, 3, 5, 7, 8},
{ 6, 2, 7, 8, 11, 10, 12, 0, 1, 3, 4, 5, 6, 9, 13, 14},
{ 6, 4, 9, 10, 14, 7, 13, 0, 1, 2, 3, 5, 6, 8, 11, 12},
{ 6, 2, 7, 8, 12, 9, 11, 0, 1, 3, 4, 5, 6, 10, 13, 14},
{ 6, 4, 9, 10, 13, 8, 14, 0, 1, 2, 3, 5, 6, 7, 11, 12}
};
//clang-format on
// 19-velocity lattice propogation vectors
static constexpr int e19[19][3] = {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {-1, 0, 0}, {0, -1, 0},
{0, 0, 1}, {0, 0, -1}, {1, 1, 0}, {1, -1, 0}, {-1, 1, 0},
{-1, -1, 0}, {1, 0, 1}, {1, 0, -1}, {-1, 0, 1}, {-1, 0, -1},
{0, 1, 1}, {0, 1, -1}, {0, -1, 1}, {0, -1, -1}};
static constexpr double w_lb19[19] = {1. / 3., 1. / 18., 1. / 18., 1. / 18., 1. / 18.,
1. / 18., 1. / 18., 1. / 36., 1. / 36., 1. / 36.,
1. / 36., 1. / 36., 1. / 36., 1. / 36., 1. / 36.,
1. / 36., 1. / 36., 1. / 36., 1. / 36.};
static constexpr double Ng_lb19[19] = {1., 3., 3., 3., 9. / 2., 9. / 2., 9. / 2.,
9., 9., 9., 27. / 2., 27. / 2., 27. / 2., 18.,
18., 18., 162. / 7., 126. / 5., 30.};
// clang-format off
static constexpr double mg_lb19[19][19] = {
{ 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.},
{ 0., 1., 0., -1., 0., 0., 0., 1., 1., -1., -1., 1., 1., -1., -1., 0., 0., 0., 0.},
{ 0., 0., 1., 0., -1., 0., 0., 1., -1., 1., -1., 0., 0., 0., 0., 1., 1., -1., -1.},
{ 0., 0., 0., 0., 0., 1., -1., 0., 0., 0., 0., 1., -1., 1., -1., 1., -1., 1., -1.},
{-1./3., 2./3., -1./3., 2./3., -1./3., -1./3., -1./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3.,-1./3.,-1./3.,-1./3.,-1./3.},
{-1./3., -1./3., 2./3., -1./3., 2./3., -1./3., -1./3., 2./3., 2./3., 2./3., 2./3.,-1./3.,-1./3.,-1./3.,-1./3., 2./3., 2./3., 2./3., 2./3.},
{-1./3., -1./3., -1./3., -1./3., -1./3., 2./3., 2./3.,-1./3.,-1./3.,-1./3.,-1./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3., 2./3.},
{ 0., 0., 0., 0., 0., 0., 0., 1., -1., -1., 1., 0., 0., 0., 0., 0., 0., 0., 0.},
{ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., -1., -1., 1., 0., 0., 0., 0.},
{ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., -1., -1., 1.},
{ 0., -1./3., 0., 1./3., 0., 0., 0., 2./3., 2./3.,-2./3.,-2./3.,-1./3.,-1./3., 1./3., 1./3., 0., 0., 0., 0.},
{ 0., 0., -1./3., 0., 1./3., 0., 0., 2./3.,-2./3., 2./3.,-2./3., 0., 0., 0., 0.,-1./3.,-1./3., 1./3., 1./3.},
{ 0., 0., 0., 0., 0., -1./3., 1./3., 0., 0., 0., 0., 2./3.,-2./3., 2./3.,-2./3.,-1./3., 1./3.,-1./3., 1./3.},
{ 0., -0.5, 0., 0.5, 0., 0., 0., 0., 0., 0., 0., 0.5, 0.5, -0.5, -0.5, 0., 0., 0., 0.},
{ 0., 0., 0., 0., 0., -0.5, 0.5, 0., 0., 0., 0., 0., 0., 0., 0., 0.5, -0.5, 0.5, -0.5},
{ 0., 0., -0.5, 0., 0.5, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.5, 0.5, -0.5, -0.5},
{1./18.,-5./18.,-5./18.,-5./18.,-5./18., 2./9., 2./9.,7./18.,7./18.,7./18.,7./18.,-1./9.,-1./9.,-1./9.,-1./9.,-1./9.,-1./9.,-1./9.,-1./9.},
{1./14.,-5./14., 1./7.,-5./14., 1./7.,-3./14.,-3./14., 0., 0., 0., 0.,5./14.,5./14.,5./14.,5./14.,-1./7.,-1./7.,-1./7.,-1./7.},
{1./10., 0.,-3./10., 0.,-3./10.,-3./10.,-3./10., 0., 0., 0., 0., 0., 0., 0., 0.,3./10.,3./10.,3./10.,3./10.}
};
// clang-format on
#endif

View File

@ -43,6 +43,13 @@ FixDeprecated::FixDeprecated(LAMMPS *lmp, int narg, char **arg) :
"ave/spatial keywords & options for binning are part of "
"compute chunk/atom:\n dim, origin, delta, region, "
"bound, discard, units\n\n");
} else if (my_style == "lb/pc") {
utils::logmesg(lmp,"\nFix style 'lb/pc' has been removed from the LATBOLTZ"
" package; 'fix nve' can be used in its place.\n\n");
}
else if (my_style == "lb/rigid/pc/sphere") {
utils::logmesg(lmp,"\nFix style 'lb/rigid/pc/sphere' has been removed from"
" the LATBOLTZ package; 'fix rigid' can be used in its place.\n\n");
}
error->all(FLERR,"This fix style is no longer available");
}

View File

@ -17,6 +17,8 @@
FixStyle(DEPRECATED,FixDeprecated);
FixStyle(ave/spatial,FixDeprecated);
FixStyle(ave/spatial/sphere,FixDeprecated);
FixStyle(lb/pc,FixDeprecated);
FixStyle(lb/rigid/pc/sphere,FixDeprecated);
// clang-format on
#else

View File

@ -28,6 +28,7 @@ namespace MathConst {
static constexpr double MY_PIS = 1.77245385090551602729; // sqrt(pi)
static constexpr double MY_ISPI4 = 1.12837916709551257389; // 1/sqrt(pi/4)
static constexpr double MY_SQRT2 = 1.41421356237309504880; // sqrt(2)
static constexpr double MY_ISQRT2 = 0.707106781186547524401; // 1/sqrt(2)
static constexpr double MY_CUBEROOT2 = 1.25992104989487316476; // 2*(1/3)
} // namespace MathConst