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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::turbulentMixingLengthDissipationRateInletFvPatchScalarField
29
30Group
31 grpRASBoundaryConditions grpInletBoundaryConditions
32
33Description
34 This boundary condition provides an inlet condition for turbulent kinetic
35 energy dissipation rate, i.e. \c epsilon, based on a specified mixing
36 length. The patch values are calculated using:
37
38 \f[
39 \epsilon_p = \frac{C_{\mu}^{0.75} k^{1.5}}{L}
40 \f]
41
42 where
43 \vartable
44 \epsilon_p | Patch epsilon values [m2/s3]
45 C_\mu | Empirical model constant retrived from turbulence model
46 k | Turbulent kinetic energy [m2/s2]
47 L | Mixing length scale [m]
48 \endvartable
49
50Usage
51 Example of the boundary condition specification:
52 \verbatim
53 <patchName>
54 {
55 // Mandatory entries (unmodifiable)
56 type turbulentMixingLengthDissipationRateInlet;
57
58 // Mandatory entries (runtime modifiable)
59 mixingLength 0.005;
60
61 // Optional entries (runtime modifiable)
62 Cmu 0.09;
63 k k;
64 phi phi;
65
66 // Placeholder
67 value uniform 200;
68 }
69 \endverbatim
70
71 where the entries mean:
72 \table
73 Property | Description | Type | Req'd | Dflt
74 mixingLength | Mixing length scale [m] | scalar | yes | -
75 Cmu | Empirical model constant | scalar | no | 0.09
76 phi | Name of flux field | word | no | phi
77 k | Name of turbulent kinetic energy field | word | no | k
78 \endtable
79
80Note
81 - The boundary condition is derived from \c inletOutlet condition.
82 Therefore, in the event of reverse flow, a zero-gradient condition
83 is applied.
84 - The order of precedence to input the empirical model constant \c Cmu is:
85 turbulence model, boundary condition dictionary, and default value=0.09.
86 - The empirical model constant \c Cmu is not a spatiotemporal variant field.
87 Therefore, the use of the boundary condition may not be fully consistent
88 with the turbulence models where \c Cmu is a variant field, such as
89 \c realizableKE closure model in this respect. Nevertheless, workflow
90 observations suggest that the matter poses no importance.
91
92See also
93 Foam::inletOutletFvPatchField
94
95SourceFiles
96 turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
97
98\*---------------------------------------------------------------------------*/
99
100#ifndef turbulentMixingLengthDissipationRateInletFvPatchScalarField_H
101#define turbulentMixingLengthDissipationRateInletFvPatchScalarField_H
102
104
105// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106
107namespace Foam
108{
109
110/*---------------------------------------------------------------------------*\
111 Class turbulentMixingLengthDissipationRateInletFvPatchScalarField Declaration
112\*---------------------------------------------------------------------------*/
113
114class turbulentMixingLengthDissipationRateInletFvPatchScalarField
115:
116 public inletOutletFvPatchScalarField
117{
118 // Private Data
119
120 //- Name of the turbulent kinetic energy field
121 word kName_;
122
123 //- Mixing length scale
124 scalar mixingLength_;
125
126 //- Empirical model constant
127 scalar Cmu_;
128
129
130public:
131
132 //- Runtime type information
133 TypeName("turbulentMixingLengthDissipationRateInlet");
134
135
136 // Constructors
137
138 //- Construct from patch and internal field
140 (
141 const fvPatch&,
142 const DimensionedField<scalar, volMesh>&
143 );
144
145 //- Construct from patch, internal field and dictionary
147 (
148 const fvPatch&,
149 const DimensionedField<scalar, volMesh>&,
150 const dictionary&
151 );
152
153 //- Construct by mapping given
154 //- turbulentMixingLengthDissipationRateInletFvPatchScalarField
155 //- onto a new patch
157 (
158 const turbulentMixingLengthDissipationRateInletFvPatchScalarField&,
159 const fvPatch&,
161 const fvPatchFieldMapper&
162 );
163
164 //- Construct as copy
166 (
168 );
169
170 //- Construct and return a clone
171 virtual tmp<fvPatchScalarField> clone() const
172 {
174 (
176 (
177 *this
179 );
180 }
181
182 //- Construct as copy setting internal field reference
184 (
187 );
188
189 //- Construct and return a clone setting internal field reference
191 (
193 ) const
194 {
196 (
198 (
199 *this,
200 iF
201 )
202 );
203 }
204
205
206 // Member Functions
207
208 //- Update the coefficients associated with the patch field
209 virtual void updateCoeffs();
210
211 //- Write
212 virtual void write(Ostream&) const;
213};
214
215
216// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217
218} // End namespace Foam
219
220// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221
222#endif
223
224// ************************************************************************* //
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 an inlet condition for turbulent kinetic energy dissipation rate,...
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("turbulentMixingLengthDissipationRateInlet")
Runtime type information.
turbulentMixingLengthDissipationRateInletFvPatchScalarField(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