FreeFOAM The Cross-Platform CFD Toolkit
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) 2006-2011 OpenCFD Ltd.
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::compressible::turbulentMixingLengthDissipationRateInletFvPatchScalarField
26 
27 Description
28  Calculate epsilon via the mixing length [m]
29 
30  Example of the boundary condition specification:
31  @verbatim
32  inlet
33  {
34  type compressible::turbulentMixingLengthDissipationRateInlet;
35  mixingLength 0.005; // 5 mm
36  value uniform 200; // placeholder
37  }
38  @endverbatim
39 
40 SourceFiles
41  turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef compressibleturbulentMixingLengthDissipationRateInletFvPatchField_H
46 #define compressibleturbulentMixingLengthDissipationRateInletFvPatchField_H
47 
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 namespace compressible
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class turbulentMixingLengthDissipationRateInletFvPatch Declaration
59 \*---------------------------------------------------------------------------*/
60 
62 :
63  public inletOutletFvPatchScalarField
64 {
65  // Private data
66 
67  //- turbulent length scale
68  scalar mixingLength_;
69 
70  //- Name of the flux field
71  word phiName_;
72 
73  //- Name of the turbulent kinetic energy field
74  word kName_;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("compressible::turbulentMixingLengthDissipationRateInlet");
81 
82 
83  // Constructors
84 
85  //- Construct from patch and internal field
87  (
88  const fvPatch&,
90  );
91 
92  //- Construct from patch, internal field and dictionary
94  (
95  const fvPatch&,
97  const dictionary&
98  );
99 
100  //- Construct by mapping given
101  // turbulentMixingLengthDissipationRateInletFvPatchScalarField
102  // onto a new patch
104  (
106  const fvPatch&,
108  const fvPatchFieldMapper&
109  );
110 
111  //- Construct as copy
113  (
115  );
116 
117  //- Construct and return a clone
119  {
121  (
123  (
124  *this
125  )
126  );
127  }
128 
129  //- Construct as copy setting internal field reference
131  (
134  );
135 
136  //- Construct and return a clone setting internal field reference
137  virtual tmp<fvPatchScalarField> clone
138  (
140  ) const
141  {
143  (
145  (
146  *this,
147  iF
148  )
149  );
150  }
151 
152 
153  // Member functions
154 
155  //- Update the coefficients associated with the patch field
156  virtual void updateCoeffs();
157 
158  //- Write
159  virtual void write(Ostream&) const;
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace compressible
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************ vim: set sw=4 sts=4 et: ************************ //