Wire

class py_crane.boom.Wire(model: py_crane.crane.Crane, name: str, /, tolerance: float = 1e-5, additional_checks: bool = False, **kwargs: Any)

Bases: Boom

Implements the additional properties of a flexible joint (the wire), with pendulum actions, damping, …

__init__(model: py_crane.crane.Crane, name: str, /, tolerance: float = 1e-5, additional_checks: bool = False, **kwargs: Any)

Methods

__init__(model, name, /[, tolerance, ...])

boom_setter(val[, ch])

Set length and angles of boom (if allowed) and ensure consistency with other booms.

calc_statics_dynamics([dt])

After any movement the local c_m and the c_m of connected booms have changed.

damping([q_factor, damping_time])

Change/set the damping properties of a flexible boom.

pendulum(dt)

For a non-stiff connection, if the _c_m is not exactly below origin, the _c_m acts as a damped pendulum.

pendulum_instantaneous()

Move the pendulum instantaneously - origin or length changes are instantaneous and the load stays as much as possible where it was.

pendulum_relax()

Relax the pendulum movement, leading to the CoM strictly downward.

rot([newval])

Access the rotation object from outside the boom.

update_child([change])

Update this boom after the parent boom has changed length, angles, position or rotation.

Attributes

c_m

Updates and returns the local center of mass point relative to self.origin.

c_m_sub

Return the system center of mass as absolute position The _c_m_sub needs to be calculated/updated using calc_statics_dynamics.

end

Calculate the cartesian coordinates of the end of the boom from .origin, .length and .direction.

force

Calculate the force resulting from linear acceleration.

length

Extract the length parameter from .boom.

model

Get the Crane object which this boom is connected to.

name

Get the unique (within the crane) name of the boom.

torque

Calculate the torque from the CoM of this boom with respect to the fixation.

damping(q_factor: float | None = None, damping_time: float | None = None)

Change/set the damping properties of a flexible boom. Ensure that damping_time and newlen is set correctly.

pendulum(dt: float)

For a non-stiff connection, if the _c_m is not exactly below origin, the _c_m acts as a damped pendulum.

More detailed information on Spherical pendulum and Q-factor: * Sphärisches Pendel (the English article is not as good) for detailed formulas * q_factor:

Limitation

Falling movements (i.e. wire acceleration larger than g) are not allowed (raise error).

Assumption

The center of mass is on the boom line at mass_center[0] relative distance from origin.

Limitation

Damping implemented as reduction on speed, which is accurate only over whole period, since potential enery is not included. Note also that damping_time is defined as damping on energy, not on amplitude!

The following differential equation is used for pendulum movement

\[\ddot{\vec{r}} = -\frac{\vec{r} \times (\vec{r} \times \vec{g})}{R^2} - \frac{\dot{\vec{r}}^2}{R^2} \vec{r}\]

covering general spherical pendulum movement. For the crane we get the additional complications, that the pendulum origin may be moving (because the parent boom is moving) or that the length of the pendulum may be changing. To accomodate for that within a time interval \(\tau t\) the origin is initially left unchanged and is over the time interval \(\tau t\) moved to the target position (end point of the parent boom). The same strategy is applied to the length of the wire, adapting it to the target length over the time interval \(\tau t\).

Pendulum movements are integrated into .calc_statics_dynamics(dt) if the connection is non-stiff (q_factor!=0).

Parameters:

dt (float) – The time interval for which the pendulum movement is calculated

Return type:

updated velocity and acceleration (of c_m)

pendulum_instantaneous()

Move the pendulum instantaneously - origin or length changes are instantaneous and the load stays as much as possible where it was.

Note: a new length may be stored as self.newlen and the origin might need updating to .anchor0.end

pendulum_relax()

Relax the pendulum movement, leading to the CoM strictly downward. Since no time is used this action is strictly unphysical and should only be used for testing purposes.

property torque

Calculate the torque from the CoM of this boom with respect to the fixation. Note that this is in practice only calculated for the load and the rest of the crane. These two are calculated separately, since the load exhibits a pendulum action (dealt with here). The Torque is always calculated relative to the crane position.