StructTimeStepInfo

class sharpy.utils.datastructures.StructTimeStepInfo(num_node, num_elem, num_node_elem=3, num_dof=None, num_bodies=1)[source]

Structural Time Step Class.

Contains the relevant attributes for the structural description of a single time step.

in_global_AFoR

True if the variables are stored in the global A FoR. False'' if they are stored in the local A FoR of each body. Always ``True for single-body simulations

Type

bool

num_node

Number of nodes

Type

int

num_elem

Number of elements

Type

int

num_node_elem

Number of nodes per element

Type

int

pos

Displacements. [num_node x 3] containing the vector of x, y and z coordinates (in A frame) of the beam nodes.

Type

np.ndarray

pos_dot

Velocities. Time derivative of pos.

Type

np.ndarray

pos_ddot

Accelerations. Time derivative of pos_dot

Type

np.ndarray

psi

Cartesian Rotation Vector. [num_elem x num_node_elem x 3] CRV for each node in each element.

Type

np.ndarray

psi_dot

Time derivative of psi.

Type

np.ndarray

psi_ddot

Time derivative of psi_dot.

Type

np.ndarray

quat

Quaternion expressing the transformation between the A and G frames.

Type

np.ndarray

for_pos

A frame of reference position (with respect to the G` frame of reference).

Type

np.ndarray

for_vel

A frame of reference velocity. Expressed in A FoR

Type

np.ndarray

for_acc

A frame of reference acceleration. Expressed in A FoR

Type

np.ndarray

steady_applied_forces

Forces applied to the structure not associated to time derivatives [num_nodes x 6]. Expressed in B FoR

Type

np.ndarray

unsteady_applied_forces

Forces applied to the structure associated to time derivatives [num_node x 6]. Expressed in B FoR

Type

np.ndarray

runtime_steady_forces

Steady forces generated at runtime through runtime generators [num_node x 6]. Expressed in B FoR

Type

np.ndarray

runtime_unsteady_forces

Unsteady forces generated at runtime through runtime generators [num_node x 6]. Expressed in B FoR

Type

np.ndarray

gravity_forces

Gravity forces at nodes [num_node x 6]. Expressed in A FoR

Type

np.ndarray

total_gravity_forces

Total gravity forces on the structure [6]. Expressed in A FoR

Type

np.ndarray

total_forces

Total forces applied to the structure [6]. Expressed in A FoR

Type

np.ndarray

q

State vector associated to the structural system of equations [num_dof + 10]

Type

np.ndarray

dqdt

Time derivative of q

Type

np.ndarray

dqddt

Time derivative of dqdt

Type

np.ndarray

postproc_cell

Variables associated to cells to be postprocessed

Type

dict

postproc_node

Variables associated to nodes to be postprocessed

Type

dict

psi_local

Cartesian Rotation Vector for each node in each element in local FoR

Type

np.ndarray

psi_dot_local

Time derivative of psi in the local FoR

Type

np.ndarray

mb_FoR_pos

Position of the local A FoR of each body [num_bodies x 6]

Type

np.ndarray

mb_FoR_vel

Velocity of the local A FoR of each body [num_bodies x 6]

Type

np.ndarray

mb_FoR_acc

Acceleration of the local A FoR of each body [num_bodies x 6]

Type

np.ndarray

mb_quat

Quaternion of the local A FoR of each body [num_bodies x 4]

Type

np.ndarray

mb_dquatdt

Time derivative of mb_quat

Type

np.ndarray

forces_constraints_nodes

Forces associated to Lagrange Constraints on nodes [num_node x 6]

Type

np.ndarray

forces_constraints_FoR

Forces associated to Lagrange Contraints on frames of reference [num_bodies x 10]

Type

np.ndarray

mb_dict

Dictionary with the multibody information. It comes from the file case.mb.h5

Type

np.ndarray

change_to_global_AFoR(for0_pos, for0_vel, quat0)[source]

Reference a StructTimeStepInfo to the global A frame of reference

Parameters
  • for0_pos (np.ndarray) – Position of the global A FoR

  • for0_vel (np.ndarray) – Velocity of the global A FoR

  • quat0 (np.ndarray) – Quaternion of the global A FoR

change_to_local_AFoR(for0_pos, for0_vel, quat0)[source]

Reference a StructTimeStepInfo to the local A frame of reference

Parameters
  • for0_pos (np.ndarray) – Position of the global A FoR

  • for0_vel (np.ndarray) – Velocity of the global A FoR

  • quat0 (np.ndarray) – Quaternion of the global A FoR

compute_psi_local_AFoR(for0_pos, for0_vel, quat0)[source]

Compute psi and psi_dot in the local A frame of reference

Parameters
  • for0_pos (np.ndarray) – Position of the global A FoR

  • for0_vel (np.ndarray) – Velocity of the global A FoR

  • quat0 (np.ndarray) – Quaternion of the global A FoR

copy()[source]

Returns a copy of a deepcopy of a StructTimeStepInfo

euler_angles()[source]

Returns the 3 Euler angles (roll, pitch, yaw) for a given time step.

Returns

np.array (roll, pitch, yaw) in radians.

get_body(beam, num_dof_ibody, ibody)[source]

Extract the body number ibody from a multibody system

This function returns a StructTimeStepInfo class (ibody_StructTimeStepInfo) that only includes the body number ibody of the original multibody system self

Parameters
  • beam (Beam) – beam information of the multibody system

  • num_dof_ibody (int) – Number of degrees of freedom associated to the ibody

  • ibody (int) – body number to be extracted

Returns

timestep information of the isolated body

Return type

StructTimeStepInfo

glob_pos(include_rbm=True)[source]

Returns the position of the nodes in G FoR

nodal_b_for_2_a_for(nodal, beam, filter=numpy.array, ibody=None)[source]

Projects a nodal variable from the local, body-attached frame (B) to the reference A frame.

Parameters
  • nodal (np.array) – Nodal variable of size (num_node, 6)

  • beam (sharpy.datastructures.StructTimeStepInfo) – beam info.

  • filter (np.array) – optional argument that filters and does not convert a specific degree of freedom. Defaults to np.array([True, True, True, True, True, True]).

Returns

the nodal argument projected onto the reference A frame.

Return type

np.array