[scilab-Users] problem with scilab

CRETE Denis denis.crete at thalesgroup.com
Fri Jul 22 10:06:27 CEST 2011


Hello,
This is what I meant when I suggested to remove the singularity, and seems to be close to what you want; and it runs smoothly with Scilab 5.3.2 for a slightly larger domain of parameters (limited by deltaPsB >~0.943, for gsR=10) than without singularity removal.

function [Xprime]=VanDerPol(t, X)
if X(1)== %pi/2 then singularity=0; else singularity=(1-sin(X(1)))/(%pi/2-X(1)); end;
Xprime(1) = X(2)
Xprime(2) = gsR*singularity -deltaPsB*X(2)^2/(%pi/2-X(1))
endfunction
gsR=10;
deltaPsB=1;
t=linspace(0,10,10000); X0=[85*%pi/180;0];
[u]=ode(X0,0,t,VanDerPol);
xset('window',0);
plot(t,u(1,:)*180/%pi,'r')
xset('window',2);
// plot(t,R*u(2,:))
plot(t,u(2,:))

This suggests that the 2nd singularity (last term scaled with deltaP) is the reason for the problem. Furthermore, I don't understand the physical meaning of this term W'²/W...


In addition, it behaves as one expects: as the motion is damped by the second term, is goes slowly (if deltaPsB is large) towards X=%pi/2. I doubt that with such an equation you can find an oscillatory behaviour (which is what the Van der Pol equation should describe, shouldn't it ?-)
Denis

De : arnaud dujeu [mailto:fangorn813 at hotmail.com]
Envoyé : jeudi 21 juillet 2011 16:20
À : users at lists.scilab.org
Objet : RE: [scilab-Users] problem with scilab

In fact I have try several methods and no one is working, do you know if it's possible with scilab to plot alpha(t) and alpha'(t) when the differential equation is like :
alpha''(t) = A*(1-sin(alpha(t)))/(pi/2-alpha(t))-B*(alpha'(t))^2/(pi/2-alpah(t))

What would be the function to use ?


________________________________
Date: Thu, 21 Jul 2011 14:06:16 +0200
From: Serge.Steer at inria.fr
To: users at lists.scilab.org
Subject: Re: [scilab-Users] problem with scilab


What do you mean by "it doesn't work." error message?, unexpected results?

I was not able to run it because g R DeltaP and B are undefined.


Serge Steer
INRIA

Le 21/07/2011 11:25, arnaud dujeu a écrit :
Hi,

I've got a problem to solve a non linear differential equation, which is :

y1'=A*(1-sin(y2))/(pi/2-y2)-B*y1^2
y2'=y1


I'm using ode :


function [Xprime]=VanDerPol(t, X)



 Xprime(1) = X(2)

 Xprime(2) = g/R*(1-sin(X(1)))/(%pi/2-X(1))-deltaP/(B*(%pi/2-X(1)))



endfunction



 t=linspace(0,4,3000); X0=[85*%pi/180;0];

 [u]=ode(X0,0,t,VanDerPol);



plot(t,u(1,:)*180/%pi,'r')

 plot(t,R*u(2,:))





but it doesn't work.



Do you know why?



Best regards.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110722/20659c61/attachment.htm>


More information about the users mailing list