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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField
28 
29 Group
30  grpRASBoundaryConditions grpInletBoundaryConditions
31 
32 Description
33  This boundary condition provides a turbulence specific dissipation,
34  \f$\omega\f$ (omega) inlet condition based on a specified mixing length.
35  The patch values are calculated using:
36 
37  \f[
38  \omega_p = \frac{k^{0.5}}{C_{\mu}^{0.25} L}
39  \f]
40 
41  where
42 
43  \vartable
44  \omega_p | patch omega values
45  C_{\mu} | Model coefficient, set to 0.09
46  k | turbulence kinetic energy
47  L | length scale
48  \endvartable
49 
50 Usage
51  \table
52  Property | Description | Required | Default value
53  mixingLength | Length scale [m] | yes |
54  phi | flux field name | no | phi
55  k | turbulence kinetic energy field name | no | k
56  \endtable
57 
58  Example of the boundary condition specification:
59  \verbatim
60  <patchName>
61  {
62  type turbulentMixingLengthFrequencyInlet;
63  mixingLength 0.005;
64  value uniform 200; // placeholder
65  }
66  \endverbatim
67 
68 Note
69  In the event of reverse flow, a zero-gradient condition is applied
70 
71 See also
72  Foam::inletOutletFvPatchField
73 
74 
75 SourceFiles
76  turbulentMixingLengthFrequencyInletFvPatchScalarField.C
77 
78 \*---------------------------------------------------------------------------*/
79 
80 #ifndef turbulentMixingLengthFrequencyInletFvPatchScalarField_H
81 #define turbulentMixingLengthFrequencyInletFvPatchScalarField_H
82 
84 
85 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86 
87 namespace Foam
88 {
89 
90 /*---------------------------------------------------------------------------*\
91  Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration
92 \*---------------------------------------------------------------------------*/
93 
94 class turbulentMixingLengthFrequencyInletFvPatchScalarField
95 :
96  public inletOutletFvPatchScalarField
97 {
98  // Private data
99 
100  //- Turbulent length scale
101  scalar mixingLength_;
102 
103  //- Name of the turbulent kinetic energy field
104  word kName_;
105 
106 
107 public:
108 
109  //- Runtime type information
110  TypeName("turbulentMixingLengthFrequencyInlet");
111 
112 
113  // Constructors
114 
115  //- Construct from patch and internal field
117  (
118  const fvPatch&,
119  const DimensionedField<scalar, volMesh>&
120  );
121 
122  //- Construct from patch, internal field and dictionary
124  (
125  const fvPatch&,
126  const DimensionedField<scalar, volMesh>&,
127  const dictionary&
128  );
129 
130  //- Construct by mapping given
131  // turbulentMixingLengthFrequencyInletFvPatchScalarField
132  // onto a new patch
134  (
136  const fvPatch&,
138  const fvPatchFieldMapper&
139  );
140 
141  //- Construct as copy
143  (
145  );
146 
147  //- Construct and return a clone
148  virtual tmp<fvPatchScalarField> clone() const
149  {
151  (
153  (
154  *this
155  )
156  );
157  }
158 
159  //- Construct as copy setting internal field reference
161  (
164  );
165 
166  //- Construct and return a clone setting internal field reference
168  (
170  ) const
171  {
173  (
175  (
176  *this,
177  iF
178  )
179  );
180  }
181 
182 
183  // Member functions
184 
185  //- Update the coefficients associated with the patch field
186  virtual void updateCoeffs();
187 
188  //- Write
189  virtual void write(Ostream&) const;
190 };
191 
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 } // End namespace Foam
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 #endif
200 
201 // ************************************************************************* //
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.C:156
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::turbulentMixingLengthFrequencyInletFvPatchScalarField
turbulentMixingLengthFrequencyInletFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.C:45
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField
This boundary condition provides a turbulence specific dissipation, (omega) inlet condition based on...
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.H:129
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.H:183
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.C:120
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::TypeName
TypeName("turbulentMixingLengthFrequencyInlet")
Runtime type information.
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
inletOutletFvPatchFields.H
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54