CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   error on turbulence scheme (http://www.cfd-online.com/Forums/openfoam-pre-processing/118400-error-turbulence-scheme.html)

immortality May 27, 2013 06:17

error on turbulence scheme
 
Hi
I set a second order turbulence scheme with an error:
Code:

divSchemes
{
    default none;
    div(tauMC) Gauss linear;
    div(phi) Gauss linearUpwindV;
    div(phi,omega) Gauss upwind;
    div(phi,k) Gauss linearUpwind;
    div(phi,gas) Gauss limitedLimitedLinear 1 0 1;
    div(phi,epsilon) Gauss linearUpwind;
}

Code:

--> FOAM Warning :
From function polyBoundaryMesh::groupPatchIDs() const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 474
Patch empty specifies a group empty which is also a patch name. This might give problems later on.
Reading field U

Reading field gas

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model realizableKE
realizableKECoeffs
{
Cmu            0.09;
A0              4;
C2              1.9;
sigmak          1;
sigmaEps        1.2;
Prt            1;
}

fluxScheme: Kurganov

Starting time loop

Mean and max Courant Numbers = 3.858134887 23.51635184
deltaT = 2.083333333e-09
Time = 2.08333e-09

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
[0] swak4Foam: Allocating new repository for sampledGlobalVariables
[1] swak4Foam: Allocating new repository for sampledGlobalVariables
[2] swak4Foam: Allocating new repository for sampledGlobalVariables
[3] swak4Foam: Allocating new repository for sampledGlobalVariables
smoothSolver:  Solving for Ux, Initial residual = 0.999875462, Final residual = 1.076653513e-16, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 7.204656079e-17, No Iterations 2
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for h, Initial residual = 2.679038313e-06, Final residual = 5.013352019e-08, No Iterations 2
time step continuity errors : sum local = 0, global = 0, cumulative = 0
[0]
[0]
[0] --> FOAM FATAL IO ERROR:
[0] attempt to read beyond EOF
[0]
[0] file: /home/ehsan/Desktop/Central/nonUniformMesh/test2/processor0/../system/fvSchemes.divSchemes.div(phi,epsilon) at line [3] [1]
[2]
[2] 61.
[0]
[0]    From function ITstream::read(token&)
[0]    in file db/IOstreams/Tstreams/ITstream.C at line 83.
[0]
FOAM parallel run exiting
[0]
[1]
[1] --> FOAM FATAL IO ERROR:
[1] attempt to read beyond EOF
[1]
[1] file: IOstream.divSchemes.div(phi,epsilon) at line 0
[2] --> FOAM FATAL IO ERROR:
[2] attempt to read beyond EOF
[2] .
[1]
[1]    From function ITstream::read(token&)
[1]    in file db/IOstreams/Tstreams/ITstream.C at line 83.
[1]
FOAM parallel run exiting
[1]

[3]
[3] --> FOAM FATAL IO ERROR:
[3] attempt to read beyond EOF
[3]
[3] file: IOstream.divSchemes.div(phi,epsilon) at line 0.
[3]
[3]    From function ITstream::read(token&)
[3]    in file db/IOstreams/Tstreams/ITstream.C at line 83.
[3]
FOAM parallel run exiting
[3]

[2] file: IOstream.divSchemes.div(phi,epsilon) at line 0.
[2]
[2]    From function ITstream::read(token&)
[2]    in file db/IOstreams/Tstreams/ITstream.C at line 83.
[2]
FOAM parallel run exiting
[2]
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 2 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun has exited due to process rank 1 with PID 11063 on
node Ehsan-com exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
[Ehsan-com:11055] 3 more processes have sent help message help-mpi-api.txt / mpi-abort
[Ehsan-com:11055] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
Killing PID 11052
 PyFoam WARNING on line 232 of file /usr/local/lib/python2.7/dist-packages/PyFoam/Execution/FoamThread.py : Process 11052 was already dead

I like to know experiments about which scheme(preferably second order) is more appropriate (stable and accurate with physical results) for k,omega and epsilon?
thanks.

bscphil May 27, 2013 08:21

Quote:

Originally Posted by immortality (Post 430222)
Hi
I set a second order turbulence scheme with an error:
Code:

divSchemes
{
    default none;
    div(tauMC) Gauss linear;
    div(phi) Gauss linearUpwindV;
    div(phi,omega) Gauss upwind;
    div(phi,k) Gauss linearUpwind;
    div(phi,gas) Gauss limitedLimitedLinear 1 0 1;
    div(phi,epsilon) Gauss linearUpwind;
}


Hi,
the question to me is, which version of OpenFoam you are using (the syntax is different in different versions) ?

In OpenFoam 2.2.0 just do:
Code:

divSchemes
{
default                    none;
div(phi,U)                  bounded Gauss linearUpwindV grad(U);
div(phi,k)                  bounded Gauss linearUpwind grad(k);
div(phi,omega)                bounded Gauss linearUpwind grad(omega);
}

for a k-omega turbulence model and second order upwind schemes for the divergence terms.

immortality May 27, 2013 12:33

thanks Philip
yes,I use version 2.2.0
now I'm using rhoCentralFoam and it doesn't have a div(phi,U) in it.
what to do with div(phi) instead?
my case is unsteady and compressible.
when we have to use bounded keyword?what conditions the problem should have?
thanks.

wyldckat May 27, 2013 16:50

Greetings to all!

@Ehsan: "bounded" is the default option that OpenFOAM 2.2 indicates it will use, if not present in the respective line.
For more information on this characteristic, see section "4.4.2 Surface normal gradient schemes" on the User Guide.
Personally, I have no clue when "bounded" or other methods should be used... But the descriptions shown in the User Guide seem self-explanatory!?

And as Phillip hinted, the problem you were having was the missing "grad(epsilon)":
Code:

div(phi,epsilon) bounded Gauss linearUpwind grad(epsilon);
As for "div(phi)": if when you remove the respective line, the solver doesn't complain, then it's because it's not even used by the solver (because you have "default none;").

Best regards,
Bruno

immortality June 2, 2013 02:19

thanks.
You mean 'bounded' is related to snGrad ?or may be different to that?
I removed div(phi) without OF complaining.
Then OF uses a default method for this term in rhoCentralFoam?

wyldckat June 9, 2013 10:15

Quote:

Originally Posted by immortality (Post 431413)
I removed div(phi) without OF complaining.
Then OF uses a default method for this term in rhoCentralFoam?

I can only assume that "div(phi)" is simply not calculated, because of the "default none;" entry in "divSchemes".

Quote:

Originally Posted by immortality (Post 431413)
You mean 'bounded' is related to snGrad ?or may be different to that?

Well, apparently there are a few usages of the "bounded" word going around in OpenFOAM's source code :( I only mentioned the ones I found in the User Guide, which referred to the surface gradients...

But after looking at the source code, here's what I found:
  • From the file "src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.H"

    Quote:

    Bounded form of the selected convection scheme.

    Boundedness is achieved by subtracting div(phi)*vf or Sp(div(phi), vf)
    which is non-conservative if div(phi) != 0 but conservative otherwise.

    Can be used for convection of bounded scalar properties in steady-state
    solvers to improve stability if insufficient convergence of the pressure
    equation causes temporary divergence of the flux field.
  • There are a few other files that mention the word "bounded", but seem to be unrelated to this one above.

immortality June 9, 2013 11:37

thanks.
so bounded schemes can be only used in steady-state runs as i have understood.
many thanks.

Tobi June 9, 2013 12:24

Hi,

you can use the bounded scheme in non steady-state cases too.

http://www.openfoam.org/version2.2.0/numerics.php

The functionallity of that scheme is defined in the libOpenSmoke thread.

immortality June 9, 2013 13:07

yes I forgot about that thread.but I yet don't know exactly when bounded scheme should be used.
my case is compressible and unsteady and haven't a convergence problem.
then should I use bounded?
the fvScheme I use is this,is it correct or which changes I have to do?
Code:

fluxScheme      Kurganov;

ddtSchemes
{
    default        CrankNicolson .5;
    //ddt(rho)        CrankNicolson .5;
    //ddt(rhoU)      CrankNicolson .5;
    //ddt(rhoE)      Euler;
    //ddt(rho,U)      Euler;
    //ddt(rho,e)      Euler;
    //ddt(rho,h)      Euler;
    //ddt(rho,omega)  Euler;
    //ddt(rho,k)      Euler;
    //ddt(rho,gas)    Euler;
}

gradSchemes
{
    default        none;
    grad(U) Gauss linear;
    grad(rho) Gauss linear;
    grad(rhoU) Gauss linear;
    grad((1|psi)) Gauss linear;
    grad(e) Gauss linear;
    grad((1|thermo:psi)) Gauss linear;
    grad(h) Gauss linear;
    grad(sqrt(((Cp|Cv)*(1|psi)))) Gauss linear;
    grad(sqrt(((Cp|Cv)*(1|thermo:psi)))) Gauss linear;
    grad(T) Gauss linear;
    grad(omega) cellMDLimited Gauss linear 1;
    grad(k) cellMDLimited Gauss linear 1;
    grad(gas) Gauss linear;
    grad(epsilon) Gauss linear;
}

divSchemes
{
    default none;
    div(tauMC) Gauss linear;
    div(phi) bounded Gauss linearUpwindV;
    div(phi,omega) bounded Gauss linearUpwind grad(omega);
    div(phi,k) bounded Gauss linearUpwind grad(k);
    div(phi,gas) Gauss limitedLimitedLinear 1 0 1;
    div(phi,epsilon) bounded Gauss linearUpwind grad(epsilon);
}

laplacianSchemes
{
    default        none;
    laplacian(muEff,U) Gauss linear corrected;
    laplacian(alphaEff,e) Gauss linear corrected;
    laplacian(alpha,e) Gauss linear corrected;
    laplacian(k,T) Gauss linear corrected;
    laplacian(DepsilonEff,omega) Gauss linear corrected;
    laplacian(DkEff,k) Gauss linear corrected;
    laplacian(DomegaEff,omega) Gauss linear corrected;
    laplacian(alphaEff,h) Gauss linear corrected;
    laplacian(muEff,gas) Gauss linear corrected;
    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
}

interpolationSchemes
{
    default none;
    reconstruct(rho) vanLeer;
    reconstruct(U) vanLeerV;
    reconstruct(T) vanLeer;
    interpolate(rho) linear;
    interpolate(U) linear;
    interpolate(rhoU) linear;
    interpolate(muEff) linear;
    interpolate(tauMC) linear;
}

snGradSchemes
{
    default none;

    snGrad(U) corrected;

}


s.m August 20, 2013 06:57

hi
can any one explian that what is the definition of bounded and unbounded schemes, e.g in this table for explain behaviour of interpolation schemes,
which one is better, bounded or unbounded schemes?


Table 4.10. Behaviour of interpolation schemes used in divSchemes
linear : Second order, unbounded
skewLinear : Second order, (more) unbounded, skewness correction
cubicCorrected : Fourth order, unbounded
upwind : First order, bounded
linearUpwind : First/second order, bounded
QUICK : First/second order, bounded
TVD schemes : First/second order, bounded
SFCD : Second order, bounded
NVD schemes : First/second order, bounded

wyldckat August 21, 2013 06:51

Hi Saeideh,

You can find some notions of what "bounded" is on the Programmers Guide: http://foam.sourceforge.net/docs/Gui...mmersGuide.pdf
Some more mentions are here: http://www.cfd-online.com/Wiki/Appro...grids_-_Common

From the following link - http://cfd.mace.manchester.ac.uk/twi...s/cfd1-pt1.pdf - I quote:
Quote:

Originally Posted by http://cfd.mace.manchester.ac.uk/twiki/pub/Main/TimCraftNotes_All_Access/cfd1-pt1.pdf
Boundedness
  • Ensures that the numerical solution lies within physical bounds.
  • For example, in a heat conduction problem the minimum and maximum temperatures should occur on the domain boundaries. A bounded scheme would not produce spurious maxima/minima within the domain.
  • Higher order discretization schemes (which one might want to use for accuracy) can often produce unbounded solutions in the form of undershoots and overshoots, which can sometimes lead to stability and convergence problems.

Best regards,
Bruno

s.m August 21, 2013 08:45

Quote:

Originally Posted by wyldckat (Post 447107)
Hi Saeideh,

You can find some notions of what "bounded" is on the Programmers Guide: http://foam.sourceforge.net/docs/Gui...mmersGuide.pdf
Some more mentions are here: http://www.cfd-online.com/Wiki/Appro...grids_-_Common

From the following link - http://cfd.mace.manchester.ac.uk/twi...s/cfd1-pt1.pdf - I quote:


Best regards,
Bruno

Thank you very Much, they were too usefull.


All times are GMT -4. The time now is 00:46.