Loading...
Searching...
No Matches
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
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&,
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 as copy setting internal field reference
149 (
152 );
153
154 //- Return a clone
155 virtual tmp<fvPatchField<scalar>> clone() const
156 {
157 return fvPatchField<scalar>::Clone(*this);
158 }
159
160 //- Clone with an internal field reference
162 (
164 ) const
165 {
166 return fvPatchField<scalar>::Clone(*this, iF);
167 }
168
169
170 // Member functions
171
172 //- Update the coefficients associated with the patch field
173 virtual void updateCoeffs();
174
175 //- Write
176 virtual void write(Ostream&) const;
177};
178
179
180// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181
182} // End namespace Foam
183
184// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185
186#endif
187
188// ************************************************************************* //
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:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
A class for managing temporary objects.
Definition tmp.H:75
This boundary condition provides a turbulence specific dissipation, (omega) inlet condition based on...
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
TypeName("turbulentMixingLengthFrequencyInlet")
Runtime type information.
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:66
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68