mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: basicSpecieMixture: Removed duplicated molecular weight mixing
Mixture molecular weight is now evaluated in heThermo like everything else, relying on the low level specie mixing rules. Units have also been corrected. SpecieMixture: Pure virtual definition for W to prevent Clang warning
This commit is contained in:
committed by
Andrew Heather
parent
d9afa508e1
commit
f180ab7249
@ -275,6 +275,12 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::CpByCpv
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::W() const
|
||||
{
|
||||
return alpha1()*thermo1_->W() + alpha2()*thermo1_->W();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::nu() const
|
||||
{
|
||||
return mu()/(alpha1()*thermo1_->rho() + alpha2()*thermo2_->rho());
|
||||
|
||||
@ -242,6 +242,9 @@ public:
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Molecular weight [kg/kmol]
|
||||
virtual tmp<volScalarField> W() const;
|
||||
|
||||
|
||||
// Fields derived from transport state variables
|
||||
|
||||
|
||||
@ -519,6 +519,21 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::CpByCpv
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::W() const
|
||||
{
|
||||
PtrDictionary<phaseModel>::const_iterator phasei = phases_.begin();
|
||||
|
||||
tmp<volScalarField> tW(phasei()*phasei().thermo().W());
|
||||
|
||||
for (++phasei; phasei != phases_.end(); ++phasei)
|
||||
{
|
||||
tW.ref() += phasei()*phasei().thermo().W();
|
||||
}
|
||||
|
||||
return tW;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::nu() const
|
||||
{
|
||||
return mu()/rho();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -362,6 +362,9 @@ public:
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Molecular weight [kg/kmol]
|
||||
virtual tmp<volScalarField> W() const;
|
||||
|
||||
|
||||
// Fields derived from transport state variables
|
||||
|
||||
|
||||
@ -32,10 +32,14 @@ Foam::tmp<Foam::volScalarField>
|
||||
Foam::interfaceCompositionModels::Saturated<Thermo, OtherThermo>::
|
||||
wRatioByP() const
|
||||
{
|
||||
return
|
||||
const dimensionedScalar Wi
|
||||
(
|
||||
"W",
|
||||
dimMass/dimMoles,
|
||||
this->thermo_.composition().W(saturatedIndex_)
|
||||
/this->thermo_.composition().W()
|
||||
/this->thermo_.p();
|
||||
);
|
||||
|
||||
return Wi/this->thermo_.W()/this->thermo_.p();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user