Skip to content
LIBRARY
tests.CylindricalJointTest.md

tests.CylindricalJointTest

Cylindrical Joint Test

Ported from the Multibody.jl CylinderTest (basic_tests.jl). A body connected to the world via a Cylindrical joint along the y-axis. Under gravity the body slides along the axis, while an initial angular velocity of 1 rad/s maintains constant rotation.

Usage

MultibodyComponents.tests.CylindricalJointTest()

Behavior

Source

dyad
"""
# Cylindrical Joint Test

Ported from the Multibody.jl CylinderTest (basic_tests.jl).
A body connected to the world via a Cylindrical joint along the y-axis.
Under gravity the body slides along the axis, while an initial angular
velocity of 1 rad/s maintains constant rotation.
"""
example component CylindricalJointTest
  world = MultibodyComponents.World() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 20, "y1": 20, "x2": 120, "y2": 120, "rot": 0}
      },
      "tags": []
    }
  }
  cyl = MultibodyComponents.Cylindrical(n = [0, 1, 0], phi(initial = 0), w(initial = 1), s(initial = 0), v(initial = 0)) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 150, "y1": 20, "x2": 250, "y2": 120, "rot": 0}
      },
      "tags": []
    }
  }
  body = MultibodyComponents.Body(m = 1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 275, "y1": 20, "x2": 375, "y2": 120, "rot": 0}
      },
      "tags": []
    }
  }
relations
  connect(world.frame_b, cyl.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
  connect(cyl.frame_b, body.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
end
Flattened Source
dyad
"""
# Cylindrical Joint Test

Ported from the Multibody.jl CylinderTest (basic_tests.jl).
A body connected to the world via a Cylindrical joint along the y-axis.
Under gravity the body slides along the axis, while an initial angular
velocity of 1 rad/s maintains constant rotation.
"""
example component CylindricalJointTest
  world = MultibodyComponents.World() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 20, "y1": 20, "x2": 120, "y2": 120, "rot": 0}
      },
      "tags": []
    }
  }
  cyl = MultibodyComponents.Cylindrical(n = [0, 1, 0], phi(initial = 0), w(initial = 1), s(initial = 0), v(initial = 0)) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 150, "y1": 20, "x2": 250, "y2": 120, "rot": 0}
      },
      "tags": []
    }
  }
  body = MultibodyComponents.Body(m = 1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 275, "y1": 20, "x2": 375, "y2": 120, "rot": 0}
      },
      "tags": []
    }
  }
relations
  connect(world.frame_b, cyl.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
  connect(cyl.frame_b, body.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
metadata {}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses