reactingTwoPhaseEulerFoam::twoPhaseSystem: Updated dmdt function for consistency with reactingMultiphaseEulerFoam::reactingMultiphaseEulerFoam

Patch contributed by Juho Peltola, VTT
This commit is contained in:
Henry Weller
2018-01-01 15:37:34 +00:00
parent f578347934
commit 8d4726cc73
6 changed files with 15 additions and 27 deletions

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) 2013-2017 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -204,8 +204,7 @@ public:
//- Return true if there is mass transfer for phase //- Return true if there is mass transfer for phase
virtual bool transfersMass(const phaseModel& phase) const = 0; virtual bool transfersMass(const phaseModel& phase) const = 0;
//- Return the total interfacial mass transfer rate for phase using phaseSystem::dmdt;
virtual tmp<volScalarField> dmdt(const phaseModel& phase) const = 0;
//- Return the momentum transfer matrices //- Return the momentum transfer matrices
virtual autoPtr<momentumTransferTable> momentumTransfer() const = 0; virtual autoPtr<momentumTransferTable> momentumTransfer() const = 0;

View File

@ -317,20 +317,20 @@ while (pimple.correct())
{ {
if (pEqnComp1.valid()) if (pEqnComp1.valid())
{ {
pEqnComp1.ref() -= fluid.dmdt()/rho1; pEqnComp1.ref() -= fluid.dmdt(phase1)/rho1;
} }
else else
{ {
pEqnComp1 = fvm::Su(-fluid.dmdt()/rho1, p_rgh); pEqnComp1 = fvm::Su(-fluid.dmdt(phase1)/rho1, p_rgh);
} }
if (pEqnComp2.valid()) if (pEqnComp2.valid())
{ {
pEqnComp2.ref() += fluid.dmdt()/rho2; pEqnComp2.ref() -= fluid.dmdt(phase2)/rho2;
} }
else else
{ {
pEqnComp2 = fvm::Su(fluid.dmdt()/rho2, p_rgh); pEqnComp2 = fvm::Su(-fluid.dmdt(phase2)/rho2, p_rgh);
} }
} }

View File

@ -18,8 +18,8 @@ fvVectorMatrix U2Eqn(U2, rho2.dimensions()*U2.dimensions()*dimVol/dimTime);
+ MRF.DDt(U2) + MRF.DDt(U2)
); );
const volScalarField dmdt21(posPart(fluid.dmdt())); const volScalarField dmdt21(posPart(fluid.dmdt(phase1)));
const volScalarField dmdt12(negPart(fluid.dmdt())); const volScalarField dmdt12(negPart(fluid.dmdt(phase1)));
{ {
U1Eqn = U1Eqn =

View File

@ -303,20 +303,20 @@ while (pimple.correct())
{ {
if (pEqnComp1.valid()) if (pEqnComp1.valid())
{ {
pEqnComp1.ref() -= fluid.dmdt()/rho1; pEqnComp1.ref() -= fluid.dmdt(phase1)/rho1;
} }
else else
{ {
pEqnComp1 = fvm::Su(-fluid.dmdt()/rho1, p_rgh); pEqnComp1 = fvm::Su(-fluid.dmdt(phase1)/rho1, p_rgh);
} }
if (pEqnComp2.valid()) if (pEqnComp2.valid())
{ {
pEqnComp2.ref() += fluid.dmdt()/rho2; pEqnComp2.ref() -= fluid.dmdt(phase2)/rho2;
} }
else else
{ {
pEqnComp2 = fvm::Su(fluid.dmdt()/rho2, p_rgh); pEqnComp2 = fvm::Su(-fluid.dmdt(phase2)/rho2, p_rgh);
} }
} }

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) 2013-2017 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -174,16 +174,6 @@ bool Foam::twoPhaseSystem::transfersMass() const
} }
Foam::tmp<Foam::volScalarField>
Foam::twoPhaseSystem::dmdt() const
{
return dmdt
(
phasePairKey(phase1().name(), phase2().name())
);
}
void Foam::twoPhaseSystem::solve() void Foam::twoPhaseSystem::solve()
{ {
const Time& runTime = mesh_.time(); const Time& runTime = mesh_.time();

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) 2013-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -198,8 +198,7 @@ public:
//- Return true if there is mass transfer //- Return true if there is mass transfer
bool transfersMass() const; bool transfersMass() const;
//- Return the interfacial mass flow rate using phaseSystem::dmdt;
tmp<volScalarField> dmdt() const;
//- Solve for the phase fractions //- Solve for the phase fractions
virtual void solve(); virtual void solve();