|
[Sponsors] |
Input mesh format and output data format for a CFD solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 14, 2021, 12:09 |
Input mesh format and output data format for a CFD solver
|
#1 |
Member
ishan
Join Date: Oct 2017
Posts: 78
Rep Power: 9 |
Hi,
I want to build a project using C for myself which will be like a numerical playground for 2D unstructured FVM. Nothing fancy at the moment; only diffusion equation term but Navier-Stokes equations in the future. I want to know what kind mesh file formats are you using to read the data and also in what data format are you storing the calculations. I would like to read the solutions into ParaView. What can you recommend? Based on my background information finding CGSN looks good. It is open source and has C libraries. |
|
November 15, 2021, 01:43 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
Paraview plays really nicely with vtk and tecplot formats.
|
|
November 16, 2021, 00:49 |
|
#3 |
Super Moderator
|
Gmsh seems to be best freely available grid generator for unstructured grids, so having ability to read in gmsh format is good. It is easy to add other formats to read in, you will have to write your own code to perform some geometry calculations. You can also try out DMPlex from Petsc for handling unstructured grids. For saving solutions vtu or xdmf/hdf formats can be used. I mainly use VisIt but Paraview is another alternative.
Last edited by praveen; November 16, 2021 at 03:44. |
|
November 17, 2021, 15:11 |
|
#4 |
Member
ishan
Join Date: Oct 2017
Posts: 78
Rep Power: 9 |
Thanks Lucky and Praveen for your inputs.
Praveen, are you writing from Gmsh a MSH file in ASCii format and then parsing it for nodal/face information? |
|
November 18, 2021, 13:28 |
|
#5 |
Senior Member
Join Date: Oct 2011
Posts: 242
Rep Power: 17 |
Hello,
The basic information gmsh gives you is: - a list of nodes coordinates - a list of elements tagged by physical groups and connected to the list of nodes You can output a simple mesh as ASCII v2 to understand the format. Then it entirely depends on how you intend to manage data in your solver. For example, compressible unstructured cell-centered finite volume solvers usually work with elements and faces lists. You compute fluxes on the face and add it to the two neighbouring elements this face belongs to. In other words from the basic information given by gmsh you need to construct lists of connectivities. This is relatively easy work as long as performance is not essential (e.g. few elements). Building these lists from that basic information efficiently is quite more complicated though. In any case this is something you need to do prior to the solver, it should be in a preprocessing stage, separate program. |
|
November 22, 2021, 01:21 |
|
#6 |
Member
ishan
Join Date: Oct 2017
Posts: 78
Rep Power: 9 |
Thank you @naffrancois for the information. I am going to look into this format now.
|
|
Tags |
file format |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] non uniform mesh near the stl object | vava10 | OpenFOAM Meshing & Mesh Conversion | 0 | January 31, 2021 15:41 |
Unsteady Restart Divergence | pro_ | SU2 | 6 | May 20, 2020 16:17 |
Forward simulations -- Evaluating objective function only without design modules | kensaii | SU2 Shape Design | 4 | April 25, 2020 16:12 |
Mesh Boundary Assignment Question | Wandadars | Mesh Generation & Pre-Processing | 1 | June 13, 2016 18:19 |
vki 3D Periodic Mesh | ddar | SU2 | 0 | May 2, 2016 12:12 |