Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stability issue with chain model #136

Closed
johhell opened this issue Jan 11, 2024 · 1 comment
Closed

stability issue with chain model #136

johhell opened this issue Jan 11, 2024 · 1 comment

Comments

@johhell
Copy link
Contributor

johhell commented Jan 11, 2024

Tried to simulate a multiPendulum problem (to compare the results with an MTK implementation from another project).
The model + results: D7xproblem.zip

model description

model of 1 segment:

Segment(;obj1, phi_start1=0.0) =  Model(
    temp1   = Object3D(),
    box     = Object3D(feature=Solid(massProperties=MassProperties(; mass=mass_per_seg, Ixx=0.01, Iyy=0.01, Izz=0.02))),
    frame1  = Object3D(parent=:box, translation=:[ len_per_segment, 0.0, 0.0 ]), # nach unten  z-Richtung
    rev1     = RevoluteWithFlange(obj1=obj1, obj2=:temp1, axis=2, phi=Var(init=phi_start1)),
    prism   = Prismatic(      obj1=:frame1, obj2=:temp1, axis=1 , s=Var(init=0.0), v=Var(init=0.0)),
    spring  = SpringDamperPtP(obj1=:frame1, obj2=:temp1, springForceLaw=:springForce, damperForceLaw=:damping),

    damper1 = Damper | Map(d=19.50),
    fixed  = Fixed,
    connect = :[
                (damper1.flange_b, rev1.flange),
                (damper1.flange_a, fixed.flange)     ]      )

results

In my simulation I used stopTime=3.73.

ticket

Longer duration e.g. stopTime>3.73 results in a stability problem of the solver.
Maybe the problem has something to do with angle transformation. Below values of m4.rev.phi short before the simulation becomes unstable.

Full model, PNG and GIF can be found in the attached ZIP

julia> T7test.revPhi[4]
374-element Vector{Float64}:
  0.0
 -2.851810285609827e-7
 -1.8911534161141074e-6
  ⋮
 -0.056001209423869214
 -0.057929861281100024
 -0.04127514251024846
 -6.5751491644538245

ticket

@johhell
Copy link
Contributor Author

johhell commented Jan 12, 2024

Partly solved. My interpretation of the Prismatic joint was not correct. The answer to my problem I found in the test-examples.
Modia3D is great!

@johhell johhell closed this as completed Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant