phasePressureModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2013-2018 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::RASModels::phasePressureModel
29 
30 Description
31  Particle-particle phase-pressure RAS model
32 
33  The derivative of the phase-pressure with respect to the phase-fraction
34  is evaluated as
35 
36  g0*min(exp(preAlphaExp*(alpha - alphaMax)), expMax)
37 
38  The default model coefficients correspond to the following:
39  \verbatim
40  phasePressureCoeffs
41  {
42  preAlphaExp 500;
43  expMax 1000;
44  alphaMax 0.62;
45  g0 1000;
46  }
47  \endverbatim
48 
49 SourceFiles
50  phasePressureModel.C
51 
52 \*---------------------------------------------------------------------------*/
53 
54 #ifndef phasePressureModel_H
55 #define phasePressureModel_H
56 
57 #include "RASModel.H"
58 #include "eddyViscosity.H"
59 #include "phaseCompressibleTurbulenceModel.H"
60 #include "EddyDiffusivity.H"
61 #include "phaseModel.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 namespace RASModels
68 {
69 
70 /*---------------------------------------------------------------------------*\
71  Class phasePressureModel Declaration
72 \*---------------------------------------------------------------------------*/
73 
75 :
76  public eddyViscosity
77  <
78  RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
79  >
80 {
81  // Private Data
82 
83  // Kinetic Theory Model coefficients
84 
85  //- Maximum packing phase-fraction
86  scalar alphaMax_;
87 
88  //- Pre-exponential factor
89  scalar preAlphaExp_;
90 
91  //- Maximum limit of the exponential
92  scalar expMax_;
93 
94  //- g0
96 
97 
98  // Private Member Functions
99 
100  //- Disabled
101  void correctNut()
102  {}
103 
104  //- No copy construct
105  phasePressureModel(const phasePressureModel&) = delete;
106 
107  //- No copy assignment
108  void operator=(const phasePressureModel&) = delete;
109 
110 
111 public:
112 
113  //- Runtime type information
114  TypeName("phasePressure");
115 
116 
117  // Constructors
118 
119  //- Construct from components
121  (
122  const volScalarField& alpha,
123  const volScalarField& rho,
124  const volVectorField& U,
125  const surfaceScalarField& alphaRhoPhi,
126  const surfaceScalarField& phi,
127  const phaseModel& transport,
128  const word& propertiesName = turbulenceModel::propertiesName,
129  const word& type = typeName
130  );
131 
132 
133  //- Destructor
134  virtual ~phasePressureModel() = default;
135 
136 
137  // Member Functions
138 
139  //- Re-read model coefficients if they have changed
140  virtual bool read();
141 
142  //- Return the effective viscosity
143  virtual tmp<volScalarField> nuEff() const
144  {
145  return this->nut();
146  }
147 
148  //- Return the effective viscosity on patch
149  virtual tmp<scalarField> nuEff(const label patchi) const
150  {
151  return this->nut(patchi);
152  }
153 
154  //- Return the turbulence kinetic energy
155  virtual tmp<volScalarField> k() const;
156 
157  //- Return the turbulence kinetic energy dissipation rate
158  virtual tmp<volScalarField> epsilon() const;
159 
160  //- Return the specific dissipation rate
161  virtual tmp<volScalarField> omega() const;
162 
163  //- Return the Reynolds stress tensor
164  virtual tmp<volSymmTensorField> R() const;
165 
166  //- Return the phase-pressure'
167  // (derivative of phase-pressure w.r.t. phase-fraction)
168  virtual tmp<volScalarField> pPrime() const;
169 
170  //- Return the face-phase-pressure'
171  // (derivative of phase-pressure w.r.t. phase-fraction)
172  virtual tmp<surfaceScalarField> pPrimef() const;
173 
174  //- Return the effective stress tensor
175  virtual tmp<volSymmTensorField> devRhoReff() const;
176 
177  //- Return the effective stress tensor based on a given velocity field
179  (
180  const volVectorField& U
181  ) const;
182 
183  //- Return the source term for the momentum equation
185 
186  //- Solve the kinetic theory equations and correct the viscosity
187  virtual void correct();
188 };
189 
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 } // End namespace RASModels
194 } // End namespace Foam
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 #endif
199 
200 // ************************************************************************* //
Foam::RASModels::phasePressureModel
Particle-particle phase-pressure RAS model.
Definition: phasePressureModel.H:73
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::RASModels::phasePressureModel::TypeName
TypeName("phasePressure")
Runtime type information.
Foam::eddyViscosity< RASModel< EddyDiffusivity< phaseCompressibleTurbulenceModel > > >::nut
virtual tmp< volScalarField > nut() const
Return the turbulence viscosity.
Definition: eddyViscosity.H:107
Foam::RASModels::phasePressureModel::read
virtual bool read()
Re-read model coefficients if they have changed.
Definition: phasePressureModel.C:77
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:100
Foam::RASModels::phasePressureModel::epsilon
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: phasePressureModel.C:108
rho
rho
Definition: readInitialConditions.H:88
Foam::RASModels::phasePressureModel::pPrimef
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
Definition: phasePressureModel.C:174
eddyViscosity.H
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::RASModels::phasePressureModel::pPrime
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
Definition: phasePressureModel.C:146
Foam::RASModels::phasePressureModel::divDevRhoReff
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: phasePressureModel.C:240
RASModel.H
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
U
U
Definition: pEqn.H:72
Foam::RASModels::phasePressureModel::R
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor.
Definition: phasePressureModel.C:124
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::RASModels::phasePressureModel::nuEff
virtual tmp< scalarField > nuEff(const label patchi) const
Return the effective viscosity on patch.
Definition: phasePressureModel.H:148
Foam::RASModels::phasePressureModel::nuEff
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity.
Definition: phasePressureModel.H:142
Foam::eddyViscosity
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:55
Foam::RASModels::phasePressureModel::correct
virtual void correct()
Solve the kinetic theory equations and correct the viscosity.
Definition: phasePressureModel.C:255
Foam::RASModels::phasePressureModel::devRhoReff
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
Definition: phasePressureModel.C:202
Foam::RASModels::phasePressureModel::~phasePressureModel
virtual ~phasePressureModel()=default
Destructor.
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::RASModels::phasePressureModel::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: phasePressureModel.C:100
Foam::RASModels::phasePressureModel::omega
virtual tmp< volScalarField > omega() const
Return the specific dissipation rate.
Definition: phasePressureModel.C:116
Foam::ThermalDiffusivity::alpha
virtual tmp< volScalarField > alpha() const
Return the laminar thermal diffusivity for enthalpy [kg/m/s].
Definition: ThermalDiffusivity.H:125
EddyDiffusivity.H