-
Notifications
You must be signed in to change notification settings - Fork 77
/
fix_temp_rescale.html
148 lines (131 loc) · 5.37 KB
/
fix_temp_rescale.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<HTML>
<CENTER><A HREF = "http://sparta.sandia.gov">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/rescale command
</H3>
<H3>fix temp/rescale/kk command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID temp/rescale N Tstart Tstop keyword value ...
</PRE>
<UL><LI>ID is documented in <A HREF = "fix.html">fix</A> command
<LI>temp/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>zero or more keyword/args pairs may be appended
<LI>keyword = <I>ave</I>
<PRE> ave values = <I>yes</I> or <I>no</I>
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 temp/rescale 100 300.0 300.0
fix 5 temp/rescale 10 300.0 10.0 ave yes
</PRE>
<P><B>Description:</B>
</P>
<P>Reset the thermal temperature of all the particles within each grid
cell by explicitly rescaling their thermal velocities. This is a
simple thermostatting operation to keep the thermal 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 thermal temperature of the system to heat or cool 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
(Ttarget) is a ramped value between the Tstart and Tstop temperatures
at the beginning and end of the run.
</P>
<P>This fix performs thermostatting on a per grid cell basis. For each
grid cell, the center-of-mass velocity and thermal temperature of the
particles in the grid cell is computed. The thermal temperature is
defined as the kinetic temperature after any center-of-mass motion
(e.g. a flow velocity) is subtracted from the collection of particles
in the grid cell. These are the same calculations as are performed by
the <A HREF = "compute_thermal_grid.html">compute thermal/grid</A> command. See its
doc page for the equations. See the <A HREF = "fix_temp_globalrescale.html">fix
temp/global/rescale</A> doc page for a
command that thermostats the temperature of the global system.
</P>
<P>How the rescaling of particle velocities is done depends on the value
of the <I>ave</I> keyword.
</P>
<P>For <I>ave</I> with a value <I>no</I> (the default), the thermal temperature
(Tthermal) of each cell is used to compute a velocity scale factor for
that cell, which is
</P>
<PRE>vscale = sqrt(Ttarget/Tthermal)
</PRE>
<P>The vscale factor is applied to each of the components of the thermal
velocity for each particle in the grid cell. Only cells with 2 or
more particles have their particle velocities rescaled.
</P>
<P>For <I>ave</I> with a value <I>yes</I>, the thermal temperatures of all the
cells are averaged. The average thermal temperature is simply the sum
of cell thermal temperatures divided by the number of cells. Cells
with less than 2 particles or whose thermal temperature = 0.0
contribute a thermal temperaure = Ttarget to the average. The average
thermal temperature (Tthermal_ave) for all cells is used to compute a
velocity scale factor for all cells, which is
</P>
<PRE>vscale = sqrt(Ttarget/Tthermal_ave)
</PRE>
<P>This single vscale factor is applied to each of the components of the
thermal velocity for each particle in all the grid cells, including
the particles in single-particle cells.
</P>
<P>After rescaling, for either <I>ave</I> = <I>no</I> or <I>yes</I>, if the thermal
temperature were re-computed for any grid cell with more than one
particle, it would be exactly the target temperature.
</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>Styles with a <I>kk</I> suffix are functionally the same as the
corresponding style without the suffix. They have been optimized to
run faster, depending on your available hardware, as discussed in the
<A HREF = "Section_accelerate.html">Accelerating SPARTA</A> section of the manual.
The accelerated styles take the same arguments and should produce the
same results, except for different random number, round-off and
precision issues.
</P>
<P>These accelerated styles are part of the KOKKOS package. They are only
enabled if SPARTA was built with that package. See the <A HREF = "Section_start.html#start_3">Making
SPARTA</A> section for more info.
</P>
<P>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <A HREF = "Section_start.html#start_6">-suffix command-line
switch</A> when you invoke SPARTA, or you can
use the <A HREF = "suffix.html">suffix</A> command in your input script.
</P>
<P>See the <A HREF = "Section_accelerate.html">Accelerating SPARTA</A> section of the
manual for more instructions on how to use the accelerated styles
effectively.
</P>
<HR>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_temp_global_rescale.html">fix temp/global/rescale</A>
</P>
<P><B>Default:</B>
</P>
<P>The default is ave = no.
</P>
</HTML>