Conservation of finite difference for vibration equations

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.
  • #1
feynman1
435
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
  • #2
THe example you have given is an ODE with two dimensions: [tex]
\begin{align*}
x' &= v \\ v' &= - x \end{align*}[/tex] where time is scaled to that [itex]k/m = 1[/itex]. Then the energy is [itex]E = \frac{12}(v^2 + x^2)[/itex].

The result of your numeric integration is a sequence [itex](x_n,v_n)[/itex] which approximates the solution at time [itex](t_n[/itex]. But there will be errors, so [itex]x_{n+1} = x(t_{n+1}) + \epsilon_x(n)[/itex] and similarly for [itex]v[/itex]. Hence [tex]
\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*}
[/tex] so assuming [itex](x_n,v_n)[/itex] is exact, at time [itex]t_{n+1}[/itex] you will see that the energy has changed by an amount [tex]\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))
[/tex] 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 feynman1
  • #3
pasmith said:
THe example you have given is an ODE with two dimensions: [tex]
\begin{align*}
x' &= v \\ v' &= - x \end{align*}[/tex] where time is scaled to that [itex]k/m = 1[/itex]. Then the energy is [itex]E = \frac{12}(v^2 + x^2)[/itex].

The result of your numeric integration is a sequence [itex](x_n,v_n)[/itex] which approximates the solution at time [itex](t_n[/itex]. But there will be errors, so [itex]x_{n+1} = x(t_{n+1}) + \epsilon_x(n)[/itex] and similarly for [itex]v[/itex]. Hence [tex]
\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*}
[/tex] so assuming [itex](x_n,v_n)[/itex] is exact, at time [itex]t_{n+1}[/itex] you will see that the energy has changed by an amount [tex]\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))
[/tex] 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?
 

FAQ: Conservation of finite difference for vibration equations

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.

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.

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.

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.

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.

Similar threads

Back
Top