29.5. Energy conservation of integration schemes#
Energy conservation can be discussed with:
the Jacobian of the transformation induced by one-step of the method, \(\mathbf{z}_n \mapsto \mathbf{z}_{n+1}\)
the change of energy \(\Delta E = E_{n+1} - E_n\)
Energy conservation is discussed here for Hamiltonian systems, see simplectic integrators
or for second-order mechanical systems
with \(\mathbf{f} = - \partial_{\mathbf{x}} V(\mathbf{x})\).
The Hamiltonian function \(H(\mathbf{q}, \mathbf{p})\) can be thought as the energy as a function of the generalized coordinates \(\mathbf{q}\) and the generalized momenta \(\mathbf{p}\). For Hamiltoninan system, where the Hamiltonian function is independent from time, the Hamiltonian (the energy) is conserved along the trajectories of the system,
The second-order mechanical system is conservative if with \(\mathbf{f} = - \partial_{\mathbf{x}} V(\mathbf{x})\), as the total mechanical energy
is conserved along the evolution of the system. This second-order system can be written - if \(\mathbf{M}\) is invertible - as a first-order system as
or as a first-order system with Hamiltonian form, with \(H(\mathbf{p}, \mathbf{q}) = \frac{1}{2} \mathbf{p}^* \mathbf{M}^{-1} \mathbf{p} + V(\mathbf{q})\), having defined \(\mathbf{p} := \mathbf{M} \dot{\mathbf{x}}\), \(\mathbf{q}:= \mathbf{x}\),
.
29.5.1. Examples#
29.5.1.1. Verlet#
For the mechanical system governed by the differential equation \(\ddot{\mathbf{x}} = \mathbf{f}(\mathbf{x},t)\), the numerical scheme reads
so that the transformation \(\mathbf{z}_{n} \mapsto \mathbf{z}_{n+1}\) reads
or
29.5.1.1.1. Jacobian of the one-step transformation#
Thus, the Jacobian reads
and the value of its determinant can be evaluated - for \(h\) “small enough” the upper-left block is approximately the identity and thus invertible; all the blocks commute, as they’re linear combinations of zero and first power of \(\partial_{\widetilde{\mathbf{x}}} \mathbf{f}\) - as
Determinant of block matrices - with Schur complement
The determinant of the block matrices - with Schur complement, if it exists -
reads - just take the determinants and exploit the property of determinant of the product is equal to the product of the determinants, and the determinant of a block-diagonal matrix -
If \(A\), \(B\), \(C\), \(D\) have proper dimensions and \(AC = CA\), i.e. commute, it follows
Proof of inverse of block matrix by direct computation
29.5.1.1.2. One-step energy difference#
29.5.1.2. Explicit Euler#
For the mechanical system governed by the differential equation \(\ddot{\mathbf{x}} = \mathbf{f}(\mathbf{x},t)\), or by the first-order system
the numerical scheme, and the transformation \(\mathbf{z}_{n} \mapsto \mathbf{z}_{n+1}\), reads
29.5.1.2.1. Jacobian of the one-step transformation#
Thus, the Jacobian reads
and the value of its determinant can be evaluated - for \(h\) “small enough” the upper-left block is approximately the identity and thus invertible; all the blocks commute, as they’re linear combinations of zero and first power of \(\partial_{\widetilde{\mathbf{x}}} \mathbf{f}\) - as
First-derivative of the force w.r.t. \(\mathbf{x}\) can be related to the stiffness matrix around equilibria,
For marginally-stable systems, the stiffness matrix has imaginary eigenvalues, \(\lambda_k(\mathbf{K}) = \mp i \Omega_k\). For the numerical integration of system around an equilibrium, it follows
and thus - recalling that the determinant is equal to the product of the eigenvalues -
Eigenproblem of \(\ \mathbf{A} + b \mathbf{I}\)
If \(\mathbf{A} \mathbf{v}_k = \alpha_k \mathbf{v}_k\), then the matrix \(\mathbf{A} + b \mathbf{I}\) has the same eigenvectors \(\mathbf{v}_k\) with eigenvalues \(\lambda_k = \alpha_k + b\)
29.5.1.2.2. One-step energy difference#
29.5.1.3. Implicit Euler#
For the mechanical system governed by the differential equation \(\ddot{\mathbf{x}} = \mathbf{f}(\mathbf{x},t)\), or by the first-order system
the numerical scheme, and the transformation \(\mathbf{z}_{n} \mapsto \mathbf{z}_{n+1}\), reads
29.5.1.3.1. Jacobian of the one-step transformation#
The Jacobian of the inverse transformation \(\mathbf{z}_{n+1} \mapsto \mathbf{z}_n\) reads
and the value of its determinant can be evaluated - for \(h\) “small enough” the upper-left block is approximately the identity and thus invertible; all the blocks commute, as they’re linear combinations of zero and first power of \(\partial_{\widetilde{\mathbf{x}}} \mathbf{f}\) - as
First-derivative of the force w.r.t. \(\mathbf{x}\) can be related to the stiffness matrix around equilibria,
For marginally-stable systems, the stiffness matrix has imaginary eigenvalues, \(\lambda_k(\mathbf{K}) = \mp i \Omega_k\). For the numerical integration of system around an equilibrium, it follows
and thus - recalling that the determinant is equal to the product of the eigenvalues -
and thus