StructuralInformation

class sharpy.utils.generate_cases.StructuralInformation[source]

Structural information needed to build a case

assembly_structures(*args)[source]

This function concatenates structures to be writen in the same h5 File

Parameters:*args – list of StructuralInformation() to be meged into ‘self’

Notes

The structures does NOT merge any node (even if nodes are defined at the same coordinates)

check_StructuralInformation()[source]

Check some properties of the StructuralInformation()

Notes

These conditions have to be to correctly define a case but they are not the only ones

compute_basic_num_elem()[source]

It computes the number of elements when no nodes are shared between beams

compute_basic_num_node()[source]

It computes the number of nodes when no nodes are shared between beams

copy()[source]

Returns a copy of the object

Returns:new object with the same properties
Return type:copied(StructuralInformation)
create_frame_of_reference_delta(y_BFoR='y_AFoR')[source]

Define the coordinates of the yB axis in the AFoR

Parameters:y_BFoR (string) – Direction of the yB axis
create_mass_db_from_vector(vec_mass_per_unit_length, vec_mass_iner_x, vec_mass_iner_y, vec_mass_iner_z, vec_pos_cg_B, vec_mass_iner_yz=None)[source]

Create the mass matrices from the vectors of properties

Parameters:
  • vec_mass_per_unit_length (np.array) – masses per unit length
  • vec_mass_iner_x (np.array) – inertias around the x axis
  • vec_mass_iner_y (np.array) – inertias around the y axis
  • vec_mass_iner_z (np.array) – inertias around the z axis
  • vec_pos_cg_B (np.array) – position of the masses
  • vec_mass_iner_yz (np.array) – inertias around the yz axis
create_simple_connectivities()[source]

Create the matrix of connectivities for one single beam with the nodes ordered in increasing xB direction

create_stiff_db_from_vector(vec_EA, vec_GAy, vec_GAz, vec_GJ, vec_EIy, vec_EIz, vec_EIyz=None)[source]

Create the stiffness matrices from the vectors of properties

Parameters:
  • vec_EA (np.array) – Axial stiffness
  • vec_GAy (np.array) – Shear stiffness in the y direction
  • vec_GAz (np.array) – Shear stiffness in the z direction
  • vec_GJ (np.array) – Torsional stiffness
  • vec_EIy (np.array) – Bending stiffness in the y direction
  • vec_EIz (np.array) – Bending stiffness in the z direction
  • vec_EIyz (np.array) – Bending stiffness in the yz direction
generate_fem_file(route, case_name)[source]

Writes the h5 file with the structural information

Parameters:
  • route (string) – path of the case
  • case_name (string) – name of the case
generate_full_structure(num_node_elem, num_node, num_elem, coordinates, connectivities, elem_stiffness, stiffness_db, elem_mass, mass_db, frame_of_reference_delta, structural_twist, boundary_conditions, beam_number, app_forces, lumped_mass_nodes=None, lumped_mass=None, lumped_mass_inertia=None, lumped_mass_position=None)[source]

Defines the whole case from the appropiated variables

Parameters:
  • num_node_elem (int) – number of nodes per element
  • num_node (int) – number of nodes
  • num_elem (int) – number of elements
  • coordinates (np.array) – nodes coordinates
  • connectivities (np.array) – element connectivities
  • elem_stiffness (np.array) – element stiffness index
  • stiffness_db (np.array) – Stiffness matrices
  • elem_mass (np.array) – element mass index
  • mass_db (np.array) – Mass matrices
  • frame_of_reference_delta (np.array) – element direction of the y axis in the BFoR wrt the AFoR
  • structural_twist (np.array) – element based twist
  • boundary_conditions (np.array) – node boundary condition
  • beam_number (np.array) – node beam number
  • app_forces (np.array) – steady applied follower forces at the nodes
  • lumped_mass_nodes (np.array) – nodes with lumped masses
  • lumped_mass (np.array) – value of the lumped masses
  • lumped_mass_inertia (np.array) – inertia of the lumped masses
  • lumped_mass_position (np.array) – position of the lumped masses
generate_uniform_beam(node_pos, mass_per_unit_length, mass_iner_x, mass_iner_y, mass_iner_z, pos_cg_B, EA, GAy, GAz, GJ, EIy, EIz, num_node_elem=3, y_BFoR='y_AFoR', num_lumped_mass=0)[source]

Generates the input data for SHARPy of a uniform beam

Parameters:
  • node_pos (np.array) – coordinates of the nodes
  • mass_per_unit_length (float) – mass per unit length
  • mass_iner_x (float) – Inertia of the mass in the x direction
  • mass_iner_y (float) – Inertia of the mass in the y direction
  • mass_iner_z (float) – Inertia of the mass in the z direction
  • pos_cg_B (np.array) – position of the masses
  • EA (np.array) – Axial stiffness
  • GAy (np.array) – Shear stiffness in the y direction
  • GAz (np.array) – Shear stiffness in the z direction
  • GJ (np.array) – Torsional stiffness
  • EIy (np.array) – Bending stiffness in the y direction
  • EIz (np.array) – Bending stiffness in the z direction
  • num_node_elem (int) – number of nodes per element
  • y_BFoR (str) – orientation of the yB axis
  • num_lumped_mass (int) – number of lumped masses
generate_uniform_sym_beam(node_pos, mass_per_unit_length, mass_iner, EA, GA, GJ, EI, num_node_elem=3, y_BFoR='y_AFoR', num_lumped_mass=0)[source]

Generates the input data for SHARPy of a uniform symmetric beam

Parameters:
  • node_pos (np.array) – coordinates of the nodes
  • mass_per_unit_length (float) – mass per unit length
  • mass_iner (float) – Inertia of the mass
  • EA (float) – Axial stiffness
  • GA (float) – Shear stiffness
  • GJ (float) – Torsional stiffness
  • EI (float) – Bending stiffness
  • num_node_elem (int) – number of nodes per element
  • y_BFoR (str) – orientation of the yB axis
  • num_lumped_mass (int) – number of lumped masses
rotate_around_origin(axis, angle)[source]

Rotates a structure

Parameters:
  • axis (np.array) – axis of rotation
  • angle (float) – angle of rotation in radians
set_to_zero(num_node_elem, num_node, num_elem, num_mass_db=None, num_stiffness_db=None, num_lumped_mass=0)[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_mass_db (int) – number of different mass matrices in the case
  • num_stiffness_db (int) – number of different stiffness matrices in the case
  • num_lumped_mass (int) – number of lumped masses in the case