Recently I work on mechanical shocks (e.g. impact) in FE (fenics). I've already put together simple timesteppers (Euler, Crank-Nicolson). I use higher order basis, so I think of higher order time integration schemes like RK4. Is it worth the effort in mechanics?

I can't find any appropriate example of this method in elastic waves, so maybe it's pointless. I'm not sure, how to apply it in my case, since it's written in "incremental" form:

$$y_{i+1} = y_i+\frac{1}{6}(k_1+2k_2+2k_3+k_4)h$$

and I'm trying to apply it to system:

$$\begin{eqnarray*} \frac{\partial v}{\partial t} - \nabla u &=& f \\ \frac{\partial u}{\partial t} &=& v \end{eqnarray*}$$

  • $\begingroup$ Sorry to dig out this quite old thread but were you able to implement Runge Kutta time stepping on your FEniCS problem? I'm currently struggling to do just that. $\endgroup$
    – Tom Aubier
    Commented May 16, 2021 at 10:44

1 Answer 1


High order RK methods work fine for a large number of wave propagation (an elastic example using a DG discretization). The procedure is usually to discretize the spatial derivatives in the first order form of the wave equation. This is called semi-discretization and it results in a system of ODEs involving a vector of solution coefficients $U$ (for both $u$ and $v$).

$\frac{dU(t)}{dt} = AU(t)$

where $A$ is defined by your choice of discretization and the wave equation you want to solve. You can then apply Runge-Kutta methods directly to the equation - this involves computing RHS evaluations. Since the wave equation is linear, marching from $t_n$ to $t_n + dt$ with RK4 method requires computing four vectors

$\begin{align*} k_1 &= AU(t_n)\\ k_2 &= A(U(t_n) + ({dt/2}) k_1)\\ k_3 &= A(U(t_n) + ({dt/2}) k_2)\\ k_4 &= A(U(t_n) + (dt) k_3) \end{align*}$

then computing the final update $U(t_n + dt) = \frac{dt}{6}(k_1+2k_2+2k_3+k_4)$. Repeat this to march forward in time again.

  • $\begingroup$ Thank You for the attached paped, it turned out really useful. I have some more 'implementation' problems, that I posted in another question. $\endgroup$
    – bjp
    Commented Feb 6, 2016 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.