PhaseIncompressibleMomentumTransportModel.C
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 \*---------------------------------------------------------------------------*/
25 
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 template<class TransportModel>
33 (
34  const word& type,
35  const volScalarField& alpha,
36  const geometricOneField& rho,
37  const volVectorField& U,
38  const surfaceScalarField& alphaRhoPhi,
39  const surfaceScalarField& phi,
40  const TransportModel& transportModel
41 )
42 :
44  <
46  geometricOneField,
47  incompressibleMomentumTransportModel,
48  TransportModel
49  >
50  (
51  alpha,
52  rho,
53  U,
54  alphaRhoPhi,
55  phi,
56  transportModel
57  )
58 {}
59 
60 
61 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
62 
63 template<class TransportModel>
66 (
67  const volScalarField& alpha,
68  const volVectorField& U,
69  const surfaceScalarField& alphaRhoPhi,
70  const surfaceScalarField& phi,
71  const TransportModel& transportModel
72 )
73 {
75  (
78  <
80  geometricOneField,
81  incompressibleMomentumTransportModel,
82  TransportModel
83  >::New
84  (
85  alpha,
86  geometricOneField(),
87  U,
88  alphaRhoPhi,
89  phi,
90  transportModel
91  ).ptr())
92  );
93 }
94 
95 
96 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
97 
98 template<class TransportModel>
101 {
102  return volScalarField::New
103  (
104  IOobject::groupName("pPrime", this->alphaRhoPhi_.group()),
105  this->mesh_,
107  );
108 }
109 
110 
111 template<class TransportModel>
114 {
116  (
117  IOobject::groupName("pPrimef", this->alphaRhoPhi_.group()),
118  this->mesh_,
120  );
121 }
122 
123 
124 template<class TransportModel>
127 devSigma() const
128 {
129  return devTau();
130 }
131 
132 
133 template<class TransportModel>
136 (
137  volVectorField& U
138 ) const
139 {
140  return divDevTau(U);
141 }
142 
143 
144 template<class TransportModel>
147 devTau() const
148 {
150 
151  return devSigma();
152 }
153 
154 
155 template<class TransportModel>
158 divDevTau
159 (
160  volVectorField& U
161 ) const
162 {
164 
165  return divDevSigma(U);
166 }
167 
168 
169 // ************************************************************************* //
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.
phi
Definition: pEqn.H:104
Templated abstract base class for multiphase incompressible turbulence models.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
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.
const dimensionSet dimPressure
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure&#39;.
U
Definition: pEqn.H:72
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
A class for managing temporary objects.
Definition: PtrList.H:53
Templated abstract base class for turbulence models.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:366
PhaseIncompressibleMomentumTransportModel(const word &type, const alphaField &alpha, const geometricOneField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const TransportModel &transportModel)
Construct.