Error using deval in pde toolbox
1 回表示 (過去 30 日間)
古いコメントを表示
Hello all,
I am having a problem with solving a highly non-linear problem using pde toolbox. I got an error as shown below,
Warning: Failure at t=1.307250e+00. Unable to meet integration tolerances without reducing the step size below the smallest value
allowed (3.552714e-15) at time t.
> In ode15s (line 668)
In pde.EquationModel/solveTimeDependent (line 104)
In pde.PDEModel/solvepde (line 54)
In SugarCreek_2D_Upgraded091419 (line 52)
Error using deval (line 132)
Attempting to evaluate the solution outside the interval [0.000000e+00, 1.307250e+00] where it is defined.
Error in pde.EquationModel/solveTimeDependent (line 105)
[y,yp] = deval(sol,tlist);
Error in pde.PDEModel/solvepde (line 54)
[u,dudt] = self.solveTimeDependent(coefstruct, u0, ut0, tlist, ...
Error in SugarCreek_2D_Upgraded091419 (line 52)
results = solvepde(model,tlist);
I used the debugger tool, and set the breakpoint at line 52 as shown in the error message, and set it pause at NaN or Inf, message as shown below was shown
NaN/Inf breakpoint hit for PDESolverOptions.m on line 75.
75 obj.ResidualNorm = Inf;
Part of the codes for this PDESolverOptions.m is as shown below
methods(Hidden=true, Access={?pde.EquationModel})
function obj=PDESolverOptions()
obj.AbsoluteTolerance = 1e-6;
obj.RelativeTolerance = 1e-3;
obj.ResidualTolerance = 1e-4;
obj.MaxIterations = 25;
obj.MinStep = 1/2^16;
obj.ResidualNorm = Inf;
obj.ReportStatistics = 'off';
end
function delete(obj)%#ok
end
end
And Line 75 is
obj.ResidualNorm = Inf;
Is there any way to solve this issue? Or are there any other places I should check?
Thank you very much!
Best regards,
SS
0 件のコメント
採用された回答
Ravi Kumar
2019 年 9 月 19 日
Hi SS,
The warning:
Warning: Failure at t=1.307250e+00. Unable to meet integration tolerances without reducing the step size below the smallest value
allowed (3.552714e-15) at time t.
means ode integrater failed to solve the nonlinear problem. This could happen to many reasons, most significantly the initial conditions. Sometimes nonlinear problem would not converge to a solution. Just to ensure this is not happening due to modelling error, you might want to try a simpler case of the problem where you know solution exists.
Regards,
Ravi
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で PDE Solvers についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!