psiThermo.C
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-2018 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 \*---------------------------------------------------------------------------*/
25 
26 #include "psiThermo.H"
27 
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
32  defineTypeNameAndDebug(psiThermo, 0);
33  defineRunTimeSelectionTable(psiThermo, fvMesh);
34 }
35 
36 
37 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
38 
39 Foam::psiThermo::psiThermo(const fvMesh& mesh, const word& phaseName)
40 :
41  fluidThermo(mesh, phaseName),
42 
43  psi_
44  (
45  IOobject
46  (
47  phasePropertyName("thermo:psi"),
48  mesh.time().timeName(),
49  mesh,
50  IOobject::NO_READ,
51  IOobject::NO_WRITE
52  ),
53  mesh,
54  dimensionSet(0, -2, 2, 0, 0)
55  ),
56 
57  mu_
58  (
59  IOobject
60  (
61  phasePropertyName("thermo:mu"),
62  mesh.time().timeName(),
63  mesh,
64  IOobject::NO_READ,
65  IOobject::NO_WRITE
66  ),
67  mesh,
68  dimensionSet(1, -1, -1, 0, 0)
69  )
70 {}
71 
72 
73 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
74 
76 (
77  const fvMesh& mesh,
78  const word& phaseName
79 )
80 {
81  return basicThermo::New<psiThermo>(mesh, phaseName);
82 }
83 
84 
85 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
86 
88 {}
89 
90 
91 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
92 
94 {
95  return p_*psi_;
96 }
97 
98 
100 {
102 }
103 
104 
106 {}
107 
108 
110 {
111  return psi_;
112 }
113 
114 
116 {
117  return mu_;
118 }
119 
120 
122 {
123  return mu_.boundaryField()[patchi];
124 }
125 
126 
127 // ************************************************************************* //
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
const Boundary & boundaryField() const
Return const-reference to the boundary field.
virtual ~psiThermo()
Destructor.
Definition: psiThermo.C:87
Dimension set for the base types.
Definition: dimensionSet.H:120
dynamicFvMesh & mesh
volScalarField & p_
Pressure [Pa].
Definition: basicThermo.H:68
A class for handling words, derived from string.
Definition: word.H:59
Fundamental fluid thermodynamic properties.
Definition: fluidThermo.H:49
virtual tmp< volScalarField > mu() const
Dynamic viscosity of mixture [kg/m/s].
Definition: psiThermo.C:115
word timeName
Definition: getTimeIndex.H:3
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
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
static autoPtr< psiThermo > New(const fvMesh &mesh, const word &phaseName=word::null)
Selector.
Definition: psiThermo.C:76
defineTypeNameAndDebug(combustionModel, 0)
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
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
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Namespace for OpenFOAM.