Documentation 6b54b78464
Loading...
Searching...
No Matches
CTurboVertex.hpp
Go to the documentation of this file.
1/*!
2 * \file CTurboVertex.hpp
3 * \brief Headers of the main subroutines for doing the complete dual grid structure.
4 * The subroutines and functions are in the <i>CTurboVertex.cpp</i> file.
5 * \author F. Palacios, T. Economon
6 * \version 8.5.0 "Harrier"
7 *
8 * SU2 Project Website: https://su2code.github.io
9 *
10 * The SU2 Project is maintained by the SU2 Foundation
11 * (http://su2foundation.org)
12 *
13 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
14 *
15 * SU2 is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 2.1 of the License, or (at your option) any later version.
19 *
20 * SU2 is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
27 */
28
29#pragma once
30
31#include "CVertex.hpp"
32
33/*!
34 * \class CTurboVertex
35 * \brief Class for vertex definition for turbomachinery (equivalent to edges, but for the boundaries).
36 * \author S. Vitale
37 */
38class CTurboVertex final : public CVertex {
39 private:
40 su2double* TurboNormal; /*!< \brief Normal for computing correct turbomachinery quantities. */
41 su2double Area; /*!< \brief Value of the face area associated to the vertex */
42 // su2double PitchCoord; /*!< \brief Value of the abscissa pitch wise */
43 su2double AngularCoord; /*!< \brief Value of the angular coordinate */
44 su2double DeltaAngularCoord; /*!< \brief Value of the angular coordinate w.r.t. the minimum pitch point */
45 su2double RelAngularCoord; /*!< \brief Value of the angular coordinate w.r.t. the minimum pitch point */
46
47 unsigned long OldVertex; /*!< \brief Value of the vertex numeration before the ordering */
48 int GlobalIndex; /*!< \brief Value of the vertex numeration after the ordering and global with respect to MPI
49 partinioning */
50
51 public:
52 /*!
53 * \brief Constructor of the class.
54 * \param[in] val_point - Node of the vertex.
55 * \param[in] val_nDim - Number of dimensions of the problem.
56 */
57 CTurboVertex(unsigned long val_point, unsigned short val_nDim);
58
59 /*!
60 * \brief Destructor of the class.
61 */
62 ~CTurboVertex(void) override;
63
64 /*!
65 * \brief set Normal in the turbomachinery frame of reference.
66 * \param[in] val_normal - normal vector.
67 */
68 inline void SetTurboNormal(const su2double* val_normal) {
69 unsigned short iDim;
70 for (iDim = 0; iDim < nDim; iDim++) TurboNormal[iDim] = val_normal[iDim];
71 }
72
73 /*!
74 * \brief set face Area.
75 * \param[in] val_area - value of the face area.
76 */
77 inline void SetArea(su2double val_area) { Area = val_area; }
78
79 /*!
80 * \brief get face Area associate to the vertex.
81 */
82 inline su2double GetArea(void) const { return Area; }
83
84 /*!
85 * \brief Copy the the turbo normal vector of a face.
86 * \param[in] val_normal - Vector where the subroutine is goint to copy the normal (dimensionaless).
87 */
88 inline void GetTurboNormal(su2double* val_normal) const {
89 for (unsigned short iDim = 0; iDim < nDim; iDim++) val_normal[iDim] = TurboNormal[iDim];
90 }
91
92 /*!
93 * \brief Get the turbo normal to a face where turboperformance are computed .
94 * \return Dimensionaless normal vector, the modulus is the area of the face.
95 */
96 inline su2double* GetTurboNormal(void) { return TurboNormal; }
97
98 /*!
99 * \brief set vertex value not ordered.
100 * \param[in] val_vertex - value of the vertex before ordering.
101 */
102 inline void SetOldVertex(unsigned long val_vertex) { OldVertex = val_vertex; }
103
104 /*!
105 * \brief retrieve vertex value not ordered.
106 */
107 inline unsigned long GetOldVertex(void) const { return OldVertex; }
108
109 /*!
110 * \brief set global index for ordered span-wise turbovertex.
111 */
112 inline void SetGlobalVertexIndex(int globalindex) { GlobalIndex = globalindex; }
113
114 /*!
115 * \brief get global index for ordered span-wise turbovertex.
116 */
117 inline int GetGlobalVertexIndex(void) const { return GlobalIndex; }
118
119 /*!
120 * \brief set angular coord.
121 */
122 inline void SetAngularCoord(su2double angCoord) { AngularCoord = angCoord; }
123
124 /*!
125 * \brief get angular coord.
126 */
127 inline su2double GetAngularCoord(void) const { return AngularCoord; }
128
129 /*!
130 * \brief set angular coord.
131 */
132 inline void SetDeltaAngularCoord(su2double deltaAngCoord) { DeltaAngularCoord = deltaAngCoord; }
133
134 /*!
135 * \brief get angular coord.
136 */
137 inline su2double GetDeltaAngularCoord(void) const { return DeltaAngularCoord; }
138
139 /*!
140 * \brief set angular coord.
141 */
142 inline void SetRelAngularCoord(su2double minAngCoord) { RelAngularCoord = AngularCoord - minAngCoord; }
143
144 /*!
145 * \brief get angular coord.
146 */
147 inline su2double GetRelAngularCoord(void) const { return RelAngularCoord; }
148};
Headers of the main subroutines for doing the complete dual grid structure. The subroutines and funct...
static unsigned short nDim
Number of dimensions of the problem.
Definition CDualGrid.hpp:46
Class for vertex definition for turbomachinery (equivalent to edges, but for the boundaries).
Definition CTurboVertex.hpp:38
unsigned long GetOldVertex(void) const
retrieve vertex value not ordered.
Definition CTurboVertex.hpp:107
su2double GetRelAngularCoord(void) const
get angular coord.
Definition CTurboVertex.hpp:147
void SetArea(su2double val_area)
set face Area.
Definition CTurboVertex.hpp:77
void SetOldVertex(unsigned long val_vertex)
set vertex value not ordered.
Definition CTurboVertex.hpp:102
void SetAngularCoord(su2double angCoord)
set angular coord.
Definition CTurboVertex.hpp:122
su2double * GetTurboNormal(void)
Get the turbo normal to a face where turboperformance are computed .
Definition CTurboVertex.hpp:96
su2double GetArea(void) const
get face Area associate to the vertex.
Definition CTurboVertex.hpp:82
su2double GetAngularCoord(void) const
get angular coord.
Definition CTurboVertex.hpp:127
int GetGlobalVertexIndex(void) const
get global index for ordered span-wise turbovertex.
Definition CTurboVertex.hpp:117
~CTurboVertex(void) override
Destructor of the class.
Definition CTurboVertex.cpp:41
void SetTurboNormal(const su2double *val_normal)
set Normal in the turbomachinery frame of reference.
Definition CTurboVertex.hpp:68
su2double GetDeltaAngularCoord(void) const
get angular coord.
Definition CTurboVertex.hpp:137
void GetTurboNormal(su2double *val_normal) const
Copy the the turbo normal vector of a face.
Definition CTurboVertex.hpp:88
void SetDeltaAngularCoord(su2double deltaAngCoord)
set angular coord.
Definition CTurboVertex.hpp:132
void SetRelAngularCoord(su2double minAngCoord)
set angular coord.
Definition CTurboVertex.hpp:142
void SetGlobalVertexIndex(int globalindex)
set global index for ordered span-wise turbovertex.
Definition CTurboVertex.hpp:112
Class for vertex definition (equivalent to edges, but for the boundaries).
Definition CVertex.hpp:38
passivedouble su2double
Definition code_config.hpp:181