Commit 5c7b3c78 authored by Henry Weller's avatar Henry Weller
Browse files

reactingTwoPhaseEulerFoam: Corrected LTS support

Resolves bug-report http://bugs.openfoam.org/view.php?id=2374
parent a95b7aa6
......@@ -27,14 +27,12 @@ surfaceScalarField Kdf("Kdf", fluid.Kdf());
// Virtual-mass coefficient
surfaceScalarField Vmf("Vmf", fluid.Vmf());
const surfaceScalarField& rDeltaTf = fv::localEulerDdt::localRDeltaTf(mesh);
surfaceScalarField rAUf1
(
IOobject::groupName("rAUf", phase1.name()),
1.0
/(
rDeltaTf*(alphaRhof10 + Vmf)
byDt(alphaRhof10 + Vmf)
+ fvc::interpolate(U1Eqn.A())
+ Kdf
)
......@@ -45,7 +43,7 @@ surfaceScalarField rAUf2
IOobject::groupName("rAUf", phase2.name()),
1.0
/(
rDeltaTf*(alphaRhof20 + Vmf)
byDt(alphaRhof20 + Vmf)
+ fvc::interpolate(U2Eqn.A())
+ Kdf
)
......@@ -159,7 +157,7 @@ while (pimple.correct())
rAUf1
*(
(alphaRhof10 + Vmf)
*rDeltaTf*MRF.absolute(phi1.oldTime())
*byDt(MRF.absolute(phi1.oldTime()))
+ fvc::flux(U1Eqn.H())
+ Vmf*ddtPhi2
+ Kdf*MRF.absolute(phi2)
......@@ -177,7 +175,7 @@ while (pimple.correct())
rAUf2
*(
(alphaRhof20 + Vmf)
*rDeltaTf*MRF.absolute(phi2.oldTime())
*byDt(MRF.absolute(phi2.oldTime()))
+ fvc::flux(U2Eqn.H())
+ Vmf*ddtPhi1
+ Kdf*MRF.absolute(phi1)
......
......@@ -40,6 +40,22 @@ Description
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
namespace Foam
{
tmp<surfaceScalarField> byDt(const surfaceScalarField& sf)
{
if (fv::localEulerDdt::enabled(sf.mesh()))
{
return fv::localEulerDdt::localRDeltaTf(sf.mesh())*sf;
}
else
{
return sf/sf.mesh().time().deltaT();
}
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
......
Markdown is supported
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