FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

combustionModel.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::combustionModel
00026 
00027 Description
00028     Base class for all non-premixed combustion models.
00029 
00030 SourceFiles
00031     combustionModel.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef combustionModel_H
00036 #define combustionModel_H
00037 
00038 #include <OpenFOAM/IOdictionary.H>
00039 #include <reactionThermophysicalModels/hsCombustionThermo.H>
00040 #include <compressibleTurbulenceModel/turbulenceModel.H>
00041 #include <finiteVolume/multivariateSurfaceInterpolationScheme.H>
00042 #include <OpenFOAM/runTimeSelectionTables.H>
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050                         Class combustionModel Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class combustionModel
00054 {
00055 
00056 protected:
00057 
00058     // Protected data
00059 
00060         //- Dictionary of coefficients for the particular model
00061         dictionary combustionModelCoeffs_;
00062 
00063         //- Reference to the thermodynamic
00064         const hsCombustionThermo& thermo_;
00065 
00066         //- Reference to the turbulence model
00067         const compressible::turbulenceModel& turbulence_;
00068 
00069         //- Reference to the mesh database
00070         const fvMesh& mesh_;
00071 
00072         //- Reference to mass-flux field
00073         const surfaceScalarField& phi_;
00074 
00075         //- Reference to the density field
00076         const volScalarField& rho_;
00077 
00078         //- Stoichiometric air-fuel mass ratio
00079         dimensionedScalar stoicRatio_;
00080 
00081         //- Stoichiometric oxygen-fuel mass ratio
00082         dimensionedScalar s_;
00083 
00084         //- Heat of combustion (J/Kg)
00085         dimensionedScalar qFuel_;
00086 
00087 
00088 private:
00089 
00090     // Private Member Functions
00091 
00092         //- Disallow copy construct
00093         combustionModel(const combustionModel&);
00094 
00095         //- Disallow default bitwise assignment
00096         void operator=(const combustionModel&);
00097 
00098         const basicMultiComponentMixture& composition_;
00099 
00100 
00101 public:
00102 
00103     //- Runtime type information
00104     TypeName("combustionModel");
00105 
00106 
00107     // Declare run-time constructor selection table
00108 
00109         declareRunTimeSelectionTable
00110         (
00111             autoPtr,
00112             combustionModel,
00113             dictionary,
00114             (
00115                 const dictionary& combustionProperties,
00116                 const hsCombustionThermo& thermo,
00117                 const compressible::turbulenceModel& turbulence,
00118                 const surfaceScalarField& phi,
00119                 const volScalarField& rho
00120             ),
00121             (
00122                 combustionProperties,
00123                 thermo,
00124                 turbulence,
00125                 phi,
00126                 rho
00127             )
00128         );
00129 
00130 
00131     // Selectors
00132 
00133         //- Return a reference to the selected combustion model
00134         static autoPtr<combustionModel> New
00135         (
00136             const dictionary& combustionProperties,
00137             const hsCombustionThermo& thermo,
00138             const compressible::turbulenceModel& turbulence,
00139             const surfaceScalarField& phi,
00140             const volScalarField& rho
00141         );
00142 
00143 
00144     // Constructors
00145 
00146         //- Construct from components
00147         combustionModel
00148         (
00149             const dictionary& combustionProperties,
00150             const hsCombustionThermo& thermo,
00151             const compressible::turbulenceModel& turbulence,
00152             const surfaceScalarField& phi,
00153             const volScalarField& rho
00154         );
00155 
00156 
00157     //- Destructor
00158     virtual ~combustionModel();
00159 
00160 
00161     // Member Functions
00162 
00163         // Access functions
00164 
00165             //- Access composition
00166             const basicMultiComponentMixture& composition() const
00167             {
00168                 return composition_;
00169             }
00170 
00171             //- Access combustion dictionary
00172             const dictionary combustionModelCoeffs() const
00173             {
00174                 return combustionModelCoeffs_;
00175             }
00176 
00177             //- Access heat of combustion
00178             const dimensionedScalar qFuel() const
00179             {
00180                 return qFuel_;
00181             }
00182 
00183         //- Return normalised consumption rate of (fu - fres)
00184         virtual tmp<volScalarField> wFuelNorm() const = 0;
00185 
00186         //- Fuel consumption rate matrix i.e. source-term for the fuel equation
00187         virtual tmp<fvScalarMatrix> R(volScalarField& fu) const;
00188 
00189         //- Heat-release rate calculated from the given
00190         //  fuel consumption rate matrix
00191         virtual tmp<volScalarField> dQ(const fvScalarMatrix& Rfu) const;
00192 
00193         //- Correct combustion rate
00194         virtual void correct() = 0;
00195 
00196         //- Update properties from given dictionary
00197         virtual bool read(const dictionary& combustionProperties) = 0;
00198 };
00199 
00200 
00201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00202 
00203 } // End namespace Foam
00204 
00205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00206 
00207 #endif
00208 
00209 // ************************************************************************* //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines