i have to add, that i tried ode45 first and since it is slow and a low order method is faster i guess it is a stiff system. But all stiff solvers quit at ¨ 0.4 seconds instead of 2 seconds.
method of lines PDE which solver to use (stiff solvers are fast but quit earlier)
5 次查看(过去 30 天)
显示 更早的评论
Hi,
I implemented the phenomenological sedimentation model in MATLAB via the method of lines. It works but i am not sure which solver is suited best: Below the call of the solver. The complete files are at: https://www.dropbox.com/l/PeyxXQfu8c4xtVipSwdKJe (Start with the file CallPhenSettlModel.m)
TSPAN=[0 2];
OPTIONS =[];
f=@PhenSettlModel;
tic
% ode113 takes 96 seconds
% ode15s takes 7 seconds but it stops earlier
% ode23s takes 53 secons same solution as ode15s NaN occurs
% ode23t stops at 0.4 seconds takes 5 seconds
% ode45 takes 160 seconds
% ode23tb stops at 0.4 seconds and takes 5 seconds
[T Y] = ode23tb(f,TSPAN,v,OPTIONS,r0,rb,omega,g,N,xcen,theta,Au,uclose)
toc
close all
surf(Y,'EdgeColor','none')
Any comments are appreciated.
Moritz
回答(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!