From 620b23cf01d24a6138df932a3e02fe99bb3353e2 Mon Sep 17 00:00:00 2001 From: ignis Date: Fri, 26 Jan 2018 05:02:03 +0900 Subject: [PATCH] add turbulenceModel access and change variable names --- .../radiation/Make/options | 4 ++ .../radiation/radiationModels/P1/P1.C | 12 ++-- .../radiationModels/fvDOM/fvDOM/fvDOM.C | 4 +- .../MossBrookesSoot/MossBrookesSoot.C | 64 +++++++++---------- .../MossBrookesSoot/MossBrookesSoot.H | 20 +++--- .../sootModel/khanGreeveSoot/khanGreeveSoot.C | 62 +++++++++--------- .../sootModel/khanGreeveSoot/khanGreeveSoot.H | 22 +++---- .../khanGreeveSoot/khanGreeveSoots.C | 15 +++-- .../submodels/sootModel/sootModel/sootModel.C | 6 +- .../submodels/sootModel/sootModel/sootModel.H | 22 ++++++- .../sootModel/sootModel/sootModelI.H | 61 ++++++++++++++++++ 11 files changed, 186 insertions(+), 106 deletions(-) create mode 100644 src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModelI.H diff --git a/src/thermophysicalModels/radiation/Make/options b/src/thermophysicalModels/radiation/Make/options index 0e1c88839..286ee3eb2 100644 --- a/src/thermophysicalModels/radiation/Make/options +++ b/src/thermophysicalModels/radiation/Make/options @@ -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 \ diff --git a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C index e98ce56d9..31cc2c7ff 100644 --- a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C +++ b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C @@ -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::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 E = absorptionEmission_->ECont()()(); const DimensionedField a = - absorptionEmission_->aCont()()()+soot_->aSoot()()(); + absorptionEmission_->aCont()()()+soot_->a()()(); return a*G - E; } diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C index 76681de7d..849d2ca7e 100644 --- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C +++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C @@ -590,7 +590,7 @@ Foam::tmp 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 a = - absorptionEmission_->aCont()()() + soot_->aSoot()()(); + absorptionEmission_->aCont()()() + soot_->a()()(); return a*G - E; } diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/MossBrookesSoot/MossBrookesSoot.C b/src/thermophysicalModels/radiation/submodels/sootModel/MossBrookesSoot/MossBrookesSoot.C index 4c2ebd735..0e786f22b 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/MossBrookesSoot/MossBrookesSoot.C +++ b/src/thermophysicalModels/radiation/submodels/sootModel/MossBrookesSoot/MossBrookesSoot.C @@ -182,7 +182,7 @@ Foam::radiation::MossBrookesSoot::MossBrookesSoot mesh_, dimensionedScalar("NSnet", dimless/(pow3(dimLength)*dimTime), 0.0) ), - ParameterAgg_ + aggParam_ ( IOobject ( @@ -208,7 +208,7 @@ Foam::radiation::MossBrookesSoot::MossBrookesSoot mesh_, dimensionedScalar("Sf", dimless, 0.0) ), - SootMeanDiameter_ + sootMeanDiameter_ ( IOobject ( @@ -221,8 +221,8 @@ Foam::radiation::MossBrookesSoot::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::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::nut() const template Foam::tmp -Foam::radiation::MossBrookesSoot::MoleFracPrec() const +Foam::radiation::MossBrookesSoot::XPrec() const { word precSpecie(coeffsDict_.lookup("Precursor")); const word *precspecie; @@ -278,7 +278,7 @@ Foam::radiation::MossBrookesSoot::MoleFracPrec() con template Foam::tmp -Foam::radiation::MossBrookesSoot::MoleFracSgs() const +Foam::radiation::MossBrookesSoot::XSgs() const { word sgsSpecie(coeffsDict_.lookup("SurfaceGrowSpecie")); const word *sgsspecie; @@ -288,7 +288,7 @@ Foam::radiation::MossBrookesSoot::MoleFracSgs() cons template Foam::tmp -Foam::radiation::MossBrookesSoot::MoleFracOxid() const +Foam::radiation::MossBrookesSoot::XOxid() const { word oxSpecie(coeffsDict_.lookup("SootOxidizerSpecie")); const word *oxspecie; @@ -298,7 +298,7 @@ Foam::radiation::MossBrookesSoot::MoleFracOxid() con template Foam::tmp -Foam::radiation::MossBrookesSoot::aSoot(const label bandI) const +Foam::radiation::MossBrookesSoot::a(const label bandI) const { const volScalarField T_ = thermo_.T(); @@ -325,7 +325,7 @@ Foam::radiation::MossBrookesSoot::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::aSoot(const label template Foam::tmp -Foam::radiation::MossBrookesSoot::eSoot(const label bandI) const +Foam::radiation::MossBrookesSoot::e(const label bandI) const { - return aSoot(bandI); + return a(bandI); } template @@ -374,7 +374,7 @@ void Foam::radiation::MossBrookesSoot::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::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::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::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::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::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::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]; } diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/MossBrookesSoot/MossBrookesSoot.H b/src/thermophysicalModels/radiation/submodels/sootModel/MossBrookesSoot/MossBrookesSoot.H index bdb225073..52a35c311 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/MossBrookesSoot/MossBrookesSoot.H +++ b/src/thermophysicalModels/radiation/submodels/sootModel/MossBrookesSoot/MossBrookesSoot.H @@ -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 nut() const; //- Return mole fraction of soot precursor - tmp MoleFracPrec() const; + tmp XPrec() const; //- Return mole fraction of soot surface growth specie - tmp MoleFracSgs() const; + tmp XSgs() const; //- Return mole fraction of soot oxidation specie - tmp MoleFracOxid() const; + tmp XOxid() const; public: @@ -263,12 +263,12 @@ public: // Soot absorption coefficient //- Soot absorption coefficient (net) - tmp aSoot(const label bandI = 0) const; + virtual tmp a(const label bandI = 0) const; // Soot emission coefficient //- Soot emission coefficient (net) - tmp eSoot(const label bandI = 0) const; + virtual tmp e(const label bandI = 0) const; }; diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoot.C b/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoot.C index 0e12803bd..122f7167b 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoot.C +++ b/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoot.C @@ -133,30 +133,30 @@ Foam::radiation::khanGreeveSoot::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::Yfuel() const template Foam::tmp -Foam::radiation::khanGreeveSoot::MoleFracfuel() const +Foam::radiation::khanGreeveSoot::Xfuel() const { word fuelSpecie(coeffsDict_.lookup("Fuel")); const word *fuelspecie; @@ -233,7 +233,7 @@ Foam::radiation::khanGreeveSoot::nut() const template Foam::tmp -Foam::radiation::khanGreeveSoot::aSoot(const label bandI) const +Foam::radiation::khanGreeveSoot::a(const label bandI) const { const volScalarField T_ = thermo_.T(); @@ -251,34 +251,30 @@ Foam::radiation::khanGreeveSoot::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 Foam::tmp -Foam::radiation::khanGreeveSoot::eSoot(const label bandI) const +Foam::radiation::khanGreeveSoot::e(const label bandI) const { - return aSoot(bandI); + return a(bandI); } template @@ -309,7 +305,7 @@ void Foam::radiation::khanGreeveSoot::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::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::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::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::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; } diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoot.H b/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoot.H index 0841eabbf..a4b7819ed 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoot.H +++ b/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoot.H @@ -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 Yfuel() const; //- Return the mole fraction of the fuel - tmp MoleFracfuel() const; + tmp Xfuel() const; //- Return the epsilon tmp epsilon() const; @@ -222,12 +222,12 @@ public: // Soot absorption coefficient //- Soot absorption coefficient (net) - tmp aSoot(const label bandI = 0) const; + virtual tmp a(const label bandI = 0) const; // Soot emission coefficient //- Soot emission coefficient (net) - tmp eSoot(const label bandI = 0) const; + virtual tmp e(const label bandI = 0) const; }; diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoots.C b/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoots.C index d3316e836..c9fe40583 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoots.C +++ b/src/thermophysicalModels/radiation/submodels/sootModel/khanGreeveSoot/khanGreeveSoots.C @@ -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); // ************************************************************************* // diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModel.C b/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModel.C index 0513b199c..b30e6a61b 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModel.C +++ b/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModel.C @@ -59,7 +59,7 @@ Foam::radiation::sootModel::~sootModel() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp -Foam::radiation::sootModel::aSoot(const label bandI) const +Foam::radiation::sootModel::a(const label bandI) const { return tmp ( @@ -81,7 +81,7 @@ Foam::radiation::sootModel::aSoot(const label bandI) const } Foam::tmp -Foam::radiation::sootModel::eSoot(const label bandI) const +Foam::radiation::sootModel::e(const label bandI) const { return tmp ( @@ -108,7 +108,7 @@ void Foam::radiation::sootModel::correct PtrList& aj ) const { - a = this->aSoot(); + a = this->a(); aj[0] = a; } diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModel.H b/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModel.H index 91305fe21..d00b77d38 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModel.H +++ b/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModel.H @@ -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 aSoot(const label bandI = 0) const; + virtual tmp a(const label bandI = 0) const; // Soot emission coefficient //- Soot emission coefficient (net) - virtual tmp eSoot(const label bandI = 0) const; + virtual tmp e(const label bandI = 0) const; // Correct absorption coefficients @@ -157,6 +161,16 @@ public: PtrList& 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 // ************************************************************************* // diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModelI.H b/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModelI.H new file mode 100644 index 000000000..6e091c8fd --- /dev/null +++ b/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModelI.H @@ -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 . + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// * * * * * * * * * * * * * * * 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; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// ************************************************************************* //