Solving very stiff system of ODE's

조회 수: 2 (최근 30일)
Niles Martinsen
Niles Martinsen 2012년 9월 13일
Hi
I have the following system of ODEs (a very stiff system!):
eoms = @(t,x) [
3.9e3 + 4.8e4*x(3) - 3.9e3*0.02*x(1);
3.9e3*0.2*x(1) - x(2)*3.3e3;
2.2e3*x(2) - 4.8e4*x(3) + heaviside(t-1)*x(5)*2.8e7;
1.1e3*x(2) - heaviside(t-1)*4.7e7*x(4);
heaviside(t-1)*(4.7e4*x(4) - 2.8e7*x(5)-9.0e6*x(5))];
x0 = [0 0 0 0 0];
tspan = [0 1];
[t, x] = ode23s(eoms, tspan, x0);
figure(1)
plot(t, x(:, 1))
When I run the script, I get the message: "Failure at t=1.000000e+000. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (3.552714e-015) at time t."
I'm not quite sure if I can do anything about it, but I thought that I should ask in here first. The timestep can't get any lower -- and I am already using a solver suitable for stiff systems. Do I have any options left?
Best, Niles.

답변 (1개)

Sean de Wolski
Sean de Wolski 2012년 9월 13일
Give it a better x0

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by