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