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-2016 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::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"
60 #include "ThermalDiffusivity.H"
61 #include "EddyDiffusivity.H"
62 #include "phaseModel.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 namespace RASModels
69 {
70 
71 /*---------------------------------------------------------------------------*\
72  Class phasePressureModel Declaration
73 \*---------------------------------------------------------------------------*/
74 
76 :
77  public eddyViscosity
78  <
79  RASModel<EddyDiffusivity<ThermalDiffusivity
80  <
81  PhaseCompressibleTurbulenceModel<phaseModel>
82  >>>
83  >
84 {
85  // Private data
86 
87  // Input Fields
88 
89  const phaseModel& phase_;
90 
91 
92  // Kinetic Theory Model coefficients
93 
94  //- Maximum packing phase-fraction
95  scalar alphaMax_;
96 
97  //- Pre-exponential factor
98  scalar preAlphaExp_;
99 
100  //- Maximum limit of the exponential
101  scalar expMax_;
102 
103  //- g0
104  dimensionedScalar g0_;
105 
106 
107  // Private Member Functions
108 
109  void correctNut()
110  {}
111 
112  //- No copy construct
113  phasePressureModel(const phasePressureModel&) = delete;
114 
115  //- No copy assignment
116  void operator=(const phasePressureModel&) = delete;
117 
118 
119 public:
120 
121  //- Runtime type information
122  TypeName("phasePressure");
123 
124 
125  // Constructors
126 
127  //- Construct from components
129  (
130  const volScalarField& alpha,
131  const volScalarField& rho,
132  const volVectorField& U,
133  const surfaceScalarField& alphaRhoPhi,
134  const surfaceScalarField& phi,
135  const phaseModel& transport,
136  const word& propertiesName = turbulenceModel::propertiesName,
137  const word& type = typeName
138  );
139 
140 
141  //- Destructor
142  virtual ~phasePressureModel() = default;
143 
144 
145  // Member Functions
146 
147  //- Re-read model coefficients if they have changed
148  virtual bool read();
149 
150  //- Return the effective viscosity
151  virtual tmp<volScalarField> nuEff() const
152  {
153  return this->nut();
154  }
155 
156  //- Return the effective viscosity on patch
157  virtual tmp<scalarField> nuEff(const label patchi) const
158  {
159  return this->nut(patchi);
160  }
161 
162  //- Return the turbulence kinetic energy
163  virtual tmp<volScalarField> k() const;
164 
165  //- Return the turbulence kinetic energy dissipation rate
166  virtual tmp<volScalarField> epsilon() const;
167 
168  //- Return the specific dissipation rate
169  virtual tmp<volScalarField> omega() const;
170 
171  //- Return the Reynolds stress tensor
172  virtual tmp<volSymmTensorField> R() const;
173 
174  //- Return the phase-pressure'
175  // (derivative of phase-pressure w.r.t. phase-fraction)
176  virtual tmp<volScalarField> pPrime() const;
177 
178  //- Return the face-phase-pressure'
179  // (derivative of phase-pressure w.r.t. phase-fraction)
180  virtual tmp<surfaceScalarField> pPrimef() const;
181 
182  //- Return the effective stress tensor
183  virtual tmp<volSymmTensorField> devRhoReff() const;
184 
185  //- Return the source term for the momentum equation
187 
188  //- Solve the kinetic theory equations and correct the viscosity
189  virtual void correct();
190 };
191 
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 } // End namespace RASModels
196 } // End namespace Foam
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 #endif
201 
202 // ************************************************************************* //
Foam::tmp< volScalarField >
ThermalDiffusivity.H
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:79
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:110
rho
rho
Definition: readInitialConditions.H:88
PhaseCompressibleTurbulenceModel.H
Foam::RASModels::phasePressureModel::pPrimef
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
Definition: phasePressureModel.C:176
eddyViscosity.H
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::RASModels::phasePressureModel::pPrime
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
Definition: phasePressureModel.C:148
Foam::RASModels::phasePressureModel::divDevRhoReff
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: phasePressureModel.C:232
RASModel.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
phasePressureModel
Particle-particle phase-pressure RAS model.
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:60
U
U
Definition: pEqn.H:72
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
Foam::RASModels::phasePressureModel::R
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor.
Definition: phasePressureModel.C:126
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:156
Foam::RASModels::phasePressureModel::nuEff
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity.
Definition: phasePressureModel.H:150
Foam::RASModels::phasePressureModel::correct
virtual void correct()
Solve the kinetic theory equations and correct the viscosity.
Definition: phasePressureModel.C:247
Foam::RASModels::phasePressureModel::devRhoReff
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
Definition: phasePressureModel.C:204
Foam::RASModels::phasePressureModel::~phasePressureModel
virtual ~phasePressureModel()=default
Destructor.
Foam::GeometricField< vector, fvPatchField, volMesh >
Foam::RASModels::phasePressureModel::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: phasePressureModel.C:102
Foam::RASModels::phasePressureModel::omega
virtual tmp< volScalarField > omega() const
Return the specific dissipation rate.
Definition: phasePressureModel.C:118
Foam::ThermalDiffusivity::alpha
virtual tmp< volScalarField > alpha() const
Return the laminar thermal diffusivity for enthalpy [kg/m/s].
Definition: ThermalDiffusivity.H:125
EddyDiffusivity.H