AerodynamicInformation
- class sharpy.utils.generate_cases.AerodynamicInformation[source]
Aerodynamic information needed to build a case
Note
It should be defined after the StructuralInformation of the case
- assembly_aerodynamics(*args)[source]
This function concatenates aerodynamic properties to be writen in the same h5 File
- Parameters:
*args – list of AerodynamicInformation() to be meged into ‘self’
- change_airfoils_discretezation(airfoils, new_num_nodes)[source]
Changes the discretization of the matrix of airfoil coordinates
- Parameters:
airfoils (np.array) – Matrix with the x-y coordinates of all the airfoils to be modified
new_num_nodes (int) – Number of points that the output coordinates will have
- Returns:
Matrix with the x-y coordinates of all the airfoils with the new discretization
- Return type:
new_airfoils (np.array)
- check_AerodynamicInformation(StructuralInformation)[source]
Check some properties of the AerodynamicInformation()
Notes
These conditions have to be to correctly define a case but they are not the only ones
- copy()[source]
Returns a copy of the object
- Returns:
new object with the same properties
- Return type:
copied(AerodynamicInformation)
- create_aerodynamics_from_vec(StructuralInformation, vec_aero_node, vec_chord, vec_twist, vec_sweep, vec_surface_m, vec_surface_distribution, vec_m_distribution, vec_elastic_axis, vec_airfoil_distribution, airfoils, user_defined_m_distribution=None, first_twist=True)[source]
Defines the whole case from the appropiated variables in vector form (associated to nodes)
- Parameters:
StructuralInformation (StructuralInformation) – Structural infromation of the case
vec_aero_node (np.array) – defines if a node has aerodynamic properties or not
vec_chord (np.array) – chord of the nodes
vec_twist (np.array) – twist of the nodes
vec_sweep (np.array) – sweep of the nodes
vec_surface_m (np.array) – Number of panels in the chord direction
vec_surface_distribution (np.array) – Surface at which each element belongs
vec_m_distribution (np.array) – distribution of the panels along the chord
vec_elastic_axis (np.array) – position of the elastic axis in the chord
vec_airfoil_distribution (np.array) – airfoil at each element node
airfoils (np.array) – coordinates of the camber lines of the airfoils
first_twist (bool) – Apply the twist rotation before the sweep
- create_one_uniform_aerodynamics(StructuralInformation, chord, twist, sweep, num_chord_panels, m_distribution, elastic_axis, num_points_camber, airfoil, first_twist=True)[source]
Defines the whole case from the appropiated variables constant at every point
- Parameters:
StructuralInformation (StructuralInformation) – Structural infromation of the case
chord (float) – chord
twist (float) – twist
sweep (float) – sweep
num_chord_panels (int) – Number of panels in the chord direction
m_distribution (str) – distribution of the panels along the chord
elastic_axis (float) – position of the elastic axis in the chord
num_points_camber (int) – Number of points to define the camber line
airfoils (np.array) – coordinates of the camber lines of the airfoils
first_twist (bool) – Apply the twist rotation before the sweep
- generate_aero_file(route, case_name, StructuralInformation)[source]
Writes the h5 file with the aerodynamic information
- Parameters:
route (string) – path of the case
case_name (string) – name of the case
- generate_full_aerodynamics(aero_node, chord, twist, sweep, surface_m, surface_distribution, m_distribution, elastic_axis, airfoil_distribution, airfoils, first_twist)[source]
Defines the whole case from the appropiated variables
- Parameters:
aero_node (np.array) – defines if a node has aerodynamic properties or not
chord (np.array) – chord of the elements
twist (np.array) – twist of the elements
sweep (np.array) – sweep of the elements
surface_m (np.array) – Number of panels in the chord direction
surface_distribution (np.array) – Surface at which each element belongs
m_distribution (str) – distribution of the panels along the chord
elastic_axis (np.array) – position of the elastic axis in the chord
airfoil_distribution (np.array) – airfoil at each element node
airfoils (np.array) – coordinates of the camber lines of the airfoils
first_twist (list(bool)) – Apply the twist rotation before the sweep
- interpolate_airfoils_camber(pure_airfoils_camber, r_pure_airfoils, r, n_points_camber)[source]
Create the camber of the airfoil at each node position from the camber of the pure airfoils present in the blade
- Parameters:
pure_airfoils_camber (np.array) – xy coordinates of the camber lines of the pure airfoils
r_pure_airfoils (np.array) – radial position of the pure airfoils
r (np.array) – radial positions to compute the camber lines through linear interpolation
- Returns:
camber lines at the new radial positions
- Return type:
airfoils_camber (np.array)
- interpolate_airfoils_camber_thickness(pure_airfoils_camber, thickness_pure_airfoils, blade_thickness, n_points_camber)[source]
Create the camber of the airfoil at each node position from the camber of the pure airfoils present in the blade based on the thickness
- Parameters:
pure_airfoils_camber (np.array) – xy coordinates of the camber lines of the pure airfoils
thicknesss_pure_airfoils (np.array) – thickness of the pure airfoils
blade_thickness (np.array) – thickness of the blade positions
- Returns:
camber lines at the new radial positions
- Return type:
airfoils_camber (np.array)
- set_to_zero(num_node_elem, num_node, num_elem, num_airfoils=1, num_surfaces=0, num_points_camber=100)[source]
Sets to zero all the variables
- Parameters:
num_node_elem (int) – number of nodes per element
num_node (int) – number of nodes
num_elem (int) – number of elements
num_airfoils (int) – number of different airfoils
num_surfaces (int) – number of aerodynamic surfaces
num_points_camber (int) – number of points to define the camber line of the airfoil