All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
psiThermo.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::psiThermo
26 
27 Description
28  Basic thermodynamic properties based on compressibility
29 
30 SourceFiles
31  psiThermo.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef psiThermo_H
36 #define psiThermo_H
37 
38 #include "fluidThermo.H"
39 #include "runTimeSelectionTables.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class psiThermo Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class psiThermo
51 :
52  public fluidThermo
53 {
54 
55 protected:
56 
57  // Protected data
58 
59  //- Compressibility [s^2/m^2]
61 
62  //- Dynamic viscosity [kg/m/s]
64 
65 
66  // Protected Member Functions
67 
68  //- Construct as copy (not implemented)
69  psiThermo(const psiThermo&);
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("psiThermo");
76 
77 
78  //- Declare run-time constructor selection table
80  (
81  autoPtr,
82  psiThermo,
83  fvMesh,
84  (const fvMesh& mesh, const word& phaseName),
85  (mesh, phaseName)
86  );
87 
88 
89  // Constructors
90 
91  //- Construct from mesh and phase name
92  psiThermo
93  (
94  const fvMesh&,
95  const word& phaseName
96  );
97 
98 
99  //- Selector
100  static autoPtr<psiThermo> New
101  (
102  const fvMesh& mesh,
103  const word& phaseName=word::null
104  );
105 
106 
107  //- Destructor
108  virtual ~psiThermo();
109 
110 
111  // Member Functions
112 
113  // Fields derived from thermodynamic state variables
114 
115  //- Add the given density correction to the density field.
116  // Used to update the density field following pressure solution.
117  // For psiThermo does nothing.
118  virtual void correctRho(const volScalarField& deltaRho);
119 
120  //- Density [kg/m^3] - uses current value of pressure
121  virtual tmp<volScalarField> rho() const;
122 
123  //- Density for patch [kg/m^3]
124  virtual tmp<scalarField> rho(const label patchi) const;
125 
126  //- Compressibility [s^2/m^2]
127  virtual const volScalarField& psi() const;
128 
129 
130  // Access to transport state variables
131 
132  //- Dynamic viscosity of mixture [kg/m/s]
133  virtual tmp<volScalarField> mu() const;
134 
135  //- Dynamic viscosity of mixture for patch [kg/m/s]
136  virtual tmp<scalarField> mu(const label patchi) const;
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
TypeName("psiThermo")
Runtime type information.
virtual ~psiThermo()
Destructor.
Definition: psiThermo.C:87
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
Fundamental fluid thermodynamic properties.
Definition: fluidThermo.H:48
declareRunTimeSelectionTable(autoPtr, psiThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
Declare run-time constructor selection table.
virtual tmp< volScalarField > mu() const
Dynamic viscosity of mixture [kg/m/s].
Definition: psiThermo.C:115
static const word null
An empty word.
Definition: word.H:77
virtual tmp< volScalarField > rho() const
Density [kg/m^3] - uses current value of pressure.
Definition: psiThermo.C:93
virtual void correctRho(const volScalarField &deltaRho)
Add the given density correction to the density field.
Definition: psiThermo.C:105
static autoPtr< psiThermo > New(const fvMesh &mesh, const word &phaseName=word::null)
Selector.
Definition: psiThermo.C:76
psiThermo(const psiThermo &)
Construct as copy (not implemented)
virtual const volScalarField & psi() const
Compressibility [s^2/m^2].
Definition: psiThermo.C:109
label patchi
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
volScalarField mu_
Dynamic viscosity [kg/m/s].
Definition: psiThermo.H:62
volScalarField psi_
Compressibility [s^2/m^2].
Definition: psiThermo.H:59
A class for managing temporary objects.
Definition: PtrList.H:53
Basic thermodynamic properties based on compressibility.
Definition: psiThermo.H:49
Namespace for OpenFOAM.