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