diff --git a/doc/src/Howto_rheo.rst b/doc/src/Howto_rheo.rst index 9dac90549c..c55631455b 100644 --- a/doc/src/Howto_rheo.rst +++ b/doc/src/Howto_rheo.rst @@ -1,3 +1,4 @@ Reproducing hydrodynamics and elastic objects (RHEO) ====================== +Text diff --git a/doc/src/fix_rheo.rst b/doc/src/fix_rheo.rst index 7200d456dd..e9613e4838 100644 --- a/doc/src/fix_rheo.rst +++ b/doc/src/fix_rheo.rst @@ -8,26 +8,38 @@ Syntax .. parsed-literal:: - fix ID group-ID rheo + fix ID group-ID rheo cut kstyle keyword values... * ID, group-ID are documented in :doc:`fix ` command * rheo = style name of this fix command +* cut = *quintic* or *CRK0* or *CRK1* or *CRK2* +* zero or more keyword/value pairs may be appended to args +* keyword = *shift* or *thermal* or *surface/detection* or *interface/reconstruction* or *rho/sum* or *density* or *sound/squared* + + .. parsed-literal:: + + *shift* values = none, turns on velocity shifting + *thermal* values = none, turns on thermal evolution + *surface/detection* values = *sdstyle* *limit* + *sdstyle* = *coordination* or *divergence* + *limit* = threshold for surface particles (unitless) + *interface/reconstruction* values = none, reconstructs interfaces with solid particles + *rho/sum* values = none, uses the kernel to compute the density of particles + *density* values = *rho0* (density) + *sound/squared* values = *csq* (velocity\^2) Examples """""""" .. code-block:: LAMMPS - fix 1 all rheo 1.0 CRK1 shift + fix 1 all rheo 1.0 quintic thermal density 0.1 sound/squared 10.0 + fix 1 all rheo 1.0 CRK1 shift surface/detection coordination 40 Description """"""""""" -Perform time integration to update position, velocity, internal energy -and local density for atoms in the group each timestep. This fix is -needed to time-integrate SPH systems where particles carry internal -variables such as internal energy. SPH stands for Smoothed Particle -Hydrodynamics. +Fix description... Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -41,6 +53,14 @@ the :doc:`run ` command. This fix is not invoked during :doc:`energy minim Restrictions """""""""""" +This fix must be used with an atom style that includes density +such as atom_style rheo or rheo/thermal. This fix must be used in +conjuction with :doc:`fix rheo/pressure `. and +:doc:`fix rheo/viscosity `, If the *thermal* +setting is used, there must also be an instance of +:doc:`fix rheo/thermal `. The fix group must be +set to all. + This fix is part of the RHEO package. It is only enabled if LAMMPS was built with that package. See the :doc:`Build package ` page for more info. @@ -56,4 +76,4 @@ Related commands Default """"""" -none +*rho0* and *csq* are set to 1.0. diff --git a/doc/src/fix_rheo_pressure.rst b/doc/src/fix_rheo_pressure.rst index 7200d456dd..ceb402501a 100644 --- a/doc/src/fix_rheo_pressure.rst +++ b/doc/src/fix_rheo_pressure.rst @@ -1,6 +1,6 @@ -.. index:: fix rheo +.. index:: fix rheo/pressure -fix rheo command +fix rheo/pressure command =============== Syntax @@ -8,26 +8,33 @@ Syntax .. parsed-literal:: - fix ID group-ID rheo + fix ID group-ID rheo/pressure pstyle args * ID, group-ID are documented in :doc:`fix ` command -* rheo = style name of this fix command +* rheo/pressure = style name of this fix command +* pstyle = *linear* or *taitwater* or *cubic* + + .. parsed-literal:: + + *linear* args = none + *taitwater* args = none + *cubic* args = cubic term prefactor :math:`A_3` (pressure/density\^2) Examples """""""" .. code-block:: LAMMPS - fix 1 all rheo 1.0 CRK1 shift + fix 1 all rheo/pressure linear + fix 1 all rheo/pressure cubic 10.0 Description """"""""""" -Perform time integration to update position, velocity, internal energy -and local density for atoms in the group each timestep. This fix is -needed to time-integrate SPH systems where particles carry internal -variables such as internal energy. SPH stands for Smoothed Particle -Hydrodynamics. +This fix... + +Only one instance of fix rheo/pressure can be defined and the fix group must be set to all. + Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -41,6 +48,11 @@ the :doc:`run ` command. This fix is not invoked during :doc:`energy minim Restrictions """""""""""" +This fix must be used with an atom style that includes density +such as atom_style rheo or rheo/thermal. This fix must be used in +conjuction with :doc:`fix rheo `. The fix group must be +set to all. + This fix is part of the RHEO package. It is only enabled if LAMMPS was built with that package. See the :doc:`Build package ` page for more info. @@ -48,7 +60,6 @@ Related commands """""""""""""""" :doc:`fix rheo/viscosity `, -:doc:`fix rheo/pressure `, :doc:`fix rheo/thermal `, :doc:`pair rheo `, :doc:`compute rheo/property/atom ` diff --git a/doc/src/fix_rheo_thermal.rst b/doc/src/fix_rheo_thermal.rst index 7200d456dd..01b4820a39 100644 --- a/doc/src/fix_rheo_thermal.rst +++ b/doc/src/fix_rheo_thermal.rst @@ -1,6 +1,6 @@ -.. index:: fix rheo +.. index:: fix rheo/thermal -fix rheo command +fix rheo/thermal command =============== Syntax @@ -8,26 +8,49 @@ Syntax .. parsed-literal:: - fix ID group-ID rheo + fix ID group-ID rheo/thermal keyword values ... * ID, group-ID are documented in :doc:`fix ` command -* rheo = style name of this fix command +* rheo/viscosity = style name of this fix command +* one or more attributes may be appended +* attribute = *conductivity* or *specific/heat* or *Tfreeze* + + .. parsed-literal:: + + *conductivity* args = style param + style = *constant* or *type* + *constant* arg = conductivity (power/temperature) + *type* args = list of conductivity values, one per type (power/temperature) + *specific/heat* args = style param + style = *constant* or *type* + *constant* arg = specific heat (energy/(mass*temperature)) + *type* args = list of specific heat values, one per atom type (energy/(mass*temperature)) + *Tfreeze* args = style param + style = *constant* or *type* + *constant* arg = freezing temperature (temperature) + *type* args = list of freezing temperature values, one per type (temperature) Examples """""""" .. code-block:: LAMMPS - fix 1 all rheo 1.0 CRK1 shift + fix 1 all rheo/thermal conductivity constant 1.0 specific/heat constant 1.0 Tfreeze constant 1.0 + fix 1 all rheo/pressure conductivity constant 1.0 specific/heat type 1.0 2.0 Description """"""""""" -Perform time integration to update position, velocity, internal energy -and local density for atoms in the group each timestep. This fix is -needed to time-integrate SPH systems where particles carry internal -variables such as internal energy. SPH stands for Smoothed Particle -Hydrodynamics. +This fix... + +While the *Tfreeze* keyword is optional, the *conducitivity* and +*specific/heat* keywords are mandatory. + +Multiple instances of this fix may be defined to apply different +properties to different groups. However, the union of fix groups +across all instances of fix rheo/thermal must cover all atoms. +If there are multiple instances of this fix, any intersections in +the fix groups will lead to incorrect thermal integration. Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -41,15 +64,20 @@ the :doc:`run ` command. This fix is not invoked during :doc:`energy minim Restrictions """""""""""" +This fix must be used with an atom style that includes temperature, +heatflow, and conductivity such as atom_tyle rheo/thermal This fix +must be used in conjuction with :doc:`fix rheo ` with the +*thermal* setting. + This fix is part of the RHEO package. It is only enabled if LAMMPS was built with that package. See the :doc:`Build package ` page for more info. Related commands """""""""""""""" +:doc:`fix rheo `, :doc:`fix rheo/viscosity `, :doc:`fix rheo/pressure `, -:doc:`fix rheo/thermal `, :doc:`pair rheo `, :doc:`compute rheo/property/atom ` diff --git a/doc/src/fix_rheo_viscosity.rst b/doc/src/fix_rheo_viscosity.rst index 7200d456dd..278c621216 100644 --- a/doc/src/fix_rheo_viscosity.rst +++ b/doc/src/fix_rheo_viscosity.rst @@ -1,6 +1,6 @@ -.. index:: fix rheo +.. index:: fix rheo/viscosity -fix rheo command +fix rheo/viscosity command =============== Syntax @@ -8,26 +8,43 @@ Syntax .. parsed-literal:: - fix ID group-ID rheo + fix ID group-ID rheo/viscosity vstyle args * ID, group-ID are documented in :doc:`fix ` command -* rheo = style name of this fix command +* rheo/viscosity = style name of this fix command +* vstyle = *constant* or *type* or *power* + + .. parsed-literal:: + + *constant* arg = viscosity (mass/(length*time)) + *type* args = list of viscosity values, one per atom type (mass/(length*time)) + *power* args = *eta* *gd0* *K* *npow* *tau0* + *eta* = (units) + *gd0* = (units) + *K* = (units) + *npow* = (units) + *tau0* = (units) Examples """""""" .. code-block:: LAMMPS - fix 1 all rheo 1.0 CRK1 shift + fix 1 all rheo/viscosity constant 1.0 + fix 1 all rheo/viscosity power 0.1 1e-2 0.5 0.01 Description """"""""""" -Perform time integration to update position, velocity, internal energy -and local density for atoms in the group each timestep. This fix is -needed to time-integrate SPH systems where particles carry internal -variables such as internal energy. SPH stands for Smoothed Particle -Hydrodynamics. +This fix... + +Multiple instances of this fix may be defined to apply different +properties to different groups. However, the union of fix groups +across all instances of fix rheo/viscosity must cover all atoms. +If there are multiple instances of this fix, any intersection +between fix groups will cause the viscosity for the affected atoms +to be calculated multiple times. Any such affected atoms will enabled +up with a viscosity calculated by the latest defined fix. Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -41,13 +58,17 @@ the :doc:`run ` command. This fix is not invoked during :doc:`energy minim Restrictions """""""""""" +This fix must be used with an atom style that includes viscosity +such as atom_style rheo or rheo/thermal. This fix must be used in +conjuction with :doc:`fix rheo `. + This fix is part of the RHEO package. It is only enabled if LAMMPS was built with that package. See the :doc:`Build package ` page for more info. Related commands """""""""""""""" -:doc:`fix rheo/viscosity `, +:doc:`fix rheo `, :doc:`fix rheo/pressure `, :doc:`fix rheo/thermal `, :doc:`pair rheo `, diff --git a/doc/src/pair_rheo.rst b/doc/src/pair_rheo.rst index b5c02c41ff..7a26755780 100644 --- a/doc/src/pair_rheo.rst +++ b/doc/src/pair_rheo.rst @@ -1,6 +1,6 @@ .. index:: pair_style sph/lj -pair_style sph/lj command +pair_style rheo command ========================= Syntax @@ -8,79 +8,63 @@ Syntax .. code-block:: LAMMPS - pair_style sph/lj + pair_style rheo cut keyword values + +* cut = *quintic* or *CRK0* or *CRK1* or *CRK2* +* zero or more keyword/value pairs may be appended to args +* keyword = *rho/damp* or *artificial/visc* + +.. parsed-literal:: + + *rho/damp* args = density damping prefactor :math:`\xi` (units?) + *artificial/visc* args = artificial viscosity prefactor :math:`\zeta` (units?) Examples """""""" .. code-block:: LAMMPS - pair_style sph/lj - pair_coeff * * 1.0 2.4 + pair_style rheo 1.0 quintic rho/damp 1.0 artificial/visc 2.0 + pair_coeff * * Description """"""""""" -The sph/lj style computes pressure forces between particles according -to the Lennard-Jones equation of state, which is computed according to -Ree's 1980 polynomial fit :ref:`(Ree) `. The Lennard-Jones parameters -epsilon and sigma are set to unity. This pair style also computes -Monaghan's artificial viscosity to prevent particles from -interpenetrating :ref:`(Monaghan) `. +pair style... -See `this PDF guide `_ to using SPH in -LAMMPS. - -The following coefficients must be defined for each pair of atoms -types via the :doc:`pair_coeff ` command as in the examples +No coefficients are defined for each pair of atoms types via the +:doc:`pair_coeff ` command as in the examples above. -* :math:`\nu` artificial viscosity (no units) -* h kernel function cutoff (distance units) - ---------- Mixing, shift, table, tail correction, restart, rRESPA info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" -This style does not support mixing. Thus, coefficients for all -I,J pairs must be specified explicitly. - This style does not support the :doc:`pair_modify ` shift, table, and tail options. This style does not write information to :doc:`binary restart files `. Thus, you need to re-specify the pair_style and pair_coeff commands in an input script that reads a restart file. -This style can only be used via the *pair* keyword of the :doc:`run_style respa ` command. It does not support the *inner*, -*middle*, *outer* keywords. +This style can only be used via the *pair* keyword of the :doc:`run_style respa ` command. It does not support the *inner*, *middle*, *outer* keywords. Restrictions """""""""""" -As noted above, the Lennard-Jones parameters epsilon and sigma are set -to unity. - -This pair style is part of the SPH package. It is only enabled -if LAMMPS was built with that package. See the :doc:`Build package ` page for more info. +This fix is part of the RHEO package. It is only enabled if +LAMMPS was built with that package. See the :doc:`Build package ` page for more info. Related commands """""""""""""""" -:doc:`pair_coeff `, pair_sph/rhosum +:doc:`fix rheo `, +:doc:`fix rheo/pressure `, +:doc:`fix rheo/thermal `, +:doc:`fix rheo/viscosity `, +:doc:`compute rheo/property/atom ` Default """"""" -none - ----------- - -.. _Ree: - -**(Ree)** Ree, Journal of Chemical Physics, 73, 5401 (1980). - -.. _Monoghan: - -**(Monaghan)** Monaghan and Gingold, Journal of Computational Physics, -52, 374-389 (1983). +No density damping or artificial viscous forces are calculated. diff --git a/src/RHEO/fix_rheo.cpp b/src/RHEO/fix_rheo.cpp index 48eece239a..bacaae074d 100644 --- a/src/RHEO/fix_rheo.cpp +++ b/src/RHEO/fix_rheo.cpp @@ -74,7 +74,7 @@ FixRHEO::FixRHEO(LAMMPS *lmp, int narg, char **arg) : h = utils::numeric(FLERR,arg[3],false,lmp); cut = h; - if (strcmp(arg[4],"Quintic") == 0) { + if (strcmp(arg[4],"quintic") == 0) { kernel_style = QUINTIC; } else if (strcmp(arg[4],"CRK0") == 0) { kernel_style = CRK0; @@ -109,11 +109,11 @@ FixRHEO::FixRHEO(LAMMPS *lmp, int narg, char **arg) : interface_flag = 1; } else if (strcmp(arg[iarg],"rho/sum") == 0) { rhosum_flag = 1; - } else if (strcmp(arg[iarg],"rho0") == 0) { + } else if (strcmp(arg[iarg],"density") == 0) { if(iarg + 1 >= narg) error->all(FLERR,"Illegal rho0 option in fix rheo"); rho0 = utils::numeric(FLERR,arg[iarg + 1],false,lmp); iarg += 1; - } else if (strcmp(arg[iarg],"csq") == 0) { + } else if (strcmp(arg[iarg],"sound/squared") == 0) { if(iarg+1 >= narg) error->all(FLERR,"Illegal csq option in fix rheo"); csq = utils::numeric(FLERR,arg[iarg + 1],false,lmp); iarg += 1; diff --git a/src/RHEO/fix_rheo_thermal.cpp b/src/RHEO/fix_rheo_thermal.cpp index bd7a22ce1e..ec39a13311 100644 --- a/src/RHEO/fix_rheo_thermal.cpp +++ b/src/RHEO/fix_rheo_thermal.cpp @@ -72,7 +72,7 @@ FixRHEOThermal::FixRHEOThermal(LAMMPS *lmp, int narg, char **arg) : } else { error->all(FLERR,"Illegal fix command, {}", arg[iarg + 1]); } - } else if (strcmp(arg[iarg],"cv") == 0) { + } else if (strcmp(arg[iarg],"specific/heat") == 0) { // Cv arguments if (iarg + 1 >= narg) error->all(FLERR,"Insufficient arguments for cv option"); if (strcmp(arg[iarg + 1],"constant") == 0) { diff --git a/src/RHEO/pair_rheo.cpp b/src/RHEO/pair_rheo.cpp index 8e76a6d413..b8b8e5a809 100644 --- a/src/RHEO/pair_rheo.cpp +++ b/src/RHEO/pair_rheo.cpp @@ -357,7 +357,7 @@ void PairRHEO::settings(int narg, char **arg) if (narg < 1) error->all(FLERR,"Illegal pair_style command"); h = utils::numeric(FLERR,arg[0],false,lmp); -printf("settings\n"); + int iarg = 1; while (iarg < narg) { if (strcmp(arg[iarg], "rho/damp") == 0) { @@ -423,7 +423,7 @@ void PairRHEO::setup() thermal_flag = fix_rheo->thermal_flag; csq = fix_rheo->csq; rho0 = fix_rheo->rho0; -printf("setup\n"); + if (h != fix_rheo->h) error->all(FLERR, "Pair rheo cutoff {} does not agree with fix rheo cutoff {}", h, fix_rheo->h); @@ -455,6 +455,6 @@ double PairRHEO::init_one(int i, int j) if (setflag[i][j] == 0) { error->all(FLERR,"All pair rheo coeffs are not set"); } -printf("init one\n"); + return h; }