IncompressibleMomentumTransportModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2013-2020 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 Class
25  Foam::IncompressibleMomentumTransportModel
26 
27 Description
28  Templated abstract base class for single-phase incompressible
29  turbulence models.
30 
31 SourceFiles
32  IncompressibleMomentumTransportModel.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef IncompressibleMomentumTransportModel_H
37 #define IncompressibleMomentumTransportModel_H
38 
39 #include "MomentumTransportModel.H"
41 #include "fvMatrix.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class IncompressibleMomentumTransportModel Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class TransportModel>
54 :
56  <
57  geometricOneField,
58  geometricOneField,
59  incompressibleMomentumTransportModel,
60  TransportModel
61  >
62 {
63 
64 public:
65 
68  typedef TransportModel transportModel;
69 
70 
71  // Constructors
72 
73  //- Construct
75  (
76  const word& type,
77  const geometricOneField& alpha,
78  const geometricOneField& rho,
79  const volVectorField& U,
81  const surfaceScalarField& phi,
82  const TransportModel& transport
83  );
84 
85 
86  // Selectors
87 
88  //- Return a reference to the selected turbulence model
90  (
91  const volVectorField& U,
92  const surfaceScalarField& phi,
93  const TransportModel& transportModel
94  );
95 
96 
97  //- Destructor
99  {}
100 
101 
102  // Member Functions
103 
104  //- Return the laminar viscosity
105  virtual tmp<volScalarField> nu() const
106  {
107  return this->transport_.nu();
108  }
109 
110  //- Return the laminar viscosity on patchi
111  virtual tmp<scalarField> nu(const label patchi) const
112  {
113  return this->transport_.nu(patchi);
114  }
115 
116  //- Return the effective stress tensor
117  virtual tmp<volSymmTensorField> devSigma() const;
118 
119  //- Return the source term for the momentum equation
121 
122  //- Return the effective stress tensor
123  virtual tmp<volSymmTensorField> devTau() const;
124 
125  //- Return the source term for the momentum equation
126  virtual tmp<fvVectorMatrix> divDevTau(volVectorField& U) const;
127 
128  //- Return the source term for the momentum equation
130  (
131  const volScalarField& rho,
132  volVectorField& U
133  ) const;
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #ifdef NoRepository
145 #endif
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 #endif
150 
151 // ************************************************************************* //
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
static autoPtr< IncompressibleMomentumTransportModel > New(const volVectorField &U, const surfaceScalarField &phi, const TransportModel &transportModel)
Return a reference to the selected turbulence model.
virtual tmp< fvVectorMatrix > divDevSigma(volVectorField &U) const
Return the source term for the momentum equation.
virtual tmp< volSymmTensorField > devTau() const
Return the effective stress tensor.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
A class for handling words, derived from string.
Definition: word.H:59
IncompressibleMomentumTransportModel(const word &type, const geometricOneField &alpha, const geometricOneField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const TransportModel &transport)
Construct.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
const volVectorField & U() const
Access function to velocity field.
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
Templated abstract base class for single-phase incompressible turbulence models.
label patchi
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
Templated abstract base class for turbulence models.
virtual tmp< volSymmTensorField > devSigma() const
Return the effective stress tensor.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
Namespace for OpenFOAM.