DPMIncompressibleTurbulenceModel.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) 2020 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::DPMIncompressibleTurbulenceModel
28 
29 Description
30  Templated abstract base class for volumen occupancy incompressible
31  turbulence models.
32 
33 SourceFiles
34  DPMIncompressibleTurbulenceModel.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef DPMIncompressibleTurbulenceModel_H
39 #define DPMIncompressibleTurbulenceModel_H
40 
41 #include "TurbulenceModel.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class DPMIncompressibleTurbulenceModel Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class TransportModel>
55 :
56  public TurbulenceModel
57  <
58  volScalarField,
59  geometricOneField,
60  incompressibleTurbulenceModel,
61  TransportModel
62  >
63 {
64 
65 public:
66 
67  typedef volScalarField alphaField;
69  typedef TransportModel transportModel;
70 
71 
72  // Constructors
73 
74  //- Construct
76  (
77  const word& type,
78  const alphaField& alpha,
79  const geometricOneField& rho,
80  const volVectorField& U,
82  const surfaceScalarField& phi,
83  const TransportModel& transportModel,
84  const word& propertiesName
85  );
86 
87 
88  // Selectors
89 
90  //- Return a reference to the selected turbulence model
92  (
93  const alphaField& alpha,
94  const volVectorField& U,
96  const surfaceScalarField& phi,
97  const TransportModel& transportModel,
99  );
100 
101 
102  //- Destructor
103  virtual ~DPMIncompressibleTurbulenceModel() = default;
104 
105 
106  // Member Functions
107 
108  //- Return the phase-pressure'
109  // (derivative of phase-pressure w.r.t. phase-fraction)
110  virtual tmp<volScalarField> pPrime() const;
111 
112  //- Return the face-phase-pressure'
113  // (derivative of phase-pressure w.r.t. phase-fraction)
114  virtual tmp<surfaceScalarField> pPrimef() const;
115 
116  //- Return the effective stress tensor
117  virtual tmp<volSymmTensorField> devReff() const;
118 
119  //- Return the effective stress tensor based on a given velocity field
121  (
122  const volVectorField& U
123  ) const;
124 
125  //- Return the source term for the momentum equation
127 
128  //- Return the effective stress tensor
129  virtual tmp<volSymmTensorField> devRhoReff() const;
130 
131  //- Return the effective stress tensor based on a given velocity field
133  (
134  const volVectorField& U
135  ) const;
136 
137  //- Return the source term for the momentum equation
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #ifdef NoRepository
150 #endif
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
virtual tmp< fvVectorMatrix > divDevReff(volVectorField &U) const
Return the source term for the momentum equation.
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure&#39;.
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
const volVectorField & U() const
Access function to velocity field.
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure&#39;.
Templated abstract base class for turbulence models.
virtual ~DPMIncompressibleTurbulenceModel()=default
Destructor.
Templated abstract base class for volumen occupancy incompressible turbulence models.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: POSIX.C:799
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
Definition: word.H:63
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor.
DPMIncompressibleTurbulenceModel(const word &type, const alphaField &alpha, const geometricOneField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const TransportModel &transportModel, const word &propertiesName)
Construct.
static autoPtr< DPMIncompressibleTurbulenceModel > New(const alphaField &alpha, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const TransportModel &transportModel, const word &propertiesName=turbulenceModel::propertiesName)
Return a reference to the selected turbulence model.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.