diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C index 19e768416..3fdb7ce78 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C @@ -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::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::byDt(const surfaceScalarField& sf) +{ + if (fv::localEulerDdt::enabled(sf.mesh())) + { + return fv::localEulerDdt::localRDeltaTf(sf.mesh())*sf; + } + else + { + return sf/sf.mesh().time().deltaT(); + } +} + + // ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H index 9c637a428..544ca53e1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H @@ -372,6 +372,11 @@ public: }; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +tmp byDt(const volScalarField& vf); +tmp byDt(const surfaceScalarField& sf); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H index c6ec21aae..696385d7b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H @@ -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] ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pUf/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pUf/pEqn.H index f2aa61cdc..e920119b9 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pUf/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pUf/pEqn.H @@ -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()] ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C index 47b6fe638..90f252f82 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C @@ -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 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 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[])