mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -23,14 +23,14 @@
|
||||
|
||||
#include "createBaseFields.H"
|
||||
|
||||
Info<< nl << "Reading thermophysicalProperties" << endl;
|
||||
autoPtr<psiChemistryModel> pChemistry(psiChemistryModel::New(mesh));
|
||||
|
||||
psiChemistryModel& chemistry = pChemistry();
|
||||
|
||||
psiReactionThermo& thermo = chemistry.thermo();
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
|
||||
psiReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h");
|
||||
|
||||
autoPtr<psiChemistryModel> pChemistry(psiChemistryModel::New(thermo));
|
||||
psiChemistryModel& chemistry = pChemistry();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
|
||||
@ -1,16 +1,6 @@
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::psiCombustionModel> combustion
|
||||
(
|
||||
combustionModels::psiCombustionModel::New
|
||||
(
|
||||
mesh
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
psiReactionThermo& thermo = combustion->thermo();
|
||||
autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
|
||||
psiReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
SLGThermo slgThermo(mesh, thermo);
|
||||
@ -74,8 +64,11 @@ autoPtr<compressible::turbulenceModel> turbulence
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
autoPtr<combustionModels::psiCombustionModel> combustion
|
||||
(
|
||||
combustionModels::psiCombustionModel::New(thermo, turbulence())
|
||||
);
|
||||
|
||||
|
||||
#include "readGravitationalAcceleration.H"
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
#include "createRDeltaT.H"
|
||||
|
||||
Info<< "Creating reaction model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::psiCombustionModel> reaction
|
||||
(
|
||||
combustionModels::psiCombustionModel::New(mesh)
|
||||
);
|
||||
|
||||
psiReactionThermo& thermo = reaction->thermo();
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
|
||||
psiReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
basicMultiComponentMixture& composition = thermo.composition();
|
||||
@ -18,8 +13,7 @@ if (!composition.species().found(inertSpecie))
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), thermo)
|
||||
<< "Inert specie " << inertSpecie << " not found in available species "
|
||||
<< composition.species()
|
||||
<< exit(FatalIOError);
|
||||
<< composition.species() << exit(FatalIOError);
|
||||
}
|
||||
|
||||
volScalarField rho
|
||||
@ -47,7 +41,6 @@ volVectorField U
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
volScalarField& p = thermo.p();
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
@ -68,9 +61,11 @@ autoPtr<compressible::turbulenceModel> turbulence
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the reaction model
|
||||
reaction->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating reaction model\n" << endl;
|
||||
autoPtr<combustionModels::psiCombustionModel> reaction
|
||||
(
|
||||
combustionModels::psiCombustionModel::New(thermo, turbulence())
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
#include "createRDeltaT.H"
|
||||
|
||||
Info<< "Creating reaction model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::rhoCombustionModel> reaction
|
||||
(
|
||||
combustionModels::rhoCombustionModel::New(mesh)
|
||||
);
|
||||
|
||||
rhoReactionThermo& thermo = reaction->thermo();
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
|
||||
rhoReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
basicMultiComponentMixture& composition = thermo.composition();
|
||||
@ -67,9 +62,11 @@ autoPtr<compressible::turbulenceModel> turbulence
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the reaction model
|
||||
reaction->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating reaction model\n" << endl;
|
||||
autoPtr<combustionModels::rhoCombustionModel> reaction
|
||||
(
|
||||
combustionModels::rhoCombustionModel::New(thermo, turbulence())
|
||||
);
|
||||
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "readhRef.H"
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
#include "createRDeltaT.H"
|
||||
|
||||
Info<< "Creating reaction model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::rhoCombustionModel> reaction
|
||||
(
|
||||
combustionModels::rhoCombustionModel::New(mesh)
|
||||
);
|
||||
|
||||
rhoReactionThermo& thermo = reaction->thermo();
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
|
||||
rhoReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
basicMultiComponentMixture& composition = thermo.composition();
|
||||
@ -69,8 +64,11 @@ autoPtr<compressible::turbulenceModel> turbulence
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the reaction model
|
||||
reaction->setTurbulence(turbulence());
|
||||
Info<< "Creating reaction model\n" << endl;
|
||||
autoPtr<combustionModels::rhoCombustionModel> reaction
|
||||
(
|
||||
combustionModels::rhoCombustionModel::New(thermo, turbulence())
|
||||
);
|
||||
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
|
||||
@ -2,14 +2,9 @@
|
||||
|
||||
#include "readGravitationalAcceleration.H"
|
||||
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::psiCombustionModel> combustion
|
||||
(
|
||||
combustionModels::psiCombustionModel::New(mesh)
|
||||
);
|
||||
|
||||
psiReactionThermo& thermo = combustion->thermo();
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
|
||||
psiReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
SLGThermo slgThermo(mesh, thermo);
|
||||
@ -112,8 +107,11 @@ autoPtr<compressible::turbulenceModel> turbulence
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
autoPtr<combustionModels::psiCombustionModel> combustion
|
||||
(
|
||||
combustionModels::psiCombustionModel::New(thermo, turbulence())
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
#include "createRDeltaT.H"
|
||||
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::rhoCombustionModel> combustion
|
||||
(
|
||||
combustionModels::rhoCombustionModel::New(mesh)
|
||||
);
|
||||
|
||||
rhoReactionThermo& thermo = combustion->thermo();
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
|
||||
rhoReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
SLGThermo slgThermo(mesh, thermo);
|
||||
@ -68,8 +63,11 @@ autoPtr<compressible::turbulenceModel> turbulence
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
autoPtr<combustionModels::rhoCombustionModel> combustion
|
||||
(
|
||||
combustionModels::rhoCombustionModel::New(thermo, turbulence())
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
#include "readGravitationalAcceleration.H"
|
||||
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::rhoCombustionModel> combustion
|
||||
(
|
||||
combustionModels::rhoCombustionModel::New(mesh)
|
||||
);
|
||||
|
||||
rhoReactionThermo& thermo = combustion->thermo();
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
|
||||
rhoReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
SLGThermo slgThermo(mesh, thermo);
|
||||
@ -91,8 +86,11 @@ autoPtr<compressible::turbulenceModel> turbulence
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
autoPtr<combustionModels::rhoCombustionModel> combustion
|
||||
(
|
||||
combustionModels::rhoCombustionModel::New(thermo, turbulence())
|
||||
);
|
||||
|
||||
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
#include "readGravitationalAcceleration.H"
|
||||
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::psiCombustionModel> combustion
|
||||
(
|
||||
combustionModels::psiCombustionModel::New(mesh)
|
||||
);
|
||||
|
||||
psiReactionThermo& thermo = combustion->thermo();
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
|
||||
psiReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
SLGThermo slgThermo(mesh, thermo);
|
||||
@ -91,8 +86,11 @@ autoPtr<compressible::turbulenceModel> turbulence
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
autoPtr<combustionModels::psiCombustionModel> combustion
|
||||
(
|
||||
combustionModels::psiCombustionModel::New(thermo, turbulence())
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,7 +63,9 @@ class MovingPhaseModel
|
||||
:
|
||||
public BasePhaseModel
|
||||
{
|
||||
// Private data
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Velocity field
|
||||
volVectorField U_;
|
||||
@ -94,6 +96,8 @@ class MovingPhaseModel
|
||||
tmp<surfaceScalarField> DbyA_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private static member functions
|
||||
|
||||
//- Calculate and return the flux field
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,26 +37,9 @@ Foam::ReactingPhaseModel<BasePhaseModel, ReactionType>::ReactingPhaseModel
|
||||
const label index
|
||||
)
|
||||
:
|
||||
BasePhaseModel(fluid, phaseName, index, false),
|
||||
reaction_
|
||||
(
|
||||
ReactionType::New
|
||||
(
|
||||
fluid.mesh(),
|
||||
combustionModel::combustionPropertiesName,
|
||||
this->name()
|
||||
)
|
||||
)
|
||||
{
|
||||
this->thermo_ = &reaction_->thermo();
|
||||
|
||||
this->thermo_->validate
|
||||
(
|
||||
IOobject::groupName(phaseModel::typeName, this->name()),
|
||||
"h",
|
||||
"e"
|
||||
);
|
||||
}
|
||||
BasePhaseModel(fluid, phaseName, index),
|
||||
reaction_(ReactionType::New(this->thermo_(), this->turbulence_()))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
@ -71,21 +54,6 @@ Foam::ReactingPhaseModel<BasePhaseModel, ReactionType>::~ReactingPhaseModel()
|
||||
template<class BasePhaseModel, class ReactionType>
|
||||
void Foam::ReactingPhaseModel<BasePhaseModel, ReactionType>::correctThermo()
|
||||
{
|
||||
reaction_->setTurbulence
|
||||
(
|
||||
const_cast<compressibleTurbulenceModel&>
|
||||
(
|
||||
this->mesh().template lookupObject<compressibleTurbulenceModel>
|
||||
(
|
||||
IOobject::groupName
|
||||
(
|
||||
turbulenceModel::propertiesName,
|
||||
this->name()
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
BasePhaseModel::correctThermo();
|
||||
|
||||
reaction_->correct();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,28 +41,18 @@ Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::ThermoPhaseModel
|
||||
(
|
||||
const phaseSystem& fluid,
|
||||
const word& phaseName,
|
||||
const label index,
|
||||
const bool createThermo
|
||||
const label index
|
||||
)
|
||||
:
|
||||
BasePhaseModel(fluid, phaseName, index)
|
||||
BasePhaseModel(fluid, phaseName, index),
|
||||
thermo_(ThermoType::New(fluid.mesh(), this->name()))
|
||||
{
|
||||
if (createThermo)
|
||||
{
|
||||
thermoPtr_.set
|
||||
(
|
||||
ThermoType::New(fluid.mesh(), this->name()).ptr()
|
||||
);
|
||||
|
||||
thermo_ = thermoPtr_.ptr();
|
||||
|
||||
thermo_->validate
|
||||
(
|
||||
IOobject::groupName(phaseModel::typeName, this->name()),
|
||||
"h",
|
||||
"e"
|
||||
);
|
||||
}
|
||||
thermo_->validate
|
||||
(
|
||||
IOobject::groupName(phaseModel::typeName, this->name()),
|
||||
"h",
|
||||
"e"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -79,7 +69,7 @@ template<class BasePhaseModel, class ThermoType>
|
||||
const Foam::rhoThermo&
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::thermo() const
|
||||
{
|
||||
return *thermo_;
|
||||
return thermo_();
|
||||
}
|
||||
|
||||
|
||||
@ -87,7 +77,7 @@ template<class BasePhaseModel, class ThermoType>
|
||||
Foam::rhoThermo&
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::thermo()
|
||||
{
|
||||
return *thermo_;
|
||||
return thermo_();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -62,10 +62,7 @@ protected:
|
||||
// Protected data
|
||||
|
||||
//- Thermophysical model
|
||||
autoPtr<ThermoType> thermoPtr_;
|
||||
|
||||
//- Thermophysical model
|
||||
ThermoType* thermo_;
|
||||
autoPtr<ThermoType> thermo_;
|
||||
|
||||
|
||||
public:
|
||||
@ -76,8 +73,7 @@ public:
|
||||
(
|
||||
const phaseSystem& fluid,
|
||||
const word& phaseName,
|
||||
const label index,
|
||||
const bool createThermo = true
|
||||
const label index
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -45,13 +45,13 @@ License
|
||||
namespace Foam
|
||||
{
|
||||
typedef
|
||||
MovingPhaseModel
|
||||
AnisothermalPhaseModel
|
||||
<
|
||||
AnisothermalPhaseModel
|
||||
PurePhaseModel
|
||||
<
|
||||
PurePhaseModel
|
||||
InertPhaseModel
|
||||
<
|
||||
InertPhaseModel
|
||||
MovingPhaseModel
|
||||
<
|
||||
ThermoPhaseModel<phaseModel, rhoThermo>
|
||||
>
|
||||
@ -69,13 +69,13 @@ namespace Foam
|
||||
);
|
||||
|
||||
typedef
|
||||
MovingPhaseModel
|
||||
IsothermalPhaseModel
|
||||
<
|
||||
IsothermalPhaseModel
|
||||
PurePhaseModel
|
||||
<
|
||||
PurePhaseModel
|
||||
InertPhaseModel
|
||||
<
|
||||
InertPhaseModel
|
||||
MovingPhaseModel
|
||||
<
|
||||
ThermoPhaseModel<phaseModel, rhoThermo>
|
||||
>
|
||||
@ -93,13 +93,13 @@ namespace Foam
|
||||
);
|
||||
|
||||
typedef
|
||||
MovingPhaseModel
|
||||
AnisothermalPhaseModel
|
||||
<
|
||||
AnisothermalPhaseModel
|
||||
MultiComponentPhaseModel
|
||||
<
|
||||
MultiComponentPhaseModel
|
||||
InertPhaseModel
|
||||
<
|
||||
InertPhaseModel
|
||||
MovingPhaseModel
|
||||
<
|
||||
ThermoPhaseModel<phaseModel, rhoReactionThermo>
|
||||
>
|
||||
@ -117,17 +117,17 @@ namespace Foam
|
||||
);
|
||||
|
||||
typedef
|
||||
MovingPhaseModel
|
||||
AnisothermalPhaseModel
|
||||
<
|
||||
AnisothermalPhaseModel
|
||||
MultiComponentPhaseModel
|
||||
<
|
||||
MultiComponentPhaseModel
|
||||
ReactingPhaseModel
|
||||
<
|
||||
ReactingPhaseModel
|
||||
MovingPhaseModel
|
||||
<
|
||||
ThermoPhaseModel<phaseModel, rhoReactionThermo>,
|
||||
combustionModels::rhoCombustionModel
|
||||
>
|
||||
ThermoPhaseModel<phaseModel, rhoReactionThermo>
|
||||
>,
|
||||
combustionModels::rhoCombustionModel
|
||||
>
|
||||
>
|
||||
>
|
||||
|
||||
@ -31,12 +31,12 @@ template<class Type>
|
||||
Foam::combustionModels::EDC<Type>::EDC
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename Type::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
laminar<Type>(modelType, mesh, combustionProperties, phaseName),
|
||||
laminar<Type>(modelType, thermo, turb, combustionProperties),
|
||||
version_
|
||||
(
|
||||
EDCversionNames
|
||||
@ -58,13 +58,13 @@ Foam::combustionModels::EDC<Type>::EDC
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(typeName + ":kappa", phaseName),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
this->thermo().phasePropertyName(typeName + ":kappa"),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
this->mesh(),
|
||||
dimensionedScalar("kappa", dimless, 0)
|
||||
)
|
||||
{}
|
||||
@ -192,7 +192,7 @@ Foam::combustionModels::EDC<Type>::Qdot() const
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(typeName + ":Qdot", this->phaseName_),
|
||||
this->thermo().phasePropertyName(typeName + ":Qdot"),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
|
||||
@ -170,9 +170,9 @@ public:
|
||||
EDC
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename Type::reactionThermo& type,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -40,17 +40,17 @@ template<class CombThermoType, class ThermoType>
|
||||
FSD<CombThermoType, ThermoType>::FSD
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename CombThermoType::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
singleStepCombustion<CombThermoType, ThermoType>
|
||||
(
|
||||
modelType,
|
||||
mesh,
|
||||
combustionProperties,
|
||||
phaseName
|
||||
thermo,
|
||||
turb,
|
||||
combustionProperties
|
||||
),
|
||||
reactionRateFlameArea_
|
||||
(
|
||||
@ -65,7 +65,7 @@ FSD<CombThermoType, ThermoType>::FSD
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("ft", phaseName),
|
||||
this->thermo().phasePropertyName("ft"),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
@ -101,9 +101,9 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
|
||||
|
||||
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||
|
||||
const volScalarField& YFuel = this->thermoPtr_->composition().Y()[fuelI];
|
||||
const volScalarField& YFuel = this->thermo().composition().Y()[fuelI];
|
||||
|
||||
const volScalarField& YO2 = this->thermoPtr_->composition().Y("O2");
|
||||
const volScalarField& YO2 = this->thermo().composition().Y("O2");
|
||||
|
||||
const dimensionedScalar s = this->singleMixturePtr_->s();
|
||||
|
||||
@ -152,7 +152,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("Pc", this->phaseName_),
|
||||
this->thermo().phasePropertyName("Pc"),
|
||||
U.time().timeName(),
|
||||
U.db(),
|
||||
IOobject::NO_READ,
|
||||
@ -171,7 +171,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("omegaFuelBar", this->phaseName_),
|
||||
this->thermo().phasePropertyName("omegaFuelBar"),
|
||||
U.time().timeName(),
|
||||
U.db(),
|
||||
IOobject::NO_READ,
|
||||
@ -302,7 +302,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("products", this->phaseName_),
|
||||
this->thermo().phasePropertyName("products"),
|
||||
U.time().timeName(),
|
||||
U.db(),
|
||||
IOobject::NO_READ,
|
||||
@ -318,7 +318,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
|
||||
forAll(productsIndex, j)
|
||||
{
|
||||
label specieI = productsIndex[j];
|
||||
const volScalarField& Yp = this->thermoPtr_->composition().Y()[specieI];
|
||||
const volScalarField& Yp = this->thermo().composition().Y()[specieI];
|
||||
products += Yp;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -139,9 +139,9 @@ public:
|
||||
FSD
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename CombThermoType::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -31,24 +31,24 @@ template<class Type>
|
||||
Foam::combustionModels::PaSR<Type>::PaSR
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename Type::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
laminar<Type>(modelType, mesh, combustionProperties, phaseName),
|
||||
laminar<Type>(modelType, thermo, turb, combustionProperties),
|
||||
Cmix_(readScalar(this->coeffs().lookup("Cmix"))),
|
||||
kappa_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(typeName + ":kappa", phaseName),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
thermo.phasePropertyName(typeName + ":kappa"),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
this->mesh(),
|
||||
dimensionedScalar("kappa", dimless, 0)
|
||||
)
|
||||
{}
|
||||
@ -116,7 +116,7 @@ Foam::combustionModels::PaSR<Type>::Qdot() const
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject::groupName(typeName + ":Qdot", this->phaseName_),
|
||||
this->thermo().phasePropertyName(typeName + ":Qdot"),
|
||||
kappa_*laminar<Type>::Qdot()
|
||||
)
|
||||
);
|
||||
|
||||
@ -87,9 +87,9 @@ public:
|
||||
PaSR
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename Type::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -43,40 +43,34 @@ const Foam::word Foam::combustionModel::combustionPropertiesName
|
||||
Foam::combustionModel::combustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
basicThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(combustionProperties, phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
thermo.phasePropertyName(combustionProperties),
|
||||
thermo.db().time().constant(),
|
||||
thermo.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
turbulencePtr_(),
|
||||
mesh_(mesh),
|
||||
mesh_(thermo.p().mesh()),
|
||||
turb_(turb),
|
||||
active_(lookupOrDefault<Switch>("active", true)),
|
||||
coeffs_(optionalSubDict(modelType + "Coeffs")),
|
||||
modelType_(modelType),
|
||||
phaseName_(phaseName)
|
||||
modelType_(modelType)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModel::~combustionModel()
|
||||
{
|
||||
if (turbulencePtr_)
|
||||
{
|
||||
turbulencePtr_ = 0;
|
||||
}
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -64,12 +64,12 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Reference to the turbulence model
|
||||
compressibleTurbulenceModel* turbulencePtr_;
|
||||
|
||||
//- Reference to the mesh database
|
||||
const fvMesh& mesh_;
|
||||
|
||||
//- Reference to the turbulence model
|
||||
const compressibleTurbulenceModel& turb_;
|
||||
|
||||
//- Active
|
||||
Switch active_;
|
||||
|
||||
@ -79,9 +79,6 @@ protected:
|
||||
//- Model type
|
||||
const word modelType_;
|
||||
|
||||
//- Phase name
|
||||
const word phaseName_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -98,9 +95,9 @@ public:
|
||||
combustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties=combustionPropertiesName,
|
||||
const word& phaseName=word::null
|
||||
basicThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties=combustionPropertiesName
|
||||
);
|
||||
|
||||
|
||||
@ -113,9 +110,6 @@ public:
|
||||
//- Return const access to the mesh database
|
||||
inline const fvMesh& mesh() const;
|
||||
|
||||
//- Set turbulence
|
||||
inline void setTurbulence(compressibleTurbulenceModel& turbModel);
|
||||
|
||||
//- Return access to turbulence
|
||||
inline const compressibleTurbulenceModel& turbulence() const;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,16 +34,7 @@ inline const Foam::fvMesh& Foam::combustionModel::mesh() const
|
||||
inline const Foam::compressibleTurbulenceModel&
|
||||
Foam::combustionModel::turbulence() const
|
||||
{
|
||||
if (!turbulencePtr_)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "turbulencePtr_ is empty. Please use "
|
||||
<< "combustionModel::setTurbulence "
|
||||
<< "(compressibleTurbulenceModel& )"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return *turbulencePtr_;
|
||||
return turb_;
|
||||
}
|
||||
|
||||
|
||||
@ -65,15 +56,6 @@ inline const Foam::Switch& Foam::combustionModel::active() const
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::combustionModel::setTurbulence
|
||||
(
|
||||
compressibleTurbulenceModel& turbModel
|
||||
)
|
||||
{
|
||||
turbulencePtr_ = &turbModel;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::dictionary& Foam::combustionModel::coeffs() const
|
||||
{
|
||||
return coeffs_;
|
||||
|
||||
@ -37,17 +37,17 @@ template<class CombThermoType, class ThermoType>
|
||||
diffusion<CombThermoType, ThermoType>::diffusion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename CombThermoType::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
singleStepCombustion<CombThermoType, ThermoType>
|
||||
(
|
||||
modelType,
|
||||
mesh,
|
||||
combustionProperties,
|
||||
phaseName
|
||||
thermo,
|
||||
turb,
|
||||
combustionProperties
|
||||
),
|
||||
C_(readScalar(this->coeffs().lookup("C"))),
|
||||
oxidantName_(this->coeffs().template lookupOrDefault<word>("oxidant", "O2"))
|
||||
@ -76,12 +76,12 @@ void diffusion<CombThermoType, ThermoType>::correct()
|
||||
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||
|
||||
const volScalarField& YFuel =
|
||||
this->thermoPtr_->composition().Y()[fuelI];
|
||||
this->thermo().composition().Y()[fuelI];
|
||||
|
||||
if (this->thermoPtr_->composition().contains(oxidantName_))
|
||||
if (this->thermo().composition().contains(oxidantName_))
|
||||
{
|
||||
const volScalarField& YO2 =
|
||||
this->thermoPtr_->composition().Y(oxidantName_);
|
||||
this->thermo().composition().Y(oxidantName_);
|
||||
|
||||
this->wFuel_ ==
|
||||
C_*this->turbulence().muEff()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -85,9 +85,9 @@ public:
|
||||
diffusion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename CombThermoType::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,17 +36,17 @@ template<class CombThermoType, class ThermoType>
|
||||
infinitelyFastChemistry<CombThermoType, ThermoType>::infinitelyFastChemistry
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename CombThermoType::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
singleStepCombustion<CombThermoType, ThermoType>
|
||||
(
|
||||
modelType,
|
||||
mesh,
|
||||
combustionProperties,
|
||||
phaseName
|
||||
thermo,
|
||||
turb,
|
||||
combustionProperties
|
||||
),
|
||||
C_(readScalar(this->coeffs().lookup("C")))
|
||||
{}
|
||||
@ -74,13 +74,13 @@ void infinitelyFastChemistry<CombThermoType, ThermoType>::correct()
|
||||
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||
|
||||
const volScalarField& YFuel =
|
||||
this->thermoPtr_->composition().Y()[fuelI];
|
||||
this->thermo().composition().Y()[fuelI];
|
||||
|
||||
const dimensionedScalar s = this->singleMixturePtr_->s();
|
||||
|
||||
if (this->thermoPtr_->composition().contains("O2"))
|
||||
if (this->thermo().composition().contains("O2"))
|
||||
{
|
||||
const volScalarField& YO2 = this->thermoPtr_->composition().Y("O2");
|
||||
const volScalarField& YO2 = this->thermo().composition().Y("O2");
|
||||
|
||||
this->wFuel_ ==
|
||||
this->rho()/(this->mesh().time().deltaT()*C_)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -82,9 +82,9 @@ public:
|
||||
infinitelyFastChemistry
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename CombThermoType::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -33,12 +33,12 @@ template<class Type>
|
||||
Foam::combustionModels::laminar<Type>::laminar
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename Type::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
Type(modelType, mesh, combustionProperties, phaseName),
|
||||
Type(modelType, thermo, turb, combustionProperties),
|
||||
integrateReactionRate_
|
||||
(
|
||||
this->coeffs().lookupOrDefault("integrateReactionRate", true)
|
||||
@ -144,7 +144,7 @@ Foam::combustionModels::laminar<Type>::Qdot() const
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(typeName + ":Qdot", this->phaseName_),
|
||||
this->thermo().phasePropertyName(typeName + ":Qdot"),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -87,9 +87,9 @@ public:
|
||||
laminar
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename Type::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -32,12 +32,12 @@ template<class CombThermoType>
|
||||
Foam::combustionModels::noCombustion<CombThermoType>::noCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename CombThermoType::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
CombThermoType(modelType, mesh, phaseName)
|
||||
CombThermoType(modelType, thermo, turb)
|
||||
{}
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::Qdot() const
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(typeName + ":Qdot", this->phaseName_),
|
||||
this->thermo().phasePropertyName(typeName + ":Qdot"),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -71,9 +71,9 @@ public:
|
||||
noCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename CombThermoType::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,13 +30,19 @@ License
|
||||
Foam::combustionModels::psiChemistryCombustion::psiChemistryCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
psiReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
psiCombustionModel(modelType, mesh, combustionProperties, phaseName),
|
||||
chemistryPtr_(psiChemistryModel::New(mesh, phaseName))
|
||||
psiCombustionModel
|
||||
(
|
||||
modelType,
|
||||
thermo,
|
||||
turb,
|
||||
combustionProperties
|
||||
),
|
||||
chemistryPtr_(psiChemistryModel::New(thermo))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -79,9 +79,9 @@ public:
|
||||
psiChemistryCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
psiReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,12 +41,12 @@ namespace combustionModels
|
||||
Foam::combustionModels::psiCombustionModel::psiCombustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
psiReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
combustionModel(modelType, mesh, combustionProperties, phaseName)
|
||||
combustionModel(modelType, thermo, turb, combustionProperties)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -68,7 +68,8 @@ class psiCombustionModel
|
||||
|
||||
public:
|
||||
|
||||
typedef psiReactionThermo ReactionThermo;
|
||||
//- Thermo type
|
||||
typedef psiReactionThermo reactionThermo;
|
||||
|
||||
|
||||
//- Runtime type information
|
||||
@ -83,11 +84,11 @@ public:
|
||||
dictionary,
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
psiReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
),
|
||||
(modelType, mesh, combustionProperties, phaseName)
|
||||
(modelType, thermo, turb, combustionProperties)
|
||||
);
|
||||
|
||||
|
||||
@ -97,18 +98,18 @@ public:
|
||||
psiCombustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
psiReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<psiCombustionModel> New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties=combustionPropertiesName,
|
||||
const word& phaseName=word::null
|
||||
psiReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties=combustionPropertiesName
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,9 +30,9 @@ License
|
||||
Foam::autoPtr<Foam::combustionModels::psiCombustionModel>
|
||||
Foam::combustionModels::psiCombustionModel::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
psiReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
{
|
||||
const word combModelName
|
||||
@ -41,9 +41,9 @@ Foam::combustionModels::psiCombustionModel::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(combustionProperties, phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
thermo.phasePropertyName(combustionProperties),
|
||||
thermo.db().time().constant(),
|
||||
thermo.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
@ -70,7 +70,7 @@ Foam::combustionModels::psiCombustionModel::New
|
||||
|
||||
return autoPtr<psiCombustionModel>
|
||||
(
|
||||
cstrIter()(className, mesh, combustionProperties, phaseName)
|
||||
cstrIter()(className, thermo, turb, combustionProperties)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,12 +30,12 @@ License
|
||||
Foam::combustionModels::psiThermoCombustion::psiThermoCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
psiReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb
|
||||
)
|
||||
:
|
||||
psiCombustionModel(modelType, mesh, combustionPropertiesName, phaseName),
|
||||
thermoPtr_(psiReactionThermo::New(mesh, phaseName))
|
||||
psiCombustionModel(modelType, thermo, turb, combustionPropertiesName),
|
||||
thermo_(thermo)
|
||||
{}
|
||||
|
||||
|
||||
@ -50,14 +50,14 @@ Foam::combustionModels::psiThermoCombustion::~psiThermoCombustion()
|
||||
Foam::psiReactionThermo&
|
||||
Foam::combustionModels::psiThermoCombustion::thermo()
|
||||
{
|
||||
return thermoPtr_();
|
||||
return thermo_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::psiReactionThermo&
|
||||
Foam::combustionModels::psiThermoCombustion::thermo() const
|
||||
{
|
||||
return thermoPtr_();
|
||||
return thermo_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -67,8 +67,8 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Pointer to chemistry model
|
||||
autoPtr<psiReactionThermo> thermoPtr_;
|
||||
//- Thermo
|
||||
psiReactionThermo& thermo_;
|
||||
|
||||
|
||||
public:
|
||||
@ -79,8 +79,8 @@ public:
|
||||
psiThermoCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
psiReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,13 +30,13 @@ License
|
||||
Foam::combustionModels::rhoChemistryCombustion::rhoChemistryCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
rhoReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
rhoCombustionModel(modelType, mesh, combustionProperties, phaseName),
|
||||
chemistryPtr_(rhoChemistryModel::New(mesh, phaseName))
|
||||
rhoCombustionModel(modelType, thermo, turb, combustionProperties),
|
||||
chemistryPtr_(rhoChemistryModel::New(thermo))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -79,9 +79,9 @@ public:
|
||||
rhoChemistryCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
rhoReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,12 +41,12 @@ namespace combustionModels
|
||||
Foam::combustionModels::rhoCombustionModel::rhoCombustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
rhoReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
combustionModel(modelType, mesh, combustionProperties, phaseName)
|
||||
combustionModel(modelType, thermo, turb, combustionProperties)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -69,7 +69,8 @@ class rhoCombustionModel
|
||||
|
||||
public:
|
||||
|
||||
typedef rhoReactionThermo ReactionThermo;
|
||||
//- Thermo type
|
||||
typedef rhoReactionThermo reactionThermo;
|
||||
|
||||
|
||||
//- Runtime type information
|
||||
@ -84,11 +85,11 @@ public:
|
||||
dictionary,
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
rhoReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
),
|
||||
(modelType, mesh, combustionProperties, phaseName)
|
||||
(modelType, thermo, turb, combustionProperties)
|
||||
);
|
||||
|
||||
|
||||
@ -99,9 +100,9 @@ public:
|
||||
rhoCombustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
rhoReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
@ -109,9 +110,9 @@ public:
|
||||
//- Selector
|
||||
static autoPtr<rhoCombustionModel> New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties=combustionPropertiesName,
|
||||
const word& phaseName=word::null
|
||||
rhoReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties=combustionPropertiesName
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,9 +30,9 @@ License
|
||||
Foam::autoPtr<Foam::combustionModels::rhoCombustionModel>
|
||||
Foam::combustionModels::rhoCombustionModel::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
rhoReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
{
|
||||
const word combTypeName
|
||||
@ -41,9 +41,9 @@ Foam::combustionModels::rhoCombustionModel::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(combustionProperties, phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
thermo.phasePropertyName(combustionProperties),
|
||||
thermo.db().time().constant(),
|
||||
thermo.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
@ -72,7 +72,7 @@ Foam::combustionModels::rhoCombustionModel::New
|
||||
|
||||
return autoPtr<rhoCombustionModel>
|
||||
(
|
||||
cstrIter()(className, mesh, combustionProperties, phaseName)
|
||||
cstrIter()(className, thermo, turb, combustionProperties)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,12 +30,12 @@ License
|
||||
Foam::combustionModels::rhoThermoCombustion::rhoThermoCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
rhoReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb
|
||||
)
|
||||
:
|
||||
rhoCombustionModel(modelType, mesh, combustionPropertiesName, phaseName),
|
||||
thermoPtr_(rhoReactionThermo::New(mesh, phaseName))
|
||||
rhoCombustionModel(modelType, thermo, turb, combustionPropertiesName),
|
||||
thermo_(thermo)
|
||||
{}
|
||||
|
||||
|
||||
@ -50,14 +50,14 @@ Foam::combustionModels::rhoThermoCombustion::~rhoThermoCombustion()
|
||||
Foam::rhoReactionThermo&
|
||||
Foam::combustionModels::rhoThermoCombustion::thermo()
|
||||
{
|
||||
return thermoPtr_();
|
||||
return thermo_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::rhoReactionThermo&
|
||||
Foam::combustionModels::rhoThermoCombustion::thermo() const
|
||||
{
|
||||
return thermoPtr_();
|
||||
return thermo_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -67,8 +67,8 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Pointer to thermo model
|
||||
autoPtr<rhoReactionThermo> thermoPtr_;
|
||||
//- Thermo
|
||||
rhoReactionThermo& thermo_;
|
||||
|
||||
|
||||
public:
|
||||
@ -79,8 +79,8 @@ public:
|
||||
rhoThermoCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
rhoReactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,18 +37,18 @@ template<class CombThermoType, class ThermoType>
|
||||
singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename CombThermoType::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
CombThermoType(modelType, mesh, phaseName),
|
||||
CombThermoType(modelType, thermo, turb),
|
||||
singleMixturePtr_(nullptr),
|
||||
wFuel_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("wFuel", phaseName),
|
||||
this->thermo().phasePropertyName("wFuel"),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
@ -103,7 +103,7 @@ tmp<fvScalarMatrix> singleStepCombustion<CombThermoType, ThermoType>::R
|
||||
) const
|
||||
{
|
||||
const label specieI =
|
||||
this->thermoPtr_->composition().species()[Y.member()];
|
||||
this->thermo().composition().species()[Y.member()];
|
||||
|
||||
volScalarField wSpecie
|
||||
(
|
||||
@ -131,7 +131,7 @@ singleStepCombustion<CombThermoType, ThermoType>::Qdot() const
|
||||
{
|
||||
const label fuelI = singleMixturePtr_->fuelIndex();
|
||||
volScalarField& YFuel =
|
||||
const_cast<volScalarField&>(this->thermoPtr_->composition().Y(fuelI));
|
||||
const_cast<volScalarField&>(this->thermo().composition().Y(fuelI));
|
||||
|
||||
return -singleMixturePtr_->qFuel()*(R(YFuel) & YFuel);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -84,9 +84,9 @@ public:
|
||||
singleStepCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename CombThermoType::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -104,21 +104,13 @@ template<class Type>
|
||||
Foam::combustionModels::zoneCombustion<Type>::zoneCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename Type::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
Type(modelType, mesh, combustionProperties, phaseName),
|
||||
combustionModelPtr_
|
||||
(
|
||||
Type::New
|
||||
(
|
||||
mesh,
|
||||
"zoneCombustionProperties",
|
||||
phaseName
|
||||
)
|
||||
),
|
||||
Type(modelType, thermo, turb, combustionProperties),
|
||||
combustionModelPtr_(Type::New(thermo, turb, "zoneCombustionProperties")),
|
||||
zoneNames_(this->coeffs().lookup("zones"))
|
||||
{}
|
||||
|
||||
@ -133,7 +125,7 @@ Foam::combustionModels::zoneCombustion<Type>::~zoneCombustion()
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
typename Type::ReactionThermo&
|
||||
typename Type::reactionThermo&
|
||||
Foam::combustionModels::zoneCombustion<Type>::thermo()
|
||||
{
|
||||
return combustionModelPtr_->thermo();
|
||||
@ -141,7 +133,7 @@ Foam::combustionModels::zoneCombustion<Type>::thermo()
|
||||
|
||||
|
||||
template<class Type>
|
||||
const typename Type::ReactionThermo&
|
||||
const typename Type::reactionThermo&
|
||||
Foam::combustionModels::zoneCombustion<Type>::thermo() const
|
||||
{
|
||||
return combustionModelPtr_->thermo();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -90,9 +90,9 @@ public:
|
||||
zoneCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& combustionProperties,
|
||||
const word& phaseName
|
||||
typename Type::reactionThermo& thermo,
|
||||
const compressibleTurbulenceModel& turb,
|
||||
const word& combustionProperties
|
||||
);
|
||||
|
||||
|
||||
@ -103,10 +103,10 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Return access to the thermo package
|
||||
virtual typename Type::ReactionThermo& thermo();
|
||||
virtual typename Type::reactionThermo& thermo();
|
||||
|
||||
//- Return const access to the thermo package
|
||||
virtual const typename Type::ReactionThermo& thermo() const;
|
||||
virtual const typename Type::reactionThermo& thermo() const;
|
||||
|
||||
//- Correct combustion rate
|
||||
virtual void correct();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,9 +47,14 @@ addToRunTimeSelectionTable(pyrolysisModel, noPyrolysis, dictionary);
|
||||
|
||||
void noPyrolysis::constructThermoChemistry()
|
||||
{
|
||||
solidThermo_.reset
|
||||
(
|
||||
solidReactionThermo::New(regionMesh()).ptr()
|
||||
);
|
||||
|
||||
solidChemistry_.reset
|
||||
(
|
||||
basicSolidChemistryModel::New(regionMesh()).ptr()
|
||||
basicSolidChemistryModel::New(solidThermo_()).ptr()
|
||||
);
|
||||
|
||||
solidThermo_.reset(&solidChemistry_->solidThermo());
|
||||
@ -95,8 +100,8 @@ noPyrolysis::noPyrolysis
|
||||
)
|
||||
:
|
||||
pyrolysisModel(mesh, regionType),
|
||||
solidChemistry_(nullptr),
|
||||
solidThermo_(nullptr),
|
||||
solidChemistry_(nullptr),
|
||||
radiation_(nullptr)
|
||||
{
|
||||
if (active())
|
||||
@ -115,8 +120,8 @@ noPyrolysis::noPyrolysis
|
||||
)
|
||||
:
|
||||
pyrolysisModel(mesh, regionType),
|
||||
solidChemistry_(nullptr),
|
||||
solidThermo_(nullptr),
|
||||
solidChemistry_(nullptr),
|
||||
radiation_(nullptr)
|
||||
{
|
||||
if (active())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -81,12 +81,12 @@ protected:
|
||||
//- Reset solidChemistryModel and solidThermo pointers
|
||||
void constructThermoChemistry();
|
||||
|
||||
//- Reference to the solid chemistry model
|
||||
autoPtr<basicSolidChemistryModel> solidChemistry_;
|
||||
|
||||
//- Reference to solid thermo
|
||||
autoPtr<solidReactionThermo> solidThermo_;
|
||||
|
||||
//- Reference to the solid chemistry model
|
||||
autoPtr<basicSolidChemistryModel> solidChemistry_;
|
||||
|
||||
//- Pointer to radiation model
|
||||
autoPtr<radiation::radiationModel> radiation_;
|
||||
|
||||
|
||||
@ -154,7 +154,7 @@ void reactingOneDim::updatePhiGas()
|
||||
forAll(gasTable, gasI)
|
||||
{
|
||||
tmp<volScalarField> tHsiGas =
|
||||
solidChemistry_->gasHs(solidThermo_.p(), solidThermo_.T(), gasI);
|
||||
solidChemistry_->gasHs(solidThermo_->p(), solidThermo_->T(), gasI);
|
||||
|
||||
const volScalarField& HsiGas = tHsiGas();
|
||||
|
||||
@ -313,7 +313,7 @@ void reactingOneDim::solveEnergy()
|
||||
InfoInFunction << endl;
|
||||
}
|
||||
|
||||
tmp<volScalarField> alpha(solidThermo_.alpha());
|
||||
tmp<volScalarField> alpha(solidThermo_->alpha());
|
||||
|
||||
fvScalarMatrix hEqn
|
||||
(
|
||||
@ -384,9 +384,9 @@ reactingOneDim::reactingOneDim
|
||||
)
|
||||
:
|
||||
pyrolysisModel(modelType, mesh, regionType),
|
||||
solidChemistry_(basicSolidChemistryModel::New(regionMesh())),
|
||||
solidThermo_(solidChemistry_->solidThermo()),
|
||||
radiation_(radiation::radiationModel::New(solidThermo_.T())),
|
||||
solidThermo_(solidReactionThermo::New(regionMesh())),
|
||||
solidChemistry_(basicSolidChemistryModel::New(solidThermo_())),
|
||||
radiation_(radiation::radiationModel::New(solidThermo_->T())),
|
||||
rho_
|
||||
(
|
||||
IOobject
|
||||
@ -397,10 +397,10 @@ reactingOneDim::reactingOneDim
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
solidThermo_.rho()
|
||||
solidThermo_->rho()
|
||||
),
|
||||
Ys_(solidThermo_.composition().Y()),
|
||||
h_(solidThermo_.he()),
|
||||
Ys_(solidThermo_->composition().Y()),
|
||||
h_(solidThermo_->he()),
|
||||
nNonOrthCorr_(-1),
|
||||
maxDiff_(10),
|
||||
minimumDelta_(1e-4),
|
||||
@ -484,9 +484,9 @@ reactingOneDim::reactingOneDim
|
||||
)
|
||||
:
|
||||
pyrolysisModel(modelType, mesh, dict, regionType),
|
||||
solidChemistry_(basicSolidChemistryModel::New(regionMesh())),
|
||||
solidThermo_(solidChemistry_->solidThermo()),
|
||||
radiation_(radiation::radiationModel::New(solidThermo_.T())),
|
||||
solidThermo_(solidReactionThermo::New(regionMesh())),
|
||||
solidChemistry_(basicSolidChemistryModel::New(solidThermo_())),
|
||||
radiation_(radiation::radiationModel::New(solidThermo_->T())),
|
||||
rho_
|
||||
(
|
||||
IOobject
|
||||
@ -497,10 +497,10 @@ reactingOneDim::reactingOneDim
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
solidThermo_.rho()
|
||||
solidThermo_->rho()
|
||||
),
|
||||
Ys_(solidThermo_.composition().Y()),
|
||||
h_(solidThermo_.he()),
|
||||
Ys_(solidThermo_->composition().Y()),
|
||||
h_(solidThermo_->he()),
|
||||
nNonOrthCorr_(-1),
|
||||
maxDiff_(10),
|
||||
minimumDelta_(1e-4),
|
||||
@ -643,13 +643,13 @@ const volScalarField& reactingOneDim::rho() const
|
||||
|
||||
const volScalarField& reactingOneDim::T() const
|
||||
{
|
||||
return solidThermo_.T();
|
||||
return solidThermo_->T();
|
||||
}
|
||||
|
||||
|
||||
const tmp<volScalarField> reactingOneDim::Cp() const
|
||||
{
|
||||
return solidThermo_.Cp();
|
||||
return solidThermo_->Cp();
|
||||
}
|
||||
|
||||
|
||||
@ -661,7 +661,7 @@ tmp<volScalarField> reactingOneDim::kappaRad() const
|
||||
|
||||
tmp<volScalarField> reactingOneDim::kappa() const
|
||||
{
|
||||
return solidThermo_.kappa();
|
||||
return solidThermo_->kappa();
|
||||
}
|
||||
|
||||
|
||||
@ -711,12 +711,12 @@ void reactingOneDim::evolveRegion()
|
||||
|
||||
calculateMassTransfer();
|
||||
|
||||
solidThermo_.correct();
|
||||
solidThermo_->correct();
|
||||
|
||||
Info<< "pyrolysis min/max(T) = "
|
||||
<< gMin(solidThermo_.T().primitiveField())
|
||||
<< gMin(solidThermo_->T().primitiveField())
|
||||
<< ", "
|
||||
<< gMax(solidThermo_.T().primitiveField())
|
||||
<< gMax(solidThermo_->T().primitiveField())
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
@ -75,12 +75,12 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Reference to solid thermo
|
||||
autoPtr<solidReactionThermo> solidThermo_;
|
||||
|
||||
//- Reference to the solid chemistry model
|
||||
autoPtr<basicSolidChemistryModel> solidChemistry_;
|
||||
|
||||
//- Reference to solid thermo
|
||||
solidReactionThermo& solidThermo_;
|
||||
|
||||
//- Pointer to radiation model
|
||||
autoPtr<radiation::radiationModel> radiation_;
|
||||
|
||||
|
||||
@ -33,15 +33,18 @@ License
|
||||
template<class CompType, class ThermoType>
|
||||
Foam::TDACChemistryModel<CompType, ThermoType>::TDACChemistryModel
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
typename CompType::reactionThermo& thermo
|
||||
)
|
||||
:
|
||||
chemistryModel<CompType, ThermoType>(mesh, phaseName),
|
||||
chemistryModel<CompType, ThermoType>(thermo),
|
||||
variableTimeStep_
|
||||
(
|
||||
mesh.time().controlDict().lookupOrDefault("adjustTimeStep", false)
|
||||
|| fv::localEulerDdt::enabled(mesh)
|
||||
this->mesh().time().controlDict().lookupOrDefault
|
||||
(
|
||||
"adjustTimeStep",
|
||||
false
|
||||
)
|
||||
|| fv::localEulerDdt::enabled(this->mesh())
|
||||
),
|
||||
timeSteps_(0),
|
||||
NsDAC_(this->nSpecie_),
|
||||
@ -54,13 +57,13 @@ Foam::TDACChemistryModel<CompType, ThermoType>::TDACChemistryModel
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("TabulationResults", phaseName),
|
||||
thermo.phasePropertyName("TabulationResults"),
|
||||
this->time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
this->mesh(),
|
||||
scalar(0)
|
||||
)
|
||||
{
|
||||
@ -93,8 +96,8 @@ Foam::TDACChemistryModel<CompType, ThermoType>::TDACChemistryModel
|
||||
IOobject header
|
||||
(
|
||||
this->Y()[i].name(),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ
|
||||
);
|
||||
|
||||
|
||||
@ -150,12 +150,8 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh
|
||||
TDACChemistryModel
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
//- Construct from thermo
|
||||
TDACChemistryModel(typename CompType::reactionThermo& thermo);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -42,37 +42,33 @@ void Foam::basicChemistryModel::correct()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicChemistryModel::basicChemistryModel
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
Foam::basicChemistryModel::basicChemistryModel(basicThermo& thermo)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("chemistryProperties", phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
thermo.phasePropertyName("chemistryProperties"),
|
||||
thermo.db().time().constant(),
|
||||
thermo.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
mesh_(mesh),
|
||||
mesh_(thermo.p().mesh()),
|
||||
chemistry_(lookup("chemistry")),
|
||||
deltaTChemIni_(readScalar(lookup("initialChemicalTimeStep"))),
|
||||
deltaTChem_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("deltaTChem", phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
thermo.phasePropertyName("deltaTChem"),
|
||||
mesh().time().constant(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
mesh(),
|
||||
dimensionedScalar("deltaTChem0", dimTime, deltaTChemIni_)
|
||||
)
|
||||
{}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -40,6 +40,7 @@ SourceFiles
|
||||
#include "Switch.H"
|
||||
#include "scalarField.H"
|
||||
#include "volFields.H"
|
||||
#include "basicThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -101,15 +102,18 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh
|
||||
basicChemistryModel(const fvMesh& mesh, const word& phaseName);
|
||||
//- Construct from thermo
|
||||
basicChemistryModel(basicThermo& thermo);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Generic New for each of the related chemistry model
|
||||
template<class Thermo>
|
||||
static autoPtr<Thermo> New(const fvMesh& mesh, const word& phaseName);
|
||||
template<class ChemistryModel>
|
||||
static autoPtr<ChemistryModel> New
|
||||
(
|
||||
typename ChemistryModel::reactionThermo& thermo
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -31,17 +31,16 @@ License
|
||||
template<class ChemistryModel>
|
||||
Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
typename ChemistryModel::reactionThermo& thermo
|
||||
)
|
||||
{
|
||||
IOdictionary chemistryDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("chemistryProperties", phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
thermo.phasePropertyName("chemistryProperties"),
|
||||
thermo.db().time().constant(),
|
||||
thermo.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
@ -76,9 +75,9 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(basicThermo::dictName, phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
thermo.phasePropertyName(basicThermo::dictName),
|
||||
thermo.db().time().constant(),
|
||||
thermo.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
@ -124,10 +123,10 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
|
||||
+ thermoTypeName + ">>";
|
||||
}
|
||||
|
||||
typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter =
|
||||
ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName);
|
||||
typename ChemistryModel::thermoConstructorTable::iterator cstrIter =
|
||||
ChemistryModel::thermoConstructorTablePtr_->find(chemistryTypeName);
|
||||
|
||||
if (cstrIter == ChemistryModel::fvMeshConstructorTablePtr_->end())
|
||||
if (cstrIter == ChemistryModel::thermoConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown " << ChemistryModel::typeName << " type " << nl
|
||||
@ -138,7 +137,7 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
|
||||
// Get the list of all the suitable chemistry packages available
|
||||
wordList validChemistryTypeNames
|
||||
(
|
||||
ChemistryModel::fvMeshConstructorTablePtr_->sortedToc()
|
||||
ChemistryModel::thermoConstructorTablePtr_->sortedToc()
|
||||
);
|
||||
|
||||
// Build a table of the thermo packages constituent parts
|
||||
@ -171,7 +170,7 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
|
||||
FatalError<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<ChemistryModel>(cstrIter()(mesh, phaseName));
|
||||
return autoPtr<ChemistryModel>(cstrIter()(thermo));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -180,20 +179,20 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
|
||||
|
||||
Info<< "Selecting chemistry type " << chemistryTypeName << endl;
|
||||
|
||||
typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter =
|
||||
ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName);
|
||||
typename ChemistryModel::thermoConstructorTable::iterator cstrIter =
|
||||
ChemistryModel::thermoConstructorTablePtr_->find(chemistryTypeName);
|
||||
|
||||
if (cstrIter == ChemistryModel::fvMeshConstructorTablePtr_->end())
|
||||
if (cstrIter == ChemistryModel::thermoConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown " << ChemistryModel::typeName << " type "
|
||||
<< chemistryTypeName << nl << nl
|
||||
<< "Valid ChemistryModel types are:" << nl
|
||||
<< ChemistryModel::fvMeshConstructorTablePtr_->sortedToc() << nl
|
||||
<< ChemistryModel::thermoConstructorTablePtr_->sortedToc() << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<ChemistryModel>(cstrIter()(mesh, phaseName));
|
||||
return autoPtr<ChemistryModel>(cstrIter()(thermo));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -33,11 +33,10 @@ License
|
||||
template<class CompType, class ThermoType>
|
||||
Foam::chemistryModel<CompType, ThermoType>::chemistryModel
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
typename CompType::reactionThermo& thermo
|
||||
)
|
||||
:
|
||||
CompType(mesh, phaseName),
|
||||
CompType(thermo),
|
||||
ODESystem(),
|
||||
Y_(this->thermo().composition().Y()),
|
||||
reactions_
|
||||
@ -68,12 +67,12 @@ Foam::chemistryModel<CompType, ThermoType>::chemistryModel
|
||||
IOobject
|
||||
(
|
||||
"RR." + Y_[fieldi].name(),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
thermo.p().mesh(),
|
||||
dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
@ -79,6 +79,7 @@ protected:
|
||||
|
||||
typedef ThermoType thermoType;
|
||||
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Reference to the field of specie mass fractions
|
||||
@ -124,8 +125,8 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh
|
||||
chemistryModel(const fvMesh& mesh, const word& phaseName);
|
||||
//- Construct from thermo
|
||||
chemistryModel(typename CompType::reactionThermo& thermo);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,20 +31,16 @@ License
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(psiChemistryModel, 0);
|
||||
defineRunTimeSelectionTable(psiChemistryModel, fvMesh);
|
||||
defineRunTimeSelectionTable(psiChemistryModel, thermo);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::psiChemistryModel::psiChemistryModel
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
Foam::psiChemistryModel::psiChemistryModel(psiReactionThermo& thermo)
|
||||
:
|
||||
basicChemistryModel(mesh, phaseName),
|
||||
thermo_(psiReactionThermo::New(mesh, phaseName))
|
||||
basicChemistryModel(thermo),
|
||||
thermo_(thermo)
|
||||
{}
|
||||
|
||||
|
||||
@ -52,11 +48,10 @@ Foam::psiChemistryModel::psiChemistryModel
|
||||
|
||||
Foam::autoPtr<Foam::psiChemistryModel> Foam::psiChemistryModel::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
psiReactionThermo& thermo
|
||||
)
|
||||
{
|
||||
return basicChemistryModel::New<psiChemistryModel>(mesh, phaseName);
|
||||
return basicChemistryModel::New<psiChemistryModel>(thermo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -71,8 +71,8 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Thermo package
|
||||
autoPtr<psiReactionThermo> thermo_;
|
||||
//- Thermo
|
||||
psiReactionThermo& thermo_;
|
||||
|
||||
|
||||
public:
|
||||
@ -81,29 +81,29 @@ public:
|
||||
TypeName("psi");
|
||||
|
||||
|
||||
//- Thermo type
|
||||
typedef psiReactionThermo reactionThermo;
|
||||
|
||||
|
||||
//- Declare run-time constructor selection tables
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
psiChemistryModel,
|
||||
fvMesh,
|
||||
(const fvMesh& mesh, const word& phaseName),
|
||||
(mesh, phaseName)
|
||||
thermo,
|
||||
(psiReactionThermo& thermo),
|
||||
(thermo)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh and phase name
|
||||
psiChemistryModel(const fvMesh& mesh, const word& phaseName);
|
||||
//- Construct from thermo
|
||||
psiChemistryModel(psiReactionThermo& thermo);
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<psiChemistryModel> New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName=word::null
|
||||
);
|
||||
static autoPtr<psiChemistryModel> New(psiReactionThermo& thermo);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,13 +27,13 @@ License
|
||||
|
||||
inline Foam::psiReactionThermo& Foam::psiChemistryModel::thermo()
|
||||
{
|
||||
return thermo_();
|
||||
return thermo_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::psiReactionThermo& Foam::psiChemistryModel::thermo() const
|
||||
{
|
||||
return thermo_();
|
||||
return thermo_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,20 +31,16 @@ License
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(rhoChemistryModel, 0);
|
||||
defineRunTimeSelectionTable(rhoChemistryModel, fvMesh);
|
||||
defineRunTimeSelectionTable(rhoChemistryModel, thermo);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::rhoChemistryModel::rhoChemistryModel
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
Foam::rhoChemistryModel::rhoChemistryModel(rhoReactionThermo& thermo)
|
||||
:
|
||||
basicChemistryModel(mesh, phaseName),
|
||||
thermo_(rhoReactionThermo::New(mesh, phaseName))
|
||||
basicChemistryModel(thermo),
|
||||
thermo_(thermo)
|
||||
{}
|
||||
|
||||
|
||||
@ -52,11 +48,10 @@ Foam::rhoChemistryModel::rhoChemistryModel
|
||||
|
||||
Foam::autoPtr<Foam::rhoChemistryModel> Foam::rhoChemistryModel::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
rhoReactionThermo& thermo
|
||||
)
|
||||
{
|
||||
return basicChemistryModel::New<rhoChemistryModel>(mesh, phaseName);
|
||||
return basicChemistryModel::New<rhoChemistryModel>(thermo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -71,8 +71,8 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Thermo package
|
||||
autoPtr<rhoReactionThermo> thermo_;
|
||||
//- Thermo
|
||||
rhoReactionThermo& thermo_;
|
||||
|
||||
|
||||
public:
|
||||
@ -81,29 +81,29 @@ public:
|
||||
TypeName("rho");
|
||||
|
||||
|
||||
//- Thermo type
|
||||
typedef rhoReactionThermo reactionThermo;
|
||||
|
||||
|
||||
//- Declare run-time constructor selection tables
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
rhoChemistryModel,
|
||||
fvMesh,
|
||||
(const fvMesh& mesh, const word& phaseName),
|
||||
(mesh, phaseName)
|
||||
thermo,
|
||||
(rhoReactionThermo& thermo),
|
||||
(thermo)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh and phase name
|
||||
rhoChemistryModel(const fvMesh& mesh, const word& phaseName);
|
||||
//- Construct from thermo
|
||||
rhoChemistryModel(rhoReactionThermo& thermo);
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<rhoChemistryModel> New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName=word::null
|
||||
);
|
||||
static autoPtr<rhoChemistryModel> New(rhoReactionThermo& thermo);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,13 +27,13 @@ License
|
||||
|
||||
inline Foam::rhoReactionThermo& Foam::rhoChemistryModel::thermo()
|
||||
{
|
||||
return thermo_();
|
||||
return thermo_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::rhoReactionThermo& Foam::rhoChemistryModel::thermo() const
|
||||
{
|
||||
return thermo_();
|
||||
return thermo_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -32,11 +32,10 @@ License
|
||||
template<class ChemistryModel>
|
||||
Foam::EulerImplicit<ChemistryModel>::EulerImplicit
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
typename ChemistryModel::reactionThermo& thermo
|
||||
)
|
||||
:
|
||||
chemistrySolver<ChemistryModel>(mesh, phaseName),
|
||||
chemistrySolver<ChemistryModel>(thermo),
|
||||
coeffsDict_(this->subDict("EulerImplicitCoeffs")),
|
||||
cTauChem_(readScalar(coeffsDict_.lookup("cTauChem"))),
|
||||
eqRateLimiter_(coeffsDict_.lookup("equilibriumRateLimiter")),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -77,8 +77,8 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh and phase name
|
||||
EulerImplicit(const fvMesh& mesh, const word& phaseName);
|
||||
//- Construct from thermo
|
||||
EulerImplicit(typename ChemistryModel::reactionThermo& thermo);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,11 +30,10 @@ License
|
||||
template<class ChemistryModel>
|
||||
Foam::chemistrySolver<ChemistryModel>::chemistrySolver
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
typename ChemistryModel::reactionThermo& thermo
|
||||
)
|
||||
:
|
||||
ChemistryModel(mesh, phaseName)
|
||||
ChemistryModel(thermo)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -58,8 +58,8 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components and phase name
|
||||
chemistrySolver(const fvMesh& mesh, const word& phaseName);
|
||||
//- Construct from thermo
|
||||
chemistrySolver(typename ChemistryModel::reactionThermo& thermo);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -54,7 +54,7 @@ License
|
||||
( \
|
||||
Comp, \
|
||||
SS##Comp##Thermo, \
|
||||
fvMesh \
|
||||
thermo \
|
||||
); \
|
||||
\
|
||||
defineTemplateTypeNameAndDebugWithName \
|
||||
@ -69,7 +69,7 @@ License
|
||||
( \
|
||||
Comp, \
|
||||
TDAC##SS##Comp##Thermo, \
|
||||
fvMesh \
|
||||
thermo \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,11 +31,10 @@ License
|
||||
template<class ChemistryModel>
|
||||
Foam::noChemistrySolver<ChemistryModel>::noChemistrySolver
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
typename ChemistryModel::reactionThermo& thermo
|
||||
)
|
||||
:
|
||||
chemistrySolver<ChemistryModel>(mesh, phaseName)
|
||||
chemistrySolver<ChemistryModel>(thermo)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -61,8 +61,8 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh and phase name
|
||||
noChemistrySolver(const fvMesh& mesh, const word& phaseName);
|
||||
//- Construct from thermo
|
||||
noChemistrySolver(typename ChemistryModel::reactionThermo& thermo);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,13 +29,9 @@ License
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ChemistryModel>
|
||||
Foam::ode<ChemistryModel>::ode
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
Foam::ode<ChemistryModel>::ode(typename ChemistryModel::reactionThermo& thermo)
|
||||
:
|
||||
chemistrySolver<ChemistryModel>(mesh, phaseName),
|
||||
chemistrySolver<ChemistryModel>(thermo),
|
||||
coeffsDict_(this->subDict("odeCoeffs")),
|
||||
odeSolver_(ODESolver::New(*this, coeffsDict_)),
|
||||
cTp_(this->nEqns())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -70,8 +70,8 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh and phase name
|
||||
ode(const fvMesh& mesh, const word& phaseName);
|
||||
//- Construct from thermo
|
||||
ode(typename ChemistryModel::reactionThermo& thermo);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -32,19 +32,18 @@ License
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(basicSolidChemistryModel, 0);
|
||||
defineRunTimeSelectionTable(basicSolidChemistryModel, fvMesh);
|
||||
defineRunTimeSelectionTable(basicSolidChemistryModel, thermo);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicSolidChemistryModel::basicSolidChemistryModel
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
solidReactionThermo& thermo
|
||||
)
|
||||
:
|
||||
basicChemistryModel(mesh, phaseName),
|
||||
solidThermo_(solidReactionThermo::New(mesh, phaseName))
|
||||
basicChemistryModel(thermo),
|
||||
solidThermo_(thermo)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -72,8 +72,8 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Solid thermo package
|
||||
autoPtr<solidReactionThermo> solidThermo_;
|
||||
//- Solid thermo
|
||||
solidReactionThermo& solidThermo_;
|
||||
|
||||
|
||||
public:
|
||||
@ -82,29 +82,29 @@ public:
|
||||
TypeName("basicSolidChemistryModel");
|
||||
|
||||
|
||||
//- Thermo type
|
||||
typedef solidReactionThermo reactionThermo;
|
||||
|
||||
|
||||
//- Declare run-time constructor selection tables
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
basicSolidChemistryModel,
|
||||
fvMesh,
|
||||
(const fvMesh& mesh, const word& phaseName),
|
||||
(mesh, phaseName)
|
||||
thermo,
|
||||
(solidReactionThermo& thermo),
|
||||
(thermo)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh
|
||||
basicSolidChemistryModel(const fvMesh& mesh, const word& phaseName);
|
||||
//- Construct from thermo
|
||||
basicSolidChemistryModel(solidReactionThermo& thermo);
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<basicSolidChemistryModel> New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName=word::null
|
||||
);
|
||||
static autoPtr<basicSolidChemistryModel> New(solidReactionThermo& thermo);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,14 +27,14 @@ License
|
||||
|
||||
inline Foam::solidReactionThermo& Foam::basicSolidChemistryModel::solidThermo()
|
||||
{
|
||||
return solidThermo_();
|
||||
return solidThermo_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::solidReactionThermo&
|
||||
Foam::basicSolidChemistryModel::solidThermo() const
|
||||
{
|
||||
return solidThermo_();
|
||||
return solidThermo_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,20 +27,16 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::basicSolidChemistryModel> Foam::basicSolidChemistryModel::
|
||||
New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
Foam::autoPtr<Foam::basicSolidChemistryModel>
|
||||
Foam::basicSolidChemistryModel::New(solidReactionThermo& thermo)
|
||||
{
|
||||
IOdictionary chemistryDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("chemistryProperties", phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
thermo.phasePropertyName("chemistryProperties"),
|
||||
thermo.db().time().constant(),
|
||||
thermo.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
@ -77,8 +73,8 @@ New
|
||||
IOobject
|
||||
(
|
||||
basicThermo::dictName,
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
thermo.db().time().constant(),
|
||||
thermo.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
@ -116,10 +112,10 @@ New
|
||||
|
||||
Info<< "chemistryTypeName " << chemistryTypeName << endl;
|
||||
|
||||
fvMeshConstructorTable::iterator cstrIter =
|
||||
fvMeshConstructorTablePtr_->find(chemistryTypeName);
|
||||
thermoConstructorTable::iterator cstrIter =
|
||||
thermoConstructorTablePtr_->find(chemistryTypeName);
|
||||
|
||||
if (cstrIter == fvMeshConstructorTablePtr_->end())
|
||||
if (cstrIter == thermoConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown " << typeName << " type " << nl
|
||||
@ -130,7 +126,7 @@ New
|
||||
// Get the list of all the suitable chemistry packages available
|
||||
wordList validChemistryTypeNames
|
||||
(
|
||||
fvMeshConstructorTablePtr_->sortedToc()
|
||||
thermoConstructorTablePtr_->sortedToc()
|
||||
);
|
||||
Info<< validChemistryTypeNames << endl;
|
||||
|
||||
@ -164,7 +160,8 @@ New
|
||||
FatalError<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<basicSolidChemistryModel>(cstrIter()(mesh, phaseName));
|
||||
return
|
||||
autoPtr<basicSolidChemistryModel>(cstrIter()(thermo));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -33,11 +33,10 @@ template<class CompType, class SolidThermo, class GasThermo>
|
||||
Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::
|
||||
pyrolysisChemistryModel
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
typename CompType::reactionThermo& thermo
|
||||
)
|
||||
:
|
||||
solidChemistryModel<CompType, SolidThermo>(mesh, phaseName),
|
||||
solidChemistryModel<CompType, SolidThermo>(thermo),
|
||||
pyrolisisGases_(this->reactions_[0].gasSpecies()),
|
||||
gasThermo_(pyrolisisGases_.size()),
|
||||
nGases_(pyrolisisGases_.size()),
|
||||
@ -52,8 +51,8 @@ pyrolysisChemistryModel
|
||||
IOobject header
|
||||
(
|
||||
this->Ys_[fieldi].name() + "0",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ
|
||||
);
|
||||
|
||||
@ -68,12 +67,12 @@ pyrolysisChemistryModel
|
||||
IOobject
|
||||
(
|
||||
this->Ys_[fieldi].name() + "0",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
this->mesh()
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -84,12 +83,12 @@ pyrolysisChemistryModel
|
||||
IOobject
|
||||
(
|
||||
"Y0Default",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh
|
||||
this->mesh()
|
||||
);
|
||||
|
||||
Ys0_.set
|
||||
@ -100,8 +99,8 @@ pyrolysisChemistryModel
|
||||
IOobject
|
||||
(
|
||||
this->Ys_[fieldi].name() + "0",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
@ -112,7 +111,7 @@ pyrolysisChemistryModel
|
||||
// Calculate inital values of Ysi0 = rho*delta*Yi
|
||||
Ys0_[fieldi].primitiveFieldRef() =
|
||||
this->solidThermo().rho()
|
||||
*max(this->Ys_[fieldi], scalar(0.001))*mesh.V();
|
||||
*max(this->Ys_[fieldi], scalar(0.001))*this->mesh().V();
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,12 +125,12 @@ pyrolysisChemistryModel
|
||||
IOobject
|
||||
(
|
||||
"RRg." + pyrolisisGases_[fieldi],
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
@ -140,7 +139,7 @@ pyrolysisChemistryModel
|
||||
forAll(gasThermo_, gasI)
|
||||
{
|
||||
dictionary thermoDict =
|
||||
mesh.lookupObject<dictionary>
|
||||
this->mesh().template lookupObject<dictionary>
|
||||
(
|
||||
basicThermo::dictName
|
||||
).subDict(pyrolisisGases_[gasI]);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -105,8 +105,8 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh and phase name
|
||||
pyrolysisChemistryModel(const fvMesh& mesh, const word& phaseName);
|
||||
//- Construct from thermo
|
||||
pyrolysisChemistryModel(typename CompType::reactionThermo& thermo);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,14 +29,12 @@ License
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CompType, class SolidThermo>
|
||||
Foam::solidChemistryModel<CompType, SolidThermo>::
|
||||
solidChemistryModel
|
||||
Foam::solidChemistryModel<CompType, SolidThermo>::solidChemistryModel
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
typename CompType::reactionThermo& thermo
|
||||
)
|
||||
:
|
||||
CompType(mesh, phaseName),
|
||||
CompType(thermo),
|
||||
ODESystem(),
|
||||
Ys_(this->solidThermo().composition().Y()),
|
||||
reactions_
|
||||
@ -56,7 +54,7 @@ solidChemistryModel
|
||||
nSolids_(Ys_.size()),
|
||||
nReaction_(reactions_.size()),
|
||||
RRs_(nSolids_),
|
||||
reactingCells_(mesh.nCells(), true)
|
||||
reactingCells_(this->mesh().nCells(), true)
|
||||
{
|
||||
// create the fields for the chemistry sources
|
||||
forAll(RRs_, fieldi)
|
||||
@ -69,12 +67,12 @@ solidChemistryModel
|
||||
IOobject
|
||||
(
|
||||
"RRs." + Ys_[fieldi].name(),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -112,8 +112,8 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh and phase name
|
||||
solidChemistryModel(const fvMesh& mesh, const word& phaseName);
|
||||
//- Construct from thermo
|
||||
solidChemistryModel(typename CompType::reactionThermo& thermo);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -61,7 +61,7 @@ namespace Foam
|
||||
( \
|
||||
Comp, \
|
||||
SS##Schem##Comp##SThermo##GThermo, \
|
||||
fvMesh \
|
||||
thermo \
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user