1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
28 Basic thermodynamic properties
34 \*---------------------------------------------------------------------------*/
39 #include "volFields.H"
41 #include "IOdictionary.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class basicThermo Declaration
51 \*---------------------------------------------------------------------------*/
67 //- Compressibility [s^2/m^2]
73 //- Laminar dynamic viscosity [kg/m/s]
76 //- Laminar thermal diffusuvity [kg/m/s]
77 volScalarField alpha_;
80 // Protected member functions
84 //- Return the enthalpy field boundary types by interrogating the
85 // temperature field boundary types
86 wordList hBoundaryTypes();
88 //- Correct the enthalpy field boundaries
89 void hBoundaryCorrection(volScalarField& h);
94 //- Return the internal energy field boundary types by
95 // interrogating the temperature field boundary types
96 wordList eBoundaryTypes();
98 //- Correct the internal energy field boundaries
99 void eBoundaryCorrection(volScalarField& e);
102 //- Construct as copy (not implemented)
103 basicThermo(const basicThermo&);
108 //- Runtime type information
109 TypeName("basicThermo");
114 //- Construct from mesh and object registry
115 basicThermo(const fvMesh&, const objectRegistry&);
119 virtual ~basicThermo();
124 //- Update properties
125 virtual void correct() = 0;
128 // Access to thermodynamic state variables
131 // Non-const access allowed for transport equations
132 virtual volScalarField& p();
135 virtual const volScalarField& p() const;
138 virtual tmp<volScalarField> rho() const = 0;
140 //- Compressibility [s^2/m^2]
141 virtual const volScalarField& psi() const;
143 //- Total enthalpy [J/kg]
144 // Non-const access allowed for transport equations
145 virtual volScalarField& h();
147 //- Total enthalpy [J/kg]
148 virtual const volScalarField& h() const;
150 //- Total enthalpy for cell-set [J/kg]
151 virtual tmp<scalarField> h
153 const scalarField& T,
154 const labelList& cells
157 //- Total enthalpy for patch [J/kg]
158 virtual tmp<scalarField> h
160 const scalarField& T,
164 //- Sensible enthalpy [J/kg]
165 // Non-const access allowed for transport equations
166 virtual volScalarField& hs();
168 //- Sensible enthalpy [J/kg]
169 virtual const volScalarField& hs() const;
171 //- Sensible enthalpy for cell-set [J/kg]
172 virtual tmp<scalarField> hs
174 const scalarField& T,
175 const labelList& cells
178 //- Sensible enthalpy for patch [J/kg]
179 virtual tmp<scalarField> hs
181 const scalarField& T,
185 //- Chemical enthalpy [J/kg]
186 virtual tmp<volScalarField> hc() const;
188 //- Internal energy [J/kg]
189 // Non-const access allowed for transport equations
190 virtual volScalarField& e();
192 //- Internal energy [J/kg]
193 virtual const volScalarField& e() const;
195 //- Internal energy for cell-set [J/kg]
196 virtual tmp<scalarField> e
198 const scalarField& T,
199 const labelList& cells
202 //- Internal energy for patch [J/kg]
203 virtual tmp<scalarField> e
205 const scalarField& T,
210 // Fields derived from thermodynamic state variables
213 virtual const volScalarField& T() const;
215 //- Heat capacity at constant pressure for patch [J/kg/K]
216 virtual tmp<scalarField> Cp
218 const scalarField& T,
222 //- Heat capacity at constant pressure for cell-set [J/kg/K]
223 virtual tmp<scalarField> Cp
225 const scalarField& T,
226 const labelList& cells
229 //- Heat capacity at constant pressure [J/kg/K]
230 virtual tmp<volScalarField> Cp() const;
232 //- Heat capacity at constant volume for patch [J/kg/K]
233 virtual tmp<scalarField> Cv
235 const scalarField& T,
239 //- Heat capacity at constant volume [J/kg/K]
240 virtual tmp<volScalarField> Cv() const;
243 // Access to transport state variables
245 //- Dynamic viscosity of mixture [kg/m/s]
246 virtual const volScalarField& mu() const;
248 //- Thermal diffusivity for enthalpy of mixture [kg/m/s]
249 virtual const volScalarField& alpha() const;
252 //- Read thermophysicalProperties dictionary
257 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
259 } // End namespace Foam
261 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
265 // ************************************************************************* //