CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to get convergence with simpleFoam? (https://www.cfd-online.com/Forums/openfoam-solving/242891-how-get-convergence-simplefoam.html)

dennymathewalex May 17, 2022 13:58

How to get convergence with simpleFoam?
 
5 Attachment(s)
Hello Everyone,
I am trying to learn openFoam by simulating a flow inside a rectangular chamber (wall-blue) with inlet (green) and outlet (red)(see figures). I use inlet velocity of (1 0 0) and fixedValue (0 0 0) as outlet condition for Pressure. I created the geometry in salome and castellated mesh was created using snappyHexMesh. I ran the simulation till 2000 and even 6000 and I was not getting a convergent solution.

I checked the mesh using checkMesh and the output was OK.
I have attached the screenshot of the calculated value of velocity at time step 1802 and 1902.
Below I have pasted the boundary condition of velocity and Pressure.
I have also pasted the controDict, fvSolution and fvSchemes that I have used.
For this case what should be the steps to be followed to get a convergent solution?
Thank you for your support in advance :).

-------- Velocity Boundary File ----------------


internalField uniform (0 0 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (1 0 0);
}

outlet
{
type zeroGradient;
value uniform (0 0 0);
}

wall
{
type noSlip;
value uniform (0 0 0);
}

}

--------------- Pressure Boundary File ------------
internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform 0;
}

wall
{
type zeroGradient;
}

}


-------------- controlDict -----------------
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application simpleFoam;

startFrom startTime;

startTime 1;

stopAt endTime;

endTime 6000;

deltaT 1;

writeControl timeStep;

writeInterval 100;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;


---------- fvSchemes ----------------
ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;
div(phi,U) bounded Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

------------ fvSolution --------------
solvers
{
p
{
solver GAMG;
tolerance 1e-06;
relTol 0.1;
smoother GaussSeidel;
}

U
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-05;
relTol 0.1;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 0;
nCorrectors 3;
consistent yes;

residualControl
{
p 1e-2;
U 1e-3;
}
}

relaxationFactors
{
fields
{
p 1;
}
equations
{
U 0.9; // 0.9 is more stable but 0.95 more convergent
}
}

----------


All times are GMT -4. The time now is 12:58.