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-2022 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  Base class for single-phase incompressible turbulence models.
29 
30 SourceFiles
31  incompressibleMomentumTransportModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef incompressibleMomentumTransportModel_H
36 #define incompressibleMomentumTransportModel_H
37 
38 #include "momentumTransportModel.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class incompressibleMomentumTransportModel Declaration
47 \*---------------------------------------------------------------------------*/
48 
50 :
52 {
53 
54 public:
55 
58 
59 
60 protected:
61 
62  // Protected data
63 
65  rhoField rho_;
66 
67 
68 public:
69 
70  // Declare run-time constructor selection table
71 
73  (
74  autoPtr,
76  dictionary,
77  (
78  const alphaField& alpha,
79  const rhoField& rho,
80  const volVectorField& U,
82  const surfaceScalarField& phi,
83  const viscosity& viscosity
84  ),
86  );
87 
88 
89  // Constructors
90 
91  //- Construct
93  (
94  const word& type,
95  const geometricOneField& alpha,
96  const geometricOneField& rho,
97  const volVectorField& U,
99  const surfaceScalarField& phi,
100  const viscosity& viscosity
101  );
102 
103 
104  // Selectors
105 
106  //- Return a reference to the selected turbulence model
108  (
109  const volVectorField& U,
110  const surfaceScalarField& phi,
111  const viscosity& viscosity
112  );
113 
114 
115  //- Destructor
117  {}
118 
119 
120  // Member Functions
121 
122  //- Access function to phase fraction
123  const alphaField& alpha() const
124  {
125  return alpha_;
126  }
127 
128  //- Return the density field
129  const rhoField& rho() const
130  {
131  return rho_;
132  }
133 
134  //- Return the effective stress tensor
135  virtual tmp<volSymmTensorField> devSigma() const;
136 
137  //- Return the source term for the momentum equation
139 
140  //- Return the effective stress tensor
141  virtual tmp<volSymmTensorField> devTau() const;
142 
143  //- Return the source term for the momentum equation
145 
146  //- Return the source term for the momentum equation
148  (
149  const volScalarField& rho,
151  ) const;
152 };
153 
154 
155 namespace incompressible
156 {
158 
159  template<class IncompressibleMomentumTransportModel>
161  (
162  const volVectorField& U,
163  const surfaceScalarField& phi,
164  const viscosity& viscosity
165  );
166 }
167 
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 } // End namespace Foam
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #ifdef NoRepository
177 #endif
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #endif
182 
183 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Base class for single-phase incompressible turbulence models.
virtual tmp< volSymmTensorField > devSigma() const
Return the effective stress tensor.
static autoPtr< incompressibleMomentumTransportModel > New(const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
Return a reference to the selected turbulence model.
incompressibleMomentumTransportModel(const word &type, const geometricOneField &alpha, const geometricOneField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct.
declareRunTimeNewSelectionTable(autoPtr, incompressibleMomentumTransportModel, dictionary,(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity),(alpha, rho, U, alphaRhoPhi, phi, viscosity))
virtual tmp< volSymmTensorField > devTau() const
Return the effective stress tensor.
const alphaField & alpha() const
Access function to phase fraction.
virtual tmp< fvVectorMatrix > divDevSigma(volVectorField &U) const
Return the source term for the momentum equation.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
const rhoField & rho() const
Return the density field.
Abstract base class for turbulence models (RAS, LES and laminar).
const volVectorField & U() const
Access function to velocity field.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
A class for handling words, derived from string.
Definition: word.H:62
U
Definition: pEqn.H:72
incompressibleMomentumTransportModel momentumTransportModel
autoPtr< IncompressibleMomentumTransportModel > New(const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
Namespace for OpenFOAM.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488