- Initialization: The solver needs to initialize the integration process, which involves estimating an appropriate initial step size. This initialization may require evaluating the derivative function at t = 0 multiple times to gather information about the system's behaviour.
- Step Size Adjustment: During the initialization phase and throughout the integration process, the solver may adjust the step size dynamically to ensure accuracy and stability. This adjustment may involve evaluating the derivative function at t = 0 and at other points to determine an optimal step size for the next integration step.
- Adaptive Time Stepping: Many numerical solvers use adaptive time-stepping techniques, where the step size is adjusted based on the local behaviour of the solution. This adaptation process may lead to additional evaluations of the derivative function at t = 0 and other points to refine the integration.
- Event Handling: If your system includes events (e.g., discontinuities, zero crossings), the solver may need to refine the solution around these events, which could result in additional evaluations of the derivative function at t = 0 and other relevant points.
- According to the official MathWorks documentation available here https://www.mathworks.com/help/releases/R2021a/matlab/ref/ode15s.html#bu8tot8:~:text=the%20solver%20detected.-,Algorithms,-ode15s%20is%20a , the solver can optionally use backward differentiation formulas (BDFs, also known as Gear's method) that are usually less efficient.
ode15s Preparation
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi all
I notice that when I use ode15s (or any other solver, really), it calls my derivative function ("odefun") multiple times at t=0 (given tspan=[0 T]). It seems the larger the problem, the more times odefun is called at t=0. What is it evaluating?
For more info, these t=0 calls are before the backwards steps taken (to estimate an appropriate initial step size I guess).
Calls at 0 step size also seem to occur throughout integration. Not sure if it's for the same purpose as the first set of t=0 (and so 0 step size) calls.
Thanks in advance.
MATLAB2021a
댓글 수: 0
답변 (1개)
Samay Sagar
2024년 5월 24일
When using numerical solvers like "ode15s", multiple calls to the derivative function ("odefun") at t = 0 can occur for various reasons:
Hope this helps !
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!