PhaseIncompressibleTurbulenceModel.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) 2013-2017 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd
10 -------------------------------------------------------------------------------
11 License
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 
30 
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32 
33 template<class TransportModel>
36 (
37  const word& type,
38  const geometricOneField& alpha,
39  const volScalarField& rho,
40  const volVectorField& U,
41  const surfaceScalarField& alphaRhoPhi,
42  const surfaceScalarField& phi,
43  const TransportModel& transportModel,
44  const word& propertiesName
45 )
46 :
48  <
52  TransportModel
53  >
54  (
55  alpha,
56  rho,
57  U,
58  alphaRhoPhi,
59  phi,
61  propertiesName
62  )
63 {}
64 
65 
66 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
67 
68 template<class TransportModel>
71 (
72  const volScalarField& rho,
73  const volVectorField& U,
74  const surfaceScalarField& alphaRhoPhi,
75  const surfaceScalarField& phi,
76  const TransportModel& transportModel,
77  const word& propertiesName
78 )
79 {
81  (
84  <
88  TransportModel
89  >::New
90  (
92  rho,
93  U,
94  alphaRhoPhi,
95  phi,
97  propertiesName
98  ).ptr())
99  );
100 }
101 
102 
103 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
104 
105 template<class TransportModel>
108 {
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_,
121  );
122 }
123 
124 
125 template<class TransportModel>
128 {
130  (
131  IOobject
132  (
133  IOobject::groupName("pPrimef", this->alphaRhoPhi_.group()),
134  this->runTime_.timeName(),
135  this->mesh_,
136  IOobject::NO_READ,
137  IOobject::NO_WRITE
138  ),
139  this->mesh_,
141  );
142 }
143 
144 
145 template<class TransportModel>
148 {
149  return devRhoReff();
150 }
151 
152 
153 template<class TransportModel>
156 (
157  const volVectorField& U
158 ) const
159 {
160  return devRhoReff(U);
161 }
162 
163 
164 template<class TransportModel>
167 (
169 ) const
170 {
171  return divDevRhoReff(U);
172 }
173 
174 
175 template<class TransportModel>
178 {
180 
181  return devReff();
182 }
183 
184 
185 template<class TransportModel>
188 (
189  const volVectorField& U
190 ) const
191 {
193 
194  return nullptr;
195 }
196 
197 
198 template<class TransportModel>
201 (
203 ) const
204 {
206 
207  return divDevReff(U);
208 }
209 
210 
211 // ************************************************************************* //
Foam::PhaseIncompressibleTurbulenceModel::devRhoReff
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
Definition: PhaseIncompressibleTurbulenceModel.C:177
Foam::dimPressure
const dimensionSet dimPressure
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::PhaseIncompressibleTurbulenceModel::New
static autoPtr< PhaseIncompressibleTurbulenceModel > New(const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const TransportModel &transportModel, const word &propertiesName=turbulenceModel::propertiesName)
Return a reference to the selected turbulence model.
Definition: PhaseIncompressibleTurbulenceModel.C:71
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::PhaseIncompressibleTurbulenceModel::PhaseIncompressibleTurbulenceModel
PhaseIncompressibleTurbulenceModel(const word &type, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const TransportModel &transportModel, const word &propertiesName)
Construct.
Definition: PhaseIncompressibleTurbulenceModel.C:36
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::PhaseIncompressibleTurbulenceModel::divDevReff
virtual tmp< fvVectorMatrix > divDevReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: PhaseIncompressibleTurbulenceModel.C:167
Foam::geometricOneField
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Definition: geometricOneField.H:55
PhaseIncompressibleTurbulenceModel.H
Foam::PhaseIncompressibleTurbulenceModel::pPrime
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
Definition: PhaseIncompressibleTurbulenceModel.C:107
rho
rho
Definition: readInitialConditions.H:88
Foam::PhaseIncompressibleTurbulenceModel::devReff
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor.
Definition: PhaseIncompressibleTurbulenceModel.C:147
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Foam::TurbulenceModel
Templated abstract base class for turbulence models.
Definition: TurbulenceModel.H:59
Foam::PhaseIncompressibleTurbulenceModel::pPrimef
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
Definition: PhaseIncompressibleTurbulenceModel.C:127
Foam::PhaseIncompressibleTurbulenceModel
Templated abstract base class for multiphase incompressible turbulence models.
Definition: PhaseIncompressibleTurbulenceModel.H:54
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
U
U
Definition: pEqn.H:72
Foam::roots::type
type
Types of root.
Definition: Roots.H:54
Foam::PhaseIncompressibleTurbulenceModel::divDevRhoReff
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: PhaseIncompressibleTurbulenceModel.C:201
Foam::incompressibleRhoTurbulenceModel
Abstract base class for turbulence models (RAS, LES and laminar).
Definition: incompressibleRhoTurbulenceModel.H:54
Foam::PhaseIncompressibleTurbulenceModel::transportModel
TransportModel transportModel
Definition: PhaseIncompressibleTurbulenceModel.H:69
Foam::GeometricField< scalar, fvPatchField, volMesh >