Skip to content
LIBRARY
PlanarMechanics.ActuatedPrismaticTest.md

PlanarMechanics.ActuatedPrismaticTest

A cart (body) on a horizontal force-actuated prismatic joint. A constant force from TranslationalComponents drives the cart along the joint axis via the axis/support flanges; gravity acts orthogonally to the motion, so the position should follow s = 0.5 (f/m) t^2.

Usage

MultibodyComponents.PlanarMechanics.ActuatedPrismaticTest()

Behavior

Source

dyad
"""
A cart (body) on a horizontal force-actuated prismatic joint. A constant force
from TranslationalComponents drives the cart along the joint axis via the
`axis`/`support` flanges; gravity acts orthogonally to the motion, so the
position should follow `s = 0.5 (f/m) t^2`.
"""
test component ActuatedPrismaticTest
  world = World() {}
  prismatic = Prismatic(axisflange = true, r = [1, 0], s(initial = 0), v(initial = 0)) {}
  body = Body(m = 2, I = 0.1) {}
  force = TranslationalComponents.Sources.ConstantForce(f_constant = 3) {}
relations
  connect(world.frame_b, prismatic.frame_a) {}
  connect(prismatic.frame_b, body.frame_a) {}
  connect(force.flange, prismatic.axis) {}
  connect(force.support, prismatic.support) {}
end
Flattened Source
dyad
"""
A cart (body) on a horizontal force-actuated prismatic joint. A constant force
from TranslationalComponents drives the cart along the joint axis via the
`axis`/`support` flanges; gravity acts orthogonally to the motion, so the
position should follow `s = 0.5 (f/m) t^2`.
"""
test component ActuatedPrismaticTest
  world = World() {}
  prismatic = Prismatic(axisflange = true, r = [1, 0], s(initial = 0), v(initial = 0)) {}
  body = Body(m = 2, I = 0.1) {}
  force = TranslationalComponents.Sources.ConstantForce(f_constant = 3) {}
relations
  connect(world.frame_b, prismatic.frame_a) {}
  connect(prismatic.frame_b, body.frame_a) {}
  connect(force.flange, prismatic.axis) {}
  connect(force.support, prismatic.support) {}
metadata {}
end


Test Cases

No test cases defined.