remove unecessary combustionModel selection
This commit is contained in:
parent
2a4a3b1f3e
commit
79b8be5597
56 changed files with 8 additions and 5515 deletions
|
|
@ -5,7 +5,6 @@ targetType=libso
|
|||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
wmake $targetType chemistryModel_POSTECH
|
||||
wmake $targetType combustionModels_POSTECH
|
||||
wmake $targetType thermos
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,370 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "FSD.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "LESModel.H"
|
||||
#include "fvcGrad.H"
|
||||
#include "fvcDiv.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
FSD<CombThermoType, ThermoType>::FSD
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
singleStepCombustion<CombThermoType, ThermoType>
|
||||
(
|
||||
modelType,
|
||||
mesh,
|
||||
phaseName
|
||||
),
|
||||
reactionRateFlameArea_
|
||||
(
|
||||
reactionRateFlameArea::New
|
||||
(
|
||||
this->coeffs(),
|
||||
this->mesh(),
|
||||
*this
|
||||
)
|
||||
),
|
||||
ft_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("ft", phaseName),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimless, 0.0)
|
||||
),
|
||||
YFuelFuelStream_(dimensionedScalar("YFuelStream", dimless, 1.0)),
|
||||
YO2OxiStream_(dimensionedScalar("YOxiStream", dimless, 0.23)),
|
||||
Cv_(readScalar(this->coeffs().lookup("Cv"))),
|
||||
C_(5.0),
|
||||
ftMin_(0.0),
|
||||
ftMax_(1.0),
|
||||
ftDim_(300),
|
||||
ftVarMin_(readScalar(this->coeffs().lookup("ftVarMin")))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
FSD<CombThermoType, ThermoType>::~FSD()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
|
||||
{
|
||||
this->singleMixturePtr_->fresCorrect();
|
||||
|
||||
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||
|
||||
const volScalarField& YFuel = this->thermoPtr_->composition().Y()[fuelI];
|
||||
|
||||
const volScalarField& YO2 = this->thermoPtr_->composition().Y("O2");
|
||||
|
||||
const dimensionedScalar s = this->singleMixturePtr_->s();
|
||||
|
||||
ft_ =
|
||||
(s*YFuel - (YO2 - YO2OxiStream_))/(s*YFuelFuelStream_ + YO2OxiStream_);
|
||||
|
||||
|
||||
volVectorField nft(fvc::grad(ft_));
|
||||
|
||||
volScalarField mgft(mag(nft));
|
||||
|
||||
surfaceVectorField SfHat(this->mesh().Sf()/this->mesh().magSf());
|
||||
|
||||
volScalarField cAux(scalar(1) - ft_);
|
||||
|
||||
dimensionedScalar dMgft = 1.0e-3*
|
||||
(ft_*cAux*mgft)().weightedAverage(this->mesh().V())
|
||||
/((ft_*cAux)().weightedAverage(this->mesh().V()) + SMALL)
|
||||
+ dimensionedScalar("ddMgft", mgft.dimensions(), SMALL);
|
||||
|
||||
mgft += dMgft;
|
||||
|
||||
nft /= mgft;
|
||||
|
||||
const volVectorField& U = YO2.db().lookupObject<volVectorField>("U");
|
||||
|
||||
const volScalarField sigma
|
||||
(
|
||||
(nft & nft)*fvc::div(U) - (nft & fvc::grad(U) & nft)
|
||||
);
|
||||
|
||||
reactionRateFlameArea_->correct(sigma);
|
||||
|
||||
const volScalarField& omegaFuel = reactionRateFlameArea_->omega();
|
||||
|
||||
|
||||
const scalar ftStoich =
|
||||
YO2OxiStream_.value()
|
||||
/(
|
||||
s.value()*YFuelFuelStream_.value() + YO2OxiStream_.value()
|
||||
);
|
||||
|
||||
tmp<volScalarField> tPc
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("Pc", this->phaseName_),
|
||||
U.time().timeName(),
|
||||
U.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U.mesh(),
|
||||
dimensionedScalar("Pc", dimless, 0)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& pc = tPc.ref();
|
||||
|
||||
tmp<volScalarField> tomegaFuel
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("omegaFuelBar", this->phaseName_),
|
||||
U.time().timeName(),
|
||||
U.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U.mesh(),
|
||||
dimensionedScalar
|
||||
(
|
||||
"omegaFuelBar",
|
||||
omegaFuel.dimensions(),
|
||||
0
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& omegaFuelBar = tomegaFuel.ref();
|
||||
|
||||
// Calculation of the mixture fraction variance (ftVar)
|
||||
const compressible::LESModel& lesModel =
|
||||
YO2.db().lookupObject<compressible::LESModel>
|
||||
(
|
||||
turbulenceModel::propertiesName
|
||||
);
|
||||
|
||||
const volScalarField& delta = lesModel.delta();
|
||||
const volScalarField ftVar(Cv_*sqr(delta)*sqr(mgft));
|
||||
|
||||
// Thickened flame (average flame thickness for counterflow configuration
|
||||
// is 1.5 mm)
|
||||
|
||||
volScalarField deltaF
|
||||
(
|
||||
lesModel.delta()/dimensionedScalar("flame", dimLength, 1.5e-3)
|
||||
);
|
||||
|
||||
// Linear correlation between delta and flame thickness
|
||||
volScalarField omegaF(max(deltaF*(4.0/3.0) + (2.0/3.0), scalar(1)));
|
||||
|
||||
scalar deltaFt = 1.0/ftDim_;
|
||||
|
||||
forAll(ft_, celli)
|
||||
{
|
||||
if (ft_[celli] > ftMin_ && ft_[celli] < ftMax_)
|
||||
{
|
||||
scalar ftCell = ft_[celli];
|
||||
|
||||
if (ftVar[celli] > ftVarMin_) //sub-grid beta pdf of ft_
|
||||
{
|
||||
scalar ftVarc = ftVar[celli];
|
||||
scalar a =
|
||||
max(ftCell*(ftCell*(1.0 - ftCell)/ftVarc - 1.0), 0.0);
|
||||
scalar b = max(a/ftCell - a, 0.0);
|
||||
|
||||
for (int i=1; i<ftDim_; i++)
|
||||
{
|
||||
scalar ft = i*deltaFt;
|
||||
pc[celli] += pow(ft, a-1.0)*pow(1.0 - ft, b - 1.0)*deltaFt;
|
||||
}
|
||||
|
||||
for (int i=1; i<ftDim_; i++)
|
||||
{
|
||||
scalar ft = i*deltaFt;
|
||||
omegaFuelBar[celli] +=
|
||||
omegaFuel[celli]/omegaF[celli]
|
||||
*exp
|
||||
(
|
||||
-sqr(ft - ftStoich)
|
||||
/(2.0*sqr(0.01*omegaF[celli]))
|
||||
)
|
||||
*pow(ft, a - 1.0)
|
||||
*pow(1.0 - ft, b - 1.0)
|
||||
*deltaFt;
|
||||
}
|
||||
omegaFuelBar[celli] /= max(pc[celli], 1e-4);
|
||||
}
|
||||
else
|
||||
{
|
||||
omegaFuelBar[celli] =
|
||||
omegaFuel[celli]/omegaF[celli]
|
||||
*exp(-sqr(ftCell - ftStoich)/(2.0*sqr(0.01*omegaF[celli])));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
omegaFuelBar[celli] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Combustion progress variable, c
|
||||
|
||||
List<label> productsIndex(2, label(-1));
|
||||
{
|
||||
label i = 0;
|
||||
forAll(this->singleMixturePtr_->specieProd(), specieI)
|
||||
{
|
||||
if (this->singleMixturePtr_->specieProd()[specieI] < 0)
|
||||
{
|
||||
productsIndex[i] = specieI;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Flamelet probability of the progress c based on IFC (reuse pc)
|
||||
scalar YprodTotal = 0;
|
||||
forAll(productsIndex, j)
|
||||
{
|
||||
YprodTotal += this->singleMixturePtr_->Yprod0()[productsIndex[j]];
|
||||
}
|
||||
|
||||
forAll(ft_, celli)
|
||||
{
|
||||
if (ft_[celli] < ftStoich)
|
||||
{
|
||||
pc[celli] = ft_[celli]*(YprodTotal/ftStoich);
|
||||
}
|
||||
else
|
||||
{
|
||||
pc[celli] = (1.0 - ft_[celli])*(YprodTotal/(1.0 - ftStoich));
|
||||
}
|
||||
}
|
||||
|
||||
tmp<volScalarField> tproducts
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("products", this->phaseName_),
|
||||
U.time().timeName(),
|
||||
U.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U.mesh(),
|
||||
dimensionedScalar("products", dimless, 0)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& products = tproducts.ref();
|
||||
|
||||
forAll(productsIndex, j)
|
||||
{
|
||||
label specieI = productsIndex[j];
|
||||
const volScalarField& Yp = this->thermoPtr_->composition().Y()[specieI];
|
||||
products += Yp;
|
||||
}
|
||||
|
||||
volScalarField c
|
||||
(
|
||||
max(scalar(1) - products/max(pc, scalar(1e-5)), scalar(0))
|
||||
);
|
||||
|
||||
pc = min(C_*c, scalar(1));
|
||||
|
||||
const volScalarField fres(this->singleMixturePtr_->fres(fuelI));
|
||||
|
||||
this->wFuel_ == mgft*pc*omegaFuelBar;
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
void FSD<CombThermoType, ThermoType>::correct()
|
||||
{
|
||||
this->wFuel_ ==
|
||||
dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
calculateSourceNorm();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
bool FSD<CombThermoType, ThermoType>::read()
|
||||
{
|
||||
if (singleStepCombustion<CombThermoType, ThermoType>::read())
|
||||
{
|
||||
this->coeffs().lookup("Cv") >> Cv_ ;
|
||||
this->coeffs().lookup("ftVarMin") >> ftVarMin_;
|
||||
reactionRateFlameArea_->read(this->coeffs());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
@ -1,174 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::combustionModels::FSD
|
||||
|
||||
Description
|
||||
|
||||
Flame Surface Dennsity (FDS) combustion model.
|
||||
|
||||
The fuel source term is given by mgft*pc*omegaFuelBar.
|
||||
|
||||
where:
|
||||
mgft: filtered flame area.
|
||||
pc: probability of the combustion progress.
|
||||
omegaFuelBar: filtered consumption speed per unit of flame area.
|
||||
|
||||
pc is considered from the IFC solution.
|
||||
omegaFuelBar is calculated solving a relaxation equation which tends to
|
||||
omegaEq. This omegaEq is obtained from the flamelet solution for
|
||||
different strain rates and fit using a expential distribution.
|
||||
|
||||
The spacial distribution of the consumption speed (omega) is obtained also
|
||||
from a strained flamelet solution and it is assumed to have a guassian
|
||||
distribution.
|
||||
|
||||
If the grid resolution is not enough to resolve the flame, the consumption
|
||||
speed distribution is linearly thickened conserving the overall heat
|
||||
release.
|
||||
|
||||
If the turbulent fluctuation of the mixture fraction at the sub-grid level
|
||||
is large (>1e-04) then a beta pdf is used for filtering.
|
||||
|
||||
At the moment the flame area combustion model is only fit to work in a LES
|
||||
frame work. In RAS the subgrid fluctuation has to be solved by an extra
|
||||
transport equation.
|
||||
|
||||
SourceFiles
|
||||
FSD.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef FSD_H
|
||||
#define FSD_H
|
||||
|
||||
#include "singleStepCombustion.H"
|
||||
#include "reactionRateFlameArea.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class FSD Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
class FSD
|
||||
:
|
||||
public singleStepCombustion <CombThermoType, ThermoType>
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Auto pointer to consumption speed per unit of flame area model
|
||||
autoPtr<reactionRateFlameArea> reactionRateFlameArea_;
|
||||
|
||||
//- Mixture fraction
|
||||
volScalarField ft_;
|
||||
|
||||
//- Fuel mass concentration on the fuel stream
|
||||
dimensionedScalar YFuelFuelStream_;
|
||||
|
||||
//- Oxygen mass concentration on the oxydizer stream
|
||||
dimensionedScalar YO2OxiStream_;
|
||||
|
||||
//- Similarity constant for the sub-grid ft fluctuations
|
||||
scalar Cv_;
|
||||
|
||||
//- Model constant
|
||||
scalar C_;
|
||||
|
||||
//- Lower flammability limit
|
||||
scalar ftMin_;
|
||||
|
||||
//- Upper flammability limit
|
||||
scalar ftMax_;
|
||||
|
||||
//- Dimension of the ft space. Used to integrate the beta-pdf
|
||||
scalar ftDim_;
|
||||
|
||||
//- Minimum mixture freaction variance to calculate pdf
|
||||
scalar ftVarMin_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Calculate the normalised fuel source term
|
||||
void calculateSourceNorm();
|
||||
|
||||
//- Disallow copy construct
|
||||
FSD(const FSD&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const FSD&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("FSD");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
FSD(const word& modelType, const fvMesh& mesh, const word& phaseName);
|
||||
|
||||
|
||||
// Destructor
|
||||
virtual ~FSD();
|
||||
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct combustion rate
|
||||
virtual void correct();
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "FSD.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "makeCombustionTypes.H"
|
||||
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "psiCombustionModel.H"
|
||||
#include "psiThermoCombustion.H"
|
||||
#include "rhoCombustionModel.H"
|
||||
#include "rhoThermoCombustion.H"
|
||||
#include "FSD.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Combustion models based on sensibleEnthalpy
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
FSD,
|
||||
psiThermoCombustion,
|
||||
gasHThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
FSD,
|
||||
psiThermoCombustion,
|
||||
constGasHThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
FSD,
|
||||
rhoThermoCombustion,
|
||||
gasHThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
FSD,
|
||||
rhoThermoCombustion,
|
||||
constGasHThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
// Combustion models based on sensibleInternalEnergy
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
FSD,
|
||||
psiThermoCombustion,
|
||||
gasEThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
FSD,
|
||||
psiThermoCombustion,
|
||||
constGasEThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
FSD,
|
||||
rhoThermoCombustion,
|
||||
gasEThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
FSD,
|
||||
rhoThermoCombustion,
|
||||
constGasEThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "consumptionSpeed.H"
|
||||
|
||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(consumptionSpeed, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::consumptionSpeed::consumptionSpeed
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
: omega0_(readScalar(dict.lookup("omega0"))),
|
||||
eta_(readScalar(dict.lookup("eta"))),
|
||||
sigmaExt_(readScalar(dict.lookup("sigmaExt"))),
|
||||
omegaMin_(readScalar(dict.lookup("omegaMin")))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::consumptionSpeed::~consumptionSpeed()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::consumptionSpeed::omega0Sigma
|
||||
(
|
||||
scalar sigma,
|
||||
scalar a
|
||||
) const
|
||||
{
|
||||
scalar omega0 = 0.0;
|
||||
|
||||
if (sigma < sigmaExt_)
|
||||
{
|
||||
omega0 = max
|
||||
(
|
||||
a*omega0_*(1.0 - exp(eta_*max(sigma, 0.0))),
|
||||
omegaMin_
|
||||
) ;
|
||||
}
|
||||
|
||||
return omega0;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::consumptionSpeed::omega0Sigma
|
||||
(
|
||||
const volScalarField& sigma
|
||||
)
|
||||
{
|
||||
tmp<volScalarField> tomega0
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"omega0",
|
||||
sigma.time().timeName(),
|
||||
sigma.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
sigma.mesh(),
|
||||
dimensionedScalar
|
||||
(
|
||||
"omega0",
|
||||
dimensionSet(1, -2, -1, 0, 0, 0, 0),
|
||||
0
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& omega0 = tomega0.ref();
|
||||
|
||||
volScalarField::Internal& iomega0 = omega0;
|
||||
|
||||
forAll(iomega0, celli)
|
||||
{
|
||||
iomega0[celli] = omega0Sigma(sigma[celli], 1.0);
|
||||
}
|
||||
|
||||
volScalarField::Boundary& bomega0 = omega0.boundaryFieldRef();
|
||||
|
||||
forAll(bomega0, patchi)
|
||||
{
|
||||
forAll(bomega0[patchi], facei)
|
||||
{
|
||||
bomega0[patchi][facei] =
|
||||
omega0Sigma
|
||||
(
|
||||
sigma.boundaryField()[patchi][facei],
|
||||
1.0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return tomega0;
|
||||
}
|
||||
|
||||
|
||||
void Foam::consumptionSpeed::read(const dictionary& dict)
|
||||
{
|
||||
dict.lookup("omega0") >> omega0_ ;
|
||||
dict.lookup("eta") >> eta_ ;
|
||||
dict.lookup("sigmaExt") >> sigmaExt_;
|
||||
dict.lookup("omegaMin") >> omegaMin_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,139 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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/>.
|
||||
|
||||
Class
|
||||
Foam::reactionRateFlameAreaModels::consumptionSpeed
|
||||
|
||||
Description
|
||||
Correlation function for laminar consumption speed obtained from flamelet
|
||||
solution at increasing strain rates.
|
||||
|
||||
SourceFiles
|
||||
consumptionSpeed.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef consumptionSpeed_H
|
||||
#define consumptionSpeed_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "volFields.H"
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class consumptionSpeed Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class consumptionSpeed
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Maximum consumption speed
|
||||
scalar omega0_;
|
||||
|
||||
//- Exponential factor
|
||||
scalar eta_;
|
||||
|
||||
//- Extinction strain
|
||||
scalar sigmaExt_;
|
||||
|
||||
//- Minimum consumption speed
|
||||
scalar omegaMin_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Return consumption rate
|
||||
scalar omega0Sigma(scalar sigma, scalar a) const;
|
||||
|
||||
//- Disallow copy construct
|
||||
consumptionSpeed(const consumptionSpeed&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const consumptionSpeed&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("consumptionSpeed");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary
|
||||
consumptionSpeed(const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~consumptionSpeed();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return speed consumption rate temp
|
||||
tmp<volScalarField> omega0Sigma(const volScalarField& sigma);
|
||||
|
||||
|
||||
// Access functions
|
||||
|
||||
scalar omega0() const
|
||||
{
|
||||
return omega0_;
|
||||
}
|
||||
|
||||
scalar eta() const
|
||||
{
|
||||
return eta_;
|
||||
}
|
||||
|
||||
scalar sigmaExt() const
|
||||
{
|
||||
return sigmaExt_;
|
||||
}
|
||||
|
||||
scalar omegaMin() const
|
||||
{
|
||||
return omegaMin_;
|
||||
}
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties
|
||||
void read(const dictionary& dict);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "reactionRateFlameArea.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(reactionRateFlameArea, 0);
|
||||
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::reactionRateFlameArea::reactionRateFlameArea
|
||||
(
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh,
|
||||
const combustionModel& combModel
|
||||
)
|
||||
:
|
||||
coeffDict_(dictionary::null),
|
||||
mesh_(mesh),
|
||||
combModel_(combModel),
|
||||
fuel_(dict.lookup("fuel")),
|
||||
omega_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"omega",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh_
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::reactionRateFlameArea::reactionRateFlameArea
|
||||
(
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh,
|
||||
const combustionModel& combModel
|
||||
)
|
||||
:
|
||||
coeffDict_(dict.subDict(modelType + "Coeffs")),
|
||||
mesh_(mesh),
|
||||
combModel_(combModel),
|
||||
fuel_(dict.lookup("fuel")),
|
||||
omega_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"omega",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh_
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::reactionRateFlameArea::~reactionRateFlameArea()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::reactionRateFlameArea::read(const dictionary& dict)
|
||||
{
|
||||
dict.lookup("fuel") >> fuel_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,175 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 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/>.
|
||||
|
||||
Class
|
||||
Foam::reactionRateFlameArea
|
||||
|
||||
Description
|
||||
Abstract class for reaction rate per flame area unit
|
||||
|
||||
SourceFiles
|
||||
reactionRateFlameArea.C
|
||||
reactionRateFlameAreaNew.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef reactionRateFlameArea_H
|
||||
#define reactionRateFlameArea_H
|
||||
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "dictionary.H"
|
||||
#include "autoPtr.H"
|
||||
#include "volFields.H"
|
||||
#include "combustionModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
class fvMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class reactionRateFlameArea Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class reactionRateFlameArea
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Dictionary
|
||||
dictionary coeffDict_;
|
||||
|
||||
//- Mesh reference
|
||||
const fvMesh& mesh_;
|
||||
|
||||
//- Combstion model owner
|
||||
const combustionModel& combModel_;
|
||||
|
||||
//- Fuel name
|
||||
word fuel_;
|
||||
|
||||
//- Fuel consumption rate per unit of flame area
|
||||
volScalarField omega_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow copy construct
|
||||
reactionRateFlameArea(const reactionRateFlameArea&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const reactionRateFlameArea&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("reactionRateFlameArea");
|
||||
|
||||
|
||||
// Declare run-time constructor selection table
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
reactionRateFlameArea,
|
||||
dictionary,
|
||||
(
|
||||
const word modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh,
|
||||
const combustionModel& combModel
|
||||
),
|
||||
(modelType, dict, mesh, combModel)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary and psiReactionThermo
|
||||
reactionRateFlameArea
|
||||
(
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh,
|
||||
const combustionModel& combModel
|
||||
);
|
||||
|
||||
//- Construct from components
|
||||
reactionRateFlameArea
|
||||
(
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh,
|
||||
const combustionModel& combModel
|
||||
);
|
||||
|
||||
|
||||
// Selector
|
||||
|
||||
static autoPtr<reactionRateFlameArea> New
|
||||
(
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh,
|
||||
const combustionModel& combModel
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~reactionRateFlameArea();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Access functions
|
||||
|
||||
//- Return omega
|
||||
const volScalarField& omega() const
|
||||
{
|
||||
return omega_;
|
||||
}
|
||||
|
||||
|
||||
//- Correct omega
|
||||
virtual void correct(const volScalarField& sigma) = 0;
|
||||
|
||||
//- Update from dictionary
|
||||
virtual bool read(const dictionary& dictProperties);
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "reactionRateFlameArea.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::reactionRateFlameArea> Foam::reactionRateFlameArea::New
|
||||
(
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh,
|
||||
const combustionModel& combModel
|
||||
)
|
||||
{
|
||||
word reactionRateFlameAreaType
|
||||
(
|
||||
dict.lookup("reactionRateFlameArea")
|
||||
);
|
||||
|
||||
Info<< "Selecting reaction rate flame area correlation "
|
||||
<< reactionRateFlameAreaType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(reactionRateFlameAreaType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
dict
|
||||
) << "Unknown reactionRateFlameArea type "
|
||||
<< reactionRateFlameAreaType << endl << endl
|
||||
<< "Valid reaction rate flame area types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
const label tempOpen = reactionRateFlameAreaType.find('<');
|
||||
|
||||
const word className = reactionRateFlameAreaType(0, tempOpen);
|
||||
|
||||
return autoPtr<reactionRateFlameArea>
|
||||
(cstrIter()(className, dict, mesh, combModel));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,165 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "relaxation.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvm.H"
|
||||
#include "LESModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace reactionRateFlameAreaModels
|
||||
{
|
||||
defineTypeNameAndDebug(relaxation, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
reactionRateFlameArea,
|
||||
relaxation,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::reactionRateFlameAreaModels::relaxation::relaxation
|
||||
(
|
||||
const word modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh,
|
||||
const combustionModel& combModel
|
||||
)
|
||||
:
|
||||
reactionRateFlameArea(modelType, dict, mesh, combModel),
|
||||
correlation_(dict.subDict(typeName + "Coeffs").subDict(fuel_)),
|
||||
C_(readScalar(dict.subDict(typeName + "Coeffs").lookup("C"))),
|
||||
alpha_(readScalar(dict.subDict(typeName + "Coeffs").lookup("alpha")))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::reactionRateFlameAreaModels::relaxation::~relaxation()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::reactionRateFlameAreaModels::relaxation::correct
|
||||
(
|
||||
const volScalarField& sigma
|
||||
)
|
||||
{
|
||||
dimensionedScalar omega0
|
||||
(
|
||||
"omega0",
|
||||
dimensionSet(1, -2, -1, 0, 0, 0, 0),
|
||||
correlation_.omega0()
|
||||
);
|
||||
|
||||
dimensionedScalar sigmaExt
|
||||
(
|
||||
"sigmaExt",
|
||||
dimensionSet(0, 0, -1, 0, 0, 0, 0),
|
||||
correlation_.sigmaExt()
|
||||
);
|
||||
|
||||
dimensionedScalar omegaMin
|
||||
(
|
||||
"omegaMin",
|
||||
omega0.dimensions(),
|
||||
1e-4
|
||||
);
|
||||
|
||||
dimensionedScalar kMin
|
||||
(
|
||||
"kMin",
|
||||
sqr(dimVelocity),
|
||||
SMALL
|
||||
);
|
||||
|
||||
const compressibleTurbulenceModel& turbulence = combModel_.turbulence();
|
||||
|
||||
// Total strain
|
||||
const volScalarField sigmaTotal
|
||||
(
|
||||
sigma + alpha_*turbulence.epsilon()/(turbulence.k() + kMin)
|
||||
);
|
||||
|
||||
const volScalarField omegaInf(correlation_.omega0Sigma(sigmaTotal));
|
||||
|
||||
dimensionedScalar sigma0("sigma0", sigma.dimensions(), 0.0);
|
||||
|
||||
const volScalarField tau(C_*mag(sigmaTotal));
|
||||
|
||||
volScalarField Rc
|
||||
(
|
||||
(tau*omegaInf*(omega0 - omegaInf) + sqr(omegaMin)*sigmaExt)
|
||||
/(sqr(omega0 - omegaInf) + sqr(omegaMin))
|
||||
);
|
||||
|
||||
const volScalarField rho(combModel_.rho());
|
||||
const surfaceScalarField phi(combModel_.phi());
|
||||
|
||||
solve
|
||||
(
|
||||
fvm::ddt(rho, omega_)
|
||||
+ fvm::div(phi, omega_, "div(phi,omega)")
|
||||
==
|
||||
rho*Rc*omega0
|
||||
- fvm::SuSp(rho*(tau + Rc), omega_)
|
||||
);
|
||||
|
||||
omega_.min(omega0);
|
||||
omega_.max(0.0);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::reactionRateFlameAreaModels::relaxation::read
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
if (reactionRateFlameArea::read(dict))
|
||||
{
|
||||
coeffDict_ = dict.subDict(typeName + "Coeffs");
|
||||
coeffDict_.lookup("C") >> C_;
|
||||
coeffDict_.lookup("alpha") >> alpha_;
|
||||
correlation_.read
|
||||
(
|
||||
coeffDict_.subDict(fuel_)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,122 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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/>.
|
||||
|
||||
Class
|
||||
Foam::reactionRateFlameAreaModels::relaxation
|
||||
|
||||
Description
|
||||
Consumption rate per unit of flame area obtained from a relaxation equation
|
||||
|
||||
SourceFiles
|
||||
relaxation.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef relaxation_H
|
||||
#define relaxation_H
|
||||
|
||||
#include "reactionRateFlameArea.H"
|
||||
#include "consumptionSpeed.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace reactionRateFlameAreaModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class relaxation Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class relaxation
|
||||
:
|
||||
public reactionRateFlameArea
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Correlation
|
||||
consumptionSpeed correlation_;
|
||||
|
||||
//- Proportionality constant for time scale in the relaxation Eq.
|
||||
scalar C_;
|
||||
|
||||
//- Proportionality constant for sub-grid strain
|
||||
scalar alpha_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow copy construct
|
||||
relaxation(const relaxation&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const relaxation&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("relaxation");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary and psiReactionThermo
|
||||
relaxation
|
||||
(
|
||||
const word modelType,
|
||||
const dictionary& dictCoeffs,
|
||||
const fvMesh& mesh,
|
||||
const combustionModel& combModel
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~relaxation();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Correct omega
|
||||
virtual void correct(const volScalarField& sigma);
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read(const dictionary& dictProperties);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End reactionRateFlameAreaModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
combustionModel/combustionModel.C
|
||||
|
||||
psiCombustionModel/psiCombustionModel/psiCombustionModel.C
|
||||
psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C
|
||||
psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C
|
||||
psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C
|
||||
|
||||
rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.C
|
||||
rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C
|
||||
rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C
|
||||
rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C
|
||||
|
||||
diffusion/diffusions.C
|
||||
infinitelyFastChemistry/infinitelyFastChemistrys.C
|
||||
|
||||
PaSR/PaSRs.C
|
||||
|
||||
laminar/laminars.C
|
||||
|
||||
FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C
|
||||
FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C
|
||||
FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C
|
||||
FSD/reactionRateFlameAreaModels/relaxation/relaxation.C
|
||||
|
||||
FSD/FSDs.C
|
||||
|
||||
noCombustion/noCombustions.C
|
||||
|
||||
LIB = $(FOAM_USER_LIBBIN)/libcombustionModels_POSTECH
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lcompressibleTransportModels \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lchemistryModel \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "PaSR.H"
|
||||
#include "fvmSup.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::combustionModels::PaSR<Type>::PaSR
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
laminar<Type>(modelType, mesh, phaseName),
|
||||
Cmix_(readScalar(this->coeffs().lookup("Cmix"))),
|
||||
turbulentReaction_(this->coeffs().lookup("turbulentReaction")),
|
||||
kappa_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("PaSR:kappa", phaseName),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("kappa", dimless, 0.0)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::combustionModels::PaSR<Type>::~PaSR()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::combustionModels::PaSR<Type>::correct()
|
||||
{
|
||||
if (this->active())
|
||||
{
|
||||
laminar<Type>::correct();
|
||||
|
||||
if (turbulentReaction_)
|
||||
{
|
||||
tmp<volScalarField> tepsilon(this->turbulence().epsilon());
|
||||
const volScalarField& epsilon = tepsilon();
|
||||
tmp<volScalarField> tmuEff(this->turbulence().muEff());
|
||||
const volScalarField& muEff = tmuEff();
|
||||
tmp<volScalarField> ttc(this->tc());
|
||||
const volScalarField& tc = ttc();
|
||||
tmp<volScalarField> trho(this->rho());
|
||||
const volScalarField& rho = trho();
|
||||
|
||||
forAll(epsilon, i)
|
||||
{
|
||||
scalar tk =
|
||||
Cmix_*sqrt(max(muEff[i]/rho[i]/(epsilon[i] + SMALL), 0));
|
||||
|
||||
if (tk > SMALL)
|
||||
{
|
||||
kappa_[i] = tc[i]/(tc[i] + tk);
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa_[i] = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa_ = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::combustionModels::PaSR<Type>::R(volScalarField& Y) const
|
||||
{
|
||||
return kappa_*laminar<Type>::R(Y);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::PaSR<Type>::dQ() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject::groupName("PaSR:dQ", this->phaseName_),
|
||||
kappa_*laminar<Type>::dQ()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::PaSR<Type>::Sh() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject::groupName("PaSR:Sh", this->phaseName_),
|
||||
kappa_*laminar<Type>::Sh()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
bool Foam::combustionModels::PaSR<Type>::read()
|
||||
{
|
||||
if (laminar<Type>::read())
|
||||
{
|
||||
this->coeffs().lookup("Cmix") >> Cmix_;
|
||||
this->coeffs().lookup("turbulentReaction") >> turbulentReaction_;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::combustionModels::PaSR
|
||||
|
||||
Description
|
||||
Partially stirred reactor combustion model. The model calculates a finite
|
||||
rate, based on both turbulence and chemistry time scales. Depending on
|
||||
mesh resolution, the Cmix parameter can be used to scale the turbulence
|
||||
mixing time scale.
|
||||
|
||||
SourceFiles
|
||||
PaSR.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef PaSR_H
|
||||
#define PaSR_H
|
||||
|
||||
#include "../laminar/laminar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class PaSR Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class PaSR
|
||||
:
|
||||
public laminar<Type>
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Mixing constant
|
||||
scalar Cmix_;
|
||||
|
||||
//- Turbulent reaction switch
|
||||
Switch turbulentReaction_;
|
||||
|
||||
//- Mixing parameter
|
||||
volScalarField kappa_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow copy construct
|
||||
PaSR(const PaSR&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const PaSR&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("PaSR");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
PaSR(const word& modelType, const fvMesh& mesh, const word& phaseName);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~PaSR();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct combustion rate
|
||||
virtual void correct();
|
||||
|
||||
//- Fuel consumption rate matrix.
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "PaSR.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "makeCombustionTypes.H"
|
||||
|
||||
#include "psiChemistryCombustion.H"
|
||||
#include "rhoChemistryCombustion.H"
|
||||
#include "PaSR.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeCombustionTypes(PaSR, psiChemistryCombustion, psiCombustionModel);
|
||||
makeCombustionTypes(PaSR, rhoChemistryCombustion, rhoCombustionModel);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "combustionModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(combustionModel, 0);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModel::combustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("combustionProperties", phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
turbulencePtr_(),
|
||||
mesh_(mesh),
|
||||
active_(lookupOrDefault<Switch>("active", true)),
|
||||
coeffs_(subDict(modelType + "Coeffs")),
|
||||
modelType_(modelType),
|
||||
phaseName_(phaseName)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModel::~combustionModel()
|
||||
{
|
||||
if (turbulencePtr_)
|
||||
{
|
||||
turbulencePtr_ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
bool Foam::combustionModel::read()
|
||||
{
|
||||
if (regIOobject::read())
|
||||
{
|
||||
this->lookup("active") >> active_;
|
||||
coeffs_ = subDict(modelType_ + "Coeffs");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::combustionModel::Sh() const
|
||||
{
|
||||
return tmp<Foam::volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("Sh", phaseName_),
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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/>.
|
||||
|
||||
Class
|
||||
Foam::combustionModel
|
||||
|
||||
Description
|
||||
Base class for combustion models
|
||||
|
||||
SourceFiles
|
||||
combustionModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef combustionModel_H
|
||||
#define combustionModel_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class combustionModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class combustionModel
|
||||
:
|
||||
public IOdictionary
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow copy construct
|
||||
combustionModel(const combustionModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const combustionModel&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Reference to the turbulence model
|
||||
compressibleTurbulenceModel* turbulencePtr_;
|
||||
|
||||
//- Reference to the mesh database
|
||||
const fvMesh& mesh_;
|
||||
|
||||
//- Active
|
||||
Switch active_;
|
||||
|
||||
//- Dictionary of the model
|
||||
dictionary coeffs_;
|
||||
|
||||
//- Model type
|
||||
const word modelType_;
|
||||
|
||||
//- Phase name
|
||||
const word phaseName_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("combustionModel");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
combustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName=word::null
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~combustionModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to the mesh database
|
||||
inline const fvMesh& mesh() const;
|
||||
|
||||
//- Return const access to phi
|
||||
inline const surfaceScalarField& phi() const;
|
||||
|
||||
//- Return const access to rho
|
||||
virtual tmp<volScalarField> rho() const = 0;
|
||||
|
||||
//- Return access to turbulence
|
||||
inline const compressibleTurbulenceModel& turbulence() const;
|
||||
|
||||
//- Set turbulence
|
||||
inline void setTurbulence
|
||||
(
|
||||
compressibleTurbulenceModel& turbModel
|
||||
);
|
||||
|
||||
//- Is combustion active?
|
||||
inline const Switch& active() const;
|
||||
|
||||
//- Return const dictionary of the model
|
||||
inline const dictionary& coeffs() const;
|
||||
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct combustion rate
|
||||
virtual void correct() = 0;
|
||||
|
||||
//- Fuel consumption rate matrix, i.e. source term for fuel equation
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const = 0;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const = 0;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "combustionModelI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline const Foam::fvMesh& Foam::combustionModel::mesh() const
|
||||
{
|
||||
return mesh_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::surfaceScalarField& Foam::combustionModel::phi() const
|
||||
{
|
||||
if (turbulencePtr_)
|
||||
{
|
||||
return turbulencePtr_->phi();
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "turbulencePtr_ is empty. Please use "
|
||||
<< "combustionModel::setTurbulence "
|
||||
<< "(compressibleTurbulenceModel& )"
|
||||
<< abort(FatalError);
|
||||
|
||||
return turbulencePtr_->phi();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::compressibleTurbulenceModel&
|
||||
Foam::combustionModel::turbulence() const
|
||||
{
|
||||
if (turbulencePtr_)
|
||||
{
|
||||
return *turbulencePtr_;
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "turbulencePtr_ is empty. Please use "
|
||||
<< "combustionModel::setTurbulence "
|
||||
<< "(compressibleTurbulenceModel& )"
|
||||
<< abort(FatalError);
|
||||
|
||||
return *turbulencePtr_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::Switch& Foam::combustionModel::active() const
|
||||
{
|
||||
return active_;
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::combustionModel::setTurbulence
|
||||
(
|
||||
compressibleTurbulenceModel& turbModel
|
||||
)
|
||||
{
|
||||
turbulencePtr_ = &turbModel;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::dictionary& Foam::combustionModel::coeffs() const
|
||||
{
|
||||
return coeffs_;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef makeCombustionTypes_H
|
||||
#define makeCombustionTypes_H
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makeCombustionTypesThermo(CombModel, CombType, Thermo, Table) \
|
||||
\
|
||||
typedef Foam::combustionModels::CombModel \
|
||||
<Foam::combustionModels::CombType, Foam::Thermo> \
|
||||
CombModel##CombType##Thermo; \
|
||||
\
|
||||
defineTemplateTypeNameAndDebugWithName \
|
||||
( \
|
||||
CombModel##CombType##Thermo, \
|
||||
#CombModel"<"#CombType","#Thermo">", \
|
||||
0 \
|
||||
); \
|
||||
\
|
||||
namespace Foam \
|
||||
{ \
|
||||
namespace combustionModels \
|
||||
{ \
|
||||
typedef CombModel<CombType, Thermo> CombModel##CombType##Thermo; \
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
Table, \
|
||||
CombModel##CombType##Thermo, \
|
||||
dictionary \
|
||||
); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
#define makeCombustionTypes(CombModel, CombType, Table) \
|
||||
\
|
||||
typedef Foam::combustionModels::CombModel \
|
||||
<Foam::combustionModels::CombType> \
|
||||
CombModel##CombType; \
|
||||
\
|
||||
defineTemplateTypeNameAndDebugWithName \
|
||||
( \
|
||||
CombModel##CombType, \
|
||||
#CombModel"<"#CombType">", \
|
||||
0 \
|
||||
); \
|
||||
\
|
||||
namespace Foam \
|
||||
{ \
|
||||
namespace combustionModels \
|
||||
{ \
|
||||
typedef CombModel<CombType> CombModel##CombType; \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
Table, \
|
||||
CombModel##CombType, \
|
||||
dictionary \
|
||||
); \
|
||||
} \
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 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 "fvcGrad.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
diffusion<CombThermoType, ThermoType>::diffusion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
singleStepCombustion<CombThermoType, ThermoType>
|
||||
(
|
||||
modelType,
|
||||
mesh,
|
||||
phaseName
|
||||
),
|
||||
C_(readScalar(this->coeffs().lookup("C"))),
|
||||
oxidantName_(this->coeffs().template lookupOrDefault<word>("oxidant", "O2"))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
diffusion<CombThermoType, ThermoType>::~diffusion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
void diffusion<CombThermoType, ThermoType>::correct()
|
||||
{
|
||||
this->wFuel_ ==
|
||||
dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
this->singleMixturePtr_->fresCorrect();
|
||||
|
||||
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||
|
||||
const volScalarField& YFuel =
|
||||
this->thermoPtr_->composition().Y()[fuelI];
|
||||
|
||||
if (this->thermoPtr_->composition().contains(oxidantName_))
|
||||
{
|
||||
const volScalarField& YO2 =
|
||||
this->thermoPtr_->composition().Y(oxidantName_);
|
||||
|
||||
this->wFuel_ ==
|
||||
C_*this->turbulence().muEff()
|
||||
*mag(fvc::grad(YFuel) & fvc::grad(YO2))
|
||||
*pos(YFuel)*pos(YO2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
bool diffusion<CombThermoType, ThermoType>::read()
|
||||
{
|
||||
if (singleStepCombustion<CombThermoType, ThermoType>::read())
|
||||
{
|
||||
this->coeffs().lookup("C") >> C_ ;
|
||||
this->coeffs().readIfPresent("oxidant", oxidantName_);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
@ -1,128 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::combustionModels::diffusion
|
||||
|
||||
Description
|
||||
Simple diffusion-based combustion model based on the principle mixed is
|
||||
burnt. Additional parameter C is used to distribute the heat release rate
|
||||
in time.
|
||||
|
||||
SourceFiles
|
||||
diffusion.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef diffusion_H
|
||||
#define diffusion_H
|
||||
|
||||
#include "singleStepCombustion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class diffusion Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
class diffusion
|
||||
:
|
||||
public singleStepCombustion<CombThermoType, ThermoType>
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Model constant
|
||||
scalar C_;
|
||||
|
||||
//- Name of oxidant - default is "O2"
|
||||
word oxidantName_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow copy construct
|
||||
diffusion(const diffusion&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const diffusion&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("diffusion");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
diffusion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~diffusion();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct combustion rate
|
||||
virtual void correct();
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "diffusion.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 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 "makeCombustionTypes.H"
|
||||
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "psiThermoCombustion.H"
|
||||
#include "rhoThermoCombustion.H"
|
||||
#include "diffusion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Combustion models based on sensibleEnthalpy
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
diffusion,
|
||||
psiThermoCombustion,
|
||||
gasHThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
diffusion,
|
||||
psiThermoCombustion,
|
||||
constGasHThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
diffusion,
|
||||
rhoThermoCombustion,
|
||||
gasHThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
diffusion,
|
||||
rhoThermoCombustion,
|
||||
constGasHThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
// Combustion models based on sensibleInternalEnergy
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
diffusion,
|
||||
psiThermoCombustion,
|
||||
gasEThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
diffusion,
|
||||
psiThermoCombustion,
|
||||
constGasEThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
diffusion,
|
||||
rhoThermoCombustion,
|
||||
gasEThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
diffusion,
|
||||
rhoThermoCombustion,
|
||||
constGasEThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
infinitelyFastChemistry<CombThermoType, ThermoType>::infinitelyFastChemistry
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
singleStepCombustion<CombThermoType, ThermoType>
|
||||
(
|
||||
modelType,
|
||||
mesh,
|
||||
phaseName
|
||||
),
|
||||
C_(readScalar(this->coeffs().lookup("C")))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
infinitelyFastChemistry<CombThermoType, ThermoType>::~infinitelyFastChemistry()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
void infinitelyFastChemistry<CombThermoType, ThermoType>::correct()
|
||||
{
|
||||
this->wFuel_ ==
|
||||
dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
this->singleMixturePtr_->fresCorrect();
|
||||
|
||||
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||
|
||||
const volScalarField& YFuel =
|
||||
this->thermoPtr_->composition().Y()[fuelI];
|
||||
|
||||
const dimensionedScalar s = this->singleMixturePtr_->s();
|
||||
|
||||
if (this->thermoPtr_->composition().contains("O2"))
|
||||
{
|
||||
const volScalarField& YO2 = this->thermoPtr_->composition().Y("O2");
|
||||
|
||||
this->wFuel_ ==
|
||||
this->rho()/(this->mesh().time().deltaT()*C_)
|
||||
*min(YFuel, YO2/s.value());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
bool infinitelyFastChemistry<CombThermoType, ThermoType>::read()
|
||||
{
|
||||
if (singleStepCombustion<CombThermoType, ThermoType>::read())
|
||||
{
|
||||
this->coeffs().lookup("C") >> C_ ;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
@ -1,125 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::combustionModels::infinitelyFastChemistry
|
||||
|
||||
Description
|
||||
Simple infinitely fast chemistry combustion model based on the principle
|
||||
mixed is burnt. Additional parameter C is used to distribute the heat
|
||||
release rate.in time
|
||||
|
||||
SourceFiles
|
||||
infinitelyFastChemistry.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef infinitelyFastChemistry_H
|
||||
#define infinitelyFastChemistry_H
|
||||
|
||||
#include "singleStepCombustion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class infinitelyFastChemistry Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
class infinitelyFastChemistry
|
||||
:
|
||||
public singleStepCombustion<CombThermoType, ThermoType>
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Model constant
|
||||
scalar C_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow copy construct
|
||||
infinitelyFastChemistry(const infinitelyFastChemistry&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const infinitelyFastChemistry&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("infinitelyFastChemistry");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
infinitelyFastChemistry
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~infinitelyFastChemistry();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct combustion rate
|
||||
virtual void correct();
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "infinitelyFastChemistry.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "makeCombustionTypes.H"
|
||||
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "psiThermoCombustion.H"
|
||||
#include "rhoThermoCombustion.H"
|
||||
#include "infinitelyFastChemistry.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Combustion models based on sensibleEnthalpy
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
infinitelyFastChemistry,
|
||||
psiThermoCombustion,
|
||||
gasHThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
infinitelyFastChemistry,
|
||||
psiThermoCombustion,
|
||||
constGasHThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
infinitelyFastChemistry,
|
||||
rhoThermoCombustion,
|
||||
gasHThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
infinitelyFastChemistry,
|
||||
rhoThermoCombustion,
|
||||
constGasHThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
// Combustion models based on sensibleInternalEnergy
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
infinitelyFastChemistry,
|
||||
psiThermoCombustion,
|
||||
gasEThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
infinitelyFastChemistry,
|
||||
psiThermoCombustion,
|
||||
constGasEThermoPhysics,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
infinitelyFastChemistry,
|
||||
rhoThermoCombustion,
|
||||
gasEThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypesThermo
|
||||
(
|
||||
infinitelyFastChemistry,
|
||||
rhoThermoCombustion,
|
||||
constGasEThermoPhysics,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
@ -1,214 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "laminar.H"
|
||||
#include "fvmSup.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::combustionModels::laminar<Type>::laminar
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
Type(modelType, mesh, phaseName),
|
||||
integrateReactionRate_
|
||||
(
|
||||
this->coeffs().lookupOrDefault("integrateReactionRate", true)
|
||||
)
|
||||
{
|
||||
if (integrateReactionRate_)
|
||||
{
|
||||
Info<< " using integrated reaction rate" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " using instantaneous reaction rate" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::combustionModels::laminar<Type>::~laminar()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::laminar<Type>::tc() const
|
||||
{
|
||||
return this->chemistryPtr_->tc();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::combustionModels::laminar<Type>::correct()
|
||||
{
|
||||
if (this->active())
|
||||
{
|
||||
if (integrateReactionRate_)
|
||||
{
|
||||
if (fv::localEulerDdt::enabled(this->mesh()))
|
||||
{
|
||||
const scalarField& rDeltaT =
|
||||
fv::localEulerDdt::localRDeltaT(this->mesh());
|
||||
|
||||
if (this->coeffs().found("maxIntegrationTime"))
|
||||
{
|
||||
scalar maxIntegrationTime
|
||||
(
|
||||
readScalar(this->coeffs().lookup("maxIntegrationTime"))
|
||||
);
|
||||
|
||||
this->chemistryPtr_->solve
|
||||
(
|
||||
min(1.0/rDeltaT, maxIntegrationTime)()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->chemistryPtr_->solve((1.0/rDeltaT)());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this->chemistryPtr_->solve(this->mesh().time().deltaTValue());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this->chemistryPtr_->calculate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::combustionModels::laminar<Type>::R(volScalarField& Y) const
|
||||
{
|
||||
tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime));
|
||||
|
||||
fvScalarMatrix& Su = tSu.ref();
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
const label specieI =
|
||||
this->thermo().composition().species()[Y.member()];
|
||||
|
||||
Su += this->chemistryPtr_->RR(specieI);
|
||||
}
|
||||
|
||||
return tSu;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::laminar<Type>::dQ() const
|
||||
{
|
||||
tmp<volScalarField> tdQ
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(typeName + ":dQ", this->phaseName_),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
tdQ.ref() = this->chemistryPtr_->dQ();
|
||||
}
|
||||
|
||||
return tdQ;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::laminar<Type>::Sh() const
|
||||
{
|
||||
tmp<volScalarField> tSh
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(typeName + ":Sh", this->phaseName_),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
tSh.ref() = this->chemistryPtr_->Sh();
|
||||
}
|
||||
|
||||
return tSh;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
bool Foam::combustionModels::laminar<Type>::read()
|
||||
{
|
||||
if (Type::read())
|
||||
{
|
||||
this->coeffs().lookup("integrateReactionRate")
|
||||
>> integrateReactionRate_;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,138 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::combustionModels::laminar
|
||||
|
||||
Description
|
||||
Laminar combustion model.
|
||||
|
||||
SourceFiles
|
||||
laminar.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef laminar_H
|
||||
#define laminar_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class laminar Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class laminar
|
||||
:
|
||||
public Type
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Integrate reaction rate over the time-step
|
||||
// using the selected ODE solver
|
||||
bool integrateReactionRate_;
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Return the chemical time scale
|
||||
tmp<volScalarField> tc() const;
|
||||
|
||||
private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow copy construct
|
||||
laminar(const laminar&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const laminar&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("laminar");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
laminar
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~laminar();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct combustion rate
|
||||
virtual void correct();
|
||||
|
||||
//- Fuel consumption rate matrix.
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "laminar.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 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 "makeCombustionTypes.H"
|
||||
|
||||
#include "psiChemistryCombustion.H"
|
||||
#include "rhoChemistryCombustion.H"
|
||||
#include "laminar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeCombustionTypes(laminar, psiChemistryCombustion, psiCombustionModel);
|
||||
makeCombustionTypes(laminar, rhoChemistryCombustion, rhoCombustionModel);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "noCombustion.H"
|
||||
#include "fvmSup.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType>
|
||||
Foam::combustionModels::noCombustion<CombThermoType>::noCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
CombThermoType(modelType, mesh, phaseName)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType>
|
||||
Foam::combustionModels::noCombustion<CombThermoType>::~noCombustion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType>
|
||||
void Foam::combustionModels::noCombustion<CombThermoType>::correct()
|
||||
{
|
||||
// Do Nothing
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::combustionModels::noCombustion<CombThermoType>::R
|
||||
(
|
||||
volScalarField& Y
|
||||
) const
|
||||
{
|
||||
tmp<fvScalarMatrix> tSu
|
||||
(
|
||||
new fvScalarMatrix(Y, dimMass/dimTime)
|
||||
);
|
||||
|
||||
return tSu;
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::noCombustion<CombThermoType>::dQ() const
|
||||
{
|
||||
tmp<volScalarField> tdQ
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("dQ", this->phaseName_),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
return tdQ;
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::noCombustion<CombThermoType>::Sh() const
|
||||
{
|
||||
tmp<volScalarField> tSh
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("Sh", this->phaseName_),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
return tSh;
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType>
|
||||
bool Foam::combustionModels::noCombustion<CombThermoType>::read()
|
||||
{
|
||||
if (CombThermoType::read())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,121 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::combustionModels::noCombustion
|
||||
|
||||
Description
|
||||
Dummy combustion model for 'no combustion'
|
||||
|
||||
SourceFiles
|
||||
noCombustion.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef noCombustion_H
|
||||
#define noCombustion_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class noCombustion Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CombThermoType>
|
||||
class noCombustion
|
||||
:
|
||||
public CombThermoType
|
||||
{
|
||||
|
||||
//- Disallow copy construct
|
||||
noCombustion(const noCombustion&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const noCombustion&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("noCombustion");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
noCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~noCombustion();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct combustion rate
|
||||
virtual void correct();
|
||||
|
||||
//- Fuel consumption rate matrix
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "noCombustion.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 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 "makeCombustionTypes.H"
|
||||
|
||||
#include "psiCombustionModel.H"
|
||||
#include "rhoCombustionModel.H"
|
||||
#include "psiThermoCombustion.H"
|
||||
#include "rhoThermoCombustion.H"
|
||||
|
||||
#include "noCombustion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeCombustionTypes
|
||||
(
|
||||
noCombustion,
|
||||
psiThermoCombustion,
|
||||
psiCombustionModel
|
||||
);
|
||||
|
||||
makeCombustionTypes
|
||||
(
|
||||
noCombustion,
|
||||
rhoThermoCombustion,
|
||||
rhoCombustionModel
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 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 "psiChemistryCombustion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::psiChemistryCombustion::psiChemistryCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
psiCombustionModel(modelType, mesh, phaseName),
|
||||
chemistryPtr_(psiChemistryModel::New(mesh, phaseName))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::psiChemistryCombustion::~psiChemistryCombustion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::psiChemistryModel>
|
||||
Foam::combustionModels::psiChemistryCombustion::chem()
|
||||
{
|
||||
return chemistryPtr_;
|
||||
}
|
||||
|
||||
Foam::psiReactionThermo&
|
||||
Foam::combustionModels::psiChemistryCombustion::thermo()
|
||||
{
|
||||
return chemistryPtr_->thermo();
|
||||
}
|
||||
|
||||
|
||||
const Foam::psiReactionThermo&
|
||||
Foam::combustionModels::psiChemistryCombustion::thermo() const
|
||||
{
|
||||
return chemistryPtr_->thermo();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::psiChemistryCombustion::rho() const
|
||||
{
|
||||
return chemistryPtr_->thermo().rho();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 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/>.
|
||||
|
||||
Class
|
||||
Foam::psiChemistryCombustion
|
||||
|
||||
Description
|
||||
Compressibility-based chemistry model wrapper for combustion models
|
||||
|
||||
SourceFiles
|
||||
psiChemistryCombustion.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef psiChemistryCombustion_H
|
||||
#define psiChemistryCombustion_H
|
||||
|
||||
#include "autoPtr.H"
|
||||
#include "psiCombustionModel.H"
|
||||
#include "psiChemistryModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
class psiChemistryCombustion Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class psiChemistryCombustion
|
||||
:
|
||||
public psiCombustionModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Construct as copy (not implemented)
|
||||
psiChemistryCombustion(const psiChemistryCombustion&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const psiChemistryCombustion&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Pointer to chemistry model
|
||||
autoPtr<psiChemistryModel> chemistryPtr_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components and thermo
|
||||
psiChemistryCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~psiChemistryCombustion();
|
||||
|
||||
|
||||
// Member Functions
|
||||
autoPtr<psiChemistryModel> chem();
|
||||
//- Return access to the thermo package
|
||||
virtual psiReactionThermo& thermo();
|
||||
|
||||
//- Return const access to the thermo package
|
||||
virtual const psiReactionThermo& thermo() const;
|
||||
|
||||
//- Return const access to the density field
|
||||
virtual tmp<volScalarField> rho() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "psiCombustionModel.H"
|
||||
|
||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
defineTypeNameAndDebug(psiCombustionModel, 0);
|
||||
defineRunTimeSelectionTable(psiCombustionModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::psiCombustionModel::psiCombustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
combustionModel(modelType, mesh, phaseName)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::psiCombustionModel::~psiCombustionModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::combustionModels::psiCombustionModel::read()
|
||||
{
|
||||
if (combustionModel::read())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,150 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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/>.
|
||||
|
||||
Class
|
||||
Foam::psiCombustionModel
|
||||
|
||||
Description
|
||||
Combustion models for compressibility-based thermodynamics
|
||||
|
||||
SourceFiles
|
||||
psiCombustionModelI.H
|
||||
psiCombustionModel.C
|
||||
psiCombustionModelNew.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef psiCombustionModel_H
|
||||
#define psiCombustionModel_H
|
||||
|
||||
#include "combustionModel.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "psiReactionThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
class psiCombustionModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class psiCombustionModel
|
||||
:
|
||||
public combustionModel
|
||||
{
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Construct as copy (not implemented)
|
||||
psiCombustionModel(const psiCombustionModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const psiCombustionModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("psiCombustionModel");
|
||||
|
||||
|
||||
//- Declare run-time constructor selection tables
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
psiCombustionModel,
|
||||
dictionary,
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
),
|
||||
(modelType, mesh, phaseName)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
psiCombustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<psiCombustionModel> New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName=word::null
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~psiCombustionModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return access to the thermo package
|
||||
virtual psiReactionThermo& thermo() = 0;
|
||||
|
||||
//- Return const access to the thermo package
|
||||
virtual const psiReactionThermo& thermo() const = 0;
|
||||
|
||||
//- Return reaction rate as volScalarField ,karam
|
||||
//- defined at laminar.H and .C
|
||||
virtual tmp<volScalarField> RR(label i) const
|
||||
{
|
||||
return tmp<volScalarField> (NULL);
|
||||
}
|
||||
|
||||
//- Return tmp of rho
|
||||
virtual tmp<volScalarField> rho() const = 0;
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "psiCombustionModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::combustionModels::psiCombustionModel>
|
||||
Foam::combustionModels::psiCombustionModel::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
{
|
||||
const word combModelName
|
||||
(
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("combustionProperties", phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
).lookup("combustionModel")
|
||||
);
|
||||
|
||||
Info<< "Selecting combustion model " << combModelName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(combModelName);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown psiCombustionModel type "
|
||||
<< combModelName << endl << endl
|
||||
<< "Valid combustionModels are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
const label tempOpen = combModelName.find('<');
|
||||
|
||||
const word className = combModelName(0, tempOpen);
|
||||
|
||||
return autoPtr<psiCombustionModel>(cstrIter()(className, mesh, phaseName));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 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 "psiThermoCombustion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::psiThermoCombustion::psiThermoCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
psiCombustionModel(modelType, mesh, phaseName),
|
||||
thermoPtr_(psiReactionThermo::New(mesh, phaseName))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::psiThermoCombustion::~psiThermoCombustion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::psiReactionThermo&
|
||||
Foam::combustionModels::psiThermoCombustion::thermo()
|
||||
{
|
||||
return thermoPtr_();
|
||||
}
|
||||
|
||||
|
||||
const Foam::psiReactionThermo&
|
||||
Foam::combustionModels::psiThermoCombustion::thermo() const
|
||||
{
|
||||
return thermoPtr_();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::psiThermoCombustion::rho() const
|
||||
{
|
||||
return thermoPtr_->rho();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 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/>.
|
||||
|
||||
Class
|
||||
Foam::psiThermoCombustion
|
||||
|
||||
Description
|
||||
Compressibility-based thermo model wrapper for combustion models
|
||||
|
||||
SourceFiles
|
||||
psiThermoCombustion.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef psiThermoCombustion_H
|
||||
#define psiThermoCombustion_H
|
||||
|
||||
#include "autoPtr.H"
|
||||
#include "psiCombustionModel.H"
|
||||
#include "psiReactionThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
class psiThermoCombustion Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class psiThermoCombustion
|
||||
:
|
||||
public psiCombustionModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Construct as copy (not implemented)
|
||||
psiThermoCombustion(const psiThermoCombustion&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const psiThermoCombustion&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Pointer to chemistry model
|
||||
autoPtr<psiReactionThermo> thermoPtr_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
psiThermoCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~psiThermoCombustion();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return access to the thermo package
|
||||
virtual psiReactionThermo& thermo();
|
||||
|
||||
//- Return const access to the thermo package
|
||||
virtual const psiReactionThermo& thermo() const;
|
||||
|
||||
//- Return const access to the density field
|
||||
virtual tmp<volScalarField> rho() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 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 "rhoChemistryCombustion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::rhoChemistryCombustion::rhoChemistryCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
rhoCombustionModel(modelType, mesh, phaseName),
|
||||
chemistryPtr_(rhoChemistryModel::New(mesh, phaseName))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::rhoChemistryCombustion::~rhoChemistryCombustion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
Foam::autoPtr<Foam::rhoChemistryModel>
|
||||
Foam::combustionModels::rhoChemistryCombustion::chem()
|
||||
{
|
||||
return chemistryPtr_;
|
||||
}
|
||||
|
||||
Foam::rhoReactionThermo&
|
||||
Foam::combustionModels::rhoChemistryCombustion::thermo()
|
||||
{
|
||||
return chemistryPtr_->thermo();
|
||||
}
|
||||
|
||||
|
||||
const Foam::rhoReactionThermo&
|
||||
Foam::combustionModels::rhoChemistryCombustion::thermo() const
|
||||
{
|
||||
return chemistryPtr_->thermo();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::rhoChemistryCombustion::rho() const
|
||||
{
|
||||
return chemistryPtr_->thermo().rho();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 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/>.
|
||||
|
||||
Class
|
||||
Foam::rhoChemistryCombustion
|
||||
|
||||
Description
|
||||
Density-based chemistry model wrapper for combustion models
|
||||
|
||||
SourceFiles
|
||||
rhoChemistryCombustion.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef rhoChemistryCombustion_H
|
||||
#define rhoChemistryCombustion_H
|
||||
|
||||
#include "autoPtr.H"
|
||||
#include "rhoCombustionModel.H"
|
||||
#include "rhoChemistryModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
class rhoChemistryCombustion Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class rhoChemistryCombustion
|
||||
:
|
||||
public rhoCombustionModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Construct as copy (not implemented)
|
||||
rhoChemistryCombustion(const rhoChemistryCombustion&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const rhoChemistryCombustion&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Pointer to chemistry model
|
||||
autoPtr<rhoChemistryModel> chemistryPtr_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components and thermo
|
||||
rhoChemistryCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~rhoChemistryCombustion();
|
||||
|
||||
|
||||
// Member Functions
|
||||
autoPtr<rhoChemistryModel> chem();
|
||||
//- Return access to the thermo package
|
||||
virtual rhoReactionThermo& thermo();
|
||||
|
||||
//- Return const access to the thermo package
|
||||
virtual const rhoReactionThermo& thermo() const;
|
||||
|
||||
//- Return const access to the density field
|
||||
virtual tmp<volScalarField> rho() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "rhoCombustionModel.H"
|
||||
|
||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
defineTypeNameAndDebug(rhoCombustionModel, 0);
|
||||
defineRunTimeSelectionTable(rhoCombustionModel, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::rhoCombustionModel::rhoCombustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
combustionModel(modelType, mesh, phaseName)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::rhoCombustionModel::~rhoCombustionModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::combustionModels::rhoCombustionModel::read()
|
||||
{
|
||||
if (combustionModel::read())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,150 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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/>.
|
||||
|
||||
Class
|
||||
Foam::rhoCombustionModel
|
||||
|
||||
Description
|
||||
Combustion models for rho-based thermodynamics
|
||||
|
||||
SourceFiles
|
||||
rhoCombustionModelI.H
|
||||
rhoCombustionModel.C
|
||||
rhoCombustionModelNew.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef rhoCombustionModel_H
|
||||
#define rhoCombustionModel_H
|
||||
|
||||
#include "combustionModel.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "rhoReactionThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
class rhoCombustionModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class rhoCombustionModel
|
||||
:
|
||||
public combustionModel
|
||||
{
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Construct as copy (not implemented)
|
||||
rhoCombustionModel(const rhoCombustionModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const rhoCombustionModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("rhoCombustionModel");
|
||||
|
||||
|
||||
//- Declare run-time constructor selection tables
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
rhoCombustionModel,
|
||||
dictionary,
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
),
|
||||
(modelType, mesh, phaseName)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
|
||||
//- Construct from components
|
||||
rhoCombustionModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<rhoCombustionModel> New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName=word::null
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~rhoCombustionModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access functions
|
||||
|
||||
//- Access combustion dict
|
||||
inline const dictionary& coeff() const;
|
||||
|
||||
|
||||
//- Return access to the thermo package
|
||||
virtual rhoReactionThermo& thermo() = 0;
|
||||
|
||||
//- Return const access to the thermo package
|
||||
virtual const rhoReactionThermo& thermo() const = 0;
|
||||
|
||||
//- Return tmp of rho
|
||||
virtual tmp<volScalarField> rho() const = 0;
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 "rhoCombustionModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::combustionModels::rhoCombustionModel>
|
||||
Foam::combustionModels::rhoCombustionModel::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
{
|
||||
const word combTypeName
|
||||
(
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("combustionProperties", phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
).lookup("combustionModel")
|
||||
);
|
||||
|
||||
Info<< "Selecting combustion model " << combTypeName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(combTypeName);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown rhoCombustionModel type "
|
||||
<< combTypeName << endl << endl
|
||||
<< "Valid combustionModels are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
const label tempOpen = combTypeName.find('<');
|
||||
|
||||
const word className = combTypeName(0, tempOpen);
|
||||
|
||||
return autoPtr<rhoCombustionModel> (cstrIter()(className, mesh, phaseName));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 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 "rhoThermoCombustion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::rhoThermoCombustion::rhoThermoCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
rhoCombustionModel(modelType, mesh, phaseName),
|
||||
thermoPtr_(rhoReactionThermo::New(mesh, phaseName))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::combustionModels::rhoThermoCombustion::~rhoThermoCombustion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::rhoReactionThermo&
|
||||
Foam::combustionModels::rhoThermoCombustion::thermo()
|
||||
{
|
||||
return thermoPtr_();
|
||||
}
|
||||
|
||||
|
||||
const Foam::rhoReactionThermo&
|
||||
Foam::combustionModels::rhoThermoCombustion::thermo() const
|
||||
{
|
||||
return thermoPtr_();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::rhoThermoCombustion::rho() const
|
||||
{
|
||||
return thermoPtr_().rho();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 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/>.
|
||||
|
||||
Class
|
||||
Foam::rhoThermoCombustion
|
||||
|
||||
Description
|
||||
Density-based thermo model wrapper for combustion models
|
||||
|
||||
SourceFiles
|
||||
rhoThermoCombustion.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef rhoThermoCombustion_H
|
||||
#define rhoThermoCombustion_H
|
||||
|
||||
#include "autoPtr.H"
|
||||
#include "rhoCombustionModel.H"
|
||||
#include "rhoChemistryModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
class rhoThermoCombustion Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class rhoThermoCombustion
|
||||
:
|
||||
public rhoCombustionModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Construct as copy (not implemented)
|
||||
rhoThermoCombustion(const rhoThermoCombustion&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const rhoThermoCombustion&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Pointer to thermo model
|
||||
autoPtr<rhoReactionThermo> thermoPtr_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
rhoThermoCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~rhoThermoCombustion();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return access to the thermo package
|
||||
virtual rhoReactionThermo& thermo();
|
||||
|
||||
//- Return const access to the thermo package
|
||||
virtual const rhoReactionThermo& thermo() const;
|
||||
|
||||
//- Return const access to the density field
|
||||
virtual tmp<volScalarField> rho() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "singleStepCombustion.H"
|
||||
#include "fvmSup.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
CombThermoType(modelType, mesh, phaseName),
|
||||
singleMixturePtr_(NULL),
|
||||
wFuel_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("wFuel", phaseName),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0)
|
||||
),
|
||||
semiImplicit_(readBool(this->coeffs_.lookup("semiImplicit")))
|
||||
{
|
||||
if (isA<singleStepReactingMixture<ThermoType>>(this->thermo()))
|
||||
{
|
||||
singleMixturePtr_ =
|
||||
&dynamic_cast<singleStepReactingMixture<ThermoType>&>
|
||||
(
|
||||
this->thermo()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Inconsistent thermo package for " << this->type() << " model:\n"
|
||||
<< " " << this->thermo().type() << nl << nl
|
||||
<< "Please select a thermo package based on "
|
||||
<< "singleStepReactingMixture" << exit(FatalError);
|
||||
}
|
||||
|
||||
if (semiImplicit_)
|
||||
{
|
||||
Info<< "Combustion mode: semi-implicit" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "Combustion mode: explicit" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
singleStepCombustion<CombThermoType, ThermoType>::~singleStepCombustion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
tmp<fvScalarMatrix> singleStepCombustion<CombThermoType, ThermoType>::R
|
||||
(
|
||||
volScalarField& Y
|
||||
) const
|
||||
{
|
||||
const label specieI =
|
||||
this->thermoPtr_->composition().species()[Y.member()];
|
||||
|
||||
volScalarField wSpecie
|
||||
(
|
||||
wFuel_*singleMixturePtr_->specieStoichCoeffs()[specieI]
|
||||
);
|
||||
|
||||
if (semiImplicit_)
|
||||
{
|
||||
const label fNorm = singleMixturePtr_->specieProd()[specieI];
|
||||
const volScalarField fres(singleMixturePtr_->fres(specieI));
|
||||
wSpecie /= max(fNorm*(Y - fres), scalar(1e-2));
|
||||
|
||||
return -fNorm*wSpecie*fres + fNorm*fvm::Sp(wSpecie, Y);
|
||||
}
|
||||
else
|
||||
{
|
||||
return wSpecie + fvm::Sp(0.0*wSpecie, Y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
tmp<volScalarField>
|
||||
singleStepCombustion<CombThermoType, ThermoType>::Sh() const
|
||||
{
|
||||
const label fuelI = singleMixturePtr_->fuelIndex();
|
||||
volScalarField& YFuel =
|
||||
const_cast<volScalarField&>(this->thermoPtr_->composition().Y(fuelI));
|
||||
|
||||
return -singleMixturePtr_->qFuel()*(R(YFuel) & YFuel);
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
tmp<volScalarField>
|
||||
singleStepCombustion<CombThermoType, ThermoType>::dQ() const
|
||||
{
|
||||
tmp<volScalarField> tdQ
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("dQ", this->phaseName_),
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh_,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
volScalarField& dQ = tdQ.ref();
|
||||
dQ.ref() = this->mesh().V()*Sh()();
|
||||
}
|
||||
return tdQ;
|
||||
}
|
||||
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
bool singleStepCombustion<CombThermoType, ThermoType>::read()
|
||||
{
|
||||
if (CombThermoType::read())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::combustionModels::singleStepCombustion
|
||||
|
||||
Description
|
||||
Base class for combustion models using singleStepReactingMixture.
|
||||
|
||||
SourceFiles
|
||||
singleStepCombustion.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef singleStepCombustion_H
|
||||
#define singleStepCombustion_H
|
||||
|
||||
#include "singleStepReactingMixture.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class singleStepCombustion Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CombThermoType, class ThermoType>
|
||||
class singleStepCombustion
|
||||
:
|
||||
public CombThermoType
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow copy construct
|
||||
singleStepCombustion(const singleStepCombustion&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const singleStepCombustion&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Pointer to singleStepReactingMixture mixture
|
||||
singleStepReactingMixture<ThermoType>* singleMixturePtr_;
|
||||
|
||||
//- Fuel consumption rate
|
||||
volScalarField wFuel_;
|
||||
|
||||
//- Semi-implicit (true) or explicit (false) treatment
|
||||
bool semiImplicit_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
singleStepCombustion
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~singleStepCombustion();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Fuel consumption rate matrix
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
|
||||
//- Sensible enthalpy source term
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "singleStepCombustion.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -39,7 +39,7 @@ Contact
|
|||
|
||||
#include "fvCFD.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "psiChemistryCombustion.H"
|
||||
#include "psiChemistryModel.H"
|
||||
#include "multivariateScheme.H"
|
||||
#include "pisoControl.H"
|
||||
#include "fvOptions.H"
|
||||
|
|
|
|||
|
|
@ -11,13 +11,11 @@ EXE_INC = \
|
|||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(DEV_PATH)/chemistryModel_POSTECH/lnInclude \
|
||||
-I$(DEV_PATH)/combustionModels_POSTECH/lnInclude
|
||||
-I$(DEV_PATH)/chemistryModel_POSTECH/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-L$(FOAM_USER_LIBBIN) \
|
||||
-lchemistryModel_POSTECH \
|
||||
-lcombustionModels_POSTECH \
|
||||
-lthermoAdd \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
|
|
|
|||
|
|
@ -1,13 +1,7 @@
|
|||
Info<< "Creating reaction model\n" << endl;
|
||||
|
||||
combustionModels::psiCombustionModel* pRxnCMC = (combustionModels::psiCombustionModel::New(mesh)).ptr();
|
||||
autoPtr<psiChemistryModel> chemistry(psiChemistryModel::New(mesh));
|
||||
|
||||
autoPtr<combustionModels::psiChemistryCombustion> reaction
|
||||
(
|
||||
dynamic_cast <combustionModels::psiChemistryCombustion*> (pRxnCMC)
|
||||
);
|
||||
|
||||
autoPtr<psiChemistryModel> chemistry = reaction->chem();
|
||||
psiReactionThermo& thermo = chemistry->thermo();
|
||||
|
||||
thermo.validate(args.executable(), "ha");
|
||||
|
|
@ -83,9 +77,6 @@ autoPtr<compressible::turbulenceModel> turbulence
|
|||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the reaction model
|
||||
reaction->setTurbulence(turbulence());
|
||||
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ Description
|
|||
#include "turbulentFluidThermoModel.H"
|
||||
#include "basicSprayCloud.H"
|
||||
//#include "psiCombustionModel.H"
|
||||
#include "psiChemistryCombustion.H" //karam
|
||||
#include "psiChemistryModel.H"
|
||||
#include "radiationModel.H"
|
||||
#include "SLGThermo.H"
|
||||
//#include "pimpleControl.H"
|
||||
|
|
|
|||
|
|
@ -2,14 +2,8 @@
|
|||
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
combustionModels::psiCombustionModel* pRxnCMC = (combustionModels::psiCombustionModel::New(mesh)).ptr();
|
||||
autoPtr<psiChemistryModel> chemistry(psiChemistryModel::New(mesh));
|
||||
|
||||
autoPtr<combustionModels::psiChemistryCombustion> reaction
|
||||
(
|
||||
dynamic_cast <combustionModels::psiChemistryCombustion*> (pRxnCMC)
|
||||
);
|
||||
|
||||
autoPtr<psiChemistryModel> chemistry = reaction->chem();
|
||||
psiReactionThermo& thermo = chemistry->thermo();
|
||||
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
|
@ -94,9 +88,6 @@ autoPtr<compressible::turbulenceModel> turbulence
|
|||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
reaction->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
(
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ Description
|
|||
#include "engineMesh.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "basicSprayCloud.H"
|
||||
#include "psiChemistryCombustion.H" //karam
|
||||
#include "psiChemistryModel.H"
|
||||
#include "radiationModel.H"
|
||||
#include "SLGThermo.H"
|
||||
#include "pisoControl.H"
|
||||
|
|
|
|||
|
|
@ -25,13 +25,11 @@ EXE_INC = \
|
|||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(DEV_PATH)/chemistryModel_POSTECH/lnInclude \
|
||||
-I$(DEV_PATH)/combustionModels_POSTECH/lnInclude
|
||||
-I$(DEV_PATH)/chemistryModel_POSTECH/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-L$(FOAM_USER_LIBBIN) \
|
||||
-lchemistryModel_POSTECH \
|
||||
-lcombustionModels_POSTECH \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
|
|
|
|||
|
|
@ -1,14 +1,8 @@
|
|||
#include "readGravitationalAcceleration.H"
|
||||
Info<< "Creating reaction model\n" << endl;
|
||||
|
||||
combustionModels::psiCombustionModel* pRxnCMC = (combustionModels::psiCombustionModel::New(mesh)).ptr();
|
||||
autoPtr<psiChemistryModel> chemistry(psiChemistryModel::New(mesh));
|
||||
|
||||
autoPtr<combustionModels::psiChemistryCombustion> reaction
|
||||
(
|
||||
dynamic_cast <combustionModels::psiChemistryCombustion*> (pRxnCMC)
|
||||
);
|
||||
|
||||
autoPtr<psiChemistryModel> chemistry = reaction->chem();
|
||||
psiReactionThermo& thermo = chemistry->thermo();
|
||||
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
|
@ -93,9 +87,6 @@ autoPtr<compressible::turbulenceModel> turbulence
|
|||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the reaction model
|
||||
reaction->setTurbulence(turbulence());
|
||||
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue