![]() |
|
00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2005 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 hhuCombustionThermo 00027 00028 Description 00029 00030 SourceFiles 00031 hhuCombustionThermo.C 00032 newhhuCombustionThermo.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef hhuCombustionThermo_H 00037 #define hhuCombustionThermo_H 00038 00039 #include "hCombustionThermo.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 /*---------------------------------------------------------------------------*\ 00047 Class hhuCombustionThermo Declaration 00048 \*---------------------------------------------------------------------------*/ 00049 00050 class hhuCombustionThermo 00051 : 00052 public hCombustionThermo 00053 { 00054 00055 protected: 00056 00057 // Protected data 00058 00059 volScalarField Tu_; 00060 volScalarField hu_; 00061 00062 00063 // Protected member functions 00064 00065 wordList huBoundaryTypes(); 00066 void huBoundaryCorrection(volScalarField& hu); 00067 00068 00069 public: 00070 00071 //- Runtime type information 00072 TypeName("hhuCombustionThermo"); 00073 00074 00075 // Declare run-time constructor selection tables 00076 00077 declareRunTimeSelectionTable 00078 ( 00079 autoPtr, 00080 hhuCombustionThermo, 00081 fvMesh, 00082 (const fvMesh& mesh), 00083 (mesh) 00084 ); 00085 00086 00087 // Constructors 00088 00089 //- Construct from dictionary and mesh 00090 hhuCombustionThermo(const fvMesh&); 00091 00092 00093 // Selectors 00094 00095 static autoPtr<hhuCombustionThermo> New(const fvMesh&); 00096 00097 00098 // Destructor 00099 00100 virtual ~hhuCombustionThermo(); 00101 00102 00103 // Member functions 00104 00105 //- Update properties 00106 virtual void correct() = 0; 00107 00108 00109 // Access to thermodynamic state variables. 00110 00111 //- Unburnt gas enthalpy [J/kg] 00112 // Non-const access allowed for transport equations 00113 volScalarField& hu() 00114 { 00115 return hu_; 00116 } 00117 00118 //- Unburnt gas enthalpy [J/kg] 00119 const volScalarField& hu() const 00120 { 00121 return hu_; 00122 } 00123 00124 00125 // Fields derived from thermodynamic state variables 00126 00127 //- Unburnt gas enthalpy for cell-set [J/kg] 00128 virtual tmp<scalarField> hu 00129 ( 00130 const scalarField& T, 00131 const labelList& cells 00132 ) const = 0; 00133 00134 //- Unburnt gas enthalpy for patch [J/kg] 00135 virtual tmp<scalarField> hu 00136 ( 00137 const scalarField& T, 00138 const label patchi 00139 ) const = 0; 00140 00141 //- Unburnt gas temperature [K] 00142 const volScalarField& Tu() const 00143 { 00144 return Tu_; 00145 } 00146 00147 //- Burnt gas temperature [K] 00148 virtual tmp<volScalarField> Tb() const = 0; 00149 00150 //- Unburnt gas density [kg/m^3] 00151 virtual tmp<volScalarField> rhou() const 00152 { 00153 return p_*psiu(); 00154 } 00155 00156 //- Burnt gas density [kg/m^3] 00157 virtual tmp<volScalarField> rhob() const 00158 { 00159 return p_*psib(); 00160 } 00161 00162 //- Unburnt gas compressibility [s^2/m^2] 00163 virtual tmp<volScalarField> psiu() const = 0; 00164 00165 //- Burnt gas compressibility [s^2/m^2] 00166 virtual tmp<volScalarField> psib() const = 0; 00167 00168 //- Dynamic viscosity of unburnt gas [kg/ms] 00169 virtual tmp<volScalarField> muu() const = 0; 00170 00171 //- Dynamic viscosity of burnt gas [kg/ms] 00172 virtual tmp<volScalarField> mub() const = 0; 00173 }; 00174 00175 00176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00177 00178 } // End namespace Foam 00179 00180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00181 00182 #endif 00183 00184 // ************************************************************************* //