Solving very stiff system of ODE's

2 Ansichten (letzte 30 Tage)
Niles Martinsen
Niles Martinsen am 13 Sep. 2012
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.

Antworten (1)

Sean de Wolski
Sean de Wolski am 13 Sep. 2012
Give it a better x0

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by