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