turbulentMixingLengthDissipationRateInletFvPatchScalarField.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) 2011-2016 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 Group
28  grpRASBoundaryConditions grpInletBoundaryConditions
29 
30 Description
31  This boundary condition provides a turbulence dissipation, \f$\epsilon\f$
32  (epsilon) inlet condition based on a specified mixing length. The patch
33  values are calculated using:
34 
35  \f[
36  \epsilon_p = \frac{C_{\mu}^{0.75} k^{1.5}}{L}
37  \f]
38 
39  where
40 
41  \vartable
42  \epsilon_p | patch epsilon values
43  C_{\mu} | Model coefficient, set to 0.09
44  k | turbulence kinetic energy
45  L | length scale
46  \endvartable
47 
48 Usage
49  \table
50  Property | Description | Required | Default value
51  mixingLength | Length scale [m] | yes |
52  phi | flux field name | no | phi
53  k | turbulence kinetic energy field name | no | k
54  \endtable
55 
56  Example of the boundary condition specification:
57  \verbatim
58  <patchName>
59  {
60  type turbulentMixingLengthDissipationRateInlet;
61  mixingLength 0.005;
62  value uniform 200; // placeholder
63  }
64  \endverbatim
65 
66 Note
67  In the event of reverse flow, a zero-gradient condition is applied
68 
69 See also
70  Foam::inletOutletFvPatchField
71 
72 SourceFiles
73  turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
74 
75 \*---------------------------------------------------------------------------*/
76 
77 #ifndef turbulentMixingLengthDissipationRateInlet_H
78 #define turbulentMixingLengthDissipationRateInlet_H
79 
81 
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 
84 namespace Foam
85 {
86 
87 /*---------------------------------------------------------------------------*\
88  Class turbulentMixingLengthDissipationRateInletFvPatchScalarField Declaration
89 \*---------------------------------------------------------------------------*/
90 
91 class turbulentMixingLengthDissipationRateInletFvPatchScalarField
92 :
93  public inletOutletFvPatchScalarField
94 {
95  // Private data
96 
97  //- Turbulent length scale
98  scalar mixingLength_;
99 
100  //- Name of the turbulent kinetic energy field
101  word kName_;
102 
103 
104 public:
105 
106  //- Runtime type information
107  TypeName("turbulentMixingLengthDissipationRateInlet");
108 
109 
110  // Constructors
111 
112  //- Construct from patch and internal field
114  (
115  const fvPatch&,
116  const DimensionedField<scalar, volMesh>&
117  );
118 
119  //- Construct from patch, internal field and dictionary
121  (
122  const fvPatch&,
123  const DimensionedField<scalar, volMesh>&,
124  const dictionary&
125  );
127  //- Construct by mapping given
128  // turbulentMixingLengthDissipationRateInletFvPatchScalarField
129  // onto a new patch
131  (
133  const fvPatch&,
135  const fvPatchFieldMapper&
136  );
137 
138  //- Construct as copy
140  (
142  );
143 
144  //- Construct and return a clone
145  virtual tmp<fvPatchScalarField> clone() const
146  {
148  (
150  (
151  *this
152  )
153  );
154  }
155 
156  //- Construct as copy setting internal field reference
158  (
161  );
162 
163  //- Construct and return a clone setting internal field reference
165  (
167  ) const
168  {
170  (
172  (
173  *this,
174  iF
175  )
176  );
177  }
178 
179 
180  // Member functions
181 
182  //- Update the coefficients associated with the patch field
183  virtual void updateCoeffs();
184 
185  //- Write
186  virtual void write(Ostream&) const;
187 };
188 
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 } // End namespace Foam
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 
196 #endif
197 
198 // ************************************************************************* //
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
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:53
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.