diff --git a/applications/solvers/combustion/fireFoam/Allwclean b/applications/solvers/combustion/fireFoam/Allwclean new file mode 100755 index 0000000000000000000000000000000000000000..5c3970936398bfd7c2501ac83a56b8cd4c634043 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/Allwclean @@ -0,0 +1,9 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +wclean libso combustionModels +wclean all sensibleEnthalpyCombustionThermophysicalModels +wclean + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/combustion/fireFoam/Allwmake b/applications/solvers/combustion/fireFoam/Allwmake new file mode 100755 index 0000000000000000000000000000000000000000..ada80d6666560713a163f5060e14c1484e7cd712 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/Allwmake @@ -0,0 +1,9 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +sensibleEnthalpyCombustionThermophysicalModels/Allwmake +wmake libso combustionModels +wmake + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/combustion/fireFoam/Make/files b/applications/solvers/combustion/fireFoam/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..826d736bd0f66081e00d868f15363948aa6211a5 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/Make/files @@ -0,0 +1,4 @@ +fireFoam.C + +EXE = $(FOAM_APPBIN)/fireFoam + diff --git a/applications/solvers/combustion/fireFoam/Make/options b/applications/solvers/combustion/fireFoam/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..07d596f7f021fdf6cbb0db688f671890c7985583 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/Make/options @@ -0,0 +1,23 @@ +EXE_INC = \ + -I./combustionModels/lnInclude \ + -I./sensibleEnthalpyCombustionThermophysicalModels/basic/lnInclude \ + -I./sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/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)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude + + +EXE_LIBS = \ + -lbasicSensibleEnthalpyThermophysicalModels \ + -lreactionSensibleEnthalpyThermophysicalModels \ + -lcombustionModels \ + -lspecie \ + -lreactionThermophysicalModels \ + -lbasicThermophysicalModels \ + -lfiniteVolume \ + -lcompressibleLESModels \ + -lcompressibleRASModels \ + -lradiation diff --git a/applications/solvers/combustion/fireFoam/UEqn.H b/applications/solvers/combustion/fireFoam/UEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..3b61f2c7b95cfd705eb219d208fcd55f5dc02185 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/UEqn.H @@ -0,0 +1,36 @@ +fvVectorMatrix UEqn +( + fvm::ddt(rho, U) + + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) +); + +UEqn.relax(); + +if (oCorr == nOuterCorr - 1) +{ + solve + ( + UEqn + == + fvc::reconstruct + ( + fvc::interpolate(rho)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() + ), + mesh.solver("UFinal") + ); +} +else +{ + solve + ( + UEqn + == + fvc::reconstruct + ( + fvc::interpolate(rho)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() + ) + ); +} diff --git a/applications/solvers/combustion/fireFoam/combustionModels/Make/files b/applications/solvers/combustion/fireFoam/combustionModels/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..5b1262b70d476c5b469d5fcad4404f3a75f08512 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/combustionModels/Make/files @@ -0,0 +1,9 @@ +combustionModel/combustionModel.C +combustionModel/newCombustionModel.C + +infinitelyFastChemistry/infinitelyFastChemistry.C + +noCombustion/noCombustion.C + +LIB = $(FOAM_LIBBIN)/libcombustionModels + diff --git a/applications/solvers/combustion/fireFoam/combustionModels/Make/options b/applications/solvers/combustion/fireFoam/combustionModels/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..42f59c8e176d991d138c6378b6dd260e163101b0 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/combustionModels/Make/options @@ -0,0 +1,11 @@ +EXE_INC = \ + -I../sensibleEnthalpyCombustionThermophysicalModels/basic/lnInclude \ + -I../sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/lnInclude \ + -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 new file mode 100644 index 0000000000000000000000000000000000000000..538d43073e63526057913e064e11ea093cd4039a --- /dev/null +++ b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.C @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#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 new file mode 100644 index 0000000000000000000000000000000000000000..19a3392bbb6ad05c6e00baf4ae9128da5055ef1b --- /dev/null +++ b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.H @@ -0,0 +1,210 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +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 new file mode 100644 index 0000000000000000000000000000000000000000..31308b8ccd5875ec6b073e92f5e4a5cea9209dd3 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/newCombustionModel.C @@ -0,0 +1,67 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#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_->toc() + << 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 new file mode 100644 index 0000000000000000000000000000000000000000..2e040e1eac95e6f20c995279547335b6441e7c0e --- /dev/null +++ b/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C @@ -0,0 +1,94 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#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 new file mode 100644 index 0000000000000000000000000000000000000000..4c62e5fa03d7f12d090a202a2fef4fbcbe81e45d --- /dev/null +++ b/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H @@ -0,0 +1,119 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +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 new file mode 100644 index 0000000000000000000000000000000000000000..dd75660aae354b7d3ddca810ceb4f22355641da1 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.C @@ -0,0 +1,103 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#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 new file mode 100644 index 0000000000000000000000000000000000000000..e381413cd8f208d77d5c2553bfbccb22a62fe968 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H @@ -0,0 +1,113 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +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/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H new file mode 100644 index 0000000000000000000000000000000000000000..a399df8536723747cd9f2a32b379e6c5bc9dd996 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -0,0 +1,130 @@ +Info<< "Reading thermophysical properties\n" << endl; + +autoPtr<hsCombustionThermo> pThermo +( + hsCombustionThermo::New(mesh) +); + +hsCombustionThermo& thermo = pThermo(); + +basicMultiComponentMixture& composition = thermo.composition(); + +volScalarField rho +( + IOobject + ( + "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(); + +const volScalarField& psi = thermo.psi(); + +volScalarField& ft = composition.Y("ft"); +volScalarField& fu = composition.Y("fu"); + +Info<< "Reading 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, + IOobject::NO_WRITE + ) +); + +Info<< "Creating combustion model\n" << endl; +autoPtr<combustionModel::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 = + fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); + + +Info<< "Calculating field g.h\n" << endl; +volScalarField gh("gh", g & mesh.C()); + +surfaceScalarField ghf("gh", g & mesh.Cf()); + +p += rho*gh; + +thermo.correct(); + +dimensionedScalar initialMass = fvc::domainIntegrate(rho); + + +multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; + +if (composition.contains("ft")) +{ + fields.add(composition.Y("ft")); +} + +if (composition.contains("fu")) +{ + fields.add(composition.Y("fu")); +} + +fields.add(hs); diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C new file mode 100644 index 0000000000000000000000000000000000000000..246a186c903546aaa10a17e732beb87d1745bd71 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/fireFoam.C @@ -0,0 +1,103 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Application + fireFoam + +Description + Transient Solver for Fires and turbulent diffusion flames + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "hsCombustionThermo.H" +#include "turbulenceModel.H" +#include "combustionModel.H" + +#include "radiationModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readGravitationalAcceleration.H" + #include "initContinuityErrs.H" + #include "createFields.H" + #include "createRadiationModel.H" + #include "readTimeControls.H" + #include "compressibleCourantNo.H" + #include "setInitialDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readPISOControls.H" + #include "readTimeControls.H" + #include "compressibleCourantNo.H" + #include "setDeltaT.H" + + runTime++; + Info<< "Time = " << runTime.timeName() << nl << endl; + + #include "rhoEqn.H" + + // --- Pressure-velocity PIMPLE corrector loop + for (int oCorr=0; oCorr<nOuterCorr; oCorr++) + { + #include "UEqn.H" + + #include "ftEqn.H" + #include "fuhsEqn.H" + + // --- PISO loop + for (int corr=0; corr<nCorr; corr++) + { + #include "pEqn.H" + } + } + + turbulence->correct(); + + rho = thermo.rho(); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + + } + + Info<< "End\n" << endl; + + return 0; +} + +// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/ftEqn.H b/applications/solvers/combustion/fireFoam/ftEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..57406da753360b61b8b352bf5f737a64cb057bf3 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/ftEqn.H @@ -0,0 +1,25 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..798cee4007e4979d948a7ba4d44af90aba62f5cb --- /dev/null +++ b/applications/solvers/combustion/fireFoam/fuhsEqn.H @@ -0,0 +1,47 @@ +{ + // 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 new file mode 100644 index 0000000000000000000000000000000000000000..907398581f2db2bc49275614b726c2ca2aeedabe --- /dev/null +++ b/applications/solvers/combustion/fireFoam/pEqn.H @@ -0,0 +1,64 @@ +bool closedVolume = false; + +rho = thermo.rho(); + +volScalarField rUA = 1.0/UEqn.A(); +surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA)); +U = rUA*UEqn.H(); + +surfaceScalarField phiU +( + fvc::interpolate(rho) + *( + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi) + ) +); + +phi = phiU + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); + +for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) +{ + surfaceScalarField rhorUAf = fvc::interpolate(rho*rUA); + + fvScalarMatrix pEqn + ( + fvm::ddt(psi,p) + + fvc::div(phi) + - fvm::laplacian(rhorUAf, p) + ); + + closedVolume = p.needReference(); + + if (corr == nCorr-1 && nonOrth == nNonOrthCorr) + { + pEqn.solve(mesh.solver(p.name() + "Final")); + } + else + { + pEqn.solve(mesh.solver(p.name())); + } + + if (nonOrth == nNonOrthCorr) + { + phi += pEqn.flux(); + } +} + +DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); + +#include "rhoEqn.H" +#include "compressibleContinuityErrs.H" + +U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf); +U.correctBoundaryConditions(); + +// For closed-volume cases adjust the pressure and density levels +// to obey overall mass continuity +if (closedVolume) +{ + p += + (initialMass - fvc::domainIntegrate(thermo.psi()*p)) + /fvc::domainIntegrate(thermo.psi()); + rho = thermo.rho(); +} diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/Allwmake b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/Allwmake new file mode 100755 index 0000000000000000000000000000000000000000..e59cf8471513e0f7a96b7ed8ce2d9129ef4f5578 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/Allwmake @@ -0,0 +1,8 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +wmake libso basic +wmake libso reactionThermo + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/Make/files b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..ca1ec78b98facb2aa0b9bb51250ec6c7a8e70a63 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/Make/files @@ -0,0 +1,4 @@ +psiThermo/basicSensiblePsiThermo/basicSensiblePsiThermo.C +psiThermo/basicSensiblePsiThermo/newBasicSensiblePsiThermo.C + +LIB = $(FOAM_LIBBIN)/libbasicSensibleEnthalpyThermophysicalModels diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/Make/options b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..8bdd75aecbca9cd22deb948dad41b1ae44815702 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude + +LIB_LIBS = \ + -lfiniteVolume diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/basicSensiblePsiThermo.C b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/basicSensiblePsiThermo.C new file mode 100644 index 0000000000000000000000000000000000000000..5d41d00c93a2a054de86e4f725980262211f6f1e --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/basicSensiblePsiThermo.C @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "basicSensiblePsiThermo.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(basicSensiblePsiThermo, 0); + defineRunTimeSelectionTable(basicSensiblePsiThermo, fvMesh); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::basicSensiblePsiThermo::basicSensiblePsiThermo(const fvMesh& mesh) +: + basicThermo(mesh) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::basicSensiblePsiThermo::~basicSensiblePsiThermo() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/basicSensiblePsiThermo.H b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/basicSensiblePsiThermo.H new file mode 100644 index 0000000000000000000000000000000000000000..f2eadec321fb63924e029cba5a70d7ca17f66571 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/basicSensiblePsiThermo.H @@ -0,0 +1,114 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::basicSensiblePsiThermo + +Description + Basic thermodynamic properties based on compressibility + +SourceFiles + basicSensiblePsiThermo.C + newBasicSensiblePsiThermo.C + +\*---------------------------------------------------------------------------*/ + +#ifndef basicSensiblePsiThermo_H +#define basicSensiblePsiThermo_H + +#include "basicThermo.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class basicSensiblePsiThermo Declaration +\*---------------------------------------------------------------------------*/ + +class basicSensiblePsiThermo +: + public basicThermo +{ + +protected: + + // Protected member functions + + //- Construct as copy (not implemented) + basicSensiblePsiThermo(const basicSensiblePsiThermo&); + + +public: + + //- Runtime type information + TypeName("basicSensiblePsiThermo"); + + + //- Declare run-time constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + basicSensiblePsiThermo, + fvMesh, + (const fvMesh& mesh), + (mesh) + ); + + // Constructors + + //- Construct from mesh + basicSensiblePsiThermo(const fvMesh&); + + + //- Selector + static autoPtr<basicSensiblePsiThermo> New(const fvMesh&); + + //- Destructor + virtual ~basicSensiblePsiThermo(); + + + // Member functions + + // Fields derived from thermodynamic state variables + + //- Density [kg/m^3] - uses current value of pressure + virtual tmp<volScalarField> rho() const + { + return p_*psi(); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/makeBasicSensiblePsiThermo.H b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/makeBasicSensiblePsiThermo.H new file mode 100644 index 0000000000000000000000000000000000000000..7d0a078719dfd3ecff7113d34e12b4d8913cfa14 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/makeBasicSensiblePsiThermo.H @@ -0,0 +1,66 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +InClass + Foam::basicSensiblePsiThermo + +Description + Macros for creating 'basic' compresibility-based thermo packages + +\*---------------------------------------------------------------------------*/ + +#ifndef makeBasicSensiblePsiThermo_H +#define makeBasicSensiblePsiThermo_H + +#include "basicSensiblePsiThermo.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeBasicSensiblePsiThermo(Cthermo,Mixture,Transport,Thermo,EqnOfState) \ + \ +typedef Cthermo<Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \ + Cthermo##Mixture##Transport##Thermo##EqnOfState; \ + \ +defineTemplateTypeNameAndDebugWithName \ +( \ + Cthermo##Mixture##Transport##Thermo##EqnOfState, \ + #Cthermo \ + "<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", \ + 0 \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + basicSensiblePsiThermo, \ + Cthermo##Mixture##Transport##Thermo##EqnOfState, \ + fvMesh \ +) + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/newBasicSensiblePsiThermo.C b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/newBasicSensiblePsiThermo.C new file mode 100644 index 0000000000000000000000000000000000000000..14fcbbff6a7b1514c5905286c655ce2721be2a92 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/basic/psiThermo/basicSensiblePsiThermo/newBasicSensiblePsiThermo.C @@ -0,0 +1,75 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "basicSensiblePsiThermo.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr<Foam::basicSensiblePsiThermo> Foam::basicSensiblePsiThermo::New +( + const fvMesh& mesh +) +{ + word thermoTypeName; + + // Enclose the creation of the thermophysicalProperties to ensure it is + // deleted before the turbulenceModel is created otherwise the dictionary + // is entered in the database twice + { + IOdictionary thermoDict + ( + IOobject + ( + "thermophysicalProperties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + thermoDict.lookup("thermoType") >> thermoTypeName; + } + + Info<< "Selecting thermodynamics package " << thermoTypeName << endl; + + fvMeshConstructorTable::iterator cstrIter = + fvMeshConstructorTablePtr_->find(thermoTypeName); + + if (cstrIter == fvMeshConstructorTablePtr_->end()) + { + FatalErrorIn("basicSensiblePsiThermo::New(const fvMesh&)") + << "Unknown basicSensiblePsiThermo type " << thermoTypeName << nl << nl + << "Valid basicSensiblePsiThermo types are:" << nl + << fvMeshConstructorTablePtr_->toc() << nl + << exit(FatalError); + } + + return autoPtr<basicSensiblePsiThermo>(cstrIter()(mesh)); +} + + +// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/Make/files b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..39b2fa53b124a803b24abdc2a4a265ad303dce4a --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/Make/files @@ -0,0 +1,5 @@ +combustionThermo/hsCombustionThermo/hsCombustionThermo.C +combustionThermo/hsCombustionThermo/newhsCombustionThermo.C +combustionThermo/hsCombustionThermo/hsCombustionThermos.C + +LIB = $(FOAM_LIBBIN)/libreactionSensibleEnthalpyThermophysicalModels diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/Make/options b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..9551ad0315297711e6f64350cea0392011919456 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/Make/options @@ -0,0 +1,9 @@ +EXE_INC = \ + -I../basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +LIB_LIBS = \ + -lfiniteVolume diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.C b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.C new file mode 100644 index 0000000000000000000000000000000000000000..2e50a2a64cfd470994d7bff9011dd074191ff90e --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.C @@ -0,0 +1,67 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "hsCombustionThermo.H" +#include "fvMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(hsCombustionThermo, 0); + defineRunTimeSelectionTable(hsCombustionThermo, fvMesh); +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::hsCombustionThermo::hsCombustionThermo(const fvMesh& mesh) +: + basicSensiblePsiThermo(mesh), + + hs_ + ( + IOobject + ( + "hs", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionSet(0, 2, -2, 0, 0), + this->hBoundaryTypes() + ) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::hsCombustionThermo::~hsCombustionThermo() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.H b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.H new file mode 100644 index 0000000000000000000000000000000000000000..44e4dfe43360a4eab8e8b32d9e3b3a452a7338d6 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.H @@ -0,0 +1,146 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::hsCombustionThermo + +Description + Foam::hsCombustionThermo + +SourceFiles + hsCombustionThermo.C + +\*---------------------------------------------------------------------------*/ + +#ifndef hsCombustionThermo_H +#define hsCombustionThermo_H + +#include "basicSensiblePsiThermo.H" +#include "basicMultiComponentMixture.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class hsCombustionThermo Declaration +\*---------------------------------------------------------------------------*/ + +class hsCombustionThermo +: + public basicSensiblePsiThermo +{ + +protected: + + // Protected data + + //- sensible enthalpy field + volScalarField hs_; + + +public: + + //- Runtime type information + TypeName("hsCombustionThermo"); + + + //- Declare run-time constructor selection tables + declareRunTimeSelectionTable + ( + autoPtr, + hsCombustionThermo, + fvMesh, + (const fvMesh& mesh), + (mesh) + ); + + + // Constructors + + //- Construct from dictionary and mesh + hsCombustionThermo(const fvMesh&); + + + // Selectors + + //- Standard selection based on fvMesh + static autoPtr<hsCombustionThermo> New(const fvMesh&); + + //- Select and check that package contains 'thermoType' + static autoPtr<hsCombustionThermo> NewType + ( + const fvMesh&, + const word& thermoType + ); + + + //- Destructor + virtual ~hsCombustionThermo(); + + + // Member functions + + //- Return the composition of the multi-component mixture + virtual basicMultiComponentMixture& composition() = 0; + + //- Return the composition of the multi-component mixture + virtual const basicMultiComponentMixture& composition() const = 0; + + + // Access to thermodynamic state variables + + //- Sensible enthalpy [J/kg] + // Non-const access allowed for transport equations + virtual volScalarField& hs() + { + return hs_; + } + + //- Sensible enthalpy [J/kg] + virtual const volScalarField& hs() const + { + return hs_; + } + + //- Chemical enthalpy [J/kg] + virtual tmp<volScalarField> hc() const = 0; + + //- Update properties + virtual void correct() = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C new file mode 100644 index 0000000000000000000000000000000000000000..bf3bc4ebfea459b4c55be394b75f1ab414ace6cd --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C @@ -0,0 +1,68 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "makeHsCombustionThermo.H" + +#include "hsCombustionThermo.H" +#include "hsPsiMixtureThermo.H" + +#include "perfectGas.H" + +#include "hConstThermo.H" +#include "janafThermo.H" +#include "specieThermo.H" + +#include "sutherlandTransport.H" + +#include "veryInhomogeneousMixture.H" + +#include "multiComponentMixture.H" + +#include "thermoPhysicsTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +makeHsCombustionThermo +( + hsCombustionThermo, + hsPsiMixtureThermo, + veryInhomogeneousMixture, + sutherlandTransport, + janafThermo, + perfectGas +); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/makeHsCombustionThermo.H b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/makeHsCombustionThermo.H new file mode 100644 index 0000000000000000000000000000000000000000..a1507ba35d1459d0c82b8599600c3cb4792f872c --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/makeHsCombustionThermo.H @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +InClass + Foam::hsCombustionThermo + +Description + +\*---------------------------------------------------------------------------*/ + +#ifndef makeHsCombustionThermo_H +#define makeHsCombustionThermo_H + +#include "addToRunTimeSelectionTable.H" +#include "basicSensiblePsiThermo.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeHsCombustionThermo(CThermo,MixtureThermo,Mixture,Transport,Thermo,EqnOfState) \ + \ +typedef MixtureThermo \ + <Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \ + MixtureThermo##Mixture##Transport##Thermo##EqnOfState; \ + \ +defineTemplateTypeNameAndDebugWithName \ +( \ + MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ + #MixtureThermo \ + "<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", \ + 0 \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + basicSensiblePsiThermo, \ + MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ + fvMesh \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + CThermo, \ + MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ + fvMesh \ +) + + +#define makeHsCombustionMixtureThermo(CThermo,MixtureThermo,Mixture,ThermoPhys) \ + \ +typedef MixtureThermo<Mixture<ThermoPhys> > \ + MixtureThermo##Mixture##ThermoPhys; \ + \ +defineTemplateTypeNameAndDebugWithName \ +( \ + MixtureThermo##Mixture##ThermoPhys, \ + #MixtureThermo"<"#Mixture"<"#ThermoPhys">>", \ + 0 \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + basicSensiblePsiThermo, \ + MixtureThermo##Mixture##ThermoPhys, \ + fvMesh \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + CThermo, \ + MixtureThermo##Mixture##ThermoPhys, \ + fvMesh \ +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/newhsCombustionThermo.C b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/newhsCombustionThermo.C new file mode 100644 index 0000000000000000000000000000000000000000..9d39667dd3d66cffaa76e4f991553d18582b9404 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/newhsCombustionThermo.C @@ -0,0 +1,151 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "hsCombustionThermo.H" +#include "fvMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr<Foam::hsCombustionThermo> Foam::hsCombustionThermo::New +( + const fvMesh& mesh +) +{ + word hsCombustionThermoTypeName; + + // Enclose the creation of the thermophysicalProperties to ensure it is + // deleted before the turbulenceModel is created otherwise the dictionary + // is entered in the database twice + { + IOdictionary thermoDict + ( + IOobject + ( + "thermophysicalProperties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + thermoDict.lookup("thermoType") >> hsCombustionThermoTypeName; + } + + Info<< "Selecting thermodynamics package " << hsCombustionThermoTypeName + << endl; + + fvMeshConstructorTable::iterator cstrIter = + fvMeshConstructorTablePtr_->find(hsCombustionThermoTypeName); + + if (cstrIter == fvMeshConstructorTablePtr_->end()) + { + FatalErrorIn("hsCombustionThermo::New(const fvMesh&)") + << "Unknown hsCombustionThermo type " + << hsCombustionThermoTypeName << nl << nl + << "Valid hsCombustionThermo types are:" << nl + << fvMeshConstructorTablePtr_->toc() << nl + << exit(FatalError); + } + + return autoPtr<hsCombustionThermo>(cstrIter()(mesh)); +} + + +Foam::autoPtr<Foam::hsCombustionThermo> Foam::hsCombustionThermo::NewType +( + const fvMesh& mesh, + const word& thermoType +) +{ + word hsCombustionThermoTypeName; + + // Enclose the creation of the thermophysicalProperties to ensure it is + // deleted before the turbulenceModel is created otherwise the dictionary + // is entered in the database twice + { + IOdictionary thermoDict + ( + IOobject + ( + "thermophysicalProperties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + thermoDict.lookup("thermoType") >> hsCombustionThermoTypeName; + + if (hsCombustionThermoTypeName.find(thermoType) == string::npos) + { + wordList allModels = fvMeshConstructorTablePtr_->toc(); + DynamicList<word> validModels; + forAll(allModels, i) + { + if (allModels[i].find(thermoType) != string::npos) + { + validModels.append(allModels[i]); + } + } + + FatalErrorIn + ( + "autoPtr<hsCombustionThermo> hsCombustionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Inconsistent thermo package selected:" << nl << nl + << hsCombustionThermoTypeName << nl << nl << "Please select a " + << "thermo package based on " << thermoType + << ". Valid options include:" << nl << validModels << nl + << exit(FatalError); + } + } + + Info<< "Selecting thermodynamics package " << hsCombustionThermoTypeName + << endl; + + fvMeshConstructorTable::iterator cstrIter = + fvMeshConstructorTablePtr_->find(hsCombustionThermoTypeName); + + if (cstrIter == fvMeshConstructorTablePtr_->end()) + { + FatalErrorIn("hsCombustionThermo::New(const fvMesh&)") + << "Unknown hsCombustionThermo type " + << hsCombustionThermoTypeName << nl << nl + << "Valid hsCombustionThermo types are:" << nl + << fvMeshConstructorTablePtr_->toc() << nl + << exit(FatalError); + } + + return autoPtr<hsCombustionThermo>(cstrIter()(mesh)); +} + + +// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C new file mode 100644 index 0000000000000000000000000000000000000000..0e6b14e1b0321c89dc6f73e027989b380760550c --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C @@ -0,0 +1,318 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "hsPsiMixtureThermo.H" +#include "fvMesh.H" +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class MixtureType> +Foam::hsPsiMixtureThermo<MixtureType>::hsPsiMixtureThermo(const fvMesh& mesh) +: + hsCombustionThermo(mesh), + MixtureType(*this, mesh) +{ + scalarField& hCells = hs_.internalField(); + const scalarField& TCells = T_.internalField(); + + forAll(hCells, celli) + { + hCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); + } + + forAll(hs_.boundaryField(), patchi) + { + hs_.boundaryField()[patchi] == hs(T_.boundaryField()[patchi], patchi); + } + + hBoundaryCorrection(hs_); + + calculate(); + psi_.oldTime(); // Switch on saving old time +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class MixtureType> +Foam::hsPsiMixtureThermo<MixtureType>::~hsPsiMixtureThermo() +{} + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template<class MixtureType> +void Foam::hsPsiMixtureThermo<MixtureType>::calculate() +{ + const scalarField& hsCells = hs_.internalField(); + const scalarField& pCells = p_.internalField(); + + scalarField& TCells = T_.internalField(); + scalarField& psiCells = psi_.internalField(); + scalarField& muCells = mu_.internalField(); + scalarField& alphaCells = alpha_.internalField(); + + forAll(TCells, celli) + { + const typename MixtureType::thermoType& mixture_ = + this->cellMixture(celli); + + TCells[celli] = mixture_.THs(hsCells[celli], TCells[celli]); + psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); + + muCells[celli] = mixture_.mu(TCells[celli]); + alphaCells[celli] = mixture_.alpha(TCells[celli]); + } + + forAll(T_.boundaryField(), patchi) + { + fvPatchScalarField& pp = p_.boundaryField()[patchi]; + fvPatchScalarField& pT = T_.boundaryField()[patchi]; + fvPatchScalarField& ppsi = psi_.boundaryField()[patchi]; + + fvPatchScalarField& phs = hs_.boundaryField()[patchi]; + + fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi]; + fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi]; + + if (pT.fixesValue()) + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture_ = + this->patchFaceMixture(patchi, facei); + + phs[facei] = mixture_.Hs(pT[facei]); + + ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); + pmu_[facei] = mixture_.mu(pT[facei]); + palpha_[facei] = mixture_.alpha(pT[facei]); + } + } + else + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture_ = + this->patchFaceMixture(patchi, facei); + + pT[facei] = mixture_.THs(phs[facei], pT[facei]); + + ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); + pmu_[facei] = mixture_.mu(pT[facei]); + palpha_[facei] = mixture_.alpha(pT[facei]); + } + } + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class MixtureType> +void Foam::hsPsiMixtureThermo<MixtureType>::correct() +{ + if (debug) + { + Info<< "entering hMixtureThermo<MixtureType>::correct()" << endl; + } + + // force the saving of the old-time values + psi_.oldTime(); + + calculate(); + + if (debug) + { + Info<< "exiting hMixtureThermo<MixtureType>::correct()" << endl; + } +} + +template<class MixtureType> +Foam::tmp<Foam::volScalarField> +Foam::hsPsiMixtureThermo<MixtureType>::hc() const +{ + const fvMesh& mesh = T_.mesh(); + + tmp<volScalarField> thc + ( + new volScalarField + ( + IOobject + ( + "hc", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + hs_.dimensions() + ) + ); + + volScalarField& hcf = thc(); + scalarField& hcCells = hcf.internalField(); + + forAll(hcCells, celli) + { + hcCells[celli] = this->cellMixture(celli).Hc(); + } + + forAll(hcf.boundaryField(), patchi) + { + scalarField& hcp = hcf.boundaryField()[patchi]; + + forAll(hcp, facei) + { + hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); + } + } + + return thc; +} + + +template<class MixtureType> +Foam::tmp<Foam::scalarField> +Foam::hsPsiMixtureThermo<MixtureType>::hs +( + const scalarField& T, + const labelList& cells +) const +{ + tmp<scalarField> th(new scalarField(T.size())); + scalarField& hs = th(); + + forAll(T, celli) + { + hs[celli] = this->cellMixture(cells[celli]).Hs(T[celli]); + } + + return th; +} + + +template<class MixtureType> +Foam::tmp<Foam::scalarField> +Foam::hsPsiMixtureThermo<MixtureType>::hs +( + const scalarField& T, + const label patchi +) const +{ + tmp<scalarField> th(new scalarField(T.size())); + scalarField& hs = th(); + + forAll(T, facei) + { + hs[facei] = this->patchFaceMixture(patchi, facei).Hs(T[facei]); + } + + return th; +} + + +template<class MixtureType> +Foam::tmp<Foam::scalarField> +Foam::hsPsiMixtureThermo<MixtureType>::Cp +( + const scalarField& T, + const label patchi +) const +{ + tmp<scalarField> tCp(new scalarField(T.size())); + + scalarField& cp = tCp(); + + forAll(T, facei) + { + cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); + } + + return tCp; +} + + +template<class MixtureType> +Foam::tmp<Foam::volScalarField> +Foam::hsPsiMixtureThermo<MixtureType>::Cp() const +{ + const fvMesh& mesh = T_.mesh(); + + tmp<volScalarField> tCp + ( + new volScalarField + ( + IOobject + ( + "Cp", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionSet(0, 2, -2, -1, 0) + ) + ); + + volScalarField& cp = tCp(); + + scalarField& cpCells = cp.internalField(); + const scalarField& TCells = T_.internalField(); + + forAll(TCells, celli) + { + cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]); + } + + forAll(T_.boundaryField(), patchi) + { + cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi); + } + + return tCp; +} + + +template<class MixtureType> +bool Foam::hsPsiMixtureThermo<MixtureType>::read() +{ + if (hsCombustionThermo::read()) + { + MixtureType::read(*this); + return true; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.H b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.H new file mode 100644 index 0000000000000000000000000000000000000000..e114b847347d3c3f2c65ebda2298a0053fd09882 --- /dev/null +++ b/applications/solvers/combustion/fireFoam/sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.H @@ -0,0 +1,147 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::hsPsiMixtureThermo + +Description + Foam::hsPsiMixtureThermo + +SourceFiles + hsPsiMixtureThermo.C + +\*---------------------------------------------------------------------------*/ + +#ifndef hsPsiMixtureThermo_H +#define hsPsiMixtureThermo_H + +#include "hsCombustionThermo.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class hsPsiMixtureThermo Declaration +\*---------------------------------------------------------------------------*/ + +template<class MixtureType> +class hsPsiMixtureThermo +: + public hsCombustionThermo, + public MixtureType +{ + // Private member functions + + void calculate(); + + //- Construct as copy (not implemented) + hsPsiMixtureThermo(const hsPsiMixtureThermo<MixtureType>&); + + +public: + + //- Runtime type information + TypeName("hsPsiMixtureThermo"); + + + // Constructors + + //- Construct from mesh + hsPsiMixtureThermo(const fvMesh&); + + + //- Destructor + virtual ~hsPsiMixtureThermo(); + + + // Member functions + + //- Return the compostion of the multi-component mixture + virtual basicMultiComponentMixture& composition() + { + return *this; + } + + //- Return the compostion of the multi-component mixture + virtual const basicMultiComponentMixture& composition() const + { + return *this; + } + + //- Update properties + virtual void correct(); + + + //- Chemical enthalpy [J/kg] + virtual tmp<volScalarField> hc() const; + + // Fields derived from thermodynamic state variables + + //- Sensible enthalpy for cell-set [J/kg] + virtual tmp<scalarField> hs + ( + const scalarField& T, + const labelList& cells + ) const; + + //- Sensible enthalpy for patch [J/kg] + virtual tmp<scalarField> hs + ( + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant pressure for patch [J/kg/K] + virtual tmp<scalarField> Cp + ( + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant pressure [J/kg/K] + virtual tmp<volScalarField> Cp() const; + + + //- Read thermophysicalProperties dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "hsPsiMixtureThermo.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index 3de20158ad0c345b33e5dd237166c761e0af03e9..f03bcc8289bba92a065410fb8bc23c5374d7b725 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -143,7 +143,6 @@ void Foam::basicThermo::eBoundaryCorrection(volScalarField& e) } } - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::basicThermo::basicThermo(const fvMesh& mesh) @@ -300,6 +299,50 @@ Foam::tmp<Foam::scalarField> Foam::basicThermo::h } +Foam::volScalarField& Foam::basicThermo::hs() +{ + notImplemented("basicThermo::hs()"); + return const_cast<volScalarField&>(volScalarField::null()); +} + + +const Foam::volScalarField& Foam::basicThermo::hs() const +{ + notImplemented("basicThermo::hs() const"); + return volScalarField::null(); +} + + +Foam::tmp<Foam::scalarField> Foam::basicThermo::hs +( + const scalarField& T, + const labelList& cells +) const +{ + notImplemented + ( + "basicThermo::hs" + "(const scalarField& T, const labelList& cells) const" + ); + return tmp<scalarField>(NULL); +} + + +Foam::tmp<Foam::scalarField> Foam::basicThermo::hs +( + const scalarField& T, + const label patchi +) const +{ + notImplemented + ( + "basicThermo::hs" + "(const scalarField& T, const label patchi) const" + ); + return tmp<scalarField>(NULL); +} + + Foam::volScalarField& Foam::basicThermo::e() { notImplemented("basicThermo::e()"); diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.H b/src/thermophysicalModels/basic/basicThermo/basicThermo.H index 1b5425852530ca30ec9cb6328adb12b777d473ab..1c907edcf9ea3eb915d5a0102010c85abf619fb6 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.H +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.H @@ -141,7 +141,7 @@ public: //- Compressibility [s^2/m^2] virtual const volScalarField& psi() const; - //- Enthalpy [J/kg] + //- Total enthalpy [J/kg] // Non-const access allowed for transport equations virtual volScalarField& h(); @@ -162,6 +162,27 @@ public: const label patchi ) const; + //- Sensible enthalpy [J/kg] + // Non-const access allowed for transport equations + virtual volScalarField& hs(); + + //- Enthalpy [J/kg] + virtual const volScalarField& hs() const; + + //- Enthalpy for cell-set [J/kg] + virtual tmp<scalarField> hs + ( + const scalarField& T, + const labelList& cells + ) const; + + //- Enthalpy for patch [J/kg] + virtual tmp<scalarField> hs + ( + const scalarField& T, + const label patchi + ) const; + //- Internal energy [J/kg] // Non-const access allowed for transport equations virtual volScalarField& e(); diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C index 19e345abe0b321bcfd619c1068a28417539a4b16..4679801fd334e4fba208e7b83562c330dfef2e67 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C @@ -30,14 +30,9 @@ License #include "volFields.H" #include "basicThermo.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField +Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF @@ -47,7 +42,7 @@ fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField {} -fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField +Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField ( const fixedEnthalpyFvPatchScalarField& ptf, const fvPatch& p, @@ -59,7 +54,7 @@ fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField {} -fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField +Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, @@ -70,7 +65,7 @@ fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField {} -fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField +Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField ( const fixedEnthalpyFvPatchScalarField& tppsf ) @@ -79,7 +74,7 @@ fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField {} -fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField +Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField ( const fixedEnthalpyFvPatchScalarField& tppsf, const DimensionedField<scalar, volMesh>& iF @@ -91,7 +86,7 @@ fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void fixedEnthalpyFvPatchScalarField::updateCoeffs() +void Foam::fixedEnthalpyFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -109,7 +104,14 @@ void fixedEnthalpyFvPatchScalarField::updateCoeffs() const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi]); Tw.evaluate(); - operator==(thermo.h(Tw, patchi)); + if (dimensionedInternalField().name() == "h") + { + operator==(thermo.h(Tw, patchi)); + } + else + { + operator==(thermo.hs(Tw, patchi)); + } fixedValueFvPatchScalarField::updateCoeffs(); } @@ -117,10 +119,14 @@ void fixedEnthalpyFvPatchScalarField::updateCoeffs() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField(fvPatchScalarField, fixedEnthalpyFvPatchScalarField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + fixedEnthalpyFvPatchScalarField + ); +} -} // End namespace Foam // ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.H index 725ca85df22258892d208a8112f9c5c4244df041..654b5c1af6e2b049a35324cf54e5309bccd6c6ca 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.H @@ -44,7 +44,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class fixedEnthalpyFvPatchScalarField Declaration + Class fixedEnthalpyFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ class fixedEnthalpyFvPatchScalarField diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C index ed3a4a6ca34ca13267aaafb4bd1273cae5966c2f..cb9b74020f5dfd19281b241eb24e5662fe9ba7d3 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C @@ -30,14 +30,9 @@ License #include "volFields.H" #include "basicThermo.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField +Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF @@ -47,7 +42,7 @@ gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField {} -gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField +Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField ( const gradientEnthalpyFvPatchScalarField& ptf, const fvPatch& p, @@ -59,7 +54,7 @@ gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField {} -gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField +Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, @@ -70,7 +65,7 @@ gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField {} -gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField +Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField ( const gradientEnthalpyFvPatchScalarField& tppsf ) @@ -79,7 +74,7 @@ gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField {} -gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField +Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField ( const gradientEnthalpyFvPatchScalarField& tppsf, const DimensionedField<scalar, volMesh>& iF @@ -91,7 +86,7 @@ gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void gradientEnthalpyFvPatchScalarField::updateCoeffs() +void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -110,12 +105,24 @@ void gradientEnthalpyFvPatchScalarField::updateCoeffs() Tw.evaluate(); - gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad() - + patch().deltaCoeffs()* + if (dimensionedInternalField().name() == "h") + { + gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad() + + patch().deltaCoeffs()* ( thermo.h(Tw, patchi) - thermo.h(Tw, patch().faceCells()) ); + } + else + { + gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad() + + patch().deltaCoeffs()* + ( + thermo.hs(Tw, patchi) + - thermo.hs(Tw, patch().faceCells()) + ); + } fixedGradientFvPatchScalarField::updateCoeffs(); } @@ -123,10 +130,14 @@ void gradientEnthalpyFvPatchScalarField::updateCoeffs() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField(fvPatchScalarField, gradientEnthalpyFvPatchScalarField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + gradientEnthalpyFvPatchScalarField + ); +} -} // End namespace Foam // ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C index 3d64c9a0d221c9ce4f39fde82853ef321f5fbd93..cfe404d38e845fb44f89deff045fc46a17a17092 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C @@ -30,14 +30,9 @@ License #include "volFields.H" #include "basicThermo.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField +Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF @@ -51,7 +46,7 @@ mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField } -mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField +Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField ( const mixedEnthalpyFvPatchScalarField& ptf, const fvPatch& p, @@ -63,7 +58,7 @@ mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField {} -mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField +Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, @@ -74,7 +69,7 @@ mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField {} -mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField +Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField ( const mixedEnthalpyFvPatchScalarField& tppsf ) @@ -83,7 +78,7 @@ mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField {} -mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField +Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField ( const mixedEnthalpyFvPatchScalarField& tppsf, const DimensionedField<scalar, volMesh>& iF @@ -95,7 +90,7 @@ mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void mixedEnthalpyFvPatchScalarField::updateCoeffs() +void Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -117,13 +112,27 @@ void mixedEnthalpyFvPatchScalarField::updateCoeffs() Tw.evaluate(); valueFraction() = Tw.valueFraction(); - refValue() = thermo.h(Tw.refValue(), patchi); - refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad() - + patch().deltaCoeffs()* - ( + + if (dimensionedInternalField().name() == "h") + { + refValue() = thermo.h(Tw.refValue(), patchi); + refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad() + + patch().deltaCoeffs()* + ( thermo.h(Tw, patchi) - thermo.h(Tw, patch().faceCells()) - ); + ); + } + else + { + refValue() = thermo.hs(Tw.refValue(), patchi); + refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad() + + patch().deltaCoeffs()* + ( + thermo.hs(Tw, patchi) + - thermo.hs(Tw, patch().faceCells()) + ); + } mixedFvPatchScalarField::updateCoeffs(); } @@ -131,10 +140,14 @@ void mixedEnthalpyFvPatchScalarField::updateCoeffs() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField(fvPatchScalarField, mixedEnthalpyFvPatchScalarField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + mixedEnthalpyFvPatchScalarField + ); +} -} // End namespace Foam // ************************************************************************* // diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C index be93dc011eddef10cb16c01d0348a0253cf6f224..d1f844f5925405ec492fb22fef09744d5290bc08 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C @@ -156,4 +156,22 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Sh } +Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Shs +( + basicThermo& thermo +) const +{ + volScalarField& hs = thermo.hs(); + const volScalarField cp = thermo.Cp(); + const volScalarField T3 = pow3(T_); + + return + ( + Ru() + - fvm::Sp(4.0*Rp()*T3/cp, hs) + - Rp()*T3*(T_ - 4.0*hs/cp) + ); +} + + // ************************************************************************* // diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.H b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.H index aae443461e1955fd61c7781d94d0cf0bddf8f9d2..3e1a8019cf4da2c26957b93b70c60e30f96424a4 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.H +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.H @@ -163,7 +163,7 @@ public: virtual void calculate() = 0; //- Read radiationProperties dictionary - virtual bool read(); + virtual bool read() = 0; // Access @@ -176,6 +176,9 @@ public: //- Enthalpy source term virtual tmp<fvScalarMatrix> Sh(basicThermo& thermo) const; + + //- Sensible enthalpy source term + virtual tmp<fvScalarMatrix> Shs(basicThermo& thermo) const; }; @@ -189,4 +192,3 @@ public: #endif // ************************************************************************* // - diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.H index b4b66b55bdb3dcefc0ad5143773cb400e03d2f78..d6b1ff7069cbf4c26b5b8284d3ca406480afe409 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.H +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.H @@ -128,9 +128,6 @@ public: } - //- Sensible enthalpy [J/kg] - virtual tmp<volScalarField> hs() const = 0; - //- Chemical enthalpy [J/kg] virtual tmp<volScalarField> hc() const = 0; diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C index 5a788049a62d2a649e1761ca4ae1df31f9d80047..d354b3a98600b0a06c841e9c7c2c693b89063e10 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C @@ -155,53 +155,6 @@ void Foam::hPsiMixtureThermo<MixtureType>::correct() } -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hPsiMixtureThermo<MixtureType>::hs() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> ths - ( - new volScalarField - ( - IOobject - ( - "hs", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - h_.dimensions() - ) - ); - - volScalarField& hsf = ths(); - scalarField& hsCells = hsf.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - scalarField& hsp = hsf.boundaryField()[patchi]; - const scalarField& Tp = T_.boundaryField()[patchi]; - - forAll(Tp, facei) - { - hsp[facei] = this->patchFaceMixture(patchi, facei).Hs(Tp[facei]); - } - } - - return ths; -} - - template<class MixtureType> Foam::tmp<Foam::volScalarField> Foam::hPsiMixtureThermo<MixtureType>::hc() const diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.H index 64503284478016985773a5cef53b5de87af8d299..a30a0c1465af946f99145ff9a3d80bf177ecfb94 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.H +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.H @@ -94,9 +94,6 @@ public: //- Update properties virtual void correct(); - //- Sensible enthalpy [J/kg] - virtual tmp<volScalarField> hs() const; - //- Chemical enthalpy [J/kg] virtual tmp<volScalarField> hc() const; diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C index 0af469ecf910cff475c9f37738e85fd6f84fb389..6d7245c044051c6751ae7afc9b7eb7a8b4403ab4 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C @@ -174,54 +174,6 @@ void Foam::hhuMixtureThermo<MixtureType>::correct() } -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hhuMixtureThermo<MixtureType>::hs() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> ths - ( - new volScalarField - ( - IOobject - ( - "hs", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - h_.dimensions() - ) - ); - - volScalarField& hsf = ths(); - - scalarField& hsCells = hsf.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - scalarField& hsp = hsf.boundaryField()[patchi]; - const scalarField& Tp = T_.boundaryField()[patchi]; - - forAll(Tp, facei) - { - hsp[facei] = this->patchFaceMixture(patchi, facei).Hs(Tp[facei]); - } - } - - return ths; -} - - template<class MixtureType> Foam::tmp<Foam::volScalarField> Foam::hhuMixtureThermo<MixtureType>::hc() const diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.H index 5e9834e86c086b036855efa7f9ba3ae66a1a0e33..c55e0a9216a4616a6ce97ac3ba9810e28387e808 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.H +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.H @@ -36,8 +36,6 @@ SourceFiles #ifndef hhuMixtureThermo_H #define hhuMixtureThermo_H -//#include "hPsiMixtureThermo.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -94,9 +92,6 @@ public: //- Update properties virtual void correct(); - //- Sensible enthalpy [J/kg] - virtual tmp<volScalarField> hs() const; - //- Chemical enthalpy [J/kg] virtual tmp<volScalarField> hc() const; diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.H b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.H index 3d5c37614c3c16e3ec5fd7786bc667da322bb900..f2319efa4ff2839a5af01d6b7cde0a9cb5311ecd 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.H +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.H @@ -128,9 +128,6 @@ public: } - //- Sensible enthalpy [J/kg] - virtual tmp<volScalarField> hs() const = 0; - //- Chemical enthalpy [J/kg] virtual tmp<volScalarField> hc() const = 0; diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C index 9cbf9202dee94885edbc428ad5d4f51a10d2a111..e12fadf8a1e86c91f3eba988e76dee9f26932097 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C @@ -154,53 +154,6 @@ void Foam::hRhoMixtureThermo<MixtureType>::correct() } -template<class MixtureType> -Foam::tmp<Foam::volScalarField> -Foam::hRhoMixtureThermo<MixtureType>::hs() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp<volScalarField> ths - ( - new volScalarField - ( - IOobject - ( - "hs", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - h_.dimensions() - ) - ); - - volScalarField& hsf = ths(); - scalarField& hsCells = hsf.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - scalarField& hsp = hsf.boundaryField()[patchi]; - const scalarField& Tp = T_.boundaryField()[patchi]; - - forAll(Tp, facei) - { - hsp[facei] = this->patchFaceMixture(patchi, facei).Hs(Tp[facei]); - } - } - - return ths; -} - - template<class MixtureType> Foam::tmp<Foam::volScalarField> Foam::hRhoMixtureThermo<MixtureType>::hc() const diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.H b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.H index 570f696bac41be646b72fdf814b648c1811b285f..28e95270d91c63fee986c1bf258ffe355f9ffe6e 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.H +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.H @@ -94,9 +94,6 @@ public: //- Update properties virtual void correct(); - //- Sensible enthalpy [J/kg] - virtual tmp<volScalarField> hs() const; - //- Chemical enthalpy [J/kg] virtual tmp<volScalarField> hc() const; diff --git a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H index 560f8f4145f7e9faed0f176f3a8946a1ae752e9c..7ec9d97959625189c1ee0713004415dbd0508bd6 100644 --- a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H +++ b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H @@ -242,6 +242,9 @@ public: //- Temperature from Enthalpy given an initial temperature T0 inline scalar TH(const scalar H, const scalar T0) const; + //- Temperature from sensible Enthalpy given an initial T0 + inline scalar THs(const scalar Hs, const scalar T0) const; + //- Temperature from internal energy given an initial temperature T0 inline scalar TE(const scalar E, const scalar T0) const; diff --git a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H index 215ea7b2032eff381cd5512f7f239bb6e82484dc..788f6b9055464eb9ba99a5af6db330b549e98621 100644 --- a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H +++ b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H @@ -281,6 +281,17 @@ inline Foam::scalar Foam::specieThermo<thermo>::TH } +template<class thermo> +inline Foam::scalar Foam::specieThermo<thermo>::THs +( + const scalar hs, + const scalar T0 +) const +{ + return T(hs, T0, &specieThermo<thermo>::Hs, &specieThermo<thermo>::Cp); +} + + template<class thermo> inline Foam::scalar Foam::specieThermo<thermo>::TE ( diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/G b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/G new file mode 100644 index 0000000000000000000000000000000000000000..fd0982491c620462f6851cb538d2be2efe95d6c9 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/G @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object G; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 0 -3 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + ".*" + { + type MarshakRadiation; + T T; + emissivity 1; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/IDefault b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/IDefault new file mode 100644 index 0000000000000000000000000000000000000000..61b02dea13d844c93a773502a5c9288b99978b97 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/IDefault @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object IDefault; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 0 -3 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + ".*" + { + type greyDiffusiveRadiation; + T T; + emissivity 1.0 + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/T b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/T new file mode 100755 index 0000000000000000000000000000000000000000..1c7d1ebb4d55cb4cfb065e9a471cc237c216ecb0 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/T @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 300; + +boundaryField +{ + outlet + { + type inletOutlet; + inletValue uniform 300; + value uniform 300; + } + sides + { + type inletOutlet; + inletValue uniform 300; + value uniform 300; + } + base + { + type zeroGradient; + } + inlet + { + type fixedValue; + value uniform 300; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/U b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/U new file mode 100755 index 0000000000000000000000000000000000000000..48e4aab470ddcae4baead5ef0e43b75acc0903d9 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/U @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + outlet + { + + type inletOutlet; + inletValue uniform (0 0 0); + value uniform (0 0 0); + + } + sides + { + type pressureInletOutletVelocity; + outletValue uniform (0 0 0); + value uniform (0 0 0); + } + base + { + type fixedValue; + value uniform (0 0 0); + } + inlet + { + type fixedValue; + value uniform (0 0.05 0); + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/alphaSgs b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/alphaSgs new file mode 100755 index 0000000000000000000000000000000000000000..c840a07a08e78775f21a5ff3ea0cc2cc6b821f97 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/alphaSgs @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphaSgs; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type zeroGradient; + } + sides + { + type zeroGradient; + } + base + { + type zeroGradient; + } + inlet + { + type zeroGradient; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/b b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/b new file mode 100755 index 0000000000000000000000000000000000000000..0fbbd652fef5c361395a5502ae033ccb19005d7d --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/b @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object b; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type zeroGradient; + } + sides + { + type zeroGradient; + } + base + { + type zeroGradient; + } + inlet + { + type zeroGradient; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/ft b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/ft new file mode 100755 index 0000000000000000000000000000000000000000..44b0a149551af8622f9968807576310b0de84173 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/ft @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object ft; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + sides + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + base + { + type zeroGradient; + } + inlet + { + type fixedValue; + value uniform 1.0; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/fu b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/fu new file mode 100755 index 0000000000000000000000000000000000000000..e3b3011de317a317c710f4fc6b42d666046f8c91 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/fu @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object fu; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + sides + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + base + { + type zeroGradient; + } + inlet + { + type fixedValue; + value uniform 1.0; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/k b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/k new file mode 100755 index 0000000000000000000000000000000000000000..80db42f64f8d054dd7a85b2de03ce68589e01a0f --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/k @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 1e-4; + +boundaryField +{ + outlet + { + type inletOutlet; + inletValue uniform 1e-4; + value uniform 1e-4; + } + sides + { + type inletOutlet; + inletValue uniform 1e-4; + value uniform 1e-4; + } + base + { + type fixedValue; + value uniform 1e-4; + } + inlet + { + type fixedValue; + value uniform 1e-4; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/muSgs b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/muSgs new file mode 100755 index 0000000000000000000000000000000000000000..f8b645f718b5ca5fe7094bb6e9b642641f632528 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/muSgs @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object muSgs; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type zeroGradient; + } + sides + { + type zeroGradient; + } + base + { + type zeroGradient; + } + inlet + { + type zeroGradient; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/p b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/p new file mode 100755 index 0000000000000000000000000000000000000000..d25a0c7e11d1bf93f25afe42aa3f1bcdeaab1f6b --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/p @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 101325; + +boundaryField +{ + outlet + { + type buoyantPressure; + value uniform 101325; + } + + sides + { + type uniformDensityHydrostaticPressure; + rho 1.2; + pRefValue 101325; + pRefPoint (0 0 0); + value $internalField; + } + base + { + type buoyantPressure; + value $internalField; + } + inlet + { + type buoyantPressure; + value $internalField; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/Allrun b/tutorials/combustion/fireFoam/les/smallPoolFire2D/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..4d995124bb70bd6509a91a1cf07f4b2cb15c0bff --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/Allrun @@ -0,0 +1,13 @@ +#!/bin/sh + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication setSet -batch makeFaceSet.setSet +runApplication createPatch -overwrite + +# Run +runApplication fireFoam + +# ----------------------------------------------------------------------------- diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/LESProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/LESProperties new file mode 100644 index 0000000000000000000000000000000000000000..17f30efd1fb7fd5e67a17052137394e3de003448 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/LESProperties @@ -0,0 +1,84 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "constant"; + object LESProperties; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +LESModel oneEqEddy; + +delta cubeRootVol; + +turbulence on; + +printCoeffs on; + + +cubeRootVolCoeffs +{ + deltaCoeff 1; +} + +PrandtlCoeffs +{ + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } + Cdelta 0.158; +} + +vanDriestCoeffs +{ + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } + Aplus 26; + Cdelta 0.158; +} + +smoothCoeffs +{ + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/SpeciesTable b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/SpeciesTable new file mode 100644 index 0000000000000000000000000000000000000000..98d27237ea171a717c84e0497a66cbad00a75484 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/SpeciesTable @@ -0,0 +1,491 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object SpeciesTable; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +fields +1 +( + +{ + name ft; + min 0; + max 1; + N 100; +} + +) +; +output +5 +( + +{ + name CH4; +} + + +{ + name CO2; +} + + +{ + name H2O; +} + + +{ + name CO; +} + + +{ + name soot; +} + +) +; +values +6 +( + +101 +( +0.001 +0.011 +0.021 +0.031 +0.041 +0.051 +0.061 +0.071 +0.081 +0.091 +0.101 +0.111 +0.121 +0.131 +0.141 +0.151 +0.161 +0.171 +0.181 +0.191 +0.201 +0.211 +0.221 +0.231 +0.241 +0.251 +0.261 +0.271 +0.281 +0.291 +0.301 +0.311 +0.321 +0.331 +0.341 +0.351 +0.361 +0.371 +0.381 +0.391 +0.401 +0.411 +0.421 +0.431 +0.441 +0.451 +0.461 +0.471 +0.481 +0.491 +0.501 +0.511 +0.521 +0.531 +0.541 +0.551 +0.561 +0.571 +0.581 +0.591 +0.601 +0.611 +0.621 +0.631 +0.641 +0.651 +0.661 +0.671 +0.681 +0.691 +0.701 +0.711 +0.721 +0.731 +0.741 +0.751 +0.761 +0.771 +0.781 +0.791 +0.801 +0.811 +0.821 +0.831 +0.841 +0.851 +0.861 +0.871 +0.881 +0.891 +0.901 +0.911 +0.921 +0.931 +0.941 +0.951 +0.961 +0.971 +0.981 +0.991 +0.999 +) + + +101 +( +0 +0 +0 +0 +0 +0 +0.0105883 +0.0285208 +0.0461843 +0.0635849 +0.0807284 +0.0976204 +0.114266 +0.130672 +0.146842 +0.162782 +0.178496 +0.193989 +0.209266 +0.224332 +0.23919 +0.253845 +0.268301 +0.282563 +0.296633 +0.310517 +0.324216 +0.337736 +0.35108 +0.364251 +0.377252 +0.390087 +0.402759 +0.415271 +0.427625 +0.439826 +0.451876 +0.463777 +0.475532 +0.487144 +0.498616 +0.50995 +0.521148 +0.532214 +0.543149 +0.553955 +0.564635 +0.575191 +0.585626 +0.595941 +0.606138 +0.61622 +0.626187 +0.636044 +0.64579 +0.655428 +0.66496 +0.674387 +0.683712 +0.692935 +0.702059 +0.711085 +0.720014 +0.728849 +0.73759 +0.74624 +0.754799 +0.763269 +0.771652 +0.779948 +0.788159 +0.796287 +0.804332 +0.812297 +0.820181 +0.827987 +0.835715 +0.843367 +0.850943 +0.858445 +0.865875 +0.873232 +0.880518 +0.887735 +0.894882 +0.901961 +0.908974 +0.91592 +0.922802 +0.929619 +0.936373 +0.943064 +0.949694 +0.956263 +0.962772 +0.969222 +0.975614 +0.981948 +0.988226 +0.994448 +0.999385 +) + + +101 +( +0.00200328 +0.0213922 +0.0396804 +0.0569589 +0.0733092 +0.088804 +0.0940165 +0.0923125 +0.0906341 +0.0889806 +0.0873516 +0.0857465 +0.0841647 +0.0826058 +0.0810693 +0.0795547 +0.0780615 +0.0765893 +0.0751376 +0.073706 +0.0722942 +0.0709016 +0.0695279 +0.0681728 +0.0668357 +0.0655165 +0.0642147 +0.06293 +0.0616621 +0.0604105 +0.0591751 +0.0579555 +0.0567514 +0.0555625 +0.0543885 +0.0532292 +0.0520842 +0.0509534 +0.0498363 +0.0487329 +0.0476428 +0.0465658 +0.0455017 +0.0444503 +0.0434112 +0.0423844 +0.0413695 +0.0403664 +0.0393749 +0.0383948 +0.0374258 +0.0364678 +0.0355206 +0.0345841 +0.033658 +0.0327421 +0.0318364 +0.0309406 +0.0300546 +0.0291781 +0.0283112 +0.0274535 +0.026605 +0.0257655 +0.0249349 +0.024113 +0.0232997 +0.0224948 +0.0216983 +0.0209099 +0.0201297 +0.0193573 +0.0185928 +0.0178361 +0.0170869 +0.0163452 +0.0156108 +0.0148837 +0.0141638 +0.0134509 +0.0127449 +0.0120458 +0.0113535 +0.0106678 +0.00998859 +0.00931588 +0.00864953 +0.00798947 +0.00733558 +0.0066878 +0.00604604 +0.00541021 +0.00478022 +0.00415601 +0.00353749 +0.00292458 +0.00231721 +0.00171531 +0.00111879 +0.000527591 +5.8413e-05 +) + + +101 +( +0.00400655 +0.0427844 +0.0793607 +0.113918 +0.146618 +0.177608 +0.188033 +0.184625 +0.181268 +0.177961 +0.174703 +0.171493 +0.168329 +0.165212 +0.162139 +0.159109 +0.156123 +0.153179 +0.150275 +0.147412 +0.144588 +0.141803 +0.139056 +0.136346 +0.133671 +0.131033 +0.128429 +0.12586 +0.123324 +0.120821 +0.11835 +0.115911 +0.113503 +0.111125 +0.108777 +0.106458 +0.104168 +0.101907 +0.0996727 +0.0974658 +0.0952856 +0.0931317 +0.0910035 +0.0889006 +0.0868225 +0.0847688 +0.082739 +0.0807328 +0.0787498 +0.0767895 +0.0748516 +0.0729356 +0.0710413 +0.0691682 +0.067316 +0.0654843 +0.0636728 +0.0618812 +0.0601091 +0.0583563 +0.0566223 +0.054907 +0.05321 +0.051531 +0.0498697 +0.0482259 +0.0465993 +0.0449896 +0.0433965 +0.0418198 +0.0402593 +0.0387147 +0.0371857 +0.0356721 +0.0341737 +0.0326903 +0.0312216 +0.0297674 +0.0283276 +0.0269018 +0.0254899 +0.0240917 +0.022707 +0.0213355 +0.0199772 +0.0186318 +0.0172991 +0.0159789 +0.0146712 +0.0133756 +0.0120921 +0.0108204 +0.00956045 +0.00831202 +0.00707498 +0.00584917 +0.00463443 +0.00343062 +0.00223758 +0.00105518 +0.000116826 +) + +101{0} +101{0} +) +; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties new file mode 100644 index 0000000000000000000000000000000000000000..9619d659c77bdf65ae6bf5dd1f49a9b446f25ad8 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel infinitelyFastChemistry; + +infinitelyFastChemistryCoeffs +{ + C 10.0; +} + +noCombustionCoeffs +{ +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/g b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..2845e492e925860efc7e2c85e2ab0069aee643fd --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/g @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.8 0); + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/polyMesh/blockMeshDict b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..0f18c0d733830bc2768ff312ea9078a0c821ce14 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/polyMesh/blockMeshDict @@ -0,0 +1,67 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (-0.5 0 -0.01) + ( 0.5 0 -0.01) + ( 0.5 1 -0.01) + (-0.5 1 -0.01) + (-0.5 0 0.01) + ( 0.5 0 0.01) + ( 0.5 1 0.01) + (-0.5 1 0.01) + +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (150 150 1) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + patch base + ( + (0 1 5 4) + ) + patch outlet + ( + (3 2 6 7) + ) + patch sides + ( + (1 5 6 2) + (0 4 7 3) + ) + empty frontAndBack + ( + (0 1 2 3) + (4 5 6 7) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/polyMesh/boundary b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..ce658ffe2525b139025eff2cb449728439bbadf9 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/polyMesh/boundary @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5 +( + base + { + type patch; + nFaces 134; + startFace 44700; + } + outlet + { + type patch; + nFaces 150; + startFace 44834; + } + sides + { + type patch; + nFaces 300; + startFace 44984; + } + frontAndBack + { + type empty; + nFaces 45000; + startFace 45284; + } + inlet + { + type patch; + nFaces 16; + startFace 90284; + } +) + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/radiationProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/radiationProperties new file mode 100644 index 0000000000000000000000000000000000000000..5cf96fad766a735835295727ca5a507edd3b4d49 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/radiationProperties @@ -0,0 +1,149 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation on; + +radiationModel fvDOM; + +noRadiation +{ +} + +P1Coeffs +{ +} + +fvDOMCoeffs +{ + nPhi 4; // azimuthal angles in PI/2 on X-Y.(from Y to X) + nTheta 0; // polar angles in PI (from Z to X-Y plane) + convergence 1e-3; // convergence criteria for radiation iteration + maxIter 1; // maximum number of iterations +} + +// Number of flow iterations per radiation iteration +solverFreq 10; + +absorptionEmissionModel greyMeanAbsorptionEmission; + +constantAbsorptionEmissionCoeffs +{ + a a [ 0 -1 0 0 0 0 0 ] 0.01; + e e [ 0 -1 0 0 0 0 0 ] 0; + E E [ 1 -1 -3 0 0 0 0 ] 0; +} + +greyMeanAbsorptionEmissionCoeffs +{ + lookUpTableFileName "SpeciesTable"; + + EhrrCoeff 0.0; + + CO2 + { + Tcommon 300; //Common Temp + invTemp true; //Is the polynomio using inverse temperature. + Tlow 200; //Low Temp + Thigh 2500; //High Temp + + loTcoeffs //coefss for T < Tcommon + ( + 0 // a0 + + 0 // a1*T + + 0 // a2*T^(+/-)2 + + 0 // a3*T^(+/-)3 + + 0 // a4*T^(+/-)4 + + 0 // a5*T^(+/-)5 + + ); + hiTcoeffs //coefss for T > Tcommon + ( + 18.741 + -121.31e3 + 273.5e6 + -194.05e9 + 56.31e12 + -5.8169e15 + ); + + } + + H2O + { + Tcommon 300; + invTemp true; + Tlow 200; + Thigh 2500; + + loTcoeffs + ( + 0 + 0 + 0 + 0 + 0 + 0 + ); + hiTcoeffs + ( + -0.23093 + -1.12390e3 + 9.4153e6 + -2.99885e9 + 0.51382e12 + -1.868e10 + ); + } + + CH4 + { + Tcommon 300; + Tlow 200; + Thigh 2500; + invTemp false; + + loTcoeffs + ( + 0 + 0 + 0 + 0 + 0 + 0 + ); + hiTcoeffs + ( + 6.6334 + -0.0035686 + 1.6682e-8 + 2.5611e-10 + -2.6558e-14 + 0 + ); + } + +} + +scatterModel constantScatter; + +constantScatterCoeffs +{ + sigma sigma [ 0 -1 0 0 0 0 0 ] 0; + C C [ 0 0 0 0 0 0 0 ] 0; +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties new file mode 100644 index 0000000000000000000000000000000000000000..2e4a2e74af5eccb9b5c187a22a7ac761db6e1355 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType hsPsiMixtureThermo<veryInhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>; + +stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 17.1271; +stoichiometricOxygenFuelMassRatio stoichiometricOxygenFuelMassRatio [0 0 0 0 0 0 0] 4.0; +qFuel qFuel [0 2 -2 0 0 0 0] 5.00264e+07; + +fuel fuel 1 16.0428 + 200 6000 1000 + 1.63543 0.0100844 -3.36924e-06 5.34973e-10 -3.15528e-14 -10005.6 9.9937 + 5.14988 -0.013671 4.91801e-05 -4.84744e-08 1.66694e-11 -10246.6 -4.64132 + 1.67212e-06 170.672; + +oxidant oxidant 1 28.8504 + 200 6000 1000 + 3.10131 0.00124137 -4.18816e-07 6.64158e-11 -3.91274e-15 -985.266 5.35597 + 3.58378 -0.000727005 1.67057e-06 -1.09203e-10 -4.31765e-13 -1050.53 3.11239 + 1.67212e-06 170.672; + +reactants reactants 1 27.6004 + 200 6000 1000 + 2.95825 0.00210441 -7.06762e-07 1.12145e-10 -6.61028e-15 -1865.61 5.80859 + 3.73662 -0.00199028 6.30727e-06 -4.82941e-09 1.23723e-12 -1948.03 2.35566 + 1.67212e-06 170.672; + +burntProducts burntProducts 1 27.6334 + 200 6000 1000 + 3.0602 0.00182422 -5.93878e-07 8.93807e-11 -4.97595e-15 -10998.7 5.32209 + 3.54628 0.000378279 2.02797e-07 9.31602e-10 -6.84016e-13 -11102.1 2.90098 + 1.67212e-06 170.672; + +products products 1 27.6004 + 200 6000 1000 + 3.05615 0.0018477 -6.01767e-07 9.06474e-11 -5.05149e-15 -10995.9 5.33537 + 3.55084 0.000338343 3.42018e-07 7.91162e-10 -6.34688e-13 -11099.7 2.87954 + 1.67212e-06 170.672; + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/turbulenceProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..d44ea0a37125e0c4a34ba83ae4a6c556f39236d4 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/turbulenceProperties @@ -0,0 +1,23 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format binary; + class dictionary; + location "constant"; + object turbulenceProperties; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType LESModel; + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/makeFaceSet.setSet b/tutorials/combustion/fireFoam/les/smallPoolFire2D/makeFaceSet.setSet new file mode 100644 index 0000000000000000000000000000000000000000..78681a7505850cc0519ce586eb04590d655ab63e --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/makeFaceSet.setSet @@ -0,0 +1 @@ +faceSet f0 new boxToFace (-0.0529 -0.001 -0.1)(0.0529 0.002 0.1) diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/controlDict b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..aa179ea0851a6c7aa5a9f38829869a9358f55234 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/controlDict @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application fireFoam; + +startFrom startTime; + +startTime 0.0; + +stopAt endTime; + +endTime 3.0; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +graphFormat raw; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.25; + +maxDeltaT 0.1; + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/createPatchDict b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/createPatchDict new file mode 100644 index 0000000000000000000000000000000000000000..1db65e4d32e9f44abb11309efbfdd2554a47cd5c --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/createPatchDict @@ -0,0 +1,80 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object createPatchDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// This application/dictionary controls: +// - optional: create new patches from boundary faces (either given as +// a set of patches or as a faceSet) +// - always: order faces on coupled patches such that they are opposite. This +// is done for all coupled faces, not just for any patches created. +// - optional: synchronise points on coupled patches. + +// 1. Create cyclic: +// - specify where the faces should come from +// - specify the type of cyclic. If a rotational specify the rotationAxis +// and centre to make matching easier +// - pointSync true to guarantee points to line up. + +// 2. Correct incorrect cyclic: +// This will usually fail upon loading: +// "face 0 area does not match neighbour 2 by 0.0100005%" +// " -- possible face ordering problem." +// - change patch type from 'cyclic' to 'patch' in the polyMesh/boundary file. +// - loosen match tolerance to get case to load +// - regenerate cyclic as above + + +// Tolerance used in matching faces. Absolute tolerance is span of +// face times this factor. To load incorrectly matches meshes set this +// to a higher value. +matchTolerance 1E-3; + +// Do a synchronisation of coupled points after creation of any patches. +pointSync true; + +// Patches to create. +patchInfo +( + { + // Name of new patch + name inlet; + + // Type of new patch + dictionary + { + type patch; + + // Optional: explicitly set transformation tensor. + // Used when matching and synchronising points. + //transform translational; + //separationVector (-2289 0 0); + transform rotational; + rotationAxis (1 0 0); + rotationCentre (0 0 0); + } + + // How to construct: either from 'patches' or 'set' + constructFrom set; + + // If constructFrom = patches : names of patches. Wildcards allowed. + patches ("periodic.*"); + + // If constructFrom = set : name of faceSet + set f0; + } +); + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..8b24cb3469fc56cae3a762677be34b696decc0b5 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes @@ -0,0 +1,76 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss limitedLinear 1; + div(phi,k) Gauss limitedLinear 1; + flux(phi,ft) Gauss limitedLinear01 1; + div(phi,ft_b_h) Gauss multivariateSelection + { + fu limitedLinear01 1; + ft limitedLinear01 1; + hs limitedLinear 1; + }; + div((muEff*dev2(grad(U).T()))) Gauss linear; + div(phiU,p) Gauss linear; + div(Ji,Ii_h) Gauss upwind; +} + +laplacianSchemes +{ + default none; + laplacian(muEff,U) Gauss linear corrected; + laplacian(DkEff,k) Gauss linear corrected; + laplacian(DBEff,B) Gauss linear corrected; + laplacian(alphaEff,hs) Gauss linear uncorrected; + laplacian(alphaEff,fu) Gauss linear uncorrected; + laplacian(alphaEff,ft) Gauss linear uncorrected; + laplacian((((rho*(1|A(U)))*rho)*gh)) Gauss linear uncorrected; + laplacian(interpolate((rho*(1|A(U)))),p) Gauss linear uncorrected; + laplacian(gammaRad,G) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p; +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..ac4b5ee3ed9fb59fec01e8353c90274f565a9e29 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution @@ -0,0 +1,138 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + rho + { + solver PCG; + preconditioner DIC; + tolerance 0; + relTol 0; + }; + + p + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + smoother GaussSeidel; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + }; + + pFinal + { + solver GAMG; + tolerance 1e-7; + relTol 0; + smoother GaussSeidel; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + }; + + + ft + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-7; + relTol 0; + nSweeps 1; + }; + + fu + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-7; + relTol 0; + nSweeps 1; + }; + + + U + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-7; + relTol 0.1; + nSweeps 1; + }; + + UFinal + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-7; + relTol 0; + nSweeps 1; + }; + + k + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-7; + relTol 0; + nSweeps 1; + }; + + hs + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-7; + relTol 0; + }; + + Ii + { + solver GAMG; + tolerance 1e-4; + relTol 0; + smoother DILU; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + G + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } + +} + +PISO +{ + momentumPredictor yes; + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; +} + +// ************************************************************************* //