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()); ...@@ -27,14 +27,12 @@ surfaceScalarField Kdf("Kdf", fluid.Kdf());
// Virtual-mass coefficient // Virtual-mass coefficient
surfaceScalarField Vmf("Vmf", fluid.Vmf()); surfaceScalarField Vmf("Vmf", fluid.Vmf());
const surfaceScalarField& rDeltaTf = fv::localEulerDdt::localRDeltaTf(mesh);
surfaceScalarField rAUf1 surfaceScalarField rAUf1
( (
IOobject::groupName("rAUf", phase1.name()), IOobject::groupName("rAUf", phase1.name()),
1.0 1.0
/( /(
rDeltaTf*(alphaRhof10 + Vmf) byDt(alphaRhof10 + Vmf)
+ fvc::interpolate(U1Eqn.A()) + fvc::interpolate(U1Eqn.A())
+ Kdf + Kdf
) )
...@@ -45,7 +43,7 @@ surfaceScalarField rAUf2 ...@@ -45,7 +43,7 @@ surfaceScalarField rAUf2
IOobject::groupName("rAUf", phase2.name()), IOobject::groupName("rAUf", phase2.name()),
1.0 1.0
/( /(
rDeltaTf*(alphaRhof20 + Vmf) byDt(alphaRhof20 + Vmf)
+ fvc::interpolate(U2Eqn.A()) + fvc::interpolate(U2Eqn.A())
+ Kdf + Kdf
) )
...@@ -159,7 +157,7 @@ while (pimple.correct()) ...@@ -159,7 +157,7 @@ while (pimple.correct())
rAUf1 rAUf1
*( *(
(alphaRhof10 + Vmf) (alphaRhof10 + Vmf)
*rDeltaTf*MRF.absolute(phi1.oldTime()) *byDt(MRF.absolute(phi1.oldTime()))
+ fvc::flux(U1Eqn.H()) + fvc::flux(U1Eqn.H())
+ Vmf*ddtPhi2 + Vmf*ddtPhi2
+ Kdf*MRF.absolute(phi2) + Kdf*MRF.absolute(phi2)
...@@ -177,7 +175,7 @@ while (pimple.correct()) ...@@ -177,7 +175,7 @@ while (pimple.correct())
rAUf2 rAUf2
*( *(
(alphaRhof20 + Vmf) (alphaRhof20 + Vmf)
*rDeltaTf*MRF.absolute(phi2.oldTime()) *byDt(MRF.absolute(phi2.oldTime()))
+ fvc::flux(U2Eqn.H()) + fvc::flux(U2Eqn.H())
+ Vmf*ddtPhi1 + Vmf*ddtPhi1
+ Kdf*MRF.absolute(phi1) + Kdf*MRF.absolute(phi1)
......
...@@ -40,6 +40,22 @@ Description ...@@ -40,6 +40,22 @@ Description
#include "localEulerDdtScheme.H" #include "localEulerDdtScheme.H"
#include "fvcSmooth.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[]) 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