/home/runner/work/kynema/kynema/kynema/src/elements/beams/hollow_circle_properties.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/elements/beams/hollow_circle_properties.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
hollow_circle_properties.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cmath>
4#include <numbers>
5#include <stdexcept>
6
7#include "beam_section.hpp"
9
10namespace kynema::beams {
11
16 double area;
17 double Ixx;
18 double Iyy;
19 double J;
20 double kx;
21 double ky;
22};
23
34 double outer_diameter, double wall_thickness, double nu = 0.33
35) {
36 //--------------------------------------------------------------------------
37 // Check input arguments
38 //--------------------------------------------------------------------------
39 if (wall_thickness >= outer_diameter / 2.) {
40 throw std::invalid_argument("Wall thickness must be less than outer radius");
41 }
42
43 //--------------------------------------------------------------------------
44 // Calculate geometric properties
45 //--------------------------------------------------------------------------
46 const double outer_radius = outer_diameter / 2.;
47 const double inner_radius = outer_radius - wall_thickness;
48
49 // Calculate geometric properties using difference of circles
50 const double area = std::numbers::pi * (std::pow(outer_radius, 2) - std::pow(inner_radius, 2));
51 const double Ixx =
52 std::numbers::pi * (std::pow(outer_radius, 4) - std::pow(inner_radius, 4)) / 4.;
53 const double Iyy = Ixx; // Circular symmetry
54 const double J = std::numbers::pi * (std::pow(outer_radius, 4) - std::pow(inner_radius, 4)) / 2.;
55
56 // Shear correction factors for hollow circular sections
57 const double kx = (6. * (1. + nu)) / (7. + 6. * nu); // Timoshenko-Ehrenfest beam theory
58 const double ky = kx; // Circular symmetry
59
60 return HollowCircleProperties{area, Ixx, Iyy, J, kx, ky};
61}
62
95 double s, double E, double G, double rho, double outer_diameter, double wall_thickness,
96 double nu, double x_C = 0., double y_C = 0., double theta_p = 0., double x_S = 0.,
97 double y_S = 0., double theta_s = 0., double x_G = 0., double y_G = 0., double theta_i = 0
98) {
99 auto properties = CalculateHollowCircleProperties(outer_diameter, wall_thickness, nu);
100
101 // Calculate mass properties
102 const double m = rho * properties.area; // Mass per unit length
103 const double I_x = rho * properties.Ixx; // Mass moment of inertia about x-axis
104 const double I_y = rho * properties.Iyy; // Mass moment of inertia about y-axis
105 const double I_p = I_x + I_y; // Polar mass moment of inertia
106
107 // Calculate stiffness properties
108 const double EA = E * properties.area;
109 const double EI_x = E * properties.Ixx;
110 const double EI_y = E * properties.Iyy;
111 const double GKt = G * properties.J;
112 const double GA = G * properties.area;
113
114 // Generate mass and stiffness matrices and return BeamSection
115 const auto mass = GenerateMassMatrix(m, I_x, I_y, I_p, x_G, y_G, theta_i);
116 const auto stiffness = GenerateStiffnessMatrix(
117 EA, EI_x, EI_y, GKt, GA, properties.kx, properties.ky, x_C, y_C, theta_p, x_S, y_S, theta_s
118 );
119
120 return {s, mass, stiffness};
121}
122
123} // namespace kynema::beams
Definition beam_quadrature.hpp:16
static BeamSection GenerateHollowCircleSection(double s, double E, double G, double rho, double outer_diameter, double wall_thickness, double nu, double x_C=0., double y_C=0., double theta_p=0., double x_S=0., double y_S=0., double theta_s=0., double x_G=0., double y_G=0., double theta_i=0)
Generates a BeamSection with 6x6 mass and stiffness matrices for a hollow circular cross-section.
Definition hollow_circle_properties.hpp:94
static std::array< std::array< double, 6 >, 6 > GenerateMassMatrix(double m, double I_x, double I_y, double I_p, double x_G=0., double y_G=0., double theta_i=0.)
Generates a 6x6 cross-sectional mass matrix for use in beam elements.
Definition generate_sectional_properties.hpp:126
static HollowCircleProperties CalculateHollowCircleProperties(double outer_diameter, double wall_thickness, double nu=0.33)
Calculates geometric properties for a hollow circular cross-section.
Definition hollow_circle_properties.hpp:33
static std::array< std::array< double, 6 >, 6 > GenerateStiffnessMatrix(double EA, double EI_x, double EI_y, double GKt, double GA, double kxs, double kys, double x_C, double y_C, double theta_p, double x_S, double y_S, double theta_s)
Generates a 6x6 cross-sectional stiffness matrix for use in beam elements.
Definition generate_sectional_properties.hpp:41
A structure containing the position, mass matrix, and stiffness matrix to be used in defining a beam ...
Definition beam_section.hpp:11
Struct containing geometric properties for a hollow circular cross-section.
Definition hollow_circle_properties.hpp:15
double Ixx
Second moment of area about x-axis [Length^4].
Definition hollow_circle_properties.hpp:17
double kx
Shear correction factor in x direction [dimensionless].
Definition hollow_circle_properties.hpp:20
double ky
Shear correction factor in y direction [dimensionless].
Definition hollow_circle_properties.hpp:21
double J
Polar moment of inertia [Length^4].
Definition hollow_circle_properties.hpp:19
double Iyy
Second moment of area about y-axis [Length^4].
Definition hollow_circle_properties.hpp:18
double area
Cross-sectional area [Length^2].
Definition hollow_circle_properties.hpp:16