lammps/doc/html/_sources/fix_eos_table_rx.txt

170 lines
5.4 KiB
Plaintext

.. index:: fix eos/table/rx
fix eos/table/rx command
========================
Syntax
""""""
.. parsed-literal::
fix ID group-ID eos/table/rx style file1 N keyword file2
* ID, group-ID are documented in :doc:`fix <fix>` command
* eos/table/rx = style name of this fix command
* style = *linear* = method of interpolation
* file1 = filename containing the tabulated equation of state
* N = use N values in *linear* tables
* keyword = name of table keyword correponding to table file
* file2 = filename containing the heats of formation of each species
Examples
""""""""
.. parsed-literal::
fix 1 all eos/table/rx linear eos.table 10000 KEYWORD thermo.table
Description
"""""""""""
Fix *eos/table/rx* applies a tabulated mesoparticle equation
of state to relate the concentration-dependent particle internal
energy (u_i) to the particle internal temperature (dpdTheta_i).
The concentration-dependent particle internal energy (u_i) is
computed according to the following relation:
.. image:: Eqs/fix_eos_table_rx.jpg
:align: center
where *m* is the number of species, *c_i,j* is the concentration of
species *j* in particle *i*\ , *u_j* is the internal energy of species j,
*DeltaH_f,j* is the heat of formation of species *j*\ , N is the number of
molecules represented by the coarse-grained particle, kb is the
Boltzmann constant, and T is the temperature of the system.
Fix *eos/table/rx* creates interpolation tables of length *N* from *m*
internal energy values of each species *u_j* listed in a file as a
function of internal temperature. During a simulation, these tables
are used to interpolate internal energy or temperature values as needed.
The interpolation is done with the *linear* style. For the *linear* style,
the internal temperature is used to find 2 surrounding table values from
which an internal energy is computed by linear interpolation. A secant
solver is used to determine the internal temperature from the internal energy.
The first filename specifies a file containing tabulated internal
temperature and *m* internal energy values for each species *u_j*\ .
The keyword specifies a section of the file. The format of this
file is described below.
The second filename specifies a file containing heat of formation
*DeltaH_f,j* for each species.
----------
The format of a tabulated file is as follows (without the
parenthesized comments):
.. parsed-literal::
# EOS TABLE (one or more comment or blank lines)
.. parsed-literal::
KEYWORD (keyword is first text on line)
N 500 h2 no2 n2 ... no (N parameter species1 species2 ... speciesN)
(blank)
1 1.00 0.000 ... 0.0000 (index, internal temperature, internal energy of species 1, ..., internal energy of species m)
2 1.02 0.001 ... 0.0002
...
500 10.0 0.500 ... 1.0000
A section begins with a non-blank line whose 1st character is not a
"#"; blank lines or lines starting with "#" can be used as comments
between sections. The first line begins with a keyword which
identifies the section. The line can contain additional text, but the
initial text must match the argument specified in the fix command.
The next line lists the number of table entries and the species names
that correspond with all the species listed in the reaction equations
through the *fix rx* command.
The parameter "N" is required and its value is the number of table
entries that follow. Let Nfile = "N" in the tabulated file.
What LAMMPS does is a preliminary interpolation by creating splines
using the Nfile tabulated values as nodal points.
Following a blank line, the next N lines list the tabulated values.
On each line, the 1st value is the index from 1 to N, the 2nd value is
the internal temperature (in temperature units), the 3rd value until
the *m+3* value are the internal energies of the m species (in energy units).
Note that all internal temperature and internal energy values must
increase from one line to the next.
Note that one file can contain many sections, each with a tabulated
potential. LAMMPS reads the file section by section until it finds
one that matches the specified keyword.
----------
The format of a heat of formation file is as follows (without the
parenthesized comments):
.. parsed-literal::
# HEAT OF FORMATION TABLE (one or more comment or blank lines)
.. parsed-literal::
(blank)
h2 0.00 (species name, heat of formation)
no2 0.34
n2 0.00
...
no 0.93
Note that the species can be listed in any order. The tag that is
used as the species name must correspond with the tags used to define
the reactions with the :doc:`fix rx <fix_rx>` command.
----------
Restrictions
""""""""""""
This command is part of the USER-DPD package. It is only enabled if
LAMMPS was built with that package. See the :ref:`Making LAMMPS <start_3>` section for more info.
This command also requires use of the :doc:`atom_style dpd <atom_style>`
command.
The equation of state must be a monotonically increasing function.
An error will occur if the internal temperature or internal energies
are not within the table cutoffs.
Related commands
""""""""""""""""
:doc:`fix rx <fix_rx>`,
:doc:`pair dpd/fdt <dpd_fdt>`
**Default:** none
----------
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Section_commands.html#comm