Skip to content
LIBRARY
tests.PrescribedAccelerationTest.md

tests.PrescribedAccelerationTest

Prescribed Acceleration Test

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.tests.PrescribedAccelerationTest()

Behavior

Source

dyad
"""
# Prescribed Acceleration Test

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`.
"""
example component PrescribedAccelerationTest
  world = MultibodyComponents.World() {}
  prescribed = MultibodyComponents.PrescribedAcceleration(r_start = [0, 0, 0], v_start = [1.0, 0, 0]) {}
  body = MultibodyComponents.Body(m = 1, r_cm = [0, 0, 0]) {}
relations
  prescribed.a_x = 0.0
  prescribed.a_y = 2.0
  prescribed.a_z = -1.0
  connect(prescribed.frame_b, body.frame_a) {}
end
Flattened Source
dyad
"""
# Prescribed Acceleration Test

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`.
"""
example component PrescribedAccelerationTest
  world = MultibodyComponents.World() {}
  prescribed = MultibodyComponents.PrescribedAcceleration(r_start = [0, 0, 0], v_start = [1.0, 0, 0]) {}
  body = MultibodyComponents.Body(m = 1, r_cm = [0, 0, 0]) {}
relations
  prescribed.a_x = 0.0
  prescribed.a_y = 2.0
  prescribed.a_z = -1.0
  connect(prescribed.frame_b, body.frame_a) {}
metadata {}
end


Test Cases

No test cases defined.