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/properties/solidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/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)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lcompressibleTransportModels \ -lcompressibleTransportModels \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lsolidThermo \ -lsolidThermo \

View file

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

View file

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

View file

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

View file

@ -133,19 +133,19 @@ class MossBrookesSoot
volScalarField NSnet_; volScalarField NSnet_;
//- Parameter for Agglomeration source term //- Parameter for Agglomeration source term
volScalarField ParameterAgg_; volScalarField aggParam_;
//- Available surface area of soot oxidation per volume //- Available surface area of soot oxidation per volume
volScalarField Sf_; volScalarField Sf_;
//- Soot particle mean diameter //- Soot particle mean diameter
volScalarField SootMeanDiameter_; volScalarField sootMeanDiameter_;
//- Soot turbulent Prandtl number //- Soot turbulent Prandtl number
scalar Prtsoot; scalar PrtSoot;
//- Density of soot particle //- Density of soot particle
scalar rhosoot; scalar rhoSoot;
//- Model constant for soot inception rate //- Model constant for soot inception rate
scalar Calpha; scalar Calpha;
@ -181,7 +181,7 @@ class MossBrookesSoot
scalar Boltzmann; scalar Boltzmann;
//- Soot radiative effect on/off flag //- Soot radiative effect on/off flag
bool EffectonRadiation_; bool radiationActive_;
//- Correction constant for Exponent in Nucleation //- Correction constant for Exponent in Nucleation
scalar cliqueNuc; scalar cliqueNuc;
@ -214,13 +214,13 @@ protected:
tmp<volScalarField> nut() const; tmp<volScalarField> nut() const;
//- Return mole fraction of soot precursor //- Return mole fraction of soot precursor
tmp<volScalarField> MoleFracPrec() const; tmp<volScalarField> XPrec() const;
//- Return mole fraction of soot surface growth specie //- Return mole fraction of soot surface growth specie
tmp<volScalarField> MoleFracSgs() const; tmp<volScalarField> XSgs() const;
//- Return mole fraction of soot oxidation specie //- Return mole fraction of soot oxidation specie
tmp<volScalarField> MoleFracOxid() const; tmp<volScalarField> XOxid() const;
public: public:
@ -263,12 +263,12 @@ public:
// Soot absorption coefficient // Soot absorption coefficient
//- Soot absorption coefficient (net) //- 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
//- Soot emission coefficient (net) //- 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_, mesh_,
dimensionedScalar("S2", dimMass/(pow3(dimLength)*dimTime), 0.0) dimensionedScalar("S2", dimMass/(pow3(dimLength)*dimTime), 0.0)
), ),
Prtsoot(readScalar(coeffsDict_.lookup("TurbulentPrandtlNumberSoot"))), PrtSoot(readScalar(coeffsDict_.lookup("TurbulentPrandtlNumberSoot"))),
rhosoot(readScalar(coeffsDict_.lookup("SootDensity"))), rhoSoot(readScalar(coeffsDict_.lookup("SootDensity"))),
Cs_(readScalar(coeffsDict_.lookup("Cs"))), Cs_(readScalar(coeffsDict_.lookup("Cs"))),
r_(readScalar(coeffsDict_.lookup("r"))), r_(readScalar(coeffsDict_.lookup("r"))),
Ta_(readScalar(coeffsDict_.lookup("ActivationTemperature"))), Ta_(readScalar(coeffsDict_.lookup("ActivationTemperature"))),
A_(readScalar(coeffsDict_.lookup("A"))), A_(readScalar(coeffsDict_.lookup("A"))),
nufuel_(readScalar(coeffsDict_.lookup("nufuel"))), nuFuel_(readScalar(coeffsDict_.lookup("nufuel"))),
nusoot_(readScalar(coeffsDict_.lookup("nusoot"))), nuSoot_(readScalar(coeffsDict_.lookup("nusoot"))),
Eqv_ eqv_
( (
IOobject IOobject
( (
"Eqv", "eqv",
mesh_.time().timeName(), mesh_.time().timeName(),
mesh_, mesh_,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
mesh_, mesh_,
dimensionedScalar("Eqv", dimless, 0.0) dimensionedScalar("eqv", dimless, 0.0)
), ),
EqvMax(readScalar(coeffsDict_.lookup("EquivalenceRatioMax"))), eqvMax(readScalar(coeffsDict_.lookup("EquivalenceRatioMax"))),
EqvMin(readScalar(coeffsDict_.lookup("EquivalenceRatioMin"))), eqvMin(readScalar(coeffsDict_.lookup("EquivalenceRatioMin"))),
EffectonRadiation_(readBool(coeffsDict_.lookup("Radiationeffect"))), radiationActive_(readBool(coeffsDict_.lookup("Radiationeffect"))),
chemistryPtr_(CombThermoType::New(mesh)) chemistryPtr_(CombThermoType::New(mesh))
{ {
} }
@ -195,7 +195,7 @@ Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::Yfuel() const
template<class CombThermoType, class ThermoType> template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::MoleFracfuel() const Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::Xfuel() const
{ {
word fuelSpecie(coeffsDict_.lookup("Fuel")); word fuelSpecie(coeffsDict_.lookup("Fuel"));
const word *fuelspecie; const word *fuelspecie;
@ -233,7 +233,7 @@ Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::nut() const
template<class CombThermoType, class ThermoType> template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::volScalarField> 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(); const volScalarField T_ = thermo_.T();
@ -251,34 +251,30 @@ Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::aSoot(const label b
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
mesh(), mesh(),
dimensionedScalar("as", dimless/dimLength, 0.0), dimensionedScalar("aSoot", dimless/dimLength, 0.0),
extrapolatedCalculatedFvPatchVectorField::typeName extrapolatedCalculatedFvPatchVectorField::typeName
) )
); );
scalarField& as = tas.ref().primitiveFieldRef(); scalarField& as = tas.ref().primitiveFieldRef();
if (radiationActive_)
forAll(as, celli)
{ {
if (EffectonRadiation_ == true) forAll(as, celli)
{ {
as[celli] = (1232.4)*(1800.0)*soot_[celli]*(1.0+(4.8e-4)*(T_[celli]-2000.0)); 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(); tas.ref().correctBoundaryConditions();
return tas; return tas;
} }
template<class CombThermoType, class ThermoType> template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::volScalarField> 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> template<class CombThermoType, class ThermoType>
@ -309,7 +305,7 @@ void Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::correct()
fvScalarMatrix SootEqn fvScalarMatrix SootEqn
( (
fvm::div(phi_, soot_) fvm::div(phi_, soot_)
- fvm::laplacian((rho_*nut_/Prtsoot), soot_) - fvm::laplacian((rho_*nut_/PrtSoot), soot_)
== ==
Snet_ Snet_
); );
@ -324,7 +320,7 @@ void Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::correct()
soot_[celli] = 0.0; 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 Yfuel_ = Yfuel();
const volScalarField MoleFracfuel_ = MoleFracfuel(); const volScalarField Xfuel_ = Xfuel();
const volScalarField epsilon_ = epsilon(); const volScalarField epsilon_ = epsilon();
@ -353,20 +349,20 @@ void Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::calcSource()
const scalar Yoxi = Yox_[celli]; const scalar Yoxi = Yox_[celli];
const scalar Yfueli = Yfuel_[celli]; const scalar Yfueli = Yfuel_[celli];
Eqv_[celli] = (Yfueli/Yoxi)*nufuel_; eqv_[celli] = (Yfueli/Yoxi)*nuFuel_;
if (Eqv_[celli] > EqvMax){ if (eqv_[celli] > eqvMax){
Eqv_[celli] = 0.0; eqv_[celli] = 0.0;
} }
else if (Eqv_[celli] < EqvMin){ else if (eqv_[celli] < eqvMin){
Eqv_[celli] = 0.0; eqv_[celli] = 0.0;
} }
const scalar pi = p_[celli]; const scalar pi = p_[celli];
const scalar MoleFracfueli = MoleFracfuel_[celli]; const scalar Xfueli = Xfuel_[celli];
const scalar Ti = T_[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 rhoi = rho_[celli];
const scalar sooti = soot_[celli]; const scalar sooti = soot_[celli];
@ -379,7 +375,7 @@ void Foam::radiation::khanGreeveSoot<CombThermoType, ThermoType>::calcSource()
S2_[celli] = 0.0; S2_[celli] = 0.0;
} }
else { 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_; volScalarField S2_;
//- Soot turbulent Prandtl number //- Soot turbulent Prandtl number
scalar Prtsoot; scalar PrtSoot;
//- Soot density //- Soot density
scalar rhosoot; scalar rhoSoot;
//- Soot formation constant //- Soot formation constant
scalar Cs_; scalar Cs_;
@ -134,22 +134,22 @@ class khanGreeveSoot
scalar A_; scalar A_;
//- Mass stoichiometry for the fuel oxidation //- Mass stoichiometry for the fuel oxidation
scalar nufuel_; scalar nuFuel_;
//- Mass stoichiometry for the soot oxidation //- Mass stoichiometry for the soot oxidation
scalar nusoot_; scalar nuSoot_;
//- Equivalence ratio for the fuel //- Equivalence ratio for the fuel
volScalarField Eqv_; volScalarField eqv_;
//- Maximum equivalence ratio //- Maximum equivalence ratio
scalar EqvMax; scalar eqvMax;
//- Minimum equivalence ratio //- Minimum equivalence ratio
scalar EqvMin; scalar eqvMin;
//- Soot radiative effect on/off flag //- Soot radiative effect on/off flag
bool EffectonRadiation_; bool radiationActive_;
protected: protected:
@ -167,7 +167,7 @@ protected:
tmp<volScalarField> Yfuel() const; tmp<volScalarField> Yfuel() const;
//- Return the mole fraction of the fuel //- Return the mole fraction of the fuel
tmp<volScalarField> MoleFracfuel() const; tmp<volScalarField> Xfuel() const;
//- Return the epsilon //- Return the epsilon
tmp<volScalarField> epsilon() const; tmp<volScalarField> epsilon() const;
@ -222,12 +222,12 @@ public:
// Soot absorption coefficient // Soot absorption coefficient
//- Soot absorption coefficient (net) //- 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
//- Soot emission coefficient (net) //- 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 "khanGreeveSoot.H"
#include "makeSootTypes.H" #include "makeSootTypes.H"
#include "thermoPhysicsTypes.H" #include "thermoPhysicsTypes.H"
#include "psiChemistryModel.H" //JW 20170317 (12) #include "psiChemistryModel.H"
#include "rhoChemistryModel.H" //JW 20170317 (12) #include "rhoChemistryModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasHThermoPhysics); //JW 20170317 (12) makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasHThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasEThermoPhysics); //JW 20170317 (12) makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasEThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasHaThermoPhysics); makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasHaThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasEaThermoPhysics); makeSootTypesCombThermo(khanGreeveSoot, psiChemistryModel, gasEaThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasHThermoPhysics); //JW 20170317 (12) makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasHThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasEThermoPhysics); //JW 20170317 (12) makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasEThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasHaThermoPhysics); makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasHaThermoPhysics);
makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasEaThermoPhysics); makeSootTypesCombThermo(khanGreeveSoot, rhoChemistryModel, gasEaThermoPhysics);
// makeSootTypesThermo(mixtureFractionSoot, gasEThermoPhysics);
// ************************************************************************* // // ************************************************************************* //

View file

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

View file

@ -36,6 +36,7 @@ Description
#include "autoPtr.H" #include "autoPtr.H"
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"
#include "volFields.H" #include "volFields.H"
#include "turbulentFluidThermoModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -64,6 +65,9 @@ protected:
//- Reference to the fvMesh //- Reference to the fvMesh
const fvMesh& mesh_; const fvMesh& mesh_;
//- Reference to the turbulence model
compressibleTurbulenceModel* turbulencePtr_;
public: public:
@ -142,12 +146,12 @@ public:
// Soot absorption coefficient // Soot absorption coefficient
//- Soot absorption coefficient (net) //- 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
//- Soot emission coefficient (net) //- 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 // Correct absorption coefficients
@ -157,6 +161,16 @@ public:
PtrList<volScalarField>& aj PtrList<volScalarField>& aj
) const; ) 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 #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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //