turbulentMixingLengthDissipationRateInletFvPatchScalarField.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) 2011-2022 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::turbulentMixingLengthDissipationRateInletFvPatchScalarField
26 
27 Description
28  This boundary condition provides a turbulence dissipation, \f$\epsilon\f$
29  (epsilon) inlet condition based on a specified mixing length. The patch
30  values are calculated using:
31 
32  \f[
33  \epsilon_p = \frac{C_{\mu}^{0.75} k^{1.5}}{L}
34  \f]
35 
36  where
37 
38  \vartable
39  \epsilon_p | patch epsilon values
40  C_{\mu} | Model coefficient, set to 0.09
41  k | turbulence kinetic energy
42  L | length scale
43  \endvartable
44 
45 Usage
46  \table
47  Property | Description | Required | Default value
48  mixingLength | Length scale [m] | yes |
49  phi | flux field name | no | phi
50  k | turbulence kinetic energy field name | no | k
51  \endtable
52 
53  Example of the boundary condition specification:
54  \verbatim
55  <patchName>
56  {
57  type turbulentMixingLengthDissipationRateInlet;
58  mixingLength 0.005;
59  value uniform 200; // placeholder
60  }
61  \endverbatim
62 
63  Note:
64  In the event of reverse flow, a zero-gradient condition is applied
65 
66 See also
67  Foam::inletOutletFvPatchField
68 
69 SourceFiles
70  turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
71 
72 \*---------------------------------------------------------------------------*/
73 
74 #ifndef turbulentMixingLengthDissipationRateInletFvPatchScalarField_H
75 #define turbulentMixingLengthDissipationRateInletFvPatchScalarField_H
76 
78 
79 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80 
81 namespace Foam
82 {
83 
84 /*---------------------------------------------------------------------------*\
85  Class turbulentMixingLengthDissipationRateInletFvPatchScalarField Declaration
86 \*---------------------------------------------------------------------------*/
87 
88 class turbulentMixingLengthDissipationRateInletFvPatchScalarField
89 :
90  public inletOutletFvPatchScalarField
91 {
92  // Private Data
93 
94  //- Turbulent length scale
95  scalar mixingLength_;
96 
97  //- Name of the turbulent kinetic energy field
98  word kName_;
99 
100 
101 public:
102 
103  //- Runtime type information
104  TypeName("turbulentMixingLengthDissipationRateInlet");
105 
106 
107  // Constructors
108 
109  //- Construct from patch and internal field
111  (
112  const fvPatch&,
113  const DimensionedField<scalar, volMesh>&
114  );
115 
116  //- Construct from patch, internal field and dictionary
118  (
119  const fvPatch&,
120  const DimensionedField<scalar, volMesh>&,
121  const dictionary&
122  );
124  //- Construct by mapping given
125  // turbulentMixingLengthDissipationRateInletFvPatchScalarField
126  // onto a new patch
128  (
130  const fvPatch&,
132  const fvPatchFieldMapper&
133  );
134 
135  //- Disallow copy without setting internal field reference
137  (
139  ) = delete;
140 
141  //- Copy constructor setting internal field reference
143  (
146  );
147 
148  //- Construct and return a clone setting internal field reference
150  (
152  ) const
153  {
155  (
157  (
158  *this,
159  iF
160  )
161  );
162  }
163 
164 
165  // Member Functions
166 
167  //- Update the coefficients associated with the patch field
168  virtual void updateCoeffs();
169 
170  //- Write
171  virtual void write(Ostream&) const;
172 };
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #endif
182 
183 // ************************************************************************* //
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:63
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
This boundary condition provides a turbulence dissipation, (epsilon) inlet condition based on a spec...
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
turbulentMixingLengthDissipationRateInletFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("turbulentMixingLengthDissipationRateInlet")
Runtime type information.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.