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   September 5, 2008, 21:59
Default Hello, I have a doubt about
  #1
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Hello,

I have a doubt about rhoCentralFoam. What do instructions like the following do?

surfaceScalarField rho_pos = fvc::interpolate(rho, pos, "reconstruct(rho)");
surfaceScalarField rho_neg = fvc::interpolate(rho, neg, "reconstruct(rho)");

In particular, I don't understand the role of "pos" and "neg".

Thanks in advance for any help.

With kind regards,
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   September 8, 2008, 12:05
Default Alberto, When interpolating
  #2
Member
 
E. David Huckaby
Join Date: Mar 2009
Posts: 57
Rep Power: 17
david_h is on a distinguished road
Alberto,

When interpolating (reconstructing) a variable (e.g. "rho") from cells to faces there is a value associated with each side of the face. The "interpolate" function only returns an average of these two values. When using an "upwind"-type interpolation scheme the flux, "pos" or "neg", will weight (or select) the face value to "upwind" side of the face.

For rhoCentralFoam, I think the idea is to select a suitable interpolation scheme such that
"pos" > 0 to extract to the left value and
"neg" < 0 to extract to the right value.

hope this helps
Dave
david_h is offline   Reply With Quote

Old   September 8, 2008, 13:59
Default Thanks David for your answer.
  #3
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Thanks David for your answer. Let me try to see if I understand it right :-)

Let's consider this picture of a simple squared grid:



If I consider the face between i-1 and i, if I take the "pos", I should get the value in i, while if I take the "neg" I obtain the value in i-1.

In the same way, if I consider the face betweem i and i+1, if I take the "pos", I obtain the value in i, and if I take the "neg", the value in i+1.

Does this sound right to you?

Thanks again,
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   September 8, 2008, 15:01
Default Alberto, I agree with the a
  #4
Member
 
E. David Huckaby
Join Date: Mar 2009
Posts: 57
Rep Power: 17
david_h is on a distinguished road
Alberto,

I agree with the above statements, if the "face area vectors" point outward from cell i,j.

If all the "face area vectors" are pointed either toward the right or to the top, then:

on face the between i-1 and i (i-1/2),
"pos" would return rho[i-1]
"neg" would return rho[i]
on face the between i and i+1 (i+1/2),
"pos" would return rho[i]
"neg" would return rho[i+1]

The above is for zero-order reconstruction. For "cell-based" higher order reconstruction (e.g. limited-linear), the face values would take the form:
rho_pos[i+1/2] = rho[i] + drho[i]*(x[i+1/2] - x[i])
rho_neg[i+1/2] = rho[i] + drho[i]*(x[i+1/2] - x[i+1])

where drho[i] is limited gradient of rho at cell "i"

Dave
david_h is offline   Reply With Quote

Old   September 8, 2008, 15:09
Default David, yes, that's what I m
  #5
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
David,

yes, that's what I meant. I didn't specify the face are vector direction.

Thanks again for your help :-)

Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   September 9, 2008, 05:34
Default Alberto, the trick of pos a
  #6
Member
 
Luca Gasparini
Join Date: Mar 2009
Location: Italy
Posts: 37
Rep Power: 17
luca_g is on a distinguished road
Alberto,

the trick of pos and neg is the trick I thought about when I developed the centralFoam code, from which rhoCentralFoam has been later derived by the people at OpenCFD.

In OF, surface fields have just one single value which is related to the face, but when you apply Godunov-like scheme you actually want to compute the flux through a face solving (maybe approxiamtely) the Riemann problem defined by the TWO different states of the fluid on the opposite sides of each face.

Thus, for each unknown (say p, U and T), you need to evaluate two surface fields with the values of the variable on the two sides of the face.

The fvc::interpolate function normally use the sign of the velocity flux to "decide" how to upwind the cell values in order to interpolate a face value. So the idea was to "fool" the interpolation routine calling it twice: once with a "positive" flux (e.g. +1) and one with a "negative" flux (e.g. -1). Depending on the selected interpolation scheme, as explained by David, you will get two (most likely) different estimates of the face values from which the Godunov-like scheme (in this case a central-upwind scheme) can be applied.

The nice (and somewhat unusual) thing in OF is that given an internal face it always has an "owner" and a "neighbour": in OF notation the flux is positive if the flow is going through the face from the owner cell to the neighbour cell, and negative otherwise (i.e. the face normal is positive from owner to neighbour).
Thus, because of the unstructured grid used in OF you cannot easily think interms of i-1,j and i,j but you better think in terms of owner/neighbour relation.

So you actually solve a Riemann problem at each face between an "owner-side" and a "neighbour-side" with the convention that the flux will be positive in the "owner-to-neighbour" direction. It doesn't matter if (in a more conventional way of thinking) face normals are outward or inward with respect to any given cell. At the end, everything will be consistent.

Kind regards,

Luca
luca_g is offline   Reply With Quote

Old   September 9, 2008, 06:18
Default Hi Luca, take a look to the
  #7
Member
 
Luca M.
Join Date: Mar 2009
Location: Luzern, Switzerland
Posts: 59
Rep Power: 17
luca is on a distinguished road
Hi Luca,

take a look to the original paper of Kurganov about Riemann solver free approach implemented in the rhoCentralFoam solver: may be it can help you to better understand the algorithm

http://www.cscamm.umd.edu/centpack/publications/files/KT_semi-discrete.JCP00-cen tpack.pdf

Regards

Luca
luca is offline   Reply With Quote

Old   September 9, 2008, 08:49
Default Dear Luca, Thank you for yo
  #8
Member
 
Luca Gasparini
Join Date: Mar 2009
Location: Italy
Posts: 37
Rep Power: 17
luca_g is on a distinguished road
Dear Luca,

Thank you for your hint.
I don't want to appear arrogant but I'm the one who wrote the (original) centralFoam code, so I know about Kurganov et al. Riemann free approach.
Still, it is a Godunov-like scheme and it is quite close to an approximate Riemann-solver based solver. In fact you could easily use the most of centralFoam substituting KT scheme with Roe's one; including the trick with pos and neg "fictitious fluxes".

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

Kind regards,

Luca
luca_g is offline   Reply With Quote

Old   September 9, 2008, 09:36
Default Dear Luca, sorry about it.
  #9
Member
 
Luca M.
Join Date: Mar 2009
Location: Luzern, Switzerland
Posts: 59
Rep Power: 17
luca is on a distinguished road
Dear Luca,

sorry about it. I've typed the wrong name starting the thread :-) The suggestion was for Alberto and the paper could be useful anyway.


Luca
luca is offline   Reply With Quote

Old   September 9, 2008, 12:29
Default Thanks all a lot for the compl
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Thanks all a lot for the complete information!

Regards,
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   January 13, 2010, 21:01
Default X-posted from other thread
  #11
Member
 
Mihir
Join Date: Mar 2009
Posts: 40
Rep Power: 17
mihir1310 is on a distinguished road
Im trying to solve a free-jet problem by rhoCentralFoam [OF 1.5]. My domain represents a close chamber in which the jet enters at Supersonic conditions.
My code crashes due to a FPE , I am getting -ve pressure & density at the outlet .



this is obviously due to solving the h equation. I do not understand what is causing this error . ill post my BC;s & the thermoPhysicalProperties directory .

Code:
dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 42000;

boundaryField
{
    wall
    {
        type            slip;
    }
    axis
    {
        type            empty;
    }
    outlet
    {
        type            nonReflective;
        refValue        uniform 6600;
        gamma           1.4;
        phi             phi;
        psi             psi;
        valueFraction   uniform 0.2;
        refGradient     uniform 0.2;
        value           uniform 6600;
    }
    inlet
    {
        type            totalPressure;
        U               U;
        phi             phi;
        rho             none;
        psi             none;
        gamma           1.4;
        p0              uniform 101325;
        value           uniform 101325;
    }
    frontAndBackPlanes
    {
        type            empty;
    }
    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
}
U
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (260.39 0 0);

boundaryField
{
    wall
    {
        type            slip;
    }
    axis
    {
        type            empty;
    }
    outlet
    {
        type            zeroGradient;
    }
    inlet
    {
        type            fixedValue;
        value           uniform (315 0 0);
    }
    frontAndBackPlanes
    {
        type            empty;
    }
    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
}
Code:
thermoType      hThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>;

mixture         perfectGas 1 28.9 1004.3 200.0 1.458e-6 110.4;

rhoMin          rhoMin     [1 -3 0 0 0]     0.001;
mihir1310 is offline   Reply With Quote

Old   January 14, 2010, 09:49
Default
  #12
Member
 
Mihir
Join Date: Mar 2009
Posts: 40
Rep Power: 17
mihir1310 is on a distinguished road
I also has a question about the accuracy of the solver as claimed in the paper :Implementation of semi-discrete, non-staggered central schemes in a colocated, polyhedral, finite volume framework, for high-speed viscous flows by Christopher J. Greenshields1,2,∗,†, Henry G. Weller2, Luca Gasparini3 and Jason M. Reese1

In the solution of the Ladenburg Free Jet problem , this article claims accurac in successful reproduction of experimental results by computational method. The following picture shows the matching of the shock locations & profiles.


However the converged results obtained from the tutorial LadenburgPsi60 of rhoCentralFoam show shock profile slightly different from the above image . The picture in the article shows a prominent "Mach Disc" , while the same in the tutorial appears smeared .


Can you explain to me the difference in the two sets of results ? Is the difference due to accuracy or simply a matter of interpretation ?
mihir1310 is offline   Reply With Quote

Old   January 18, 2010, 11:02
Default
  #13
Member
 
Mihir
Join Date: Mar 2009
Posts: 40
Rep Power: 17
mihir1310 is on a distinguished road
Could anyone please help me with this ? I can present some more details if necessary

Thank You
mihir1310 is offline   Reply With Quote

Old   December 18, 2011, 10:05
Default Central Scheme in rhoCentralFoam VS fvSchemes
  #14
New Member
 
Join Date: Aug 2011
Posts: 28
Rep Power: 15
schwermetall is on a distinguished road
Hi all,
I'm not too experienced with CFD so I apologize for stupid questions in the first place ;-).

I'm wondering about a very general thing concerning rhoCentralFoam. It is a central Scheme by construction right?
I looked through "Implementation of semi-discrete, non-staggered central schemes in a colocated, [...] finite volume framework [...]" by Greenshields, Gasparini et. Al. There is the following explanation:
"In the KT [Kurganov / Tadmor] method, the f + and f − contributions are weighted equally so that the weighting coefficient is alpha=0.5, hence its description as a central scheme."
So my question is: Why is it possible, to specify an upwind div scheme or interpolation Scheme for rhoCentral Foam? Respectively, Do I change the idea of rhoCentralFoam by using an upwind scheme together with a Tadmor flux Scheme?

The reason for the question is simply, that I have great difficulties to distinguish between all the different upwind / central Scheme possibilities .

Thanks a lot, regards
immortality likes this.

Last edited by schwermetall; December 20, 2011 at 08:25.
schwermetall is offline   Reply With Quote

Old   December 21, 2011, 05:26
Default
  #15
New Member
 
Join Date: Aug 2011
Posts: 28
Rep Power: 15
schwermetall is on a distinguished road
No ideas ?
schwermetall is offline   Reply With Quote

Old   April 22, 2012, 04:51
Default
  #16
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
I ran the case forward step from the rhoCentralFoam tutorials, but when I tried to plot the residuals, interestingly I saw that all of the residuals are zero, any idea?
anishtain4 is offline   Reply With Quote

Old   April 23, 2012, 05:05
Default
  #17
New Member
 
M K Singh
Join Date: Sep 2009
Posts: 19
Rep Power: 17
mksingh is on a distinguished road
Quote:
Originally Posted by luca View Post
Hi Luca,

take a look to the original paper of Kurganov about Riemann solver free approach implemented in the rhoCentralFoam solver: may be it can help you to better understand the algorithm

http://www.cscamm.umd.edu/centpack/publications/files/KT_semi-discrete.JCP00-cen tpack.pdf

Regards

Luca
The link given in this thread does not work
http://www.cfd-online.com/cgi-bin/Op...1867#POST11867
Is there a new link?
With best regards.
M K
mksingh is offline   Reply With Quote

Old   April 23, 2012, 16:26
Default
  #18
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
I did download it a few days ago, that is fine
anishtain4 is offline   Reply With Quote

Old   April 23, 2012, 18:36
Default
  #19
New Member
 
M K Singh
Join Date: Sep 2009
Posts: 19
Rep Power: 17
mksingh is on a distinguished road
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)
mksingh is offline   Reply With Quote

Old   April 27, 2012, 14:28
Default
  #20
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
You are right, that is not displaying any more
anishtain4 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:59.