Documentation 6b54b78464
Loading...
Searching...
No Matches
CSurfaceMovement.hpp
Go to the documentation of this file.
1/*!
2 * \file CSurfaceMovement.hpp
3 * \brief Headers of the CSurfaceMovement class.
4 * \author F. Palacios, T. Economon.
5 * \version 8.5.0 "Harrier"
6 *
7 * SU2 Project Website: https://su2code.github.io
8 *
9 * The SU2 Project is maintained by the SU2 Foundation
10 * (http://su2foundation.org)
11 *
12 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
13 *
14 * SU2 is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * SU2 is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28#pragma once
29
30#include "CGridMovement.hpp"
31#include "CFreeFormDefBox.hpp"
32
33/*!
34 * \class CSurfaceMovement
35 * \brief Class for moving the surface numerical grid.
36 * \author F. Palacios, T. Economon.
37 */
39 protected:
40 CFreeFormDefBox** FFDBox; /*!< \brief Definition of the Free Form Deformation Box. */
41 unsigned short nFFDBox; /*!< \brief Number of FFD FFDBoxes. */
42 unsigned short nLevel; /*!< \brief Level of the FFD FFDBoxes (parent/child). */
43 bool FFDBoxDefinition; /*!< \brief If the FFD FFDBox has been defined in the input file. */
44
45 public:
46 vector<su2double> GlobalCoordX[MAX_NUMBER_FFD];
47 vector<su2double> GlobalCoordY[MAX_NUMBER_FFD];
48 vector<su2double> GlobalCoordZ[MAX_NUMBER_FFD];
49 vector<string> GlobalTag[MAX_NUMBER_FFD];
50 vector<unsigned long> GlobalPoint[MAX_NUMBER_FFD];
51
52 /*!
53 * \brief Constructor of the class.
54 */
55 CSurfaceMovement(void);
56
57 /*!
58 * \brief Destructor of the class.
59 */
60 ~CSurfaceMovement(void) override;
61
62 /*!
63 * \brief Set a Hicks-Henne deformation bump functions on an airfoil.
64 * \param[in] boundary - Geometry of the boundary.
65 * \param[in] config - Definition of the particular problem.
66 * \param[in] iDV - Index of the design variable.
67 * \param[in] ResetDef - Reset the deformation before starting a new one.
68 */
69 void SetHicksHenne(CGeometry* boundary, CConfig* config, unsigned short iDV, bool ResetDef);
70
71 /*!
72 * \brief Set a Hicks-Henne deformation bump functions on an airfoil.
73 * \param[in] boundary - Geometry of the boundary.
74 * \param[in] config - Definition of the particular problem.
75 * \param[in] iDV - Index of the design variable.
76 * \param[in] ResetDef - Reset the deformation before starting a new one.
77 */
78 void SetSurface_Bump(CGeometry* boundary, CConfig* config, unsigned short iDV, bool ResetDef);
79
80 /*!
81 * \brief Set a Hicks-Henne deformation bump functions on an airfoil.
82 * \param[in] boundary - Geometry of the boundary.
83 * \param[in] config - Definition of the particular problem.
84 * \param[in] iDV - Index of the design variable.
85 * \param[in] ResetDef - Reset the deformation before starting a new one.
86 */
87 void SetAngleOfAttack(CGeometry* boundary, CConfig* config, unsigned short iDV, bool ResetDef);
88
89 /*!
90 * \brief Set a deformation based on a change in the Kulfan parameters for an airfoil.
91 * \param[in] boundary - Geometry of the boundary.
92 * \param[in] config - Definition of the particular problem.
93 * \param[in] iDV - Index of the design variable.
94 * \param[in] ResetDef - Reset the deformation before starting a new one.
95 */
96 void SetCST(CGeometry* boundary, CConfig* config, unsigned short iDV, bool ResetDef);
97
98 /*!
99 * \brief Set a Hicks-Henne deformation bump function on the camberline of an airfoil.
100 * \param[in] boundary - Geometry of the boundary.
101 * \param[in] config - Definition of the particular problem.
102 */
103 void SetHicksHenneCamber(CGeometry* boundary, CConfig* config);
104
105 /*!
106 * \brief Set a NACA 4 digits airfoil family for airfoil deformation.
107 * \param[in] boundary - Geometry of the boundary.
108 * \param[in] config - Definition of the particular problem.
109 */
110 void SetNACA_4Digits(CGeometry* boundary, CConfig* config);
111
112 /*!
113 * \brief Set a parabolic family for airfoil deformation.
114 * \param[in] boundary - Geometry of the boundary.
115 * \param[in] config - Definition of the particular problem.
116 */
117 void SetParabolic(CGeometry* boundary, CConfig* config);
118
119 /*!
120 * \brief Set a obstacle in a channel.
121 * \param[in] boundary - Geometry of the boundary.
122 * \param[in] config - Definition of the particular problem.
123 */
124 void SetAirfoil(CGeometry* boundary, CConfig* config);
125
126 /*!
127 * \brief Set a rotation for surface movement.
128 * \param[in] boundary - Geometry of the boundary.
129 * \param[in] config - Definition of the particular problem.
130 * \param[in] iDV - Index of the design variable.
131 * \param[in] ResetDef - Reset the deformation before starting a new one.
132 */
133 void SetRotation(CGeometry* boundary, CConfig* config, unsigned short iDV, bool ResetDef);
134
135 /*!
136 * \brief Computes the displacement of a rotating surface for a dynamic mesh simulation.
137 * \param[in] geometry - Geometrical definition of the problem.
138 * \param[in] config - Definition of the particular problem.
139 * \param[in] iter - Current physical time iteration.
140 * \param[in] iZone - Zone number in the mesh.
141 */
142 void HTP_Rotation(CGeometry* geometry, CConfig* config, unsigned long iter, unsigned short iZone);
143
144 /*!
145 * \brief Unsteady aeroelastic grid movement by deforming the mesh.
146 * \param[in] geometry - Geometrical definition of the problem.
147 * \param[in] config - Definition of the particular problem.
148 * \param[in] ExtIter - Physical iteration number.
149 * \param[in] iMarker - Marker to deform.
150 * \param[in] iMarker_Monitoring - Marker we are monitoring.
151 * \param[in] displacements - solution of typical section wing model.
152 */
153 void AeroelasticDeform(CGeometry* geometry, CConfig* config, unsigned long TimeIter, unsigned short iMarker,
154 unsigned short iMarker_Monitoring, vector<su2double>& displacements);
155
156 /*!
157 * \brief Deforms a 3-D flutter/pitching surface during an unsteady simulation.
158 * \param[in] geometry - Geometrical definition of the problem.
159 * \param[in] config - Definition of the particular problem.
160 * \param[in] iter - Current physical time iteration.
161 * \param[in] iZone - Zone number in the mesh.
162 */
163 void SetBoundary_Flutter3D(CGeometry* geometry, CConfig* config, CFreeFormDefBox** FFDBox, unsigned long iter,
164 unsigned short iZone);
165
166 /*!
167 * \brief Set any surface deformationsbased on an input file.
168 * \param[in] geometry - Geometrical definition of the problem.
169 * \param[in] config - Definition of the particular problem.
170 * \param[in] iZone - Zone number in the mesh.
171 * \param[in] iter - Current physical time iteration.
172 */
173 void SetExternal_Deformation(CGeometry* geometry, CConfig* config, unsigned short iZone, unsigned long iter);
174
175 /*!
176 * \brief Set a displacement for surface movement.
177 * \param[in] boundary - Geometry of the boundary.
178 * \param[in] config - Definition of the particular problem.
179 * \param[in] iDV - Index of the design variable.
180 * \param[in] ResetDef - Reset the deformation before starting a new one.
181 */
182 void SetTranslation(CGeometry* boundary, CConfig* config, unsigned short iDV, bool ResetDef);
183
184 /*!
185 * \brief Set a displacement for surface movement.
186 * \param[in] boundary - Geometry of the boundary.
187 * \param[in] config - Definition of the particular problem.
188 * \param[in] iDV - Index of the design variable.
189 * \param[in] ResetDef - Reset the deformation before starting a new one.
190 */
191 void SetScale(CGeometry* boundary, CConfig* config, unsigned short iDV, bool ResetDef);
192
193 /*!
194 * \brief Copy the boundary coordinates to each vertex.
195 * \param[in] geometry - Geometrical definition of the problem.
196 * \param[in] config - Definition of the particular problem.
197 */
198 void CopyBoundary(CGeometry* geometry, CConfig* config);
199
200 /*!
201 * \brief Set the surface/boundary deformation.
202 * \param[in] geometry - Geometrical definition of the problem.
203 * \param[in] config - Definition of the particular problem.
204 * \return Total deformation applied, which may be less than target if intersection prevention is used.
205 */
206 vector<vector<su2double> > SetSurface_Deformation(CGeometry* geometry, CConfig* config) override;
207
208 /*!
209 * \brief Compute the parametric coordinates of a grid point using a point inversion strategy
210 * in the free form FFDBox.
211 * \param[in] geometry - Geometrical definition of the problem.
212 * \param[in] config - Definition of the particular problem.
213 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
214 */
215 void SetParametricCoord(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, unsigned short iFFDBox);
216
217 /*!
218 * \brief Update the parametric coordinates of a grid point using a point inversion strategy
219 * in the free form FFDBox.
220 * \param[in] geometry - Geometrical definition of the problem.
221 * \param[in] config - Definition of the particular problem.
222 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
223 * \param[in] iFFDBox - Index of FFD box.
224 */
225 void UpdateParametricCoord(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, unsigned short iFFDBox);
226
227 /*!
228 * \brief Check the intersections of the FFD with the surface
229 * \param[in] geometry - Geometrical definition of the problem.
230 * \param[in] config - Definition of the particular problem.
231 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
232 * \param[in] iFFDBox - Index of FFD box.
233 */
234 void CheckFFDIntersections(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, unsigned short iFFDBox);
235
236 /*!
237 * \brief Check the intersections of the FFD with the surface
238 * \param[in] geometry - Geometrical definition of the problem.
239 * \param[in] config - Definition of the particular problem.
240 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
241 * \param[in] iFFDBox - Index of FFD box.
242 */
243 void CheckFFDDimension(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, unsigned short iFFDBox);
244
245 /*!
246 * \brief Set the Parametric coordinates.
247 * \param[in] geometry - Geometrical definition of the problem.
248 * \param[in] config - Definition of the particular problem.
249 * \param[in] FFDBoxParent - Array with parent FFDBoxes of the computation.
250 * \param[in] FFDBoxChild - Array with child FFDBoxes of the computation.
251 */
252 void SetParametricCoordCP(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBoxParent,
253 CFreeFormDefBox* FFDBoxChild);
254
255 /*!
256 * \brief Get the cartes.
257 * \param[in] geometry - Geometrical definition of the problem.
258 * \param[in] config - Definition of the particular problem.
259 * \param[in] FFDBoxParent - Array with parent FFDBoxes of the computation.
260 * \param[in] FFDBoxChild - Array with child FFDBoxes of the computation.
261 */
262 void GetCartesianCoordCP(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBoxParent,
263 CFreeFormDefBox* FFDBoxChild);
264
265 /*!
266 * \brief Apply the design variables to the control point position
267 * \param[in] geometry - Geometrical definition of the problem.
268 * \param[in] config - Definition of the particular problem.
269 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
270 * \param[in] iFFDBox - Index of FFD box.
271 */
272 void ApplyDesignVariables(CGeometry* geometry, CConfig* config, CFreeFormDefBox** FFDBox, unsigned short iFFDBox);
273
274 /*!
275 * \brief Recompute the cartesian coordinates using the control points position.
276 * \param[in] geometry - Geometrical definition of the problem.
277 * \param[in] config - Definition of the particular problem.
278 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
279 * \param[in] iFFDBox - Index of FFD box.
280 */
281 su2double SetCartesianCoord(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, unsigned short iFFDBox,
282 bool ResetDef);
283
284 /*!
285 * \brief Set the deformation of the Free From box using the control point position.
286 * \param[in] geometry - Geometrical definition of the problem.
287 * \param[in] config - Definition of the particular problem.
288 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
289 * \param[in] iDV - Index of the design variable.
290 * \param[in] ResetDef - Reset the deformation before starting a new one.
291 */
292 bool SetFFDCPChange_2D(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, CFreeFormDefBox** ResetFFDBox,
293 unsigned short iDV, bool ResetDef) const;
294
295 /*!
296 * \brief Set the deformation of the Free From box using the control point position.
297 * \param[in] geometry - Geometrical definition of the problem.
298 * \param[in] config - Definition of the particular problem.
299 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
300 * \param[in] iDV - Index of the design variable.
301 * \param[in] ResetDef - Reset the deformation before starting a new one.
302 */
303 bool SetFFDCPChange(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, CFreeFormDefBox** ResetFFDBox,
304 unsigned short iDV, bool ResetDef) const;
305
306 /*!
307 * \brief Set the deformation of the Free From box using the control point position.
308 * \param[in] geometry - Geometrical definition of the problem.
309 * \param[in] config - Definition of the particular problem.
310 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
311 * \param[in] iDV - Index of the design variable.
312 * \param[in] ResetDef - Reset the deformation before starting a new one.
313 */
314 bool SetFFDGull(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, CFreeFormDefBox** ResetFFDBox,
315 unsigned short iDV, bool ResetDef) const;
316
317 /*!
318 * \brief Set the deformation of the Free From box using the control point position.
319 * \param[in] geometry - Geometrical definition of the problem.
320 * \param[in] config - Definition of the particular problem.
321 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
322 * \param[in] iDV - Index of the design variable.
323 * \param[in] ResetDef - Reset the deformation before starting a new one.
324 */
325 bool SetFFDNacelle(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, CFreeFormDefBox** ResetFFDBox,
326 unsigned short iDV, bool ResetDef) const;
327
328 /*!
329 * \brief Set a camber deformation of the Free From box using the control point position.
330 * \param[in] geometry - Geometrical definition of the problem.
331 * \param[in] config - Definition of the particular problem.
332 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
333 * \param[in] iDV - Index of the design variable.
334 * \param[in] ResetDef - Reset the deformation before starting a new one.
335 */
336 bool SetFFDCamber_2D(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, CFreeFormDefBox** ResetFFDBox,
337 unsigned short iDV, bool ResetDef) const;
338
339 /*!
340 * \brief Set a thickness deformation of the Free From box using the control point position.
341 * \param[in] geometry - Geometrical definition of the problem.
342 * \param[in] config - Definition of the particular problem.
343 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
344 * \param[in] iDV - Index of the design variable.
345 * \param[in] ResetDef - Reset the deformation before starting a new one.
346 */
347 bool SetFFDThickness_2D(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, CFreeFormDefBox** ResetFFDBox,
348 unsigned short iDV, bool ResetDef) const;
349
350 /*!
351 * \brief Set a camber deformation of the Free From box using the control point position.
352 * \param[in] geometry - Geometrical definition of the problem.
353 * \param[in] config - Definition of the particular problem.
354 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
355 * \param[in] iDV - Index of the design variable.
356 * \param[in] ResetDef - Reset the deformation before starting a new one.
357 */
358 bool SetFFDCamber(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, CFreeFormDefBox** ResetFFDBox,
359 unsigned short iDV, bool ResetDef) const;
360
361 /*!
362 * \brief Set a thickness deformation of the Free From box using the control point position.
363 * \param[in] geometry - Geometrical definition of the problem.
364 * \param[in] config - Definition of the particular problem.
365 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
366 * \param[in] iDV - Index of the design variable.
367 * \param[in] ResetDef - Reset the deformation before starting a new one.
368 */
369 bool SetFFDThickness(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, CFreeFormDefBox** ResetFFDBox,
370 unsigned short iDV, bool ResetDef) const;
371
372 /*!
373 * \brief Set a thickness deformation of the Free From box using the control point position.
374 * \param[in] geometry - Geometrical definition of the problem.
375 * \param[in] config - Definition of the particular problem.
376 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
377 * \param[in] iDV - Index of the design variable.
378 * \param[in] ResetDef - Reset the deformation before starting a new one.
379 */
380 void SetFFDAngleOfAttack(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, CFreeFormDefBox** ResetFFDBox,
381 unsigned short iDV, bool ResetDef);
382
383 /*!
384 * \brief Set a twist angle deformation of the Free From box using the control point position.
385 * \param[in] geometry - Geometrical definition of the problem.
386 * \param[in] config - Definition of the particular problem.
387 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
388 * \param[in] iDV - Index of the design variable.
389 * \param[in] ResetDef - Reset the deformation before starting a new one.
390 */
391 bool SetFFDTwist(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, CFreeFormDefBox** ResetFFDBox,
392 unsigned short iDV, bool ResetDef) const;
393
394 /*!
395 * \brief Set a rotation angle deformation of the Free From box using the control point position.
396 * \param[in] geometry - Geometrical definition of the problem.
397 * \param[in] config - Definition of the particular problem.
398 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
399 * \param[in] iDV - Index of the design variable.
400 * \param[in] ResetDef - Reset the deformation before starting a new one.
401 */
402 bool SetFFDRotation(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox, CFreeFormDefBox** ResetFFDBox,
403 unsigned short iDV, bool ResetDef) const;
404
405 /*!
406 * \brief Set a rotation angle deformation in a control surface of the Free From box using the control point position.
407 * \param[in] geometry - Geometrical definition of the problem.
408 * \param[in] config - Definition of the particular problem.
409 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
410 * \param[in] iDV - Index of the design variable.
411 * \param[in] ResetDef - Reset the deformation before starting a new one.
412 */
414 CFreeFormDefBox** ResetFFDBox, unsigned short iDV, bool ResetDef) const;
415
416 /*!
417 * \brief Read the free form information from the grid input file.
418 * \note If there is no control point information, and no parametric
419 * coordinates information, the code will compute that information.
420 * \param[in] config - Definition of the particular problem.
421 * \param[in] geometry - Geometrical definition of the problem.
422 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
423 * \param[in] val_mesh_filename - Name of the grid input file.
424 */
425 void ReadFFDInfo(CGeometry* geometry, CConfig* config, CFreeFormDefBox** FFDBox, const string& val_mesh_filename);
426
427 /*!
428 * \brief Read the free form information from the grid input file.
429 * \note If there is no control point information, and no parametric
430 * coordinates information, the code will compute that information.
431 * \param[in] config - Definition of the particular problem.
432 * \param[in] geometry - Geometrical definition of the problem.
433 * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation.
434 */
435 void ReadFFDInfo(CGeometry* geometry, CConfig* config, CFreeFormDefBox** FFDBox);
436
437 /*!
438 * \brief Merge the Free Form information in the SU2 file.
439 * \param[in] config - Definition of the particular problem.
440 * \param[in] geometry - Geometrical definition of the problem.
441 * \param[in] val_mesh_filename - Name of the grid output file.
442 */
443 void MergeFFDInfo(CGeometry* geometry, CConfig* config);
444
445 /*!
446 * \brief Write the Free Form information in the SU2 file.
447 * \param[in] config - Definition of the particular problem.
448 * \param[in] geometry - Geometrical definition of the problem.
449 * \param[in] val_mesh_filename - Name of the grid output file.
450 */
451 void WriteFFDInfo(CSurfaceMovement** surface_movement, CGeometry**** geometry, CConfig** config);
452
453 /*!
454 * \brief Get information about if there is a complete FFDBox definition, or it is necessary to
455 * compute the parametric coordinates.
456 * \return <code>TRUE</code> if the input grid file has a complete information; otherwise <code>FALSE</code>.
457 */
458 inline bool GetFFDBoxDefinition(void) const { return FFDBoxDefinition; }
459
460 /*!
461 * \brief Check if the design variable definition matches the FFD box definition.
462 * \param[in] config - Definition of the particular problem.
463 * \param[in] iDV - Index of the design variable.
464 * \return <code>TRUE</code> if the FFD box name referenced with DV_PARAM can be found in the FFD box definition;
465 * otherwise <code>FALSE</code>.
466 */
467 inline bool CheckFFDBoxDefinition(CConfig* config, unsigned short iDV) {
468 for (unsigned short iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
469 if (FFDBox[iFFDBox]->GetTag() == config->GetFFDTag(iDV)) {
470 return true;
471 }
472 }
473 return false;
474 }
475
476 /*!
477 * \brief Obtain the number of FFDBoxes.
478 * \return Number of FFD FFDBoxes.
479 */
480 inline unsigned short GetnFFDBox(void) const { return nFFDBox; }
481
482 /*!
483 * \brief Obtain the number of levels.
484 * \return Number of FFD levels.
485 */
486 inline unsigned short GetnLevel(void) const { return nLevel; }
487
488 /*!
489 * \brief Set derivatives of the surface/boundary deformation.
490 * \param[in] geometry - Geometrical definition of the problem.
491 * \param[in] config - Definition of the particular problem.
492 */
493 void SetSurface_Derivative(CGeometry* geometry, CConfig* config);
494
495 /*!
496 * \brief Calculate the determinant of the Jacobian matrix for the FFD problem.
497 * \param[in] geometry - Geometrical definition of the problem.
498 * \param[in] config - Definition of the particular problem.
499 * \param[in] FFDBox - Free form deformation box.
500 * \return Number of points with negative Jacobian determinant.
501 */
502 unsigned long calculateJacobianDeterminant(CGeometry* geometry, CConfig* config, CFreeFormDefBox* FFDBox) const;
503};
Headers of the CFreeFormDefBox class.
Headers of the CGridMovement class.
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
string GetFFDTag(unsigned short val_dv) const
Get the FFD Tag of a particular design variable.
Definition CConfig.hpp:3045
Class for defining the free form FFDBox structure.
Definition CFreeFormDefBox.hpp:38
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Class for moving the surface and volumetric numerical grid (2D and 3D problems).
Definition CGridMovement.hpp:39
Class for moving the surface numerical grid.
Definition CSurfaceMovement.hpp:38
void SetFFDAngleOfAttack(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef)
Set a thickness deformation of the Free From box using the control point position.
Definition CSurfaceMovement.cpp:2348
~CSurfaceMovement(void) override
Destructor of the class.
Definition CSurfaceMovement.cpp:42
void WriteFFDInfo(CSurfaceMovement **surface_movement, CGeometry ****geometry, CConfig **config)
Write the Free Form information in the SU2 file.
Definition CSurfaceMovement.cpp:5005
bool SetFFDNacelle(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef) const
Set the deformation of the Free From box using the control point position.
Definition CSurfaceMovement.cpp:2079
void GetCartesianCoordCP(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBoxParent, CFreeFormDefBox *FFDBoxChild)
Get the cartes.
Definition CSurfaceMovement.cpp:969
vector< su2double > GlobalCoordY[MAX_NUMBER_FFD]
Definition CSurfaceMovement.hpp:47
vector< su2double > GlobalCoordX[MAX_NUMBER_FFD]
Definition CSurfaceMovement.hpp:46
void SetCST(CGeometry *boundary, CConfig *config, unsigned short iDV, bool ResetDef)
Set a deformation based on a change in the Kulfan parameters for an airfoil.
Definition CSurfaceMovement.cpp:2968
void SetHicksHenne(CGeometry *boundary, CConfig *config, unsigned short iDV, bool ResetDef)
Set a Hicks-Henne deformation bump functions on an airfoil.
Definition CSurfaceMovement.cpp:2730
bool SetFFDThickness(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef) const
Set a thickness deformation of the Free From box using the control point position.
Definition CSurfaceMovement.cpp:2357
bool SetFFDCPChange(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef) const
Set the deformation of the Free From box using the control point position.
Definition CSurfaceMovement.cpp:1886
unsigned short nFFDBox
Number of FFD FFDBoxes.
Definition CSurfaceMovement.hpp:41
bool SetFFDCPChange_2D(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef) const
Set the deformation of the Free From box using the control point position.
Definition CSurfaceMovement.cpp:1747
void AeroelasticDeform(CGeometry *geometry, CConfig *config, unsigned long TimeIter, unsigned short iMarker, unsigned short iMarker_Monitoring, vector< su2double > &displacements)
Unsteady aeroelastic grid movement by deforming the mesh.
Definition CSurfaceMovement.cpp:3331
void SetSurface_Bump(CGeometry *boundary, CConfig *config, unsigned short iDV, bool ResetDef)
Set a Hicks-Henne deformation bump functions on an airfoil.
Definition CSurfaceMovement.cpp:2912
bool SetFFDControl_Surface(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef) const
Set a rotation angle deformation in a control surface of the Free From box using the control point po...
Definition CSurfaceMovement.cpp:2644
void SetNACA_4Digits(CGeometry *boundary, CConfig *config)
Set a NACA 4 digits airfoil family for airfoil deformation.
Definition CSurfaceMovement.cpp:3824
void HTP_Rotation(CGeometry *geometry, CConfig *config, unsigned long iter, unsigned short iZone)
Computes the displacement of a rotating surface for a dynamic mesh simulation.
void SetParabolic(CGeometry *boundary, CConfig *config)
Set a parabolic family for airfoil deformation.
Definition CSurfaceMovement.cpp:3866
bool SetFFDCamber_2D(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef) const
Set a camber deformation of the Free From box using the control point position.
Definition CSurfaceMovement.cpp:2201
void SetTranslation(CGeometry *boundary, CConfig *config, unsigned short iDV, bool ResetDef)
Set a displacement for surface movement.
Definition CSurfaceMovement.cpp:3256
bool SetFFDGull(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef) const
Set the deformation of the Free From box using the control point position.
Definition CSurfaceMovement.cpp:2028
void CheckFFDIntersections(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, unsigned short iFFDBox)
Check the intersections of the FFD with the surface.
Definition CSurfaceMovement.cpp:1063
void SetExternal_Deformation(CGeometry *geometry, CConfig *config, unsigned short iZone, unsigned long iter)
Set any surface deformationsbased on an input file.
Definition CSurfaceMovement.cpp:3490
vector< unsigned long > GlobalPoint[MAX_NUMBER_FFD]
Definition CSurfaceMovement.hpp:50
bool SetFFDTwist(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef) const
Set a twist angle deformation of the Free From box using the control point position.
Definition CSurfaceMovement.cpp:2418
bool GetFFDBoxDefinition(void) const
Get information about if there is a complete FFDBox definition, or it is necessary to compute the par...
Definition CSurfaceMovement.hpp:458
bool SetFFDThickness_2D(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef) const
Set a thickness deformation of the Free From box using the control point position.
Definition CSurfaceMovement.cpp:2244
unsigned short GetnLevel(void) const
Obtain the number of levels.
Definition CSurfaceMovement.hpp:486
vector< su2double > GlobalCoordZ[MAX_NUMBER_FFD]
Definition CSurfaceMovement.hpp:48
unsigned short GetnFFDBox(void) const
Obtain the number of FFDBoxes.
Definition CSurfaceMovement.hpp:480
bool SetFFDCamber(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef) const
Set a camber deformation of the Free From box using the control point position.
Definition CSurfaceMovement.cpp:2287
unsigned short nLevel
Level of the FFD FFDBoxes (parent/child).
Definition CSurfaceMovement.hpp:42
void UpdateParametricCoord(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, unsigned short iFFDBox)
Update the parametric coordinates of a grid point using a point inversion strategy in the free form F...
Definition CSurfaceMovement.cpp:1516
bool CheckFFDBoxDefinition(CConfig *config, unsigned short iDV)
Check if the design variable definition matches the FFD box definition.
Definition CSurfaceMovement.hpp:467
su2double SetCartesianCoord(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, unsigned short iFFDBox, bool ResetDef)
Recompute the cartesian coordinates using the control points position.
Definition CSurfaceMovement.cpp:1632
CSurfaceMovement(void)
Constructor of the class.
Definition CSurfaceMovement.cpp:32
unsigned long calculateJacobianDeterminant(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox) const
Calculate the determinant of the Jacobian matrix for the FFD problem.
Definition CSurfaceMovement.cpp:5152
void SetParametricCoordCP(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBoxParent, CFreeFormDefBox *FFDBoxChild)
Set the Parametric coordinates.
Definition CSurfaceMovement.cpp:951
void SetAngleOfAttack(CGeometry *boundary, CConfig *config, unsigned short iDV, bool ResetDef)
Set a Hicks-Henne deformation bump functions on an airfoil.
Definition CSurfaceMovement.cpp:2724
void SetRotation(CGeometry *boundary, CConfig *config, unsigned short iDV, bool ResetDef)
Set a rotation for surface movement.
Definition CSurfaceMovement.cpp:3172
void SetAirfoil(CGeometry *boundary, CConfig *config)
Set a obstacle in a channel.
Definition CSurfaceMovement.cpp:3899
void MergeFFDInfo(CGeometry *geometry, CConfig *config)
Merge the Free Form information in the SU2 file.
Definition CSurfaceMovement.cpp:4805
void SetHicksHenneCamber(CGeometry *boundary, CConfig *config)
Set a Hicks-Henne deformation bump function on the camberline of an airfoil.
Definition CSurfaceMovement.cpp:3700
void SetParametricCoord(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, unsigned short iFFDBox)
Compute the parametric coordinates of a grid point using a point inversion strategy in the free form ...
Definition CSurfaceMovement.cpp:751
vector< string > GlobalTag[MAX_NUMBER_FFD]
Definition CSurfaceMovement.hpp:49
void ReadFFDInfo(CGeometry *geometry, CConfig *config, CFreeFormDefBox **FFDBox, const string &val_mesh_filename)
Read the free form information from the grid input file.
Definition CSurfaceMovement.cpp:4174
void CheckFFDDimension(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, unsigned short iFFDBox)
Check the intersections of the FFD with the surface.
Definition CSurfaceMovement.cpp:995
CFreeFormDefBox ** FFDBox
Definition of the Free Form Deformation Box.
Definition CSurfaceMovement.hpp:40
void SetScale(CGeometry *boundary, CConfig *config, unsigned short iDV, bool ResetDef)
Set a displacement for surface movement.
Definition CSurfaceMovement.cpp:3294
void CopyBoundary(CGeometry *geometry, CConfig *config)
Copy the boundary coordinates to each vertex.
Definition CSurfaceMovement.cpp:737
bool FFDBoxDefinition
If the FFD FFDBox has been defined in the input file.
Definition CSurfaceMovement.hpp:43
void SetBoundary_Flutter3D(CGeometry *geometry, CConfig *config, CFreeFormDefBox **FFDBox, unsigned long iter, unsigned short iZone)
Deforms a 3-D flutter/pitching surface during an unsteady simulation.
Definition CSurfaceMovement.cpp:3405
void ApplyDesignVariables(CGeometry *geometry, CConfig *config, CFreeFormDefBox **FFDBox, unsigned short iFFDBox)
Apply the design variables to the control point position.
Definition CSurfaceMovement.cpp:1586
bool SetFFDRotation(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox, CFreeFormDefBox **ResetFFDBox, unsigned short iDV, bool ResetDef) const
Set a rotation angle deformation of the Free From box using the control point position.
Definition CSurfaceMovement.cpp:2564
void SetSurface_Derivative(CGeometry *geometry, CConfig *config)
Set derivatives of the surface/boundary deformation.
Definition CSurfaceMovement.cpp:710
vector< vector< su2double > > SetSurface_Deformation(CGeometry *geometry, CConfig *config) override
Set the surface/boundary deformation.
Definition CSurfaceMovement.cpp:52
passivedouble su2double
Definition code_config.hpp:181
const unsigned int MAX_NUMBER_FFD
Maximum number of FFDBoxes for the FFD.
Definition option_structure.hpp:79