Postprocessor
In AMPHIBIOUS, postproc is responsible for converting the output (snapshots of flow fields, and accumulated statistics) created at run time by solver into usable data. It can be extended to compute project-specific quantities on a case-by-case basis.
Parallel execution is supported on CPUs only: since the computational demand of postproc is limited, parallelism is only required to access large quantities of memory.
postproc works with the same logic of solver (indeed, it USEs the same io.cpl to carry out most of its input-output operations), and creates VTK legacy files for visualization.
Currently, both rectilinear and unstructured VTK formats are supported.
As for other parts of the program, postproc has a dedicated POSTPROC section in settings.in, where its output can be configured.
Currently, one can set the vtkFileType to r (rectilinear) or u (unstructured), and choose whether to convert to VTK the binary files with statistics, and/or the binary files of the entire snapshots database.
| Name | Values | Description |
|---|---|---|
genStatsVTK |
YES/NO |
Whether statistics are converted to VTK |
genFieldVTK |
YES/NO |
Whether snapshots are converted to VTK |
genAverStatsDat |
YES/NO |
Whether ASCII files with statistics averaged in homogeneous directions are created |
statsVTKFileType |
r/u |
Sets the type of statistics VTK file to rectilinear (r) or unstructured ( u) |
fieldVTKFileType |
r/u |
Sets the type of snapshots VTK file to rectilinear (r)or unstructured ( u) |
homogeneousDirs |
0/1 0/1 0/1 |
Sets each direction to non-homogeneous/homogeneous |
Table: the POSTPROC section of settings.in
Statistics
When genStatsVTK=YES, postproc reads the content of statsNames and verifies the match with the binary statistics actually saved by solver (an error is triggered if this is not the case).
When genAverStatsDat=YES, postproc also averages statistics in homogeneous directions, and produces an ASCII output.
postproc accepts any combination of homogeneous/non-homogeneous directions, except homogeneousDirs= 1 1 1 (currently returns an error in this case, work in progress). When homogeneousDirs= 0 0 0, no ASCII file is produced.
When the homogeneous directions are two (as for the channel flow example, where homogeneousDirs= 1 0 1), a tab-separated averStats.dat file is generated in the stats/ folder, with the name of the included statistics on its first line.
When only one homogeneous direction is present, the statistics are two-dimensional: each quantity is saved to a different .dat file, named as averaged_<statID>.dat where <statID> is once again the corresponding statistics ID. The coordinate of the first/second non-homogeneous direction spans the lines/columns of the file.
Flow field database
The snapshots saved by solver are stored in database/binary, and are organized in subfolders, one for each snapshot. Each folder is named as count-000<iSnap>, and contains all the subdomain files for the snapshot iSnap.
When genFieldVTK=YES, postproc converts the snapshots to VTK, replicating the folder structure in database/vtk.
Since this folder structure does not allow popular visualization tools like Paraview to recognize that each folder contains multiple subdomains at one time, postproc also generates a .vtk.series JSON file for each subdomain. The series files are stored in database/vtk/series; each allows to load all the snapshots of one subdomain. Series files can be merged through Merge Datasets in Paraview for the visualization of the whole domain.
Loading .series files requires Paraview version 5.5.0 or later.
LES sub-grid viscosity
The field of sub-grid viscosity can be computed by postproc if compiled with the USE_LES macro. Since in algebraic models the sub-grid viscosity is univocally defined by the velocity, can also be computed for DNS simulations, providing a simple empirical criterion to check a posteriori for the adequacy of the spatial resolution. It also means that the field is never saved in database/binary.