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 | Copyright (C) 2011-2015 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  //- Density [kg/m^3] - uses current value of pressure
116  virtual tmp<volScalarField> rho() const;
117 
118  //- Density for patch [kg/m^3]
119  virtual tmp<scalarField> rho(const label patchi) const;
120 
121  //- Compressibility [s^2/m^2]
122  virtual const volScalarField& psi() const;
123 
124 
125  // Access to transport state variables
126 
127  //- Dynamic viscosity of mixture [kg/m/s]
128  virtual tmp<volScalarField> mu() const;
129 
130  //- Dynamic viscosity of mixture for patch [kg/m/s]
131  virtual tmp<scalarField> mu(const label patchi) const;
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
virtual tmp< volScalarField > rho() const
Density [kg/m^3] - uses current value of pressure.
Definition: psiThermo.C:93
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 tmp< volScalarField > mu() const
Dynamic viscosity of mixture [kg/m/s].
Definition: psiThermo.C:111
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:49
declareRunTimeSelectionTable(autoPtr, psiThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
Declare run-time constructor selection table.
static const word null
An empty word.
Definition: word.H:77
virtual const volScalarField & psi() const
Compressibility [s^2/m^2].
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)
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:53
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:54
Basic thermodynamic properties based on compressibility.
Definition: psiThermo.H:49
Namespace for OpenFOAM.