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-2021 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 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class phaseIncompressibleMomentumTransportModel Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
53 {
54 
55 public:
56 
59 
60 
61 protected:
62 
63  // Protected data
64 
65  const alphaField& alpha_;
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("phaseIncompressibleMomentumTransportModel");
72 
73 
74  // Declare run-time constructor selection table
75 
77  (
78  autoPtr,
80  dictionary,
81  (
82  const alphaField& alpha,
83  const rhoField& rho,
84  const volVectorField& U,
86  const surfaceScalarField& phi,
87  const viscosity& viscosity
88  ),
89  (alpha, rho, U, alphaRhoPhi, phi, viscosity)
90  );
91 
92 
93  // Constructors
94 
95  //- Construct
97  (
98  const word& type,
99  const alphaField& alpha,
100  const geometricOneField& rho,
101  const volVectorField& U,
102  const surfaceScalarField& alphaRhoPhi,
103  const surfaceScalarField& phi,
104  const viscosity& viscosity
105  );
106 
107 
108  // Selectors
109 
110  //- Return a reference to the selected turbulence model
112  (
113  const alphaField& alpha,
114  const volVectorField& U,
115  const surfaceScalarField& alphaRhoPhi,
116  const surfaceScalarField& phi,
117  const viscosity& viscosity
118  );
119 
120 
121  //- Destructor
123  {}
124 
125 
126  // Member Functions
127 
128  //- Access function to phase fraction
129  const alphaField& alpha() const
130  {
131  return alpha_;
132  }
133 
134  //- Return the phase-pressure'
135  // (derivative of phase-pressure w.r.t. phase-fraction)
136  virtual tmp<volScalarField> pPrime() const;
137 
138  //- Return the face-phase-pressure'
139  // (derivative of phase-pressure w.r.t. phase-fraction)
140  virtual tmp<surfaceScalarField> pPrimef() const;
141 
142  //- Return the effective stress tensor
143  virtual tmp<volSymmTensorField> devSigma() const;
144 
145  //- Return the source term for the momentum equation
147 
148  //- Return the effective stress tensor
149  virtual tmp<volSymmTensorField> devTau() const;
150 
151  //- Return the source term for the momentum equation
152  virtual tmp<fvVectorMatrix> divDevTau(volVectorField& U) const;
153 };
154 
156 namespace phaseIncompressible
157 {
159 
160  template<class PhaseIncompressibleMomentumTransportModel>
162  (
163  const volScalarField& alpha,
164  const volVectorField& U,
166  const surfaceScalarField& phi,
167  const viscosity& viscosity
168  );
169 }
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace Foam
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 #ifdef NoRepository
180 #endif
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 #endif
185 
186 // ************************************************************************* //
TypeName("phaseIncompressibleMomentumTransportModel")
Runtime type information.
const rhoField & rho() const
Return the density field.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
declareRunTimeNewSelectionTable(autoPtr, phaseIncompressibleMomentumTransportModel, dictionary,(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity),(alpha, rho, U, alphaRhoPhi, phi, viscosity))
virtual tmp< volSymmTensorField > devSigma() const
Return the effective stress tensor.
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure&#39;.
Generic GeometricField class.
Templated abstract base class for multiphase incompressible turbulence models.
const alphaField & alpha() const
Access function to phase fraction.
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
phaseIncompressibleMomentumTransportModel(const word &type, const alphaField &alpha, const geometricOneField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct.
virtual tmp< fvVectorMatrix > divDevSigma(volVectorField &U) const
Return the source term for the momentum equation.
momentumTransportModel(const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
Abstract base class for all fluid physical properties.
Definition: viscosity.H:49
const volVectorField & U() const
Access function to velocity field.
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
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
static autoPtr< phaseIncompressibleMomentumTransportModel > New(const alphaField &alpha, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Return a reference to the selected turbulence model.
Base class for single-phase incompressible turbulence models.
virtual tmp< volSymmTensorField > devTau() const
Return the effective stress tensor.
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure&#39;.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
Namespace for OpenFOAM.