diff --git a/libs/Allwmake b/libs/Allwmake index 16f1269..d072aaa 100755 --- a/libs/Allwmake +++ b/libs/Allwmake @@ -5,7 +5,6 @@ targetType=libso . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments wmake $targetType chemistryModel_POSTECH -wmake $targetType combustionModels_POSTECH wmake $targetType thermos #------------------------------------------------------------------------------ diff --git a/libs/combustionModels_POSTECH/FSD/FSD.C b/libs/combustionModels_POSTECH/FSD/FSD.C deleted file mode 100644 index cc25b97..0000000 --- a/libs/combustionModels_POSTECH/FSD/FSD.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "FSD.H" -#include "addToRunTimeSelectionTable.H" -#include "LESModel.H" -#include "fvcGrad.H" -#include "fvcDiv.H" - -namespace Foam -{ -namespace combustionModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -FSD::FSD -( - const word& modelType, - const fvMesh& mesh, - const word& phaseName -) -: - singleStepCombustion - ( - 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 -FSD::~FSD() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -template -void FSD::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("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 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 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 - ( - 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 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 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 -void FSD::correct() -{ - this->wFuel_ == - dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0); - - if (this->active()) - { - calculateSourceNorm(); - } -} - - -template -bool FSD::read() -{ - if (singleStepCombustion::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 - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/libs/combustionModels_POSTECH/FSD/FSD.H b/libs/combustionModels_POSTECH/FSD/FSD.H deleted file mode 100644 index c9b4b6f..0000000 --- a/libs/combustionModels_POSTECH/FSD/FSD.H +++ /dev/null @@ -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 . - -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 FSD -: - public singleStepCombustion -{ - // Private data - - //- Auto pointer to consumption speed per unit of flame area model - autoPtr 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 - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/FSD/FSDs.C b/libs/combustionModels_POSTECH/FSD/FSDs.C deleted file mode 100644 index 1fff6a8..0000000 --- a/libs/combustionModels_POSTECH/FSD/FSDs.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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 -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C b/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C deleted file mode 100644 index 4e0e92a..0000000 --- a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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::consumptionSpeed::omega0Sigma -( - const volScalarField& sigma -) -{ - tmp 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_; -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.H b/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.H deleted file mode 100644 index c7f35d0..0000000 --- a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.H +++ /dev/null @@ -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 . - -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 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 - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C b/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C deleted file mode 100644 index 06dca4d..0000000 --- a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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; -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H b/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H deleted file mode 100644 index b6267a3..0000000 --- a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H +++ /dev/null @@ -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 . - -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 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 - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C b/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C deleted file mode 100644 index 8b5905c..0000000 --- a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "reactionRateFlameArea.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr 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 - (cstrIter()(className, dict, mesh, combModel)); -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C b/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C deleted file mode 100644 index f26b698..0000000 --- a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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; - } -} - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H b/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H deleted file mode 100644 index 33cead0..0000000 --- a/libs/combustionModels_POSTECH/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H +++ /dev/null @@ -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 . - -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 - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/Make/files b/libs/combustionModels_POSTECH/Make/files deleted file mode 100644 index 3de3dbe..0000000 --- a/libs/combustionModels_POSTECH/Make/files +++ /dev/null @@ -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 diff --git a/libs/combustionModels_POSTECH/Make/options b/libs/combustionModels_POSTECH/Make/options deleted file mode 100644 index e660ccd..0000000 --- a/libs/combustionModels_POSTECH/Make/options +++ /dev/null @@ -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 diff --git a/libs/combustionModels_POSTECH/PaSR/PaSR.C b/libs/combustionModels_POSTECH/PaSR/PaSR.C deleted file mode 100644 index 581e155..0000000 --- a/libs/combustionModels_POSTECH/PaSR/PaSR.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "PaSR.H" -#include "fvmSup.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::combustionModels::PaSR::PaSR -( - const word& modelType, - const fvMesh& mesh, - const word& phaseName -) -: - laminar(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 -Foam::combustionModels::PaSR::~PaSR() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -template -void Foam::combustionModels::PaSR::correct() -{ - if (this->active()) - { - laminar::correct(); - - if (turbulentReaction_) - { - tmp tepsilon(this->turbulence().epsilon()); - const volScalarField& epsilon = tepsilon(); - tmp tmuEff(this->turbulence().muEff()); - const volScalarField& muEff = tmuEff(); - tmp ttc(this->tc()); - const volScalarField& tc = ttc(); - tmp 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 -Foam::tmp -Foam::combustionModels::PaSR::R(volScalarField& Y) const -{ - return kappa_*laminar::R(Y); -} - - -template -Foam::tmp -Foam::combustionModels::PaSR::dQ() const -{ - return tmp - ( - new volScalarField - ( - IOobject::groupName("PaSR:dQ", this->phaseName_), - kappa_*laminar::dQ() - ) - ); -} - - -template -Foam::tmp -Foam::combustionModels::PaSR::Sh() const -{ - return tmp - ( - new volScalarField - ( - IOobject::groupName("PaSR:Sh", this->phaseName_), - kappa_*laminar::Sh() - ) - ); -} - - -template -bool Foam::combustionModels::PaSR::read() -{ - if (laminar::read()) - { - this->coeffs().lookup("Cmix") >> Cmix_; - this->coeffs().lookup("turbulentReaction") >> turbulentReaction_; - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/PaSR/PaSR.H b/libs/combustionModels_POSTECH/PaSR/PaSR.H deleted file mode 100644 index 51614ab..0000000 --- a/libs/combustionModels_POSTECH/PaSR/PaSR.H +++ /dev/null @@ -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 . - -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 PaSR -: - public laminar -{ - // 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 R(volScalarField& Y) const; - - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const; - - //- Return source for enthalpy equation [kg/m/s3] - virtual tmp Sh() const; - - - // IO - - //- Update properties from given dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository - #include "PaSR.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/PaSR/PaSRs.C b/libs/combustionModels_POSTECH/PaSR/PaSRs.C deleted file mode 100644 index 0e52c3f..0000000 --- a/libs/combustionModels_POSTECH/PaSR/PaSRs.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "makeCombustionTypes.H" - -#include "psiChemistryCombustion.H" -#include "rhoChemistryCombustion.H" -#include "PaSR.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makeCombustionTypes(PaSR, psiChemistryCombustion, psiCombustionModel); -makeCombustionTypes(PaSR, rhoChemistryCombustion, rhoCombustionModel); - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/combustionModel/combustionModel.C b/libs/combustionModels_POSTECH/combustionModel/combustionModel.C deleted file mode 100644 index 21e81be..0000000 --- a/libs/combustionModels_POSTECH/combustionModel/combustionModel.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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("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::combustionModel::Sh() const -{ - return tmp - ( - 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) - ) - ); -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/combustionModel/combustionModel.H b/libs/combustionModels_POSTECH/combustionModel/combustionModel.H deleted file mode 100644 index 5368d1a..0000000 --- a/libs/combustionModels_POSTECH/combustionModel/combustionModel.H +++ /dev/null @@ -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 . - -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 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 R(volScalarField& Y) const = 0; - - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const = 0; - - //- Return source for enthalpy equation [kg/m/s3] - virtual tmp Sh() const; - - - // IO - - //- Update properties from given dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "combustionModelI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/combustionModel/combustionModelI.H b/libs/combustionModels_POSTECH/combustionModel/combustionModelI.H deleted file mode 100644 index e095c5f..0000000 --- a/libs/combustionModels_POSTECH/combustionModel/combustionModelI.H +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -// * * * * * * * * * * * * * * * 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_; -} - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/combustionModel/makeCombustionTypes.H b/libs/combustionModels_POSTECH/combustionModel/makeCombustionTypes.H deleted file mode 100644 index 4bf871d..0000000 --- a/libs/combustionModels_POSTECH/combustionModel/makeCombustionTypes.H +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#ifndef makeCombustionTypes_H -#define makeCombustionTypes_H - -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeCombustionTypesThermo(CombModel, CombType, Thermo, Table) \ - \ - typedef Foam::combustionModels::CombModel \ - \ - CombModel##CombType##Thermo; \ - \ - defineTemplateTypeNameAndDebugWithName \ - ( \ - CombModel##CombType##Thermo, \ - #CombModel"<"#CombType","#Thermo">", \ - 0 \ - ); \ - \ - namespace Foam \ - { \ - namespace combustionModels \ - { \ - typedef CombModel CombModel##CombType##Thermo; \ - addToRunTimeSelectionTable \ - ( \ - Table, \ - CombModel##CombType##Thermo, \ - dictionary \ - ); \ - } \ - } - - -#define makeCombustionTypes(CombModel, CombType, Table) \ - \ - typedef Foam::combustionModels::CombModel \ - \ - CombModel##CombType; \ - \ - defineTemplateTypeNameAndDebugWithName \ - ( \ - CombModel##CombType, \ - #CombModel"<"#CombType">", \ - 0 \ - ); \ - \ - namespace Foam \ - { \ - namespace combustionModels \ - { \ - typedef CombModel CombModel##CombType; \ - \ - addToRunTimeSelectionTable \ - ( \ - Table, \ - CombModel##CombType, \ - dictionary \ - ); \ - } \ - } - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/diffusion/diffusion.C b/libs/combustionModels_POSTECH/diffusion/diffusion.C deleted file mode 100644 index f78194c..0000000 --- a/libs/combustionModels_POSTECH/diffusion/diffusion.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "diffusion.H" -#include "fvcGrad.H" - -namespace Foam -{ -namespace combustionModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -diffusion::diffusion -( - const word& modelType, - const fvMesh& mesh, - const word& phaseName -) -: - singleStepCombustion - ( - modelType, - mesh, - phaseName - ), - C_(readScalar(this->coeffs().lookup("C"))), - oxidantName_(this->coeffs().template lookupOrDefault("oxidant", "O2")) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -diffusion::~diffusion() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -template -void diffusion::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 -bool diffusion::read() -{ - if (singleStepCombustion::read()) - { - this->coeffs().lookup("C") >> C_ ; - this->coeffs().readIfPresent("oxidant", oxidantName_); - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/libs/combustionModels_POSTECH/diffusion/diffusion.H b/libs/combustionModels_POSTECH/diffusion/diffusion.H deleted file mode 100644 index a3023ee..0000000 --- a/libs/combustionModels_POSTECH/diffusion/diffusion.H +++ /dev/null @@ -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 . - -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 diffusion -: - public singleStepCombustion -{ - // 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 - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/diffusion/diffusions.C b/libs/combustionModels_POSTECH/diffusion/diffusions.C deleted file mode 100644 index e358c96..0000000 --- a/libs/combustionModels_POSTECH/diffusion/diffusions.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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 -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/libs/combustionModels_POSTECH/infinitelyFastChemistry/infinitelyFastChemistry.C b/libs/combustionModels_POSTECH/infinitelyFastChemistry/infinitelyFastChemistry.C deleted file mode 100644 index 6262682..0000000 --- a/libs/combustionModels_POSTECH/infinitelyFastChemistry/infinitelyFastChemistry.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "infinitelyFastChemistry.H" - -namespace Foam -{ -namespace combustionModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -infinitelyFastChemistry::infinitelyFastChemistry -( - const word& modelType, - const fvMesh& mesh, - const word& phaseName -) -: - singleStepCombustion - ( - modelType, - mesh, - phaseName - ), - C_(readScalar(this->coeffs().lookup("C"))) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -infinitelyFastChemistry::~infinitelyFastChemistry() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -template -void infinitelyFastChemistry::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 -bool infinitelyFastChemistry::read() -{ - if (singleStepCombustion::read()) - { - this->coeffs().lookup("C") >> C_ ; - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/libs/combustionModels_POSTECH/infinitelyFastChemistry/infinitelyFastChemistry.H b/libs/combustionModels_POSTECH/infinitelyFastChemistry/infinitelyFastChemistry.H deleted file mode 100644 index 08dec40..0000000 --- a/libs/combustionModels_POSTECH/infinitelyFastChemistry/infinitelyFastChemistry.H +++ /dev/null @@ -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 . - -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 infinitelyFastChemistry -: - public singleStepCombustion -{ - // 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 - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/infinitelyFastChemistry/infinitelyFastChemistrys.C b/libs/combustionModels_POSTECH/infinitelyFastChemistry/infinitelyFastChemistrys.C deleted file mode 100644 index 95e5a79..0000000 --- a/libs/combustionModels_POSTECH/infinitelyFastChemistry/infinitelyFastChemistrys.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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 -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/libs/combustionModels_POSTECH/laminar/laminar.C b/libs/combustionModels_POSTECH/laminar/laminar.C deleted file mode 100644 index 155c8bf..0000000 --- a/libs/combustionModels_POSTECH/laminar/laminar.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "laminar.H" -#include "fvmSup.H" -#include "localEulerDdtScheme.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::combustionModels::laminar::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 -Foam::combustionModels::laminar::~laminar() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -template -Foam::tmp -Foam::combustionModels::laminar::tc() const -{ - return this->chemistryPtr_->tc(); -} - - -template -void Foam::combustionModels::laminar::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 -Foam::tmp -Foam::combustionModels::laminar::R(volScalarField& Y) const -{ - tmp 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 -Foam::tmp -Foam::combustionModels::laminar::dQ() const -{ - tmp 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 -Foam::tmp -Foam::combustionModels::laminar::Sh() const -{ - tmp 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 -bool Foam::combustionModels::laminar::read() -{ - if (Type::read()) - { - this->coeffs().lookup("integrateReactionRate") - >> integrateReactionRate_; - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/laminar/laminar.H b/libs/combustionModels_POSTECH/laminar/laminar.H deleted file mode 100644 index 0caf5a8..0000000 --- a/libs/combustionModels_POSTECH/laminar/laminar.H +++ /dev/null @@ -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 . - -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 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 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 R(volScalarField& Y) const; - - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const; - - //- Return source for enthalpy equation [kg/m/s3] - virtual tmp Sh() const; - - - // IO - - //- Update properties from given dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository - #include "laminar.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/laminar/laminars.C b/libs/combustionModels_POSTECH/laminar/laminars.C deleted file mode 100644 index 73d400c..0000000 --- a/libs/combustionModels_POSTECH/laminar/laminars.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "makeCombustionTypes.H" - -#include "psiChemistryCombustion.H" -#include "rhoChemistryCombustion.H" -#include "laminar.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makeCombustionTypes(laminar, psiChemistryCombustion, psiCombustionModel); -makeCombustionTypes(laminar, rhoChemistryCombustion, rhoCombustionModel); - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/noCombustion/noCombustion.C b/libs/combustionModels_POSTECH/noCombustion/noCombustion.C deleted file mode 100644 index f594775..0000000 --- a/libs/combustionModels_POSTECH/noCombustion/noCombustion.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "noCombustion.H" -#include "fvmSup.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::combustionModels::noCombustion::noCombustion -( - const word& modelType, - const fvMesh& mesh, - const word& phaseName -) -: - CombThermoType(modelType, mesh, phaseName) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::combustionModels::noCombustion::~noCombustion() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -template -void Foam::combustionModels::noCombustion::correct() -{ -// Do Nothing -} - - -template -Foam::tmp -Foam::combustionModels::noCombustion::R -( - volScalarField& Y -) const -{ - tmp tSu - ( - new fvScalarMatrix(Y, dimMass/dimTime) - ); - - return tSu; -} - - -template -Foam::tmp -Foam::combustionModels::noCombustion::dQ() const -{ - tmp 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 -Foam::tmp -Foam::combustionModels::noCombustion::Sh() const -{ - tmp 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 -bool Foam::combustionModels::noCombustion::read() -{ - if (CombThermoType::read()) - { - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/noCombustion/noCombustion.H b/libs/combustionModels_POSTECH/noCombustion/noCombustion.H deleted file mode 100644 index 7e7a3b3..0000000 --- a/libs/combustionModels_POSTECH/noCombustion/noCombustion.H +++ /dev/null @@ -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 . - -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 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 R(volScalarField& Y) const; - - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const; - - //- Return source for enthalpy equation [kg/m/s3] - virtual tmp Sh() const; - - // IO - - //- Update properties from given dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository - #include "noCombustion.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/noCombustion/noCombustions.C b/libs/combustionModels_POSTECH/noCombustion/noCombustions.C deleted file mode 100644 index 516e5af..0000000 --- a/libs/combustionModels_POSTECH/noCombustion/noCombustions.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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 -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/libs/combustionModels_POSTECH/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C b/libs/combustionModels_POSTECH/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C deleted file mode 100644 index 4b163dc..0000000 --- a/libs/combustionModels_POSTECH/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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::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::combustionModels::psiChemistryCombustion::rho() const -{ - return chemistryPtr_->thermo().rho(); -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.H b/libs/combustionModels_POSTECH/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.H deleted file mode 100644 index 761658d..0000000 --- a/libs/combustionModels_POSTECH/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.H +++ /dev/null @@ -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 . - -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 chemistryPtr_; - - -public: - - // Constructors - - //- Construct from components and thermo - psiChemistryCombustion - ( - const word& modelType, - const fvMesh& mesh, - const word& phaseName - ); - - - //- Destructor - virtual ~psiChemistryCombustion(); - - - // Member Functions - autoPtr 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 rho() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/psiCombustionModel/psiCombustionModel/psiCombustionModel.C b/libs/combustionModels_POSTECH/psiCombustionModel/psiCombustionModel/psiCombustionModel.C deleted file mode 100644 index 1ecc201..0000000 --- a/libs/combustionModels_POSTECH/psiCombustionModel/psiCombustionModel/psiCombustionModel.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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; - } -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/psiCombustionModel/psiCombustionModel/psiCombustionModel.H b/libs/combustionModels_POSTECH/psiCombustionModel/psiCombustionModel/psiCombustionModel.H deleted file mode 100644 index 14a73d8..0000000 --- a/libs/combustionModels_POSTECH/psiCombustionModel/psiCombustionModel/psiCombustionModel.H +++ /dev/null @@ -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 . - -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 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 RR(label i) const - { - return tmp (NULL); - } - - //- Return tmp of rho - virtual tmp rho() const = 0; - - - // IO - - //- Update properties from given dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C b/libs/combustionModels_POSTECH/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C deleted file mode 100644 index 59789b4..0000000 --- a/libs/combustionModels_POSTECH/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "psiCombustionModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -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(cstrIter()(className, mesh, phaseName)); -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C b/libs/combustionModels_POSTECH/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C deleted file mode 100644 index 6d45d60..0000000 --- a/libs/combustionModels_POSTECH/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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::combustionModels::psiThermoCombustion::rho() const -{ - return thermoPtr_->rho(); -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.H b/libs/combustionModels_POSTECH/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.H deleted file mode 100644 index 44a5515..0000000 --- a/libs/combustionModels_POSTECH/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.H +++ /dev/null @@ -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 . - -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 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 rho() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C b/libs/combustionModels_POSTECH/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C deleted file mode 100644 index 38efabb..0000000 --- a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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::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::combustionModels::rhoChemistryCombustion::rho() const -{ - return chemistryPtr_->thermo().rho(); -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.H b/libs/combustionModels_POSTECH/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.H deleted file mode 100644 index 235f91e..0000000 --- a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.H +++ /dev/null @@ -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 . - -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 chemistryPtr_; - - -public: - - // Constructors - - //- Construct from components and thermo - rhoChemistryCombustion - ( - const word& modelType, - const fvMesh& mesh, - const word& phaseName - ); - - - //- Destructor - virtual ~rhoChemistryCombustion(); - - - // Member Functions - autoPtr 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 rho() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.C b/libs/combustionModels_POSTECH/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.C deleted file mode 100644 index 531b169..0000000 --- a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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; - } -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.H b/libs/combustionModels_POSTECH/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.H deleted file mode 100644 index 341b5b6..0000000 --- a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.H +++ /dev/null @@ -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 . - -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 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 rho() const = 0; - - - // IO - - //- Update properties from given dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C b/libs/combustionModels_POSTECH/rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C deleted file mode 100644 index 4a23b50..0000000 --- a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "rhoCombustionModel.H" - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr -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 (cstrIter()(className, mesh, phaseName)); -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C b/libs/combustionModels_POSTECH/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C deleted file mode 100644 index ef95710..0000000 --- a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#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::combustionModels::rhoThermoCombustion::rho() const -{ - return thermoPtr_().rho(); -} - - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.H b/libs/combustionModels_POSTECH/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.H deleted file mode 100644 index 6982569..0000000 --- a/libs/combustionModels_POSTECH/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.H +++ /dev/null @@ -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 . - -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 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 rho() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/libs/combustionModels_POSTECH/singleStepCombustion/singleStepCombustion.C b/libs/combustionModels_POSTECH/singleStepCombustion/singleStepCombustion.C deleted file mode 100644 index 8df2f32..0000000 --- a/libs/combustionModels_POSTECH/singleStepCombustion/singleStepCombustion.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "singleStepCombustion.H" -#include "fvmSup.H" - -namespace Foam -{ -namespace combustionModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -singleStepCombustion::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>(this->thermo())) - { - singleMixturePtr_ = - &dynamic_cast&> - ( - 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 -singleStepCombustion::~singleStepCombustion() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -template -tmp singleStepCombustion::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 -tmp -singleStepCombustion::Sh() const -{ - const label fuelI = singleMixturePtr_->fuelIndex(); - volScalarField& YFuel = - const_cast(this->thermoPtr_->composition().Y(fuelI)); - - return -singleMixturePtr_->qFuel()*(R(YFuel) & YFuel); -} - - -template -tmp -singleStepCombustion::dQ() const -{ - tmp 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 -bool singleStepCombustion::read() -{ - if (CombThermoType::read()) - { - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/libs/combustionModels_POSTECH/singleStepCombustion/singleStepCombustion.H b/libs/combustionModels_POSTECH/singleStepCombustion/singleStepCombustion.H deleted file mode 100644 index 404bfe1..0000000 --- a/libs/combustionModels_POSTECH/singleStepCombustion/singleStepCombustion.H +++ /dev/null @@ -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 . - -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 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* 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 R(volScalarField& Y) const; - - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const; - - //- Sensible enthalpy source term - virtual tmp Sh() const; - - - // IO - - //- Update properties from given dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository - #include "singleStepCombustion.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/solvers_post/LagrangianCMCFoam/LagrangianCMCFoam.C b/solvers_post/LagrangianCMCFoam/LagrangianCMCFoam.C index 8a49cbc..3a48adc 100644 --- a/solvers_post/LagrangianCMCFoam/LagrangianCMCFoam.C +++ b/solvers_post/LagrangianCMCFoam/LagrangianCMCFoam.C @@ -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" diff --git a/solvers_post/LagrangianCMCFoam/Make/options b/solvers_post/LagrangianCMCFoam/Make/options index 8da350c..561364d 100644 --- a/solvers_post/LagrangianCMCFoam/Make/options +++ b/solvers_post/LagrangianCMCFoam/Make/options @@ -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 \ diff --git a/solvers_post/LagrangianCMCFoam/createFields.H b/solvers_post/LagrangianCMCFoam/createFields.H index 6fb50cd..ec343cf 100644 --- a/solvers_post/LagrangianCMCFoam/createFields.H +++ b/solvers_post/LagrangianCMCFoam/createFields.H @@ -1,13 +1,7 @@ Info<< "Creating reaction model\n" << endl; -combustionModels::psiCombustionModel* pRxnCMC = (combustionModels::psiCombustionModel::New(mesh)).ptr(); +autoPtr chemistry(psiChemistryModel::New(mesh)); -autoPtr reaction -( - dynamic_cast (pRxnCMC) -); - -autoPtr chemistry = reaction->chem(); psiReactionThermo& thermo = chemistry->thermo(); thermo.validate(args.executable(), "ha"); @@ -83,9 +77,6 @@ autoPtr turbulence ) ); -// Set the turbulence into the reaction model -reaction->setTurbulence(turbulence()); - Info<< "Creating field dpdt\n" << endl; volScalarField dpdt diff --git a/solvers_post/LagrangianCMCSprayFoam/LagrangianCMCSprayFoam.C b/solvers_post/LagrangianCMCSprayFoam/LagrangianCMCSprayFoam.C index d0df6c1..8fdca99 100644 --- a/solvers_post/LagrangianCMCSprayFoam/LagrangianCMCSprayFoam.C +++ b/solvers_post/LagrangianCMCSprayFoam/LagrangianCMCSprayFoam.C @@ -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" diff --git a/solvers_post/LagrangianCMCSprayFoam/createFields.H b/solvers_post/LagrangianCMCSprayFoam/createFields.H index 9762694..318dcc0 100644 --- a/solvers_post/LagrangianCMCSprayFoam/createFields.H +++ b/solvers_post/LagrangianCMCSprayFoam/createFields.H @@ -2,14 +2,8 @@ Info<< "Creating combustion model\n" << endl; -combustionModels::psiCombustionModel* pRxnCMC = (combustionModels::psiCombustionModel::New(mesh)).ptr(); +autoPtr chemistry(psiChemistryModel::New(mesh)); -autoPtr reaction -( - dynamic_cast (pRxnCMC) -); - -autoPtr chemistry = reaction->chem(); psiReactionThermo& thermo = chemistry->thermo(); thermo.validate(args.executable(), "h", "e"); @@ -94,9 +88,6 @@ autoPtr turbulence ) ); -// Set the turbulence into the combustion model -reaction->setTurbulence(turbulence()); - Info<< "Creating field dpdt\n" << endl; volScalarField dpdt ( diff --git a/solvers_post/LagrangianCMCdieselEngineFoam4x/LagrangianCMCdieselEngineFoam.C b/solvers_post/LagrangianCMCdieselEngineFoam4x/LagrangianCMCdieselEngineFoam.C index 7d567ae..e546cd4 100644 --- a/solvers_post/LagrangianCMCdieselEngineFoam4x/LagrangianCMCdieselEngineFoam.C +++ b/solvers_post/LagrangianCMCdieselEngineFoam4x/LagrangianCMCdieselEngineFoam.C @@ -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" diff --git a/solvers_post/LagrangianCMCdieselEngineFoam4x/Make/options b/solvers_post/LagrangianCMCdieselEngineFoam4x/Make/options index 5e47ac3..70b3738 100644 --- a/solvers_post/LagrangianCMCdieselEngineFoam4x/Make/options +++ b/solvers_post/LagrangianCMCdieselEngineFoam4x/Make/options @@ -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 \ diff --git a/solvers_post/LagrangianCMCdieselEngineFoam4x/createFields.H b/solvers_post/LagrangianCMCdieselEngineFoam4x/createFields.H index 68bd293..0da91f9 100644 --- a/solvers_post/LagrangianCMCdieselEngineFoam4x/createFields.H +++ b/solvers_post/LagrangianCMCdieselEngineFoam4x/createFields.H @@ -1,14 +1,8 @@ #include "readGravitationalAcceleration.H" Info<< "Creating reaction model\n" << endl; -combustionModels::psiCombustionModel* pRxnCMC = (combustionModels::psiCombustionModel::New(mesh)).ptr(); +autoPtr chemistry(psiChemistryModel::New(mesh)); -autoPtr reaction -( - dynamic_cast (pRxnCMC) -); - -autoPtr chemistry = reaction->chem(); psiReactionThermo& thermo = chemistry->thermo(); thermo.validate(args.executable(), "h", "e"); @@ -93,9 +87,6 @@ autoPtr turbulence ) ); -// Set the turbulence into the reaction model -reaction->setTurbulence(turbulence()); - Info<< "Creating field dpdt\n" << endl; volScalarField dpdt