Closed AndreWeiner closed 3 years ago
Hi @MehdiMak96, small change of plans. Please write a function that parses the following file content and creates a dictionary.
!=======================================================================================================
! posti
!=======================================================================================================
MeshFile = Cylinder_Re200_mesh.h5 ! Custom mesh file
varName = Density
varName = MomentumX
varName = MomentumY
varName = MomentumZ
varName = Mean:Pressure
VarName = Mean:WallFrictionMagnitude ! Names of variables, which should be visualized.
noVisuVars = F ! If no VarNames are given, this flags supresses visu of standard variables
NVisu = 8 ! Polynomial degree at which solution is sampled for visualization.
!NCalc = ! Polynomial degree at which calculations are done.
!Avg2D = F ! Average solution in z-direction
!Avg2DHDF5Output = F ! Write averaged solution to HDF5 file
NodeTypeVisu = VISU ! NodeType for visualization. Visu, Gauss,Gauss-Lobatto,Visu_inner
DGonly = F ! Visualize FV elements as DG elements.
BoundaryName = BC_cylinder ! Names of boundaries for surfaces, which should be visualized.
For the above example, I would expect the following dictionary:
{
"MeshFile" : "Cylinder_Re200_mesh.h5 ",
"VarName" : ["Density", "MomentumX", ...]
...
}
Lines starting with an exclamation mark should be ignored.
Best, Andre
Hello Andre,
I tested all the files that have .ini extension and the function is working fluently.
Best, Mehdi
Switched to VTK format as interface to Flexi.
The CGNSDataloader class allows project partners to use the Flexi solver to process their data. Flexi stores the mesh in a separate file. Test data you be downloaded here
@MehdiMak96, as a first step, I would like you to explore and report the structure of Flexi output and mesh files. Let's extract the following information first:
You can open the files with h5py. Each file is organized as a set of dictionaries. Each dictionary may contain several other dictionaries. To fully investigate the file content, one needs to go recursively through the dictionaries down to the lowest level. A minimal code example to access the top-level dictionary would look as follows:
Check out the h5py documentation to learn how to access different kinds of data. This document explains what the mesh file contains.
Best, Andre