next up previous contents
Next: Acknowledgments Up: User's Guide Previous: Installation   Contents

Usage

The example given in the rfgtest.f file illustrates setting up and usage of the RFG routine. Even though the RFG routines are written in C-language, the example was prepared in Fortran to illustrate how to use RFG together with Fortran-based codes.

It can be seen from the example that the external data supplied by the user include the spectral sample size, $nspec$, the velocity correlation tensor, as well as the turbulence time-scale, which can be given as functions of space and time. The $genspec$ routine serves as an initializer and should only be called once. After that the $genvec$ routine can be called many times for different $x,t$ coordinates and it will return the values of a random vector for each $x,t$ pair.

Increasing the value of the parameter nspec (the argument of the genspec function) will increase the spectral resolution of the algorithm and decrease the speed of execution. Thus, this value should be selected as a trade-off between the two. For debugging purposes a value of 10 can be reasonable, while for production runs the value of 100 or higher may be appropriate.


next up previous contents
Next: Acknowledgments Up: User's Guide Previous: Installation   Contents
2004-08-27