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

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

View file

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

View file

@ -5,13 +5,20 @@
+ turbulence->divDevReff(U) + 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 else
{ {
UEqn.relax(mesh.solutionDict().relaxationFactor("UFinal")); UEqn.relax(1);
}
}
else
{
UEqn.relax();
} }
if (momentumPredictor) if (momentumPredictor)

View file

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

View file

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