Path: news.mathworks.com!not-for-mail
From: James Allison <james.allison@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: high stiff problem
Date: Fri, 19 Feb 2010 11:25:45 -0500
Organization: The MathWorks, Inc.
Lines: 41
Message-ID: <hlme2a$ak2$1@fred.mathworks.com>
References: <hlljhg$n5l$1@fred.mathworks.com>
NNTP-Posting-Host: jallison-maci.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1266596746 10882 144.212.115.192 (19 Feb 2010 16:25:46 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 19 Feb 2010 16:25:46 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
In-Reply-To: <hlljhg$n5l$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:609755


Have you tried any of our solvers meant specifically for stiff systems, 
such as ode15s, ode23s, ode23t, ode23tb?

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/ode23.html

Also, I'm not sure if I understand the equation exactly. Is it:

dCa/dt = k*Ca*Cb

where k and Cb are constants? Is Ca the only state variable? If so, the 
sign of k*Cb must be negative for the system to be stable. Can I assume 
from what you say that Cb < 10e-7? If this is the case, and k and Cb are 
constants, then abs(k*Cb) < 1, and the system has slow dynamics and is 
not stiff (but perhaps unstable?).

-James

nico cruz wrote:
> Hi,
> 
> I am trying to simulate an almost spontaneous reaccion.
> 
> this means that the differential equation is very very stiff.
> 
> dCdt = k*Ca*Cb
> 
> Cb =~ 0 and k = 1e7.
> 
> because the concentration of Cb is so near to 0 and, due to numerical 
> error becommes negative sometimes, the solvers make to small steps that 
> need many iterations to solve the problem.
> 
> I have tried nonnegative and other ways to avoid Cb being negative, but 
> the solvers doesnt seem to be able to solve it fast.
> 
> I am also prety shure I tryed all the solvers available.
> 
> Is there a way to overcome this problem without having to change my 
> equation?
> 
> Is there I solver I might have overseen?