psiThermo.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) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2017 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::psiThermo
29
30Group
31 grpPsiThermo
32
33Description
34 Basic thermodynamic properties based on compressibility
35
36SourceFiles
37 psiThermo.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef psiThermo_H
42#define psiThermo_H
43
44#include "fluidThermo.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class psiThermo Declaration
54\*---------------------------------------------------------------------------*/
56class psiThermo
57:
58 public fluidThermo
59{
60
61protected:
62
63 // Protected data
64
65 //- Compressibility [s^2/m^2]
67
68 //- Dynamic viscosity [kg/m/s]
70
71
72 // Protected Member Functions
73
74 //- Construct as copy (not implemented)
75 psiThermo(const psiThermo&);
76
77
78public:
79
80 //- Runtime type information
81 TypeName("psiThermo");
82
83
84 //- Declare run-time constructor selection table
86 (
87 autoPtr,
89 fvMesh,
90 (const fvMesh& mesh, const word& phaseName),
91 (mesh, phaseName)
92 );
93
94
95 //- Declare run-time constructor selection table for dictionary based
97 (
98 autoPtr,
100 fvMeshDictPhase,
101 (const fvMesh& mesh, const word& phaseName, const word& dictName),
102 (mesh, phaseName, dictName)
103 );
104
105
106 // Constructors
107
108 //- Construct from mesh and phase name
110 (
111 const fvMesh&,
112 const word& phaseName
113 );
114
115
116 //- Construct from mesh,dictionary,phase name with a single temperature
118 (
119 const fvMesh&,
120 const word& phaseName,
121 const word& dictionaryName
122 );
123
124
125 //- Selector
127 (
128 const fvMesh& mesh,
129 const word& phaseName=word::null
130 );
131
132 //- Selector
134 (
135 const fvMesh&,
136 const word& dictName,
137 const word& phaseName
138 );
139
140
141 //- Destructor
142 virtual ~psiThermo();
143
144
145 // Member functions
146
147 // Fields derived from thermodynamic state variables
148
149 //- Add the given density correction to the density field.
150 // Used to update the density field following pressure solution.
151 // For psiThermo does nothing.
152 virtual void correctRho
153 (
154 const volScalarField& deltaRho,
157 );
158
159 //- Add the given density correction to the density field.
160 // Used to update the density field following pressure solution
161 virtual void correctRho
162 (
163 const volScalarField& deltaRho
164 );
165
166 //- Density [kg/m^3] - uses current value of pressure
167 virtual tmp<volScalarField> rho() const;
168
169 //- Density for patch [kg/m^3]
170 virtual tmp<scalarField> rho(const label patchi) const;
171
172 //- Compressibility [s^2/m^2]
173 virtual const volScalarField& psi() const;
174
175
176 // Access to transport state variables
177
178 //- Dynamic viscosity of mixture [kg/m/s]
179 virtual tmp<volScalarField> mu() const;
180
181 //- Dynamic viscosity of mixture for patch [kg/m/s]
182 virtual tmp<scalarField> mu(const label patchi) const;
183};
184
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188} // End namespace Foam
189
190// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191
192#endif
193
194// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
static const word dictName
Definition: basicThermo.H:256
Fundamental fluid thermodynamic properties.
Definition: fluidThermo.H:56
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Basic thermodynamic properties based on compressibility.
Definition: psiThermo.H:58
psiThermo(const psiThermo &)
Construct as copy (not implemented)
declareRunTimeSelectionTable(autoPtr, psiThermo, fvMeshDictPhase,(const fvMesh &mesh, const word &phaseName, const word &dictName),(mesh, phaseName, dictName))
Declare run-time constructor selection table for dictionary based.
virtual tmp< volScalarField > mu() const
Dynamic viscosity of mixture [kg/m/s].
Definition: psiThermo.C:178
virtual ~psiThermo()
Destructor.
Definition: psiThermo.C:140
static autoPtr< psiThermo > New(const fvMesh &mesh, const word &phaseName=word::null)
Selector.
Definition: psiThermo.C:118
TypeName("psiThermo")
Runtime type information.
volScalarField mu_
Dynamic viscosity [kg/m/s].
Definition: psiThermo.H:68
declareRunTimeSelectionTable(autoPtr, psiThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
Declare run-time constructor selection table.
virtual tmp< volScalarField > rho() const
Density [kg/m^3] - uses current value of pressure.
Definition: psiThermo.C:146
volScalarField psi_
Compressibility [s^2/m^2].
Definition: psiThermo.H:65
virtual const volScalarField & psi() const
Compressibility [s^2/m^2].
Definition: psiThermo.C:172
virtual void correctRho(const volScalarField &deltaRho, const dimensionedScalar &rhoMin, const dimensionedScalar &rhoMax)
Add the given density correction to the density field.
Definition: psiThermo.C:159
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
const dimensionedScalar rhoMin
const dimensionedScalar rhoMax
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73