reactingEulerFoam: Corrected the sign of species transfer terms

This commit is contained in:
Will Bainbridge
2018-05-25 11:31:23 +01:00
parent bf52a98e09
commit 5aac095b2b
3 changed files with 12 additions and 14 deletions

View File

@ -162,8 +162,8 @@ Foam::PhaseTransferPhaseSystem<BasePhaseSystem>::massTransfer() const
const phaseModel& otherPhase = pair.phase2();
const volScalarField dmdt(this->rDmdt(pair));
const volScalarField dmdt12(posPart(dmdt));
const volScalarField dmdt21(negPart(dmdt));
const volScalarField dmdt12(negPart(dmdt));
const volScalarField dmdt21(posPart(dmdt));
const PtrList<volScalarField>& Yi = phase.Y();

View File

@ -193,8 +193,8 @@ Foam::PopulationBalancePhaseSystem<BasePhaseSystem>::massTransfer() const
const phaseModel& otherPhase = pair.phase2();
const volScalarField dmdt(this->pDmdt(pair));
const volScalarField dmdt12(posPart(dmdt));
const volScalarField dmdt21(negPart(dmdt));
const volScalarField dmdt12(negPart(dmdt));
const volScalarField dmdt21(posPart(dmdt));
const PtrList<volScalarField>& Yi = phase.Y();

View File

@ -283,11 +283,6 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::massTransfer() const
forAll(Yi, i)
{
if (Yi[i].member() != volatile_)
{
continue;
}
const word name
(
IOobject::groupName(volatile_, phase.name())
@ -299,12 +294,15 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::massTransfer() const
);
const volScalarField dmdt(this->iDmdt(pair) + this->wDmdt(pair));
const volScalarField dmdt12(posPart(dmdt));
const volScalarField dmdt21(negPart(dmdt));
*eqns[name] += fvm::Sp(dmdt21, eqns[name]->psi()) - dmdt21;
*eqns[otherName] +=
dmdt12 - fvm::Sp(dmdt12, eqns[otherName]->psi());
*eqns[name] -= fvm::Sp(dmdt, eqns[name]->psi());
*eqns[otherName] += fvm::Sp(dmdt, eqns[otherName]->psi());
if (Yi[i].member() == volatile_)
{
*eqns[name] += dmdt;
*eqns[otherName] -= dmdt;
}
}
}