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

pisoFoam - unstable pressure residual

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 27, 2013, 17:25
Default pisoFoam - unstable pressure residual
  #1
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
I am looking to get some help figuring out why my pressure residual keeps rising. I am conducting an LES simulation; the mesh is pretty good quality (pure hexahedral), and mesh and boundary conditions are stable in FLUENT. But I need to implement this in OpenFOAM. Could someone take a look at my dictionaries and see if I am missing something? BTW I solved a steady-state using simpleFoam, which was fine, converged nicely.

I keep the Co number less than 0,5; even going as low as 0.05, but to no avail.

U
"/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
INLET
{
type fixedValue;
value uniform (0.32 0 0);
}

OUTLET
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}

WALLS
{
type fixedValue;
value uniform (0 0 0);
}

LEAFLETSURFACE1
{
type fixedValue;
value uniform (0 0 0);
}

LEAFLETSURFACE2
{
type fixedValue;
value uniform (0 0 0);
}

BACKWALL
{
type fixedValue;
value uniform (0 0 0);
}
}
"
p

"/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
INLET
{
type zeroGradient;
}

OUTLET
{
type fixedValue;
value uniform 0;
}

WALLS
{
type zeroGradient;
}

BACKWALL
{
type zeroGradient;
}

LEAFLETSURFACE1
{
type zeroGradient;
}

LEAFLETSURFACE2
{

type zeroGradient;
}
}"


Really appreciate the help everyone.

Cheers
Industrial_CFD is offline   Reply With Quote

Old   January 27, 2013, 17:30
Default Update
  #2
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
Scheme, solution and control dictionaries

Schemes
"
solvers
{
p
{
solver GAMG;
preconditioner DIC;
agglomerator faceAreaPair;
tolerance 1e-05;
relTol 0;
nCellsInCoarsestLevel 25;
mergeLevels 1;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
//maxIter 10;

}

pFinal
{
solver GAMG;
preconditioner DIC;
agglomerator faceAreaPair;
tolerance 1e-05;
relTol 0;
nCellsInCoarsestLevel 25;
mergeLevels 1;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
//maxIter 10;
}

U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}

k
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}

B
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}

nuTilda
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}
}

PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 10;
}

relaxationFactors
{
fields
{
p 0.3;
}
equations
{
U 0.7;
k 0.7;
B 0.7;
nuTilda 0.7;
}
}"

Solution

"
ddtSchemes
{
default backward;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss linear;
div(phi,k) Gauss linear;
div(phi,B) Gauss linear;
div(phi,nuTilda) Gauss linear;
div(B) Gauss linear;
div((nuEff*dev(T(grad(U))))) Gauss linear ;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DBEff,B) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
default linear;

}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}
"

Control
"application pisoFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 1.8e-03;

deltaT 5e-06;

writeControl timeStep;

writeInterval 100;

purgeWrite 1;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;
"
Industrial_CFD is offline   Reply With Quote

Old   January 27, 2013, 21:24
Default
  #3
Member
 
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 15
msuaeronautics is on a distinguished road
I strongly suggest two things you should try, the most important one first and the latter one you don't have to but should.

First, change your div(phi,U) scheme to linear upwind. The syntax for this is below (this is in OpenFoam 2.0.0)

Quote:
Gauss linearUpwind grad(U);
Secondly, I see you attempted to cap the number of p and pFinal iterations to 10. This actually might be very helpful, but increase the number to something around 100.

I have run a few submarine simulations using pisoFoam and LES. Both these things helped, but the scheme change helped the most by far.

Can you also post a few iterations from your output file?
msuaeronautics is offline   Reply With Quote

Old   January 28, 2013, 17:24
Default Update
  #4
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
I have implemented that scheme. I will update you and let you know how it goes. DO you think upwinding this term will cause too much numerical dissipation?

Cheers: Adam
Industrial_CFD is offline   Reply With Quote

Old   January 28, 2013, 18:11
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
dear msuaeronautics could you have a look to my schemes how to change to have a better schemes?
thanks a lot for your consideration.
fvSchemes:

Code:
ddtSchemes
{
    default         CrankNicholson 0.5;
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
    grad(U)         faceLimited leastSquares 1.0;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss linearUpwind grad(U);
    div(phid,p)     Gauss limitedLinear 1;
    div(phi,K)      Gauss upwind;
    div(phi,h)      Gauss limitedLinear 1;
    div(phi,k)      Gauss limitedLinear 1;
    div(phi,epsilon) Gauss limitedLinear 1;
    div(phi,R)      Gauss limitedLinear 1;
    div(phi,omega)  Gauss limitedLinear 1;
    div((rho*R))    Gauss upwind;
    div(R)          Gauss upwind;
    div(U)          Gauss upwind;
    div((muEff*dev2(T(grad(U))))) Gauss linear;
    div(tauMC)  Gauss linear;
}

laplacianSchemes
{
    default         none;
    laplacian(muEff,U) Gauss linear uncorrected;
    laplacian(mut,U) Gauss linear uncorrected;
    laplacian(DkEff,k) Gauss linear uncorrected;
    laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
    laplacian(DREff,R) Gauss linear uncorrected;
    laplacian(DomegaEff,omega) Gauss linear uncorrected;
    laplacian((rho*(1|A(U))),p) Gauss linear uncorrected;
    laplacian(alphaEff,h) Gauss linear uncorrected;
    laplacian(k,T)   Gauss linear uncorrected;  
    laplacian(alpha,e) Gauss linear uncorrected;
    laplacian(alphaEff,e)  Gauss linear uncorrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         uncorrected;
}

fluxRequired
{
    default         no;
    p               ;
}
fvSolution:

Code:
solvers
{
    p
    {
       /*solver PCG;
       preconditioner DIC;
       tolerance  1e-12;
       relTol 0;*/

     solver          GAMG;
        smoother  DICGaussSeidel;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 500;
        nPreSweeps      0;
        nPostSweeps     2;
        nFinestSweeps   2;
        agglomerator  faceAreaPair;
        mergeLevels 2;
        tolerance       1e-012;
        relTol          0;
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    "rho.*"
    {
        $p;
        tolerance       1e-11;
        relTol          0;
    }

    "(U|e|h|R|k|epsilon|omega)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-11;
        relTol          0;
        maxIter 25000;
    }

    "(U|h|R|k|epsilon|omega)Final"
    {
        $U;
        relTol          0;
    }
}


PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 3;
    nCorrectors     3;
    nNonOrthogonalCorrectors 0;
    rhoMin          rhoMin [ 1 -3 0 0 0 ] 0.2;
    rhoMax          rhoMax [ 1 -3 0 0 0 ] 9;

residualControl
    {
        "(U|k|omega)"
        {
            relTol          0;
            tolerance       0.000000001;
        }
    }
}
thanks again.
immortality is offline   Reply With Quote

Old   January 28, 2013, 18:29
Default Update
  #6
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
HI msu,

I tried implementing the new scheme as you suggested; however it looks like the solution is still unstable. I was flirting with Co = 0,5, so I am going to lower the timestep by an order of magnitude to see if that helps at all. I have a feeling it is my boundary conditions. I am use to (spoiled) CFX/FLUENT, so the software basically ensures the proper BCs are selected based on the simulation type. Would you mind looking over my text files? I feel I am close, since the mesh and case works in FLUENT.

Cheers: Adam
Industrial_CFD is offline   Reply With Quote

Old   January 28, 2013, 18:31
Default Update
  #7
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
BTW,

Here is my log file printout:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.0-0bc225064152
Exec : pisoFoam -parallel
Date : Jan 28 2013
Time : 16:54:10
Host : "adam-desktop"
PID : 5905
Case : /home/adam/OpenFOAM/adam-2.1.0/run/tutorials/incompressible/pisoFoam/hvles/ICEM_Mesh
nProcs : 3
Slaves :
2
(
"adam-desktop.5906"
"adam-desktop.5907"
)

Pstream initialized with:
floatTransfer : 0
nProcsSimpleSum : 0
commsType : nonBlocking
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type LESModel
Selecting LES turbulence model Smagorinsky
SmagorinskyCoeffs
{
filter simple;
ce 1.048;
ck 0.094;
}


Starting time loop

Time = 5e-06

Courant Number mean: 3.91885e-06 max: 0.000809022
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.9278e-07, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 5.79668e-07, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 8.0736e-07, No Iterations 1
GAMG: Solving for p, Initial residual = 1, Final residual = 9.84125e-06, No Iterations 316
GAMG: Solving for p, Initial residual = 0.0239126, Final residual = 9.44877e-06, No Iterations 57
GAMG: Solving for p, Initial residual = 0.00573113, Final residual = 9.31698e-06, No Iterations 57
time step continuity errors : sum local = 2.6016e-08, global = -5.32965e-09, cumulative = -5.32965e-09
GAMG: Solving for p, Initial residual = 0.0029541, Final residual = 9.352e-06, No Iterations 37
GAMG: Solving for p, Initial residual = 0.00176045, Final residual = 9.55465e-06, No Iterations 28
GAMG: Solving for p, Initial residual = 0.00113938, Final residual = 9.88603e-06, No Iterations 18
time step continuity errors : sum local = 2.78767e-08, global = 8.83835e-09, cumulative = 3.5087e-09
ExecutionTime = 330.97 s ClockTime = 334 s

Time = 1e-05

Courant Number mean: 0.00247512 max: 0.379089
DILUPBiCG: Solving for Ux, Initial residual = 0.896973, Final residual = 8.07473e-09, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.329405, Final residual = 1.83947e-09, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.338451, Final residual = 9.96146e-06, No Iterations 1
GAMG: Solving for p, Initial residual = 0.0160771, Final residual = 9.34229e-06, No Iterations 170
GAMG: Solving for p, Initial residual = 0.175421, Final residual = 9.36675e-06, No Iterations 92
GAMG: Solving for p, Initial residual = 0.0523747, Final residual = 9.49166e-06, No Iterations 95
time step continuity errors : sum local = 3.07509e-09, global = 6.03653e-10, cumulative = 4.11235e-09
GAMG: Solving for p, Initial residual = 0.0273851, Final residual = 9.48644e-06, No Iterations 69
GAMG: Solving for p, Initial residual = 0.0177397, Final residual = 9.47844e-06, No Iterations 56
GAMG: Solving for p, Initial residual = 0.0119949, Final residual = 9.37767e-06, No Iterations 38
time step continuity errors : sum local = 3.12546e-09, global = 7.41131e-10, cumulative = 4.85348e-09
ExecutionTime = 671.41 s ClockTime = 679 s

Time = 1.5e-05

Courant Number mean: 0.00258897 max: 0.419215
DILUPBiCG: Solving for Ux, Initial residual = 0.344173, Final residual = 3.81834e-06, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.0599225, Final residual = 1.77624e-06, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.0811998, Final residual = 1.93254e-06, No Iterations 1
GAMG: Solving for p, Initial residual = 0.0984746, Final residual = 9.80077e-06, No Iterations 178
GAMG: Solving for p, Initial residual = 0.0589744, Final residual = 9.95854e-06, No Iterations 51
GAMG: Solving for p, Initial residual = 0.0229215, Final residual = 9.65347e-06, No Iterations 49
time step continuity errors : sum local = 2.05256e-09, global = -3.96244e-10, cumulative = 4.45724e-09
GAMG: Solving for p, Initial residual = 0.0191667, Final residual = 8.85689e-06, No Iterations 39
GAMG: Solving for p, Initial residual = 0.0177382, Final residual = 8.33729e-06, No Iterations 21
GAMG: Solving for p, Initial residual = 0.0175461, Final residual = 9.41587e-06, No Iterations 16
time step continuity errors : sum local = 2.01745e-09, global = -3.88969e-10, cumulative = 4.06827e-09
ExecutionTime = 905.06 s ClockTime = 914 s

Time = 2e-05

Courant Number mean: 0.00263949 max: 0.437453
DILUPBiCG: Solving for Ux, Initial residual = 0.269823, Final residual = 3.86531e-06, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.0335224, Final residual = 2.23216e-06, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.0426193, Final residual = 1.84547e-06, No Iterations 1
GAMG: Solving for p, Initial residual = 0.0671635, Final residual = 9.89268e-06, No Iterations 132
GAMG: Solving for p, Initial residual = 0.0822601, Final residual = 9.68393e-06, No Iterations 36
GAMG: Solving for p, Initial residual = 0.068387, Final residual = 8.89289e-06, No Iterations 38
time step continuity errors : sum local = 9.64269e-10, global = 1.54725e-10, cumulative = 4.22299e-09
GAMG: Solving for p, Initial residual = 0.0716998, Final residual = 9.40588e-06, No Iterations 22
GAMG: Solving for p, Initial residual = 0.0748368, Final residual = 9.0256e-06, No Iterations 26
GAMG: Solving for p, Initial residual = 0.0783009, Final residual = 9.37482e-06, No Iterations 40
time step continuity errors : sum local = 1.02744e-09, global = -3.10414e-10, cumulative = 3.91258e-09
ExecutionTime = 1103.4 s ClockTime = 1114 s

Time = 2.5e-05

Courant Number mean: 0.00264223 max: 0.439232
DILUPBiCG: Solving for Ux, Initial residual = 0.123124, Final residual = 4.64148e-08, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.0245945, Final residual = 5.50988e-06, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.029589, Final residual = 4.42106e-06, No Iterations 1
GAMG: Solving for p, Initial residual = 0.179635, Final residual = 9.81425e-06, No Iterations 144
GAMG: Solving for p, Initial residual = 0.243531, Final residual = 9.5501e-06, No Iterations 61
GAMG: Solving for p, Initial residual = 0.250189, Final residual = 9.48497e-06, No Iterations 64
time step continuity errors : sum local = 6.54896e-10, global = 2.12459e-10, cumulative = 4.12504e-09
GAMG: Solving for p, Initial residual = 0.265897, Final residual = 8.92568e-06, No Iterations 65
GAMG: Solving for p, Initial residual = 0.284315, Final residual = 9.40306e-06, No Iterations 66
GAMG: Solving for p, Initial residual = 0.290986, Final residual = 9.02112e-06, No Iterations 66
time step continuity errors : sum local = 6.71955e-10, global = -2.06005e-10, cumulative = 3.91903e-09
ExecutionTime = 1398.48 s ClockTime = 1411 s

Time = 3e-05

Courant Number mean: 0.00263927 max: 0.433526
DILUPBiCG: Solving for Ux, Initial residual = 0.0538373, Final residual = 7.37212e-08, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.0204126, Final residual = 1.1062e-08, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.0188419, Final residual = 2.28729e-08, No Iterations 2
GAMG: Solving for p, Initial residual = 0.472397, Final residual = 9.45574e-06, No Iterations 122
GAMG: Solving for p, Initial residual = 0.546436, Final residual = 9.12948e-06, No Iterations 79
GAMG: Solving for p, Initial residual = 0.585044, Final residual = 8.95127e-06, No Iterations 85
time step continuity errors : sum local = 6.73667e-10, global = -9.83321e-11, cumulative = 3.8207e-09
GAMG: Solving for p, Initial residual = 0.596208, Final residual = 9.6783e-06, No Iterations 79
GAMG: Solving for p, Initial residual = 0.643603, Final residual = 9.04489e-06, No Iterations 87
GAMG: Solving for p, Initial residual = 0.628462, Final residual = 9.57861e-06, No Iterations 85
time step continuity errors : sum local = 8.8126e-10, global = 1.12988e-10, cumulative = 3.93369e-09
ExecutionTime = 1733.64 s ClockTime = 1750 s

Time = 3.5e-05

Courant Number mean: 0.00264827 max: 0.795428
DILUPBiCG: Solving for Ux, Initial residual = 0.032021, Final residual = 7.87142e-07, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.0351896, Final residual = 3.93019e-07, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.025715, Final residual = 4.18695e-07, No Iterations 2
GAMG: Solving for p, Initial residual = 0.797142, Final residual = 9.76751e-06, No Iterations 85
GAMG: Solving for p, Initial residual = 0.779713, Final residual = 9.82709e-06, No Iterations 91
GAMG: Solving for p, Initial residual = 0.83697, Final residual = 9.37075e-06, No Iterations 91
time step continuity errors : sum local = 1.31314e-09, global = -2.13586e-10, cumulative = 3.7201e-09
GAMG: Solving for p, Initial residual = 0.829189, Final residual = 9.62978e-06, No Iterations 87
GAMG: Solving for p, Initial residual = 0.874832, Final residual = 8.79269e-06, No Iterations 91
GAMG: Solving for p, Initial residual = 0.849942, Final residual = 9.68367e-06, No Iterations 83
time step continuity errors : sum local = 1.90408e-09, global = 4.02444e-10, cumulative = 4.12255e-09
ExecutionTime = 2076.11 s ClockTime = 2096 s

Time = 4e-05

Courant Number mean: 0.00270431 max: 2.20807
DILUPBiCG: Solving for Ux, Initial residual = 0.0464676, Final residual = 8.29943e-06, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.0870791, Final residual = 9.52937e-06, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.0609628, Final residual = 2.05242e-07, No Iterations 3
^Cmpirun: killing job...
Industrial_CFD is offline   Reply With Quote

Old   January 28, 2013, 19:29
Default
  #8
Member
 
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 15
msuaeronautics is on a distinguished road
Quote:
Originally Posted by Industrial_CFD View Post
HI msu,

I tried implementing the new scheme as you suggested; however it looks like the solution is still unstable. I was flirting with Co = 0,5, so I am going to lower the timestep by an order of magnitude to see if that helps at all. I have a feeling it is my boundary conditions. I am use to (spoiled) CFX/FLUENT, so the software basically ensures the proper BCs are selected based on the simulation type. Would you mind looking over my text files? I feel I am close, since the mesh and case works in FLUENT.

Cheers: Adam
Lowering the timestep probably won't help much if the solution is diverging after a few minutes of running.

Might I ask about this parameter in your fvSolution file?

Quote:
nNonOrthogonalCorrectors 10;
Have you tried reducing these correctors? Usually, when necessary, no more than 3 non-orthogonals are sufficient, at least by my judgement.


Quote:
Originally Posted by immortality View Post
dear msuaeronautics could you have a look to my schemes how to change to have a better schemes?
thanks a lot for your consideration.
fvSchemes:

Code:
ddtSchemes
{
    default         CrankNicholson 0.5;
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
    grad(U)         faceLimited leastSquares 1.0;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss linearUpwind grad(U);
    div(phid,p)     Gauss limitedLinear 1;
    div(phi,K)      Gauss upwind;
    div(phi,h)      Gauss limitedLinear 1;
    div(phi,k)      Gauss limitedLinear 1;
    div(phi,epsilon) Gauss limitedLinear 1;
    div(phi,R)      Gauss limitedLinear 1;
    div(phi,omega)  Gauss limitedLinear 1;
    div((rho*R))    Gauss upwind;
    div(R)          Gauss upwind;
    div(U)          Gauss upwind;
    div((muEff*dev2(T(grad(U))))) Gauss linear;
    div(tauMC)  Gauss linear;
}

laplacianSchemes
{
    default         none;
    laplacian(muEff,U) Gauss linear uncorrected;
    laplacian(mut,U) Gauss linear uncorrected;
    laplacian(DkEff,k) Gauss linear uncorrected;
    laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
    laplacian(DREff,R) Gauss linear uncorrected;
    laplacian(DomegaEff,omega) Gauss linear uncorrected;
    laplacian((rho*(1|A(U))),p) Gauss linear uncorrected;
    laplacian(alphaEff,h) Gauss linear uncorrected;
    laplacian(k,T)   Gauss linear uncorrected;  
    laplacian(alpha,e) Gauss linear uncorrected;
    laplacian(alphaEff,e)  Gauss linear uncorrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         uncorrected;
}

fluxRequired
{
    default         no;
    p               ;
}
fvSolution:

Code:
solvers
{
    p
    {
       /*solver PCG;
       preconditioner DIC;
       tolerance  1e-12;
       relTol 0;*/

     solver          GAMG;
        smoother  DICGaussSeidel;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 500;
        nPreSweeps      0;
        nPostSweeps     2;
        nFinestSweeps   2;
        agglomerator  faceAreaPair;
        mergeLevels 2;
        tolerance       1e-012;
        relTol          0;
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    "rho.*"
    {
        $p;
        tolerance       1e-11;
        relTol          0;
    }

    "(U|e|h|R|k|epsilon|omega)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-11;
        relTol          0;
        maxIter 25000;
    }

    "(U|h|R|k|epsilon|omega)Final"
    {
        $U;
        relTol          0;
    }
}


PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 3;
    nCorrectors     3;
    nNonOrthogonalCorrectors 0;
    rhoMin          rhoMin [ 1 -3 0 0 0 ] 0.2;
    rhoMax          rhoMax [ 1 -3 0 0 0 ] 9;

residualControl
    {
        "(U|k|omega)"
        {
            relTol          0;
            tolerance       0.000000001;
        }
    }
}
thanks again.
What are you looking to improve? I have an affinity for backward time schemes and linearUpwind for div, though every case is different.
msuaeronautics is offline   Reply With Quote

Old   January 28, 2013, 19:31
Default Reply
  #9
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
I reduced those to 2, but it didn't improve the situation. I also reduced the timestep, and it didn't help either. Might I send you my boundary dictionaries? Ithink I may have accidentally set a boundary value incorrectly...but I don't see it. Although, as I mentioned, I usually use commercial solvers.

Cheers: Adam
Industrial_CFD is offline   Reply With Quote

Old   January 28, 2013, 19:57
Default
  #10
Member
 
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 15
msuaeronautics is on a distinguished road
Quote:
Originally Posted by Industrial_CFD View Post
I reduced those to 2, but it didn't improve the situation. I also reduced the timestep, and it didn't help either. Might I send you my boundary dictionaries? Ithink I may have accidentally set a boundary value incorrectly...but I don't see it. Although, as I mentioned, I usually use commercial solvers.

Cheers: Adam
Let's see them.

I also wonder if GAMG for pressure has anything to do with this, though I can't say for sure.
msuaeronautics is offline   Reply With Quote

Old   January 28, 2013, 20:27
Default Dictionaries
  #11
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
'B'
FoamFile
{
version 2.0;
format ascii;
class volTensorField;
object B;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform (0 0 0 0 0 0 0 0 0);

boundaryField
{
INLET
{
type fixedValue;
value uniform (0 0 0 0 0 0 0 0 0);
}

OUTLET
{
type inletOutlet;
inletValue uniform (0 0 0 0 0 0 0 0 0);
value uniform (0 0 0 0 0 0 0 0 0);
}

WALLS
{
type zeroGradient;
}

LEAFLETSURFACE1
{
type zeroGradient;
}

LEAFLETSURFACE2
{
type zeroGradient;
}

BACKWALL
{
type zeroGradient;
}
}

'k'
dimensions [0 2 -2 0 0 0 0];

internalField uniform 1e-10;

boundaryField
{
INLET
{
type fixedValue;
value uniform 1e-10;
}

OUTLET
{
type inletOutlet;
inletValue uniform 1e-10;
value uniform 1e-10;
}

WALLS
{
type fixedValue;
value uniform 1e-10;
}

BACKWALL
{
type fixedValue;
value uniform 1e-10;
}

LEAFLETSURFACE1
{
type fixedValue;
value uniform 1e-10;
}

LEAFLETSURFACE2
{
type fixedValue;
value uniform 1e-10;
}
}

// ************************************************** *********************** //

'nusgs'
* //

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

internalField uniform 0;

boundaryField
{
INLET
{
type zeroGradient;
}

OUTLET
{
type zeroGradient;
}

WALLS
{
type zeroGradient;
}

LEAFLETSURFACE1
{
type zeroGradient;
}

LEAFLETSURFACE2
{
type zeroGradient;
}

BACKWALL
{
type zeroGradient;
}
}

// *********

'nutilda'


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

internalField uniform 0;

boundaryField
{
INLET
{
type fixedValue;
value uniform 0;
}

OUTLET
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}

WALLS
{
type fixedValue;
value uniform 0;
}

LEAFLETSURFACE1
{
type fixedValue;
value uniform 0;
}

LEAFLETSURFACE2
{
type fixedValue;
value uniform 0;
}

BACKWALL
{
type fixedValue;
value uniform 0;
}
}

//

'p'


dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
INLET
{
type zeroGradient;
}

OUTLET
{
type fixedValue;
value uniform 0;
}

WALLS
{
type zeroGradient;
}

BACKWALL
{
type zeroGradient;
}

LEAFLETSURFACE1
{
type zeroGradient;
}

LEAFLETSURFACE2
{

type zeroGradient;
}
}

'U'
dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
INLET
{
type fixedValue;
value uniform (0.32 0 0);
}

OUTLET
{
type outletInlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}

WALLS
{
type fixedValue;
value uniform (0 0 0);
}

LEAFLETSURFACE1
{
type fixedValue;
value uniform (0 0 0);
}

LEAFLETSURFACE2
{
type fixedValue;
value uniform (0 0 0);
}

BACKWALL
{
type fixedValue;
value uniform (0 0 0);
}
}

// ************


Thanks a lot for taking a look. I am really perplexed...

Cheers: Adam
Industrial_CFD is offline   Reply With Quote

Old   January 29, 2013, 07:19
Default
  #12
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
I want to improve stability.my problem is unsteady compressible with rhoPimpleFoam or rhoCentralFoam.my geometry is simple with rectangular cells and BC's are varying with time.I'm simulating Wave Rotor if you have ever heard about it.
thanks.
immortality is offline   Reply With Quote

Old   January 29, 2013, 14:00
Default Update
  #13
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
I am starting to wonder if my mesh was somehow improperly converted from a fluent3d mesh to an openfoam mesh. I can't find any problems with my boundary conditions, and if I use the same mesh in FLUENT it converges with no problem, even with a pretty similar setup.

FLUENT settings:

PISO solver, 1 skewness correction
Gradient Schemes: Gauss cell based
Pressure Scheme: Second order
Momentum Scheme: Central Differencing

Transient: Second order implicit

AMG solver settings
Smoother> Gauss-Seidel
0 pre sweeps
1 post sweep
Standard Limiter (cell to face)
Industrial_CFD is offline   Reply With Quote

Old   January 29, 2013, 22:42
Default
  #14
Member
 
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 15
msuaeronautics is on a distinguished road
With regards to your BC's, I'm wondering about the outletInlet condition. If I remember correctly, changing from an inletOutlet for my inlet U to just a fixedValue helped my LES sim.

Otherwise, you probably do have to consider the mesh, as you suggested. I suppose you ran checkMesh in OpenFOAM already?
msuaeronautics is offline   Reply With Quote

Old   January 30, 2013, 05:45
Default
  #15
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
dear msuaeronautics
Could you please have a look into my schemes and say what other changes are better to done for more stability?
As i told my case is unsteady,compressible with rhoCentralFoam.im looking forward to your answer.also could you send me your fvScheme and fvSolution?
Do you know anything about residualControl in rhoPimpleFoam and its duty?
Thank you.
immortality is offline   Reply With Quote

Old   January 30, 2013, 10:46
Default Reply
  #16
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
Msu,

Thank's for the advice. I will try that. The checkMesh shows some highly skewed cells, but the ICEM output doesn't. The min Orthagonal quality (in ICEM is 0.3), and the min Skew (in ICEM is 0.25), which is a very good mesh. But OpenFOAM is giving me errors about highly skewed cells.

Immortality,

It looks like you have a lot of upwinding, and limiters in your scheme; this should produce stable results. Do a checkMesh. Also post your BCs.

Cheers
Industrial_CFD is offline   Reply With Quote

Old   January 31, 2013, 21:54
Default Still no luck
  #17
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
FLUENT converges completely fine, but OpenFOAM blows up. Completely lost on what BC to implement....Anyone out there have any suggestions?
Industrial_CFD is offline   Reply With Quote

Old   February 2, 2013, 12:23
Default
  #18
Member
 
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 15
msuaeronautics is on a distinguished road
Did you ever try switching from GAMG?
msuaeronautics is offline   Reply With Quote

Old   February 2, 2013, 13:25
Default Reply
  #19
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
I currently still have GAMG, but I switched to pimplefoam which added some stability. The 'outflow' BC in fluent works brilliantly. That's the only difference I see, so I am trying to fix my outlet BC.
I am currently trying to compile fixedMeanValue, which should be more stable, the compilation isn't working though.
Industrial_CFD is offline   Reply With Quote

Old   February 21, 2013, 12:32
Default
  #20
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
did you compile that?can you send me the fixedMeanValue folder?
immortality 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
Floating point exception error Alan OpenFOAM Running, Solving & CFD 11 July 1, 2021 22:51
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 14:40
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
Low Mach number Compressible jet flow using LES ankgupta8um OpenFOAM Running, Solving & CFD 7 January 15, 2011 14:38
Unknown error sivakumar OpenFOAM Pre-Processing 9 September 9, 2008 13:53


All times are GMT -4. The time now is 19:10.