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-2022 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 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
34 }
35 
36 
37 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
38 
40 (
41  const fvMesh& mesh,
42  const word& phaseName
43 )
44 {}
45 
46 
47 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
48 
50 (
51  const fvMesh& mesh,
52  const word& phaseName
53 )
54 {
55  return basicThermo::New<psiThermo>(mesh, phaseName);
56 }
57 
58 
59 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
60 
62 {}
63 
64 
66 {}
67 
68 
69 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
70 
72 {}
73 
74 
76 {
77  return p()*psi();
78 }
79 
80 
82 (
83  const label patchi
84 ) const
85 {
86  return p().boundaryField()[patchi]*psi().boundaryField()[patchi];
87 }
88 
89 
91 {
92  return rho();
93 }
94 
95 
96 // ************************************************************************* //
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
virtual const fvMesh & mesh() const =0
Return const access to the mesh.
virtual const word & phaseName() const =0
Phase name.
virtual volScalarField & p()=0
Pressure [Pa].
virtual const volScalarField & psi() const =0
Compressibility [s^2/m^2].
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
virtual tmp< volScalarField > renameRho()
Return the thermodynamic density field [kg/m^3].
Definition: psiThermo.C:90
implementation(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
Definition: psiThermo.C:40
virtual ~implementation()
Destructor.
Definition: psiThermo.C:65
virtual tmp< volScalarField > rho() const
Density [kg/m^3] - uses current value of pressure.
Definition: psiThermo.C:75
Base-class for fluid thermodynamic properties based on compressibility.
Definition: psiThermo.H:54
virtual void correctRho(const volScalarField &deltaRho)
Add the given density correction to the density field.
Definition: psiThermo.C:71
virtual ~psiThermo()
Destructor.
Definition: psiThermo.C:61
static autoPtr< psiThermo > New(const fvMesh &mesh, const word &phaseName=word::null)
Standard selection based on fvMesh.
Definition: psiThermo.C:50
virtual tmp< volScalarField > rho() const =0
Density [kg/m^3] - uses current value of pressure.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
label patchi
Namespace for OpenFOAM.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
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
defineTypeNameAndDebug(combustionModel, 0)