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

CGNS Library Modifications for CFD Solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 10, 2024, 13:56
Default CGNS Library Modifications for CFD Solver
  #1
New Member
 
CFDReiziger
Join Date: Jan 2024
Posts: 2
Rep Power: 0
CFDReiziger is on a distinguished road
Hi,
I am new to the CGNS library and currently working with an in-house CFD solver where CGNS is utilized for writing the solution. My objective is to rewrite the solution file (solution.cgns) to include one or more additional arrays. Specifically, I aim to map fields A/B/C/D to A/B/E/G. In OpenFOAM, achieving this is possible using mapFields. The optimal approach seems to be utilizing the CGNS library.
Could you please provide some guidance on where to start?
Thank you very much for your help.

Last edited by CFDReiziger; January 11, 2024 at 09:40.
CFDReiziger is offline   Reply With Quote

Old   January 10, 2024, 14:34
Default
  #2
Senior Member
 
NotOverUnderated's Avatar
 
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5
NotOverUnderated is on a distinguished road
Quote:
Originally Posted by CFDReiziger View Post
Dear,
I am very new to the CGNS library. I work with an in-house CFD solver where CGNS is used to write the solution. What I want to do is to rewrite the solution (solution.cgns) so that it contains one or more additional arrays. For instance, in a reactive case, I want to be able to restart from a converged solution with 2 species to a new case with 3 species and set the third species' concentration to desired values. Alternatively, I may want to map fields A/B/C/D to A/B/E/G. In OpenFoam, using mapFields would make that possible. However, with the in-house software, there is no such utility, and the best approach would be to modify the CGNS file.
In the CGNS library, there are many useful examples. In CGNS examples (I use the one for Fortran), you can see that there are mainly two files: cgread.F90 and cgwrite.F90. However, these files involve reading and writing items. This confuses me, as I wonder whether for instance I need to go through all the flow equation set attributes (Gas Model Type, Viscosity Model Type, Turbulence Closure Type, etc.) to achieve what I have in mind. I highly doubt it, given that I want the files to remain the same except for adding or swapping the data for given scalar fields.
Thank you very much for your help.
Hi,
I believe that your question is not clear. Please take a look at this link: Guide: How to ask a question on the forums

Kind regards
__________________
Don't keep making the same mistakes. Try to make new mistakes.
NotOverUnderated is offline   Reply With Quote

Old   January 13, 2024, 13:11
Default
  #3
Senior Member
 
Joern Beilke
Join Date: Mar 2009
Location: Dresden
Posts: 539
Rep Power: 20
JBeilke is on a distinguished road
You might have a look at
https://github.com/CGNS/CGNS/discussions
JBeilke is offline   Reply With Quote

Old   January 23, 2024, 13:00
Default
  #4
New Member
 
CFDReiziger
Join Date: Jan 2024
Posts: 2
Rep Power: 0
CFDReiziger is on a distinguished road
Thank you, Joern, for your suggestion. I will definitely have a look at the website your provided.
CFDReiziger is offline   Reply With Quote

Reply

Tags
cgns file edit, cgns file read


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
Error SIGSEGV using VOF and UDF JERC_UTFSM Fluent UDF and Scheme Programming 14 November 8, 2021 00:17
viscosity udf don't use correct temperature and strain rate rezvani Fluent UDF and Scheme Programming 8 May 27, 2021 06:40
PEMFC model with FLUENT brahimchoice FLUENT 22 April 19, 2020 16:44
decomposePar is missing a library whk1992 OpenFOAM Pre-Processing 8 March 7, 2015 08:53
CGNS unstructured in own solver nico Main CFD Forum 3 May 18, 2006 17:31


All times are GMT -4. The time now is 21:16.