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)
1 view (last 30 days)
Show older comments
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
Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!