MultiComponentPhaseModel: Replaced local residualAlpha_ with phase.residualAlpha()

There is no clear need for a residualAlpha to be defined specifically for Yi and
read from the fvSolution dictionary, the phase.residualAlpha() should be
suitable to stabilise the Yi equations.
This commit is contained in:
Henry Weller
2022-03-01 18:00:06 +00:00
parent 3df883d7e6
commit 8cecaa8b6e
8 changed files with 6 additions and 26 deletions

View File

@ -46,13 +46,7 @@ Foam::MultiComponentPhaseModel<BasePhaseModel>::MultiComponentPhaseModel
const label index
)
:
BasePhaseModel(fluid, phaseName, referencePhase, index),
residualAlpha_
(
"residualAlpha",
dimless,
fluid.mesh().solverDict("Yi")
)
BasePhaseModel(fluid, phaseName, referencePhase, index)
{
PtrList<volScalarField>& Y = this->thermo_->composition().Y();
@ -114,7 +108,7 @@ Foam::MultiComponentPhaseModel<BasePhaseModel>::YiEqn(volScalarField& Yi)
(
fvm::Sp
(
max(residualAlpha_ - alpha, scalar(0))*rho
max(this->residualAlpha() - alpha, scalar(0))*rho
/this->mesh().time().deltaT(),
Yi
)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,9 +56,6 @@ protected:
// Protected data
//- Residual phase fraction
dimensionedScalar residualAlpha_;
//- Pointer list to active species
UPtrList<volScalarField> YActive_;