# NonLinearDynamicMultibody¶

class sharpy.solvers.nonlineardynamicmultibody.NonLinearDynamicMultibody[source]

Nonlinear dynamic multibody

Nonlinear dynamic step solver for multibody structures.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print output to screen

True

max_iterations

int

Sets maximum number of iterations

100

num_load_steps

int

1

delta_curved

float

0.01

min_delta

float

Structural solver relative tolerance

1e-05

abs_threshold

float

Structural solver absolute tolerance

1e-13

newmark_damp

float

Sets the Newmark damping coefficient

0.0001

gravity_on

bool

Flag to include gravitational forces

False

gravity

float

Gravitational acceleration

9.81

gravity_dir

list(float)

Direction in G where gravity applies

[0.0, 0.0, 1.0]

relaxation_factor

float

0.3

dt

float

Time step increment

0.01

num_steps

int

500

time_integrator

str

Method to perform time integration

NewmarkBeta

time_integrator_settings

dict

Settings for the time integrator

{}

write_lm

bool

Write lagrange multipliers to file

False

relax_factor_lm

float

Relaxation factor for Lagrange Multipliers. 0 no relaxation. 1 full relaxation

0.0

allow_skip_step

bool

Allow skip step when NaN is found while solving the system

False

rigid_bodies

bool

Set to zero the changes in flexible degrees of freedom (not very efficient)

False

zero_ini_dot_ddot

bool

Set to zero the position and crv derivatives at the first time step

False

assembly_MB_eq_system(MB_beam, MB_tstep, ts, dt, Lambda, Lambda_dot, MBdict)[source]

This function generates the matrix and vector associated to the linear system to solve a structural iteration It usses a Newmark-beta scheme for time integration. Being M, C and K the mass, damping and stiffness matrices of the system:

$MB_Asys = MB_K + MB_C$

rac{gamma}{eta dt} + rac{1}{eta dt^2} MB_M

Args:

MB_beam (list(Beam)): each entry represents a body MB_tstep (list(StructTimeStepInfo)): each entry represents a body ts (int): Time step number dt(int): time step Lambda (np.ndarray): Lagrange Multipliers array Lambda_dot (np.ndarray): Time derivarive of Lambda MBdict (dict): Dictionary including the multibody information

Returns:

MB_Asys (np.ndarray): Matrix of the systems of equations MB_Q (np.ndarray): Vector of the systems of equations

compute_forces_constraints(MB_beam, MB_tstep, ts, dt, Lambda, Lambda_dot)[source]

This function computes the forces generated at Lagrange Constraints

Parameters
• MB_beam (list(Beam)) – each entry represents a body

• MB_tstep (list(StructTimeStepInfo)) – each entry represents a body

• ts (int) – Time step number

• dt (float) – Time step increment

• Lambda (np.ndarray) – Lagrange Multipliers array

• Lambda_dot (np.ndarray) – Time derivarive of Lambda

Warning

This function is underdevelopment and not fully functional

define_sys_size()[source]

This function defines the number of degrees of freedom in a multibody systems

Each body contributes with num_dof degrees of freedom and 10 more if the associated local FoR can move or has Lagrange Constraints associated

integrate_position(MB_beam, MB_tstep, dt)[source]

This function integrates the position of each local A FoR after the structural iteration has been solved.

It uses a Newmark-beta approximation.

Parameters
• MB_beam (list(Beam)) – each entry represents a body

• MB_tstep (list(StructTimeStepInfo)) – each entry represents a body

• dt (int) – time step