sector.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-2015 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::extrudeModels::sector
29 
30 Description
31  Extrudes by rotating a surface around an axis
32  - extrusion is opposite the surface/patch normal so inwards the source
33  mesh
34  - axis direction has to be consistent with this.
35  - use -mergeFaces option if doing full 360 and want to merge front and back
36  - note direction of axis. This should be consistent with rotating against
37  the patch normal direction. If you get it wrong you'll see all cells
38  with extreme aspect ratio and internal faces wrong way around in
39  checkMesh
40 
41  The sectorCoeffs dictionary entries
42  \table
43  Property | Description | Required | Default
44  point | A point on the axis | yes |
45  axis | Axis direction, normalized on input | yes |
46  angle | Sector angle (degrees) | yes |
47  \endtable
48 
49 Note
50  For compatibility, accepts the entry \c axisPt (1812 and earlier)
51  as equivalent to \c point.
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef sector_H
56 #define sector_H
57 
58 #include "extrudeModel.H"
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 namespace extrudeModels
65 {
66 
67 /*---------------------------------------------------------------------------*\
68  Class extrudeModels::sector Declaration
69 \*---------------------------------------------------------------------------*/
70 
71 class sector
72 :
73  public extrudeModel
74 {
75  // Private data
76 
77  //- Point on axis
78  const point refPoint_;
79 
80  //- Normalized axis direction
81  const vector axis_;
82 
83  //- Overall angle (radians), converted from degrees on input
84  const scalar angle_;
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("sector");
91 
92  // Constructors
93 
94  //- Construct from dictionary
95  explicit sector(const dictionary& dict);
96 
97 
98  //- Destructor
99  virtual ~sector() = default;
100 
101 
102  // Member Operators
103 
104  //- Return corresponding point
105  point operator()
106  (
107  const point& surfacePoint,
108  const vector& surfaceNormal,
109  const label layer
110  ) const;
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace extrudeModels
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
Foam::extrudeModels::sector::~sector
virtual ~sector()=default
Destructor.
Foam::extrudeModel
Top level extrusion model class.
Definition: extrudeModel.H:76
Foam::extrudeModels::sector
Extrudes by rotating a surface around an axis.
Definition: sector.H:90
Foam::extrudeModels::sector::TypeName
TypeName("sector")
Runtime type information.
extrudeModel.H
Foam::extrudeModels::sector::sector
sector(const dictionary &dict)
Construct from dictionary.
Definition: sector.C:49
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
Foam::Vector
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Definition: Vector.H:62
Foam::point
vector point
Point is a vector.
Definition: point.H:43