ThermoPhaseModel.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2015-2018 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::ThermoPhaseModel
28
29Description
30 Class which represents a phase with a thermodynamic model. Provides access
31 to the thermodynamic variables. Note that the thermo model itself is not
32 returned as this class could be substituted in the hierarchy for one which
33 mirrors the functionality, but does not include a thermo model; an
34 incompressible phase model, for example.
35
36SourceFiles
37 ThermoPhaseModel.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef ThermoPhaseModel_H
42#define ThermoPhaseModel_H
43
44#include "phaseModel.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51class rhoThermo;
52
53/*---------------------------------------------------------------------------*\
54 Class ThermoPhaseModel Declaration
55\*---------------------------------------------------------------------------*/
56
57template<class BasePhaseModel, class ThermoType>
59:
60 public BasePhaseModel
61{
62protected:
63
64 // Protected data
65
66 //- Thermophysical model
68
69
70public:
71
72 // Constructors
73
75 (
76 const phaseSystem& fluid,
77 const word& phaseName,
78 const label index
79 );
80
81
82 //- Destructor
83 virtual ~ThermoPhaseModel();
84
85
86 // Member Functions
87
88 // Thermo
89
90 //- Return whether the phase is compressible
91 virtual bool compressible() const;
92
93 //- Return the thermophysical model
94 virtual const rhoThermo& thermo() const;
95
96 //- Access the thermophysical model
97 virtual rhoThermo& thermoRef();
98
99 //- Return the density field
100 virtual tmp<volScalarField> rho() const;
101
102
103 // Transport
104
105 //- Return the laminar dynamic viscosity
106 virtual tmp<volScalarField> mu() const;
107
108 //- Return the laminar dynamic viscosity on a patch
109 virtual tmp<scalarField> mu(const label patchi) const;
110
111 //- Return the laminar kinematic viscosity
112 virtual tmp<volScalarField> nu() const;
113
114 //- Return the laminar kinematic viscosity on a patch
115 virtual tmp<scalarField> nu(const label patchi) const;
116
117 //- Thermal diffusivity for enthalpy of mixture [kg/m/s]
118 virtual tmp<volScalarField> alpha() const;
119
120 //- Thermal diffusivity for enthalpy of mixture for patch [kg/m/s]
121 virtual tmp<scalarField> alpha(const label patchi) const;
122
123 //- Thermal diffusivity for temperature of mixture [J/m/s/K]
124 virtual tmp<volScalarField> kappa() const;
125
126 //- Thermal diffusivity for temperature of mixture
127 // for patch [J/m/s/K]
128 virtual tmp<scalarField> kappa(const label patchi) const;
129
130 //- Thermal diffusivity for energy of mixture [kg/m/s]
131 virtual tmp<volScalarField> alphahe() const;
132
133 //- Thermal diffusivity for energy of mixture for patch [kg/m/s]
134 virtual tmp<scalarField> alphahe(const label patchi) const;
135
136
137 // Turbulence
138
139 //- Effective thermal turbulent diffusivity for temperature
140 // of mixture for patch [J/m/s/K]
141 using BasePhaseModel::kappaEff;
142
143 //- Effective thermal turbulent diffusivity for temperature
144 // of mixture [J/m/s/K]
146 (
147 const volScalarField& alphat
148 ) const;
149
150 //- Effective thermal turbulent diffusivity for temperature
151 // of mixture for patch [J/m/s/K]
153 (
154 const scalarField& alphat,
155 const label patchi
156 ) const;
157
158 //- Effective thermal turbulent diffusivity of mixture [kg/m/s]
159 using BasePhaseModel::alphaEff;
160
161 //- Effective thermal turbulent diffusivity of mixture [kg/m/s]
163 (
164 const volScalarField& alphat
165 ) const;
166
167 //- Effective thermal turbulent diffusivity of mixture
168 // for patch [kg/m/s]
170 (
171 const scalarField& alphat,
172 const label patchi
173 ) const;
174};
175
176
177// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179} // End namespace Foam
180
181// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182
183#ifdef NoRepository
184 #include "ThermoPhaseModel.C"
185#endif
186
187// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188
189#endif
190
191// ************************************************************************* //
twoPhaseSystem & fluid
Class which represents a phase with a thermodynamic model. Provides access to the thermodynamic varia...
virtual const rhoThermo & thermo() const
Return the thermophysical model.
virtual tmp< volScalarField > alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
virtual tmp< volScalarField > alphahe() const
Thermal diffusivity for energy of mixture [kg/m/s].
virtual tmp< volScalarField > alphaEff(const volScalarField &alphat) const
Effective thermal turbulent diffusivity of mixture [kg/m/s].
virtual tmp< volScalarField > mu() const
Return the laminar dynamic viscosity.
virtual tmp< volScalarField > nu() const
Return the laminar kinematic viscosity.
virtual bool compressible() const
Return whether the phase is compressible.
virtual ~ThermoPhaseModel()
Destructor.
virtual tmp< volScalarField > kappa() const
Thermal diffusivity for temperature of mixture [J/m/s/K].
virtual rhoThermo & thermoRef()
Access the thermophysical model.
virtual tmp< volScalarField > rho() const
Return the density field.
autoPtr< ThermoType > thermo_
Thermophysical model.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:76
Basic thermodynamic properties based on density.
Definition: rhoThermo.H:58
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
kappaEff
Definition: TEqn.H:10
Namespace for OpenFOAM.