Skip to content
LIBRARY
PlanarMechanics.PrescribedAccelerationTest.md

PlanarMechanics.PrescribedAccelerationTest

A body whose frame_a is driven by a PrescribedAcceleration component with constant acceleration inputs. Position should evolve as r(t) = r_start + v_start*t + 0.5*a*t^2 and velocity as v(t) = v_start + a*t.

Usage

MultibodyComponents.PlanarMechanics.PrescribedAccelerationTest()

Behavior

Source

dyad
"""
A body whose `frame_a` is driven by a `PrescribedAcceleration` component
with constant acceleration inputs. Position should evolve as
`r(t) = r_start + v_start*t + 0.5*a*t^2` and velocity as
`v(t) = v_start + a*t`.
"""
test component PrescribedAccelerationTest
  world = World() {}
  prescribed = PrescribedAcceleration(r_start = [0, 0], v_start = [1.0, 0]) {}
  body = Body(m = 1, I = 1) {}
relations
  prescribed.a_x = 0.0
  prescribed.a_y = 2.0
  connect(prescribed.frame_b, body.frame_a) {}
end
Flattened Source
dyad
"""
A body whose `frame_a` is driven by a `PrescribedAcceleration` component
with constant acceleration inputs. Position should evolve as
`r(t) = r_start + v_start*t + 0.5*a*t^2` and velocity as
`v(t) = v_start + a*t`.
"""
test component PrescribedAccelerationTest
  world = World() {}
  prescribed = PrescribedAcceleration(r_start = [0, 0], v_start = [1.0, 0]) {}
  body = Body(m = 1, I = 1) {}
relations
  prescribed.a_x = 0.0
  prescribed.a_y = 2.0
  connect(prescribed.frame_b, body.frame_a) {}
metadata {}
end


Test Cases

No test cases defined.