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

Input mesh format and output data format for a CFD solver

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By LuckyTran
  • 1 Post By praveen
  • 1 Post By naffrancois
  • 1 Post By ishan_ae

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 14, 2021, 12:09
Default Input mesh format and output data format for a CFD solver
  #1
Member
 
ishan
Join Date: Oct 2017
Posts: 78
Rep Power: 9
ishan_ae is on a distinguished road
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.
ishan_ae is offline   Reply With Quote

Old   November 15, 2021, 01:43
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,752
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Paraview plays really nicely with vtk and tecplot formats.
ishan_ae likes this.
LuckyTran is offline   Reply With Quote

Old   November 16, 2021, 00:49
Default
  #3
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 343
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
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.
ishan_ae likes this.

Last edited by praveen; November 16, 2021 at 03:44.
praveen is offline   Reply With Quote

Old   November 17, 2021, 15:11
Default
  #4
Member
 
ishan
Join Date: Oct 2017
Posts: 78
Rep Power: 9
ishan_ae is on a distinguished road
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?
ishan_ae is offline   Reply With Quote

Old   November 18, 2021, 13:28
Default
  #5
Senior Member
 
Join Date: Oct 2011
Posts: 242
Rep Power: 17
naffrancois is on a distinguished road
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.
ishan_ae likes this.
naffrancois is offline   Reply With Quote

Old   November 22, 2021, 01:21
Default
  #6
Member
 
ishan
Join Date: Oct 2017
Posts: 78
Rep Power: 9
ishan_ae is on a distinguished road
Thank you @naffrancois for the information. I am going to look into this format now.
naffrancois likes this.
ishan_ae is offline   Reply With Quote

Reply

Tags
file format


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
[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


All times are GMT -4. The time now is 04:51.