2008-05-15 05:40:02 +08:00
|
|
|
<HTML>
|
|
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
|
|
</CENTER>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H3>fix thermal/conductivity command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>fix ID group-ID thermal/conductivity N edim Nbin keyword value ...
|
|
|
|
</PRE>
|
|
|
|
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
|
|
|
|
|
|
|
<LI>thermal/conductivity = style name of this fix command
|
|
|
|
|
|
|
|
<LI>N = perform kinetic energy exchange every N steps
|
|
|
|
|
|
|
|
<LI>edim = <I>x</I> or <I>y</I> or <I>z</I> = direction of kinetic energy transfer
|
|
|
|
|
2008-06-25 07:22:45 +08:00
|
|
|
<LI>Nbin = # of layers in edim direction (must be even number)
|
2008-05-15 05:40:02 +08:00
|
|
|
|
|
|
|
<LI>zero or more keyword/value pairs may be appended
|
|
|
|
|
|
|
|
<LI>keyword = <I>swap</I>
|
|
|
|
|
|
|
|
<PRE> <I>swap</I> value = Nswap = number of swaps to perform every N steps
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>fix 1 all thermal/conductivity 100 z 20
|
|
|
|
fix 1 all thermal/conductivity 50 z 20 swap 2
|
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
|
|
|
<P>Use the Muller-Plathe algorithm described in <A HREF = "#Muller-Plathe">this
|
|
|
|
paper</A> to exchange kinetic energy between two particles
|
|
|
|
in different regions of the simulation box every N steps. This
|
|
|
|
induces a temperature gradient in the system. As described below this
|
2014-05-02 23:34:15 +08:00
|
|
|
enables the thermal conductivity of a material to be calculated. This
|
2008-05-15 05:40:02 +08:00
|
|
|
algorithm is sometimes called a reverse non-equilibrium MD (reverse
|
|
|
|
NEMD) approach to computing thermal conductivity. This is because the
|
|
|
|
usual NEMD approach is to impose a temperature gradient on the system
|
|
|
|
and measure the response as the resulting heat flux. In the
|
|
|
|
Muller-Plathe method, the heat flux is imposed, and the temperature
|
|
|
|
gradient is the system's response.
|
|
|
|
</P>
|
2009-07-03 00:40:58 +08:00
|
|
|
<P>See the <A HREF = "compute_heat_flux.html">compute heat/flux</A> command for details
|
|
|
|
on how to compute thermal conductivity in an alternate way, via the
|
|
|
|
Green-Kubo formalism.
|
|
|
|
</P>
|
2008-05-15 05:40:02 +08:00
|
|
|
<P>The simulation box is divided into <I>Nbin</I> layers in the <I>edim</I>
|
2008-06-25 07:22:45 +08:00
|
|
|
direction, where the layer 1 is at the low end of that dimension and
|
|
|
|
the layer <I>Nbin</I> is at the high end. Every N steps, Nswap pairs of
|
|
|
|
atoms are chosen in the following manner. Only atoms in the fix group
|
|
|
|
are considered. The hottest Nswap atoms in layer 1 are selected.
|
|
|
|
Similarly, the coldest Nswap atoms in the "middle" layer (see below)
|
|
|
|
are selected. The two sets of Nswap atoms are paired up and their
|
|
|
|
velocities are exchanged. This effectively swaps their kinetic
|
|
|
|
energies, assuming their masses are the same. Over time, this induces
|
|
|
|
a temperature gradient in the system which can be measured using
|
|
|
|
commands such as the following, which writes the temperature profile
|
|
|
|
(assuming z = edim) to the file tmp.profile:
|
2008-05-15 05:40:02 +08:00
|
|
|
</P>
|
|
|
|
<PRE>compute ke all ke/atom
|
2010-05-24 22:45:47 +08:00
|
|
|
variable temp atom c_ke/1.5
|
2008-05-15 05:40:02 +08:00
|
|
|
fix 3 all ave/spatial 10 100 1000 z lower 0.05 v_temp &
|
|
|
|
file tmp.profile units reduced
|
|
|
|
</PRE>
|
|
|
|
<P>Note that by default, Nswap = 1, though this can be changed by the
|
|
|
|
optional <I>swap</I> keyword. Setting this parameter appropriately, in
|
|
|
|
conjunction with the swap rate N, allows the heat flux to be adjusted
|
|
|
|
across a wide range of values, and the kinetic energy to be exchanged
|
|
|
|
in large chunks or more smoothly.
|
|
|
|
</P>
|
2008-06-25 07:22:45 +08:00
|
|
|
<P>The "middle" layer for velocity swapping is defined as the <I>Nbin</I>/2 +
|
|
|
|
1 layer. Thus if <I>Nbin</I> = 20, the two swapping layers are 1 and 11.
|
|
|
|
This should lead to a symmetric temperature profile since the two
|
|
|
|
layers are separated by the same distance in both directions in a
|
|
|
|
periodic sense. This is why <I>Nbin</I> is restricted to being an even
|
|
|
|
number.
|
|
|
|
</P>
|
2008-05-15 05:40:02 +08:00
|
|
|
<P>As described below, the total kinetic energy transferred by these
|
|
|
|
swaps is computed by the fix and can be output. Dividing this
|
|
|
|
quantity by time and the cross-sectional area of the simulation box
|
|
|
|
yields a heat flux. The ratio of heat flux to the slope of the
|
2012-11-15 00:08:42 +08:00
|
|
|
temperature profile is proportional to the thermal conductivity of the
|
|
|
|
fluid, in appropriate units. See the <A HREF = "#Muller-Plathe">Muller-Plathe
|
|
|
|
paper</A> for details.
|
|
|
|
</P>
|
|
|
|
<P>IMPORTANT NOTE: If your system is periodic in the direction of the
|
|
|
|
heat flux, then the flux is going in 2 directions. This means the
|
|
|
|
effective heat flux in one direction is reduced by a factor of 2. You
|
|
|
|
will see this in the equations for thermal conductivity (kappa) in the
|
|
|
|
Muller-Plathe paper. LAMMPS is simply tallying kinetic energy which
|
|
|
|
does not account for whether or not your system is periodic; you must
|
|
|
|
use the value appropriately to yield a kappa for your system.
|
2008-05-15 05:40:02 +08:00
|
|
|
</P>
|
|
|
|
<P>IMPORTANT NOTE: After equilibration, if the temperature gradient you
|
|
|
|
observe is not linear, then you are likely swapping energy too
|
|
|
|
frequently and are not in a regime of linear response. In this case
|
|
|
|
you cannot accurately infer a thermal conductivity and should try
|
|
|
|
increasing the Nevery parameter.
|
|
|
|
</P>
|
|
|
|
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
|
|
|
|
</P>
|
|
|
|
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
|
|
|
|
files</A>. None of the <A HREF = "fix_modify.html">fix_modify</A> options
|
|
|
|
are relevant to this fix.
|
|
|
|
</P>
|
2010-04-03 00:51:06 +08:00
|
|
|
<P>This fix computes a global scalar which can be accessed by various
|
2011-08-26 01:01:01 +08:00
|
|
|
<A HREF = "Section_howto.html#howto_15">output commands</A>. The scalar is the
|
2010-04-03 00:51:06 +08:00
|
|
|
cummulative kinetic energy transferred between the bottom and middle
|
|
|
|
of the simulation box (in the <I>edim</I> direction) is stored as a scalar
|
|
|
|
quantity by this fix. This quantity is zeroed when the fix is defined
|
|
|
|
and accumlates thereafter, once every N steps. The units of the
|
|
|
|
quantity are energy; see the <A HREF = "units.html">units</A> command for details.
|
|
|
|
The scalar value calculated by this fix is "intensive".
|
2008-05-15 05:40:02 +08:00
|
|
|
</P>
|
|
|
|
<P>No parameter of this fix can be used with the <I>start/stop</I> keywords of
|
|
|
|
the <A HREF = "run.html">run</A> command. This fix is not invoked during <A HREF = "minimize.html">energy
|
|
|
|
minimization</A>.
|
|
|
|
</P>
|
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
2013-07-26 06:38:11 +08:00
|
|
|
<P>This fix is part of the MISC package. It is only enabled if LAMMPS
|
|
|
|
was built with that package. See the <A HREF = "Section_start.html#start_3">Making
|
|
|
|
LAMMPS</A> section for more info.
|
|
|
|
</P>
|
2010-07-16 08:14:20 +08:00
|
|
|
<P>Swaps conserve both momentum and kinetic energy, even if the masses of
|
|
|
|
the swapped atoms are not equal. Thus you should not need to
|
|
|
|
thermostat the system. If you do use a thermostat, you may want to
|
|
|
|
apply it only to the non-swapped dimensions (other than <I>vdim</I>).
|
2008-05-15 05:40:02 +08:00
|
|
|
</P>
|
|
|
|
<P>LAMMPS does not check, but you should not use this fix to swap the
|
|
|
|
kinetic energy of atoms that are in constrained molecules, e.g. via
|
|
|
|
<A HREF = "fix_shake.html">fix shake</A> or <A HREF = "fix_rigid.html">fix rigid</A>. This is
|
|
|
|
because application of the constraints will alter the amount of
|
|
|
|
transferred momentum. You should, however, be able to use flexible
|
|
|
|
molecules. See the <A HREF = "#Zhang">Zhang paper</A> for a discussion and results
|
|
|
|
of this idea.
|
|
|
|
</P>
|
|
|
|
<P>When running a simulation with large, massive particles or molecules
|
|
|
|
in a background solvent, you may want to only exchange kinetic energy
|
|
|
|
bewteen solvent particles.
|
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
2008-05-15 05:40:50 +08:00
|
|
|
<P><A HREF = "fix_ave_spatial.html">fix ave/spatial</A>, <A HREF = "fix_viscosity.html">fix
|
2009-07-03 00:40:58 +08:00
|
|
|
viscosity</A>, <A HREF = "compute_heat_flux.html">compute
|
|
|
|
heat/flux</A>
|
2008-05-15 05:40:02 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Default:</B>
|
|
|
|
</P>
|
|
|
|
<P>The option defaults are swap = 1.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<A NAME = "Muller-Plathe"></A>
|
|
|
|
|
2010-12-24 02:44:17 +08:00
|
|
|
<P><B>(Muller-Plathe)</B> Muller-Plathe, J Chem Phys, 106, 6082 (1997).
|
2008-05-15 05:40:02 +08:00
|
|
|
</P>
|
|
|
|
<A NAME = "Zhang"></A>
|
|
|
|
|
|
|
|
<P><B>(Zhang)</B> Zhang, Lussetti, de Souza, Muller-Plathe, J Phys Chem B,
|
|
|
|
109, 15060-15067 (2005).
|
|
|
|
</P>
|
|
|
|
</HTML>
|