reactingEulerFoam: Further improvements to the handling of mass-transfer

between incompressible and compressible phases
This commit is contained in:
Henry Weller
2015-09-25 19:00:07 +01:00
parent c5955e4af4
commit c8135cee57
10 changed files with 92 additions and 17 deletions

View File

@ -57,6 +57,16 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::~HeatTransferPhaseSystem()
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template<class BasePhaseSystem>
bool Foam::HeatTransferPhaseSystem<BasePhaseSystem>::transfersMass
(
const phaseModel& phase
) const
{
return false;
}
template<class BasePhaseSystem>
Foam::tmp<Foam::volScalarField>
Foam::HeatTransferPhaseSystem<BasePhaseSystem>::dmdt

View File

@ -89,6 +89,9 @@ public:
// Member Functions
//- Return true if there is mass transfer for phase
virtual bool transfersMass(const phaseModel& phase) const;
//- Return the interfacial mass flow rate
virtual tmp<volScalarField> dmdt
(

View File

@ -254,6 +254,16 @@ makeReactionMixtureThermo
);
makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoThermo,
multiComponentMixture,
constRefGasHThermoPhysics
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

@ -515,12 +515,6 @@ Foam::multiphaseSystem::~multiphaseSystem()
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
bool Foam::multiphaseSystem::transfersMass(const phaseModel& phase) const
{
return false;
}
Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension
(
const phaseModel& phase1

View File

@ -176,7 +176,7 @@ public:
) const = 0;
//- Return true if there is mass transfer for phase
virtual bool transfersMass(const phaseModel& phase) const;
virtual bool transfersMass(const phaseModel& phase) const = 0;
//- Return the total interfacial mass transfer rate for phase
virtual tmp<volScalarField> dmdt(const phaseModel& phase) const = 0;

View File

@ -357,11 +357,15 @@ while (pimple.correct())
{
if (pEqnComps.set(phasei))
{
pEqnComps[phasei] -= fluid.dmdt(phase);
pEqnComps[phasei] -= fluid.dmdt(phase)/rho;
}
else
{
pEqnComps.set(phasei, fvm::Su(-fluid.dmdt(phase), rho));
pEqnComps.set
(
phasei,
fvm::Su(-fluid.dmdt(phase)/rho, p_rgh)
);
}
}
}

View File

@ -247,7 +247,7 @@ while (pimple.correct())
pEqnComp1 =
(
phase1.continuityError() - fluid.dmdt()
phase1.continuityError()
- fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1)
)/rho1
+ (alpha1/rho1)*correction
@ -270,7 +270,7 @@ while (pimple.correct())
pEqnComp2 =
(
phase2.continuityError() + fluid.dmdt()
phase2.continuityError()
- fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2)
)/rho2
+ (alpha2/rho2)*correction
@ -288,7 +288,7 @@ while (pimple.correct())
{
pEqnComp1 =
(
phase1.continuityError() - fluid.dmdt()
phase1.continuityError()
- fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1)
)/rho1
+ (alpha1*psi1/rho1)*correction(fvm::ddt(p_rgh));
@ -298,13 +298,34 @@ while (pimple.correct())
{
pEqnComp2 =
(
phase2.continuityError() + fluid.dmdt()
phase2.continuityError()
- fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2)
)/rho2
+ (alpha2*psi2/rho2)*correction(fvm::ddt(p_rgh));
}
}
if (fluid.transfersMass())
{
if (pEqnComp1.valid())
{
pEqnComp1() -= fluid.dmdt()/rho1;
}
else
{
pEqnComp1 = fvm::Su(-fluid.dmdt()/rho1, p_rgh);
}
if (pEqnComp2.valid())
{
pEqnComp2() += fluid.dmdt()/rho2;
}
else
{
pEqnComp2 = fvm::Su(fluid.dmdt()/rho2, p_rgh);
}
}
// Cache p prior to solve for density update
volScalarField p_rgh_0(p_rgh);

View File

@ -231,7 +231,7 @@ while (pimple.correct())
{
pEqnComp1 =
(
phase1.continuityError() - fluid.dmdt()
phase1.continuityError()
- fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1)
)/rho1
+ (alpha1/rho1)*correction
@ -247,7 +247,7 @@ while (pimple.correct())
{
pEqnComp2 =
(
phase2.continuityError() + fluid.dmdt()
phase2.continuityError()
- fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2)
)/rho2
+ (alpha2/rho2)*correction
@ -265,7 +265,7 @@ while (pimple.correct())
{
pEqnComp1 =
(
phase1.continuityError() - fluid.dmdt()
phase1.continuityError()
- fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1)
)/rho1
+ (alpha1*psi1/rho1)*correction(fvm::ddt(p_rgh));
@ -275,13 +275,34 @@ while (pimple.correct())
{
pEqnComp2 =
(
phase2.continuityError() + fluid.dmdt()
phase2.continuityError()
- fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2)
)/rho2
+ (alpha2*psi2/rho2)*correction(fvm::ddt(p_rgh));
}
}
if (fluid.transfersMass())
{
if (pEqnComp1.valid())
{
pEqnComp1() -= fluid.dmdt()/rho1;
}
else
{
pEqnComp1 = fvm::Su(-fluid.dmdt()/rho1, p_rgh);
}
if (pEqnComp2.valid())
{
pEqnComp2() += fluid.dmdt()/rho2;
}
else
{
pEqnComp2 = fvm::Su(fluid.dmdt()/rho2, p_rgh);
}
}
// Cache p prior to solve for density update
volScalarField p_rgh_0("p_rgh_0", p_rgh);

View File

@ -168,6 +168,12 @@ Foam::twoPhaseSystem::D() const
}
bool Foam::twoPhaseSystem::transfersMass() const
{
return transfersMass(phase1());
}
Foam::tmp<Foam::volScalarField>
Foam::twoPhaseSystem::dmdt() const
{

View File

@ -78,6 +78,9 @@ class twoPhaseSystem
// Multiplies the phase-fraction gradient
virtual tmp<volScalarField> D(const phasePairKey& key) const = 0;
//- Return true if there is mass transfer for phase
virtual bool transfersMass(const phaseModel& phase) const = 0;
//- Return the interfacial mass flow rate for phase pair
virtual tmp<volScalarField> dmdt(const phasePairKey& key) const = 0;
@ -192,6 +195,9 @@ public:
// Multiplies the phase-fraction gradient
tmp<volScalarField> D() const;
//- Return true if there is mass transfer
bool transfersMass() const;
//- Return the interfacial mass flow rate
tmp<volScalarField> dmdt() const;