Stat converstion

In order to produce 1D statistics, the easiest procedure is to modify the Statistics section of your input file from

! Statistics
Statistics type :               2D
Statistics frequency :          5.0e-6


! Statistics
Statistics type :               1D-x 2D
Statistics frequency :          5.0e-6
Statistics locations y:         0.0

where 1D-x (statistics along the x-direction) can be replaced with 1D-y (statistics along y-direction). Similarly, Statistics locations y: can be replaced with Statistics locations x:. The parameters to this field indicate the desired locations to sample data at (multiple locations should be separated with a space).

If you are investigating an existing simulation that only has a stat-2D file, then you will need to use the following procedure:

  1. cd to the bin/ directory of the [wiki:NGA] code that your simulation uses. For example, cd /home/muellerm/NGA/bin/


    cd /home/muellerm/NGA-ctrfl/bin/
  1. Run the statdata2plot3d executable by typing ./statdata2plot3da. Enter the location of the stat-2D file of your simulation. For example, stat file: /scratch/gpfs/muellerm/adelaide/flame_1/stat/stat-2D b. Enter the location where you want to save the generated datadata.nam, and data.res files: PLOT3D directory : /scratch/gpfs/muellerm/adelaide/flame_1/stat
  2. Run the statconfig2plot3d executable by typing ./statconfig2plot3da. Enter the location of the config file of your simulation. For example, config file : /scratch/gpfs/muellerm/adelaide/flame_1/config b. Enter the location where you want to save the generated grid file: PLOT3D directory : /scratch/gpfs/muellerm/adelaide/flame_1/stat
  3. Run [wiki:Ensight] in client-server modea. File -> Open and change the “File type:” option to “All files(*)”. Click on the “Advanced interface” radio button and select data.res.b. While still in the Open... menu, set the “Set geometry” field to the path to the grid file (should be the PLOT3D directory): /scratch/gpfs/muellerm/adelaide/flame_1/stat/grid c. Click on “Load all parts”
  4. With [wiki:Ensight] open, click on your geometry and select the Color/transparency tool. Color your geometry with the desired scalar.
  5. Create -> Clips to create a clip plane at the location where you want to sample your scalar along. Your clip plane should be perpendicular to your geometry (the “Mesh slice” option will most likely be “Y”). In the current example, set “Mesh Slice” to “Y” and click on “<” until “Value” is 8.692666e-05, the minimum “Y” slice value.
  6. Right-click on the very thin light-blue rectangle that has appeared in your geometry and select “Query”. Then select the desired scalar to query the clip plane for. A plot of the scalar versus distance will appear in the main viewport.
  7. To save your query along the clip plane to a stat-1D file, click on the “Plots/queries” tab in the bottom left of your screen. Under “Queries”, right-click on the desired scalar and select Data -> Save CSV to file or Data -> Save XY to file. Note that you can save multiple scalars at once to a file.