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::hReactionThermo 00026 00027 Description 00028 Foam::hReactionThermo 00029 00030 SourceFiles 00031 hReactionThermo.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef hReactionThermo_H 00036 #define hReactionThermo_H 00037 00038 #include <basicThermophysicalModels/basicRhoThermo.H> 00039 #include <reactionThermophysicalModels/basicMultiComponentMixture.H> 00040 #include <OpenFOAM/autoPtr.H> 00041 #include <OpenFOAM/runTimeSelectionTables.H> 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class hReactionThermo Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class hReactionThermo 00053 : 00054 public basicRhoThermo 00055 { 00056 00057 protected: 00058 00059 // Protected data 00060 00061 //- Enthalpy field 00062 volScalarField h_; 00063 00064 00065 public: 00066 00067 //- Runtime type information 00068 TypeName("hReactionThermo"); 00069 00070 00071 //- Declare run-time constructor selection tables 00072 declareRunTimeSelectionTable 00073 ( 00074 autoPtr, 00075 hReactionThermo, 00076 fvMesh, 00077 (const fvMesh& mesh), 00078 (mesh) 00079 ); 00080 00081 00082 // Constructors 00083 00084 //- Construct from dictionary and mesh 00085 hReactionThermo(const fvMesh&); 00086 00087 00088 // Selectors 00089 00090 //- Standard selection based on fvMesh 00091 static autoPtr<hReactionThermo> New(const fvMesh&); 00092 00093 //- Select and check that package contains 'thermoType' 00094 static autoPtr<hReactionThermo> NewType 00095 ( 00096 const fvMesh&, 00097 const word& thermoType 00098 ); 00099 00100 00101 //- Destructor 00102 virtual ~hReactionThermo(); 00103 00104 00105 // Member functions 00106 00107 //- Return the composition of the multi-component mixture 00108 virtual basicMultiComponentMixture& composition() = 0; 00109 00110 //- Return the composition of the multi-component mixture 00111 virtual const basicMultiComponentMixture& composition() const = 0; 00112 00113 00114 // Access to thermodynamic state variables 00115 00116 //- Enthalpy [J/kg] 00117 // Non-const access allowed for transport equations 00118 virtual volScalarField& h() 00119 { 00120 return h_; 00121 } 00122 00123 //- Enthalpy [J/kg] 00124 virtual const volScalarField& h() const 00125 { 00126 return h_; 00127 } 00128 00129 00130 //- Update properties 00131 virtual void correct() = 0; 00132 }; 00133 00134 00135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00136 00137 } // End namespace Foam 00138 00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00140 00141 #endif 00142 00143 // ************************ vim: set sw=4 sts=4 et: ************************ //