PhaseCompressibleTurbulenceModel.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) 2013-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 
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 template<class TransportModel>
33 (
34  const word& type,
35  const volScalarField& alpha,
36  const volScalarField& rho,
37  const volVectorField& U,
38  const surfaceScalarField& alphaRhoPhi,
39  const surfaceScalarField& phi,
40  const transportModel& transport,
41  const word& propertiesName
42 )
43 :
45  <
48  compressibleTurbulenceModel,
50  >
51  (
52  alpha,
53  rho,
54  U,
55  alphaRhoPhi,
56  phi,
57  transport,
58  propertiesName
59  )
60 {}
61 
62 
63 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
64 
65 template<class TransportModel>
68 (
69  const volScalarField& alpha,
70  const volScalarField& rho,
71  const volVectorField& U,
72  const surfaceScalarField& alphaRhoPhi,
73  const surfaceScalarField& phi,
74  const transportModel& transport,
75  const word& propertiesName
76 )
77 {
79  (
82  <
85  compressibleTurbulenceModel,
87  >::New
88  (
89  alpha,
90  rho,
91  U,
92  alphaRhoPhi,
93  phi,
94  transport,
95  propertiesName
96  ).ptr())
97  );
98 }
99 
100 
101 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
102 
103 template<class TransportModel>
106 {
107  return tmp<volScalarField>
108  (
109  new volScalarField
110  (
111  IOobject
112  (
113  IOobject::groupName("pPrime", this->alphaRhoPhi_.group()),
114  this->runTime_.timeName(),
115  this->mesh_,
116  IOobject::NO_READ,
117  IOobject::NO_WRITE
118  ),
119  this->mesh_,
120  dimensionedScalar("pPrimef", dimPressure, 0.0)
121  )
122  );
123 }
124 
125 
126 template<class TransportModel>
129 {
131  (
133  (
134  IOobject
135  (
136  IOobject::groupName("pPrimef", this->alphaRhoPhi_.group()),
137  this->runTime_.timeName(),
138  this->mesh_,
139  IOobject::NO_READ,
140  IOobject::NO_WRITE
141  ),
142  this->mesh_,
143  dimensionedScalar("pPrimef", dimPressure, 0.0)
144  )
145  );
146 }
147 
148 
149 // ************************************************************************* //
surfaceScalarField & phi
TransportModel transportModel
Templated abstract base class for turbulence models.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
A class for handling words, derived from string.
Definition: word.H:59
const dimensionSet dimPressure
PhaseCompressibleTurbulenceModel(const word &type, const alphaField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &trasport, const word &propertiesName)
Construct.
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure&#39;.
Templated abstract base class for multiphase compressible turbulence models.
static autoPtr< PhaseCompressibleTurbulenceModel > New(const alphaField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &trasportModel, const word &propertiesName=turbulenceModel::propertiesName)
Return a reference to the selected turbulence model.
U
Definition: pEqn.H:72
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure&#39;.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92