refactored gases->carrierSpecies
This commit is contained in:
parent
d054f81b57
commit
3a4df7a451
@ -72,14 +72,14 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<specieReactingProperties>& gases
|
||||
PtrList<specieReactingProperties>& carrierSpecies
|
||||
)
|
||||
:
|
||||
ThermoCloud<ParcelType>(cloudType, rho, U, g, thermo),
|
||||
reactingCloud(),
|
||||
constProps_(this->particleProperties()),
|
||||
carrierThermo_(thermo),
|
||||
gases_(gases),
|
||||
carrierSpecies_(carrierSpecies),
|
||||
compositionModel_
|
||||
(
|
||||
CompositionModel<ReactingCloud<ParcelType> >::New
|
||||
|
@ -80,7 +80,7 @@ class ReactingCloud
|
||||
hCombustionThermo& carrierThermo_;
|
||||
|
||||
//- Gas phase properties
|
||||
PtrList<specieReactingProperties>& gases_;
|
||||
PtrList<specieReactingProperties>& carrierSpecies_;
|
||||
|
||||
|
||||
// References to the cloud sub-models
|
||||
@ -127,7 +127,7 @@ public:
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<specieReactingProperties>& gases
|
||||
PtrList<specieReactingProperties>& carrierSpecies
|
||||
);
|
||||
|
||||
|
||||
@ -154,7 +154,7 @@ public:
|
||||
inline hCombustionThermo& carrierThermo();
|
||||
|
||||
//- Gas phase properties
|
||||
inline const PtrList<specieReactingProperties>& gases() const;
|
||||
inline const PtrList<specieReactingProperties>& carrierSpecies() const;
|
||||
|
||||
|
||||
// Sub-models
|
||||
|
@ -52,9 +52,9 @@ Foam::ReactingCloud<ParcelType>::carrierThermo()
|
||||
|
||||
template<class ParcelType>
|
||||
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 dimensionedVector& g,
|
||||
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(),
|
||||
constProps_(this->particleProperties()),
|
||||
devolatilisationModel_
|
||||
|
@ -121,7 +121,7 @@ public:
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<specieReactingProperties>& gases
|
||||
PtrList<specieReactingProperties>& carrierSpecies
|
||||
);
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ Foam::basicReactingCloud::basicReactingCloud
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<specieReactingProperties>& gases
|
||||
PtrList<specieReactingProperties>& carrierSpecies
|
||||
)
|
||||
:
|
||||
ReactingCloud<basicReactingParcel>
|
||||
@ -53,7 +53,7 @@ Foam::basicReactingCloud::basicReactingCloud
|
||||
U,
|
||||
g,
|
||||
thermo,
|
||||
gases
|
||||
carrierSpecies
|
||||
)
|
||||
{
|
||||
basicReactingParcel::readFields(*this);
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<specieReactingProperties>& gases
|
||||
PtrList<specieReactingProperties>& carrierSpecies
|
||||
);
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ Foam::basicReactingMultiphaseCloud::basicReactingMultiphaseCloud
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<specieReactingProperties>& gases
|
||||
PtrList<specieReactingProperties>& carrierSpecies
|
||||
)
|
||||
:
|
||||
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>
|
||||
@ -53,7 +53,7 @@ Foam::basicReactingMultiphaseCloud::basicReactingMultiphaseCloud
|
||||
U,
|
||||
g,
|
||||
thermo,
|
||||
gases
|
||||
carrierSpecies
|
||||
)
|
||||
{
|
||||
basicReactingMultiphaseParcel::readFields(*this);
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<specieReactingProperties>& gases
|
||||
PtrList<specieReactingProperties>& carrierSpecies
|
||||
);
|
||||
|
||||
|
||||
|
@ -168,7 +168,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::cellValueSourceCorrection
|
||||
forAll(td.cloud().rhoTrans(), i)
|
||||
{
|
||||
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];
|
||||
@ -268,7 +268,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
scalarField dMassSRGas(YGas_.size(), 0.0);
|
||||
scalarField dMassSRLiquid(YLiquid_.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
|
||||
scalar hReaction =
|
||||
|
@ -86,7 +86,7 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
|
||||
forAll(td.cloud().rhoTrans(), i)
|
||||
{
|
||||
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];
|
||||
|
@ -100,7 +100,8 @@ private:
|
||||
//- Set global ids - liquid and solid phases
|
||||
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);
|
||||
|
||||
//- Check the total mass fraction
|
||||
|
@ -40,7 +40,7 @@ Foam::CompositionModel<CloudType>::CompositionModel
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs")),
|
||||
carrierThermo_(owner.carrierThermo()),
|
||||
gases_(owner.gases()),
|
||||
carrierSpecies_(owner.carrierSpecies()),
|
||||
liquids_
|
||||
(
|
||||
liquidMixture::New
|
||||
@ -111,9 +111,9 @@ Foam::CompositionModel<CloudType>::carrierThermo() const
|
||||
|
||||
template<class CloudType>
|
||||
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)
|
||||
{
|
||||
label gid = props.globalIds()[i];
|
||||
WInv += Y[i]/this->gases()[gid].W();
|
||||
X[i] = Y[i]/this->gases()[gid].W();
|
||||
WInv += Y[i]/this->carrierSpecies()[gid].W();
|
||||
X[i] = Y[i]/this->carrierSpecies()[gid].W();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -345,7 +345,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::H
|
||||
forAll(Y, i)
|
||||
{
|
||||
label gid = props.globalIds()[i];
|
||||
HMixture += Y[i]*this->gases()[gid].H(T);
|
||||
HMixture += Y[i]*this->carrierSpecies()[gid].H(T);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -409,7 +409,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::cp
|
||||
forAll(Y, i)
|
||||
{
|
||||
label gid = props.globalIds()[i];
|
||||
cpMixture += Y[i]*this->gases()[gid].Cp(T);
|
||||
cpMixture += Y[i]*this->carrierSpecies()[gid].Cp(T);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -27,7 +27,8 @@ Class
|
||||
|
||||
Description
|
||||
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
|
||||
CompositionModel.C
|
||||
@ -77,12 +78,12 @@ class CompositionModel
|
||||
hCombustionThermo& carrierThermo_;
|
||||
|
||||
//- 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_;
|
||||
|
||||
//- Global solid properties data
|
||||
//- Global (additional) solid properties data
|
||||
autoPtr<solidMixture> solids_;
|
||||
|
||||
//- List of phase properties
|
||||
@ -150,13 +151,13 @@ public:
|
||||
|
||||
// Composition lists
|
||||
|
||||
//- Return the gases
|
||||
const PtrList<specieReactingProperties>& gases() const;
|
||||
//- Return the carrier species
|
||||
const PtrList<specieReactingProperties>& carrierSpecies() const;
|
||||
|
||||
//- Return the global liquids
|
||||
//- Return the global (additional) liquids
|
||||
const liquidMixture& liquids() const;
|
||||
|
||||
//- Return the global solids
|
||||
//- Return the global (additional) solids
|
||||
const solidMixture& solids() const;
|
||||
|
||||
//- Return the list of phase properties
|
||||
|
@ -41,8 +41,8 @@ Foam::scalarField Foam::LiquidEvaporation<CloudType>::calcXc
|
||||
forAll(Xc, i)
|
||||
{
|
||||
scalar Y = this->owner().carrierThermo().composition().Y()[i][cellI];
|
||||
Winv += Y/this->owner().gases()[i].W();
|
||||
Xc[i] = Y/this->owner().gases()[i].W();
|
||||
Winv += Y/this->owner().carrierSpecies()[i].W();
|
||||
Xc[i] = Y/this->owner().carrierSpecies()[i].W();
|
||||
}
|
||||
|
||||
return Xc/Winv;
|
||||
|
Loading…
Reference in New Issue
Block a user