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 
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::DPMIncompressibleTurbulenceModel::pPrime
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
Foam::turbulenceModel::phi
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
Definition: turbulenceModel.C:77
Foam::DPMIncompressibleTurbulenceModel::rhoField
geometricOneField rhoField
Definition: DPMIncompressibleTurbulenceModel.H:67
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::DPMIncompressibleTurbulenceModel::devReff
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor.
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
Foam::TurbulenceModel< volScalarField, geometricOneField, incompressibleTurbulenceModel, TransportModel >::alpha
const alphaField & alpha() const
Access function to phase fraction.
Definition: TurbulenceModel.H:147
rho
rho
Definition: readInitialConditions.H:88
incompressibleTurbulenceModel.H
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::DPMIncompressibleTurbulenceModel::DPMIncompressibleTurbulenceModel
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.
Foam::DPMIncompressibleTurbulenceModel::divDevRhoReff
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
Foam::DPMIncompressibleTurbulenceModel::pPrimef
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
Foam::DPMIncompressibleTurbulenceModel::divDevReff
virtual tmp< fvVectorMatrix > divDevReff(volVectorField &U) const
Return the source term for the momentum equation.
Foam::DPMIncompressibleTurbulenceModel::New
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.
Foam::DPMIncompressibleTurbulenceModel::transportModel
TransportModel transportModel
Definition: DPMIncompressibleTurbulenceModel.H:68
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::DPMIncompressibleTurbulenceModel::alphaField
volScalarField alphaField
Definition: DPMIncompressibleTurbulenceModel.H:66
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::DPMIncompressibleTurbulenceModel::devRhoReff
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
Foam::DPMIncompressibleTurbulenceModel
Templated abstract base class for volumen occupancy incompressible turbulence models.
Definition: DPMIncompressibleTurbulenceModel.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::DPMIncompressibleTurbulenceModel::~DPMIncompressibleTurbulenceModel
virtual ~DPMIncompressibleTurbulenceModel()=default
Destructor.
Foam::GeometricField< scalar, fvPatchField, volMesh >
DPMIncompressibleTurbulenceModel.C
Foam::turbulenceModel::U
const volVectorField & U() const
Access function to velocity field.
Definition: turbulenceModel.H:144