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 information, among many other files.
This section explains the output folder structure and files, and 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
βοΈ config.yaml # Full configuration for the simulation (not the original file that generated the simulations)
βοΈ info.yaml # Runtime information for the simulation
π simulation.log # Log file
π fields # Macroscopic fields exported (open these in ParaView)
π inst.{export name}.xdmf # Instantaneous export XDMF index, accumulates all time steps
πΎ inst.{export name}.{chunk}.hdf # Rolling HDF5 data backing the instantaneous index
π stats.{export name}.xdmf # Statistics export XDMF index, accumulates all time steps
πΎ stats.{export name}.{chunk}.hdf # Rolling HDF5 data backing the statistics index
π probes # Probes exported, flat with a {series}.{type}.{probe} prefix
π {series name}.line.{line name}.xdmf # Historic line series, one entry per type (line, bodies, csvs, points, planes)
πΎ {series name}.line.{line name}.h5 # Time series data for the line series
π {series name}.line.{line name}.points.csv # Series points, positions after all transformations
π {series name}.bodies.{body name}.xdmf # Body probe series
π {series name}.points.{point name}.xdmf # Point probe series
π {series name}.csvs.{csv name}.xdmf # CSV probe series
π monitors # Field monitors exported
π {monitor name}.{macr_name}.csv # Monitor time series
πΌοΈ {monitor name}.{macr_name}.plot.png # Monitor plot
π geometry # Geometry: IBM bodies and point clouds
π {system} # Output system folder (domain.default_system, lbm by default)
π§ {body name}.stl # Body STL written in this output system
π body.{body name}.nodes.xdmf # IBM node positions and exported values (point cloud per body)
πΎ body.{body name}.nodes.{chunk}.hdf # Rolling HDF5 data backing the IBM node point cloud
π pcloud.{cloud name}.pos.csv # Point cloud positions
π pcloud.{cloud name}.nodes.xdmf # Point cloud node values
πΎ pcloud.{cloud name}.nodes.{chunk}.hdf # Rolling HDF5 data backing the point cloud
π mesh # Computational grid artifacts (user-inspectable)
π§± blocks.lbm.obj # Domain refinement blocks in the base lattice frame, for visualization
π§± blocks.{system}.obj # Refinement blocks rescaled into each declared output coordinate system
π wall_normals.xdmf # Continuous wall-normal map (when a predicate BC region wrote it)
π checkpoint # Checkpoints saved during simulation, can be used to restart at a given step
π {time_step}
π macrs.xdmf # Macroscopics required to restart (rho, u, S, omega_LES)
πΎ macrs.000.h5 # HDF5 data backing the checkpoint macroscopics
ποΈ state.json # Probes plus solver state to restart
π simulation.log # Copy of the log to restart
βοΈ config.yaml # Copy of the config to restart
π _setup # Solver machinery, never opened interactively
π code_generated # Each program generated for runtime and its compile log
π§ {program name}.cu # Generated CUDA source
π {program name}.cu.compile.log # Compile log for the generated source
π SEM # Synthetic eddy method state
π profile.{name}.stats # Profiling data
Note
The output layout is flat, which makes results easy to open and manage in ParaView.
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 mesh/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 .xdmf 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 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 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 .xdmf 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 information.
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 = "validation/wind_engineering/02_flow_over_wall_mounted_cube/02_flow_over_mounted_cube.nassu.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.