IncompressibleTurbulenceModel.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-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
29 
30 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31 
32 template<class TransportModel>
35 (
36  const word& type,
37  const geometricOneField& alpha,
38  const geometricOneField& rho,
39  const volVectorField& U,
40  const surfaceScalarField& alphaRhoPhi,
41  const surfaceScalarField& phi,
42  const TransportModel& transport,
43  const word& propertiesName
44 )
45 :
47  <
51  TransportModel
52  >
53  (
54  alpha,
55  rho,
56  U,
57  alphaRhoPhi,
58  phi,
59  transport,
60  propertiesName
61  )
62 {}
63 
64 
65 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
66 
67 template<class TransportModel>
70 (
71  const volVectorField& U,
72  const surfaceScalarField& phi,
73  const TransportModel& transport,
74  const word& propertiesName
75 )
76 {
78  (
79  static_cast<IncompressibleTurbulenceModel*>(
81  <
85  TransportModel
86  >::New
87  (
90  U,
91  phi,
92  phi,
93  transport,
94  propertiesName
95  ).ptr())
96  );
97 }
98 
99 
100 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
101 
102 template<class TransportModel>
105 {
106  return devRhoReff();
107 }
108 
109 
110 template<class TransportModel>
113 (
114  const volVectorField& U
115 ) const
116 {
117  return devRhoReff(U);
118 }
119 
120 
121 template<class TransportModel>
124 (
126 ) const
127 {
128  return divDevRhoReff(U);
129 }
130 
131 
132 template<class TransportModel>
135 {
137 
138  return devReff();
139 }
140 
141 
142 template<class TransportModel>
145 (
146  const volVectorField& U
147 ) const
148 {
150 
151  return nullptr;
152 }
153 
154 
155 template<class TransportModel>
158 (
160 ) const
161 {
163 
164  return divDevReff(U);
165 }
166 
167 
168 template<class TransportModel>
171 (
172  const volScalarField& rho,
174 ) const
175 {
177 
178  return divDevReff(U);
179 }
180 
181 
182 // ************************************************************************* //
Foam::IncompressibleTurbulenceModel::New
static autoPtr< IncompressibleTurbulenceModel > New(const volVectorField &U, const surfaceScalarField &phi, const TransportModel &transportModel, const word &propertiesName=turbulenceModel::propertiesName)
Return a reference to the selected turbulence model.
Definition: IncompressibleTurbulenceModel.C:70
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::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::geometricOneField
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Definition: geometricOneField.H:55
rho
rho
Definition: readInitialConditions.H:88
IncompressibleTurbulenceModel.H
Foam::IncompressibleTurbulenceModel::devReff
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor.
Definition: IncompressibleTurbulenceModel.C:104
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::IncompressibleTurbulenceModel::IncompressibleTurbulenceModel
IncompressibleTurbulenceModel(const word &type, const geometricOneField &alpha, const geometricOneField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const TransportModel &transport, const word &propertiesName)
Construct.
Definition: IncompressibleTurbulenceModel.C:35
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::IncompressibleTurbulenceModel::divDevReff
virtual tmp< fvVectorMatrix > divDevReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: IncompressibleTurbulenceModel.C:124
Foam::IncompressibleTurbulenceModel::divDevRhoReff
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: IncompressibleTurbulenceModel.C:158
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::IncompressibleTurbulenceModel::devRhoReff
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
Definition: IncompressibleTurbulenceModel.C:134
Foam::IncompressibleTurbulenceModel
Templated abstract base class for single-phase incompressible turbulence models.
Definition: IncompressibleTurbulenceModel.H:55
Foam::GeometricField< vector, fvPatchField, volMesh >
Foam::incompressibleTurbulenceModel
Abstract base class for turbulence models (RAS, LES and laminar).
Definition: incompressibleTurbulenceModel.H:55