OpenFOAM: API Guide
v2112
The open source CFD toolbox
wallDistData.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
-------------------------------------------------------------------------------
10
License
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
26
Class
27
Foam::wallDistData
28
29
Description
30
Wall distance calculation. Like wallDist but also transports extra
31
data (template argument).
32
33
Used for e.g reflection vector calculation or vanDriest damping.
34
35
Templated on two parameters:
36
- TransferType: type of overall data transported
37
(e.g. wallPointData<vector>)
38
39
SourceFiles
40
wallDistData.C
41
42
\*---------------------------------------------------------------------------*/
43
44
#ifndef wallDistData_H
45
#define wallDistData_H
46
47
#include "
cellDistFuncs.H
"
48
#include "
volFields.H
"
49
50
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52
namespace
Foam
53
{
54
55
/*---------------------------------------------------------------------------*\
56
Class wallDistData Declaration
57
\*---------------------------------------------------------------------------*/
58
59
template
<
class
TransferType>
60
class
wallDistData
61
:
62
public
volScalarField
,
63
public
cellDistFuncs
64
{
65
66
private
:
67
68
typedef
typename
TransferType::dataType Type;
69
70
71
// Private Member Data
72
73
//- Reference to field whose data to use (on walls) and update
74
// (every cell and non-wall face)
75
GeometricField<Type, fvPatchField, volMesh>
& field_;
76
77
//- Do accurate distance calculation for near-wall cells.
78
bool
correctWalls_;
79
80
//- Number of unset cells and faces.
81
label nUnset_;
82
83
84
// Private Member Functions
85
86
//- No copy construct
87
wallDistData
(
const
wallDistData
&) =
delete
;
88
89
//- No copy assignment
90
void
operator=(
const
wallDistData
&) =
delete
;
91
92
93
public
:
94
95
// Constructors
96
97
//- Construct from mesh and flag whether or not to correct wall.
98
// Calculate for all cells. correctWalls : correct wall (face&point)
99
// cells for correct distance, searching neighbours.
100
wallDistData
101
(
102
const
fvMesh
&
mesh
,
103
GeometricField<Type, fvPatchField, volMesh>
&,
104
bool
correctWalls =
true
105
);
106
107
108
//- Destructor
109
virtual
~wallDistData
();
110
111
112
// Member Functions
113
114
const
volScalarField
&
y
()
const
115
{
116
return
*
this
;
117
}
118
119
label
nUnset
()
const
120
{
121
return
nUnset_;
122
}
123
124
//- Access field
125
const
GeometricField<Type, fvPatchField, volMesh>
&
data
()
const
126
{
127
return
field_;
128
}
129
130
//- Correct for mesh geom/topo changes
131
virtual
void
correct
();
132
};
133
134
135
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137
}
// End namespace Foam
138
139
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141
#ifdef NoRepository
142
#include "
wallDistData.C
"
143
#endif
144
145
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147
#endif
148
149
// ************************************************************************* //
volFields.H
Foam::wallDistData::nUnset
label nUnset() const
Definition:
wallDistData.H:118
cellDistFuncs.H
Foam::wallDistData::y
const volScalarField & y() const
Definition:
wallDistData.H:113
Foam::wallDistData
Wall distance calculation. Like wallDist but also transports extra data (template argument).
Definition:
wallDistData.H:59
Foam::wallDistData::correct
virtual void correct()
Correct for mesh geom/topo changes.
Definition:
wallDistData.C:74
Foam::wallDistData::data
const GeometricField< Type, fvPatchField, volMesh > & data() const
Access field.
Definition:
wallDistData.H:124
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition:
fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::cellDistFuncs::mesh
const polyMesh & mesh() const
Access mesh.
Definition:
cellDistFuncs.H:92
wallDistData.C
Foam::cellDistFuncs
Collection of functions used in wall distance calculation.
Definition:
cellDistFuncs.H:63
Foam::wallDistData::~wallDistData
virtual ~wallDistData()
Destructor.
Definition:
wallDistData.C:67
Foam::GeometricField< scalar, fvPatchField, volMesh >
src
finiteVolume
fvMesh
wallDist
patchDistMethods
meshWave
wallDistData
wallDistData.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.