Graduate Implicit Euler method with adaptive time step and step doubling

Click For Summary
The discussion focuses on implementing an ODE solver for the implicit Euler method with adaptive time stepping and error estimation using step doubling. The main challenge is finding the appropriate error estimating formulas for the implicit method, as most resources pertain to Runge-Kutta methods. An error estimate can be calculated as the absolute difference between results using a full step and half the step size. To adjust the timestep based on error estimates, users are encouraged to refer to the GNU Scientific Library's adaptive step size control implementation. Testing the method with simple mechanical problems, like a particle interacting with a potential wall, is suggested to validate the approach.
the_dane
Messages
29
Reaction score
0
For Initial Value problems I want to implement an ODE solver for implicit Euler method with adaptive time step and use step doubling to estimate error. I have found some reading stuff about adaptive time step and error estimation using step doubling but those are mostly related to RK methods. I can't find how the error estimating formulas look like for the implicit (Backward Euler) method.

Have any of you worked with this topic and can help me find the right formulas to implement? I am mostly confused about how to update the size timestep each at each step.

( I have looked at this article but it does not really help me find what I am looking for https://www.newcastle.edu.au/__data...rical-modelling-of-unsatuarted-fluid-flow.pdf )
 
Last edited:
Physics news on Phys.org
the_dane said:
For Initial Value problems I want to implement an ODE solver for implicit Euler method with adaptive time step and use step doubling to estimate error. I have found some reading stuff about adaptive time step and error estimation using step doubling but those are mostly related to RK methods. I can't find how the error estimating formulas look like for the implicit (Backward Euler) method.
The error estimate is simply the absolute value of the difference in the dependent variable(s) when advancing using a given step ##h## and half that step, ##h/2##.

To figure out how to modify the step if the error estimate is outside an acceptable range, you can take inspiration from how it is implemented in GSL:

https://www.gnu.org/software/gsl/doc/html/ode-initval.html#adaptive-step-size-control
 
You could try to test it first for some relatively simple example, such as the equation of motion of a classical mechanical particle that hits a very hard wall from the left side. The "wall" could be modeled with a (dimensionless) potential energy like

##V(x) = \left\{\begin{array}{c} 0,\hspace{20pt}x<0 \\ 10^4 x,\hspace{20pt}x>0\end{array}\right.##

or

##V(x) = \left\{\begin{array}{c} 0,\hspace{20pt}x<0 \\(x+1)^{20} \hspace{20pt}x>0\end{array}\right.##

If the timestep is too long, the particle will bounce back with a speed that clearly breaks conservation of energy.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 15 ·
Replies
15
Views
32K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
8K
Replies
1
Views
2K
  • · Replies 15 ·
Replies
15
Views
34K