FreeFOAM The Cross-Platform CFD Toolkit
turbulentMixingLengthFrequencyInletFvPatchScalarField.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::incompressible::turbulentMixingLengthFrequencyInletFvPatchScalarField
26 
27 Description
28  Calculate omega via the mixing length
29 
30  Example of the boundary condition specification:
31  @verbatim
32  inlet
33  {
34  type turbulentMixingLengthFrequencyInlet;
35  mixingLength 0.005; // 5 mm
36  k k; // turbulent k field
37  value uniform 5; // initial value
38  }
39  @endverbatim
40 
41 SourceFiles
42  turbulentMixingLengthFrequencyInletFvPatchScalarField.C
43 
44 \*---------------------------------------------------------------------------*/
45 
46 #ifndef incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
47 #define incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H
48 
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 namespace incompressible
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration
60 \*---------------------------------------------------------------------------*/
61 
63 :
64  public inletOutletFvPatchScalarField
65 {
66  // Private data
67 
68  //- Turbulent length scale
69  scalar mixingLength_;
70 
71  //- Name of the flux field
72  word phiName_;
73 
74  //- Name of the turbulent kinetic energy field
75  word kName_;
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("turbulentMixingLengthFrequencyInlet");
82 
83 
84  // Constructors
85 
86  //- Construct from patch and internal field
88  (
89  const fvPatch&,
91  );
92 
93  //- Construct from patch, internal field and dictionary
95  (
96  const fvPatch&,
98  const dictionary&
99  );
100 
101  //- Construct by mapping given
102  // turbulentMixingLengthFrequencyInletFvPatchScalarField
103  // onto a new patch
105  (
107  const fvPatch&,
109  const fvPatchFieldMapper&
110  );
111 
112  //- Construct as copy
114  (
116  );
117 
118  //- Construct and return a clone
120  {
122  (
124  (
125  *this
126  )
127  );
128  }
129 
130  //- Construct as copy setting internal field reference
132  (
135  );
136 
137  //- Construct and return a clone setting internal field reference
139  (
141  ) const
142  {
144  (
146  (
147  *this,
148  iF
149  )
150  );
151  }
152 
153 
154  // Member functions
155 
156  //- Update the coefficients associated with the patch field
157  virtual void updateCoeffs();
158 
159  //- Write
160  virtual void write(Ostream&) const;
161 };
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace incompressible
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************ vim: set sw=4 sts=4 et: ************************ //