compressibleMomentumTransportModel.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::compressibleMomentumTransportModel
26 
27 Description
28  Abstract base class for turbulence models (RAS, LES and laminar).
29 
30 SourceFiles
31  compressibleMomentumTransportModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef compressibleMomentumTransportModel_H
36 #define compressibleMomentumTransportModel_H
37 
38 #include "momentumTransportModel.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 // Forward declarations
46 class fvMesh;
47 
48 // Transport properties traits class to provide the thermo model
49 template<class TransportType>
50 class TransportTraits
51 {
52 public:
53 
54  typedef TransportType thermoModel;
55 
56  static const thermoModel& thermo(const TransportType& tt)
57  {
58  return tt;
59  }
60 };
61 
62 
63 /*---------------------------------------------------------------------------*\
64  Class compressibleMomentumTransportModel Declaration
65 \*---------------------------------------------------------------------------*/
66 
68 :
70 {
71 
72 protected:
73 
74  // Protected data
75 
76  const volScalarField& rho_;
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName(momentumTransportModel::typeName_());
83 
84 
85  // Constructors
86 
87  //- Construct from components
89  (
90  const volScalarField& rho,
91  const volVectorField& U,
92  const surfaceScalarField& alphaRhoPhi,
93  const surfaceScalarField& phi
94  );
95 
96  //- Disallow default bitwise copy construction
98  (
100  ) = delete;
101 
102 
103  //- Destructor
105  {}
106 
107 
108  // Member Functions
109 
110  //- Return the density field
111  const volScalarField& rho() const
112  {
113  return rho_;
114  }
115 
116  //- Return the volumetric flux field
117  virtual tmp<surfaceScalarField> phi() const;
118 
119  //- Return the effective stress tensor including the laminar stress
120  virtual tmp<volSymmTensorField> devTau() const = 0;
121 
122  //- Return the source term for the momentum equation
123  virtual tmp<fvVectorMatrix> divDevTau(volVectorField& U) const = 0;
124 
125 
126  // Member Operators
127 
128  //- Disallow default bitwise assignment
129  void operator=(const compressibleMomentumTransportModel&) = delete;
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
static const thermoModel & thermo(const TransportType &tt)
phi
Definition: pEqn.H:104
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:70
Abstract base class for turbulence models (RAS, LES and laminar).
U
Definition: pEqn.H:72
A class for managing temporary objects.
Definition: PtrList.H:53
Abstract base class for turbulence models (RAS, LES and laminar).
Namespace for OpenFOAM.