Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: How to handle large number of equations in ODE system?
Replies: 2   Last Post: Jul 11, 2012 6:36 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bjorn Gustavsson

Posts: 411
Registered: 12/7/04
Re: How to handle large number of equations in ODE system?
Posted: Jul 11, 2012 6:36 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hatoddyam Toto <bhattacharyya.samit@gmail.com> wrote in message <e159994a-a8d3-4370-bf4f-bc4e4faf1a41@googlegroups.com>...
> Hi All,
> I have a system of ODE which has 900 equations. I used for loop to write it (because of similarity in equations, I can group them in 10 or so and used FOR loops to write them).
>
> It is taking much longer than I expect to simulate.
>
> Is there any other way (without using FOR-loop) that I can simulate this large system.
>
> thanks,
> Hato
>

Hato, if it so happens that some of your equations makes the solver take short steps in time during one time interval and some other equations forces the solver to take short steps in time during another time interval, then the solver will take short time-steps for all 900 equations during both those intervals. So if you've grouped several sets of ODEs to solve simultaneously even though there is no coupling between the sets, you might be better off calling the solver for each set separately and not combine them into one 900-equation ODE. I once had a problem where I needed to solve the equations of motion for a number of independent particles - way slower to combine them into one ODE, better to solve for each particle individualy.

Very general and vague...

HTH
Bjeorn



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.