Skip to content

Commit 84e757f

Browse files
authored
Merge pull request lammps#4590 from taenzel/srd-fix-pbcs
Make fix SRD compatible with PBCs & fix deform remap v, and add profile-unbiased thermostat
2 parents 4105717 + 952e7a5 commit 84e757f

File tree

3 files changed

+151
-230
lines changed

3 files changed

+151
-230
lines changed

doc/src/fix_srd.rst

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Syntax
4141
*possible* = shift depending on mean free path and bin size
4242
shiftseed = random # seed (positive integer)
4343
*tstat* value = *yes* or *no* = thermostat SRD particles or not
44+
*unbiased* value = *yes* or *no* = use profile-unbiased thermostat or not
4445
*rescale* value = *yes* or *no* or *rotate* or *collide* = rescaling of SRD velocities
4546
*yes* = rescale during velocity rotation and collisions
4647
*no* = no rescaling
@@ -52,6 +53,7 @@ Examples
5253

5354
.. code-block:: LAMMPS
5455
56+
fix 1 all srd 10 NULL 1.0 1.0 482984
5557
fix 1 srd srd 10 big 1.0 0.25 482984
5658
fix 1 srd srd 10 big 0.5 0.25 482984 collision slip search 0.5
5759
@@ -271,7 +273,7 @@ a vector whose coordinates are chosen randomly in the range [-1/2 bin
271273
size, 1/2 bin size]. Note that all particles are shifted by the same
272274
vector. The specified random number *shiftseed* is used to generate
273275
these vectors. This operation sufficiently randomizes which SRD
274-
particles are in the same bin, even if :math:`lambda` is small.
276+
particles are in the same bin, even if :math:`\lambda` is small.
275277

276278
If the *shift* flag is set to *no*, then no shifting is performed, but
277279
bin data will be communicated if bins overlap processor boundaries. An
@@ -281,26 +283,30 @@ only if :math:`\lambda < 0.6` of the SRD bin size. A warning is
281283
generated to let you know this is occurring. If the *shift* flag is set
282284
to *yes* then shifting is performed regardless of the magnitude of
283285
:math:`\lambda`. Note that the *shiftseed* is not used if the *shift*
284-
flag is set to *no*, but must still be specified.
285-
286-
Note that shifting of SRD coordinates requires extra communication,
287-
hence it should not normally be enabled unless required.
286+
flag is set to *no*, but must still be specified. Note that shifting of SRD
287+
coordinates requires extra communication, hence it should not normally be
288+
enabled unless required.
288289

289290
The *tstat* keyword will thermostat the SRD particles to the specified
290-
*Tsrd*\ . This is done every N timesteps, during the velocity rotation
291-
operation, by rescaling the thermal velocity of particles in each SRD
292-
bin to the desired temperature. If there is a streaming velocity
293-
associated with the system, e.g. due to use of the :doc:`fix deform <fix_deform>` command to perform a simulation undergoing
294-
shear, then that is also accounted for. The mean velocity of each bin
295-
of SRD particles is set to the position-dependent streaming velocity,
296-
based on the coordinates of the center of the SRD bin. Note that
297-
collisions of SRD particles with big particles or walls has a
298-
thermostatting effect on the colliding particles, so it may not be
299-
necessary to thermostat the SRD particles on a bin by bin basis in
300-
that case. Also note that for streaming simulations, if no
301-
thermostatting is performed (the default), then it may take a long
302-
time for the SRD fluid to come to equilibrium with a velocity profile
303-
that matches the simulation box deformation.
291+
*Tsrd*\ . This is done every N timesteps, during the velocity rotation
292+
operation, by rescaling the thermal velocities of particles in each SRD
293+
bin to the desired temperature. Note that collisions of SRD particles with
294+
big particles or walls have a thermostatting effect on the colliding particles,
295+
so it may not be necessary to thermostat the SRD particles on a bin by bin
296+
basis in that case.
297+
298+
The *unbiased* keyword controls how the thermostat operates if there is a streaming
299+
velocity associated with the system, e.g. due to use of the
300+
:doc:`fix deform <fix_deform>` command to perform a simulation undergoing
301+
shear. The default case, *no*, is profile-biased: velocities relative to the
302+
mean velocity of the bin are rescaled, and then the mean velocity of each bin
303+
is set to the position-dependent streaming velocity, based on the coordinates
304+
of the center of the SRD bin. This enforces a linear velocity profile. With
305+
*yes*, after rescaling, the mean velocity of the bin is not changed, which
306+
renders the thermostat profile-unbiased. Note that for streaming simulations,
307+
if no thermostatting is performed (the default), it may take a long time for
308+
the SRD fluid to come to equilibrium with a velocity profile that matches the
309+
simulation box deformation.
304310

305311
The *rescale* keyword enables rescaling of an SRD particle's velocity
306312
if it would travel more than 4 mean-free paths in an SRD timestep. If
@@ -397,7 +403,7 @@ Default
397403
The option defaults are: *lamda* (:math:`\lambda`) is inferred from *Tsrd*,
398404
collision = noslip, overlap = no, inside = error, exact = yes, radius =
399405
1.0, bounce = 0, search = hgrid, cubic = error 0.01, shift = no, tstat =
400-
no, and rescale = yes.
406+
no, unbiased = no, and rescale = yes.
401407

402408
----------
403409

0 commit comments

Comments
 (0)