# RhoCentralFoam detail

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 26, 2013, 04:28 Zeroth order interpolation #21 New Member   Lorenzo A. Ricciardi Join Date: Mar 2011 Posts: 27 Rep Power: 15 Hi all, Is there a way to force a "flat" (i.e. zeroth order) cell to face interpolation using the above mentioned interpolate method? Thanks

 January 31, 2013, 02:30 #22 Senior Member   Mahdi Hosseinali Join Date: Apr 2009 Location: NB, Canada Posts: 273 Rep Power: 18 What do you mean by flat cell? that would be against FVM definition of spatial discretization.

 January 31, 2013, 07:56 #23 New Member   Lorenzo A. Ricciardi Join Date: Mar 2011 Posts: 27 Rep Power: 15 "Flat" was relative to the interpolation, not to the cell. Call it constant interpolation (or zeroth order), if you prefer. I don't agree with you about flat interpolation being against FVM. When you pass from a generic nonlinear hyperbolic equation like d/dt (u) + div(F(u)) = 0 // d is partial time derivative to a semi discrete form, you have to integrate on the cell volume. The div term becomes a surface integral, but (if the cell geometry is constant) the partial time derivative becomes the time derivative of a volume integral. The equation is divided by the volume of the cell, and you have an ODE for each cell averaged value. Thus each value is "flat" inside the cell. I'm implementing a particular solver in openFoam, which uses Riemann solvers, and although I will definitely use some kind of limited interpolation of values to the surface to get high resolution, for testing and completeness considerations I'm trying to use the unified "interpolate" function to assign a value from a volumeField to a surfaceField. I solved the problem with a very simple routine I've written from scratch, but it doesn't work in parallel so far: Code: ```for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) { label cellI = mesh.faceOwner()[faceI]; rho_neg[faceI] = rho[cellI]; U_neg[faceI] = U[cellI]; lambda_neg[faceI] = lambda[cellI]; label cellJ = mesh.faceNeighbour()[faceI]; rho_pos[faceI] = rho[cellJ]; U_pos[faceI] = U[cellJ]; lambda_pos[faceI] = lambda[cellJ]; }``` So the question remains: is there a way to interpolate a value from cell to face in a similar fashion, using the "interpolate" method? Thanks

 January 31, 2013, 11:23 #24 Senior Member   Mahdi Hosseinali Join Date: Apr 2009 Location: NB, Canada Posts: 273 Rep Power: 18 I know how FVM works, what you want is piece wise constant while usually piece wise linear is being used. I believe you are going to use Gudonove type methods which still would yield a better result if you use piecewise linear rather than constant. Anyway, there is a simple way to interpolate from volField to surfaceField, and that is fvc::interpolate, look it up in Doxygen. Also you might wanna take a look at the solver rhoCentralFoam, it is using what you are after.

 January 31, 2013, 14:11 #25 New Member   Lorenzo A. Ricciardi Join Date: Mar 2011 Posts: 27 Rep Power: 15 I know Godunov method, and that's why I'm implementing another solver, different even from RhoCentralFoam I'll try to look deeper inside Doxygen, thanks anyway

June 30, 2013, 07:48
#26
Retired Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128
Greetings to all!

In reference to the following quotes, I believe that the missing link is this thread: http://www.cfd-online.com/Forums/ope...ow-solver.html
The OpenFOAM Forum changed software a few times, so it's normal that some links are still broken

Quote:
 Originally Posted by luca_g In the previous explanation I used the "Riemann problem" concept because it's the most familiar approach. If you are interest: http://www.cfd-online.com/cgi-bin/Op...1867#POST11867
Quote:
 Originally Posted by mksingh The link given in this thread does not work http://www.cfd-online.com/cgi-bin/Op...1867#POST11867 Is there a new link?
Quote:
 Originally Posted by mksingh I mean this thread: http://www.cfd-online.com/cgi-bin/Op...1867#POST11867 I am able to download the pdf but not able to see the above thread (see #8)
Quote:
 Originally Posted by anishtain4 You are right, that is not displaying any more
Best regards,
Bruno

 August 26, 2013, 11:15 #27 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,208 Rep Power: 26 can anyone explain the lines or steps of rhoCentralFoam solver? or a link or any instruction? __________________ Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked.

 December 24, 2013, 16:02 #28 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,208 Rep Power: 26 Hi all, there is a link about density-based solvers in Fluent site:http://aerojet.engr.ucdavis.edu/flue...htm#ram-scheme that says all density-based solvers are coupled. does rhoCentralFoam solve equations in a segregated way or coupled way? __________________ Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked.

December 28, 2013, 16:20
#29
Retired Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128
Hi Ehsan,

Quote:
 Originally Posted by immortality does rhoCentralFoam solve equations in a segregated way or coupled way?
Based on the information provided here: http://openfoamwiki.net/index.php/TestLucaG - and I quote:
Quote:
 centralFoam is a compressible flow solver based on the family of central/central-upwind schemes.
If it only affects the schemes, then it does not change the solver to work as a coupled solver, since (AFAIK) most of OpenFOAM solvers solve equations in a segregated way.

Nonetheless, if you already have an overview of the equations being solved in rhoCentralFoam, it should be somewhat clear if it's segregated or coupled, from the way that the equations are solved: http://www.cfd-online.com/Wiki/Fluen...ated_solver.3F

Best regards,
Bruno
__________________

 April 15, 2014, 04:05 #30 New Member   anshul bansal Join Date: Jun 2013 Posts: 22 Rep Power: 13 Hi... can u please explain what means by these terms... rhoU ,rPsi, e, phiv, tauMC, sigmaDotU and phiEp... Thanks Anshul

April 16, 2014, 04:18
#31
Senior Member

Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
Quote:
 Originally Posted by anshul bansal Hi... can u please explain what means by these terms... rhoU ,rPsi, e, phiv, tauMC, sigmaDotU and phiEp... Thanks Anshul
Hi
rhoU=rho*U
rPsi=R*T
phiv=A*U (I have some doubt about it)
phiEp=rho*A*U
and two other terms are related to turbulence models and viscosity.
definition of terms there are in solver codes.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

 April 16, 2014, 05:19 #32 New Member   anshul bansal Join Date: Jun 2013 Posts: 22 Rep Power: 13 hi.. thanks... here A= area or some other mean...?? and is there any description file where i can get these definition ?? Anshul

 April 16, 2014, 06:50 #33 New Member   anshul bansal Join Date: Jun 2013 Posts: 22 Rep Power: 13 ohh... i get this.. here A=rho*U means mass flow is is right.??

April 16, 2014, 10:06
#34
Senior Member

Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
Quote:
 Originally Posted by anshul bansal ohh... i get this.. here A=rho*U means mass flow is is right.??
A is the normal area of the cell to outside (inflow or outflow). unfortunately there is not a complete guide. phi in open foam is the mass flux and phiv is volumetric mass flux as I remember and is about incompressible problems.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

April 18, 2014, 15:04
#35
New Member

anshul bansal
Join Date: Jun 2013
Posts: 22
Rep Power: 13
hi immortality,

in rhoCentralFoam.c
what mean by mesh.Sf() (in 105 line, openfoam 2.2.1 version)

i attach this file

thanks anshul
Attached Files
 my_rhoCentralFoam.C (7.3 KB, 19 views)

April 18, 2014, 15:33
#36
Senior Member

Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
Quote:
 Originally Posted by anshul bansal hi immortality, in rhoCentralFoam.c what mean by mesh.Sf() (in 105 line, openfoam 2.2.1 version) i attach this file thanks anshul
its the area of each cell surfaces.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

 April 22, 2014, 14:20 #37 New Member   anshul bansal Join Date: Jun 2013 Posts: 22 Rep Power: 13 hi immortality, thanks for reply. i have another last doubt... which can help me very much. can u explain this sigmaDotU.... what this muEff and snGrad(U) ?? and this equation // --- Solve energy surfaceScalarField sigmaDotU ( ( fvc::interpolate(muEff)*mesh.magSf()*fvc::snGrad(U ) + (mesh.Sf() & fvc::interpolate(tauMC)) ) & (a_pos*U_pos + a_neg*U_neg) );

 August 20, 2014, 02:46 A little question: rhoCentralFoam implementation #38 Member     Luis Felipe Gutierrez Marcantoni Join Date: Oct 2010 Location: Cordoba-Argentina Posts: 47 Rep Power: 15 Hi, I'm trying to understand the implementation of rhoCentralFoam. I check the original paper of Greenshield, but I found some discrepancies between theory and implementation. in the attached document I explain my doubts. If anyone can help me, I'll be very thankful. Thanks in advance https://copy.com/1mcVjlWREUPt Felipe by the way if anyone want to try copy (better than dropbox!!) https://copy.com?r=HYM0VM __________________ Felipe G

 August 6, 2015, 10:58 #39 Senior Member   Freedom Join Date: May 2014 Posts: 209 Rep Power: 13 Dear Luca and Alberto, a = Grad(x-) = (PHI (i, j) - PHI(i-1, j))/ deltaX I have several questions about the upwind scheme: In the same direction, the surface flux often (or definitely) has the different signs. For example, the phi between i-1 and i is "pos", then the sign between the i and i+1 is usually "neg"? because the U will not change within single cell. If the phi between cell i and i-1 is "pos", then we should take the value in cell i, if it is "neg", then we should take the value in cell i-1. Then, how to calculate value of a in the first attached equation (to calculate the gradient ) using upwind scheme? I really mislead by the upwind scheme.... Please help me..... Thank you very much!!! Best regards, Wen

November 5, 2015, 03:22
#40
Member

Xinguang Wang
Join Date: Feb 2015
Posts: 45
Rep Power: 11
Hi Felipe

I met the same situation, have you figure it out?

Jason

Quote:
 Originally Posted by lfgmarc Hi, I'm trying to understand the implementation of rhoCentralFoam. I check the original paper of Greenshield, but I found some discrepancies between theory and implementation. in the attached document I explain my doubts. If anyone can help me, I'll be very thankful. Thanks in advance https://copy.com/1mcVjlWREUPt Felipe by the way if anyone want to try copy (better than dropbox!!) https://copy.com?r=HYM0VM