diff --git a/applications/solvers/combustion/fireFoam/Allwclean b/applications/solvers/combustion/fireFoam/Allwclean deleted file mode 100755 index 713a0552018db8ec0774d506ed003e54a58054df..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/Allwclean +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # run from this directory -set -x - -wclean libso combustionModels -wclean - -# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/combustion/fireFoam/Allwmake b/applications/solvers/combustion/fireFoam/Allwmake deleted file mode 100755 index f32c72860dbd12c0d8ea29e4b94bc36fb7b85547..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/Allwmake +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # run from this directory -set -x - -wmake libso combustionModels -wmake - -# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/combustion/fireFoam/Make/files b/applications/solvers/combustion/fireFoam/Make/files index 826d736bd0f66081e00d868f15363948aa6211a5..2d50e5e7650b2b6cb48440ca6b6ddebbc91f4f2d 100644 --- a/applications/solvers/combustion/fireFoam/Make/files +++ b/applications/solvers/combustion/fireFoam/Make/files @@ -1,4 +1,3 @@ fireFoam.C EXE = $(FOAM_APPBIN)/fireFoam - diff --git a/applications/solvers/combustion/fireFoam/Make/options b/applications/solvers/combustion/fireFoam/Make/options index 9f7a66b39e38bd6c8e73320f22a01b59bd83e2a9..cf5b4b09764eea8074ad571a9942bbb1b7b61924 100644 --- a/applications/solvers/combustion/fireFoam/Make/options +++ b/applications/solvers/combustion/fireFoam/Make/options @@ -1,20 +1,52 @@ EXE_INC = \ - -IcombustionModels/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I${LIB_SRC}/meshTools/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ - -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude + -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude \ + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/regionModels/pyrolysisModels/lnInclude \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ - -lfireFoamCombustionModels \ - -lspecie \ - -lreactionThermophysicalModels \ - -lbasicThermophysicalModels \ -lfiniteVolume \ - -lcompressibleTurbulenceModel \ - -lcompressibleLESModels \ + -lmeshTools \ -lcompressibleRASModels \ - -lradiationModels + -lcompressibleLESModels \ + -lspecie \ + -lbasicThermophysicalModels \ + -lsolidProperties \ + -lsolidMixtureProperties \ + -lthermophysicalFunctions \ + -lreactionThermophysicalModels \ + -lSLGThermo \ + -lchemistryModel \ + -lsolidChemistryModel \ + -lcombustionModels \ + -lregionModels \ + -lradiationModels \ + -lsurfaceFilmModels \ + -lpyrolysisModels \ + -llagrangianIntermediate \ + -lODE \ + -lsampling diff --git a/applications/solvers/combustion/fireFoam/UEqn.H b/applications/solvers/combustion/fireFoam/UEqn.H index c4a865300d2b26df03a76af95d0710d60a9f5818..a64e50a2d24d19b3f1dd25e4bc73acbcfc27a356 100644 --- a/applications/solvers/combustion/fireFoam/UEqn.H +++ b/applications/solvers/combustion/fireFoam/UEqn.H @@ -1,24 +1,26 @@ -fvVectorMatrix UEqn -( - fvm::ddt(rho, U) - + fvm::div(phi, U) - + turbulence->divDevRhoReff(U) -); + fvVectorMatrix UEqn + ( + fvm::ddt(rho, U) + + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) + == + parcels.SU(U) + ); -UEqn.relax(); + UEqn.relax(); -if (pimple.momentumPredictor()) -{ - solve - ( - UEqn - == - fvc::reconstruct + if (pimple.momentumPredictor()) + { + solve ( + UEqn + == + fvc::reconstruct ( - - ghf*fvc::snGrad(rho) - - fvc::snGrad(p_rgh) - )*mesh.magSf() - ) - ); -} + ( + - ghf*fvc::snGrad(rho) + - fvc::snGrad(p_rgh) + )*mesh.magSf() + ) + ); + } diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/YhsEqn.H b/applications/solvers/combustion/fireFoam/YhsEqn.H similarity index 100% rename from applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/YhsEqn.H rename to applications/solvers/combustion/fireFoam/YhsEqn.H diff --git a/applications/solvers/combustion/fireFoam/combustionModels/Make/files b/applications/solvers/combustion/fireFoam/combustionModels/Make/files deleted file mode 100644 index bef447f0b0d9bf3da970aca33fdb029843e3ca33..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/combustionModels/Make/files +++ /dev/null @@ -1,9 +0,0 @@ -combustionModel/combustionModel.C -combustionModel/newCombustionModel.C - -infinitelyFastChemistry/infinitelyFastChemistry.C - -noCombustion/noCombustion.C - -LIB = $(FOAM_LIBBIN)/libfireFoamCombustionModels - diff --git a/applications/solvers/combustion/fireFoam/combustionModels/Make/options b/applications/solvers/combustion/fireFoam/combustionModels/Make/options deleted file mode 100644 index 3f557113c4810506ff138816c8473206d06f49fb..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/combustionModels/Make/options +++ /dev/null @@ -1,9 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(FOAM_SRC)/turbulenceModels/compressible/turbulenceModel \ - -I$(FOAM_SRC)/finiteVolume/lnInclude - -LIB_LIBS = \ - -lfiniteVolume diff --git a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.C b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.C deleted file mode 100644 index bd5f92db36b6f486efc507d22fb1e73b4de094e2..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.C +++ /dev/null @@ -1,108 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "combustionModel.H" -#include "fvm.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(combustionModel, 0); - defineRunTimeSelectionTable(combustionModel, dictionary); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::combustionModel::combustionModel -( - const dictionary& combustionProperties, - const hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho -) -: - combustionModelCoeffs_ - ( - combustionProperties.subDict - ( - word(combustionProperties.lookup("combustionModel")) + "Coeffs" - ) - ), - thermo_(thermo), - turbulence_(turbulence), - mesh_(phi.mesh()), - phi_(phi), - rho_(rho), - stoicRatio_(thermo.lookup("stoichiometricAirFuelMassRatio")), - s_(thermo.lookup("stoichiometricOxygenFuelMassRatio")), - qFuel_(thermo_.lookup("qFuel")), - composition_(thermo.composition()) -{} - - -// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // - -Foam::combustionModel::~combustionModel() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -Foam::tmp<Foam::fvScalarMatrix> -Foam::combustionModel::combustionModel::R(volScalarField& fu) const -{ - const basicMultiComponentMixture& composition = thermo_.composition(); - const volScalarField& ft = composition.Y("ft"); - volScalarField fres(composition.fres(ft, stoicRatio_.value())); - volScalarField wFuelNorm(this->wFuelNorm()*pos(fu - fres)); - - return wFuelNorm*fres - fvm::Sp(wFuelNorm, fu); -} - - -Foam::tmp<Foam::volScalarField> Foam::combustionModel::combustionModel::dQ -( - const fvScalarMatrix& Rfu -) const -{ - const basicMultiComponentMixture& composition = thermo_.composition(); - const volScalarField& fu = composition.Y("fu"); - - return (-qFuel_)*(Rfu & fu); -} - - -bool Foam::combustionModel::read(const dictionary& combustionProperties) -{ - combustionModelCoeffs_ = combustionProperties.subDict(type() + "Coeffs"); - - return true; -} - - -// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.H b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.H deleted file mode 100644 index 1aa44ffcad15cf0e5d9ce903263e2ea4767c40c5..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.H +++ /dev/null @@ -1,209 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::combustionModel - -Description - Base class for all non-premixed combustion models. - -SourceFiles - combustionModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef combustionModel_H -#define combustionModel_H - -#include "IOdictionary.H" -#include "hsCombustionThermo.H" -#include "turbulenceModel.H" -#include "multivariateSurfaceInterpolationScheme.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class combustionModel Declaration -\*---------------------------------------------------------------------------*/ - -class combustionModel -{ - -protected: - - // Protected data - - //- Dictionary of coefficients for the particular model - dictionary combustionModelCoeffs_; - - //- Reference to the thermodynamic - const hsCombustionThermo& thermo_; - - //- Reference to the turbulence model - const compressible::turbulenceModel& turbulence_; - - //- Reference to the mesh database - const fvMesh& mesh_; - - //- Reference to mass-flux field - const surfaceScalarField& phi_; - - //- Reference to the density field - const volScalarField& rho_; - - //- Stoichiometric air-fuel mass ratio - dimensionedScalar stoicRatio_; - - //- Stoichiometric oxygen-fuel mass ratio - dimensionedScalar s_; - - //- Heat of combustion (J/Kg) - dimensionedScalar qFuel_; - - -private: - - // Private Member Functions - - //- Disallow copy construct - combustionModel(const combustionModel&); - - //- Disallow default bitwise assignment - void operator=(const combustionModel&); - - const basicMultiComponentMixture& composition_; - - -public: - - //- Runtime type information - TypeName("combustionModel"); - - - // Declare run-time constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - combustionModel, - dictionary, - ( - const dictionary& combustionProperties, - const hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho - ), - ( - combustionProperties, - thermo, - turbulence, - phi, - rho - ) - ); - - - // Selectors - - //- Return a reference to the selected combustion model - static autoPtr<combustionModel> New - ( - const dictionary& combustionProperties, - const hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho - ); - - - // Constructors - - //- Construct from components - combustionModel - ( - const dictionary& combustionProperties, - const hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho - ); - - - //- Destructor - virtual ~combustionModel(); - - - // Member Functions - - // Access functions - - //- Access composition - const basicMultiComponentMixture& composition() const - { - return composition_; - } - - //- Access combustion dictionary - const dictionary combustionModelCoeffs() const - { - return combustionModelCoeffs_; - } - - //- Access heat of combustion - const dimensionedScalar qFuel() const - { - return qFuel_; - } - - //- Return normalised consumption rate of (fu - fres) - virtual tmp<volScalarField> wFuelNorm() const = 0; - - //- Fuel consumption rate matrix i.e. source-term for the fuel equation - virtual tmp<fvScalarMatrix> R(volScalarField& fu) const; - - //- Heat-release rate calculated from the given - // fuel consumption rate matrix - virtual tmp<volScalarField> dQ(const fvScalarMatrix& Rfu) const; - - //- Correct combustion rate - virtual void correct() = 0; - - //- Update properties from given dictionary - virtual bool read(const dictionary& combustionProperties) = 0; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/newCombustionModel.C b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/newCombustionModel.C deleted file mode 100644 index 7164844577ba4227e75ae3db3e9dfbd57e49e70a..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/newCombustionModel.C +++ /dev/null @@ -1,66 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "combustionModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New -( - const dictionary& combustionProperties, - const hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho -) -{ - word combustionModelTypeName = combustionProperties.lookup - ( - "combustionModel" - ); - - Info<< "Selecting combustion model " << combustionModelTypeName << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(combustionModelTypeName); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "combustionModel::New" - ) << "Unknown combustionModel type " - << combustionModelTypeName << endl << endl - << "Valid combustionModels are : " << endl - << dictionaryConstructorTablePtr_->sortedToc() - << exit(FatalError); - } - - return autoPtr<combustionModel> - (cstrIter()(combustionProperties, thermo, turbulence, phi, rho)); -} - - -// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C b/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C deleted file mode 100644 index f147911f765fa2ee94ffbaceffb3978bda4c362d..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C +++ /dev/null @@ -1,93 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "infinitelyFastChemistry.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ -namespace combustionModels -{ - defineTypeNameAndDebug(infinitelyFastChemistry, 0); - addToRunTimeSelectionTable - ( - combustionModel, - infinitelyFastChemistry, - dictionary - ); -} -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::combustionModels::infinitelyFastChemistry::infinitelyFastChemistry -( - const dictionary& combustionProperties, - const hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho -) -: - combustionModel(combustionProperties, thermo, turbulence, phi, rho), - C_(readScalar(combustionModelCoeffs_.lookup("C"))) -{} - - -// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // - -Foam::combustionModels::infinitelyFastChemistry::~infinitelyFastChemistry() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -void Foam::combustionModels::infinitelyFastChemistry::correct() -{} - - -Foam::tmp<Foam::volScalarField> -Foam::combustionModels::infinitelyFastChemistry::wFuelNorm() const -{ - return rho_/(mesh_.time().deltaT()*C_); -} - - -bool Foam::combustionModels::infinitelyFastChemistry::read -( - const dictionary& combustionProperties -) -{ - combustionModel::read(combustionProperties); - combustionModelCoeffs_.lookup("C") >> C_ ; - - return true; -} - - -// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H b/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H deleted file mode 100644 index 80d55328dfe295d8deaa61ff9df46e4d65adf75f..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H +++ /dev/null @@ -1,118 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::combustionModels::infinitelyFastChemistry - -Description - Simple infinitely fast chemistry combustion model based on the principle - mixed is burnt. Additional parameter C is used to distribute the heat - release rate.in time - -SourceFiles - infinitelyFastChemistry.C - -\*---------------------------------------------------------------------------*/ - -#ifndef infinitelyFastChemistry_H -#define infinitelyFastChemistry_H - -#include "fvc.H" -#include "combustionModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace combustionModels -{ - -/*---------------------------------------------------------------------------*\ - Class infinitelyFastChemistry Declaration -\*---------------------------------------------------------------------------*/ - -class infinitelyFastChemistry -: - public combustionModel -{ - // 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 dictionary& combustionProperties, - const hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho - ); - - - // Destructor - - virtual ~infinitelyFastChemistry(); - - - // Member Functions - - //- Update properties from given dictionary - virtual bool read(const dictionary& combustionProperties); - - //- Correct combustion rate - virtual void correct(); - - //- Return normalised consumption rate of (fu - fres) - virtual tmp<volScalarField> wFuelNorm() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.C b/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.C deleted file mode 100644 index fd709b75e1699acf92b3c95d469f28ed43ff7fd5..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.C +++ /dev/null @@ -1,102 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "noCombustion.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ -namespace combustionModels -{ - defineTypeNameAndDebug(noCombustion, 0); - addToRunTimeSelectionTable - ( - combustionModel, - noCombustion, - dictionary - ); -} -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::combustionModels::noCombustion::noCombustion -( - const dictionary& combustionProperties, - const hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho -) -: - combustionModel(combustionProperties, thermo, turbulence, phi, rho) -{} - - -// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // - -Foam::combustionModels::noCombustion::~noCombustion() -{} - - -void Foam::combustionModels::noCombustion::correct() -{} - - -Foam::tmp<Foam::volScalarField> -Foam::combustionModels::noCombustion::wFuelNorm() const -{ - return tmp<Foam::volScalarField> - ( - new volScalarField - ( - IOobject - ( - "wFuelNorm", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("wFuelNorm", dimMass/dimTime/pow3(dimLength), 0.0) - ) - ); -} - - -bool Foam::combustionModels::noCombustion::read -( - const dictionary& combustionProperties -) -{ - return combustionModel::read(combustionProperties); -} - - -// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H b/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H deleted file mode 100644 index 2ae12b891c507ae3b3671642eb239ebe8d81e411..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H +++ /dev/null @@ -1,112 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::combustionModel::noCombustion - -Description - No combustion - -SourceFiles - noCombustion.C - -\*---------------------------------------------------------------------------*/ - -#ifndef noCombustion_H -#define noCombustion_H - -#include "combustionModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace combustionModels -{ - -/*---------------------------------------------------------------------------*\ - Class noCombustion Declaration -\*---------------------------------------------------------------------------*/ - -class noCombustion -: - public combustionModel -{ - // Private data - - - // Private Member Functions - - //- 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 dictionary& combustionProperties, - const hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho - ); - - - // Destructor - - virtual ~noCombustion(); - - // Member Functions - - //- Update properties from given dictionary - virtual bool read(const dictionary& combustionProperties); - - //- Correct combustion rate - virtual void correct(); - - //- Return normalised consumption rate of (fu - fres) - virtual tmp<volScalarField> wFuelNorm() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/createClouds.H b/applications/solvers/combustion/fireFoam/createClouds.H similarity index 100% rename from applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/createClouds.H rename to applications/solvers/combustion/fireFoam/createClouds.H diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index 73686c56682d8c2734550e4df957577109454894..f1e152dc320b47f428e326350f66aae48c947338 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -1,147 +1,154 @@ -Info<< "Reading thermophysical properties\n" << endl; + Info<< "Reading thermophysical properties\n" << endl; -autoPtr<hsCombustionThermo> pThermo -( - hsCombustionThermo::New(mesh) -); - -hsCombustionThermo& thermo = pThermo(); - -basicMultiComponentMixture& composition = thermo.composition(); - -volScalarField rho -( - IOobject + autoPtr<hsCombustionThermo> pThermo ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - thermo.rho() -); - -dimensionedScalar stoicRatio -( - thermo.lookup("stoichiometricAirFuelMassRatio") -); - -volScalarField& p = thermo.p(); -volScalarField& hs = thermo.hs(); + hsCombustionThermo::New(mesh) + ); + hsCombustionThermo& thermo = pThermo(); -const volScalarField& psi = thermo.psi(); + SLGThermo slgThermo(mesh, thermo); -volScalarField& ft = composition.Y("ft"); -volScalarField& fu = composition.Y("fu"); + basicMultiComponentMixture& composition = thermo.composition(); + PtrList<volScalarField>& Y = composition.Y(); + const word inertSpecie(thermo.lookup("inertSpecie")); -Info<< "Reading field U\n" << endl; - -volVectorField U -( - IOobject + Info<< "Creating field rho\n" << endl; + volScalarField rho ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh -); - -#include "compressibleCreatePhi.H" - -Info<< "Creating turbulence model\n" << endl; -autoPtr<compressible::turbulenceModel> turbulence -( - compressible::turbulenceModel::New(rho, U, phi, thermo) -); - -IOdictionary combustionProperties -( - IOobject + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + thermo.rho() + ); + + volScalarField& p = thermo.p(); + volScalarField& hs = thermo.hs(); + const volScalarField& T = thermo.T(); + const volScalarField& psi = thermo.psi(); + + Info<< "\nReading field U\n" << endl; + volVectorField U ( - "combustionProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) -); - -Info<< "Creating combustion model\n" << endl; -autoPtr<combustionModel> combustion -( - combustionModel::combustionModel::New + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + #include "compressibleCreatePhi.H" + + Info<< "Creating turbulence model\n" << endl; + autoPtr<compressible::turbulenceModel> turbulence ( - combustionProperties, - thermo, - turbulence(), - phi, - rho - ) -); - - -Info<< "Calculating field g.h\n" << endl; -volScalarField gh("gh", g & mesh.C()); -surfaceScalarField ghf("gh", g & mesh.Cf()); - -Info<< "Reading field p_rgh\n" << endl; -volScalarField p_rgh -( - IOobject + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) + ); + + IOdictionary combustionProperties ( - "p_rgh", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh -); - -// Force p_rgh to be consistent with p -p_rgh = p - rho*gh; - - -volScalarField dQ -( - IOobject + IOobject + ( + "combustionProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) + ); + + Info<< "Creating combustion model\n" << endl; + autoPtr<combustionModel> combustion + ( + combustionModel::combustionModel::New + ( + combustionProperties, + thermo, + turbulence(), + phi, + rho + ) + ); + + volScalarField dQ ( - "dQ", - runTime.timeName(), + IOobject + ( + "dQ", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("dQ", dimMass/pow3(dimTime)/dimLength, 0.0) -); - - -Info<< "Creating field DpDt\n" << endl; -volScalarField DpDt -( - fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p) -); - - -dimensionedScalar initialMass = fvc::domainIntegrate(rho); + dimensionedScalar("dQ", dimMass/pow3(dimTime)/dimLength, 0.0) + ); + Info<< "Creating field DpDt\n" << endl; + volScalarField DpDt + ( + "DpDt", + fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p) + ); -multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; -if (composition.contains("ft")) -{ - fields.add(composition.Y("ft")); -} + Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); -if (composition.contains("fu")) -{ - fields.add(composition.Y("fu")); -} + surfaceScalarField ghf("ghf", g & mesh.Cf()); -fields.add(hs); + volScalarField p_rgh + ( + IOobject + ( + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + // Force p_rgh to be consistent with p + p_rgh = p - rho*gh; + + multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; + + forAll(Y, i) + { + fields.add(Y[i]); + } + fields.add(hs); + + IOdictionary additionalControlsDict + ( + IOobject + ( + "additionalControls", + runTime.constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) + ); + + Switch solvePrimaryRegion + ( + additionalControlsDict.lookup("solvePrimaryRegion") + ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/createPyrolysisModel.H b/applications/solvers/combustion/fireFoam/createPyrolysisModel.H similarity index 100% rename from applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/createPyrolysisModel.H rename to applications/solvers/combustion/fireFoam/createPyrolysisModel.H diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/createSurfaceFilmModel.H b/applications/solvers/combustion/fireFoam/createSurfaceFilmModel.H similarity index 99% rename from applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/createSurfaceFilmModel.H rename to applications/solvers/combustion/fireFoam/createSurfaceFilmModel.H index 1db870f0aa76f02a89cc98748782f97fd0f1242b..8ddcc77a5f00eaf83c912e5bf90de389fb336a7f 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/createSurfaceFilmModel.H +++ b/applications/solvers/combustion/fireFoam/createSurfaceFilmModel.H @@ -4,4 +4,3 @@ typedef regionModels::surfaceFilmModels::surfaceFilmModel filmModelType; autoPtr<filmModelType> tsurfaceFilm(filmModelType::New(mesh, g)); filmModelType& surfaceFilm = tsurfaceFilm(); - diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C index a517eccde11383f0a6f4215df73f821917d55405..7c58a722d1676bfa6a6845e754df62344e9c386a 100644 --- a/applications/solvers/combustion/fireFoam/fireFoam.C +++ b/applications/solvers/combustion/fireFoam/fireFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,15 +25,22 @@ Application fireFoam Description - Transient Solver for Fires and turbulent diffusion flames + Transient PIMPLE solver for Fires and turbulent diffusion flames with + reacting Lagrangian parcels, surface film and pyrolysis modelling. \*---------------------------------------------------------------------------*/ +#include "mapDistribute.H" #include "fvCFD.H" -#include "hsCombustionThermo.H" #include "turbulenceModel.H" -#include "combustionModel.H" +#include "basicReactingCloud.H" +#include "surfaceFilmModel.H" +#include "pyrolysisModel.H" #include "radiationModel.H" +#include "SLGThermo.H" +#include "hsCombustionThermo.H" +#include "solidChemistryModel.H" +#include "combustionModel.H" #include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,19 +48,25 @@ Description int main(int argc, char *argv[]) { #include "setRootCase.H" + #include "createTime.H" #include "createMesh.H" + #include "readChemistryProperties.H" #include "readGravitationalAcceleration.H" - #include "initContinuityErrs.H" #include "createFields.H" + #include "createClouds.H" + #include "createSurfaceFilmModel.H" + #include "createPyrolysisModel.H" #include "createRadiationModel.H" + #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" + #include "readPyrolysisTimeControls.H" pimpleControl pimple(mesh); - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -61,46 +74,56 @@ int main(int argc, char *argv[]) { #include "readTimeControls.H" #include "compressibleCourantNo.H" + #include "solidRegionDiffusionNo.H" + #include "setMultiRegionDeltaT.H" #include "setDeltaT.H" runTime++; + Info<< "Time = " << runTime.timeName() << nl << endl; - #include "rhoEqn.H" + parcels.evolve(); - // --- Pressure-velocity PIMPLE corrector loop - for (pimple.start(); pimple.loop(); pimple++) - { - #include "UEqn.H" + surfaceFilm.evolve(); - #include "ftEqn.H" - #include "fuhsEqn.H" + pyrolysis->evolve(); - // --- PISO loop - for (int corr=0; corr<pimple.nCorr(); corr++) - { - #include "pEqn.H" - } + if (solvePrimaryRegion) + { + #include "rhoEqn.H" - if (pimple.turbCorr()) + // --- PIMPLE loop + for (pimple.start(); pimple.loop(); pimple++) { - turbulence->correct(); + #include "UEqn.H" + #include "YhsEqn.H" + + // --- PISO loop + for (int corr=1; corr<=pimple.nCorr(); corr++) + { + #include "pEqn.H" + } + + if (pimple.turbCorr()) + { + turbulence->correct(); + } } - } - rho = thermo.rho(); + rho = thermo.rho(); + } runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; - } - Info<< "End\n" << endl; + Info<< "End" << endl; - return 0; + return(0); } + // ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/ftEqn.H b/applications/solvers/combustion/fireFoam/ftEqn.H deleted file mode 100644 index 57406da753360b61b8b352bf5f737a64cb057bf3..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/ftEqn.H +++ /dev/null @@ -1,25 +0,0 @@ -tmp<fv::convectionScheme<scalar> > mvConvection -( - fv::convectionScheme<scalar>::New - ( - mesh, - fields, - phi, - mesh.divScheme("div(phi,ft_b_h)") - ) -); - -{ - fvScalarMatrix ftEqn - ( - fvm::ddt(rho, ft) - + mvConvection->fvmDiv(phi, ft) - - fvm::laplacian(turbulence->alphaEff(), ft) - ); - - ftEqn.relax(); - ftEqn.solve(); -} - -Info<< "max(ft) = " << max(ft).value() << endl; -Info<< "min(ft) = " << min(ft).value() << endl; diff --git a/applications/solvers/combustion/fireFoam/fuhsEqn.H b/applications/solvers/combustion/fireFoam/fuhsEqn.H deleted file mode 100644 index 6494ead4f4d7a343df5a78c4a9f7023e840dd984..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/fuhsEqn.H +++ /dev/null @@ -1,47 +0,0 @@ -{ - // Solve fuel equation - // ~~~~~~~~~~~~~~~~~~~ - fvScalarMatrix R(combustion->R(fu)); - - { - fvScalarMatrix fuEqn - ( - fvm::ddt(rho, fu) - + mvConvection->fvmDiv(phi, fu) - - fvm::laplacian(turbulence->alphaEff(), fu) - == - R - ); - - fuEqn.relax(); - fuEqn.solve(); - } - - Info<< "max(fu) = " << max(fu).value() << endl; - Info<< "min(fu) = " << min(fu).value() << endl; - - - // Solve sensible enthalpy equation - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - radiation->correct(); - dQ = combustion->dQ(R); - - { - fvScalarMatrix hsEqn - ( - fvm::ddt(rho, hs) - + mvConvection->fvmDiv(phi,hs) - - fvm::laplacian(turbulence->alphaEff(), hs) - == - DpDt - + dQ - + radiation->Shs(thermo) - ); - - hsEqn.relax(); - hsEqn.solve(); - } - - thermo.correct(); - combustion->correct(); -} diff --git a/applications/solvers/combustion/fireFoam/pEqn.H b/applications/solvers/combustion/fireFoam/pEqn.H index 6813950e19e9f2aaa48e3dc90e138fe3688350a5..5c7a4ae33e30c7b3dd4bf145e5687f500ce8857a 100644 --- a/applications/solvers/combustion/fireFoam/pEqn.H +++ b/applications/solvers/combustion/fireFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); volScalarField rAU(1.0/UEqn.A()); -surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU)); +surfaceScalarField rhorAUf(rAU.name() + 'f', fvc::interpolate(rho*rAU)); U = rAU*UEqn.H(); surfaceScalarField phiU @@ -17,13 +17,15 @@ phi = phiU - rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf(); for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) { - surfaceScalarField rhorAUf(fvc::interpolate(rho*rAU)); - fvScalarMatrix p_rghEqn ( - fvm::ddt(psi, p_rgh) + fvc::ddt(psi, rho)*gh + fvc::ddt(psi, rho)*gh + fvc::div(phi) + + fvm::ddt(psi, p_rgh) - fvm::laplacian(rhorAUf, p_rgh) + == + parcels.Srho() + + surfaceFilm.Srho() ); p_rghEqn.solve diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/readChemistryProperties.H b/applications/solvers/combustion/fireFoam/readChemistryProperties.H similarity index 100% rename from applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/readChemistryProperties.H rename to applications/solvers/combustion/fireFoam/readChemistryProperties.H diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/readPyrolysisTimeControls.H b/applications/solvers/combustion/fireFoam/readPyrolysisTimeControls.H similarity index 100% rename from applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/readPyrolysisTimeControls.H rename to applications/solvers/combustion/fireFoam/readPyrolysisTimeControls.H diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/rhoEqn.H b/applications/solvers/combustion/fireFoam/rhoEqn.H similarity index 100% rename from applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/rhoEqn.H rename to applications/solvers/combustion/fireFoam/rhoEqn.H diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/setMultiRegionDeltaT.H b/applications/solvers/combustion/fireFoam/setMultiRegionDeltaT.H similarity index 100% rename from applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/setMultiRegionDeltaT.H rename to applications/solvers/combustion/fireFoam/setMultiRegionDeltaT.H diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/solidRegionDiffusionNo.H b/applications/solvers/combustion/fireFoam/solidRegionDiffusionNo.H similarity index 97% rename from applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/solidRegionDiffusionNo.H rename to applications/solvers/combustion/fireFoam/solidRegionDiffusionNo.H index a6ab0eb14a6741700fa0379190cbc7b52b21426d..2d443c50bf9c54920dfa744ff9927adadba41fd7 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/solidRegionDiffusionNo.H +++ b/applications/solvers/combustion/fireFoam/solidRegionDiffusionNo.H @@ -1,2 +1 @@ scalar DiNum = pyrolysis->solidRegionDiffNo(); - diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/Make/files b/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/Make/files deleted file mode 100644 index 7910a0296578f689ba0cb09fe8212f09a2eae6ae..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -reactingParcelFilmPyrolysisFoam.C - -EXE = $(FOAM_APPBIN)/reactingParcelFilmPyrolysisFoam diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/Make/options deleted file mode 100644 index cf5b4b09764eea8074ad571a9942bbb1b7b61924..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/Make/options +++ /dev/null @@ -1,52 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I${LIB_SRC}/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ - -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \ - -I$(LIB_SRC)/combustionModels/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ - -I$(LIB_SRC)/combustionModels/lnInclude \ - -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/regionModels/pyrolysisModels/lnInclude \ - -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ - -I$(LIB_SRC)/ODE/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude - - -EXE_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ - -lspecie \ - -lbasicThermophysicalModels \ - -lsolidProperties \ - -lsolidMixtureProperties \ - -lthermophysicalFunctions \ - -lreactionThermophysicalModels \ - -lSLGThermo \ - -lchemistryModel \ - -lsolidChemistryModel \ - -lcombustionModels \ - -lregionModels \ - -lradiationModels \ - -lsurfaceFilmModels \ - -lpyrolysisModels \ - -llagrangianIntermediate \ - -lODE \ - -lsampling diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/UEqn.H deleted file mode 100644 index a64e50a2d24d19b3f1dd25e4bc73acbcfc27a356..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/UEqn.H +++ /dev/null @@ -1,26 +0,0 @@ - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - + turbulence->divDevRhoReff(U) - == - parcels.SU(U) - ); - - UEqn.relax(); - - if (pimple.momentumPredictor()) - { - solve - ( - UEqn - == - fvc::reconstruct - ( - ( - - ghf*fvc::snGrad(rho) - - fvc::snGrad(p_rgh) - )*mesh.magSf() - ) - ); - } diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/createFields.H deleted file mode 100644 index f1e152dc320b47f428e326350f66aae48c947338..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/createFields.H +++ /dev/null @@ -1,154 +0,0 @@ - Info<< "Reading thermophysical properties\n" << endl; - - autoPtr<hsCombustionThermo> pThermo - ( - hsCombustionThermo::New(mesh) - ); - hsCombustionThermo& thermo = pThermo(); - - SLGThermo slgThermo(mesh, thermo); - - basicMultiComponentMixture& composition = thermo.composition(); - PtrList<volScalarField>& Y = composition.Y(); - - const word inertSpecie(thermo.lookup("inertSpecie")); - - Info<< "Creating field rho\n" << endl; - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - thermo.rho() - ); - - volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); - const volScalarField& T = thermo.T(); - const volScalarField& psi = thermo.psi(); - - Info<< "\nReading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - #include "compressibleCreatePhi.H" - - Info<< "Creating turbulence model\n" << endl; - autoPtr<compressible::turbulenceModel> turbulence - ( - compressible::turbulenceModel::New - ( - rho, - U, - phi, - thermo - ) - ); - - IOdictionary combustionProperties - ( - IOobject - ( - "combustionProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ); - - Info<< "Creating combustion model\n" << endl; - autoPtr<combustionModel> combustion - ( - combustionModel::combustionModel::New - ( - combustionProperties, - thermo, - turbulence(), - phi, - rho - ) - ); - - volScalarField dQ - ( - IOobject - ( - "dQ", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("dQ", dimMass/pow3(dimTime)/dimLength, 0.0) - ); - - Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt - ( - "DpDt", - fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p) - ); - - - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - - surfaceScalarField ghf("ghf", g & mesh.Cf()); - - volScalarField p_rgh - ( - IOobject - ( - "p_rgh", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - // Force p_rgh to be consistent with p - p_rgh = p - rho*gh; - - multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; - - forAll(Y, i) - { - fields.add(Y[i]); - } - fields.add(hs); - - IOdictionary additionalControlsDict - ( - IOobject - ( - "additionalControls", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ); - - Switch solvePrimaryRegion - ( - additionalControlsDict.lookup("solvePrimaryRegion") - ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/pEqn.H deleted file mode 100644 index 5c7a4ae33e30c7b3dd4bf145e5687f500ce8857a..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/pEqn.H +++ /dev/null @@ -1,50 +0,0 @@ -rho = thermo.rho(); - -volScalarField rAU(1.0/UEqn.A()); -surfaceScalarField rhorAUf(rAU.name() + 'f', fvc::interpolate(rho*rAU)); -U = rAU*UEqn.H(); - -surfaceScalarField phiU -( - fvc::interpolate(rho) - *( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rAU, rho, U, phi) - ) -); - -phi = phiU - rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf(); - -for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) -{ - fvScalarMatrix p_rghEqn - ( - fvc::ddt(psi, rho)*gh - + fvc::div(phi) - + fvm::ddt(psi, p_rgh) - - fvm::laplacian(rhorAUf, p_rgh) - == - parcels.Srho() - + surfaceFilm.Srho() - ); - - p_rghEqn.solve - ( - mesh.solver(p_rgh.select(pimple.finalInnerIter(corr, nonOrth))) - ); - - if (nonOrth == pimple.nNonOrthCorr()) - { - phi += p_rghEqn.flux(); - } -} - -p = p_rgh + rho*gh; - -#include "rhoEqn.H" -#include "compressibleContinuityErrs.H" - -U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf); -U.correctBoundaryConditions(); - -DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/reactingParcelFilmPyrolysisFoam.C b/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/reactingParcelFilmPyrolysisFoam.C deleted file mode 100644 index 178ceadcd62a02f137e75fd554930776c25b335c..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/reactingParcelFilmPyrolysisFoam.C +++ /dev/null @@ -1,129 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Application - reactingParcelFilmPyrolysisFoam - -Description - Transient PIMPLE solver for Fires and turbulent diffusion flames with - reacting Lagrangian parcels, surface film and pyrolysis modelling. - -\*---------------------------------------------------------------------------*/ - -#include "mapDistribute.H" -#include "fvCFD.H" -#include "turbulenceModel.H" -#include "basicReactingCloud.H" -#include "surfaceFilmModel.H" -#include "pyrolysisModel.H" -#include "radiationModel.H" -#include "SLGThermo.H" -#include "hsCombustionThermo.H" -#include "solidChemistryModel.H" -#include "combustionModel.H" -#include "pimpleControl.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - - #include "createTime.H" - #include "createMesh.H" - #include "readChemistryProperties.H" - #include "readGravitationalAcceleration.H" - #include "createFields.H" - #include "createClouds.H" - #include "createSurfaceFilmModel.H" - #include "createPyrolysisModel.H" - #include "createRadiationModel.H" - #include "initContinuityErrs.H" - #include "readTimeControls.H" - #include "compressibleCourantNo.H" - #include "setInitialDeltaT.H" - #include "readPyrolysisTimeControls.H" - - pimpleControl pimple(mesh); - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readTimeControls.H" - #include "compressibleCourantNo.H" - #include "solidRegionDiffusionNo.H" - #include "setMultiRegionDeltaT.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - parcels.evolve(); - - surfaceFilm.evolve(); - - pyrolysis->evolve(); - - if (solvePrimaryRegion) - { - #include "rhoEqn.H" - - // --- PIMPLE loop - for (pimple.start(); pimple.loop(); pimple++) - { - #include "UEqn.H" - #include "YhsEqn.H" - - // --- PISO loop - for (int corr=1; corr<=pimple.nCorr(); corr++) - { - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - turbulence->correct(); - } - } - - rho = thermo.rho(); - } - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End" << endl; - - return(0); -} - - -// ************************************************************************* //