Fvschemes & Fvsolution For Steady State and Transient Simuations

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

fvSchemes & fvSolution for steady State Simulations and Transient

Simulations of a Complex Geometry:


The following discussion is intended to put forward techniques to overcome computatio na l
stiffness, especially when running simulations with a complex Geometry Mesh; one such
geometry meshed using the snappyHexMesh tool. Let us assume that a Mesh was generated
around a Car or say an offshore structure. In that, the Walls of the CAD geometry was resolved
to a very refined, structured boundary layer Mesh. On running the checkMesh command we
realize that the domain has non-orthogonal cells(say non-orthogonality =49). It is now that one
has to adopt strategies to overcome the simulation from blowing up .

Steady state case simpleFoam:


simpleFoam can be used to predict drag of a complex geometry, or can be used to approximate
drag for a simulation-which by nature is transient. Sometimes controlling the simpleFoa m
solver can be a bit hard, for reasons that the simulation starts to blow up only having run few
time steps. This can be evident from a very high absurd values of Cd the solver showcases. In
that case, the following steps can be adopted to control the simulation :

Turn off the turbulence; run the case on laminar mode. Let the simulation run on this
mode until the values of Cd becomes steady. After which the turbulence mode can be
turned on. The solver will not solve for k and omega when the simulation runs on
laminar mode.

Start with a second order accurate scheme, once when the values start to converge
change the simulation to second order accurate schemes.

relaxationFactors in fvSolution can be decreased to something like:

equations
{
U

0.5;

0.7;

Omega 0.7;
}

A good fvScheme for simpleFoam :


ddtSchemes
{
default
}

steadyState;

gradSchemes
{
default
Gauss linear;
grad(U)
cellLimited Gauss linear 1;
}
divSchemes
{
default
none;
div(phi,U)
bounded Gauss linearUpwindV grad(U);
div(phi,k)
bounded Gauss upwind;
div(phi,omega) bounded Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default
Gauss linear corrected;
}
interpolationSchemes
{
default
linear;
}
snGradSchemes
{
default
corrected;
}
fluxRequired
{
default
p;
}

no;

Understanding how the fvSolution parameters influence the simulation, is very important in
running the pimpleFoam solver. To run the pimpleFoam solver, one has to set
nOuterCorrectors = 2. Once the nOuterCorrectors is set to a value of 1, the pimpleFoam solver
runs in the piso mode. Running in the piso mode the Courant number should be set to 1(Co
=1). When the Courant number is increased the Solver cannot afford a relaxation and the
following values of relaxation should be adhered to.
relaxationFactors
{
fields
{
}
equations
{
"U.*"

1;

"kl.*"

1;

"kt.*"

1;

"omega.*"

1;

}
}

The only time relaxation of the above flow variable can be altered is when the simulation is run on
pimple mode. That will be something like the following:

relaxationFactors
{
fields
{
P

0.3;

}
equations
{
U

0.7;

0.7;

omega

0.7;

}
}
And this is done to bring the pressure residuals down. When the solver appears stiff and the
simulations appears to blow up, the relaxationFactor can be decreased.
An exception would be that there are tutorials in the OpenFoam folder that run pimpleFoam in piso
mode (nOuterCorrector=1) at high Courant numbers(Co =2.5-5), although it is recommended that
courant number should be increased only when running in pimple mode. In any case, relaxationFactor
cannot be altered in the piso mode, even when the pressure residuals do not come down over time.

All the above given info is true to my knowledge as per my experience with simulations. But this
offering is not endorsed by any institute or www.openfoam.com. And so user discretion is required in
order to take information from the above offering.

You might also like