help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DAE daspk solver problem


From: Lazy_Tom
Subject: Re: DAE daspk solver problem
Date: Sat, 29 Oct 2016 05:01:32 -0700 (PDT)

Bill Greene-3 wrote
> I was able to solve this using ode5r from odepkg. My test code is below:
> 
> function radau5PendulumDAE
> 
> vopt = odeset ('InitialStep', 1e-3, 'AbsTol', 1e-8);
> len=1; theta0=pi/2; m=1; g=9.81;
> y0=[ len*sin(theta0), -len*cos(theta0), 0, 0, m*g];
> odef = @(t,x) odeFunc (t, x, m, g, len)
> sol=ode5r (odef, [0, 5], y0, vopt);
> figure; plot(sol.x, sol.y(:,1));
> end
> 
> function y = odeFunc (t, x, m, g, len)
> lam = x(5);
> y=[x(2); -lam*x(1); x(4); -lam*x(3)-m*g; x(1)^2 + x(3)^2 - 1];
> end

Hi Bill,

I don't think your description is correct, at the moment you are solving a
regular ODE. The solver is not aware that the last equation doesn't contain
the derivative of x(5). And this needs to be specified with odeset 'Mass'
option and other parameters

Out of curiosity, getting odest documentation (command 'doc odepkg' doesn't
work on my windows release) and odepkg.pdf document has been a problem. The
pdf is mentioned in odeset help, odepkg help and website
(http://octave.sourceforge.net/odepkg/overview.html) but to the best of my
knowledge the actual location of it doesn't exist. In fact, after installing
the odepkg I did a search odepkg.pdf on my octave directory with no results.
What I've found though is an odepkg.texi file which is indeed the package
manual but it's not a pdf.

This is how I finally found out about the 'Mass' option (yes there is a tiny
example in odepkg_examples_dae but I don't think this is enough)

Do you or anyone else have this problem as well?

Marco



--
View this message in context: 
http://octave.1599824.n4.nabble.com/DAE-daspk-solver-problem-tp4680377p4680415.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]