method of lines PDE which solver to use (stiff solvers are fast but quit earlier)

2 visualizaciones (últimos 30 días)
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
  1 comentario
Moritz
Moritz el 21 de Jul. de 2013
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by