Compressible solver pEqn.H: Standardised the treatment of density
In rhoPimpleFoam, rhoSimpleFoam, buoyantPimpleFoam and buoyantSimpleFoam the density prediction step at the start of pEqn.H is now consistent between these solvers and the other compressible solvers. If the density is relaxed in the corrector it is now also relaxed following the predictor which improves consistency, stability and convergence.
This commit is contained in:
@ -1,6 +1,8 @@
|
|||||||
if ((!mesh.steady() && !pimple.simpleRho()) || pimple.consistent())
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
if (!pimple.transonic())
|
||||||
{
|
{
|
||||||
rho = thermo.rho();
|
rho.relax();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thermodynamic density needs to be updated by psi*d(p) after the
|
// Thermodynamic density needs to be updated by psi*d(p) after the
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
if (simple.consistent())
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
if (!simple.transonic())
|
||||||
{
|
{
|
||||||
rho = thermo.rho();
|
rho.relax();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const volScalarField rAU("rAU", 1.0/UEqn.A());
|
const volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||||
const surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
const surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
if (!mesh.steady() && !pimple.simpleRho())
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
if (!pimple.transonic())
|
||||||
{
|
{
|
||||||
rho = thermo.rho();
|
rho.relax();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thermodynamic density needs to be updated by psi*d(p) after the
|
// Thermodynamic density needs to be updated by psi*d(p) after the
|
||||||
|
|||||||
@ -1,5 +1,10 @@
|
|||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
if (!simple.transonic())
|
||||||
|
{
|
||||||
|
rho.relax();
|
||||||
|
}
|
||||||
|
|
||||||
const volScalarField rAU("rAU", 1.0/UEqn.A());
|
const volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||||
const surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
const surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
|
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
|
||||||
|
|||||||
@ -70,13 +70,13 @@ relaxationFactors
|
|||||||
fields
|
fields
|
||||||
{
|
{
|
||||||
p 0.3;
|
p 0.3;
|
||||||
rho 0.05;
|
rho 0.01;
|
||||||
}
|
}
|
||||||
equations
|
equations
|
||||||
{
|
{
|
||||||
U 0.7;
|
U 0.7;
|
||||||
|
e 0.7;
|
||||||
"(k|epsilon)" 0.7;
|
"(k|epsilon)" 0.7;
|
||||||
e 0.5;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,12 +18,11 @@ solvers
|
|||||||
{
|
{
|
||||||
p_rgh
|
p_rgh
|
||||||
{
|
{
|
||||||
solver GAMG;
|
solver GAMG;
|
||||||
tolerance 1e-7;
|
smoother DICGaussSeidel;
|
||||||
relTol 0.01;
|
|
||||||
|
|
||||||
smoother DICGaussSeidel;
|
|
||||||
|
|
||||||
|
tolerance 1e-7;
|
||||||
|
relTol 0.01;
|
||||||
}
|
}
|
||||||
|
|
||||||
"(U|h|k|epsilon|omega)"
|
"(U|h|k|epsilon|omega)"
|
||||||
|
|||||||
@ -34,7 +34,7 @@ divSchemes
|
|||||||
div(phi,k) bounded Gauss upwind;
|
div(phi,k) bounded Gauss upwind;
|
||||||
div(phi,epsilon) bounded Gauss upwind;
|
div(phi,epsilon) bounded Gauss upwind;
|
||||||
|
|
||||||
div(phi,Ekp) bounded Gauss linear;
|
div(phi,Ekp) Gauss linear;
|
||||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,9 @@ solvers
|
|||||||
{
|
{
|
||||||
p_rgh
|
p_rgh
|
||||||
{
|
{
|
||||||
solver PCG;
|
solver GAMG;
|
||||||
preconditioner DIC;
|
smoother DICGaussSeidel;
|
||||||
|
|
||||||
tolerance 1e-8;
|
tolerance 1e-8;
|
||||||
relTol 0.01;
|
relTol 0.01;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user