# ModelingToolkit Standard Library: Mechanical Components

## Rotational Components

### Rotational Utils

ModelingToolkitStandardLibrary.Mechanical.Rotational.PartialCompliantWithRelativeStatesFunction
PartialCompliantWithRelativeStates(;name, phi_rel_start=0.0, tau_start=0.0)

Partial model for the compliant connection of two rotational 1-dim. shaft flanges where the relative angle and speed are used as preferred states

Parameters:

• phi_rel_start: [rad] Initial relative rotation angle
• w_rel_start: [rad/s] Initial relative angular velocity (= der(phi_rel))
• a_rel_start: [rad/s²] Initial relative angular acceleration (= der(w_rel))
• tau_start: [N.m] Initial torque between flanges

States:

• phi_rel: [rad] Relative rotation angle (= flangeb.phi - flangea.phi)
• w_rel: [rad/s] Relative angular velocity (= der(phi_rel))
• a_rel: [rad/s²] Relative angular acceleration (= der(w_rel))
• tau: [N.m] Torque between flanges (= flange_b.tau)
ModelingToolkitStandardLibrary.Mechanical.Rotational.PartialElementaryOneFlangeAndSupport2Function
PartialElementaryOneFlangeAndSupport2(;name, use_support=false)

Partial model for a component with one rotational 1-dim. shaft flange and a support used for textual modeling, i.e., for elementary models

Parameters:

• use_support: If support flange enabled, otherwise implicitly grounded

States:

• phi_support: [rad] Absolute angle of support flange"
ModelingToolkitStandardLibrary.Mechanical.Rotational.PartialElementaryTwoFlangesAndSupport2Function
PartialElementaryTwoFlangesAndSupport2(;name, use_support=false)

Partial model for a component with two rotational 1-dim. shaft flanges and a support used for textual modeling, i.e., for elementary models

Parameters:

• use_support: If support flange enabled, otherwise implicitly grounded

States:

• phi_support: [rad] Absolute angle of support flange"
ModelingToolkitStandardLibrary.Mechanical.Rotational.PartialCompliantFunction
PartialCompliant(;name, phi_rel_start=0.0, tau_start=0.0)

Partial model for the compliant connection of two rotational 1-dim. shaft flanges.

Parameters:

• phi_rel_start: [rad] Initial relative rotation angle
• tau_start: [N.m] Initial torque between flanges

States:

• phi_rel: [rad] Relative rotation angle (= flangeb.phi - flangea.phi)
• tau: [N.m] Torque between flanges (= flange_b.tau)

### Rotational Core Components

ModelingToolkitStandardLibrary.Mechanical.Rotational.InertiaFunction
Inertia(;name, J, phi_start=0.0, w_start=0.0, a_start=0.0)

1D-rotational component with inertia.

Parameters:

• J: [kg·m²] Moment of inertia
• phi_start: [rad] Initial value of absolute rotation angle of component
• w_start: [rad/s] Initial value of absolute angular velocity of component
• a_start: [rad/s²] Initial value of absolute angular acceleration of component

States:

• phi: [rad] Absolute rotation angle of component
• w: [rad/s] Absolute angular velocity of component (= der(phi))
• a: [rad/s²] Absolute angular acceleration of component (= der(w))
ModelingToolkitStandardLibrary.Mechanical.Rotational.IdealGearFunction
IdealGear(;name, ratio, use_support=false)

Ideal gear without inertia.

This element characterizes any type of gear box which is fixed in the ground and which has one driving shaft and one driven shaft.

Parameters:

• ratio: Transmission ratio (flangea.phi/flangeb.phi)
• use_support: If support flange enabled, otherwise implicitly grounded