<HTML>
<CENTER><A HREF = "https://sparta.github.io">SPARTA WWW Site</A> - <A HREF = "Manual.html">SPARTA Documentation</A> - <A HREF = "Section_commands.html#comm">SPARTA Commands</A> 
</CENTER>






<HR>

<H3>fix temp/global/rescale command 
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID temp/global/rescale N Tstart Tstop fraction 
</PRE>
<UL><LI>ID is documented in <A HREF = "fix.html">fix</A> command
<LI>temp/global/rescale = style name of this fix command
<LI>N = thermostat every N timesteps
<LI>Tstart,Tstop = desired temperature at start/end of run (temperature units)
<LI>fraction = rescale to target temperature by this fraction 
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 temp/global/rescale 100 300.0 300.0 0.5
fix 5 temp/global/rescale 10 300.0 10.0 1.0 
</PRE>
<P><B>Description:</B>
</P>
<P>Reset the temperature of all the particles in the entire simulation by
explicitly rescaling their velocities.  This is a simple
thermostatting operation to keep the temperature of the gas near the
desired target temperature.  This can be useful if an external driving
force is adding energy to the system.  Or if you wish the heat or cool
the temperature of the system over time.
</P>
<P>The rescaling is applied to only the translational degrees of freedom
for the particles.  Their rotational or vibrational degrees of freedom
are not altered.
</P>
<P>Rescaling is performed every N timesteps. The target temperature is a
ramped value between the Tstart and Tstop temperatures at the
beginning and end of the run.
</P>
<P>From the current global temperature and the current target
temperature, a velocity scale factor is calculated.  The amount of
rescaling that is applied is adjusted by the <I>fraction</I> parameter
which is a value from 0.0 to 1.0.  difference between the actual and
desired temperature.  If <I>fraction</I> = 1.0, the temperature is reset to
exactly the desired value.  If <I>fraction</I> = 0.5, the temperature is
reset to a value halfway between the current global and target
temperatures.
</P>
<P>The rescaling factor is applied to each of the components of the
translational velocity for every particle in the simulation.
</P>
<P>Note that this fix performs thermostatting using the same formula for
temperature as calculated by the <A HREF = "compute_temp.html">compute temp</A>
command.  It does not currently subtract out a net streaming velocity
to measure a thermal temperature since it assumes the net center of
mass velocity for the entire system is zero.  An option for this may
be added in the future.  See the <A HREF = "fix_temp_rescale.html">fix
temp/rescale</A> doc page for a command that
thermostats the thermal temperature on a per-grid-cell basis.
</P>
<HR>

<P><B>Restart, output info:</B>
</P>
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
files</A>.
</P>
<P>This fix produces no output.
</P>
<P>This fix can ramp its target temperature over multiple runs, using the
start and stop keywords of the run command. See the run command for
details of how to do this.
</P>
<HR>

<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_temp_rescale.html">fix temp/rescale</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>
