FreeFOAM The Cross-Platform CFD Toolkit
epsilonWallFunctionFvPatchScalarField.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) 2008-2010 OpenCFD Ltd.
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::compressible::RASModels::epsilonWallFunctionFvPatchScalarField
26 
27 Description
28  Boundary condition for epsilon when using wall functions
29  - calculates epsilon and G
30  - epsilon values added directly into the matrix to act as a constraint
31 
32 SourceFiles
33  epsilonWallFunctionFvPatchScalarField.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef compressibleEpsilonWallFunctionFvPatchScalarField_H
38 #define compressibleEpsilonWallFunctionFvPatchScalarField_H
39 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace compressible
47 {
48 namespace RASModels
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class epsilonWallFunctionFvPatchScalarField Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public fixedInternalValueFvPatchField<scalar>
58 {
59  // Private data
60 
61  //- Name of velocity field
62  word UName_;
63 
64  //- Name of turbulence kinetic energy field
65  word kName_;
66 
67  //- Name of turbulence generation field
68  word GName_;
69 
70  //- Name of laminar viscosity field
71  word muName_;
72 
73  //- Name of turbulent viscosity field
74  word mutName_;
75 
76  //- Cmu coefficient
77  scalar Cmu_;
78 
79  //- Von Karman constant
80  scalar kappa_;
81 
82  //- E coefficient
83  scalar E_;
84 
85 
86  // Private member functions
87 
88  //- Check the type of the patch
89  void checkType();
90 
91 
92 public:
93 
94  //- Runtime type information
95  TypeName("compressible::epsilonWallFunction");
96 
97 
98  // Constructors
99 
100  //- Construct from patch and internal field
102  (
103  const fvPatch&,
105  );
106 
107  //- Construct from patch, internal field and dictionary
109  (
110  const fvPatch&,
112  const dictionary&
113  );
114 
115  //- Construct by mapping given
116  // epsilonWallFunctionFvPatchScalarField
117  // onto a new patch
119  (
121  const fvPatch&,
123  const fvPatchFieldMapper&
124  );
125 
126  //- Construct as copy
128  (
130  );
131 
132  //- Construct and return a clone
134  {
136  (
138  );
139  }
140 
141  //- Construct as copy setting internal field reference
143  (
146  );
147 
148  //- Construct and return a clone setting internal field reference
149  virtual tmp<fvPatchScalarField> clone
150  (
152  ) const
153  {
155  (
157  );
158  }
159 
160 
161  // Member functions
162 
163  // Evaluation functions
164 
165  //- Update the coefficients associated with the patch field
166  virtual void updateCoeffs();
167 
168  //- Evaluate the patchField
169  virtual void evaluate(const Pstream::commsTypes);
170 
171 
172  // I-O
173 
174  //- Write
175  void write(Ostream&) const;
176 };
177 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace RASModels
182 } // End namespace compressible
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************ vim: set sw=4 sts=4 et: ************************ //