|
|
|
hRhoThermo.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) 1991-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::hPsiThermo 00027 00028 Description 00029 Enthalpy for a mixture based on density 00030 00031 SourceFiles 00032 hRhoThermo.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef hRhoThermo_H 00037 #define hRhoThermo_H 00038 00039 #include "basicRhoThermo.H" 00040 #include "basicMixture.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 /*---------------------------------------------------------------------------*\ 00048 Class hRhoThermo Declaration 00049 \*---------------------------------------------------------------------------*/ 00050 00051 template<class MixtureType> 00052 class hRhoThermo 00053 : 00054 public basicRhoThermo, 00055 public MixtureType 00056 { 00057 // Private data 00058 00059 //- Enthalpy field 00060 volScalarField h_; 00061 00062 00063 // Private member functions 00064 00065 //- Calculate the thermo variables 00066 void calculate(); 00067 00068 //- Construct as copy (not implemented) 00069 hRhoThermo(const hRhoThermo<MixtureType>&); 00070 00071 00072 public: 00073 00074 //- Runtime type information 00075 TypeName("hRhoThermo"); 00076 00077 00078 // Constructors 00079 00080 //- Construct from mesh 00081 hRhoThermo(const fvMesh&); 00082 00083 00084 //- Destructor 00085 virtual ~hRhoThermo(); 00086 00087 00088 // Member functions 00089 00090 //- Return the compostion of the combustion mixture 00091 virtual basicMixture& composition() 00092 { 00093 return *this; 00094 } 00095 00096 //- Return the compostion of the combustion mixture 00097 virtual const basicMixture& composition() const 00098 { 00099 return *this; 00100 } 00101 00102 //- Update properties 00103 virtual void correct(); 00104 00105 00106 // Access to thermodynamic state variables 00107 00108 //- Enthalpy [J/kg] 00109 // Non-const access allowed for transport equations 00110 virtual volScalarField& h() 00111 { 00112 return h_; 00113 } 00114 00115 //- Enthalpy [J/kg] 00116 virtual const volScalarField& h() const 00117 { 00118 return h_; 00119 } 00120 00121 00122 // Fields derived from thermodynamic state variables 00123 00124 //- Enthalpy for cell-set [J/kg] 00125 virtual tmp<scalarField> h 00126 ( 00127 const scalarField& T, 00128 const labelList& cells 00129 ) const; 00130 00131 //- Enthalpy for patch [J/kg] 00132 virtual tmp<scalarField> h 00133 ( 00134 const scalarField& T, 00135 const label patchi 00136 ) const; 00137 00138 //- Heat capacity at constant pressure for patch [J/kg/K] 00139 virtual tmp<scalarField> Cp 00140 ( 00141 const scalarField& T, 00142 const label patchi 00143 ) const; 00144 00145 //- Heat capacity at constant pressure [J/kg/K] 00146 virtual tmp<volScalarField> Cp() const; 00147 00148 //- Heat capacity at constant volume for patch [J/kg/K] 00149 virtual tmp<scalarField> Cv 00150 ( 00151 const scalarField& T, 00152 const label patchi 00153 ) const; 00154 00155 //- Heat capacity at constant volume [J/kg/K] 00156 virtual tmp<volScalarField> Cv() const; 00157 00158 00159 //- Read thermophysicalProperties dictionary 00160 virtual bool read(); 00161 }; 00162 00163 00164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00165 00166 } // End namespace Foam 00167 00168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00169 00170 #ifdef NoRepository 00171 # include "hRhoThermo.C" 00172 #endif 00173 00174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00175 00176 #endif 00177 00178 // ************************************************************************* // |