CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

rhoCentralFoam code

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By TommyM

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 8, 2020, 13:39
Default rhoCentralFoam code
  #1
Member
 
Tommaso M.
Join Date: Sep 2018
Location: Milan, Italy
Posts: 67
Rep Power: 8
TommyM is on a distinguished road
Hi All,
I'm interested in learning more about rhoCentralFoam.
I have read the paper "Implementation of Semi-Discrete..." by J. Greenshields and I have read the .C file, but I don't understand how the code works.
Especially, I don't understand the concept of central-upwind schemes and the importance of the interpolation schemes.


I know that my question is very basic and maybe stupid, but if someone could explain me in few lines, it would be very appreciated.
Thanks in advance!
Tommy
TommyM is offline   Reply With Quote

Old   January 22, 2020, 10:22
Default
  #2
Member
 
Tommaso M.
Join Date: Sep 2018
Location: Milan, Italy
Posts: 67
Rep Power: 8
TommyM is on a distinguished road
After a long time looking at the source code, I understood how rhoCentralFoam works.
I briefly show what I understood, maybe it could be useful for someone:
1 - RhoCentralFoam begins by evaluating variables at cell faces (linear interpolation limited by a flux limiter, e.g. VanLeer), so for each face we have 2 values (direction + and - of the face) of each variable.
2 - Divergence, gradient and laplacian terms are calculated by using central-upwind scheme of Kurganov-Tadmor (by using the values at faces founded at point 1).
3 - Density equation is solved to find rho.
4 - Inviscid momentum equation (predictor step) is solved to find U.
5 - Viscous correction of momentum equation (corrector step) is solved to find U.
6 - Inviscid energy equation (predictor step) is solved to find T.
7 - Viscous correction of energy equation (corrector step) is solved to find T.
8 - Equation of state is solved to find p.


The algorithm is slightly more complex than my explanation, but it is difficult to resume it in few lines. Anyway, the general concept should be correct.


Tommy
jnanabrao and pingtao like this.
TommyM is offline   Reply With Quote

Reply

Tags
central scheme, interpolate, rhocentrafoam


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
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 13:30
How to make code run in parallel? cwang5 OpenFOAM Programming & Development 1 May 30, 2011 05:47
Open Source Vs Commercial Software MechE OpenFOAM 28 May 16, 2011 12:02
Small 3-D code Zdravko Stojanovic Main CFD Forum 2 July 19, 2010 11:11
public CFD Code development Heinz Wilkening Main CFD Forum 38 March 5, 1999 12:44


All times are GMT -4. The time now is 07:56.