$(instance)Inertia Icon

Inertia

1D-rotational component with inertia.

This component extends from PartialTwoSplines

Usage

Inertia(J)

Parameters:

NameDescriptionUnitsDefault value
JMoment of inertiakg.m2

Connectors

Variables

NameDescriptionUnits
phiAbsolute rotation anglerad
wAbsolute angular velocityrad/s
aAbsolute angular accelerationrad/s2

Behavior

\[ \begin{align} \mathtt{phi}\left( t \right) &= \mathtt{spline\_a.phi}\left( t \right) \\ \mathtt{phi}\left( t \right) &= \mathtt{spline\_b.phi}\left( t \right) \\ \frac{\mathrm{d} \mathtt{phi}\left( t \right)}{\mathrm{d}t} &= w\left( t \right) \\ \frac{\mathrm{d} w\left( t \right)}{\mathrm{d}t} &= a\left( t \right) \\ J a\left( t \right) &= \mathtt{spline\_b.tau}\left( t \right) + \mathtt{spline\_a.tau}\left( t \right) \end{align} \]

Source

# 1D-rotational component with inertia.
component Inertia
  extends PartialTwoSplines
  # Moment of inertia
  parameter J::MomentOfInertia
  # Absolute rotation angle
  variable phi::Angle
  # Absolute angular velocity
  variable w::AngularVelocity
  # Absolute angular acceleration
  variable a::AngularAcceleration
relations
  phi = spline_a.phi
  phi = spline_b.phi
  D(phi) = w
  D(w) = a
  J*a = spline_a.tau+spline_b.tau
metadata {"JuliaSim": {"icons": {"default": "jsml://RotationalComponents/Inertia.svg"}}}
end
Flattened Source
# 1D-rotational component with inertia.
component Inertia
  spline_a = Spline() [{
    "JuliaSim": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}
  }]
  spline_b = Spline() [{
    "JuliaSim": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}
  }]
  # Moment of inertia
  parameter J::MomentOfInertia
  # Absolute rotation angle
  variable phi::Angle
  # Absolute angular velocity
  variable w::AngularVelocity
  # Absolute angular acceleration
  variable a::AngularAcceleration
relations
  phi = spline_a.phi
  phi = spline_b.phi
  D(phi) = w
  D(w) = a
  J*a = spline_a.tau+spline_b.tau
metadata {"JuliaSim": {"icons": {"default": "jsml://RotationalComponents/Inertia.svg"}}}
end

Test Cases