phasePressureModel.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-2018 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::RASModels::phasePressureModel
26 
27 Description
28  Particle-particle phase-pressure RAS model
29 
30  The derivative of the phase-pressure with respect to the phase-fraction
31  is evaluated as
32 
33  g0*min(exp(preAlphaExp*(alpha - alphaMax)), expMax)
34 
35  The default model coefficients correspond to the following:
36  \verbatim
37  phasePressureCoeffs
38  {
39  preAlphaExp 500;
40  expMax 1000;
41  alphaMax 0.62;
42  g0 1000;
43  }
44  \endverbatim
45 
46 SourceFiles
47  phasePressureModel.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef phasePressureModel_H
52 #define phasePressureModel_H
53 
54 #include "RASModel.H"
55 #include "eddyViscosity.H"
56 #include "phaseCompressibleTurbulenceModel.H"
57 #include "EddyDiffusivity.H"
58 #include "phaseModel.H"
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 namespace RASModels
65 {
66 
67 /*---------------------------------------------------------------------------*\
68  Class phasePressureModel Declaration
69 \*---------------------------------------------------------------------------*/
70 
72 :
73  public eddyViscosity
74  <
75  RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
76  >
77 {
78  // Private data
79 
80  // Input Fields
81 
82  const phaseModel& phase_;
83 
84 
85  // Kinetic Theory Model coefficients
86 
87  //- Maximum packing phase-fraction
88  scalar alphaMax_;
89 
90  //- Pre-exponential factor
91  scalar preAlphaExp_;
92 
93  //- Maximum limit of the exponential
94  scalar expMax_;
95 
96  //- g0
98 
99 
100  // Private Member Functions
101 
102  void correctNut()
103  {}
104 
105  //- Disallow default bitwise copy construct
107 
108  //- Disallow default bitwise assignment
109  void operator=(const phasePressureModel&);
110 
111 
112 public:
113 
114  //- Runtime type information
115  TypeName("phasePressure");
116 
117 
118  // Constructors
119 
120  //- Construct from components
122  (
123  const volScalarField& alpha,
124  const volScalarField& rho,
125  const volVectorField& U,
127  const surfaceScalarField& phi,
128  const phaseModel& transport,
130  const word& type = typeName
131  );
132 
133 
134  //- Destructor
135  virtual ~phasePressureModel();
136 
137 
138  // Member Functions
139 
140  //- Re-read model coefficients if they have changed
141  virtual bool read();
142 
143  //- Return the effective viscosity
144  virtual tmp<volScalarField> nuEff() const
145  {
146  return this->nut();
147  }
148 
149  //- Return the effective viscosity on patch
150  virtual tmp<scalarField> nuEff(const label patchi) const
151  {
152  return this->nut(patchi);
153  }
154 
155  //- Return the turbulence kinetic energy
156  virtual tmp<volScalarField> k() const;
157 
158  //- Return the turbulence kinetic energy dissipation rate
159  virtual tmp<volScalarField> epsilon() const;
160 
161  //- Return the Reynolds stress tensor
162  virtual tmp<volSymmTensorField> R() const;
163 
164  //- Return the phase-pressure'
165  // (derivative of phase-pressure w.r.t. phase-fraction)
166  virtual tmp<volScalarField> pPrime() const;
167 
168  //- Return the face-phase-pressure'
169  // (derivative of phase-pressure w.r.t. phase-fraction)
170  virtual tmp<surfaceScalarField> pPrimef() const;
171 
172  //- Return the effective stress tensor
173  virtual tmp<volSymmTensorField> devRhoReff() const;
174 
175  //- Return the source term for the momentum equation
177 
178  //- Solve the kinetic theory equations and correct the viscosity
179  virtual void correct();
180 };
181 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 } // End namespace RASModels
186 } // End namespace Foam
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 #endif
191 
192 // ************************************************************************* //
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
const volVectorField & U() const
Access function to velocity field.
Particle-particle phase-pressure RAS model.
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:49
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure&#39;.
const transportModel & transport() const
Access function to incompressible transport model.
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from string.
Definition: word.H:59
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor.
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
virtual void correct()
Solve the kinetic theory equations and correct the viscosity.
const volScalarField & rho() const
Return the density field.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
virtual bool read()
Re-read model coefficients if they have changed.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:481
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
virtual ~phasePressureModel()
Destructor.
label patchi
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
A class for managing temporary objects.
Definition: PtrList.H:53
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
virtual tmp< volScalarField > alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
TypeName("phasePressure")
Runtime type information.
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity.
Namespace for OpenFOAM.
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure&#39;.