Commit 00a8c8bc authored by Andrew Heather's avatar Andrew Heather
Browse files

BUG: liquidFilmFoam - corrected double looping

parent 2728a96b
......@@ -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()
);
......
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");
......@@ -34,7 +34,11 @@ solvers
}
}
nOuterCorrectors 15;
solution
{
iterations 15;
}
//nOuterCorrectors 15;
relaxationFactors
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment