Conservation of finite difference for vibration equations

• I
• feynman1
In summary, the conversation discusses whether the energy in a finite difference scheme is conserved for a given ODE. The energy for a simple vibration equation can be expressed as a function of x and v. However, due to errors in the numeric integration, the energy at a future time will not be exact, leading to a change in energy. This means that for a PDE, energy conservation depends on both time integration and spatial discretization. The conversation also mentions the possibility of a dissipative or dispersive FD scheme and whether there is a conservative FD scheme for the equation.
feynman1
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?

THe example you have given is an ODE with two dimensions: \begin{align*} x' &= v \\ v' &= - 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 \begin{align*} E_{n} &= \frac12 \left( (v(t_n) + \epsilon_v)^2 + (x(t_n) + \epsilon_x)^2 \right) \\ &= E(t_n) + v(t_n) \epsilon_v + x(t_n)\epsilon_x + \frac12 (\epsilon_v^2 + \epsilon_x^2). \end{align*} 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))$$ 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.

feynman1
pasmith said:
THe example you have given is an ODE with two dimensions: \begin{align*} x' &= v \\ v' &= - 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 \begin{align*} E_{n} &= \frac12 \left( (v(t_n) + \epsilon_v)^2 + (x(t_n) + \epsilon_x)^2 \right) \\ &= E(t_n) + v(t_n) \epsilon_v + x(t_n)\epsilon_x + \frac12 (\epsilon_v^2 + \epsilon_x^2). \end{align*} 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))$$ 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?

1. What is the conservation of finite difference for vibration equations?

The conservation of finite difference for vibration equations is a mathematical principle that states that the total energy of a vibrating system remains constant over time. This means that the sum of the kinetic and potential energies at any given time will always equal the total energy of the system.

2. Why is the conservation of finite difference important in vibration equations?

This principle is important because it ensures the accuracy and stability of numerical methods used to solve vibration equations. If the energy of the system is not conserved, the solutions obtained may be incorrect or diverge over time.

3. How is the conservation of finite difference achieved in vibration equations?

The conservation of finite difference is achieved by using numerical methods that are designed to preserve the energy of the system. These methods, such as the central difference method and the Newmark method, take into account the energy contributions from both the kinetic and potential terms in the equations.

4. What are the consequences of violating the conservation of finite difference in vibration equations?

If the conservation of finite difference is not satisfied, the solutions obtained may exhibit unphysical behavior such as energy growth or decay. This can lead to inaccurate results and make it difficult to predict the behavior of the vibrating system.

5. Are there any limitations to the conservation of finite difference in vibration equations?

While the conservation of finite difference is an important principle in numerical methods for vibration equations, it is not always possible to achieve perfect energy conservation. In some cases, small errors or approximations may be necessary to ensure numerical stability and accuracy.

• Differential Equations
Replies
7
Views
4K
• Differential Equations
Replies
7
Views
791
• Differential Equations
Replies
16
Views
2K
• Differential Equations
Replies
1
Views
2K
• Introductory Physics Homework Help
Replies
2
Views
312
• Calculus and Beyond Homework Help
Replies
7
Views
1K
• Introductory Physics Homework Help
Replies
9
Views
340
• Introductory Physics Homework Help
Replies
3
Views
250
• Differential Equations
Replies
6
Views
2K
• Differential Equations
Replies
1
Views
2K