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

basicChemistryModel.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) 2009-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::basicChemistryModel
00026 
00027 Description
00028     Base class for chemistry models
00029 
00030 SourceFiles
00031     basicChemistryModelI.H
00032     basicChemistryModel.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef basicChemistryModel_H
00037 #define basicChemistryModel_H
00038 
00039 #include <OpenFOAM/IOdictionary.H>
00040 #include <OpenFOAM/Switch.H>
00041 #include <OpenFOAM/scalarField.H>
00042 #include <finiteVolume/volFieldsFwd.H>
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 // Forward declaration of classes
00050 class fvMesh;
00051 
00052 /*---------------------------------------------------------------------------*\
00053                    class basicChemistryModel Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class basicChemistryModel
00057 :
00058     public IOdictionary
00059 {
00060     // Private Member Functions
00061 
00062         //- Construct as copy (not implemented)
00063         basicChemistryModel(const basicChemistryModel&);
00064 
00065         //- Disallow default bitwise assignment
00066         void operator=(const basicChemistryModel&);
00067 
00068 
00069 protected:
00070 
00071     // Protected data
00072 
00073         //- Reference to the mesh database
00074         const fvMesh& mesh_;
00075 
00076         //- Chemistry activation switch
00077         Switch chemistry_;
00078 
00079         //- Latest estimation of integration step
00080         scalarField deltaTChem_;
00081 
00082 
00083     // Protected member functions
00084 
00085         //- Return non-const access to the latest estimation of integration
00086         //  step, e.g. for multi-chemistry model
00087         scalarField& deltaTChem();
00088 
00089 
00090 public:
00091 
00092     //- Runtime type information
00093     TypeName("basicChemistryModel");
00094 
00095 
00096     // Constructors
00097 
00098         //- Construct from mesh
00099         basicChemistryModel(const fvMesh& mesh);
00100 
00101 
00102     //- Destructor
00103     virtual ~basicChemistryModel();
00104 
00105 
00106     // Member Functions
00107 
00108         //- Return const access to the mesh database
00109         inline const fvMesh& mesh() const;
00110 
00111         //- Chemistry activation switch
00112         inline Switch chemistry() const;
00113 
00114         //- Return the latest estimation of integration step
00115         inline const scalarField& deltaTChem() const;
00116 
00117 
00118         // Functions to be derived in derived classes
00119 
00120             // Fields
00121 
00122                 //- Return const access to chemical source terms
00123                 virtual tmp<volScalarField> RR(const label i) const = 0;
00124 
00125 
00126             // Chemistry solution
00127 
00128                 //- Solve the reaction system for the given start time and
00129                 //  timestep and return the characteristic time
00130                 virtual scalar solve(const scalar t0, const scalar deltaT) = 0;
00131 
00132                 //- Return the chemical time scale
00133                 virtual tmp<volScalarField> tc() const = 0;
00134 
00135                 //- Return source for enthalpy equation [kg/m/s3]
00136                 virtual tmp<volScalarField> Sh() const = 0;
00137 
00138                 //- Return the heat release, i.e. enthalpy/sec [m2/s3]
00139                 virtual tmp<volScalarField> dQ() const = 0;
00140 };
00141 
00142 
00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00144 
00145 } // End namespace Foam
00146 
00147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00148 
00149 #include "basicChemistryModelI.H"
00150 
00151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00152 
00153 #endif
00154 
00155 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines