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 | Copyright (C) 2013-2015 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 geometricOneField& alpha,
36  const geometricOneField& rho,
37  const volVectorField& U,
38  const surfaceScalarField& alphaRhoPhi,
39  const surfaceScalarField& phi,
40  const TransportModel& transport,
41  const word& propertiesName
42 )
43 :
45  <
49  TransportModel
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 volVectorField& U,
70  const surfaceScalarField& phi,
71  const TransportModel& transport,
72  const word& propertiesName
73 )
74 {
76  (
77  static_cast<IncompressibleTurbulenceModel*>(
79  <
83  TransportModel
84  >::New
85  (
88  U,
89  phi,
90  phi,
91  transport,
92  propertiesName
93  ).ptr())
94  );
95 }
96 
97 
98 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
99 
100 template<class TransportModel>
103 {
104  return devRhoReff();
105 }
106 
107 
108 template<class TransportModel>
111 (
113 ) const
114 {
115  return divDevRhoReff(U);
116 }
117 
118 
119 template<class TransportModel>
122 devRhoReff() const
123 {
125 
126  return devReff();
127 }
128 
129 
130 template<class TransportModel>
134 (
136 ) const
137 {
139 
140  return divDevReff(U);
141 }
142 
143 
144 template<class TransportModel>
148 (
149  const volScalarField& rho,
151 ) const
152 {
154 
155  return divDevReff(U);
156 }
157 
158 
159 // ************************************************************************* //
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:68
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:216
Foam::geometricOneField
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Definition: geometricOneField.H:52
U
U
Definition: pEqn.H:46
IncompressibleTurbulenceModel.H
Foam::IncompressibleTurbulenceModel::devReff
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor.
Definition: IncompressibleTurbulenceModel.C:102
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:365
Foam::TurbulenceModel
Templated abstract base class for turbulence models.
Definition: TurbulenceModel.H:57
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:33
Foam::IncompressibleTurbulenceModel::divDevReff
virtual tmp< fvVectorMatrix > divDevReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: IncompressibleTurbulenceModel.C:111
rho
rho
Definition: pEqn.H:3
Foam::IncompressibleTurbulenceModel::divDevRhoReff
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: IncompressibleTurbulenceModel.C:134
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::IncompressibleTurbulenceModel::devRhoReff
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
Definition: IncompressibleTurbulenceModel.C:122
Foam::IncompressibleTurbulenceModel
Templated abstract base class for single-phase incompressible turbulence models.
Definition: IncompressibleTurbulenceModel.H:52
Foam::type
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:588
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::incompressibleTurbulenceModel
Abstract base class for turbulence models (RAS, LES and laminar).
Definition: incompressibleTurbulenceModel.H:52