The values you set for the parameters described above will of course
depend on the physical features of your model, the information you are
interested in, and the amount of computing power available to you. For
example, increasing the number of grid points N while
holding the box size L constant will result in better
coverage of short-wavelength excitations, but it will also increase
the time and memory requirements of your run. Remember that for a three dimensional run doubling N increases the duration and size in memory of your run by a factor of ! Because of the Fourier transform routines used N must always be a power of two.
The first and most important guide in choosing parameters should be
your understanding of the physics of your model. Try to figure out the
typical wavelengths of fluctuations that you expect to be excited and
make sure those wavelengths are comfortably in between the grid
spacing and box size L of your run. Make sure
dt is smaller than the smallest important characteristic
period of your problem.
Once you've done that, the rest becomes a process of trial and
error. If you set the time step too large then you will probably get
exponentially growing solutions. Try a run with a moderately large
time step and see what happens, and then try incrementally decreasing
it until you get a sense of how small you have to make it. Of course
you don't want to take the largest value of dt that
doesn't lead to disaster! Rather you want to keep decreasing the time
step until you are satisfied that the results of your run are not
changing significantly in response to those decreases. You should do
this initial trial and error on a very small grid like or even
. Of course you will want to check again that the time step you
pick is still working well with a larger grid, but in our experience
the appropriate value of the time step is generally about the same for
different size grids, so you can save yourself a lot of time by doing
most of the trial and error with very quick runs.
Note that if you make the time step too large you will violate the
Courant stability condition
[3], in
which case the program will simply print a warning and exit.
A good way to test for appropriate values of N and
L is to look at spectra. Hopefully the spectra of your
fields will vanish in the ultraviolet once the interactions become
strong. If not that may be a sign that you are missing significant
physics because of your ultraviolet cutoff and you should either
decrease L or increase N. One problem with
this test is figuring out which spectrum contains the interesting
physics for your problem. Requiring that
vanish
at large
is a much more stringent requirement than requiring that
vanish at large
. Here you will have to be
guided by the relevant physics for your model.
Remember when choosing N and L that your box
in position space is equivalent to an array in frequency space
(via a Fourier transform). Specifically, the array covers values of
(frequency) from
to
with a spacing in
space of
. So increasing N while holding
L fixed increases your range in
space while
increasing L and N together increases your
resolution in
space. These facts suggest another powerful, but
time-consuming test. You can do a series of runs with different values
of N and L and compare all the kinds of
output for the run. For example, if you do three runs with
,
,
,
,
,
then run
has the
same ultraviolet cutoff as run
and the same infrared resolution as
run
. If all the results of runs
and
look the same then you
can conclude that adding infrared resolution didn't change anything
and run
probably had adequate resolution in Fourier
space. Conversely if runs
and
give nearly identical results
you can conclude that run
probably had adequate coverage of
ultraviolet modes. By doing a series of tests like this you can figure
out what ultraviolet range and infrared resolution is physically
important for your problem and make sure you are sampling it
adequately. Of course this method isn't infallible. In the example
above, if the relevant physics is happening at wavelengths of
then none of your runs will see it and you won't know about
it. But if you already expect on physical grounds that you are in the
right ballpark then this method can be a good test.