immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | foam-extend: Open Source CFD
4  \\ / O peration | Version: 3.2
5  \\ / A nd | Web: http://www.foam-extend.org
6  \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9  This file is part of foam-extend.
10 
11  foam-extend is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by the
13  Free Software Foundation, either version 3 of the License, or (at your
14  option) any later version.
15 
16  foam-extend is distributed in the hope that it will be useful, but
17  WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::incompressible::RASModels::
26  immersedBoundaryEpsilonWallFunctionFvPatchScalarField
27 
28 Description
29  Boundary condition for epsilon when using wall functions
30  - calculates y+, G, tangential velocity, nut and k
31  - each of calculated values is handled separately by the appropriate
32  boundary condition
33  - epsilon values added directly into the field to act as a constraint
34 
35 SourceFiles
36  immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef immersedBoundaryEpsilonWallFunctionFvPatchScalarField_H
41 #define immersedBoundaryEpsilonWallFunctionFvPatchScalarField_H
42 
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace incompressible
50 {
51 namespace RASModels
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class immersedBoundaryEpsilonWallFunctionFvPatchScalarField Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
60  public immersedBoundaryWallFunctionFvPatchScalarField
61 {
62  // Private data
63 
64  //- Name of velocity field
65  word UName_;
66 
67  //- Name of turbulence kinetic energy field
68  word kName_;
69 
70  //- Name of turbulence generation field
71  word GName_;
72 
73  //- Name of laminar viscosity field
74  word nuName_;
75 
76  //- Name of turbulent viscosity field
77  word nutName_;
78 
79  //- Cmu coefficient
80  scalar Cmu_;
81 
82  //- Von Karman constant
83  scalar kappa_;
84 
85  //- E coefficient
86  scalar E_;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("immersedBoundaryEpsilonWallFunction");
93 
94 
95  // Constructors
96 
97  //- Construct from patch and internal field
99  (
100  const fvPatch&,
102  );
103 
104  //- Construct from patch, internal field and dictionary
106  (
107  const fvPatch&,
109  const dictionary&
110  );
111 
112  //- Construct by mapping given
113  // immersedBoundaryEpsilonWallFunctionFvPatchScalarField
114  // onto a new patch
116  (
118  const fvPatch&,
120  const fvPatchFieldMapper&
121  );
122 
123  //- Construct as copy
125  (
127  );
128 
129  //- Construct and return a clone
130  virtual tmp<fvPatchScalarField> clone() const
131  {
133  (
135  (
136  *this
137  )
138  );
139  }
140 
141  //- Construct as copy setting internal field reference
143  (
146  );
147 
148  //- Construct and return a clone setting internal field reference
150  (
152  ) const
153  {
155  (
157  (
158  *this,
159  iF
160  )
161  );
162  }
163 
164 
165  //- Destructor
167  {}
168 
169 
170  // Member functions
171 
172  // Evaluation functions
173 
174  //- Update the coefficients associated with the patch field
175  virtual void updateCoeffs();
176 
177  //- Evaluate the patchField
178  virtual void evaluate
179  (
181  );
182 
183 
184  // I-O
185 
186  //- Write
187  void write(Ostream&) const;
188 };
189 
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 } // End namespace RASModels
194 } // End namespace incompressible
195 } // End namespace Foam
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 #endif
200 
201 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::nuName_
word nuName_
Name of laminar viscosity field.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H:72
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::kappa_
scalar kappa_
Von Karman constant.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H:81
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::TypeName
TypeName("immersedBoundaryEpsilonWallFunction")
Runtime type information.
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::GName_
word GName_
Name of turbulence generation field.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H:69
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::UName_
word UName_
Name of velocity field.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H:63
Foam::UPstream::blocking
@ blocking
Definition: UPstream.H:66
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::Cmu_
scalar Cmu_
Cmu coefficient.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H:78
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::~immersedBoundaryEpsilonWallFunctionFvPatchScalarField
virtual ~immersedBoundaryEpsilonWallFunctionFvPatchScalarField()
Destructor.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H:164
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::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::evaluate
virtual void evaluate(const Pstream::commsTypes=Pstream::blocking)
Evaluate the patchField.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C:353
immersedBoundaryWallFunctionFvPatchFields.H
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::E_
scalar E_
E coefficient.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H:84
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C:143
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H:128
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:64
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::immersedBoundaryEpsilonWallFunctionFvPatchScalarField
immersedBoundaryEpsilonWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C:46
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::nutName_
word nutName_
Name of turbulent viscosity field.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H:75
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::kName_
word kName_
Name of turbulence kinetic energy field.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H:66
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField::write
void write(Ostream &) const
Write.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C:365
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::incompressible::RASModels::immersedBoundaryEpsilonWallFunctionFvPatchScalarField
Boundary condition for epsilon when using wall functions.
Definition: immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H:56
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51