ode45 integration tolerances

1 vue (au cours des 30 derniers jours)
hilal duran
hilal duran le 9 Sep 2020
Commenté : hilal duran le 9 Sep 2020
I am getting a warning 'Warning: Failure at t=5.672199e-11. Unable to meet integration tolerances without reducing the step size below the smallest value allowed
(1.033976e-25) at time t.
> In ode45 (line 360) '
As a result of this warning message I am getting my graph missing. the last part of my graphic is missing. How can I fix this problem. Here I am adding the related part of my code.
options = odeset('RelTol',1e-1,'AbsTol',1e-10);
[tt,N]=ode45('Fd3gainsw',tt,NNo,options);
tt=3000x1 double
NNo=5x1
  2 commentaires
Ameer Hamza
Ameer Hamza le 9 Sep 2020
This is likely caused by a singularity in the ODEs. Can you show the equations?
hilal duran
hilal duran le 9 Sep 2020
yes.
fes=1-(N(2)/(4*N0));
fgs=1-(N(3)/(2*N0));
twe=1./(Aw+Cw*N(1));%6.3e-12;
teg=1./(Ae+Ce*N(1));%2.9e-12;
twg=twe;
tge=(1/2)*teg*exp(Eeg/KbTev);%10.4e-12;
tew=(4/10)*twe*exp(Ewe/KbTev);%2.7e-9;
OP=(p*rl)/(0.84*q);
z(1)=I/(q*Va)-fes*(N(1)/twe)-fgs*(N(1)/twg)-N(1)/twr+N(2)/tew;
z(2)=fes*(N(1)/twe)+fes*(N(3)/tge)-fgs*(N(2)/teg)-N(2)/tew-N(2)/ter-ge*(0.5*N(2)-N0)*N(4)/(1+ep*N(4))...;
+ge*(0.5*N(2)-N0)*N(4)*OP/(1+ep*N(4));
z(3)=fgs*(N(1)/twg)+fgs*(N(2)/teg)-fes*(N(3)/tge)-N(3)/tr-g*(N(3)-N0)*N(5)/(1+ep*N(5));
z(4)=ge*(0.5*N(2)-N0)*N(4)/(1+ep*N(4))+gam*bet*N(2)/ter-N(4)/tp;
z(5)=g*(N(3)-N0)*N(5)/(1+ep*N(5))+gam*bet*N(3)/tr-N(5)/tp;

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by