reactingMultiphaseEulerFoam: Updated LTS support

for consistency with reactingEulerFoam
This commit is contained in:
Henry Weller
2017-12-12 18:13:50 +00:00
parent 986a879bef
commit 43a942c99f
5 changed files with 42 additions and 40 deletions

View File

@ -28,6 +28,7 @@ License
#include "aspectRatioModel.H"
#include "surfaceInterpolate.H"
#include "fvcDdt.H"
#include "localEulerDdtScheme.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -359,4 +360,30 @@ bool Foam::phaseSystem::read()
}
Foam::tmp<Foam::volScalarField> Foam::byDt(const volScalarField& vf)
{
if (fv::localEulerDdt::enabled(vf.mesh()))
{
return fv::localEulerDdt::localRDeltaT(vf.mesh())*vf;
}
else
{
return vf/vf.mesh().time().deltaT();
}
}
Foam::tmp<Foam::surfaceScalarField> Foam::byDt(const surfaceScalarField& sf)
{
if (fv::localEulerDdt::enabled(sf.mesh()))
{
return fv::localEulerDdt::localRDeltaTf(sf.mesh())*sf;
}
else
{
return sf/sf.mesh().time().deltaT();
}
}
// ************************************************************************* //

View File

@ -372,6 +372,11 @@ public:
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
tmp<volScalarField> byDt(const volScalarField& vf);
tmp<surfaceScalarField> byDt(const surfaceScalarField& sf);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

@ -19,8 +19,7 @@ forAll(phases, phasei)
1.0
/(
UEqns[phasei].A()
+ max(phase.residualAlpha() - alpha, scalar(0))
*phase.rho()/runTime.deltaT()
+ byDt(max(phase.residualAlpha() - alpha, scalar(0))*phase.rho())
)
)
);
@ -118,8 +117,8 @@ while (pimple.correct())
rAUs[phasei]
*(
UEqns[phasei].H()
+ max(phase.residualAlpha() - alpha, scalar(0))
*phase.rho()*phase.U().oldTime()/runTime.deltaT()
+ byDt(max(phase.residualAlpha() - alpha, scalar(0))*phase.rho())
*phase.U().oldTime()
);
}
@ -207,12 +206,12 @@ while (pimple.correct())
+ phiCorrCoeff
*fvc::interpolate
(
alpha.oldTime()*phase.rho()().oldTime()*rAUs[phasei]
byDt(alpha.oldTime()*phase.rho()().oldTime()*rAUs[phasei])
)
*(
MRF.absolute(phase.phi().oldTime())
- fvc::flux(phase.U().oldTime())
)/runTime.deltaT()
)
- phigFs[phasei]
)
);

View File

@ -32,8 +32,8 @@ forAll(phases, phasei)
IOobject::groupName("rAUf", phase.name()),
1.0
/(
fvc::interpolate(UEqns[phasei].A())
+ (alphaRho0fs[phasei] + fluid.Vmf(phase))/runTime.deltaT()
byDt(alphaRho0fs[phasei] + fluid.Vmf(phase))
+ fvc::interpolate(UEqns[phasei].A())
+ fluid.Kdf(phase)
)
)
@ -176,7 +176,7 @@ while (pimple.correct())
*(
fvc::flux(UEqns[phasei].H())
+ alphaRho0fs[phasei]
*MRF.absolute(phase.phi().oldTime())/runTime.deltaT()
*byDt(MRF.absolute(phase.phi().oldTime()))
)
- phigFs[phasei]
)
@ -231,8 +231,7 @@ while (pimple.correct())
phiHbyAs[phasei] +=
rAUfs[phasei]
*(
Vmf*MRF.absolute(phase1->phi()().oldTime())
/runTime.deltaT()
Vmf*byDt(MRF.absolute(phase1->phi()().oldTime()))
+ Vmf*ddtPhis[phase2->index()]
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,34 +40,6 @@ Description
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
namespace Foam
{
tmp<volScalarField> byDt(const volScalarField& vf)
{
if (fv::localEulerDdt::enabled(vf.mesh()))
{
return fv::localEulerDdt::localRDeltaT(vf.mesh())*vf;
}
else
{
return vf/vf.mesh().time().deltaT();
}
}
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[])