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 "aspectRatioModel.H"
#include "surfaceInterpolate.H" #include "surfaceInterpolate.H"
#include "fvcDdt.H" #include "fvcDdt.H"
#include "localEulerDdtScheme.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * 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 } // End namespace Foam

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -40,34 +40,6 @@ Description
#include "localEulerDdtScheme.H" #include "localEulerDdtScheme.H"
#include "fvcSmooth.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[]) int main(int argc, char *argv[])