How do i solve huge coupled first order differential equations
1 次查看(过去 30 天)
显示 更早的评论
Hello all,
I have a system of 25 coupled first order constant coefficient linear differential equations (time evolution of a multistep reaction). The problem is I want to calculate the solution upto say 100 microseconds. I am able to calculate upto 1 microsecond using ode45 (which itself gives an array of 16912805 data points). Anything 3 microseconds and above crashes my computer completely.
Is there any way I can solve this problem? a user defined function or an ode solver which allows me to input the timestep (because when i read the documentation for ode45, i found out that the time step is controlled internally and thus i cant specify a larger timestep to save computation time).
2 个评论
采纳的回答
Star Strider
2021-7-17
The integration times are adaptive, however it is possible control the points at which the differential equation system is evaluated and appear in the output.
For example to integrate at 100 points between 0 and 100 microseconds, this could work:
tspan = linspace(0, 1E-4, 100);
Use that (or something similar) for ‘tspan’ in your system to see if it does what you want.
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!