docs: complete howto review
This commit is contained in:
@ -73,7 +73,7 @@ with additional switching or shifting functions that ramp the energy
|
||||
and/or force smoothly to zero between an inner :math:`(a)` and outer
|
||||
:math:`(b)` cutoff. The older styles with *charmm* (not *charmmfsw* or
|
||||
*charmmfsh*\ ) in their name compute the LJ and Coulombic interactions
|
||||
with an energy switching function (esw) S(r) which ramps the energy
|
||||
with an energy switching function (esw) :math:`S(r)` which ramps the energy
|
||||
smoothly to zero between the inner and outer cutoff. This can cause
|
||||
irregularities in pairwise forces (due to the discontinuous second
|
||||
derivative of energy at the boundaries of the switching region), which
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
Calculate diffusion coefficients
|
||||
================================
|
||||
|
||||
The diffusion coefficient D of a material can be measured in at least
|
||||
2 ways using various options in LAMMPS. See the examples/DIFFUSE
|
||||
The diffusion coefficient :math:`D` of a material can be measured in at least
|
||||
2 ways using various options in LAMMPS. See the ``examples/DIFFUSE``
|
||||
directory for scripts that implement the 2 methods discussed here for
|
||||
a simple Lennard-Jones fluid model.
|
||||
|
||||
@ -12,7 +12,7 @@ of the MSD versus time is proportional to the diffusion coefficient.
|
||||
The instantaneous MSD values can be accumulated in a vector via the
|
||||
:doc:`fix vector <fix_vector>` command, and a line fit to the vector to
|
||||
compute its slope via the :doc:`variable slope <variable>` function, and
|
||||
thus extract D.
|
||||
thus extract :math:`D`.
|
||||
|
||||
The second method is to measure the velocity auto-correlation function
|
||||
(VACF) of the system, via the :doc:`compute vacf <compute_vacf>`
|
||||
@ -20,4 +20,4 @@ command. The time-integral of the VACF is proportional to the
|
||||
diffusion coefficient. The instantaneous VACF values can be
|
||||
accumulated in a vector via the :doc:`fix vector <fix_vector>` command,
|
||||
and time integrated via the :doc:`variable trap <variable>` function,
|
||||
and thus extract D.
|
||||
and thus extract :math:`D`.
|
||||
|
||||
@ -1,20 +1,22 @@
|
||||
Calculate thermal conductivity
|
||||
==============================
|
||||
|
||||
The thermal conductivity kappa of a material can be measured in at
|
||||
least 4 ways using various options in LAMMPS. See the examples/KAPPA
|
||||
The thermal conductivity :math:`\kappa` of a material can be measured in at
|
||||
least 4 ways using various options in LAMMPS. See the ``examples/KAPPA``
|
||||
directory for scripts that implement the 4 methods discussed here for
|
||||
a simple Lennard-Jones fluid model. Also, see the :doc:`Howto viscosity <Howto_viscosity>` page for an analogous discussion
|
||||
for viscosity.
|
||||
|
||||
The thermal conductivity tensor kappa is a measure of the propensity
|
||||
The thermal conductivity tensor :math:`\mathbf{\kappa}` is a measure of the propensity
|
||||
of a material to transmit heat energy in a diffusive manner as given
|
||||
by Fourier's law
|
||||
|
||||
J = -kappa grad(T)
|
||||
.. math::
|
||||
|
||||
where J is the heat flux in units of energy per area per time and
|
||||
grad(T) is the spatial gradient of temperature. The thermal
|
||||
J = -\kappa \cdot \text{grad}(T)
|
||||
|
||||
where :math:`J` is the heat flux in units of energy per area per time and
|
||||
:math:`\text{grad}(T)` is the spatial gradient of temperature. The thermal
|
||||
conductivity thus has units of energy per distance per time per degree
|
||||
K and is often approximated as an isotropic quantity, i.e. as a
|
||||
scalar.
|
||||
@ -49,7 +51,7 @@ details.
|
||||
|
||||
The fourth method is based on the Green-Kubo (GK) formula which
|
||||
relates the ensemble average of the auto-correlation of the heat flux
|
||||
to kappa. The heat flux can be calculated from the fluctuations of
|
||||
to :math:`\kappa`. The heat flux can be calculated from the fluctuations of
|
||||
per-atom potential and kinetic energies and per-atom stress tensor in
|
||||
a steady-state equilibrated simulation. This is in contrast to the
|
||||
two preceding non-equilibrium methods, where energy flows continuously
|
||||
|
||||
@ -341,7 +341,12 @@ data files and obtain a list of dictionaries.
|
||||
|
||||
.. code-block::
|
||||
|
||||
[{'timestep': 0, 'pe': -6.773368053259247, 'ke': 4.498875000000003}, {'timestep': 50, 'pe': -4.80824944183232, 'ke': 2.5257981827119798}, {'timestep': 100, 'pe': -4.787560887558151, 'ke': 2.5062598821985103}, {'timestep': 150, 'pe': -4.747103368600548, 'ke': 2.46609592554545}, {'timestep': 200, 'pe': -4.750905285854413, 'ke': 2.4701136792591694}, {'timestep': 250, 'pe': -4.777432735632181, 'ke': 2.4962152903997175}]
|
||||
[{'timestep': 0, 'pe': -6.773368053259247, 'ke': 4.498875000000003},
|
||||
{'timestep': 50, 'pe': -4.80824944183232, 'ke': 2.5257981827119798},
|
||||
{'timestep': 100, 'pe': -4.787560887558151, 'ke': 2.5062598821985103},
|
||||
{'timestep': 150, 'pe': -4.747103368600548, 'ke': 2.46609592554545},
|
||||
{'timestep': 200, 'pe': -4.750905285854413, 'ke': 2.4701136792591694},
|
||||
{'timestep': 250, 'pe': -4.777432735632181, 'ke': 2.4962152903997175}]
|
||||
|
||||
Line Delimited JSON (LD-JSON)
|
||||
-----------------------------
|
||||
@ -352,7 +357,8 @@ Each line represents one JSON object.
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix extra all print 50 """{"timestep": $(step), "pe": $(pe), "ke": $(ke)}""" title "" file output.json screen no
|
||||
fix extra all print 50 """{"timestep": $(step), "pe": $(pe), "ke": $(ke)}""" &
|
||||
title "" file output.json screen no
|
||||
|
||||
.. code-block:: json
|
||||
:caption: output.json
|
||||
|
||||
@ -1,22 +1,24 @@
|
||||
Calculate viscosity
|
||||
===================
|
||||
|
||||
The shear viscosity eta of a fluid can be measured in at least 6 ways
|
||||
using various options in LAMMPS. See the examples/VISCOSITY directory
|
||||
The shear viscosity :math:`\eta` of a fluid can be measured in at least 6 ways
|
||||
using various options in LAMMPS. See the ``examples/VISCOSITY`` directory
|
||||
for scripts that implement the 5 methods discussed here for a simple
|
||||
Lennard-Jones fluid model and 1 method for SPC/E water model.
|
||||
Also, see the :doc:`page on calculating thermal conductivity <Howto_kappa>`
|
||||
for an analogous discussion for thermal conductivity.
|
||||
|
||||
Eta is a measure of the propensity of a fluid to transmit momentum in
|
||||
:math:`\eta` is a measure of the propensity of a fluid to transmit momentum in
|
||||
a direction perpendicular to the direction of velocity or momentum
|
||||
flow. Alternatively it is the resistance the fluid has to being
|
||||
sheared. It is given by
|
||||
|
||||
J = -eta grad(Vstream)
|
||||
.. math::
|
||||
|
||||
where J is the momentum flux in units of momentum per area per time.
|
||||
and grad(Vstream) is the spatial gradient of the velocity of the fluid
|
||||
J = -\eta \cdot \text{grad}(V_{\text{stream}})
|
||||
|
||||
where :math:`J` is the momentum flux in units of momentum per area per time.
|
||||
and :math:`\text{grad}(V_{\text{stream}})` is the spatial gradient of the velocity of the fluid
|
||||
moving in another direction, normal to the area through which the
|
||||
momentum flows. Viscosity thus has units of pressure-time.
|
||||
|
||||
@ -38,11 +40,11 @@ velocity to prevent the fluid from heating up.
|
||||
|
||||
In both cases, the velocity profile setup in the fluid by this
|
||||
procedure can be monitored by the :doc:`fix ave/chunk <fix_ave_chunk>`
|
||||
command, which determines grad(Vstream) in the equation above.
|
||||
E.g. the derivative in the y-direction of the Vx component of fluid
|
||||
motion or grad(Vstream) = dVx/dy. The Pxy off-diagonal component of
|
||||
command, which determines :math:`\text{grad}(V_{\text{stream}})` in the equation above.
|
||||
E.g. the derivative in the y-direction of the :math:`V_x` component of fluid
|
||||
motion or :math:`\text{grad}(V_{\text{stream}}) = \frac{\text{d} V_x}{\text{d} y}`. The :math:`P_{xy}` off-diagonal component of
|
||||
the pressure or stress tensor, as calculated by the :doc:`compute pressure <compute_pressure>` command, can also be monitored, which
|
||||
is the J term in the equation above. See the :doc:`Howto nemd <Howto_nemd>` page for details on NEMD simulations.
|
||||
is the :math:`J` term in the equation above. See the :doc:`Howto nemd <Howto_nemd>` page for details on NEMD simulations.
|
||||
|
||||
The third method is to perform a reverse non-equilibrium MD simulation
|
||||
using the :doc:`fix viscosity <fix_viscosity>` command which implements
|
||||
@ -55,7 +57,7 @@ See the :doc:`fix viscosity <fix_viscosity>` command for details.
|
||||
|
||||
The fourth method is based on the Green-Kubo (GK) formula which
|
||||
relates the ensemble average of the auto-correlation of the
|
||||
stress/pressure tensor to eta. This can be done in a fully
|
||||
stress/pressure tensor to :math:`\eta`. This can be done in a fully
|
||||
equilibrated simulation which is in contrast to the two preceding
|
||||
non-equilibrium methods, where momentum flows continuously through the
|
||||
simulation box.
|
||||
|
||||
Reference in New Issue
Block a user