OpenFOAM: API Guide
v2112
The open source CFD toolbox
cutFace.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) 2016-2017 DHI
9
Copyright (C) 2018-2019 Johan Roenby
10
Copyright (C) 2019-2020 DLR
11
-------------------------------------------------------------------------------
12
License
13
This file is part of OpenFOAM.
14
15
OpenFOAM is free software: you can redistribute it and/or modify it
16
under the terms of the GNU General Public License as published by
17
the Free Software Foundation, either version 3 of the License, or
18
(at your option) any later version.
19
20
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
21
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23
for more details.
24
25
You should have received a copy of the GNU General Public License
26
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
27
28
Class
29
Foam::cutFace
30
31
Description
32
Base class for cutting a face, faceI, of an fvMesh, mesh_, at its
33
intersections
34
35
Original code supplied by
36
Johan Roenby, DHI (2016)
37
Henning Scheufler, DLR (2019)
38
39
SourceFiles
40
cutFace.C
41
42
\*---------------------------------------------------------------------------*/
43
44
#ifndef cutFace_H
45
#define cutFace_H
46
47
#include "
fvMesh.H
"
48
#include "
surfaceFields.H
"
49
#include "
volFields.H
"
50
51
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53
namespace
Foam
54
{
55
56
/*---------------------------------------------------------------------------*\
57
Class cutFaces Declaration
58
\*---------------------------------------------------------------------------*/
59
60
class
cutFace
61
{
62
// Private Data
63
64
//- Reference to mesh
65
const
fvMesh
& mesh_;
66
67
68
protected
:
69
70
//- Calculate cut points along edges of face with pointStatus, pointfield
71
//- and computes geometric information and the face status where:
72
// - -1: faceStatus is fully below the isosurface
73
// - 0: faceStatus is cut (has values larger and smaller than isoValue)
74
// - +1: faceStatus is fully above the isosurface
75
void
calcSubFace
76
(
77
const
label faceI,
78
const
scalarList
& pointStatus,
79
label firstFullySubmergedPoint,
80
DynamicList<point>
& subFacePoints,
81
DynamicList<point>
& surfacePoints,
82
label& faceStatus,
83
vector
& subFaceCentre,
84
vector
& subFaceArea
85
);
86
87
//- Calculate cut points along edges of face with pointStatus, pointfield,
88
//- weights and computes geometric information and the face status where:
89
// - -1: faceStatus is fully below the isosurface
90
// - 0: faceStatus is cut (has values larger and smaller than isoValue)
91
// - +1: faceStatus is fully above the isosurface
92
void
calcSubFace
93
(
94
const
label faceI,
95
const
scalarList
& pointStatus,
96
const
scalarList
& weights,
97
label firstFullySubmergedPoint,
98
DynamicList<point>
& subFacePoints,
99
DynamicList<point>
& surfacePoints,
100
label& faceStatus,
101
vector
& subFaceCentre,
102
vector
& subFaceArea
103
);
104
105
//- Calculates centre and normal of the face
106
void
calcSubFaceCentreAndArea
107
(
108
DynamicList<point>
& subFacePoints,
109
vector
& subFaceCentre,
110
vector
& subFaceArea
111
);
112
113
//- Calculate cut points along edges of face with pointStatus, pointfield
114
//- and computes geometric information and the face status where:
115
// - -1: faceStatus is fully below the isosurface
116
// - 0: faceStatus is cut (has values larger and smaller than isoValue)
117
// - +1: faceStatus is fully above the isosurface
118
void
calcSubFace
119
(
120
const
face
&
f
,
121
const
pointField
&
points
,
122
const
scalarList
& pointStatus,
123
label firstFullySubmergedPoint,
124
DynamicList<point>
& subFacePoints,
125
DynamicList<point>
& surfacePoints,
126
label& faceStatus,
127
vector
& subFaceCentre,
128
vector
& subFaceArea
129
);
130
131
132
public
:
133
134
// Static Data
135
static
int
debug
;
136
137
138
// Constructors
139
140
//- Construct from fvMesh
141
explicit
cutFace
(
const
fvMesh
&
mesh
);
142
};
143
144
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146
}
// End namespace Foam
147
148
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150
#endif
151
152
// ************************************************************************* //
volFields.H
Foam::DynamicList< point >
surfaceFields.H
Foam::surfaceFields.
Foam::Field< vector >
Foam::cutFace::cutFace
cutFace(const fvMesh &mesh)
Construct from fvMesh.
Definition:
cutFace.C:332
mesh
dynamicFvMesh & mesh
Definition:
createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition:
fvMesh.H:85
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::cutFace
Base class for cutting a face, faceI, of an fvMesh, mesh_, at its intersections.
Definition:
cutFace.H:59
f
labelList f(nPoints)
Foam::cutFace::calcSubFace
void calcSubFace(const label faceI, const scalarList &pointStatus, label firstFullySubmergedPoint, DynamicList< point > &subFacePoints, DynamicList< point > &surfacePoints, label &faceStatus, vector &subFaceCentre, vector &subFaceArea)
Definition:
cutFace.C:39
Foam::Vector< scalar >
Foam::cutFace::debug
static int debug
Definition:
cutFace.H:134
Foam::List< scalar >
points
const pointField & points
Definition:
gmvOutputHeader.H:1
Foam::face
A face is a list of labels corresponding to mesh vertices.
Definition:
face.H:72
Foam::cutFace::calcSubFaceCentreAndArea
void calcSubFaceCentreAndArea(DynamicList< point > &subFacePoints, vector &subFaceCentre, vector &subFaceArea)
Calculates centre and normal of the face.
Definition:
cutFace.C:265
src
transportModels
geometricVoF
cellCuts
cutFace
cutFace.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.