Rationalized heat release rate functions
Combined 'dQ()' and 'Sh()' into 'Qdot()' which returns the heat-release rate in the normal units [kg/m/s3] and used as the heat release rate source term in the energy equations, to set the field 'Qdot' in several combustion solvers and for the evaluation of the local time-step when running LTS.
This commit is contained in:
parent
0fdaafce7c
commit
1a2c77abfa
54 changed files with 142 additions and 366 deletions
|
|
@ -1,6 +1,6 @@
|
|||
runTime.write();
|
||||
|
||||
Info<< "Sh = " << Sh
|
||||
Info<< "Qdot = " << Qdot
|
||||
<< ", T = " << thermo.T()[0]
|
||||
<< ", p = " << thermo.p()[0]
|
||||
<< ", " << Y[0].name() << " = " << Y[0][0]
|
||||
|
|
@ -8,4 +8,3 @@
|
|||
|
||||
post<< runTime.value() << token::TAB << thermo.T()[0] << token::TAB
|
||||
<< thermo.p()[0] << endl;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
dtChem = chemistry.solve(runTime.deltaT().value());
|
||||
scalar Sh = chemistry.Sh()()[0]/rho[0];
|
||||
integratedHeat += Sh*runTime.deltaT().value();
|
||||
dtChem = chemistry.solve(runTime.deltaT().value());
|
||||
scalar Qdot = chemistry.Qdot()()[0]/rho[0];
|
||||
integratedHeat += Qdot*runTime.deltaT().value();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||
{
|
||||
radiation->correct();
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
Qdot = combustion->Qdot();
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
forAll(Y, i)
|
||||
|
|
@ -66,7 +66,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
==
|
||||
combustion->Sh()
|
||||
Qdot
|
||||
+ radiation->Sh(thermo)
|
||||
+ parcels.Sh(he)
|
||||
+ surfaceFilm.Sh()
|
||||
|
|
|
|||
|
|
@ -131,18 +131,18 @@ Switch solvePyrolysisRegion
|
|||
additionalControlsDict.lookupOrDefault<bool>("solvePyrolysisRegion", true)
|
||||
);
|
||||
|
||||
volScalarField dQ
|
||||
volScalarField Qdot
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
"Qdot",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
==
|
||||
reaction->Sh()
|
||||
Qdot
|
||||
+ fvOptions(rho, he)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||
|
||||
{
|
||||
reaction->correct();
|
||||
dQ = reaction->dQ();
|
||||
Qdot = reaction->Qdot();
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
forAll(Y, i)
|
||||
|
|
|
|||
|
|
@ -117,18 +117,18 @@ forAll(Y, i)
|
|||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
volScalarField dQ
|
||||
volScalarField Qdot
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
"Qdot",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
|
|
|||
|
|
@ -117,18 +117,18 @@ forAll(Y, i)
|
|||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
volScalarField dQ
|
||||
volScalarField Qdot
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
"Qdot",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
|
|
|||
|
|
@ -96,18 +96,18 @@ forAll(Y, i)
|
|||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
volScalarField dQ
|
||||
volScalarField Qdot
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
"Qdot",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ License
|
|||
{
|
||||
volScalarField::Internal rDeltaTT
|
||||
(
|
||||
mag(reaction->Sh())/(alphaTemp*rho*thermo.Cp()*T)
|
||||
mag(Qdot)/(alphaTemp*rho*thermo.Cp()*T)
|
||||
);
|
||||
|
||||
Info<< " Temperature = "
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
==
|
||||
rho*(U&g)
|
||||
+ combustion->Sh()
|
||||
+ Qdot
|
||||
+ coalParcels.Sh(he)
|
||||
+ limestoneParcels.Sh(he)
|
||||
+ radiation->Sh(thermo)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||
|
||||
{
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
Qdot = combustion->Qdot();
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
forAll(Y, i)
|
||||
|
|
|
|||
|
|
@ -131,18 +131,18 @@ volScalarField dpdt
|
|||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
||||
volScalarField dQ
|
||||
volScalarField Qdot
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
"Qdot",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ License
|
|||
(
|
||||
(coalParcels.hsTrans() + limestoneParcels.hsTrans())
|
||||
/(mesh.V()*runTime.deltaT())
|
||||
+ combustion->Sh()()
|
||||
+ Qdot
|
||||
)
|
||||
/(
|
||||
alphaTemp
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
+ parcels.Sh(he)
|
||||
+ surfaceFilm.Sh()
|
||||
+ radiation->Sh(thermo)
|
||||
+ combustion->Sh()
|
||||
+ Qdot
|
||||
+ fvOptions(rho, he)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||
|
||||
{
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
Qdot = combustion->Qdot();
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
forAll(Y, i)
|
||||
|
|
|
|||
|
|
@ -134,18 +134,18 @@ Switch solvePrimaryRegion
|
|||
additionalControlsDict.lookup("solvePrimaryRegion")
|
||||
);
|
||||
|
||||
volScalarField dQ
|
||||
volScalarField Qdot
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
"Qdot",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
rho*(U&g)
|
||||
+ parcels.Sh(he)
|
||||
+ radiation->Sh(thermo)
|
||||
+ combustion->Sh()
|
||||
+ Qdot
|
||||
+ fvOptions(rho, he)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||
|
||||
{
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
Qdot = combustion->Qdot();
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
forAll(Y, i)
|
||||
|
|
|
|||
|
|
@ -121,18 +121,18 @@ forAll(Y, i)
|
|||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
volScalarField dQ
|
||||
volScalarField Qdot
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
"Qdot",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ License
|
|||
mag
|
||||
(
|
||||
parcels.hsTrans()/(mesh.V()*runTime.deltaT())
|
||||
+ combustion->Sh()()
|
||||
+ Qdot
|
||||
)
|
||||
/(
|
||||
alphaTemp
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
rho*(U&g)
|
||||
+ parcels.Sh(he)
|
||||
+ radiation->Sh(thermo)
|
||||
+ combustion->Sh()
|
||||
+ Qdot
|
||||
+ fvOptions(rho, he)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||
|
||||
{
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
Qdot = combustion->Qdot();
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
forAll(Y, i)
|
||||
|
|
|
|||
|
|
@ -103,18 +103,18 @@ forAll(Y, i)
|
|||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
volScalarField dQ
|
||||
volScalarField Qdot
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
"Qdot",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
|
|
|||
|
|
@ -117,18 +117,18 @@ forAll(Y, i)
|
|||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
volScalarField dQ
|
||||
volScalarField Qdot
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
"Qdot",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (runTime.write())
|
||||
{
|
||||
combustion->dQ()().write();
|
||||
combustion->Qdot()().write();
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (runTime.write())
|
||||
{
|
||||
combustion->dQ()().write();
|
||||
combustion->Qdot()().write();
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (runTime.write())
|
||||
{
|
||||
combustion->dQ()().write();
|
||||
combustion->Qdot()().write();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::heEqn()
|
|||
he
|
||||
)
|
||||
==
|
||||
this->Sh()
|
||||
this->Qdot()
|
||||
);
|
||||
|
||||
// Add the appropriate pressure-work term
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ Foam::InertPhaseModel<BasePhaseModel>::R
|
|||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::InertPhaseModel<BasePhaseModel>::Sh() const
|
||||
Foam::InertPhaseModel<BasePhaseModel>::Qdot() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
|
|
@ -73,7 +73,7 @@ Foam::InertPhaseModel<BasePhaseModel>::Sh() const
|
|||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("Sh", this->name()),
|
||||
IOobject::groupName("Qdot", this->name()),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh()
|
||||
),
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ public:
|
|||
volScalarField& Yi
|
||||
) const;
|
||||
|
||||
//- Return the reaction heat source
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
//- Return the heat release rate
|
||||
virtual tmp<volScalarField> Qdot() const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -105,9 +105,9 @@ Foam::ReactingPhaseModel<BasePhaseModel, ReactionType>::R
|
|||
|
||||
template<class BasePhaseModel, class ReactionType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::ReactingPhaseModel<BasePhaseModel, ReactionType>::Sh() const
|
||||
Foam::ReactingPhaseModel<BasePhaseModel, ReactionType>::Qdot() const
|
||||
{
|
||||
return reaction_->Sh();
|
||||
return reaction_->Qdot();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ public:
|
|||
volScalarField& Yi
|
||||
) const;
|
||||
|
||||
//- Return the reacton heat source
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
//- Return heat release rate
|
||||
virtual tmp<volScalarField> Qdot() const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -116,29 +116,14 @@ Foam::combustionModels::PaSR<Type>::R(volScalarField& Y) const
|
|||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::PaSR<Type>::dQ() const
|
||||
Foam::combustionModels::PaSR<Type>::Qdot() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject::groupName("PaSR:dQ", this->phaseName_),
|
||||
kappa_*laminar<Type>::dQ()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::PaSR<Type>::Sh() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject::groupName("PaSR:Sh", this->phaseName_),
|
||||
kappa_*laminar<Type>::Sh()
|
||||
kappa_*laminar<Type>::Qdot()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,11 +107,8 @@ public:
|
|||
//- Fuel consumption rate matrix.
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
//- Heat release rate [kg/m/s3]
|
||||
virtual tmp<volScalarField> Qdot() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ Foam::combustionModel::~combustionModel()
|
|||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
bool Foam::combustionModel::read()
|
||||
{
|
||||
if (regIOobject::read())
|
||||
|
|
@ -97,25 +96,4 @@ bool Foam::combustionModel::read()
|
|||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::combustionModel::Sh() const
|
||||
{
|
||||
return tmp<Foam::volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("Sh", phaseName_),
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
|||
|
|
@ -137,11 +137,8 @@ public:
|
|||
//- Fuel consumption rate matrix, i.e. source term for fuel equation
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const = 0;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const = 0;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
//- Heat release rate [kg/m/s3]
|
||||
virtual tmp<volScalarField> Qdot() const = 0;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
|
|
|
|||
|
|
@ -136,15 +136,15 @@ Foam::combustionModels::laminar<Type>::R(volScalarField& Y) const
|
|||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::laminar<Type>::dQ() const
|
||||
Foam::combustionModels::laminar<Type>::Qdot() const
|
||||
{
|
||||
tmp<volScalarField> tdQ
|
||||
tmp<volScalarField> tQdot
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(typeName + ":dQ", this->phaseName_),
|
||||
IOobject::groupName(typeName + ":Qdot", this->phaseName_),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
|
|
@ -152,47 +152,16 @@ Foam::combustionModels::laminar<Type>::dQ() const
|
|||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
tdQ.ref() = this->chemistryPtr_->dQ();
|
||||
tQdot.ref() = this->chemistryPtr_->Qdot();
|
||||
}
|
||||
|
||||
return tdQ;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::laminar<Type>::Sh() const
|
||||
{
|
||||
tmp<volScalarField> tSh
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(typeName + ":Sh", this->phaseName_),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
tSh.ref() = this->chemistryPtr_->Sh();
|
||||
}
|
||||
|
||||
return tSh;
|
||||
return tQdot;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -105,11 +105,8 @@ public:
|
|||
//- Fuel consumption rate matrix.
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
//- Heat release rate [kg/m/s3]
|
||||
virtual tmp<volScalarField> Qdot() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
|
|
|
|||
|
|
@ -75,15 +75,15 @@ Foam::combustionModels::noCombustion<CombThermoType>::R
|
|||
|
||||
template<class CombThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::noCombustion<CombThermoType>::dQ() const
|
||||
Foam::combustionModels::noCombustion<CombThermoType>::Qdot() const
|
||||
{
|
||||
tmp<volScalarField> tdQ
|
||||
tmp<volScalarField> tQdot
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("dQ", this->phaseName_),
|
||||
IOobject::groupName("Qdot", this->phaseName_),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
|
|
@ -91,37 +91,11 @@ Foam::combustionModels::noCombustion<CombThermoType>::dQ() const
|
|||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
return tdQ;
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::noCombustion<CombThermoType>::Sh() const
|
||||
{
|
||||
tmp<volScalarField> tSh
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("Sh", this->phaseName_),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
return tSh;
|
||||
return tQdot;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -89,11 +89,8 @@ public:
|
|||
//- Fuel consumption rate matrix
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
//- Heat release rate [kg/m/s3]
|
||||
virtual tmp<volScalarField> Qdot() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ tmp<fvScalarMatrix> singleStepCombustion<CombThermoType, ThermoType>::R
|
|||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
tmp<volScalarField>
|
||||
singleStepCombustion<CombThermoType, ThermoType>::Sh() const
|
||||
singleStepCombustion<CombThermoType, ThermoType>::Qdot() const
|
||||
{
|
||||
const label fuelI = singleMixturePtr_->fuelIndex();
|
||||
volScalarField& YFuel =
|
||||
|
|
@ -137,37 +137,6 @@ singleStepCombustion<CombThermoType, ThermoType>::Sh() const
|
|||
}
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
tmp<volScalarField>
|
||||
singleStepCombustion<CombThermoType, ThermoType>::dQ() const
|
||||
{
|
||||
tmp<volScalarField> tdQ
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("dQ", this->phaseName_),
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh_,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
volScalarField& dQ = tdQ.ref();
|
||||
dQ.ref() = this->mesh().V()*Sh()();
|
||||
}
|
||||
return tdQ;
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
bool singleStepCombustion<CombThermoType, ThermoType>::read()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -99,11 +99,8 @@ public:
|
|||
//- Fuel consumption rate matrix
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
|
||||
//- Sensible enthalpy source term
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
//- Heat release rate [kg/m/s3]
|
||||
virtual tmp<volScalarField> Qdot() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
|
|
|
|||
|
|
@ -165,17 +165,9 @@ Foam::combustionModels::zoneCombustion<Type>::R(volScalarField& Y) const
|
|||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::zoneCombustion<Type>::dQ() const
|
||||
Foam::combustionModels::zoneCombustion<Type>::Qdot() const
|
||||
{
|
||||
return filter(combustionModelPtr_->dQ());
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::zoneCombustion<Type>::Sh() const
|
||||
{
|
||||
return filter(combustionModelPtr_->Sh());
|
||||
return filter(combustionModelPtr_->Qdot());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -114,11 +114,8 @@ public:
|
|||
//- Fuel consumption rate matrix.
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
//- Heat release rate [kg/m/s3]
|
||||
virtual tmp<volScalarField> Qdot() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ void reactingOneDim::solveEnergy()
|
|||
+ fvc::laplacian(alpha, h_)
|
||||
- fvc::laplacian(kappa(), T())
|
||||
==
|
||||
chemistrySh_
|
||||
chemistryQdot_
|
||||
- fvm::Sp(solidChemistry_->RRg(), h_)
|
||||
);
|
||||
|
||||
|
|
@ -371,7 +371,7 @@ void reactingOneDim::calculateMassTransfer()
|
|||
|
||||
if (infoOutput_)
|
||||
{
|
||||
totalHeatRR_ = fvc::domainIntegrate(chemistrySh_);
|
||||
totalHeatRR_ = fvc::domainIntegrate(chemistryQdot_);
|
||||
|
||||
addedGasMass_ +=
|
||||
fvc::domainIntegrate(solidChemistry_->RRg())*time_.deltaT();
|
||||
|
|
@ -440,11 +440,11 @@ reactingOneDim::reactingOneDim
|
|||
dimensionedScalar("zero", dimEnergy/dimTime, 0.0)
|
||||
),
|
||||
|
||||
chemistrySh_
|
||||
chemistryQdot_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistrySh",
|
||||
"chemistryQdot",
|
||||
time().timeName(),
|
||||
regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
|
|
@ -540,11 +540,11 @@ reactingOneDim::reactingOneDim
|
|||
dimensionedScalar("zero", dimEnergy/dimTime, 0.0)
|
||||
),
|
||||
|
||||
chemistrySh_
|
||||
chemistryQdot_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistrySh",
|
||||
"chemistryQdot",
|
||||
time().timeName(),
|
||||
regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
|
|
@ -705,7 +705,7 @@ void reactingOneDim::evolveRegion()
|
|||
|
||||
solveContinuity();
|
||||
|
||||
chemistrySh_ = solidChemistry_->Sh()();
|
||||
chemistryQdot_ = solidChemistry_->Qdot()();
|
||||
|
||||
updateFields();
|
||||
|
||||
|
|
|
|||
|
|
@ -117,8 +117,8 @@ protected:
|
|||
//- Sensible enthalpy gas flux [J/m2/s]
|
||||
volScalarField phiHsGas_;
|
||||
|
||||
//- Heat release [J/s/m3]
|
||||
volScalarField chemistrySh_;
|
||||
//- Heat release rate [J/s/m3]
|
||||
volScalarField chemistryQdot_;
|
||||
|
||||
|
||||
// Source term fields
|
||||
|
|
|
|||
|
|
@ -174,11 +174,8 @@ public:
|
|||
//- Return the chemical time scale
|
||||
virtual tmp<volScalarField> tc() const = 0;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const = 0;
|
||||
|
||||
//- Return the heat release, i.e. enthalpy/sec [m2/s3]
|
||||
virtual tmp<volScalarField> dQ() const = 0;
|
||||
//- Return the heat release rate [kg/m/s3]
|
||||
virtual tmp<volScalarField> Qdot() const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -545,15 +545,15 @@ Foam::chemistryModel<CompType, ThermoType>::tc() const
|
|||
|
||||
template<class CompType, class ThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::chemistryModel<CompType, ThermoType>::Sh() const
|
||||
Foam::chemistryModel<CompType, ThermoType>::Qdot() const
|
||||
{
|
||||
tmp<volScalarField> tSh
|
||||
tmp<volScalarField> tQdot
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Sh",
|
||||
"Qdot",
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
|
|
@ -561,57 +561,25 @@ Foam::chemistryModel<CompType, ThermoType>::Sh() const
|
|||
false
|
||||
),
|
||||
this->mesh_,
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->chemistry_)
|
||||
{
|
||||
scalarField& Sh = tSh.ref();
|
||||
scalarField& Qdot = tQdot.ref();
|
||||
|
||||
forAll(Y_, i)
|
||||
{
|
||||
forAll(Sh, celli)
|
||||
forAll(Qdot, celli)
|
||||
{
|
||||
const scalar hi = specieThermo_[i].Hc();
|
||||
Sh[celli] -= hi*RR_[i][celli];
|
||||
Qdot[celli] -= hi*RR_[i][celli];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tSh;
|
||||
}
|
||||
|
||||
|
||||
template<class CompType, class ThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::chemistryModel<CompType, ThermoType>::dQ() const
|
||||
{
|
||||
tmp<volScalarField> tdQ
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh_,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->chemistry_)
|
||||
{
|
||||
volScalarField& dQ = tdQ.ref();
|
||||
dQ.ref() = this->mesh_.V()*Sh()();
|
||||
}
|
||||
|
||||
return tdQ;
|
||||
return tQdot;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -231,11 +231,8 @@ public:
|
|||
//- Return the chemical time scale
|
||||
virtual tmp<volScalarField> tc() const;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
|
||||
//- Return the heat release, i.e. enthalpy/sec [kg/m2/s3]
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
//- Return the heat release rate [kg/m/s3]
|
||||
virtual tmp<volScalarField> Qdot() const;
|
||||
|
||||
|
||||
// ODE functions (overriding abstract functions in ODE.H)
|
||||
|
|
|
|||
|
|
@ -293,32 +293,32 @@ Foam::radiation::greyMeanAbsorptionEmission::ECont(const label bandI) const
|
|||
)
|
||||
);
|
||||
|
||||
if (mesh_.foundObject<volScalarField>("dQ"))
|
||||
if (mesh_.foundObject<volScalarField>("Qdot"))
|
||||
{
|
||||
const volScalarField& dQ =
|
||||
mesh_.lookupObject<volScalarField>("dQ");
|
||||
const volScalarField& Qdot =
|
||||
mesh_.lookupObject<volScalarField>("Qdot");
|
||||
|
||||
if (dQ.dimensions() == dimEnergy/dimTime)
|
||||
if (Qdot.dimensions() == dimEnergy/dimTime)
|
||||
{
|
||||
E.ref().primitiveFieldRef() = EhrrCoeff_*dQ/mesh_.V();
|
||||
E.ref().primitiveFieldRef() = EhrrCoeff_*Qdot/mesh_.V();
|
||||
}
|
||||
else if (dQ.dimensions() == dimEnergy/dimTime/dimVolume)
|
||||
else if (Qdot.dimensions() == dimEnergy/dimTime/dimVolume)
|
||||
{
|
||||
E.ref().primitiveFieldRef() = EhrrCoeff_*dQ;
|
||||
E.ref().primitiveFieldRef() = EhrrCoeff_*Qdot;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Incompatible dimensions for dQ field" << endl;
|
||||
<< "Incompatible dimensions for Qdot field" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningInFunction
|
||||
<< "dQ field not found in mesh" << endl;
|
||||
<< "Qdot field not found in mesh" << endl;
|
||||
}
|
||||
|
||||
return E;
|
||||
|
|
|
|||
|
|
@ -249,31 +249,32 @@ Foam::radiation::wideBandAbsorptionEmission::ECont(const label bandI) const
|
|||
)
|
||||
);
|
||||
|
||||
if (mesh().foundObject<volScalarField>("dQ"))
|
||||
if (mesh().foundObject<volScalarField>("Qdot"))
|
||||
{
|
||||
const volScalarField& dQ = mesh().lookupObject<volScalarField>("dQ");
|
||||
const volScalarField& Qdot =
|
||||
mesh().lookupObject<volScalarField>("Qdot");
|
||||
|
||||
if (dQ.dimensions() == dimEnergy/dimTime)
|
||||
if (Qdot.dimensions() == dimEnergy/dimTime)
|
||||
{
|
||||
E.ref().primitiveFieldRef() =
|
||||
iEhrrCoeffs_[bandI]
|
||||
*dQ.primitiveField()
|
||||
*Qdot.primitiveField()
|
||||
*(iBands_[bandI][1] - iBands_[bandI][0])
|
||||
/totalWaveLength_
|
||||
/mesh_.V();
|
||||
}
|
||||
else if (dQ.dimensions() == dimEnergy/dimTime/dimVolume)
|
||||
else if (Qdot.dimensions() == dimEnergy/dimTime/dimVolume)
|
||||
{
|
||||
E.ref().primitiveFieldRef() =
|
||||
iEhrrCoeffs_[bandI]
|
||||
*dQ.primitiveField()
|
||||
*Qdot.primitiveField()
|
||||
*(iBands_[bandI][1] - iBands_[bandI][0])
|
||||
/totalWaveLength_;
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Incompatible dimensions for dQ field" << endl;
|
||||
<< "Incompatible dimensions for Qdot field" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,15 +114,15 @@ Foam::solidChemistryModel<CompType, SolidThermo>::tc() const
|
|||
|
||||
template<class CompType, class SolidThermo>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::solidChemistryModel<CompType, SolidThermo>::Sh() const
|
||||
Foam::solidChemistryModel<CompType, SolidThermo>::Qdot() const
|
||||
{
|
||||
tmp<volScalarField> tSh
|
||||
tmp<volScalarField> tQdot
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Sh",
|
||||
"Qdot",
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
|
|
@ -130,57 +130,25 @@ Foam::solidChemistryModel<CompType, SolidThermo>::Sh() const
|
|||
false
|
||||
),
|
||||
this->mesh_,
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->chemistry_)
|
||||
{
|
||||
scalarField& Sh = tSh.ref();
|
||||
scalarField& Qdot = tQdot.ref();
|
||||
|
||||
forAll(Ys_, i)
|
||||
{
|
||||
forAll(Sh, celli)
|
||||
forAll(Qdot, celli)
|
||||
{
|
||||
scalar hf = solidThermo_[i].Hc();
|
||||
Sh[celli] -= hf*RRs_[i][celli];
|
||||
Qdot[celli] -= hf*RRs_[i][celli];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tSh;
|
||||
}
|
||||
|
||||
|
||||
template<class CompType, class SolidThermo>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::solidChemistryModel<CompType, SolidThermo>::dQ() const
|
||||
{
|
||||
tmp<volScalarField> tdQ
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh_,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->chemistry_)
|
||||
{
|
||||
volScalarField& dQ = tdQ.ref();
|
||||
dQ.ref() = this->mesh_.V()*Sh()();
|
||||
}
|
||||
|
||||
return tdQ;
|
||||
return tQdot;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -197,11 +197,8 @@ public:
|
|||
//- Return the chemical time scale
|
||||
virtual tmp<volScalarField> tc() const;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
|
||||
//- Return the heat release, i.e. enthalpy/sec [m2/s3]
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
//- Return the heat release rate [kg/m/s3]
|
||||
virtual tmp<volScalarField> Qdot() const;
|
||||
|
||||
|
||||
// ODE functions (overriding abstract functions in ODE.H)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue