help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ode23s, requested step-size too small


From: Juan Pablo Carbajal
Subject: Re: ode23s, requested step-size too small
Date: Fri, 5 Apr 2013 19:31:28 +0200




On Fri, Apr 5, 2013 at 6:54 PM, Torstein Fjermestad <address@hidden> wrote:
Dear all,

I am trying to solve a set of ordinary differential equations with ode23s.

In the output I get the following error message:



ode23s: requested step-size too small at t = 0, h = 4.65661e-10, err = -3.87203e-06
ode23s: requested step-size too small at t = 0.000770534, h = -0.000766662, err = 4.49164e-23
ode23s: requested step-size too small at t = 2.37561e-37, h = -4.2693e-37, err = -4.62411e-41
ode23s: requested step-size too small at t = 6.73057e-48, h = 1.57155e-50, err = 3.98936e-47
ode23s: requested step-size too small at t = 3.98936e-47, h =
error: called from 'ode23s' in file /home/torstein/octave/odepkg-0.8.4/ode23s.m near line 193, column 10
error: called from:
error:   /usr/local/share/octave/3.6.4/m/miscellaneous/run.m at line 55, column 7


I am calling the ode23s function in the following way:


opt=odeset("InitialStep", 1e1,"RelTol", 1e-9, "AbsTol", 1e-12,"NormControl", "on","MaxStep",1e1);
[vt,y]= ode23s(f,[0 endTime],Z0,opt);

Is there a way to get rid of the error message?

The problem I am trying to solve is a microkinetic analysis on a network of elementary reactions.
The rate constants are in the range from 10^-7 to 10^12 so the system is quite stiff.

Thanks in advance for your help.

Yours sincerely,

Torstein Fjermestad
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave

Try starting with a smaller time step
like
opt=odeset("InitialStep", 1e-6,"RelTol", 1e-9, "AbsTol", 1e-12,"NormControl", "on","MaxStep",1e1);

If this doesn't work try using lsode which maybe more robust with stiff systems. The onyl thing you need to change is the order of the x and t arguments for your ode function.

Anyways, realize that you are hitting a numerical problem, not an Octave problem, so you may not get help from this mailing... unless somebody knows about your problem/equations and has time to answer.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]