PhaseIncompressibleMomentumTransportModel.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::PhaseIncompressibleMomentumTransportModel
26 
27 Description
28  Templated abstract base class for multiphase incompressible
29  turbulence models.
30 
31 SourceFiles
32  PhaseIncompressibleMomentumTransportModel.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef PhaseIncompressibleMomentumTransportModel_H
37 #define PhaseIncompressibleMomentumTransportModel_H
38 
39 #include "MomentumTransportModel.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class PhaseIncompressibleMomentumTransportModel Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 template<class TransportModel>
53 :
55  <
56  volScalarField,
57  geometricOneField,
58  incompressibleMomentumTransportModel,
59  TransportModel
60  >
61 {
62 
63 public:
64 
67  typedef TransportModel transportModel;
68 
69 
70  // Constructors
71 
72  //- Construct
74  (
75  const word& type,
76  const alphaField& alpha,
77  const geometricOneField& rho,
78  const volVectorField& U,
80  const surfaceScalarField& phi,
81  const TransportModel& transportModel
82  );
83 
84 
85  // Selectors
86 
87  //- Return a reference to the selected turbulence model
89  (
90  const alphaField& alpha,
91  const volVectorField& U,
93  const surfaceScalarField& phi,
94  const TransportModel& transportModel
95  );
96 
97 
98  //- Destructor
100  {}
101 
102 
103  // Member Functions
104 
105  //- Return the laminar viscosity
106  virtual tmp<volScalarField> nu() const
107  {
108  return this->transport_.nu();
109  }
110 
111  //- Return the laminar viscosity on patchi
112  virtual tmp<scalarField> nu(const label patchi) const
113  {
114  return this->transport_.nu(patchi);
115  }
116 
117  //- Return the phase-pressure'
118  // (derivative of phase-pressure w.r.t. phase-fraction)
119  virtual tmp<volScalarField> pPrime() const;
120 
121  //- Return the face-phase-pressure'
122  // (derivative of phase-pressure w.r.t. phase-fraction)
123  virtual tmp<surfaceScalarField> pPrimef() const;
124 
125  //- Return the effective stress tensor
126  virtual tmp<volSymmTensorField> devSigma() const;
127 
128  //- Return the source term for the momentum equation
130 
131  //- Return the effective stress tensor
132  virtual tmp<volSymmTensorField> devTau() const;
133 
134  //- Return the source term for the momentum equation
135  virtual tmp<fvVectorMatrix> divDevTau(volVectorField& U) const;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #ifdef NoRepository
147 #endif
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
virtual tmp< volSymmTensorField > devSigma() const
Return the effective stress tensor.
static autoPtr< PhaseIncompressibleMomentumTransportModel > New(const alphaField &alpha, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const TransportModel &transportModel)
Return a reference to the selected turbulence model.
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure&#39;.
virtual tmp< volSymmTensorField > devTau() const
Return the effective stress tensor.
virtual tmp< fvVectorMatrix > divDevSigma(volVectorField &U) const
Return the source term for the momentum equation.
Templated abstract base class for multiphase incompressible turbulence models.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
A class for handling words, derived from string.
Definition: word.H:59
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure&#39;.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
const volVectorField & U() const
Access function to velocity field.
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
label patchi
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
Templated abstract base class for turbulence models.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
Namespace for OpenFOAM.
PhaseIncompressibleMomentumTransportModel(const word &type, const alphaField &alpha, const geometricOneField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const TransportModel &transportModel)
Construct.