mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
refactored gases->carrierSpecies
This commit is contained in:
@ -72,14 +72,14 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
|||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
hCombustionThermo& thermo,
|
hCombustionThermo& thermo,
|
||||||
PtrList<specieReactingProperties>& gases
|
PtrList<specieReactingProperties>& carrierSpecies
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoCloud<ParcelType>(cloudType, rho, U, g, thermo),
|
ThermoCloud<ParcelType>(cloudType, rho, U, g, thermo),
|
||||||
reactingCloud(),
|
reactingCloud(),
|
||||||
constProps_(this->particleProperties()),
|
constProps_(this->particleProperties()),
|
||||||
carrierThermo_(thermo),
|
carrierThermo_(thermo),
|
||||||
gases_(gases),
|
carrierSpecies_(carrierSpecies),
|
||||||
compositionModel_
|
compositionModel_
|
||||||
(
|
(
|
||||||
CompositionModel<ReactingCloud<ParcelType> >::New
|
CompositionModel<ReactingCloud<ParcelType> >::New
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class ReactingCloud
|
|||||||
hCombustionThermo& carrierThermo_;
|
hCombustionThermo& carrierThermo_;
|
||||||
|
|
||||||
//- Gas phase properties
|
//- Gas phase properties
|
||||||
PtrList<specieReactingProperties>& gases_;
|
PtrList<specieReactingProperties>& carrierSpecies_;
|
||||||
|
|
||||||
|
|
||||||
// References to the cloud sub-models
|
// References to the cloud sub-models
|
||||||
@ -127,7 +127,7 @@ public:
|
|||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
hCombustionThermo& thermo,
|
hCombustionThermo& thermo,
|
||||||
PtrList<specieReactingProperties>& gases
|
PtrList<specieReactingProperties>& carrierSpecies
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ public:
|
|||||||
inline hCombustionThermo& carrierThermo();
|
inline hCombustionThermo& carrierThermo();
|
||||||
|
|
||||||
//- Gas phase properties
|
//- Gas phase properties
|
||||||
inline const PtrList<specieReactingProperties>& gases() const;
|
inline const PtrList<specieReactingProperties>& carrierSpecies() const;
|
||||||
|
|
||||||
|
|
||||||
// Sub-models
|
// Sub-models
|
||||||
|
|||||||
@ -52,9 +52,9 @@ Foam::ReactingCloud<ParcelType>::carrierThermo()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::PtrList<Foam::specieReactingProperties>&
|
inline const Foam::PtrList<Foam::specieReactingProperties>&
|
||||||
Foam::ReactingCloud<ParcelType>::gases() const
|
Foam::ReactingCloud<ParcelType>::carrierSpecies() const
|
||||||
{
|
{
|
||||||
return gases_;
|
return carrierSpecies_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -79,10 +79,10 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
|||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
hCombustionThermo& thermo,
|
hCombustionThermo& thermo,
|
||||||
PtrList<specieReactingProperties>& gases
|
PtrList<specieReactingProperties>& carrierSpecies
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingCloud<ParcelType>(cloudType, rho, U, g, thermo, gases),
|
ReactingCloud<ParcelType>(cloudType, rho, U, g, thermo, carrierSpecies),
|
||||||
reactingMultiphaseCloud(),
|
reactingMultiphaseCloud(),
|
||||||
constProps_(this->particleProperties()),
|
constProps_(this->particleProperties()),
|
||||||
devolatilisationModel_
|
devolatilisationModel_
|
||||||
|
|||||||
@ -121,7 +121,7 @@ public:
|
|||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
hCombustionThermo& thermo,
|
hCombustionThermo& thermo,
|
||||||
PtrList<specieReactingProperties>& gases
|
PtrList<specieReactingProperties>& carrierSpecies
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ Foam::basicReactingCloud::basicReactingCloud
|
|||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
hCombustionThermo& thermo,
|
hCombustionThermo& thermo,
|
||||||
PtrList<specieReactingProperties>& gases
|
PtrList<specieReactingProperties>& carrierSpecies
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingCloud<basicReactingParcel>
|
ReactingCloud<basicReactingParcel>
|
||||||
@ -53,7 +53,7 @@ Foam::basicReactingCloud::basicReactingCloud
|
|||||||
U,
|
U,
|
||||||
g,
|
g,
|
||||||
thermo,
|
thermo,
|
||||||
gases
|
carrierSpecies
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
basicReactingParcel::readFields(*this);
|
basicReactingParcel::readFields(*this);
|
||||||
|
|||||||
@ -77,7 +77,7 @@ public:
|
|||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
hCombustionThermo& thermo,
|
hCombustionThermo& thermo,
|
||||||
PtrList<specieReactingProperties>& gases
|
PtrList<specieReactingProperties>& carrierSpecies
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ Foam::basicReactingMultiphaseCloud::basicReactingMultiphaseCloud
|
|||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
hCombustionThermo& thermo,
|
hCombustionThermo& thermo,
|
||||||
PtrList<specieReactingProperties>& gases
|
PtrList<specieReactingProperties>& carrierSpecies
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>
|
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>
|
||||||
@ -53,7 +53,7 @@ Foam::basicReactingMultiphaseCloud::basicReactingMultiphaseCloud
|
|||||||
U,
|
U,
|
||||||
g,
|
g,
|
||||||
thermo,
|
thermo,
|
||||||
gases
|
carrierSpecies
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
basicReactingMultiphaseParcel::readFields(*this);
|
basicReactingMultiphaseParcel::readFields(*this);
|
||||||
|
|||||||
@ -77,7 +77,7 @@ public:
|
|||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
hCombustionThermo& thermo,
|
hCombustionThermo& thermo,
|
||||||
PtrList<specieReactingProperties>& gases
|
PtrList<specieReactingProperties>& carrierSpecies
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -168,7 +168,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::cellValueSourceCorrection
|
|||||||
forAll(td.cloud().rhoTrans(), i)
|
forAll(td.cloud().rhoTrans(), i)
|
||||||
{
|
{
|
||||||
scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass;
|
scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass;
|
||||||
cpEff += Y*td.cloud().gases()[i].Cp(this->Tc_);
|
cpEff += Y*td.cloud().carrierSpecies()[i].Cp(this->Tc_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const scalar cpc = td.cpInterp().psi()[cellI];
|
const scalar cpc = td.cpInterp().psi()[cellI];
|
||||||
@ -268,7 +268,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
scalarField dMassSRGas(YGas_.size(), 0.0);
|
scalarField dMassSRGas(YGas_.size(), 0.0);
|
||||||
scalarField dMassSRLiquid(YLiquid_.size(), 0.0);
|
scalarField dMassSRLiquid(YLiquid_.size(), 0.0);
|
||||||
scalarField dMassSRSolid(YSolid_.size(), 0.0);
|
scalarField dMassSRSolid(YSolid_.size(), 0.0);
|
||||||
scalarField dMassSRCarrier(td.cloud().gases().size(), 0.0);
|
scalarField dMassSRCarrier(td.cloud().carrierSpecies().size(), 0.0);
|
||||||
|
|
||||||
// Return enthalpy source and calc mass transfer(s) due to surface reaction
|
// Return enthalpy source and calc mass transfer(s) due to surface reaction
|
||||||
scalar hReaction =
|
scalar hReaction =
|
||||||
|
|||||||
@ -86,7 +86,7 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
|
|||||||
forAll(td.cloud().rhoTrans(), i)
|
forAll(td.cloud().rhoTrans(), i)
|
||||||
{
|
{
|
||||||
scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass;
|
scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass;
|
||||||
cpEff += Y*td.cloud().gases()[i].Cp(this->Tc_);
|
cpEff += Y*td.cloud().carrierSpecies()[i].Cp(this->Tc_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const scalar cpc = td.cpInterp().psi()[cellI];
|
const scalar cpc = td.cpInterp().psi()[cellI];
|
||||||
|
|||||||
@ -100,7 +100,8 @@ private:
|
|||||||
//- Set global ids - liquid and solid phases
|
//- Set global ids - liquid and solid phases
|
||||||
void setGlobalIds(const wordList& globalNames);
|
void setGlobalIds(const wordList& globalNames);
|
||||||
|
|
||||||
//- Set global gas ids - attempts to map component names to global gases
|
//- Set global gas ids - attempts to map component names to global
|
||||||
|
// carrier species
|
||||||
void setGlobalGasIds(const PtrList<volScalarField>& YGas);
|
void setGlobalGasIds(const PtrList<volScalarField>& YGas);
|
||||||
|
|
||||||
//- Check the total mass fraction
|
//- Check the total mass fraction
|
||||||
|
|||||||
@ -40,7 +40,7 @@ Foam::CompositionModel<CloudType>::CompositionModel
|
|||||||
owner_(owner),
|
owner_(owner),
|
||||||
coeffDict_(dict.subDict(type + "Coeffs")),
|
coeffDict_(dict.subDict(type + "Coeffs")),
|
||||||
carrierThermo_(owner.carrierThermo()),
|
carrierThermo_(owner.carrierThermo()),
|
||||||
gases_(owner.gases()),
|
carrierSpecies_(owner.carrierSpecies()),
|
||||||
liquids_
|
liquids_
|
||||||
(
|
(
|
||||||
liquidMixture::New
|
liquidMixture::New
|
||||||
@ -111,9 +111,9 @@ Foam::CompositionModel<CloudType>::carrierThermo() const
|
|||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
const Foam::PtrList<Foam::specieReactingProperties>&
|
const Foam::PtrList<Foam::specieReactingProperties>&
|
||||||
Foam::CompositionModel<CloudType>::gases() const
|
Foam::CompositionModel<CloudType>::carrierSpecies() const
|
||||||
{
|
{
|
||||||
return gases_;
|
return carrierSpecies_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -294,8 +294,8 @@ Foam::scalarField Foam::CompositionModel<CloudType>::X
|
|||||||
forAll(Y, i)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
label gid = props.globalIds()[i];
|
label gid = props.globalIds()[i];
|
||||||
WInv += Y[i]/this->gases()[gid].W();
|
WInv += Y[i]/this->carrierSpecies()[gid].W();
|
||||||
X[i] = Y[i]/this->gases()[gid].W();
|
X[i] = Y[i]/this->carrierSpecies()[gid].W();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -345,7 +345,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::H
|
|||||||
forAll(Y, i)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
label gid = props.globalIds()[i];
|
label gid = props.globalIds()[i];
|
||||||
HMixture += Y[i]*this->gases()[gid].H(T);
|
HMixture += Y[i]*this->carrierSpecies()[gid].H(T);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -409,7 +409,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::cp
|
|||||||
forAll(Y, i)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
label gid = props.globalIds()[i];
|
label gid = props.globalIds()[i];
|
||||||
cpMixture += Y[i]*this->gases()[gid].Cp(T);
|
cpMixture += Y[i]*this->carrierSpecies()[gid].Cp(T);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,8 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
Templated reacting parcel composition model class
|
Templated reacting parcel composition model class
|
||||||
Consists of gases (via thermo package), liquids and solids
|
Consists of carrier species (via thermo package), and additional liquids
|
||||||
|
and solids
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
CompositionModel.C
|
CompositionModel.C
|
||||||
@ -77,12 +78,12 @@ class CompositionModel
|
|||||||
hCombustionThermo& carrierThermo_;
|
hCombustionThermo& carrierThermo_;
|
||||||
|
|
||||||
//- Reference to the carrier phase species
|
//- Reference to the carrier phase species
|
||||||
const PtrList<specieReactingProperties>& gases_;
|
const PtrList<specieReactingProperties>& carrierSpecies_;
|
||||||
|
|
||||||
//- Global liquid properties data
|
//- Global (additional) liquid properties data
|
||||||
autoPtr<liquidMixture> liquids_;
|
autoPtr<liquidMixture> liquids_;
|
||||||
|
|
||||||
//- Global solid properties data
|
//- Global (additional) solid properties data
|
||||||
autoPtr<solidMixture> solids_;
|
autoPtr<solidMixture> solids_;
|
||||||
|
|
||||||
//- List of phase properties
|
//- List of phase properties
|
||||||
@ -150,13 +151,13 @@ public:
|
|||||||
|
|
||||||
// Composition lists
|
// Composition lists
|
||||||
|
|
||||||
//- Return the gases
|
//- Return the carrier species
|
||||||
const PtrList<specieReactingProperties>& gases() const;
|
const PtrList<specieReactingProperties>& carrierSpecies() const;
|
||||||
|
|
||||||
//- Return the global liquids
|
//- Return the global (additional) liquids
|
||||||
const liquidMixture& liquids() const;
|
const liquidMixture& liquids() const;
|
||||||
|
|
||||||
//- Return the global solids
|
//- Return the global (additional) solids
|
||||||
const solidMixture& solids() const;
|
const solidMixture& solids() const;
|
||||||
|
|
||||||
//- Return the list of phase properties
|
//- Return the list of phase properties
|
||||||
|
|||||||
@ -41,8 +41,8 @@ Foam::scalarField Foam::LiquidEvaporation<CloudType>::calcXc
|
|||||||
forAll(Xc, i)
|
forAll(Xc, i)
|
||||||
{
|
{
|
||||||
scalar Y = this->owner().carrierThermo().composition().Y()[i][cellI];
|
scalar Y = this->owner().carrierThermo().composition().Y()[i][cellI];
|
||||||
Winv += Y/this->owner().gases()[i].W();
|
Winv += Y/this->owner().carrierSpecies()[i].W();
|
||||||
Xc[i] = Y/this->owner().gases()[i].W();
|
Xc[i] = Y/this->owner().carrierSpecies()[i].W();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Xc/Winv;
|
return Xc/Winv;
|
||||||
|
|||||||
Reference in New Issue
Block a user