Implicit Euler method with adaptive time step and step doubling

Click For Summary
SUMMARY

This discussion focuses on implementing an ODE solver using the implicit Euler method with adaptive time stepping and error estimation through step doubling. The key challenge is determining the error estimating formulas specific to the implicit (Backward Euler) method, as existing resources primarily address Runge-Kutta methods. The error estimate is defined as the absolute difference in dependent variables when advancing with a step size of ##h## and half that size, ##h/2##. For practical implementation, the GNU Scientific Library (GSL) provides a framework for adaptive step size control, which can be adapted for this method.

PREREQUISITES
  • Understanding of Ordinary Differential Equations (ODEs)
  • Familiarity with the implicit Euler method (Backward Euler)
  • Knowledge of adaptive time stepping techniques
  • Experience with error estimation methods in numerical analysis
NEXT STEPS
  • Study the GNU Scientific Library (GSL) documentation on adaptive step size control
  • Research error estimation techniques specific to implicit methods
  • Implement a simple ODE solver using the implicit Euler method for a mechanical particle
  • Explore numerical modeling of unsaturated fluid flow for practical applications
USEFUL FOR

Mathematicians, numerical analysts, and software developers involved in solving initial value problems using ODEs, particularly those interested in adaptive methods and error control in numerical simulations.

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
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 15 ·
Replies
15
Views
33K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
8K
Replies
1
Views
2K