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-2025 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  // Declare run-time constructor selection table
71 
73  (
74  autoPtr,
76  dictionary,
77  (
78  const alphaField& alpha,
79  const rhoField& rho,
80  const volVectorField& U,
82  const surfaceScalarField& phi,
83  const viscosity& viscosity
84  ),
86  );
87 
88 
89  // Constructors
90 
91  //- Construct
93  (
94  const word& type,
95  const alphaField& alpha,
96  const geometricOneField& rho,
97  const volVectorField& U,
99  const surfaceScalarField& phi,
100  const viscosity& viscosity
101  );
102 
103 
104  // Selectors
105 
106  //- Return a reference to the selected turbulence model
108  (
109  const alphaField& alpha,
110  const volVectorField& U,
112  const surfaceScalarField& phi,
113  const viscosity& viscosity
114  );
115 
116 
117  //- Destructor
119  {}
120 
121 
122  // Member Functions
123 
124  //- Access function to phase fraction
125  const alphaField& alpha() const
126  {
127  return alpha_;
128  }
129 
130  //- Return the phase-pressure'
131  // (derivative of phase-pressure w.r.t. phase-fraction)
132  virtual tmp<volScalarField> pPrime() const;
133 
134  //- Return the face-phase-pressure'
135  // (derivative of phase-pressure w.r.t. phase-fraction)
136  virtual tmp<surfaceScalarField> pPrimef() const;
137 
138  //- Return the effective surface stress
139  virtual tmp<surfaceVectorField> devSigma() const;
140 
141  //- Return the source term for the momentum equation
143 
144  //- Return the effective surface stress
145  virtual tmp<surfaceVectorField> devTau() const = 0;
146 
148 
149  //- Return the source term for the momentum equation
150  virtual tmp<fvVectorMatrix> divDevTau(volVectorField& U) const = 0;
151 };
152 
153 
154 namespace phaseIncompressible
155 {
157 
158  template<class PhaseIncompressibleMomentumTransportModel>
160  (
161  const volScalarField& alpha,
162  const volVectorField& U,
163  const surfaceScalarField& alphaRhoPhi,
164  const surfaceScalarField& phi,
165  const viscosity& viscosity
166  );
167 }
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #ifdef NoRepository
178 #endif
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #endif
183 
184 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Base class for single-phase incompressible turbulence models.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const=0
Return the stress matrix for the momentum equation.
const rhoField & rho() const
Return the density field.
const volVectorField & U() const
Access function to velocity field.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
Templated abstract base class for multiphase incompressible turbulence models.
virtual tmp< surfaceVectorField > devTau() const =0
Return the effective surface stress.
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.
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))
const alphaField & alpha() const
Access function to phase fraction.
virtual tmp< fvVectorMatrix > divDevSigma(volVectorField &U) const
Return the source term for the momentum equation.
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
virtual tmp< fvVectorMatrix > divDevTau(const volScalarField &rho, volVectorField &U) const=0
Return the source term for the momentum equation.
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
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< surfaceVectorField > devSigma() const
Return the effective surface stress.
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
A class for handling words, derived from string.
Definition: word.H:62
U
Definition: pEqn.H:72
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
autoPtr< PhaseIncompressibleMomentumTransportModel > New(const volScalarField &alpha, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
phaseIncompressibleMomentumTransportModel momentumTransportModel
Namespace for OpenFOAM.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488