WICHTIG: Der Betrieb von goMatlab.de wird privat finanziert fortgesetzt. - Mehr Infos...

Mein MATLAB Forum - goMatlab.de

Mein MATLAB Forum

 
Gast > Registrieren       Autologin?   

Partner:




Forum
      Option
[Erweitert]
  • Diese Seite per Mail weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

non linear ordinary differential equations ?

 

Tommy7571

Gast


Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 18.10.2018, 10:55     Titel: non linear ordinary differential equations ?
  Antworten mit Zitat      
Hello,

I have a a system of 20 coupled nonlinear ordinary differential equations, each equation being of the type

dxi/dt =∑ ki*xi*xj

with i, j = 1 to 20 (and xi=xi(t) being the integrated function of dxi/dt).

As far as I understand, these equations are not linear ordinary differential equations anymore. They are also different from most equations I saw before.
To solve it, I tried lode45 but I got an error x(i) (=xi) out of bounds =1 after the first term. Since it is for linear differential equations, I suppose that no products of functions are aloud.
How can I solve this numerically with Octave?

Is there a solver available?

Thanks

Regards

Tommy7571


Tommy7571

Gast


Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 18.10.2018, 17:09     Titel: non linear ordinary differential equations ?
  Antworten mit Zitat      
Hello,

In fact I thought it is a problem due to the non linear terms of my system but I was wrong. I could resolve the Robertson problem (online for matlab) using ode15s.

Code:

# y1' = -0.04'y1+10^4*y2*y3;
# y2' = 0.04*y1-10^4*y2*y3-3*10^7*y2^2
# y3' = 3E7*y2^2
#the conservation law is
#  y'(1) +   y'(2)   +   y'(3) = 0      
 #with initial conditions the conservation law is
#  y(1) +   y(2) + y(3) = 1        

function dy = f(t,y)
 #dy/dt = [0 ; 0 ;  0];
 #dy(1)/dt  = -0.04*y(1)+(10^4)*y(2)*y(3);                    
 #dy(2)/dt  = 0.04*y(1)-(10^4)*y(2)*y(3)-(3*10^7)*y(2)^2;   #
 #dy(3)/dt  = 3E7*y(2)^2;
 
 dy = [-0.04*y(1) + 1e4*y(2).*y(3) ;   0.04*y(1) - 1e4*y(2).*y(3) - 3e7*y(2).^2  ;  y(1) + y(2) + y(3) - 1 ];    
endfunction
 



I gave a value for x(6)0 as initial value so the term is similar to that of the Robertson System . I did not give a mass conseration in the options by 'mass' is this obligatory?

Thanks

Regards

Tommy7571
 
Neues Thema eröffnen Neue Antwort erstellen



Einstellungen und Berechtigungen
Beiträge der letzten Zeit anzeigen:

Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen
.





 Impressum  | Nutzungsbedingungen  | Datenschutz | FAQ | goMatlab RSS Button RSS

Hosted by:


Copyright © 2007 - 2024 goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks

MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.