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 -------------------------------------------------------------------------------
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 Class
28  Foam::IncompressibleTurbulenceModel
29 
30 Description
31  Templated abstract base class for single-phase incompressible
32  turbulence models.
33 
34 SourceFiles
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 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class IncompressibleTurbulenceModel Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class TransportModel>
57 :
58  public TurbulenceModel
59  <
60  geometricOneField,
61  geometricOneField,
62  incompressibleTurbulenceModel,
63  TransportModel
64  >
65 {
66 
67 public:
68 
71  typedef TransportModel transportModel;
72 
73 
74  // Constructors
75 
76  //- Construct
78  (
79  const word& type,
80  const geometricOneField& alpha,
81  const geometricOneField& rho,
82  const volVectorField& U,
84  const surfaceScalarField& phi,
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,
96  const surfaceScalarField& phi,
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 // ************************************************************************* //
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::turbulenceModel::phi
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
Definition: turbulenceModel.C:77
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::IncompressibleTurbulenceModel::transportModel
TransportModel transportModel
Definition: IncompressibleTurbulenceModel.H:70
Foam::IncompressibleTurbulenceModel::~IncompressibleTurbulenceModel
virtual ~IncompressibleTurbulenceModel()=default
Destructor.
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:100
Foam::geometricOneField
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Definition: geometricOneField.H:55
fvMatrix.H
Foam::TurbulenceModel< geometricOneField, geometricOneField, incompressibleTurbulenceModel, TransportModel >::alpha
const alphaField & alpha() const
Access function to phase fraction.
Definition: TurbulenceModel.H:147
IncompressibleTurbulenceModel.C
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
Foam::turbulenceModel::alphaRhoPhi
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
Definition: turbulenceModel.H:150
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
Foam::IncompressibleTurbulenceModel::divDevReff
virtual tmp< fvVectorMatrix > divDevReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: IncompressibleTurbulenceModel.C:124
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::TurbulenceModel< geometricOneField, geometricOneField, incompressibleTurbulenceModel, TransportModel >::transport
const transportModel & transport() const
Access function to incompressible transport model.
Definition: TurbulenceModel.H:153
Foam::IncompressibleTurbulenceModel::divDevRhoReff
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: IncompressibleTurbulenceModel.C:158
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
TurbulenceModel.H
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::rhoField
geometricOneField rhoField
Definition: IncompressibleTurbulenceModel.H:69
Foam::turbulenceModel::U
const volVectorField & U() const
Access function to velocity field.
Definition: turbulenceModel.H:144
Foam::IncompressibleTurbulenceModel::alphaField
geometricOneField alphaField
Definition: IncompressibleTurbulenceModel.H:68