next up previous
Next: Double Precision Up: Running the Program With Previous: The Adjustable Parameters


Choosing Run Parameters

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 $8$! 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 $L/N$ 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 $N=16$ or even $N=8$. 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 $dt < {dx \over \sqrt{NDIMS}}$ [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 $k^2 \vert f_k\vert^2$ vanish at large $k$ is a much more stringent requirement than requiring that $\vert f_k\vert^2$ vanish at large $k$. 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 $k$ (frequency) from $0$ to $\pi {N \over L}$ with a spacing in $k$ space of ${\pi \over L}$. So increasing N while holding L fixed increases your range in $k$ space while increasing L and N together increases your resolution in $k$ 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 $N_1=64$, $L_1=1$, $N_2=64$, $L_2=2$, $N_3=128$, $L_3=2$ then run $3$ has the same ultraviolet cutoff as run $1$ and the same infrared resolution as run $2$. If all the results of runs $1$ and $3$ look the same then you can conclude that adding infrared resolution didn't change anything and run $1$ probably had adequate resolution in Fourier space. Conversely if runs $2$ and $3$ give nearly identical results you can conclude that run $2$ 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 $10^{-6}$ 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.


next up previous
Next: Double Precision Up: Running the Program With Previous: The Adjustable Parameters

Go to The LATTICEEASY Home Page
Go to Gary Felder's Home Page
Send email to Gary Felder at gfelder@email.smith.edu
Send email to Igor Tkachev at Igor.Tkachev@cern.ch

This documentation was generated on 2008-01-21