PhaseIncompressibleTurbulenceModel.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2013-2015 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  const word& propertiesName
42 )
43 :
45  <
49  TransportModel
50  >
51  (
52  alpha,
53  rho,
54  U,
55  alphaRhoPhi,
56  phi,
58  propertiesName
59  )
60 {}
61 
62 
63 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
64 
65 template<class TransportModel>
68 (
69  const volScalarField& alpha,
70  const volVectorField& U,
71  const surfaceScalarField& alphaRhoPhi,
72  const surfaceScalarField& phi,
73  const TransportModel& transportModel,
74  const word& propertiesName
75 )
76 {
78  (
81  <
85  TransportModel
86  >::New
87  (
88  alpha,
90  U,
91  alphaRhoPhi,
92  phi,
94  propertiesName
95  ).ptr())
96  );
97 }
98 
99 
100 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
101 
102 template<class TransportModel>
105 {
106  return tmp<volScalarField>
107  (
108  new volScalarField
109  (
110  IOobject
111  (
112  IOobject::groupName("pPrime", this->U_.group()),
113  this->runTime_.timeName(),
114  this->mesh_,
115  IOobject::NO_READ,
116  IOobject::NO_WRITE
117  ),
118  this->mesh_,
119  dimensionedScalar("pPrimef", dimPressure, 0.0)
120  )
121  );
122 }
123 
124 
125 template<class TransportModel>
128 {
130  (
132  (
133  IOobject
134  (
135  IOobject::groupName("pPrimef", this->U_.group()),
136  this->runTime_.timeName(),
137  this->mesh_,
138  IOobject::NO_READ,
139  IOobject::NO_WRITE
140  ),
141  this->mesh_,
142  dimensionedScalar("pPrimef", dimPressure, 0.0)
143  )
144  );
145 }
146 
147 
148 template<class TransportModel>
151 {
152  return devRhoReff();
153 }
154 
155 
156 template<class TransportModel>
159 (
161 ) const
162 {
163  return divDevRhoReff(U);
164 }
165 
166 
167 template<class TransportModel>
170 devRhoReff() const
171 {
173 
174  return devReff();
175 }
176 
177 
178 template<class TransportModel>
182 (
184 ) const
185 {
187 
188  return divDevReff(U);
189 }
190 
191 
192 // ************************************************************************* //
Foam::PhaseIncompressibleTurbulenceModel::devRhoReff
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
Definition: PhaseIncompressibleTurbulenceModel.C:170
Foam::dimPressure
const dimensionSet dimPressure
Foam::IOobject
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
Foam::PhaseIncompressibleTurbulenceModel::New
static autoPtr< PhaseIncompressibleTurbulenceModel > New(const alphaField &alpha, 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:68
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:216
Foam::PhaseIncompressibleTurbulenceModel::divDevReff
virtual tmp< fvVectorMatrix > divDevReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: PhaseIncompressibleTurbulenceModel.C:159
Foam::geometricOneField
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Definition: geometricOneField.H:52
PhaseIncompressibleTurbulenceModel.H
Foam::PhaseIncompressibleTurbulenceModel::pPrime
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
Definition: PhaseIncompressibleTurbulenceModel.C:104
Foam::PhaseIncompressibleTurbulenceModel::devReff
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor.
Definition: PhaseIncompressibleTurbulenceModel.C:150
U
U
Definition: pEqn.H:46
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:365
Foam::TurbulenceModel
Templated abstract base class for turbulence models.
Definition: TurbulenceModel.H:57
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:51
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
rho
rho
Definition: pEqn.H:3
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::PhaseIncompressibleTurbulenceModel::PhaseIncompressibleTurbulenceModel
PhaseIncompressibleTurbulenceModel(const word &type, const alphaField &alpha, const geometricOneField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const TransportModel &transportModel, const word &propertiesName)
Construct.
Definition: PhaseIncompressibleTurbulenceModel.C:33
Foam::PhaseIncompressibleTurbulenceModel::divDevRhoReff
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: PhaseIncompressibleTurbulenceModel.C:182
Foam::PhaseIncompressibleTurbulenceModel::transportModel
TransportModel transportModel
Definition: PhaseIncompressibleTurbulenceModel.H:66
Foam::type
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:588
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::incompressibleTurbulenceModel
Abstract base class for turbulence models (RAS, LES and laminar).
Definition: incompressibleTurbulenceModel.H:52