combustionModels: Removed templating on the ThermoType
combustionModels now use the virtual functions provided by SpecieMixture to avoid the complexity in code and compilation of templating on the ThermoType. Additionally the models based on singleStepCombustion now use the concrete reaction base class to avoid the templating on ThermoType introduced by the Reaction type.
This commit is contained in:
@ -28,16 +28,24 @@ License
|
||||
#include "LESModel.H"
|
||||
#include "fvcGrad.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
defineTypeNameAndDebug(FSD, 0);
|
||||
addToRunTimeSelectionTable(combustionModel, FSD, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
FSD<ThermoType>::FSD
|
||||
Foam::combustionModels::FSD::FSD
|
||||
(
|
||||
const word& modelType,
|
||||
const fluidReactionThermo& thermo,
|
||||
@ -45,7 +53,7 @@ FSD<ThermoType>::FSD
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
singleStepCombustion<ThermoType>
|
||||
singleStepCombustion
|
||||
(
|
||||
modelType,
|
||||
thermo,
|
||||
@ -87,15 +95,13 @@ FSD<ThermoType>::FSD
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
FSD<ThermoType>::~FSD()
|
||||
Foam::combustionModels::FSD::~FSD()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
void FSD<ThermoType>::calculateSourceNorm()
|
||||
void Foam::combustionModels::FSD::calculateSourceNorm()
|
||||
{
|
||||
this->fresCorrect();
|
||||
|
||||
@ -309,8 +315,7 @@ void FSD<ThermoType>::calculateSourceNorm()
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
void FSD<ThermoType>::correct()
|
||||
void Foam::combustionModels::FSD::correct()
|
||||
{
|
||||
this->wFuel_ ==
|
||||
dimensionedScalar(dimMass/pow3(dimLength)/dimTime, 0);
|
||||
@ -319,10 +324,9 @@ void FSD<ThermoType>::correct()
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
bool FSD<ThermoType>::read()
|
||||
bool Foam::combustionModels::FSD::read()
|
||||
{
|
||||
if (singleStepCombustion<ThermoType>::read())
|
||||
if (singleStepCombustion::read())
|
||||
{
|
||||
this->coeffs().lookup("Cv") >> Cv_ ;
|
||||
this->coeffs().lookup("ftVarMin") >> ftVarMin_;
|
||||
@ -335,9 +339,5 @@ bool FSD<ThermoType>::read()
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -77,10 +77,9 @@ namespace combustionModels
|
||||
Class FSD Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ThermoType>
|
||||
class FSD
|
||||
:
|
||||
public singleStepCombustion<ThermoType>
|
||||
public singleStepCombustion
|
||||
{
|
||||
// Private Data
|
||||
|
||||
@ -169,12 +168,6 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "FSD.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "FSD.H"
|
||||
|
||||
#include "forCommonGases.H"
|
||||
#include "makeThermoCombustionModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
forCommonGases(makeThermoCombustionModel, FSD);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -3,9 +3,11 @@ combustionModel/combustionModelNew.C
|
||||
|
||||
chemistryCombustion/chemistryCombustion.C
|
||||
|
||||
diffusion/diffusions.C
|
||||
singleStepCombustion/singleStepCombustion.C
|
||||
|
||||
infinitelyFastChemistry/infinitelyFastChemistrys.C
|
||||
diffusion/diffusion.C
|
||||
|
||||
infinitelyFastChemistry/infinitelyFastChemistry.C
|
||||
|
||||
PaSR/PaSR.C
|
||||
|
||||
@ -17,7 +19,7 @@ FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C
|
||||
FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C
|
||||
FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C
|
||||
FSD/reactionRateFlameAreaModels/relaxation/relaxation.C
|
||||
FSD/FSDs.C
|
||||
FSD/FSD.C
|
||||
|
||||
zoneCombustion/zoneCombustion.C
|
||||
|
||||
@ -27,6 +29,6 @@ functionObjects/Qdot/Qdot.C
|
||||
|
||||
radiationModels/absorptionEmissionModels/greyMeanCombustion/greyMeanCombustion.C
|
||||
radiationModels/absorptionEmissionModels/wideBandCombustion/wideBandCombustion.C
|
||||
radiationModels/sootModels/mixtureFraction/mixtureFractions.C
|
||||
radiationModels/sootModels/mixtureFraction/mixtureFraction.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libcombustionModels
|
||||
|
||||
@ -25,16 +25,24 @@ License
|
||||
|
||||
#include "diffusion.H"
|
||||
#include "fvcGrad.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
defineTypeNameAndDebug(diffusion, 0);
|
||||
addToRunTimeSelectionTable(combustionModel, diffusion, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
diffusion<ThermoType>::diffusion
|
||||
Foam::combustionModels::diffusion::diffusion
|
||||
(
|
||||
const word& modelType,
|
||||
const fluidReactionThermo& thermo,
|
||||
@ -42,7 +50,7 @@ diffusion<ThermoType>::diffusion
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
singleStepCombustion<ThermoType>
|
||||
singleStepCombustion
|
||||
(
|
||||
modelType,
|
||||
thermo,
|
||||
@ -56,15 +64,13 @@ diffusion<ThermoType>::diffusion
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
diffusion<ThermoType>::~diffusion()
|
||||
Foam::combustionModels::diffusion::~diffusion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
void diffusion<ThermoType>::correct()
|
||||
void Foam::combustionModels::diffusion::correct()
|
||||
{
|
||||
this->wFuel_ ==
|
||||
dimensionedScalar(dimMass/pow3(dimLength)/dimTime, 0);
|
||||
@ -88,10 +94,9 @@ void diffusion<ThermoType>::correct()
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
bool diffusion<ThermoType>::read()
|
||||
bool Foam::combustionModels::diffusion::read()
|
||||
{
|
||||
if (singleStepCombustion<ThermoType>::read())
|
||||
if (singleStepCombustion::read())
|
||||
{
|
||||
this->coeffs().lookup("C") >> C_ ;
|
||||
this->coeffs().readIfPresent("oxidant", oxidantName_);
|
||||
@ -104,9 +109,4 @@ bool diffusion<ThermoType>::read()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -50,10 +50,9 @@ namespace combustionModels
|
||||
Class diffusion Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ThermoType>
|
||||
class diffusion
|
||||
:
|
||||
public singleStepCombustion<ThermoType>
|
||||
public singleStepCombustion
|
||||
{
|
||||
// Private Data
|
||||
|
||||
@ -110,13 +109,6 @@ public:
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "diffusion.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "diffusion.H"
|
||||
|
||||
#include "forCommonGases.H"
|
||||
#include "makeThermoCombustionModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
forCommonGases(makeThermoCombustionModel, diffusion);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -24,16 +24,29 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "infinitelyFastChemistry.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
defineTypeNameAndDebug(infinitelyFastChemistry, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
combustionModel,
|
||||
infinitelyFastChemistry,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
infinitelyFastChemistry<ThermoType>::infinitelyFastChemistry
|
||||
Foam::combustionModels::infinitelyFastChemistry::infinitelyFastChemistry
|
||||
(
|
||||
const word& modelType,
|
||||
const fluidReactionThermo& thermo,
|
||||
@ -41,7 +54,7 @@ infinitelyFastChemistry<ThermoType>::infinitelyFastChemistry
|
||||
const word& combustionProperties
|
||||
)
|
||||
:
|
||||
singleStepCombustion<ThermoType>
|
||||
singleStepCombustion
|
||||
(
|
||||
modelType,
|
||||
thermo,
|
||||
@ -54,15 +67,13 @@ infinitelyFastChemistry<ThermoType>::infinitelyFastChemistry
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
infinitelyFastChemistry<ThermoType>::~infinitelyFastChemistry()
|
||||
Foam::combustionModels::infinitelyFastChemistry::~infinitelyFastChemistry()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
void infinitelyFastChemistry<ThermoType>::correct()
|
||||
void Foam::combustionModels::infinitelyFastChemistry::correct()
|
||||
{
|
||||
this->wFuel_ ==
|
||||
dimensionedScalar(dimMass/pow3(dimLength)/dimTime, 0);
|
||||
@ -86,10 +97,9 @@ void infinitelyFastChemistry<ThermoType>::correct()
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
bool infinitelyFastChemistry<ThermoType>::read()
|
||||
bool Foam::combustionModels::infinitelyFastChemistry::read()
|
||||
{
|
||||
if (singleStepCombustion<ThermoType>::read())
|
||||
if (singleStepCombustion::read())
|
||||
{
|
||||
this->coeffs().lookup("C") >> C_ ;
|
||||
return true;
|
||||
@ -101,9 +111,4 @@ bool infinitelyFastChemistry<ThermoType>::read()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -50,10 +50,9 @@ namespace combustionModels
|
||||
Class infinitelyFastChemistry Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ThermoType>
|
||||
class infinitelyFastChemistry
|
||||
:
|
||||
public singleStepCombustion<ThermoType>
|
||||
public singleStepCombustion
|
||||
{
|
||||
// Private Data
|
||||
|
||||
@ -107,13 +106,6 @@ public:
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "infinitelyFastChemistry.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "infinitelyFastChemistry.H"
|
||||
|
||||
#include "forCommonGases.H"
|
||||
#include "makeThermoCombustionModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
forCommonGases(makeThermoCombustionModel, infinitelyFastChemistry);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -25,11 +25,33 @@ License
|
||||
|
||||
#include "mixtureFraction.H"
|
||||
#include "singleStepCombustion.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace radiationModels
|
||||
{
|
||||
namespace sootModels
|
||||
{
|
||||
defineTypeNameAndDebug(mixtureFraction, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
sootModel,
|
||||
mixtureFraction,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
Foam::radiationModels::sootModels::mixtureFraction<ThermoType>::mixtureFraction
|
||||
Foam::radiationModels::sootModels::mixtureFraction::mixtureFraction
|
||||
(
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh,
|
||||
@ -59,8 +81,8 @@ Foam::radiationModels::sootModels::mixtureFraction<ThermoType>::mixtureFraction
|
||||
),
|
||||
mapFieldMax_(1)
|
||||
{
|
||||
const combustionModels::singleStepCombustion<ThermoType>& combustion =
|
||||
mesh.lookupObject<combustionModels::singleStepCombustion<ThermoType>>
|
||||
const combustionModels::singleStepCombustion& combustion =
|
||||
mesh.lookupObject<combustionModels::singleStepCombustion>
|
||||
(
|
||||
combustionModel::combustionPropertiesName
|
||||
);
|
||||
@ -118,16 +140,13 @@ Foam::radiationModels::sootModels::mixtureFraction<ThermoType>::mixtureFraction
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
Foam::radiationModels::sootModels::mixtureFraction<ThermoType>::
|
||||
~mixtureFraction()
|
||||
Foam::radiationModels::sootModels::mixtureFraction::~mixtureFraction()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
void Foam::radiationModels::sootModels::mixtureFraction<ThermoType>::correct()
|
||||
void Foam::radiationModels::sootModels::mixtureFraction::correct()
|
||||
{
|
||||
const volScalarField& mapField =
|
||||
mesh_.lookupObject<volScalarField>(mappingFieldName_);
|
||||
@ -136,4 +155,4 @@ void Foam::radiationModels::sootModels::mixtureFraction<ThermoType>::correct()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -73,7 +73,6 @@ namespace sootModels
|
||||
Class mixtureFraction Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ThermoType>
|
||||
class mixtureFraction
|
||||
:
|
||||
public sootModel
|
||||
@ -148,12 +147,6 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "mixtureFraction.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "mixtureFraction.H"
|
||||
|
||||
#include "forCommonGases.H"
|
||||
#include "makeThermoSootModel.H"
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
forCommonGases(makeThermoSootModel, mixtureFraction);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -26,17 +26,10 @@ License
|
||||
#include "singleStepCombustion.H"
|
||||
#include "fvmSup.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
void singleStepCombustion<ThermoType>::calculateqFuel()
|
||||
void Foam::combustionModels::singleStepCombustion::calculateqFuel()
|
||||
{
|
||||
const scalar Wu = mixture_.Wi(fuelIndex_);
|
||||
|
||||
@ -63,8 +56,7 @@ void singleStepCombustion<ThermoType>::calculateqFuel()
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
void singleStepCombustion<ThermoType>::massAndAirStoichRatios()
|
||||
void Foam::combustionModels::singleStepCombustion::massAndAirStoichRatios()
|
||||
{
|
||||
const label O2Index = mixture_.species()["O2"];
|
||||
const scalar Wu = mixture_.Wi(fuelIndex_);
|
||||
@ -84,8 +76,7 @@ void singleStepCombustion<ThermoType>::massAndAirStoichRatios()
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
void singleStepCombustion<ThermoType>::calculateMaxProducts()
|
||||
void Foam::combustionModels::singleStepCombustion::calculateMaxProducts()
|
||||
{
|
||||
scalar Wm = 0.0;
|
||||
scalar totalMol = 0.0;
|
||||
@ -131,8 +122,7 @@ void singleStepCombustion<ThermoType>::calculateMaxProducts()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
singleStepCombustion<ThermoType>::singleStepCombustion
|
||||
Foam::combustionModels::singleStepCombustion::singleStepCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fluidReactionThermo& thermo,
|
||||
@ -206,18 +196,14 @@ singleStepCombustion<ThermoType>::singleStepCombustion
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
singleStepCombustion<ThermoType>::~singleStepCombustion()
|
||||
Foam::combustionModels::singleStepCombustion::~singleStepCombustion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
tmp<fvScalarMatrix> singleStepCombustion<ThermoType>::R
|
||||
(
|
||||
volScalarField& Y
|
||||
) const
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::combustionModels::singleStepCombustion::R(volScalarField& Y) const
|
||||
{
|
||||
const label specieI = mixture_.species()[Y.member()];
|
||||
|
||||
@ -241,9 +227,8 @@ tmp<fvScalarMatrix> singleStepCombustion<ThermoType>::R
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
tmp<volScalarField>
|
||||
singleStepCombustion<ThermoType>::Qdot() const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::singleStepCombustion::Qdot() const
|
||||
{
|
||||
const label fuelI = fuelIndex();
|
||||
volScalarField& YFuel =
|
||||
@ -253,8 +238,7 @@ singleStepCombustion<ThermoType>::Qdot() const
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
bool singleStepCombustion<ThermoType>::read()
|
||||
bool Foam::combustionModels::singleStepCombustion::read()
|
||||
{
|
||||
if (combustionModel::read())
|
||||
{
|
||||
@ -267,8 +251,7 @@ bool singleStepCombustion<ThermoType>::read()
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
void singleStepCombustion<ThermoType>::fresCorrect()
|
||||
void Foam::combustionModels::singleStepCombustion::fresCorrect()
|
||||
{
|
||||
const label O2Index = mixture_.species()["O2"];
|
||||
const volScalarField& YFuel = mixture_.Y()[fuelIndex_];
|
||||
@ -320,9 +303,4 @@ void singleStepCombustion<ThermoType>::fresCorrect()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -50,7 +50,6 @@ namespace combustionModels
|
||||
Class singleStepCombustion Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ThermoType>
|
||||
class singleStepCombustion
|
||||
:
|
||||
public combustionModel
|
||||
@ -195,12 +194,6 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "singleStepCombustion.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -34,54 +34,43 @@ namespace combustionModels
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
const Foam::basicSpecieMixture&
|
||||
singleStepCombustion<ThermoType>::mixture() const
|
||||
inline const Foam::basicSpecieMixture& singleStepCombustion::mixture() const
|
||||
{
|
||||
return mixture_;
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
inline const Foam::reaction&
|
||||
singleStepCombustion<ThermoType>::singleReaction() const
|
||||
inline const Foam::reaction& singleStepCombustion::singleReaction() const
|
||||
{
|
||||
return reaction_;
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
inline const dimensionedScalar&
|
||||
singleStepCombustion<ThermoType>::stoicRatio() const
|
||||
inline const dimensionedScalar& singleStepCombustion::stoicRatio() const
|
||||
{
|
||||
return stoicRatio_;
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
inline const dimensionedScalar& singleStepCombustion<ThermoType>::s() const
|
||||
inline const dimensionedScalar& singleStepCombustion::s() const
|
||||
{
|
||||
return s_;
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
inline const dimensionedScalar& singleStepCombustion<ThermoType>::qFuel() const
|
||||
inline const dimensionedScalar& singleStepCombustion::qFuel() const
|
||||
{
|
||||
return qFuel_;
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
inline const List<scalar>&
|
||||
singleStepCombustion<ThermoType>::specieStoichCoeffs() const
|
||||
inline const List<scalar>& singleStepCombustion::specieStoichCoeffs() const
|
||||
{
|
||||
return specieStoichCoeffs_;
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
inline tmp<volScalarField> singleStepCombustion<ThermoType>::fres
|
||||
inline tmp<volScalarField> singleStepCombustion::fres
|
||||
(
|
||||
const label index
|
||||
) const
|
||||
@ -90,22 +79,19 @@ inline tmp<volScalarField> singleStepCombustion<ThermoType>::fres
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
inline label singleStepCombustion<ThermoType>::fuelIndex() const
|
||||
inline label singleStepCombustion::fuelIndex() const
|
||||
{
|
||||
return fuelIndex_;
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
inline const List<int>& singleStepCombustion<ThermoType>::specieProd() const
|
||||
inline const List<int>& singleStepCombustion::specieProd() const
|
||||
{
|
||||
return specieProd_;
|
||||
}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
inline const scalarList& singleStepCombustion<ThermoType>::Yprod0() const
|
||||
inline const scalarList& singleStepCombustion::Yprod0() const
|
||||
{
|
||||
return Yprod0_;
|
||||
}
|
||||
|
||||
@ -203,6 +203,9 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the name of the reaction
|
||||
using reaction::name;
|
||||
|
||||
//- Return the lower temperature limit for the reaction
|
||||
inline scalar Tlow() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user