Unable to meet integration tolerances without reducing the step size problem.

Hello Everyone.
I am facing 'Warning: Failure at t=0.000000e+00. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (7.905050e-323) at time t, error for the following code. How can I fix it.
clc
clear all
A =1.4036e-18;
B = 3.4302e-18;
e=1.60217663e-19;
T_e=3;
f = @(t,x) [(sqrt(A/x(1)))*(-x(4)-(0.424)+(1.6977)*exp(-(e/T_e)*(x(1))));
(sqrt(A/x(1)))*(x(4)-(0.663)+(2.6540)*exp(-(e/T_e)*(x(2))));
-(2.994*10^5)*x(4);
((x(1))-(x(2))+x(3)+60*(cos(t)))-2.55*10^7*x(4)];
[t,xa] = ode15s(f,[0, 80],[0,0,-62,0]);
figure(1)
plot(t,xa(:,1),'Color','blue'),grid on;
title('xa1')
xlabel('t'), ylabel('Qsp (Powered Electrode Sheath Voltage)')

답변 (1개)

Torsten
Torsten 2023년 2월 7일
You define an initial condition for x(1) as 0, but you divide by x(1) in equations 1 and 2.
This won't work.

댓글 수: 3

Yes. Evaluating the ODE function at the initial conditions:
A =1.4036e-18;
B = 3.4302e-18;
e=1.60217663e-19;
T_e=3;
f = @(t,x) [(sqrt(A/x(1)))*(-x(4)-(0.424)+(1.6977)*exp(-(e/T_e)*(x(1))));
(sqrt(A/x(1)))*(x(4)-(0.663)+(2.6540)*exp(-(e/T_e)*(x(2))));
-(2.994*10^5)*x(4);
((x(1))-(x(2))+x(3)+60*(cos(t)))-2.55*10^7*x(4)];
init = f(0, [0,0,-62,0])
init = 4×1
Inf Inf 0 -2
A function with an infinite rate of change at the initial point seems like a Bad Thing.
@Steven Lord, If I chose nonzero initial conditions will it solve my problem. I didnt do it because It takes too much time to solve
If I chose nonzero initial conditions will it solve my problem.
Nobody knows. Just try it.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2023년 2월 7일

댓글:

2023년 2월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by