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) 2011-2013 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::turbulentMixingLengthFrequencyInletFvPatchScalarField
26 
27 Group
28  grpRASBoundaryConditions grpInletBoundaryConditions
29 
30 Description
31  This boundary condition provides a turbulence specific dissipation,
32  \f$\omega\f$ (omega) inlet condition based on a specified mixing length.
33  The patch values are calculated using:
34 
35  \f[
36  \omega_p = \frac{k^{0.5}}{C_{\mu}^{0.25} L}
37  \f]
38 
39  where
40 
41  \vartable
42  \omega_p | patch omega values
43  C_{\mu} | Model coefficient, set to 0.09
44  k | turbulence kinetic energy
45  L | length scale
46  \endvartable
47 
48  \heading Patch usage
49 
50  \table
51  Property | Description | Required | Default value
52  mixingLength | Length scale [m] | yes |
53  phi | flux field name | no | phi
54  k | turbulence kinetic energy field name | no | k
55  \endtable
56 
57  Example of the boundary condition specification:
58  \verbatim
59  myPatch
60  {
61  type turbulentMixingLengthFrequencyInlet;
62  mixingLength 0.005;
63  value uniform 200; // placeholder
64  }
65  \endverbatim
66 
67 Note
68  In the event of reverse flow, a zero-gradient condition is applied
69 
70 SeeAlso
71  Foam::inletOutletFvPatchField
72 
73 
74 SourceFiles
75  turbulentMixingLengthFrequencyInletFvPatchScalarField.C
76 
77 \*---------------------------------------------------------------------------*/
78 
79 #ifndef turbulentMixingLengthFrequencyInletFvPatchScalarField_H
80 #define turbulentMixingLengthFrequencyInletFvPatchScalarField_H
81 
83 
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85 
86 namespace Foam
87 {
88 
89 /*---------------------------------------------------------------------------*\
90  Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration
91 \*---------------------------------------------------------------------------*/
92 
93 class turbulentMixingLengthFrequencyInletFvPatchScalarField
94 :
95  public inletOutletFvPatchScalarField
96 {
97  // Private data
98 
99  //- Turbulent length scale
100  scalar mixingLength_;
101 
102  //- Name of the turbulent kinetic energy field
103  word kName_;
104 
105 
106 public:
107 
108  //- Runtime type information
109  TypeName("turbulentMixingLengthFrequencyInlet");
110 
111 
112  // Constructors
113 
114  //- Construct from patch and internal field
116  (
117  const fvPatch&,
118  const DimensionedField<scalar, volMesh>&
119  );
120 
121  //- Construct from patch, internal field and dictionary
123  (
124  const fvPatch&,
125  const DimensionedField<scalar, volMesh>&,
126  const dictionary&
127  );
128 
129  //- Construct by mapping given
130  // turbulentMixingLengthFrequencyInletFvPatchScalarField
131  // onto a new patch
133  (
135  const fvPatch&,
137  const fvPatchFieldMapper&
138  );
139 
140  //- Construct as copy
142  (
144  );
145 
146  //- Construct and return a clone
147  virtual tmp<fvPatchScalarField> clone() const
148  {
150  (
152  (
153  *this
154  )
155  );
156  }
157 
158  //- Construct as copy setting internal field reference
160  (
163  );
164 
165  //- Construct and return a clone setting internal field reference
167  (
169  ) const
170  {
172  (
174  (
175  *this,
176  iF
177  )
178  );
179  }
180 
181 
182  // Member functions
183 
184  //- Update the coefficients associated with the patch field
185  virtual void updateCoeffs();
186 
187  //- Write
188  virtual void write(Ostream&) const;
189 };
190 
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 } // End namespace Foam
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 #endif
199 
200 // ************************************************************************* //
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.C:153
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::turbulentMixingLengthFrequencyInletFvPatchScalarField
turbulentMixingLengthFrequencyInletFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.C:42
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::kName_
word kName_
Name of the turbulent kinetic energy field.
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.H:138
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField
This boundary condition provides a turbulence specific dissipation, (omega) inlet condition based on...
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.H:128
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::mixingLength_
scalar mixingLength_
Turbulent length scale.
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.H:135
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.H:182
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: turbulentMixingLengthFrequencyInletFvPatchScalarField.C:117
Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField::TypeName
TypeName("turbulentMixingLengthFrequencyInlet")
Runtime type information.
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
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:51