BUG: liquidFilmFoam - corrected double looping

This commit is contained in:
Andrew Heather 2017-12-18 11:21:07 +00:00
parent 2728a96b9c
commit 00a8c8bc5f
3 changed files with 13 additions and 21 deletions

View File

@ -38,6 +38,7 @@ Author
#include "fvCFD.H"
#include "faCFD.H"
#include "loopControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -67,7 +68,7 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl;
while (runTime.loop())
while (iters.loop())
{
phi2s = fac::interpolate(h)*phis;
@ -91,11 +92,10 @@ int main(int argc, char *argv[])
Us = UsEqn.H()/UsA;
Us.correctBoundaryConditions();
phis = (fac::interpolate(Us) & aMesh.Le())
- fac::interpolate(1.0/(rhol*UsA))
*fac::lnGrad(ps*h)*aMesh.magLe()
+ fac::interpolate(ps/(rhol*UsA))
*fac::lnGrad(h)*aMesh.magLe();
phis =
(fac::interpolate(Us) & aMesh.Le())
- fac::interpolate(1.0/(rhol*UsA))*fac::lnGrad(ps*h)*aMesh.magLe()
+ fac::interpolate(ps/(rhol*UsA))*fac::lnGrad(h)*aMesh.magLe();
faScalarMatrix hEqn
(
@ -122,7 +122,7 @@ int main(int argc, char *argv[])
(
h.primitiveField(),
fac::average(max(h, h0))().primitiveField()
*pos(h0.value() - h.primitiveField())
*pos(h0.value() - h.primitiveField())
),
h0.value()
);

View File

@ -1,13 +1 @@
int nCorr = 0;
if (aMesh.solutionDict().found("nOuterCorrectors"))
{
nCorr =
readInt(aMesh.solutionDict().lookup("nOuterCorrectors"));
}
else
{
FatalErrorIn(args.executable())
<< "Cannot find number of correctors"
<< abort(FatalError);
}
loopControl iters(runTime, aMesh.solutionDict(), "solution");

View File

@ -34,7 +34,11 @@ solvers
}
}
nOuterCorrectors 15;
solution
{
iterations 15;
}
//nOuterCorrectors 15;
relaxationFactors
{