Post Processing#
After running a simulation, multiple artifacts are generated from it.
These include macroscopics fields exported during simulation, .stl
files representing the geometries in the domain, log messages, runtime informations, among many other files.
In this section the output folder structure and files will be explained, as how to interact with them.
Output structure#
Each simulation is saved in the folder <save_path>/<simulation_name>/<sim_id>/
.
This folder is structured as
π save_path/simulation_name/sim_id
π checkpoints
# Checkpoints saved during simulation, can be used to restart at given step
π {time_step}
# Macroscopics in the given time step required to restart simulation (rho, u, S, omega_LES)
π macrs
π {file identifier}.vti
π macrs.vtm
# Copy of the simulation's probes folder
π probes
...
# Simulation state required to restart simulation
π state.json
# Copy of current log
π simulation.log
# Copy of configuration from simulation
π config.yaml
π bodies
π lnas
# .lnas is the original file, and transformed
# is after all transformations applied
π {body name}.lnas
π {body name}.transformed.lnas
π nodes
# Folder for each body, with the IBM nodes positions and their
# values exports through simulation
π {body_name}
π nodes.csv
π {time step export}.csv
π stls
# STL files for all geometries, after all transformations
π {body name}.stl
# STL rescaled to `domain_rescale` scale
π {body name}.rescaled.stl
π code_generated
# Each program generated for runtime and its compile log
π {program name}.cu
π {program name}.cu.compile.log
# Macroscopics fields exported
π macrs
π instantaneous
# Each instantaneous key for export has a folder of its own
π {export name}
# Each time step export has a .vtm file and a folder
# with the .vti files used by the .vtm
π macrs_{time_step}
π {file identifier}.vti
π macrs_{time step}.vtm
π stats
# Each statistics key for export has a folder of its own
π {export name}
# Each time step export has a .vtm file and a folder
# with the .vti files used by the .vtm
π macrs_{time_step}
π {file identifier}.vti
π macrs_{time step}.vtm
# Monitors exported
π monitors
π fields
π {monitor name}.{macr_name}.csv
π {monitor name}.{macr_name}.plot.png
π multiblock
# File to visualize domain refinement
π blocks.obj
# Probes exported
π probes
π hist_series
π {series name}
# Files for each type, lines, bodies, csvs, points, etc.
# Each one with .csv for the points of the
# series and a HDF with time series data for each macroscopics
# The points position are the ones after all transformations
π line.{line name}.{macr_name}.h5
π line.{line name}.points.csv
π bodies.{body name}.{macr_name}.h5
π bodies.{body name}.points.csv
π points.{point name}.{macr_name}.h5
π points.{point name}.points.csv
π csvs.{csv name}.{macr_name}.h5
π csvs.{csv name}.points.csv
π spectrum
π {spectrum name}
# HDF file with the time series values
π {spectrum name}.data.h5
# Point position in the domain
π {spectrum name}.points.csv
# Full configuration for simulation
# (not the same as the original configuration file that generated the simulations)
π config.yaml
# Runtime informations for simulation
π info.yaml
# Log file
π simulation.log
Series indexing#
There are some specific rules to the historic series indexing that itβs very important to understand to operate with it.
The points are generated using the specification of the generator, then the points outside the domain are filtered out.
The idx
field of the points are generated using as reference the initial points (the ones not filtered out).
So, for example, if the first two points of a line are out of the domain, the first index of the points.csv
will be 2.
This is important for when youβre combining the idx
of this with other sources of information, such as the LNAS vertices or triangles.
Domain overview#
To have an overview of the domain setup, we recommend using ParaView. It supports all our file extensions and have extensive funcionalities for visualization, process and many other resources.
Below is an example of domain visualization using the multiblock/blocks.obj
and the geometry files of the bodies.

Visualization of domain refinement and positioned bodies#
Itβs also possible to view the points of series in the domain, converting the csv table to points in space

Visualization of points position from historic series#
Macroscopics Fields#
Check the state of the macroscopics fields, such as density or velocity, is a must step to check the quality of a simulation.
We also recommend ParaView for this.
The macroscopic field can be either exported for instantaneous and statistical values of the macroscopic variables rho, u, S, omega_LES
.
The resulting .vtm
can be further post processed with Paraview using the calculator tool, as demonstrated below for a statistics field:

Post processing of macroscopic fields with Paraview#
In the example above, the the calculator filter from Paraview is used for the calculation of turbulent intensity \(I_{u}\) from averaged fields of velocity and squared velocity sqrt(ux_2nd-(ux^2))/ux
.
Another frequently performed calculation is to transform the velocity components into a vector, which can be done with iHat*ux + jHat*uy + kHat*uz
.
Being a Python based software, Paraview allows the user to apply any of its filters through scripts.
This allows the user to write post processing routines that can be performed in any .vtm
files that contain the same variable names.
API interaction#
All these files and paths can be accessed through an internal API as well. In this way a program can access the full path of files such as the historic series data or points, macroscopics instataneous path, the .obj file with blocks visualization, and other informations.
Below is a code snippet demonstrating how to use it.
import pathlib
from nassu.cfg.model import ConfigScheme
from nassu.cfg.schemes.simul import SimulationConfigs, SimulationOutput
filename = "tests/validation/cases/08_flow_over_mounted_cube.yaml"
sim_cfgs = ConfigScheme.from_file(pathlib.Path(filename)).load_sim_cfgs()
sim_cfg = sim_cfgs[0]
sim_output: SimulationOutput = sim_cfg.output
cube_stl_path = sim_output.bodies["cube"].stl # Path for stl output file of cube
full_info = sim_output.read_info() # reads info.yaml
To know more about this interface and how to interact with it, check the class nassu.cfg.schemes.simul.SimulationOutput
.