FvWallInfoYPlus.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
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::FvWallInfoYPlus
26 
27 Description
28  Holds information (coordinate and yStar) regarding nearest wall point.
29 
30  Used in VanDriest wall damping where the interest is in y+ but only
31  needs to be calculated up to e.g. y+ < 200. In all other cells/faces
32  the damping function becomes 1, since y gets initialised to great and
33  yStar to 1.
34 
35 SourceFiles
36  FvWallInfoYPlusI.H
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef FvWallInfoYPlus_H
41 #define FvWallInfoYPlus_H
42 
43 #include "FvWallInfoData.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class FvWallInfoYPlusBase Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 template<class WallInfo, class Derived>
56 :
57  public FvWallInfoDataBase<WallInfo, scalar, Derived>
58 {
59 public:
60 
61  //- Class used to pass additional data in
62  class trackData
63  {
64  public:
65 
66  //- Cut off distance
67  scalar yPlusCutOff;
68  };
69 
70 
71 protected:
72 
73  friend class FvWallInfoBase<WallInfo, Derived>;
74 
75 
76  // Protected Member Functions
77 
78  //- Evaluate distance to point. Update distSqr, origin from whomever
79  // is nearer pt. Return true if w2 is closer to point,
80  // false otherwise.
81  template<class TrackingData>
82  inline bool update
83  (
84  const point& pt,
86  const scalar tol,
87  TrackingData& td
88  );
89 
90 
91 public:
92 
93  // Constructors
94 
95  //- Construct null
96  inline FvWallInfoYPlusBase();
97 
98  //- Inherit constructors
100 };
101 
102 
103 /*---------------------------------------------------------------------------*\
104  Class FvWallInfoYPlus Declaration
105 \*---------------------------------------------------------------------------*/
106 
107 template<class WallInfo>
108 class FvWallInfoYPlus
109 :
110  public FvWallInfoYPlusBase<WallInfo, FvWallInfoYPlus<WallInfo>>
111 {
112  public:
113 
114  using
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #include "FvWallInfoYPlusI.H"
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
bool update(const point &pt, const FvWallInfoYPlusBase< WallInfo, Derived > &w2, const scalar tol, TrackingData &td)
Evaluate distance to point. Update distSqr, origin from whomever.
Holds information (coordinate and yStar) regarding nearest wall point.
scalar yPlusCutOff
Cut off distance.
#define w2
Definition: blockCreate.C:32
FvWallInfoYPlusBase()
Construct null.
Namespace for OpenFOAM.
Class used to pass additional data in.