mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
fvData: New database (dictionary) held on the fvMesh to store residual information etc.
This data can be used for convergence testing e.g. by a functionObject. Other data could also be stored, e.g. global continuity errors and other reduced results.
This commit is contained in:
@ -34,12 +34,7 @@
|
||||
{
|
||||
pZones.addResistance(UEqn());
|
||||
|
||||
eqnResidual = solve
|
||||
(
|
||||
UEqn() == -fvc::grad(p)
|
||||
). initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
trAU = 1.0/UEqn().A();
|
||||
trAU().rename("rAU");
|
||||
|
||||
@ -28,8 +28,7 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = tpEqn().solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
tpEqn().solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -54,7 +54,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
|
||||
@ -71,8 +70,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -8,9 +8,4 @@
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
eqnResidual = solve
|
||||
(
|
||||
UEqn() == -fvc::grad(p)
|
||||
).initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
// check convergence
|
||||
|
||||
if (maxResidual < convergenceCriterion)
|
||||
{
|
||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
||||
runTime.writeAndEnd();
|
||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
||||
}
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
// initialize values for convergence checks
|
||||
|
||||
scalar eqnResidual = 1, maxResidual = 0;
|
||||
scalar convergenceCriterion = 0;
|
||||
|
||||
simple.readIfPresent("convergence", convergenceCriterion);
|
||||
|
||||
@ -18,8 +18,7 @@
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = pEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
pEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -52,7 +52,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
|
||||
@ -69,8 +68,6 @@ int main(int argc, char *argv[])
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
Reference in New Issue
Block a user