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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::turbulentMixingLengthFrequencyInletFvPatchScalarField
28
29Group
30 grpRASBoundaryConditions grpInletBoundaryConditions
31
32Description
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
50Usage
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
68Note
69 In the event of reverse flow, a zero-gradient condition is applied
70
71See also
72 Foam::inletOutletFvPatchField
73
74
75SourceFiles
76 turbulentMixingLengthFrequencyInletFvPatchScalarField.C
77
78\*---------------------------------------------------------------------------*/
79
80#ifndef turbulentMixingLengthFrequencyInletFvPatchScalarField_H
81#define turbulentMixingLengthFrequencyInletFvPatchScalarField_H
82
84
85// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86
87namespace Foam
88{
89
90/*---------------------------------------------------------------------------*\
91 Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration
92\*---------------------------------------------------------------------------*/
93
94class 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
107public:
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 );
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// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
A class for managing temporary objects.
Definition: tmp.H:65
This boundary condition provides a turbulence specific dissipation, (omega) inlet condition based on...
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("turbulentMixingLengthFrequencyInlet")
Runtime type information.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
turbulentMixingLengthFrequencyInletFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73