Dear Oskar,

It is just one 3D pendulum, one body only.
I have no idea, how big these terms should be.

I am doing this for no other purpose than to spend some time in my semi
retirement stage.
(I studied mechanical engineering 45 years ago).
If find this sumpy Kane's method fascinating!

I never looked at these quaternions, because we did not use them when I
studied. Maybe I should do it.

Take care,

Peter

On Tue 29. Jun 2021 at 14:09, Oscar Benjamin <oscar.j.benja...@gmail.com>
wrote:

> How do the op counts get into the tens or hundreds of thousands?
>
> When the expressions are that complicated I would have thought that it
> was faster and more numerically accurate to perform whatever symbolic
> operations are used to obtain those expressions using numerical
> routines. For example if a matrix is inverted symbolically it would be
> better to substitute your values and invert the matrix numerically
> etc. A 3D rotation can be computed very cheaply in floating point with
> quaternions.
>
> --
> Oscar
>
> On Tue, 29 Jun 2021 at 12:00, Peter Stahlecker
> <peter.stahlec...@gmail.com> wrote:
> >
> > Dear Jason,
> >
> > Thanks!
> > I tested it right away, and I counted the operations of an entry of rhs
> = KM.rhs()
> >
> > For ‚Body‘ I got the count 245,633
> > With the auxiliary frames the count was 13,235
> >
> > Thanks again and stay healthy!
> >
> > I will keep on testing this.
> >
> > Peter
> >
> >
> >
> >
> > On Tue 29. Jun 2021 at 12:32 Jason Moore <moorepa...@gmail.com> wrote:
> >>
> >> Peter,
> >>
> >> THey are equivalent other than one may provide a simpler set of
> direction cosine matrices and angular velocity definitions. The "Body"
> method should give simpler equations of motion in the end because we try to
> use pre-simplified forms of the equations. I don't know why you'd see
> faster with the intermediate frame method.
> >>
> >> You can use sympy's count_ops() function to see how many operations
> each symbolic form gives. The one with more operations should ultimately be
> slower when lambdified().
> >>
> >> Jason
> >> moorepants.info
> >> +01 530-601-9791
> >>
> >>
> >> On Tue, Jun 29, 2021 at 5:09 AM Peter Stahlecker <
> peter.stahlec...@gmail.com> wrote:
> >>>
> >>> When I want to do this, it seems to me there are these possibilities:
> >>>
> >>> 1.
> >>> A = N.orientnew(‚A‘, ‚Body‘, [q1, q2, q3], ‚123‘)
> >>> This does it in one step
> >>>
> >>> 2.
> >>> I use two intermediate frames and use the word ‚Axis‘ instead of ‚Body‘
> >>>
> >>> Geometrically, this should be the same, but it seems to me, that with
> the intermediate frames establishing Kane‘s equations, lambdifying them and
> doing the numerical integration is MUCH faster.
> >>>
> >>> Are methods 1 and 2 not equivalent, as I assumed, or am I doing
> something wrong?
> >>>
> >>> Thanks for any explanation!
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google
> Groups "sympy" group.
> >>> To unsubscribe from this group and stop receiving emails from it, send
> an email to sympy+unsubscr...@googlegroups.com.
> >>> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/d1597154-f8a8-42fa-b29b-6e8f57062441n%40googlegroups.com
> .
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups "sympy" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an email to sympy+unsubscr...@googlegroups.com.
> >> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CAP7f1AhvTHkfn8_Wc7L9i7em3QvDHn6MPBHoWwqvK9qOUw3QfA%40mail.gmail.com
> .
> >
> > --
> > Best regards,
> >
> > Peter Stahlecker
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "sympy" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to sympy+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CABKqA0bdrLLiCY7w3yG_3sPTmx7O4Z00tn-mLSssj0rvT4m9QA%40mail.gmail.com
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CAHVvXxSchAaF6rRig0zL9VF4w3MLyiVra2dZ4vp9vuYDdKyY0w%40mail.gmail.com
> .
>
-- 
Best regards,

Peter Stahlecker

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CABKqA0YU9scxVPj4E-SNx3Ka4-yATQd8WS1u5BPZskN-pkqpSg%40mail.gmail.com.

Reply via email to