CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   rhoCentralFoam linearUpwind (http://www.cfd-online.com/Forums/openfoam-solving/94369-rhocentralfoam-linearupwind.html)

Andy_bm November 14, 2011 02:42

rhoCentralFoam linearUpwind
 
Dear foamers.
I want to try the schemes linearUpwind in interpolationSchemes for rhoCentralFoam solver.
In the begining my fvSchemes file looks so:
Code:

fluxScheme Tadmor;
ddtSchemes
{
default
Euler;
}
gradSchemes
{
  default
cellLimited leastSquares 1;
}
divSchemes
{
default
none;
div(tauMC) Gauss linearUpwind;
div(phi,k) Gauss linearUpwind;
div(phi,omega) Gauss linearUpwind;
}
laplacianSchemes
{
default
Gauss linear corrected;
}
interpolationSchemes
{
default
linear;
reconstruct(rho) upwind;
reconstruct(U) upwind;
reconstruct(T) upwind;
}
snGradSchemes
{
default
corrected;
}

Then i replace interpolationSchemes
Code:

interpolationSchemes
{
default
linear;
reconstruct(rho) linearUpwind;
reconstruct(U) linearUpwind;
reconstruct(T) linearUpwind;
}

and OpenFoam gives out an error:

Code:

[3] --> FOAM FATAL IO ERROR:
[
3] Grad scheme not specified

Valid grad schemes are
:

8
(
Gauss
cellLimited
cellMDLimited
extendedLeastSquares
faceLimited
faceMDLimited
fourth
leastSquares
)

Then i replace interpolationSchemes to

Code:

interpolationSchemes
{
default
linear;
reconstruct(rho) Gauss linearUpwind;
reconstruct(U) Gauss linearUpwind;
reconstruct(T) Gauss linearUpwind;
}

OpenFoam gives out an error:

Code:

[17] --> FOAM FATAL IO ERROR:
[
17] Unknown discretisation scheme Gauss

Valid schemes are
:

51
(
Gamma
Gamma01
MUSCL
MUSCL01
Minmod
OSPRE
QUICK
SFCD
SuperBee
UMIST
biLinearFit
blended
clippedLinear
cubic
cubicUpwindFit
downwind
filteredLinear
filteredLinear2
filteredLinear3
fixedBlended
harmonic
limitWith
limitedCubic
limitedCubic01
limitedGamma
limitedLimitedCubic
limitedLimitedLinear
limitedLinear
limitedLinear01
limitedMUSCL
limitedVanLeer
linear
linearFit
linearPureUpwindFit
linearUpwind
localBlended
localMax
localMin
midPoint
outletStabilised
quadraticFit
quadraticLinearFit
quadraticLinearUpwindFit
quadraticUpwindFit
reverseLinear
skewCorrected
upwind
vanAlbada
vanLeer
vanLeer01
weighted
)

How probably to use linearUpwind?

Thanks.

vkrastev November 14, 2011 04:46

To use the linearUpwind scheme you have to specify also a gradient scheme. The correct syntax in OF-2.0.x should be (for instance):

div(phi,k) Gauss linearUpwind grad(k);

where grad(k) is the scheme specified for k in the gradSchemes section (in your case, the default cellLimited leastSquares 1 scheme will be selected).
In OF-1.7.x this syntax will not be recognized, because you have to specify explicitly the gradient scheme, like in the following example:

div(phi,k) Gauss linearUpwind cellLimited leastSquares 1;

Finally, just a note about div(tauMC): it is an explicitly calculated divergence term, not a convective flux term, thus the only scheme that makes sense is Gauss linear.

Hope this helps

V.

Andy_bm November 14, 2011 11:11

Thanks for your fast reply,
You tip has really helped me, but i have same questions:
If i use
Code:

interpolationSchemes
{
default linear;
reconstruct(rho) upwind cellLimited leastSquares 1;
reconstruct(U) upwind cellLimited leastSquares 1;
reconstruct(T) upwind cellLimited leastSquares 1;
}

What order of the scheme turns out, the first or the second?

vkrastev November 14, 2011 11:30

Quote:

Originally Posted by Andy_bm (Post 332035)
Thanks for your fast reply,
You tip has really helped me, but i have same questions:
If i use
Code:

interpolationSchemes
{
default linear;
reconstruct(rho) upwind cellLimited leastSquares 1;
reconstruct(U) upwind cellLimited leastSquares 1;
reconstruct(T) upwind cellLimited leastSquares 1;
}

What order of the scheme turns out, the first or the second?

Actually this syntax makes no sense, because the first order upwind scheme does not need any gradient scheme specification (I think that the code will simply ignore anything you write after "upwind"). Anyway, I advice you to use something more accurate for the reconcstruction schemes, like for instance:

Code:

interpolationSchemes
{
default linear;
reconstruct(rho) Gamma 1;
reconstruct(U) GammaV 1;
reconstruct(T) Gamma 1;
}

Regards

V.

Andy_bm November 14, 2011 11:43

I already tried to use this:
Code:

interpolationSchemes
{
default linear;
reconstruct(rho) Gamma 1;
reconstruct(U) GammaV 1;
reconstruct(T) Gamma 1;
}

but my case has dispersing decision

my case has the decision only
Code:


interpolationSchemes
{
default linear;
reconstruct(rho) upwind;
reconstruct(U) upwind;
reconstruct(T) upwind;
}

And now I try find the scheme which will raise accuracy of the decision.

Thanks.

vkrastev November 14, 2011 11:51

Quote:

Originally Posted by Andy_bm (Post 332040)
I already tried to use this:
Code:

interpolationSchemes
{
default linear;
reconstruct(rho) Gamma 1;
reconstruct(U) GammaV 1;
reconstruct(T) Gamma 1;
}

but my case has dispersing decision

my case has the decision only
Code:


interpolationSchemes
{
default linear;
reconstruct(rho) upwind;
reconstruct(U) upwind;
reconstruct(T) upwind;
}

And now I try find the scheme which will raise accuracy of the decision.

Thanks.

It depends from what you are looking for: rhoCentralFoam is designed as a transonic shock-capturing solver and the solution scheme of Tadmor and Kurganov is also constructed for this kind of flows, so using a first order scheme in my opinion introduces too much diffusion. I've noticed that sometimes rhoCentralFoam returns an oscillating behavior, but if you set the gradientScheme to a limited option (as for instance the cellLimited leastSquares 1 option) the oscillations are largely smeared out. It's up to you.

V.

Andy_bm November 14, 2011 12:02

I solve a problem of the expiration stream (М~2-5) in vacuum what solver can you recommend? I used sonicFoam, but he required too much time for the decision.

vkrastev November 14, 2011 12:27

Quote:

Originally Posted by Andy_bm (Post 332044)
I solve a problem of the expiration stream (М~2-5) in vacuum what solver can you recommend? I used sonicFoam, but he required too much time for the decision.

rhoCentralFoam is the best OF solver for this kind of flow: just play a bit with the schemes until the (eventual) oscillations will be sufficiently small for your requirements.

V.

Andy_bm November 14, 2011 12:34

Thanks a lot, I will try select schemes.


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