PrismaticWithLengthConstraint
Prismatic joint whose translational distance is computed analytically from a length constraint (1 degree of freedom, no potential state). Companion of RevoluteWithLengthConstraint, used to build the prismatic-side assembly joints (JointUSP, JointRRP, JointSSP). The two frames stay parallel and frame_b is translated along axis n by distance = s + s_offset, where s is solved so that the rod length constraint of the enclosing assembly is fulfilled. The parent assembly sets r_a, r_b (the constraint endpoints) and supplies the rod-force projection through the length-constraint element's constraint_residue.
This component extends from PartialTwoFrames
Usage
MultibodyComponents.PrismaticWithLengthConstraint(n=[1, 0, 0], s_offset=0, s_guess=0, length_constraint=1, e=n / norm_(n))
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
positive_branch | – | true | |
n | Axis of translation, resolved in frame_a (= same as in frame_b) | – | [1, 0, 0] |
s_offset | Relative distance offset (distance = s + s_offset) | – | 0 |
s_guess | Guess value for the prismatic distance, used to select the configuration | – | 0 |
length_constraint | Fixed length of the length constraint | – | 1 |
Connectors
frame_a- Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or severalFrame
connectors that can be connected together (Frame3D)
frame_b- Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or severalFrame
connectors that can be connected together (Frame3D)
axis- This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)bearing- This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)
Variables
| Name | Description | Units |
|---|---|---|
f | Driving force in direction of axis of translation | N |
s | Relative distance between frame_a and frame_b along the axis | m |
distance | = s + s_offset | m |
r_rel_a | Position vector from frame_a to frame_b, resolved in frame_a | m |
r_a | Position vector to the frame_a side of the length constraint, resolved in frame_a | m |
r_b | Position vector to the frame_b side of the length constraint, resolved in frame_b | m |
Behavior
Dict{MIME{Symbol("text/plain")}, String} with 1 entry: MIME type text/plain => "Error displaying result"
Source
"""
Prismatic joint whose translational distance is computed analytically from a
length constraint (1 degree of freedom, no potential state). Companion of
`RevoluteWithLengthConstraint`, used to build the prismatic-side assembly joints
(`JointUSP`, `JointRRP`, `JointSSP`). The two frames stay parallel and `frame_b`
is translated along axis `n` by `distance = s + s_offset`, where `s` is solved so
that the rod length constraint of the enclosing assembly is fulfilled. The parent
assembly sets `r_a`, `r_b` (the constraint endpoints) and supplies the rod-force
projection through the length-constraint element's `constraint_residue`.
"""
component PrismaticWithLengthConstraint
extends PartialTwoFrames()
axis = Flange() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 710, "y1": 950, "x2": 810, "y2": 1050, "rot": 0}
},
"tags": []
}
}
bearing = Flange() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 180, "y1": 950, "x2": 280, "y2": 1050, "rot": 0}
},
"tags": []
}
}
structural parameter positive_branch::Boolean = true
"Axis of translation, resolved in frame_a (= same as in frame_b)"
parameter n::Real[3] = [1, 0, 0]
"Relative distance offset (distance = s + s_offset)"
parameter s_offset::Real = 0
"Guess value for the prismatic distance, used to select the configuration"
parameter s_guess::Real = 0
"Fixed length of the length constraint"
parameter length_constraint::Real = 1
final parameter e::Real[3] = n / norm_(n)
"Driving force in direction of axis of translation"
variable f::Dyad.Force
"Relative distance between frame_a and frame_b along the axis"
variable s::Length
"= s + s_offset"
variable distance::Length
"Position vector from frame_a to frame_b, resolved in frame_a"
variable r_rel_a::Position[3]
"Position vector to the frame_a side of the length constraint, resolved in frame_a"
variable r_a::Position[3]
"Position vector to the frame_b side of the length constraint, resolved in frame_b"
variable r_b::Position[3]
relations
guess s = s_guess
axis.s = s
axis.f = f
bearing.s = 0
distance = s_offset + s
r_rel_a = e * distance
frame_b.r_0 = frame_a.r_0 + resolve1(frame_a.R, r_rel_a)
RotationMatrix(frame_b.R) = absolute_rotation(frame_a, planar_rotation(e, 0, 0))
[0, 0, 0] = frame_a.f + frame_b.f
[0, 0, 0] = frame_a.tau + frame_b.tau + cross(r_rel_a, frame_b.f)
distance = compute_position(length_constraint, e, r_a, r_b, positive_branch)
metadata {
"Dyad": {
"icons": {"default": "dyad://MultibodyComponents/PrismaticWithLengthConstraint.svg"},
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 200,
"rot": 0,
"attrs": {"font-size": "160"}
}
]
}
}
endFlattened Source
"""
Prismatic joint whose translational distance is computed analytically from a
length constraint (1 degree of freedom, no potential state). Companion of
`RevoluteWithLengthConstraint`, used to build the prismatic-side assembly joints
(`JointUSP`, `JointRRP`, `JointSSP`). The two frames stay parallel and `frame_b`
is translated along axis `n` by `distance = s + s_offset`, where `s` is solved so
that the rod length constraint of the enclosing assembly is fulfilled. The parent
assembly sets `r_a`, `r_b` (the constraint endpoints) and supplies the rod-force
projection through the length-constraint element's `constraint_residue`.
"""
component PrismaticWithLengthConstraint
frame_a = Frame3D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
},
"tags": []
}
}
frame_b = Frame3D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
},
"tags": []
}
}
axis = Flange() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 710, "y1": 950, "x2": 810, "y2": 1050, "rot": 0}
},
"tags": []
}
}
bearing = Flange() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 180, "y1": 950, "x2": 280, "y2": 1050, "rot": 0}
},
"tags": []
}
}
structural parameter positive_branch::Boolean = true
"Axis of translation, resolved in frame_a (= same as in frame_b)"
parameter n::Real[3] = [1, 0, 0]
"Relative distance offset (distance = s + s_offset)"
parameter s_offset::Real = 0
"Guess value for the prismatic distance, used to select the configuration"
parameter s_guess::Real = 0
"Fixed length of the length constraint"
parameter length_constraint::Real = 1
final parameter e::Real[3] = n / norm_(n)
"Driving force in direction of axis of translation"
variable f::Dyad.Force
"Relative distance between frame_a and frame_b along the axis"
variable s::Length
"= s + s_offset"
variable distance::Length
"Position vector from frame_a to frame_b, resolved in frame_a"
variable r_rel_a::Position[3]
"Position vector to the frame_a side of the length constraint, resolved in frame_a"
variable r_a::Position[3]
"Position vector to the frame_b side of the length constraint, resolved in frame_b"
variable r_b::Position[3]
relations
guess s = s_guess
axis.s = s
axis.f = f
bearing.s = 0
distance = s_offset + s
r_rel_a = e * distance
frame_b.r_0 = frame_a.r_0 + resolve1(frame_a.R, r_rel_a)
RotationMatrix(frame_b.R) = absolute_rotation(frame_a, planar_rotation(e, 0, 0))
[0, 0, 0] = frame_a.f + frame_b.f
[0, 0, 0] = frame_a.tau + frame_b.tau + cross(r_rel_a, frame_b.f)
distance = compute_position(length_constraint, e, r_a, r_b, positive_branch)
metadata {
"Dyad": {
"icons": {"default": "dyad://MultibodyComponents/PrismaticWithLengthConstraint.svg"},
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 200,
"rot": 0,
"attrs": {"font-size": "160"}
}
]
}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses