mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
INT: Additional integration updates/clean-up
This commit is contained in:
@ -10,8 +10,8 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||||||
);
|
);
|
||||||
|
|
||||||
{
|
{
|
||||||
combustion->correct();
|
reaction->correct();
|
||||||
Qdot = combustion->Qdot();
|
Qdot = reaction->Qdot();
|
||||||
volScalarField Yt(0.0*Y[0]);
|
volScalarField Yt(0.0*Y[0]);
|
||||||
|
|
||||||
forAll(Y, i)
|
forAll(Y, i)
|
||||||
@ -26,7 +26,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||||||
- fvm::laplacian(turbulence->muEff(), Yi)
|
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||||
==
|
==
|
||||||
parcels.SYi(i, Yi)
|
parcels.SYi(i, Yi)
|
||||||
+ combustion->R(Yi)
|
+ reaction->R(Yi)
|
||||||
+ fvOptions(rho, Yi)
|
+ fvOptions(rho, Yi)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,9 @@
|
|||||||
#include "readGravitationalAcceleration.H"
|
#include "readGravitationalAcceleration.H"
|
||||||
|
|
||||||
Info<< "Creating combustion model\n" << endl;
|
|
||||||
|
|
||||||
autoPtr<combustionModels::rhoCombustionModel> combustion
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
(
|
autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
|
||||||
combustionModels::rhoCombustionModel::New(mesh)
|
rhoReactionThermo& thermo = pThermo();
|
||||||
);
|
|
||||||
|
|
||||||
rhoReactionThermo& thermo = combustion->thermo();
|
|
||||||
thermo.validate(args.executable(), "h", "e");
|
thermo.validate(args.executable(), "h", "e");
|
||||||
|
|
||||||
SLGThermo slgThermo(mesh, thermo);
|
SLGThermo slgThermo(mesh, thermo);
|
||||||
@ -91,8 +87,11 @@ autoPtr<compressible::turbulenceModel> turbulence
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Set the turbulence into the combustion model
|
Info<< "Creating reaction model\n" << endl;
|
||||||
combustion->setTurbulence(turbulence());
|
autoPtr<CombustionModel<rhoReactionThermo>> reaction
|
||||||
|
(
|
||||||
|
CombustionModel<rhoReactionThermo>::New(thermo, turbulence())
|
||||||
|
);
|
||||||
|
|
||||||
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|||||||
@ -36,7 +36,8 @@ Description
|
|||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "coalCloud.H"
|
#include "coalCloud.H"
|
||||||
#include "rhoCombustionModel.H"
|
#include "rhoReactionThermo.H"
|
||||||
|
#include "CombustionModel.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
#include "IOporosityModelList.H"
|
#include "IOporosityModelList.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
|
|||||||
@ -0,0 +1,11 @@
|
|||||||
|
Info<< "Total cylinder mass: " << fvc::domainIntegrate(rho).value() << endl;
|
||||||
|
//Info<< "Total fuel mass: "
|
||||||
|
// << fvc::domainIntegrate(rho*compostion.ft()).value() << endl;
|
||||||
|
|
||||||
|
OFstream logSummaryFile
|
||||||
|
(
|
||||||
|
runTime.path()/("logSummary." + runTime.timeName() + ".dat")
|
||||||
|
);
|
||||||
|
|
||||||
|
logSummaryFile
|
||||||
|
<< "# CA" << " p" << " T" << " u'" << endl;
|
||||||
@ -147,6 +147,13 @@ void Foam::twoPhaseMixtureEThermo::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::word Foam::twoPhaseMixtureEThermo::thermoName() const
|
||||||
|
{
|
||||||
|
NotImplemented;
|
||||||
|
return word::null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::he
|
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::he
|
||||||
(
|
(
|
||||||
const volScalarField& p,
|
const volScalarField& p,
|
||||||
|
|||||||
@ -278,6 +278,9 @@ public:
|
|||||||
//- Correct the thermo fields
|
//- Correct the thermo fields
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
|
|
||||||
|
//- Return the name of the thermo physics
|
||||||
|
virtual word thermoName() const;
|
||||||
|
|
||||||
//- Read properties
|
//- Read properties
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|
||||||
|
|||||||
@ -35,15 +35,12 @@ Foam::autoPtr<CombustionModel> Foam::combustionModel::New
|
|||||||
{
|
{
|
||||||
IOobject combIO
|
IOobject combIO
|
||||||
(
|
(
|
||||||
IOobject
|
thermo.phasePropertyName(combustionProperties),
|
||||||
(
|
thermo.db().time().constant(),
|
||||||
thermo.phasePropertyName(combustionProperties),
|
thermo.db(),
|
||||||
thermo.db().time().constant(),
|
IOobject::MUST_READ,
|
||||||
thermo.db(),
|
IOobject::NO_WRITE,
|
||||||
IOobject::MUST_READ,
|
false
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
word combModelName("none");
|
word combModelName("none");
|
||||||
@ -83,13 +80,11 @@ Foam::autoPtr<CombustionModel> Foam::combustionModel::New
|
|||||||
combModelName + '<' + CombustionModel::reactionThermo::typeName + ','
|
combModelName + '<' + CombustionModel::reactionThermo::typeName + ','
|
||||||
+ thermo.thermoName() + '>';
|
+ thermo.thermoName() + '>';
|
||||||
|
|
||||||
typename cstrTableType::iterator compCstrIter =
|
auto compCstrIter = cstrTable->cfind(compCombModelName);
|
||||||
cstrTable->find(compCombModelName);
|
|
||||||
|
|
||||||
typename cstrTableType::iterator thermoCstrIter =
|
auto thermoCstrIter = cstrTable->cfind(thermoCombModelName);
|
||||||
cstrTable->find(thermoCombModelName);
|
|
||||||
|
|
||||||
if (compCstrIter == cstrTable->end() && thermoCstrIter == cstrTable->end())
|
if (!compCstrIter.found() && !thermoCstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown " << combustionModel::typeName << " type "
|
<< "Unknown " << combustionModel::typeName << " type "
|
||||||
@ -170,7 +165,7 @@ Foam::autoPtr<CombustionModel> Foam::combustionModel::New
|
|||||||
|
|
||||||
return autoPtr<CombustionModel>
|
return autoPtr<CombustionModel>
|
||||||
(
|
(
|
||||||
thermoCstrIter != cstrTable->end()
|
thermoCstrIter.found()
|
||||||
? thermoCstrIter()(combModelName, thermo, turb, combustionProperties)
|
? thermoCstrIter()(combModelName, thermo, turb, combustionProperties)
|
||||||
: compCstrIter()(combModelName, thermo, turb, combustionProperties)
|
: compCstrIter()(combModelName, thermo, turb, combustionProperties)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -31,9 +31,9 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
void Foam::combustionModels::
|
void Foam::combustionModels::
|
||||||
diffusionMulticomponent<CombThermoType, ThermoType>::init()
|
diffusionMulticomponent<ReactionThermo, ThermoType>::init()
|
||||||
{
|
{
|
||||||
// Load default values
|
// Load default values
|
||||||
this->coeffs().readIfPresent("Ci", Ci_);
|
this->coeffs().readIfPresent("Ci", Ci_);
|
||||||
@ -121,25 +121,31 @@ diffusionMulticomponent<CombThermoType, ThermoType>::init()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
Foam::combustionModels::diffusionMulticomponent<CombThermoType, ThermoType>::
|
Foam::combustionModels::diffusionMulticomponent<ReactionThermo, ThermoType>::
|
||||||
diffusionMulticomponent
|
diffusionMulticomponent
|
||||||
(
|
(
|
||||||
const word& modelType,
|
const word& modelType,
|
||||||
const fvMesh& mesh,
|
ReactionThermo& thermo,
|
||||||
const word& combustionProperties,
|
const compressibleTurbulenceModel& turb,
|
||||||
const word& phaseName
|
const word& combustionProperties
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
CombThermoType(modelType, mesh, combustionProperties, phaseName),
|
ChemistryCombustion<ReactionThermo>
|
||||||
|
(
|
||||||
|
modelType,
|
||||||
|
thermo,
|
||||||
|
turb,
|
||||||
|
combustionProperties
|
||||||
|
),
|
||||||
reactions_
|
reactions_
|
||||||
(
|
(
|
||||||
dynamic_cast<const reactingMixture<ThermoType>&>(this->thermo())
|
dynamic_cast<const reactingMixture<ThermoType>&>(thermo)
|
||||||
),
|
),
|
||||||
specieThermo_
|
specieThermo_
|
||||||
(
|
(
|
||||||
dynamic_cast<const reactingMixture<ThermoType>&>
|
dynamic_cast<const reactingMixture<ThermoType>&>(thermo).
|
||||||
(this->thermo()).speciesData()
|
speciesData()
|
||||||
),
|
),
|
||||||
RijPtr_(reactions_.size()),
|
RijPtr_(reactions_.size()),
|
||||||
Ci_(reactions_.size(), 1.0),
|
Ci_(reactions_.size(), 1.0),
|
||||||
@ -162,17 +168,17 @@ diffusionMulticomponent
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
Foam::tmp<Foam::volScalarField> Foam::combustionModels::
|
Foam::tmp<Foam::volScalarField> Foam::combustionModels::
|
||||||
diffusionMulticomponent<CombThermoType, ThermoType>::tc() const
|
diffusionMulticomponent<ReactionThermo, ThermoType>::tc() const
|
||||||
{
|
{
|
||||||
return this->chemistryPtr_->tc();
|
return this->chemistryPtr_->tc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
void Foam::combustionModels::
|
void Foam::combustionModels::
|
||||||
diffusionMulticomponent<CombThermoType, ThermoType>::correct()
|
diffusionMulticomponent<ReactionThermo, ThermoType>::correct()
|
||||||
{
|
{
|
||||||
if (this->active())
|
if (this->active())
|
||||||
{
|
{
|
||||||
@ -359,9 +365,9 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
Foam::tmp<Foam::fvScalarMatrix>
|
Foam::tmp<Foam::fvScalarMatrix>
|
||||||
Foam::combustionModels::diffusionMulticomponent<CombThermoType, ThermoType>::R
|
Foam::combustionModels::diffusionMulticomponent<ReactionThermo, ThermoType>::R
|
||||||
(
|
(
|
||||||
volScalarField& Y
|
volScalarField& Y
|
||||||
) const
|
) const
|
||||||
@ -382,10 +388,10 @@ Foam::combustionModels::diffusionMulticomponent<CombThermoType, ThermoType>::R
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::volScalarField>
|
||||||
Foam::combustionModels::diffusionMulticomponent<CombThermoType, ThermoType>::
|
Foam::combustionModels::
|
||||||
Qdot() const
|
diffusionMulticomponent<ReactionThermo, ThermoType>::Qdot() const
|
||||||
{
|
{
|
||||||
tmp<volScalarField> tQdot
|
tmp<volScalarField> tQdot
|
||||||
(
|
(
|
||||||
@ -416,11 +422,11 @@ Qdot() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
bool Foam::combustionModels::
|
bool Foam::combustionModels::
|
||||||
diffusionMulticomponent<CombThermoType, ThermoType>::read()
|
diffusionMulticomponent<ReactionThermo, ThermoType>::read()
|
||||||
{
|
{
|
||||||
if (CombThermoType::read())
|
if (ChemistryCombustion<ReactionThermo>::read())
|
||||||
{
|
{
|
||||||
this->coeffs().readIfPresent("Ci", Ci_);
|
this->coeffs().readIfPresent("Ci", Ci_);
|
||||||
this->coeffs().readIfPresent("sigma", sigma_);
|
this->coeffs().readIfPresent("sigma", sigma_);
|
||||||
|
|||||||
@ -72,6 +72,7 @@ SourceFiles
|
|||||||
#ifndef diffusionMulticomponent_H
|
#ifndef diffusionMulticomponent_H
|
||||||
#define diffusionMulticomponent_H
|
#define diffusionMulticomponent_H
|
||||||
|
|
||||||
|
#include "ChemistryCombustion.H"
|
||||||
#include "scalarList.H"
|
#include "scalarList.H"
|
||||||
#include "tmp.H"
|
#include "tmp.H"
|
||||||
#include "Reaction.H"
|
#include "Reaction.H"
|
||||||
@ -87,10 +88,10 @@ namespace combustionModels
|
|||||||
Class diffusionMulticomponent Declaration
|
Class diffusionMulticomponent Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
class diffusionMulticomponent
|
class diffusionMulticomponent
|
||||||
:
|
:
|
||||||
public CombThermoType
|
public ChemistryCombustion<ReactionThermo>
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -170,9 +171,9 @@ public:
|
|||||||
diffusionMulticomponent
|
diffusionMulticomponent
|
||||||
(
|
(
|
||||||
const word& modelType,
|
const word& modelType,
|
||||||
const fvMesh& mesh,
|
ReactionThermo& thermo,
|
||||||
const word& combustionProperties,
|
const compressibleTurbulenceModel& turb,
|
||||||
const word& phaseName
|
const word& combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -25,37 +25,45 @@ License
|
|||||||
|
|
||||||
#include "makeCombustionTypes.H"
|
#include "makeCombustionTypes.H"
|
||||||
|
|
||||||
|
#include "psiReactionThermo.H"
|
||||||
|
#include "rhoReactionThermo.H"
|
||||||
#include "thermoPhysicsTypes.H"
|
#include "thermoPhysicsTypes.H"
|
||||||
#include "psiChemistryCombustion.H"
|
|
||||||
#include "rhoChemistryCombustion.H"
|
|
||||||
#include "diffusionMulticomponent.H"
|
#include "diffusionMulticomponent.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Combustion models based on sensibleEnthalpy
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
makeCombustionTypesThermo
|
makeCombustionTypesThermo
|
||||||
(
|
(
|
||||||
diffusionMulticomponent,
|
diffusionMulticomponent,
|
||||||
psiChemistryCombustion,
|
psiReactionThermo,
|
||||||
gasHThermoPhysics,
|
gasHThermoPhysics
|
||||||
psiCombustionModel
|
|
||||||
);
|
);
|
||||||
|
|
||||||
makeCombustionTypesThermo
|
makeCombustionTypesThermo
|
||||||
(
|
(
|
||||||
diffusionMulticomponent,
|
diffusionMulticomponent,
|
||||||
rhoChemistryCombustion,
|
psiReactionThermo,
|
||||||
gasHThermoPhysics,
|
constGasHThermoPhysics
|
||||||
rhoCombustionModel
|
|
||||||
);
|
);
|
||||||
|
|
||||||
makeCombustionTypesThermo
|
makeCombustionTypesThermo
|
||||||
(
|
(
|
||||||
diffusionMulticomponent,
|
diffusionMulticomponent,
|
||||||
rhoChemistryCombustion,
|
rhoReactionThermo,
|
||||||
incompressibleGasHThermoPhysics,
|
gasHThermoPhysics
|
||||||
rhoCombustionModel
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
makeCombustionTypesThermo
|
||||||
|
(
|
||||||
|
diffusionMulticomponent,
|
||||||
|
rhoReactionThermo,
|
||||||
|
constGasHThermoPhysics
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -31,22 +31,22 @@ namespace combustionModels
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
eddyDissipationDiffusionModel<CombThermoType, ThermoType>::
|
eddyDissipationDiffusionModel<ReactionThermo, ThermoType>::
|
||||||
eddyDissipationDiffusionModel
|
eddyDissipationDiffusionModel
|
||||||
(
|
(
|
||||||
const word& modelType,
|
const word& modelType,
|
||||||
const fvMesh& mesh,
|
ReactionThermo& thermo,
|
||||||
const word& combustionProperties,
|
const compressibleTurbulenceModel& turb,
|
||||||
const word& phaseName
|
const word& combustionProperties
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
eddyDissipationModelBase<CombThermoType, ThermoType>
|
eddyDissipationModelBase<ReactionThermo, ThermoType>
|
||||||
(
|
(
|
||||||
modelType,
|
modelType,
|
||||||
mesh,
|
thermo,
|
||||||
combustionProperties,
|
turb,
|
||||||
phaseName
|
combustionProperties
|
||||||
),
|
),
|
||||||
Cd_(readScalar(this->coeffs().lookup("Cd")))
|
Cd_(readScalar(this->coeffs().lookup("Cd")))
|
||||||
{}
|
{}
|
||||||
@ -54,8 +54,8 @@ eddyDissipationDiffusionModel
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
eddyDissipationDiffusionModel<CombThermoType, ThermoType>::
|
eddyDissipationDiffusionModel<ReactionThermo, ThermoType>::
|
||||||
~eddyDissipationDiffusionModel()
|
~eddyDissipationDiffusionModel()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -63,17 +63,17 @@ eddyDissipationDiffusionModel<CombThermoType, ThermoType>::
|
|||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::volScalarField>
|
||||||
eddyDissipationDiffusionModel<CombThermoType, ThermoType>::timeScale()
|
eddyDissipationDiffusionModel<ReactionThermo, ThermoType>::timeScale()
|
||||||
{
|
{
|
||||||
return (max(this->rtTurb(), this->rtDiff()));
|
return (max(this->rtTurb(), this->rtDiff()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::volScalarField>
|
||||||
eddyDissipationDiffusionModel<CombThermoType, ThermoType>::rtDiff() const
|
eddyDissipationDiffusionModel<ReactionThermo, ThermoType>::rtDiff() const
|
||||||
{
|
{
|
||||||
tmp<volScalarField> tdelta
|
tmp<volScalarField> tdelta
|
||||||
(
|
(
|
||||||
@ -102,10 +102,10 @@ eddyDissipationDiffusionModel<CombThermoType, ThermoType>::rtDiff() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
bool eddyDissipationDiffusionModel<CombThermoType, ThermoType>::read()
|
bool eddyDissipationDiffusionModel<ReactionThermo, ThermoType>::read()
|
||||||
{
|
{
|
||||||
if (eddyDissipationModelBase<CombThermoType, ThermoType>::read())
|
if (eddyDissipationModelBase<ReactionThermo, ThermoType>::read())
|
||||||
{
|
{
|
||||||
this->coeffs().lookup("Cd") >> Cd_;
|
this->coeffs().lookup("Cd") >> Cd_;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -55,10 +55,10 @@ namespace combustionModels
|
|||||||
Class eddyDissipationDiffusionModel Declaration
|
Class eddyDissipationDiffusionModel Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
class eddyDissipationDiffusionModel
|
class eddyDissipationDiffusionModel
|
||||||
:
|
:
|
||||||
public eddyDissipationModelBase<CombThermoType, ThermoType>
|
public eddyDissipationModelBase<ReactionThermo, ThermoType>
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -87,9 +87,9 @@ public:
|
|||||||
eddyDissipationDiffusionModel
|
eddyDissipationDiffusionModel
|
||||||
(
|
(
|
||||||
const word& modelType,
|
const word& modelType,
|
||||||
const fvMesh& mesh,
|
ReactionThermo& thermo,
|
||||||
const word& combustionProperties,
|
const compressibleTurbulenceModel& turb,
|
||||||
const word& phaseName
|
const word& combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -26,8 +26,8 @@ License
|
|||||||
#include "makeCombustionTypes.H"
|
#include "makeCombustionTypes.H"
|
||||||
|
|
||||||
#include "thermoPhysicsTypes.H"
|
#include "thermoPhysicsTypes.H"
|
||||||
#include "psiThermoCombustion.H"
|
#include "psiReactionThermo.H"
|
||||||
#include "rhoThermoCombustion.H"
|
#include "rhoReactionThermo.H"
|
||||||
|
|
||||||
#include "eddyDissipationDiffusionModel.H"
|
#include "eddyDissipationDiffusionModel.H"
|
||||||
#include "eddyDissipationModelBase.H"
|
#include "eddyDissipationModelBase.H"
|
||||||
@ -35,37 +35,37 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
makeCombustionTypesThermo
|
makeCombustionTypesThermo
|
||||||
(
|
(
|
||||||
eddyDissipationDiffusionModel,
|
eddyDissipationDiffusionModel,
|
||||||
psiThermoCombustion,
|
psiReactionThermo,
|
||||||
gasHThermoPhysics,
|
gasHThermoPhysics
|
||||||
psiCombustionModel
|
|
||||||
);
|
);
|
||||||
|
|
||||||
makeCombustionTypesThermo
|
makeCombustionTypesThermo
|
||||||
(
|
(
|
||||||
eddyDissipationDiffusionModel,
|
eddyDissipationDiffusionModel,
|
||||||
psiThermoCombustion,
|
psiReactionThermo,
|
||||||
constGasHThermoPhysics,
|
constGasHThermoPhysics
|
||||||
psiCombustionModel
|
|
||||||
);
|
);
|
||||||
|
|
||||||
makeCombustionTypesThermo
|
makeCombustionTypesThermo
|
||||||
(
|
(
|
||||||
eddyDissipationDiffusionModel,
|
eddyDissipationDiffusionModel,
|
||||||
rhoThermoCombustion,
|
rhoReactionThermo,
|
||||||
gasHThermoPhysics,
|
gasHThermoPhysics
|
||||||
rhoCombustionModel
|
|
||||||
);
|
);
|
||||||
|
|
||||||
makeCombustionTypesThermo
|
makeCombustionTypesThermo
|
||||||
(
|
(
|
||||||
eddyDissipationDiffusionModel,
|
eddyDissipationDiffusionModel,
|
||||||
rhoThermoCombustion,
|
rhoReactionThermo,
|
||||||
constGasHThermoPhysics,
|
constGasHThermoPhysics
|
||||||
rhoCombustionModel
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -32,21 +32,21 @@ namespace combustionModels
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
eddyDissipationModelBase<CombThermoType, ThermoType>::eddyDissipationModelBase
|
eddyDissipationModelBase<ReactionThermo, ThermoType>::eddyDissipationModelBase
|
||||||
(
|
(
|
||||||
const word& modelType,
|
const word& modelType,
|
||||||
const fvMesh& mesh,
|
ReactionThermo& thermo,
|
||||||
const word& combustionProperties,
|
const compressibleTurbulenceModel& turb,
|
||||||
const word& phaseName
|
const word& combustionProperties
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
singleStepCombustion<CombThermoType, ThermoType>
|
singleStepCombustion<ReactionThermo, ThermoType>
|
||||||
(
|
(
|
||||||
modelType,
|
modelType,
|
||||||
mesh,
|
thermo,
|
||||||
combustionProperties,
|
turb,
|
||||||
phaseName
|
combustionProperties
|
||||||
),
|
),
|
||||||
CEDC_(readScalar(this->coeffs().lookup("CEDC")))
|
CEDC_(readScalar(this->coeffs().lookup("CEDC")))
|
||||||
{}
|
{}
|
||||||
@ -54,17 +54,17 @@ eddyDissipationModelBase<CombThermoType, ThermoType>::eddyDissipationModelBase
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
eddyDissipationModelBase<CombThermoType, ThermoType>::
|
eddyDissipationModelBase<ReactionThermo, ThermoType>::
|
||||||
~eddyDissipationModelBase()
|
~eddyDissipationModelBase()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::volScalarField>
|
||||||
eddyDissipationModelBase<CombThermoType, ThermoType>::rtTurb() const
|
eddyDissipationModelBase<ReactionThermo, ThermoType>::rtTurb() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
CEDC_*this->turbulence().epsilon()
|
CEDC_*this->turbulence().epsilon()
|
||||||
@ -76,8 +76,8 @@ eddyDissipationModelBase<CombThermoType, ThermoType>::rtTurb() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
void eddyDissipationModelBase<CombThermoType, ThermoType>::correct()
|
void eddyDissipationModelBase<ReactionThermo, ThermoType>::correct()
|
||||||
{
|
{
|
||||||
this->wFuel_ == dimensionedScalar(dimMass/dimVolume/dimTime, Zero);
|
this->wFuel_ == dimensionedScalar(dimMass/dimVolume/dimTime, Zero);
|
||||||
|
|
||||||
@ -87,15 +87,13 @@ void eddyDissipationModelBase<CombThermoType, ThermoType>::correct()
|
|||||||
|
|
||||||
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||||
|
|
||||||
const volScalarField& YFuel =
|
const volScalarField& YFuel = this->thermo_.composition().Y()[fuelI];
|
||||||
this->thermoPtr_->composition().Y()[fuelI];
|
|
||||||
|
|
||||||
const dimensionedScalar s = this->singleMixturePtr_->s();
|
const dimensionedScalar s = this->singleMixturePtr_->s();
|
||||||
|
|
||||||
if (this->thermoPtr_->composition().contains("O2"))
|
if (this->thermo_.composition().contains("O2"))
|
||||||
{
|
{
|
||||||
const volScalarField& YO2 =
|
const volScalarField& YO2 = this->thermo_.composition().Y("O2");
|
||||||
this->thermoPtr_->composition().Y("O2");
|
|
||||||
|
|
||||||
this->wFuel_ ==
|
this->wFuel_ ==
|
||||||
this->rho()
|
this->rho()
|
||||||
@ -113,10 +111,10 @@ void eddyDissipationModelBase<CombThermoType, ThermoType>::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
bool eddyDissipationModelBase<CombThermoType, ThermoType>::read()
|
bool eddyDissipationModelBase<ReactionThermo, ThermoType>::read()
|
||||||
{
|
{
|
||||||
if (singleStepCombustion<CombThermoType, ThermoType>::read())
|
if (singleStepCombustion<ReactionThermo, ThermoType>::read())
|
||||||
{
|
{
|
||||||
this->coeffs().lookup("CEDC") >> CEDC_;
|
this->coeffs().lookup("CEDC") >> CEDC_;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -51,10 +51,10 @@ namespace combustionModels
|
|||||||
Class eddyDissipationModelBase Declaration
|
Class eddyDissipationModelBase Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class CombThermoType, class ThermoType>
|
template<class ReactionThermo, class ThermoType>
|
||||||
class eddyDissipationModelBase
|
class eddyDissipationModelBase
|
||||||
:
|
:
|
||||||
public singleStepCombustion<CombThermoType, ThermoType>
|
public singleStepCombustion<ReactionThermo, ThermoType>
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -79,9 +79,9 @@ public:
|
|||||||
eddyDissipationModelBase
|
eddyDissipationModelBase
|
||||||
(
|
(
|
||||||
const word& modelType,
|
const word& modelType,
|
||||||
const fvMesh& mesh,
|
ReactionThermo& thermo,
|
||||||
const word& combustionProperties,
|
const compressibleTurbulenceModel& turb,
|
||||||
const word& phaseName
|
const word& combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -24,8 +24,9 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "reactionsSensitivityAnalysis.H"
|
#include "reactionsSensitivityAnalysis.H"
|
||||||
#include "psiChemistryModel.H"
|
#include "BasicChemistryModel.H"
|
||||||
#include "rhoChemistryModel.H"
|
#include "psiReactionThermo.H"
|
||||||
|
#include "rhoReactionThermo.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -33,7 +34,13 @@ License
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
// Psi-based chemistry
|
// Psi-based chemistry
|
||||||
typedef functionObjects::reactionsSensitivityAnalysis<psiChemistryModel>
|
typedef functionObjects::reactionsSensitivityAnalysis
|
||||||
|
<
|
||||||
|
BasicChemistryModel
|
||||||
|
<
|
||||||
|
psiReactionThermo
|
||||||
|
>
|
||||||
|
>
|
||||||
psiReactionsSensitivityAnalysisFunctionObject;
|
psiReactionsSensitivityAnalysisFunctionObject;
|
||||||
|
|
||||||
defineTemplateTypeNameAndDebugWithName
|
defineTemplateTypeNameAndDebugWithName
|
||||||
@ -44,7 +51,13 @@ defineTemplateTypeNameAndDebugWithName
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Rho-based chemistry
|
// Rho-based chemistry
|
||||||
typedef functionObjects::reactionsSensitivityAnalysis<rhoChemistryModel>
|
typedef functionObjects::reactionsSensitivityAnalysis
|
||||||
|
<
|
||||||
|
BasicChemistryModel
|
||||||
|
<
|
||||||
|
rhoReactionThermo
|
||||||
|
>
|
||||||
|
>
|
||||||
rhoReactionsSensitivityAnalysisFunctionObject;
|
rhoReactionsSensitivityAnalysisFunctionObject;
|
||||||
|
|
||||||
defineTemplateTypeNameAndDebugWithName
|
defineTemplateTypeNameAndDebugWithName
|
||||||
|
|||||||
@ -275,7 +275,7 @@ makeThermoPhysicsReactionThermos
|
|||||||
icoPoly8TranspJanafEThermoPhysics
|
icoPoly8TranspJanafEThermoPhysics
|
||||||
);
|
);
|
||||||
|
|
||||||
makeReactionMixtureThermos
|
makeThermoPhysicsReactionThermos
|
||||||
(
|
(
|
||||||
rhoThermo,
|
rhoThermo,
|
||||||
rhoReactionThermo,
|
rhoReactionThermo,
|
||||||
@ -511,7 +511,7 @@ makeThermoPhysicsReactionThermos
|
|||||||
icoPoly8TranspJanafHThermoPhysics
|
icoPoly8TranspJanafHThermoPhysics
|
||||||
);
|
);
|
||||||
|
|
||||||
makeReactionMixtureThermos
|
makeThermoPhysicsReactionThermos
|
||||||
(
|
(
|
||||||
rhoThermo,
|
rhoThermo,
|
||||||
rhoReactionThermo,
|
rhoReactionThermo,
|
||||||
|
|||||||
@ -15,11 +15,11 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
combustionModel eddyDissipationDiffusionModel<psiThermoCombustion,gasHThermoPhysics>;
|
combustionModel EDM;
|
||||||
|
|
||||||
active on;
|
active on;
|
||||||
|
|
||||||
eddyDissipationDiffusionModelCoeffs
|
EDMCoeffs
|
||||||
{
|
{
|
||||||
semiImplicit false;
|
semiImplicit false;
|
||||||
CEDC 4;
|
CEDC 4;
|
||||||
@ -28,8 +28,8 @@ eddyDissipationDiffusionModelCoeffs
|
|||||||
|
|
||||||
infinitelyFastChemistryCoeffs
|
infinitelyFastChemistryCoeffs
|
||||||
{
|
{
|
||||||
semiImplicit no;
|
semiImplicit no;
|
||||||
C 5.0;
|
C 5.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
application pimpleDyMFoam;
|
application pimpleFoam;
|
||||||
|
|
||||||
startFrom latestTime;
|
startFrom latestTime;
|
||||||
|
|
||||||
Reference in New Issue
Block a user