CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Accessing data generated by flexi (DGSEM solver)

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By Eifoehn4
  • 2 Post By Eifoehn4
  • 1 Post By Eifoehn4

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 27, 2021, 07:46
Default Accessing data generated by flexi (DGSEM solver)
  #1
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
Dear all,


I have recently started working on the Discontinuous Galerkin Spectral Element Method opensource solver flexi. I am able to run the tutorials and even some advanced cases using it. However, I cannot access the solution values as they are saved in hdf5 format in binary files.



I can visualize them when the state file sizes are smaller than 2GB in paraview. This requires converting the hdf5 files to vtu format using the "posti_visu" converter shipped with the code. However, as we go to higher order and finer meshes, the files become much larger in size and paraview crashes in trying to open them. I compiled the paraview reader that was shipped with the code so that I could directly open the hdf5 files with paraview. But on loading the reader and trying to open a state file with it I get a negative class id error and paraview crashes again.


What I would like is a way to access property values in the hdf5 solution files itself as that would allow me to select the necessary data from the 3D domain and postprocess it as needed. However, as the data is written in binary format it doesn't allow access to hdfview software. Is there a way to extract the relevant data from the hdf5 state files? Meanwhile, any help with opening large vtu files or solving the negative class id error associated with the paraview reader is also most welcome.


A sample state file of the cavity tutorial is attached for reference.



JBR
jnanabrao is offline   Reply With Quote

Old   August 28, 2021, 06:49
Default
  #2
Senior Member
 
Eifoehn4's Avatar
 
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 14
Eifoehn4 is on a distinguished road
Dear jnanabrao,

please share some more information otherwise no one can help you.
  • What OS do you use?
  • What Paraview version do you use?
  • What HDF5 version do you use?
  • What OPENMPI version do you use?
  • Do you use precompiled release versions, the system versions or self compiled versions?
  • ...
flexi-project likes this.
__________________
Check out my side project:

A multiphysics discontinuous Galerkin framework: Youtube, Gitlab.
Eifoehn4 is offline   Reply With Quote

Old   August 28, 2021, 07:11
Default
  #3
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
Hi Eifoehn4,


OS : Ubuntu 20.04LTS


Paraview versions: I have 5.6.0 built from source code and 5.9.1 precompiled. The paraview reader was compiled with 5.6.0, although I had to obtain some vtk files separately that weren't present in the VTK library that came with 5.6.0



HDF5: please see attachment


Open MPI: 4.0.3



Code:
Do you use precompiled release versions, the system versions or self compiled versions?
I'm not sure which software this question is for.


flexi:Release version



JBR
Attached Files
File Type: txt loghdf5.txt (894 Bytes, 1 views)
jnanabrao is offline   Reply With Quote

Old   August 28, 2021, 07:52
Default
  #4
Senior Member
 
Eifoehn4's Avatar
 
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 14
Eifoehn4 is on a distinguished road
If you want to use the Paraview reader you have to make sure that FLEXI and Paraview are built with the same HDF5 Libraries. Moreover, HDF5 has to be built with FORTRAN and Parallel support. I would recommend to precompile HDF5 and OpenMPI on your own and use them for FLEXI and Paraview.

OpenMPI:

Code:
./configure --enable-static --enable-mpi1-compatibility --prefix=/opt/openmpi/...
HDF5:

Code:
cmake -DBUILD_TESTING=OFF -DHDF5_BUILD_FORTRAN=ON -DHDF5_BUILD_CPP_LIB=OFF -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_ENABLE_PARALLEL=ON -DHDF5_BUILD_HL_LIB=ON -DHDF5_BUILD_TOOLS=ON -DHDF5_ENABLE_F2003=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/hdf5/…
Make sure your environment variables are set correctly that CMAKE finds the precompiled OpenMPI and HDF5 versions:
  • PATH
  • LD_LIBRARY_PATH
  • CMAKE_PREFIX_PATH
  • CMAKE_LIRBRARY_PATH
  • CMAKE_INCLUDE_PATH

After that compile Paraview 5.6.0 with:

Code:
cmake .. -DCMAKE_BUILD_TYPE=Release -DPARAVIEW_USE_MPI=ON -DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_ENABLE_PYTHON=ON -DVTK_USE_SYSTEM_HDF5=ON -DHDF5_IS_PARALLEL=ON -DHDF5_PARALLEL=ON -DVTK_MODULE_vtkhdf5_IS_SHARED=OFF -DCMAKE_INSTALL_PREFIX=/opt/paraview/…
After that set the Paraview path in the environement variables mentioned above and compile FLEXI:

Code:
 See FLEXI docu ...
The 2GB VTK issue should be asked in a Paraview related forum.

Regards
jnanabrao and flexi-project like this.
__________________
Check out my side project:

A multiphysics discontinuous Galerkin framework: Youtube, Gitlab.

Last edited by Eifoehn4; August 28, 2021 at 09:32.
Eifoehn4 is offline   Reply With Quote

Old   August 30, 2021, 13:52
Default
  #5
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
After a few hiccups, it is working! Thanks a lot!



One tiny note:- To build paraview, I couldn't do without the mpi-cxx libraries and hence had to build those for openmpi with --enable-mpi-cxx option along with the rest of the configurations same as pointed out for openmpi above.



JBR
jnanabrao is offline   Reply With Quote

Old   August 30, 2021, 14:05
Default
  #6
Senior Member
 
Eifoehn4's Avatar
 
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 14
Eifoehn4 is on a distinguished road
You're welcome.
__________________
Check out my side project:

A multiphysics discontinuous Galerkin framework: Youtube, Gitlab.
Eifoehn4 is offline   Reply With Quote

Old   September 7, 2021, 10:10
Default
  #7
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
Hi Eifoehn4,
Code:
What I would like is a way to access property values in the hdf5 solution files itself
Is there a way to do this without paraview? Like in python?


JBR
jnanabrao is offline   Reply With Quote

Old   September 7, 2021, 14:11
Default
  #8
Senior Member
 
Eifoehn4's Avatar
 
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 14
Eifoehn4 is on a distinguished road
Sure Python, Julia and MATLAB are able to handle HDF5 files. The more tricky part is the data visualisation, especially for complex topologies with holes.
  • If your geometry is simple you may use a non-constrained Delaunay triangulation of each nodal point.
  • If your geometry is complex you may use a constrained Delaunay triangulation with Polygon boundaries.

In both cases you have to assign the coordinates to your data.

Regards
jnanabrao likes this.
__________________
Check out my side project:

A multiphysics discontinuous Galerkin framework: Youtube, Gitlab.

Last edited by Eifoehn4; September 7, 2021 at 15:14.
Eifoehn4 is offline   Reply With Quote

Old   September 8, 2021, 01:03
Default
  #9
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
Started working with h5py. Thanks as always! I really appreciate all the help.
jnanabrao is offline   Reply With Quote

Reply

Tags
dgsem, flexi, hdf5 binary files, paraview reader, vtu


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Divergence detected in AMG solver. VOF. Mr.Mister Fluent Multiphase 5 Today 07:32
mathematical functions not working with Foam data type in ODE solver Arham Main CFD Forum 3 May 26, 2021 11:25
Validation Data for Riemann vacuum solver Flexflix Main CFD Forum 2 August 3, 2018 11:33
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 11:52
compressible two phase flow in CFX4.4 youngan CFX 0 July 2, 2003 00:32


All times are GMT -4. The time now is 12:49.