Documentation 6b54b78464
Loading...
Searching...
No Matches
CFlowTractionInterface.hpp
Go to the documentation of this file.
1/*!
2 * \file CFlowTractionInterface.hpp
3 * \brief Declaration and inlines of the class to transfer flow tractions
4 * from a fluid zone into a structural zone.
5 * \author Ruben Sanchez
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 "../CInterface.hpp"
32#include <unordered_map>
33
34/*!
35 * \brief Fluid-structure interface (forces or tractions).
36 * \ingroup Interfaces
37 */
39protected:
40 const bool conservative;
41 std::unordered_map<unsigned long, su2double> vertexArea;
42
43 /*!
44 * \brief Sets the dimensional factor for pressure and the consistent_interpolation flag.
45 * \param[in] flow_config - Definition of the fluid (donor) problem.
46 * \param[in] struct_config - Definition of the structural (target) problem.
47 * \param[in] geometry - FEA geometry.
48 * \param[in] solution - FEA solver.
49 */
50 void Preprocess(const CConfig *flow_config, const CConfig *struct_config, CGeometry *geometry, CSolver *solution);
51
52 /*!
53 * \brief Computes vertex areas (FEA side) for when tractions need to be integrated.
54 * \param[in] config - Definition of the structural (target) problem.
55 * \param[in] geometry - FEA geometry.
56 * \param[in] solution - FEA solver.
57 */
58 void ComputeVertexAreas(const CConfig *config, CGeometry *geometry, CSolver *solution);
59
60public:
61 /*!
62 * \overload
63 * \param[in] val_nVar - Number of variables that need to be transferred.
64 * \param[in] val_nConst - Number of constants.
65 * \param[in] config - Definition of the particular problem.
66 * \param[in] integrate_tractions_ - Whether to integrate the fluid tractions
67 * (to transfer forces when using conservative interpolation).
68 */
69 CFlowTractionInterface(unsigned short val_nVar, unsigned short val_nConst,
70 const CConfig *config, bool integrate_tractions_);
71
72 /*!
73 * \brief Retrieve some constants needed for the calculations.
74 * \param[in] donor_solution - Solution from the donor mesh.
75 * \param[in] target_solution - Solution from the target mesh.
76 * \param[in] donor_geometry - Geometry of the donor mesh.
77 * \param[in] target_geometry - Geometry of the target mesh.
78 * \param[in] donor_config - Definition of the problem at the donor mesh.
79 * \param[in] target_config - Definition of the problem at the target mesh.
80 */
81 void GetPhysical_Constants(CSolver *donor_solution, CSolver *target_solution,
82 CGeometry *donor_geometry, CGeometry *target_geometry,
83 const CConfig *donor_config, const CConfig *target_config) override;
84
85 /*!
86 * \brief Retrieve the variable that will be sent from donor mesh to target mesh.
87 * \param[in] donor_solution - Solution from the donor mesh.
88 * \param[in] donor_geometry - Geometry of the donor mesh.
89 * \param[in] donor_config - Definition of the problem at the donor mesh.
90 * \param[in] Marker_Donor - Index of the donor marker.
91 * \param[in] Vertex_Donor - Index of the donor vertex.
92 */
93 void GetDonor_Variable(CSolver *flow_solution, CGeometry *flow_geometry, const CConfig *flow_config,
94 unsigned long Marker_Flow, unsigned long Vertex_Flow, unsigned long Point_Flow) override;
95
96 /*!
97 * \brief Set the variable that has been received from the target mesh into the target mesh.
98 * \param[in] target_solution - Solution from the target mesh.
99 * \param[in] target_geometry - Geometry of the target mesh.
100 * \param[in] target_config - Definition of the problem at the target mesh.
101 * \param[in] Marker_Target - Index of the target marker.
102 * \param[in] Vertex_Target - Index of the target vertex.
103 * \param[in] Point_Target - Index of the target point.
104 */
105 void SetTarget_Variable(CSolver *fea_solution, CGeometry *fea_geometry,
106 const CConfig *fea_config, unsigned long Marker_Struct,
107 unsigned long Vertex_Struct, unsigned long Point_Struct) override;
108
109};
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Fluid-structure interface (forces or tractions).
Definition CFlowTractionInterface.hpp:38
void GetPhysical_Constants(CSolver *donor_solution, CSolver *target_solution, CGeometry *donor_geometry, CGeometry *target_geometry, const CConfig *donor_config, const CConfig *target_config) override
Retrieve some constants needed for the calculations.
Definition CFlowTractionInterface.cpp:141
void GetDonor_Variable(CSolver *flow_solution, CGeometry *flow_geometry, const CConfig *flow_config, unsigned long Marker_Flow, unsigned long Vertex_Flow, unsigned long Point_Flow) override
Retrieve the variable that will be sent from donor mesh to target mesh.
Definition CFlowTractionInterface.cpp:178
void ComputeVertexAreas(const CConfig *config, CGeometry *geometry, CSolver *solution)
Computes vertex areas (FEA side) for when tractions need to be integrated.
Definition CFlowTractionInterface.cpp:85
std::unordered_map< unsigned long, su2double > vertexArea
Definition CFlowTractionInterface.hpp:41
void SetTarget_Variable(CSolver *fea_solution, CGeometry *fea_geometry, const CConfig *fea_config, unsigned long Marker_Struct, unsigned long Vertex_Struct, unsigned long Point_Struct) override
Set the variable that has been received from the target mesh into the target mesh.
Definition CFlowTractionInterface.cpp:226
const bool conservative
Definition CFlowTractionInterface.hpp:40
void Preprocess(const CConfig *flow_config, const CConfig *struct_config, CGeometry *geometry, CSolver *solution)
Sets the dimensional factor for pressure and the consistent_interpolation flag.
Definition CFlowTractionInterface.cpp:44
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Main class for defining the physical transfer of information.
Definition CInterface.hpp:60
Definition CSolver.hpp:71