IncompressibleTurbulenceModel.H
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 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::IncompressibleTurbulenceModel
29
30Description
31 Templated abstract base class for single-phase incompressible
32 turbulence models.
33
34SourceFiles
35 IncompressibleTurbulenceModel.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef IncompressibleTurbulenceModel_H
40#define IncompressibleTurbulenceModel_H
41
42#include "TurbulenceModel.H"
44#include "fvMatrix.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51/*---------------------------------------------------------------------------*\
52 Class IncompressibleTurbulenceModel Declaration
53\*---------------------------------------------------------------------------*/
54
55template<class TransportModel>
57:
58 public TurbulenceModel
59 <
60 geometricOneField,
61 geometricOneField,
62 incompressibleTurbulenceModel,
63 TransportModel
64 >
65{
66
67public:
71 typedef TransportModel transportModel;
72
73
74 // Constructors
75
76 //- Construct
78 (
79 const word& type,
82 const volVectorField& U,
85 const TransportModel& transport,
86 const word& propertiesName
87 );
88
89
90 // Selectors
91
92 //- Return a reference to the selected turbulence model
94 (
95 const volVectorField& U,
97 const TransportModel& transportModel,
99 );
100
101
102 //- Destructor
103 virtual ~IncompressibleTurbulenceModel() = default;
104
105
106 // Member Functions
107
108 //- Return the effective stress tensor
109 virtual tmp<volSymmTensorField> devReff() const;
110
111 //- Return the effective stress tensor based on a given velocity field
113 (
114 const volVectorField& U
115 ) const;
116
117 //- Return the source term for the momentum equation
119
120 //- Return the effective stress tensor
121 virtual tmp<volSymmTensorField> devRhoReff() const;
122
123 //- Return the effective stress tensor based on a given velocity field
125 (
126 const volVectorField& U
127 ) const;
128
129 //- Return the source term for the momentum equation
131
132 //- Return the source term for the momentum equation
134 (
135 const volScalarField& rho,
137 ) const;
138};
139
140
141// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142
143} // End namespace Foam
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147#ifdef NoRepository
149#endif
150
151// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152
153#endif
154
155// ************************************************************************* //
Templated abstract base class for single-phase incompressible turbulence models.
virtual tmp< fvVectorMatrix > divDevReff(volVectorField &U) const
Return the source term for the momentum equation.
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor.
virtual ~IncompressibleTurbulenceModel()=default
Destructor.
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
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.
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
Templated abstract base class for turbulence models.
const transportModel & transport() const
Access function to incompressible transport model.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
A class for managing temporary objects.
Definition: tmp.H:65
const volVectorField & U() const
Access function to velocity field.
static const word propertiesName
Default name of the turbulence properties dictionary.
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598