LIBRARY
PlanarMechanics.OneDOFSlippingWheelSpinningTest
Test for OneDOFSlippingWheelJoint: a wheel spinning in place.
A body (m=0.1, I=0.1) with initial angular velocity w=30 rad/s on a slip-based wheel of radius 1. The wheel starts spinning and eventually the rotational speed matches the linear speed. Translates the spinning wheel test from test_OneDOFWheelJoint.jl.
Usage
MultibodyComponents.PlanarMechanics.OneDOFSlippingWheelSpinningTest()
Behavior
julia
using MultibodyComponents #hide
using ModelingToolkit #hide
@named sys = MultibodyComponents.PlanarMechanics.OneDOFSlippingWheelSpinningTest() #hide
full_equations(sys) #hide<< @example-block not executed in draft mode >>Source
dyad
"""
Test for OneDOFSlippingWheelJoint: a wheel spinning in place.
A body (m=0.1, I=0.1) with initial angular velocity w=30 rad/s on a slip-based
wheel of radius 1. The wheel starts spinning and eventually the rotational speed
matches the linear speed.
Translates the spinning wheel test from test_OneDOFWheelJoint.jl.
"""
test component OneDOFSlippingWheelSpinningTest
world = World(g = 9.82)
body = Body(m = 0.1, I = 0.1) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 260, "y1": 20, "x2": 460, "y2": 220, "rot": 0}
},
"tags": []
}
}
wheelJoint = OneDOFSlippingWheelJoint(radius = 1, mu_A = 0.95, mu_S = 0.7, sAdhesion = 0.04, sSlide = 0.12, vAdhesion_min = 0.05, vSlide_min = 0.15) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 20, "y1": 190, "x2": 220, "y2": 390, "rot": 0}
},
"tags": []
}
}
relations
initial body.phi = 0.0
initial body.w = 30.0
initial wheelJoint.x = 0.0
initial wheelJoint.v = 0.0
connect(wheelJoint.frame_a, body.frame_a) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 120, "y": 120}], "E": 2}],
"renderStyle": "standard"
}
}
metadata {"Dyad": {"tests": {"case1": {"stop": 3}}}}
endFlattened Source
dyad
"""
Test for OneDOFSlippingWheelJoint: a wheel spinning in place.
A body (m=0.1, I=0.1) with initial angular velocity w=30 rad/s on a slip-based
wheel of radius 1. The wheel starts spinning and eventually the rotational speed
matches the linear speed.
Translates the spinning wheel test from test_OneDOFWheelJoint.jl.
"""
test component OneDOFSlippingWheelSpinningTest
world = World(g = 9.82)
body = Body(m = 0.1, I = 0.1) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 260, "y1": 20, "x2": 460, "y2": 220, "rot": 0}
},
"tags": []
}
}
wheelJoint = OneDOFSlippingWheelJoint(radius = 1, mu_A = 0.95, mu_S = 0.7, sAdhesion = 0.04, sSlide = 0.12, vAdhesion_min = 0.05, vSlide_min = 0.15) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 20, "y1": 190, "x2": 220, "y2": 390, "rot": 0}
},
"tags": []
}
}
relations
initial body.phi = 0.0
initial body.w = 30.0
initial wheelJoint.x = 0.0
initial wheelJoint.v = 0.0
connect(wheelJoint.frame_a, body.frame_a) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 120, "y": 120}], "E": 2}],
"renderStyle": "standard"
}
}
metadata {"Dyad": {"tests": {"case1": {"stop": 3}}}}
endTest Cases
julia
using MultibodyComponents
using DyadInterface: TransientAnalysis, rebuild_sol, ODEAlg
using ModelingToolkit: toggle_namespacing, get_initial_conditions, @named
using CSV, DataFrames, Plots
snapshotsdir = joinpath(dirname(dirname(pathof(MultibodyComponents))), "test", "snapshots")<< @setup-block not executed in draft mode >>Test Case case1
julia
@named model_case1 = MultibodyComponents.PlanarMechanics.OneDOFSlippingWheelSpinningTest()
model_case1 = toggle_namespacing(model_case1, false)
model_case1 = toggle_namespacing(model_case1, true)
result_case1 = TransientAnalysis(; model = model_case1, alg = ODEAlg.Auto(), start = 0e+0, stop = 3e+0, abstol=1e-6, reltol=1e-6)
sol_case1 = rebuild_sol(result_case1)<< @setup-block not executed in draft mode >>Related
Examples
Experiments
Analyses
Tests