barotropicCompressibilityModel.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 InClass
25  barotropicCompressibilityModel
26 
27 \*---------------------------------------------------------------------------*/
28 
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35  defineTypeNameAndDebug(barotropicCompressibilityModel, 0);
36  defineRunTimeSelectionTable(barotropicCompressibilityModel, dictionary);
37 }
38 
39 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40 
42 (
43  const dictionary& compressibilityProperties,
44  const volScalarField& gamma,
45  const word& psiName
46 )
47 :
48  compressibilityProperties_(compressibilityProperties),
49  psi_
50  (
51  IOobject
52  (
53  psiName,
54  gamma.mesh().time().timeName(),
55  gamma.mesh()
56  ),
57  gamma.mesh(),
58  dimensionedScalar(psiName, dimensionSet(0, -2, 2, 0, 0), 0)
59  ),
60  gamma_(gamma)
61 {}
62 
63 
64 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
65 
67 (
68  const dictionary& compressibilityProperties
69 )
70 {
71  compressibilityProperties_ = compressibilityProperties;
72 
73  return true;
74 }
75 
76 
77 // ************************************************************************* //
virtual bool read(const dictionary &compressibilityProperties)=0
Read compressibilityProperties dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
barotropicCompressibilityModel(const dictionary &compressibilityProperties, const volScalarField &gamma, const word &psiName="psi")
Construct from components.
Dimension set for the base types.
Definition: dimensionSet.H:120
A class for handling words, derived from string.
Definition: word.H:59
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
const Mesh & mesh() const
Return mesh.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Namespace for OpenFOAM.