add turbulenceModel access and change variable names

This commit is contained in:
ignis 2018-01-26 05:02:03 +09:00
parent af8e3468f5
commit 620b23cf01
11 changed files with 186 additions and 106 deletions

View file

@ -10,11 +10,15 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lcompressibleTransportModels \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lfluidThermophysicalModels \
-lspecie \
-lsolidThermo \

View file

@ -239,11 +239,9 @@ bool Foam::radiation::P1::read()
void Foam::radiation::P1::calculate()
{
a_ = absorptionEmission_->a()+ soot_->aSoot();
// a_ = absorptionEmission_->a();
aSoot_ = soot_->aSoot();
e_ = absorptionEmission_->e()+ soot_->eSoot();
// e_ = absorptionEmission_->e();
a_ = absorptionEmission_->a() + soot_->a();
aSoot_ = soot_->a();
e_ = absorptionEmission_->e() + soot_->e();
E_ = absorptionEmission_->E();
scalar sootradiationChecker = 0.0;
@ -318,7 +316,7 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::P1::Rp() const
IOobject::NO_WRITE,
false
),
4.0*(absorptionEmission_->eCont()+soot_->eSoot())*physicoChemical::sigma
4.0*(absorptionEmission_->eCont()+soot_->e())*physicoChemical::sigma
)
);
}
@ -332,7 +330,7 @@ Foam::radiation::P1::Ru() const
const DimensionedField<scalar, volMesh> E =
absorptionEmission_->ECont()()();
const DimensionedField<scalar, volMesh> a =
absorptionEmission_->aCont()()()+soot_->aSoot()()();
absorptionEmission_->aCont()()()+soot_->a()()();
return a*G - E;
}

View file

@ -590,7 +590,7 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::fvDOM::Rp() const
false
),
// Only include continuous phase emission
4*(absorptionEmission_->aCont() + soot_->aSoot())*physicoChemical::sigma
4*(absorptionEmission_->aCont() + soot_->a())*physicoChemical::sigma
)
);
}
@ -608,7 +608,7 @@ Foam::radiation::fvDOM::Ru() const
// Only include continuous phase absorption
const DimensionedField<scalar, volMesh> a =
absorptionEmission_->aCont()()() + soot_->aSoot()()();
absorptionEmission_->aCont()()() + soot_->a()()();
return a*G - E;
}

View file

@ -182,7 +182,7 @@ Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::MossBrookesSoot
mesh_,
dimensionedScalar("NSnet", dimless/(pow3(dimLength)*dimTime), 0.0)
),
ParameterAgg_
aggParam_
(
IOobject
(
@ -208,7 +208,7 @@ Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::MossBrookesSoot
mesh_,
dimensionedScalar("Sf", dimless, 0.0)
),
SootMeanDiameter_
sootMeanDiameter_
(
IOobject
(
@ -221,8 +221,8 @@ Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::MossBrookesSoot
mesh_,
dimensionedScalar("SootMeanDiameter", dimLength, 0.0)
),
Prtsoot(readScalar(coeffsDict_.lookup("TurbulentPrandtlNumberSoot"))),
rhosoot(readScalar(coeffsDict_.lookup("SootDensity"))),
PrtSoot(readScalar(coeffsDict_.lookup("TurbulentPrandtlNumberSoot"))),
rhoSoot(readScalar(coeffsDict_.lookup("SootDensity"))),
Calpha(readScalar(coeffsDict_.lookup("Calpha"))),
Mp(readScalar(coeffsDict_.lookup("Mp"))),
Cgamma(readScalar(coeffsDict_.lookup("Cgamma"))),
@ -234,7 +234,7 @@ Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::MossBrookesSoot
Navog(readScalar(coeffsDict_.lookup("AvogadroNumber"))),
Cbeta(readScalar(coeffsDict_.lookup("Cbeta"))),
Boltzmann(readScalar(coeffsDict_.lookup("BoltzmannConst"))),
EffectonRadiation_(readBool(coeffsDict_.lookup("Radiationeffect"))),
radiationActive_(readBool(coeffsDict_.lookup("Radiationeffect"))),
cliqueNuc(readScalar(coeffsDict_.lookup("NucExpCorrectConstant"))),
cliqueMassGrow(readScalar(coeffsDict_.lookup("MassGrowCorrectConstant"))),
chemistryPtr_(CombThermoType::New(mesh))
@ -268,7 +268,7 @@ Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::nut() const
template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::MoleFracPrec() const
Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::XPrec() const
{
word precSpecie(coeffsDict_.lookup("Precursor"));
const word *precspecie;
@ -278,7 +278,7 @@ Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::MoleFracPrec() con
template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::MoleFracSgs() const
Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::XSgs() const
{
word sgsSpecie(coeffsDict_.lookup("SurfaceGrowSpecie"));
const word *sgsspecie;
@ -288,7 +288,7 @@ Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::MoleFracSgs() cons
template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::MoleFracOxid() const
Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::XOxid() const
{
word oxSpecie(coeffsDict_.lookup("SootOxidizerSpecie"));
const word *oxspecie;
@ -298,7 +298,7 @@ Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::MoleFracOxid() con
template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::aSoot(const label bandI) const
Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::a(const label bandI) const
{
const volScalarField T_ = thermo_.T();
@ -325,7 +325,7 @@ Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::aSoot(const label
forAll(as, celli)
{
if (EffectonRadiation_ == true)
if (radiationActive_ == true)
{
as[celli] = (1232.4)*(1800.0)*soot_[celli]*(1.0+(4.8e-4)*(T_[celli]-2000.0));
}
@ -340,10 +340,10 @@ Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::aSoot(const label
template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::eSoot(const label bandI) const
Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::e(const label bandI) const
{
return aSoot(bandI);
return a(bandI);
}
template<class CombThermoType, class ThermoType>
@ -374,7 +374,7 @@ void Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::correct()
fvScalarMatrix SootEqn
(
fvm::div(phi_, soot_)
- fvm::laplacian((rho_*nut_/Prtsoot), soot_)
- fvm::laplacian((rho_*nut_/PrtSoot), soot_)
==
Snet_
);
@ -382,7 +382,7 @@ void Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::correct()
fvScalarMatrix NucConcEqn
(
fvm::div(phi_, NucConc_)
- fvm::laplacian((rho_*nut_/Prtsoot), NucConc_)
- fvm::laplacian((rho_*nut_/PrtSoot), NucConc_)
==
NSnet_
);
@ -411,7 +411,7 @@ void Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::correct()
NumDen_[celli] = rho_[celli]*(NucConc_[celli]*1e+15);
sootVF_[celli] = soot_[celli]*rho_[celli]/rhosoot;
sootVF_[celli] = soot_[celli]*rho_[celli]/rhoSoot;
}
if (minusindicator1 == 1.0 and minusindicator2 == 0.0) {
@ -433,11 +433,11 @@ void Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::calcSource()
const volScalarField T_ = thermo_.T();
const volScalarField p_ = thermo_.p();
const volScalarField MoleFracPrec_ = MoleFracPrec();
const volScalarField XPrec_ = XPrec();
const volScalarField MoleFracSgs_ = MoleFracSgs();
const volScalarField XSgs_ = XSgs();
const volScalarField MoleFracOxid_ = MoleFracOxid();
const volScalarField XOxid_ = XOxid();
scalar ErrorIndex_p = 0;
scalar ErrorIndex_rho = 0;
@ -456,10 +456,10 @@ void Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::calcSource()
if (T_[celli] < 0) {
ErrorIndex_T = 1;
}
if (MoleFracPrec_[celli] < 0) {
if (XPrec_[celli] < 0) {
ErrorIndex_precursor = 1;
}
if (MoleFracOxid_[celli] < 0) {
if (XOxid_[celli] < 0) {
ErrorIndex_oxidizer = 1;
}
}
@ -482,29 +482,29 @@ void Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::calcSource()
forAll(rho_, celli)
{
const scalar MoleFracPreci = MoleFracPrec_[celli];
const scalar MoleFracSgsi = MoleFracSgs_[celli];
const scalar MoleFracOxidi = MoleFracOxid_[celli];
const scalar XPreci = XPrec_[celli];
const scalar XSgsi = XSgs_[celli];
const scalar XOxidi = XOxid_[celli];
const scalar Ti = T_[celli];
const scalar pi = p_[celli];
const scalar rhoi = rho_[celli];
const scalar sooti = soot_[celli];
const scalar NumDeni = NumDen_[celli];
const scalar MolarConcPreci = (MoleFracPreci*pi)/(8314.5*Ti);
const scalar MolarConcSgsi = (MoleFracSgsi*pi)/(8314.5*Ti);
const scalar MolarConcOxidi = (MoleFracOxidi*pi)/(8314.5*Ti);
const scalar MolarConcPreci = (XPreci*pi)/(8314.5*Ti);
const scalar MolarConcSgsi = (XSgsi*pi)/(8314.5*Ti);
const scalar MolarConcOxidi = (XOxidi*pi)/(8314.5*Ti);
scalar SootMeanDiameteri = 0.0;
if (NumDeni == 0.0) {
SootMeanDiameter_[celli] = 0.0;
sootMeanDiameter_[celli] = 0.0;
Sf_[celli] = 0.0;
}
else {
const scalar parameter = (6.0/3.1416)*(rhoi/rhosoot)*(sooti/NumDeni);
SootMeanDiameter_[celli] = pow(parameter,0.33333);
SootMeanDiameteri = SootMeanDiameter_[celli];
const scalar parameter = (6.0/3.1416)*(rhoi/rhoSoot)*(sooti/NumDeni);
sootMeanDiameter_[celli] = pow(parameter,0.33333);
SootMeanDiameteri = sootMeanDiameter_[celli];
Sf_[celli] = (3.1416)*pow(SootMeanDiameteri,2.0)*NumDeni;
}
@ -518,9 +518,9 @@ void Foam::radiation::MossBrookesSoot<CombThermoType, ThermoType>::calcSource()
NSnuc_[celli] = (Calpha*Navog*MolarConcPreci*exp(-cliqueNuc*Talpha/Ti))*(1e-15);
ParameterAgg_[celli] = 24.0*Boltzmann*Ti/rhosoot;
aggParam_[celli] = 24.0*Boltzmann*Ti/rhoSoot;
NSagg_[celli] = (Cbeta*pow((ParameterAgg_[celli]),0.5)*pow(SootMeanDiameteri,0.5)*pow(NumDeni,2.0))*(1e-15);
NSagg_[celli] = (Cbeta*pow((aggParam_[celli]),0.5)*pow(SootMeanDiameteri,0.5)*pow(NumDeni,2.0))*(1e-15);
NSnet_[celli] = NSnuc_[celli] - NSagg_[celli];
}

View file

@ -133,19 +133,19 @@ class MossBrookesSoot
volScalarField NSnet_;
//- Parameter for Agglomeration source term
volScalarField ParameterAgg_;
volScalarField aggParam_;
//- Available surface area of soot oxidation per volume
volScalarField Sf_;
//- Soot particle mean diameter
volScalarField SootMeanDiameter_;
volScalarField sootMeanDiameter_;
//- Soot turbulent Prandtl number
scalar Prtsoot;
scalar PrtSoot;
//- Density of soot particle
scalar rhosoot;
scalar rhoSoot;
//- Model constant for soot inception rate
scalar Calpha;
@ -181,7 +181,7 @@ class MossBrookesSoot
scalar Boltzmann;
//- Soot radiative effect on/off flag
bool EffectonRadiation_;
bool radiationActive_;
//- Correction constant for Exponent in Nucleation
scalar cliqueNuc;
@ -214,13 +214,13 @@ protected:
tmp<volScalarField> nut() const;
//- Return mole fraction of soot precursor
tmp<volScalarField> MoleFracPrec() const;
tmp<volScalarField> XPrec() const;
//- Return mole fraction of soot surface growth specie
tmp<volScalarField> MoleFracSgs() const;
tmp<volScalarField> XSgs() const;
//- Return mole fraction of soot oxidation specie
tmp<volScalarField> MoleFracOxid() const;
tmp<volScalarField> XOxid() const;
public:
@ -263,12 +263,12 @@ public:
// Soot absorption coefficient
//- Soot absorption coefficient (net)
tmp<volScalarField> aSoot(const label bandI = 0) const;
virtual tmp<volScalarField> a(const label bandI = 0) const;
// Soot emission coefficient
//- Soot emission coefficient (net)
tmp<volScalarField> eSoot(const label bandI = 0) const;
virtual tmp<volScalarField> e(const label bandI = 0) const;
};

View file

@ -133,30 +133,30 @@ Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::khanGreeveSoot
mesh_,
dimensionedScalar("S2", dimMass/(pow3(dimLength)*dimTime), 0.0)
),
Prtsoot(readScalar(coeffsDict_.lookup("TurbulentPrandtlNumberSoot"))),
rhosoot(readScalar(coeffsDict_.lookup("SootDensity"))),
PrtSoot(readScalar(coeffsDict_.lookup("TurbulentPrandtlNumberSoot"))),
rhoSoot(readScalar(coeffsDict_.lookup("SootDensity"))),
Cs_(readScalar(coeffsDict_.lookup("Cs"))),
r_(readScalar(coeffsDict_.lookup("r"))),
Ta_(readScalar(coeffsDict_.lookup("ActivationTemperature"))),
A_(readScalar(coeffsDict_.lookup("A"))),
nufuel_(readScalar(coeffsDict_.lookup("nufuel"))),
nusoot_(readScalar(coeffsDict_.lookup("nusoot"))),
Eqv_
nuFuel_(readScalar(coeffsDict_.lookup("nufuel"))),
nuSoot_(readScalar(coeffsDict_.lookup("nusoot"))),
eqv_
(
IOobject
(
"Eqv",
"eqv",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("Eqv", dimless, 0.0)
dimensionedScalar("eqv", dimless, 0.0)
),
EqvMax(readScalar(coeffsDict_.lookup("EquivalenceRatioMax"))),
EqvMin(readScalar(coeffsDict_.lookup("EquivalenceRatioMin"))),
EffectonRadiation_(readBool(coeffsDict_.lookup("Radiationeffect"))),
eqvMax(readScalar(coeffsDict_.lookup("EquivalenceRatioMax"))),
eqvMin(readScalar(coeffsDict_.lookup("EquivalenceRatioMin"))),
radiationActive_(readBool(coeffsDict_.lookup("Radiationeffect"))),
chemistryPtr_(CombThermoType::New(mesh))
{
}
@ -195,7 +195,7 @@ Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::Yfuel() const
template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::MoleFracfuel() const
Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::Xfuel() const
{
word fuelSpecie(coeffsDict_.lookup("Fuel"));
const word *fuelspecie;
@ -233,7 +233,7 @@ Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::nut() const
template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::aSoot(const label bandI) const
Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::a(const label bandI) const
{
const volScalarField T_ = thermo_.T();
@ -251,34 +251,30 @@ Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::aSoot(const label b
IOobject::NO_WRITE
),
mesh(),
dimensionedScalar("as", dimless/dimLength, 0.0),
dimensionedScalar("aSoot", dimless/dimLength, 0.0),
extrapolatedCalculatedFvPatchVectorField::typeName
)
);
scalarField& as = tas.ref().primitiveFieldRef();
forAll(as, celli)
if (radiationActive_)
{
if (EffectonRadiation_ == true)
forAll(as, celli)
{
as[celli] = (1232.4)*(1800.0)*soot_[celli]*(1.0+(4.8e-4)*(T_[celli]-2000.0));
}
else
{
as[celli] = 0.0;
}
}
tas.ref().correctBoundaryConditions();
return tas;
}
template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::eSoot(const label bandI) const
Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::e(const label bandI) const
{
return aSoot(bandI);
return a(bandI);
}
template<class CombThermoType, class ThermoType>
@ -309,7 +305,7 @@ void Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::correct()
fvScalarMatrix SootEqn
(
fvm::div(phi_, soot_)
- fvm::laplacian((rho_*nut_/Prtsoot), soot_)
- fvm::laplacian((rho_*nut_/PrtSoot), soot_)
==
Snet_
);
@ -324,7 +320,7 @@ void Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::correct()
soot_[celli] = 0.0;
}
sootVF_[celli] = soot_[celli]*rho_[celli]/rhosoot;
sootVF_[celli] = soot_[celli]*rho_[celli]/rhoSoot;
}
@ -342,7 +338,7 @@ void Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::calcSource()
const volScalarField Yfuel_ = Yfuel();
const volScalarField MoleFracfuel_ = MoleFracfuel();
const volScalarField Xfuel_ = Xfuel();
const volScalarField epsilon_ = epsilon();
@ -353,20 +349,20 @@ void Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::calcSource()
const scalar Yoxi = Yox_[celli];
const scalar Yfueli = Yfuel_[celli];
Eqv_[celli] = (Yfueli/Yoxi)*nufuel_;
eqv_[celli] = (Yfueli/Yoxi)*nuFuel_;
if (Eqv_[celli] > EqvMax){
Eqv_[celli] = 0.0;
if (eqv_[celli] > eqvMax){
eqv_[celli] = 0.0;
}
else if (Eqv_[celli] < EqvMin){
Eqv_[celli] = 0.0;
else if (eqv_[celli] < eqvMin){
eqv_[celli] = 0.0;
}
const scalar pi = p_[celli];
const scalar MoleFracfueli = MoleFracfuel_[celli];
const scalar Xfueli = Xfuel_[celli];
const scalar Ti = T_[celli];
Sform_[celli] = Cs_*pi*MoleFracfueli*pow(Eqv_[celli],r_)*exp(-Ta_/Ti);
Sform_[celli] = Cs_*pi*Xfueli*pow(eqv_[celli],r_)*exp(-Ta_/Ti);
const scalar rhoi = rho_[celli];
const scalar sooti = soot_[celli];
@ -379,7 +375,7 @@ void Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::calcSource()
S2_[celli] = 0.0;
}
else {
S2_[celli] = A_*rhoi*(Yoxi/nusoot_)*(sooti*nusoot_/(sooti*nusoot_+(Yfueli)*nufuel_))*epsiloni/ki;
S2_[celli] = A_*rhoi*(Yoxi/nuSoot_)*(sooti*nuSoot_/(sooti*nuSoot_+(Yfueli)*nuFuel_))*epsiloni/ki;
}

View file

@ -116,10 +116,10 @@ class khanGreeveSoot
volScalarField S2_;
//- Soot turbulent Prandtl number
scalar Prtsoot;
scalar PrtSoot;
//- Soot density
scalar rhosoot;
scalar rhoSoot;
//- Soot formation constant
scalar Cs_;
@ -134,22 +134,22 @@ class khanGreeveSoot
scalar A_;
//- Mass stoichiometry for the fuel oxidation
scalar nufuel_;
scalar nuFuel_;
//- Mass stoichiometry for the soot oxidation
scalar nusoot_;
scalar nuSoot_;
//- Equivalence ratio for the fuel
volScalarField Eqv_;
volScalarField eqv_;
//- Maximum equivalence ratio
scalar EqvMax;
scalar eqvMax;
//- Minimum equivalence ratio
scalar EqvMin;
scalar eqvMin;
//- Soot radiative effect on/off flag
bool EffectonRadiation_;
bool radiationActive_;
protected:
@ -167,7 +167,7 @@ protected:
tmp<volScalarField> Yfuel() const;
//- Return the mole fraction of the fuel
tmp<volScalarField> MoleFracfuel() const;
tmp<volScalarField> Xfuel() const;
//- Return the epsilon
tmp<volScalarField> epsilon() const;
@ -222,12 +222,12 @@ public:
// Soot absorption coefficient
//- Soot absorption coefficient (net)
tmp<volScalarField> aSoot(const label bandI = 0) const;
virtual tmp<volScalarField> a(const label bandI = 0) const;
// Soot emission coefficient
//- Soot emission coefficient (net)
tmp<volScalarField> eSoot(const label bandI = 0) const;
virtual tmp<volScalarField> e(const label bandI = 0) const;
};

View file

@ -27,19 +27,22 @@ License
#include "khanGreeveSoot.H"
#include "makeSootTypes.H"
#include "thermoPhysicsTypes.H"
#include "psiChemistryModel.H" //JW 20170317 (12)
#include "rhoChemistryModel.H" //JW 20170317 (12)
#include "psiChemistryModel.H"
#include "rhoChemistryModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasHThermoPhysics); //JW 20170317 (12)
makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasEThermoPhysics); //JW 20170317 (12)
makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasHThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasEThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasHaThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasEaThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasHThermoPhysics); //JW 20170317 (12)
makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasEThermoPhysics); //JW 20170317 (12)
makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasHThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasEThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasHaThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasEaThermoPhysics);
// makeSootTypesThermo(mixtureFractionSoot, gasEThermoPhysics);
// ************************************************************************* //

View file

@ -59,7 +59,7 @@ Foam::radiation::sootModel::~sootModel()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::radiation::sootModel::aSoot(const label bandI) const
Foam::radiation::sootModel::a(const label bandI) const
{
return tmp<volScalarField>
(
@ -81,7 +81,7 @@ Foam::radiation::sootModel::aSoot(const label bandI) const
}
Foam::tmp<Foam::volScalarField>
Foam::radiation::sootModel::eSoot(const label bandI) const
Foam::radiation::sootModel::e(const label bandI) const
{
return tmp<volScalarField>
(
@ -108,7 +108,7 @@ void Foam::radiation::sootModel::correct
PtrList<volScalarField>& aj
) const
{
a = this->aSoot();
a = this->a();
aj[0] = a;
}

View file

@ -36,6 +36,7 @@ Description
#include "autoPtr.H"
#include "runTimeSelectionTables.H"
#include "volFields.H"
#include "turbulentFluidThermoModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -64,6 +65,9 @@ protected:
//- Reference to the fvMesh
const fvMesh& mesh_;
//- Reference to the turbulence model
compressibleTurbulenceModel* turbulencePtr_;
public:
@ -142,12 +146,12 @@ public:
// Soot absorption coefficient
//- Soot absorption coefficient (net)
virtual tmp<volScalarField> aSoot(const label bandI = 0) const;
virtual tmp<volScalarField> a(const label bandI = 0) const;
// Soot emission coefficient
//- Soot emission coefficient (net)
virtual tmp<volScalarField> eSoot(const label bandI = 0) const;
virtual tmp<volScalarField> e(const label bandI = 0) const;
// Correct absorption coefficients
@ -157,6 +161,16 @@ public:
PtrList<volScalarField>& aj
) const;
//- Return access to turbulence
inline const compressibleTurbulenceModel& turbulence() const;
//- Set turbulence
inline void setTurbulence
(
compressibleTurbulenceModel& turbModel
);
};
@ -167,6 +181,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "sootModelI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View file

@ -0,0 +1,61 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline const Foam::compressibleTurbulenceModel&
Foam::radiation::sootModel::turbulence() const
{
if (turbulencePtr_)
{
return *turbulencePtr_;
}
else
{
FatalErrorInFunction
<< "turbulencePtr_ is empty. Please use "
<< "sootModel::setTurbulence "
<< "(compressibleTurbulenceModel& )"
<< abort(FatalError);
return *turbulencePtr_;
}
}
inline void Foam::radiation::sootModel::setTurbulence
(
compressibleTurbulenceModel& turbModel
)
{
turbulencePtr_ = &turbModel;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //