psiThermo.C
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
27\*---------------------------------------------------------------------------*/
28
29#include "psiThermo.H"
30
31// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32
33namespace Foam
34{
38}
39
40
41// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42
43Foam::psiThermo::psiThermo(const fvMesh& mesh, const word& phaseName)
44:
45 fluidThermo(mesh, phaseName),
46
47 psi_
48 (
50 (
51 phasePropertyName("thermo:psi"),
52 mesh.time().timeName(),
53 mesh,
54 IOobject::NO_READ,
55 IOobject::NO_WRITE
56 ),
57 mesh,
58 dimensionSet(0, -2, 2, 0, 0)
59 ),
60
61 mu_
62 (
64 (
65 phasePropertyName("thermo:mu"),
66 mesh.time().timeName(),
67 mesh,
68 IOobject::NO_READ,
69 IOobject::NO_WRITE
70 ),
71 mesh,
72 dimensionSet(1, -1, -1, 0, 0)
73 )
74{}
75
76
78(
79 const fvMesh& mesh,
80 const word& phaseName,
81 const word& dictionaryName
82)
83:
84 fluidThermo(mesh, phaseName, dictionaryName),
85
86 psi_
87 (
89 (
90 phasePropertyName("thermo:psi"),
91 mesh.time().timeName(),
92 mesh,
93 IOobject::NO_READ,
94 IOobject::NO_WRITE
95 ),
96 mesh,
97 dimensionSet(0, -2, 2, 0, 0)
98 ),
99
100 mu_
101 (
103 (
104 phasePropertyName("thermo:mu"),
105 mesh.time().timeName(),
106 mesh,
107 IOobject::NO_READ,
108 IOobject::NO_WRITE
109 ),
110 mesh,
111 dimensionSet(1, -1, -1, 0, 0)
112 )
113{}
114
115// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
116
118(
119 const fvMesh& mesh,
120 const word& phaseName
121)
122{
123 return basicThermo::New<psiThermo>(mesh, phaseName);
124}
125
126
128(
129 const fvMesh& mesh,
130 const word& phaseName,
131 const word& dictionaryName
132)
133{
134 return basicThermo::New<psiThermo>(mesh, phaseName, dictionaryName);
135}
136
137
138// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
139
141{}
142
143
144// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
145
147{
148 return p_*psi_;
149}
150
151
153{
154 return p_.boundaryField()[patchi]*psi_.boundaryField()[patchi];
155}
156
157
159(
160 const Foam::volScalarField& deltaRho,
163)
164{}
165
167(
168 const Foam::volScalarField& deltaRho
169)
170{}
171
173{
174 return psi_;
175}
176
177
179{
180 return mu_;
181}
182
183
185{
186 return mu_.boundaryField()[patchi];
187}
188
189
190// ************************************************************************* //
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Definition: dimensionSet.H:109
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
virtual tmp< volScalarField > mu() const
Dynamic viscosity of mixture [kg/m/s].
Definition: psiThermo.C:178
virtual ~psiThermo()
Destructor.
Definition: psiThermo.C:140
virtual tmp< volScalarField > rho() const
Density [kg/m^3] - uses current value of pressure.
Definition: psiThermo.C:146
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
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
dynamicFvMesh & mesh
const dimensionedScalar rhoMin
const dimensionedScalar rhoMax
word timeName
Definition: getTimeIndex.H:3
Namespace for OpenFOAM.
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.