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