Handling of U under-relaxation in last corrector

This commit is contained in:
Hrvoje Jasak 2011-10-12 18:15:20 +01:00
parent ff4d293d87
commit 66f2690a2d
5 changed files with 44 additions and 9 deletions

View file

@ -7,9 +7,16 @@ tmp<fvVectorMatrix> UEqn
+ turbulence->divDevRhoReff(U)
);
if (oCorr == nOuterCorr-1)
if (oCorr == nOuterCorr - 1)
{
if (mesh.solutionDict().relax("UFinal"))
{
UEqn().relax(mesh.solutionDict().relaxationFactor("UFinal"));
}
else
{
UEqn().relax(1);
}
}
else
{

View file

@ -9,7 +9,14 @@ tmp<fvVectorMatrix> UEqn
if (oCorr == nOuterCorr-1)
{
if (mesh.solutionDict().relax("UFinal"))
{
UEqn().relax(mesh.solutionDict().relaxationFactor("UFinal"));
}
else
{
UEqn().relax(1);
}
}
else
{

View file

@ -5,13 +5,20 @@
+ turbulence->divDevReff(U)
);
if (ocorr != nOuterCorr - 1)
if (ocorr == nOuterCorr - 1)
{
UEqn.relax();
if (mesh.solutionDict().relax("UFinal"))
{
UEqn.relax(mesh.solutionDict().relaxationFactor("UFinal"));
}
else
{
UEqn.relax(mesh.solutionDict().relaxationFactor("UFinal"));
UEqn.relax(1);
}
}
else
{
UEqn.relax();
}
if (momentumPredictor)

View file

@ -7,9 +7,16 @@ tmp<fvVectorMatrix> UEqn
+ turbulence->divDevReff(U)
);
if (oCorr == nOuterCorr-1)
if (oCorr == nOuterCorr - 1)
{
if (mesh.solutionDict().relax("UFinal"))
{
UEqn().relax(mesh.solutionDict().relaxationFactor("UFinal"));
}
else
{
UEqn().relax(1);
}
}
else
{

View file

@ -15,9 +15,16 @@
);
if (oCorr == nOuterCorr-1)
{
if (mesh.solutionDict().relax("UFinal"))
{
UEqn.relax(mesh.solutionDict().relaxationFactor("UFinal"));
}
else
{
UEqn.relax(1);
}
}
else
{
UEqn.relax();