fluidThermo.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) 2012-2017 OpenFOAM Foundation
9  Copyright (C) 2017 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::fluidThermo
29 
30 Description
31  Fundamental fluid thermodynamic properties
32 
33 SourceFiles
34  fluidThermo.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef fluidThermo_H
39 #define fluidThermo_H
40 
41 #include "basicThermo.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class fluidThermo Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class fluidThermo
54 :
55  public basicThermo,
57 {
58 
59 public:
60 
61  //- Runtime type information
62  TypeName("fluidThermo");
63 
64 
65  //- Declare run-time constructor selection table
67  (
68  autoPtr,
70  fvMesh,
71  (const fvMesh& mesh, const word& phaseName),
72  (mesh, phaseName)
73  );
74 
75 
76  //- Declare run-time constructor selection table for dictionary based
78  (
79  autoPtr,
81  fvMeshDictPhase,
82  (const fvMesh& mesh, const word& phaseName, const word& dictName),
83  (mesh, phaseName, dictName)
84  );
85 
86  // Constructors
87 
88  //- Construct from mesh and phase name
90  (
91  const fvMesh&,
92  const word& phaseName
93  );
94 
95  //- Construct from mesh and phase name
97  (
98  const fvMesh&,
99  const dictionary&,
100  const word& phaseName
101  );
102 
103 
104  //- Construct from mesh,dictionary,phase name with a single temperature
106  (
107  const fvMesh&,
108  const word& phaseName,
109  const word& dictionaryName
110  );
111 
112 
113  //- Selector
115  (
116  const fvMesh&,
117  const word& phaseName=word::null
118  );
119 
120 
121  //- Selector
123  (
124  const fvMesh&,
125  const word& phaseName,
126  const word& dictName
127  );
128 
129 
130  //- Destructor
131  virtual ~fluidThermo();
132 
133 
134  // Member functions
135 
136  // Access to thermodynamic state variables
137 
138  //- Add the given density correction to the density field.
139  // Used to update the density field following pressure solution
140  // Limit thermo rho between rhoMin and rhoMax
141  virtual void correctRho
142  (
143  const volScalarField& deltaRho,
144  const dimensionedScalar& rhoMin,
146  ) = 0;
147 
148 
149  //- Add the given density correction to the density field.
150  // Used to update the density field following pressure solution
151  virtual void correctRho
152  (
153  const volScalarField& deltaRho
154  ) = 0;
155 
156  //- Compressibility [s^2/m^2]
157  virtual const volScalarField& psi() const = 0;
158 
159 
160  // Access to transport state variables
161 
162  //- Dynamic viscosity of mixture [kg/m/s]
163  virtual tmp<volScalarField> mu() const = 0;
164 
165  //- Dynamic viscosity of mixture for patch [kg/m/s]
166  virtual tmp<scalarField> mu(const label patchi) const = 0;
167 
168  //- Kinematic viscosity of mixture [m^2/s]
169  virtual tmp<volScalarField> nu() const;
170 
171  //- Kinematic viscosity of mixture for patch [m^2/s]
172  virtual tmp<scalarField> nu(const label patchi) const;
173 };
174 
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 } // End namespace Foam
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #endif
183 
184 // ************************************************************************* //
Foam::fluidThermo::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, fluidThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
Declare run-time constructor selection table.
basicThermo.H
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::fluidThermo::~fluidThermo
virtual ~fluidThermo()
Destructor.
Definition: fluidThermo.C:97
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::fluidThermo::New
static autoPtr< fluidThermo > New(const fvMesh &, const word &phaseName=word::null)
Selector.
Definition: fluidThermo.C:75
Foam::fluidThermo::correctRho
virtual void correctRho(const volScalarField &deltaRho, const dimensionedScalar &rhoMin, const dimensionedScalar &rhoMax)=0
Add the given density correction to the density field.
Foam::fluidThermo
Fundamental fluid thermodynamic properties.
Definition: fluidThermo.H:52
Foam::basicThermo
Abstract base-class for fluid and solid thermodynamic properties.
Definition: basicThermo.H:63
Foam::fluidThermo::fluidThermo
fluidThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
Definition: fluidThermo.C:43
Foam::fluidThermo::mu
virtual tmp< volScalarField > mu() const =0
Dynamic viscosity of mixture [kg/m/s].
rhoMin
const dimensionedScalar rhoMin
Definition: setRegionFluidFields.H:67
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::dimensioned< scalar >
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fluidThermo::nu
virtual tmp< volScalarField > nu() const
Kinematic viscosity of mixture [m^2/s].
Definition: fluidThermo.C:103
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::compressibleTransportModel
Base-class for all transport models used by the compressible turbulence models.
Definition: compressibleTransportModel.H:53
rhoMax
const dimensionedScalar rhoMax
Definition: setRegionFluidFields.H:66
compressibleTransportModel.H
Foam::word::null
static const word null
An empty word.
Definition: word.H:80
Foam::fluidThermo::psi
virtual const volScalarField & psi() const =0
Compressibility [s^2/m^2].
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::fluidThermo::TypeName
TypeName("fluidThermo")
Runtime type information.
Foam::dictionary::dictName
word dictName() const
The local dictionary name (final part of scoped name)
Definition: dictionaryI.H:60