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

RhoCentralFoam detail

Register Blogs Community New Posts Updated Threads Search

Like Tree25Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 26, 2013, 05:28
Default Zeroth order interpolation
  #21
New Member
 
Lorenzo A. Ricciardi
Join Date: Mar 2011
Posts: 27
Rep Power: 15
lichmaster is on a distinguished road
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
lichmaster is offline   Reply With Quote

Old   January 31, 2013, 03:30
Default
  #22
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
What do you mean by flat cell? that would be against FVM definition of spatial discretization.
anishtain4 is offline   Reply With Quote

Old   January 31, 2013, 08:56
Default
  #23
New Member
 
Lorenzo A. Ricciardi
Join Date: Mar 2011
Posts: 27
Rep Power: 15
lichmaster is on a distinguished road
"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
lichmaster is offline   Reply With Quote

Old   January 31, 2013, 12:23
Default
  #24
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
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 vol<type>Field to surface<Type>Field, 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.
anishtain4 is offline   Reply With Quote

Old   January 31, 2013, 15:11
Default
  #25
New Member
 
Lorenzo A. Ricciardi
Join Date: Mar 2011
Posts: 27
Rep Power: 15
lichmaster is on a distinguished road
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
lichmaster is offline   Reply With Quote

Old   June 30, 2013, 08:48
Default
  #26
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 View Post
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 View Post
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 View Post
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 View Post
You are right, that is not displaying any more
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 26, 2013, 12:15
Default
  #27
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   December 24, 2013, 17:02
Default
  #28
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   December 28, 2013, 17:20
Default
  #29
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Ehsan,

Quote:
Originally Posted by immortality View Post
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
__________________
wyldckat is offline   Reply With Quote

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



Thanks
Anshul
anshul bansal is offline   Reply With Quote

Old   April 16, 2014, 05:18
Default
  #31
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Quote:
Originally Posted by anshul bansal View Post
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.
giovanni.medici and lpz456 like this.
__________________
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.
immortality is offline   Reply With Quote

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


Anshul
anshul bansal is offline   Reply With Quote

Old   April 16, 2014, 07:50
Default
  #33
New Member
 
anshul bansal
Join Date: Jun 2013
Posts: 22
Rep Power: 13
anshul bansal is on a distinguished road
ohh... i get this..
here A=rho*U means mass flow
is is right.??
anshul bansal is offline   Reply With Quote

Old   April 16, 2014, 11:06
Default
  #34
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Quote:
Originally Posted by anshul bansal View Post
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.
immortality is offline   Reply With Quote

Old   April 18, 2014, 16:04
Default
  #35
New Member
 
anshul bansal
Join Date: Jun 2013
Posts: 22
Rep Power: 13
anshul bansal is on a distinguished road
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
File Type: c my_rhoCentralFoam.C (7.3 KB, 19 views)
anshul bansal is offline   Reply With Quote

Old   April 18, 2014, 16:33
Default
  #36
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Quote:
Originally Posted by anshul bansal View Post
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.
immortality is offline   Reply With Quote

Old   April 22, 2014, 15:20
Default
  #37
New Member
 
anshul bansal
Join Date: Jun 2013
Posts: 22
Rep Power: 13
anshul bansal is on a distinguished road
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)
);
anshul bansal is offline   Reply With Quote

Old   August 20, 2014, 03:46
Default A little question: rhoCentralFoam implementation
  #38
Member
 
lfgmarc's Avatar
 
Luis Felipe Gutierrez Marcantoni
Join Date: Oct 2010
Location: Cordoba-Argentina
Posts: 47
Rep Power: 16
lfgmarc is on a distinguished road
Send a message via MSN to 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
__________________
Felipe G
lfgmarc is offline   Reply With Quote

Old   August 6, 2015, 11:58
Default
  #39
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
Dear Luca and Alberto,

a = Grad(x-) = (PHI (i, j) - PHI(i-1, j))/ deltaX

I have several questions about the upwind scheme:
  1. 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.
  2. 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
wenxu is offline   Reply With Quote

Old   November 5, 2015, 04:22
Default
  #40
Member
 
Xinguang Wang
Join Date: Feb 2015
Posts: 45
Rep Power: 11
JasonWang3 is on a distinguished road
Hi Felipe

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

Jason

Quote:
Originally Posted by lfgmarc View Post
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
JasonWang3 is offline   Reply With Quote

Reply


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
Thermophysicalproperties in rhoCentralFoam srinath OpenFOAM Running, Solving & CFD 12 October 2, 2012 11:04
RhoCentralFoam Steady State kieranwood85 OpenFOAM Running, Solving & CFD 0 January 9, 2009 19:50
RhocentralFoam ehsan OpenFOAM Running, Solving & CFD 0 November 19, 2008 06:35
how to get the detail information about k-e models limingtiger Siemens 1 July 15, 2005 05:22
HVN tell me the detail of relative pressure chong chee nan FLUENT 1 January 2, 2002 05:55


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