Conservation of finite difference for vibration equations

Click For Summary
SUMMARY

The discussion centers on the conservation of energy in finite difference (FD) schemes applied to vibration equations, specifically the second-order ordinary differential equation (ODE) mx'' + kx = 0. It is established that energy conservation is influenced by both the time integration and the spatial discretization methods used in the FD scheme. The energy expression E = (1/2)(v^2 + x^2) is derived, highlighting that errors in numerical integration lead to changes in energy, denoted as ΔE. The conversation concludes with a query about the existence of conservative FD schemes for this vibration equation.

PREREQUISITES
  • Understanding of finite difference methods for numerical integration
  • Familiarity with ordinary differential equations (ODEs) and their energy formulations
  • Knowledge of error analysis in numerical methods
  • Basic concepts of dissipative and dispersive systems in physics
NEXT STEPS
  • Research "Conservative finite difference schemes for ODEs"
  • Explore "Error analysis in numerical integration of differential equations"
  • Study "Dissipative vs. dispersive numerical methods in physics"
  • Learn about "Energy conservation in partial differential equations (PDEs)"
USEFUL FOR

Mathematicians, physicists, and engineers involved in numerical analysis, particularly those working with vibration equations and finite difference methods.

feynman1
Messages
435
Reaction score
29
Let's discuss whether the energy under a finite difference (FD) scheme is conserved. Take the simplest vibration eq mx''+kx=0, which one will use a FD scheme to solve. The energy is mx'^2/2+kx^2/2. Whether the energy is conserved doesn't depend on the FD scheme for the ODE but upon the FD scheme for the x' term in the energy?
 
Physics news on Phys.org
THe example you have given is an ODE with two dimensions: <br /> \begin{align*}<br /> x&#039; &amp;= v \\ v&#039; &amp;= - x \end{align*} where time is scaled to that k/m = 1. Then the energy is E = \frac{12}(v^2 + x^2).

The result of your numeric integration is a sequence (x_n,v_n) which approximates the solution at time (t_n. But there will be errors, so x_{n+1} = x(t_{n+1}) + \epsilon_x(n) and similarly for v. Hence <br /> \begin{align*}<br /> E_{n} &amp;= \frac12 \left( (v(t_n) + \epsilon_v)^2 + (x(t_n) + \epsilon_x)^2 \right) \\<br /> &amp;= E(t_n) + v(t_n) \epsilon_v + x(t_n)\epsilon_x + \frac12 (\epsilon_v^2 + \epsilon_x^2).<br /> \end{align*}<br /> so assuming (x_n,v_n) is exact, at time t_{n+1} you will see that the energy has changed by an amount \Delta E = v(t_{n+1}) \epsilon_v(n+1) + x(t_{n+1})\epsilon_x(n+1) + \frac12 (\epsilon_v^2(n+1) + \epsilon_x^2(n+1))<br /> which in general is not zero.

So for a PDE the answer must be that whether or not energy is conserved depends on both the time integration and the spatial discretization.
 
  • Like
Likes   Reactions: feynman1
pasmith said:
THe example you have given is an ODE with two dimensions: <br /> \begin{align*}<br /> x&#039; &amp;= v \\ v&#039; &amp;= - x \end{align*} where time is scaled to that k/m = 1. Then the energy is E = \frac{12}(v^2 + x^2).

The result of your numeric integration is a sequence (x_n,v_n) which approximates the solution at time (t_n. But there will be errors, so x_{n+1} = x(t_{n+1}) + \epsilon_x(n) and similarly for v. Hence <br /> \begin{align*}<br /> E_{n} &amp;= \frac12 \left( (v(t_n) + \epsilon_v)^2 + (x(t_n) + \epsilon_x)^2 \right) \\<br /> &amp;= E(t_n) + v(t_n) \epsilon_v + x(t_n)\epsilon_x + \frac12 (\epsilon_v^2 + \epsilon_x^2).<br /> \end{align*}<br /> so assuming (x_n,v_n) is exact, at time t_{n+1} you will see that the energy has changed by an amount \Delta E = v(t_{n+1}) \epsilon_v(n+1) + x(t_{n+1})\epsilon_x(n+1) + \frac12 (\epsilon_v^2(n+1) + \epsilon_x^2(n+1))<br /> which in general is not zero.

So for a PDE the answer must be that whether or not energy is conserved depends on both the time integration and the spatial discretization.
Thank you very much for the analysis. I actually meant the same, that is I didn't mean to say that the FD scheme for the ODE doesn't affect but rather meant that the x' term in the energy would even if the FD scheme for the ODE gave an exact solution.
Your analysis is beautiful. Can we conclude that a FD scheme is either dissipative (positive/negative) or dispersive (positive/negative)? Is there any conservative FD scheme for this simplest vibration equation?
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 18 ·
Replies
18
Views
8K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
2
Views
1K
Replies
1
Views
1K