Download FARGO3D User Guide
Transcript
FARGO3D User Guide, Release 1.1 12.6 Datacubes All primitive variables (density, velocity components, internal energy density (or sound speed for isothermal setups), and magnetic field components (for MHD setups) are written every NINTERM steps of length DT (each of those being sliced in as many timesteps as required by the CFL condition). In addition, some selected arrays can be written every NSNAP steps of length DT. These arrays names are controlled by the boolean parameters WriteDensity, WriteEnergy, WriteVx, WriteVy, WriteVz, WriteBx, WriteBy, WriteBz. These allows the user either to oversample one of these fields (for an animation, for instante), or to dump to the disk only some variables (by setting NINTERM to a very large value and using NSNAP instead). Files created through the NSNAP mechanism obey the same numbering convention as those normally written. In order to avoid conflicts in filenames, the files created through NSNAP are written in the subdirectory snaps in the output directory. Besides, the runtime graphical representation with matplotlib is performed using the files created in the snaps directory. 12.7 Monitoring 12.7.1 Introduction FARGO3D, much as its predecessor FARGO, has two kinds of outputs: coarse grain outputs, in which the data cubes of primitive variables are dumped to the disk, and fine grain outputs, in which a variety of other (usually lightweight) data is written to the disk. As their names indicate, fine grain outputs are more frequent than coarse grain outputs. Note that a coarse grain output is required to restart a run. In this manual we refer to the fine grain output as monitoring. The time interval between two fine grain outputs is given by the real parameter DT. This time interval is sliced in as many smaller intervals as required to fulfill the Courant (or CFL) condition. Note that the last sub-interval may be smaller than what is allowed by the CFL condition, so that the time difference between two fine grain outputs is exactly DT. As for its predecessor FARGO, NINTERM fine grain outputs are performed for each coarse grain output, where NINTERM is an integer parameter. Fine grain outputs or monitoring may be used to get the torque onto a planet with a high temporal resolution, or it may be used to get the evolution of Maxwell’s or Reynolds’ stress tensor, or it may be used to monitor the total mass, momentum or energy of the system as a function of time, etc. The design of the monitoring functions in FARGO3D is such that a lot of flexibility is offered, and the user can in no time write new functions to monitor the data of his choice. The monitoring functions provided with the distribution can run on the GPU, and it is extremely easy to implement a new monitoring function that will run straightforwardly on the GPU, using the functions already provided as templates. 12.7.2 Flavors of monitoring The monitoring of a quantity can be done in several flavors: • scalar monitoring, in which the sum (or average) of the quantity over the whole computational domain is performed. The corresponding output is a unique, two-column file, the left column being the date and the right column being the integrated or averaged scalar. A new line is appended to this file at each fine grain output. • 1D monitoring, either in Y (i.e. radius in cylindrical or spherical coordinates) or Z (i.e. colatitude in spherical coordinates). In this case the integral or average is done over the two other dimensions only, so as to get, respectively, radial or vertical profiles in each output. Besides, the 1D monitoring comes itself in two flavors: – a raw format, for which a unique file is written, in which a row of bytes is appended at every fine grain output. This file can be readily used for instance with IDL (using openr & readu commands) or Python (using numpy’s fromfile command). For example, this allows to plot a map of the vertically and azimuthally averaged Maxwell’s tensor, as a function of time and radius. This map allows to estimate when the turbulence has reached a saturated state at all radii. In another vein, one can imagine a map of the azimuthally and radially averaged torque, which provides the averaged torque dependence on time and on z. 12.6. Datacubes 63