Time evolution equations for non-equilibrium systems have a well-defined mathematical structure in which reversible and irreversible contributions are identified separately. In particular, the reversible contribution is generally assumed to be of the Hamiltonian form and hence comes with an underlying geometric structure. This requirement imposes severe restrictions on the admissible form of the time evolution equations which express the idea that the reversible time evolution should be “under mechanistic control.” Additional features of thermodynamic systems are the conservation of entropy under reversible dynamics and the non-negativity of entropy production under irreversible dynamics. The present paper addresses the problem of how the rich structure of thermodynamically admissible evolution equations can be preserved under time discretization, which is the key to successful numerical calculations.
Our discussion is based on the GENERIC (general equation for the non-equilibrium reversible–irreversible coupling) formulation of time evolution equations for non-equilibrium systems , , , (1) where x represents the set of independent variables required for an autonomous description of a given non-equilibrium system, E and S are the total energy and entropy expressed in terms of the variables x, and L and M are certain linear operators, or matrices, which can depend on x. We here use the notation for finite-dimensional systems (for example, partial rather than functional derivatives) because it is advantageous to develop the basic ideas for GENERIC time integration for systems with only a few degrees of freedom. The two contributions to the time evolution of x generated by the energy E and the entropy S in eq. (1) are called the reversible and irreversible contributions, respectively. Equation (1) is supplemented with the complementary degeneracy requirements (2) and (3) The requirement that the entropy gradient is in the null-space of L in eq. (2) expresses the reversible nature of the Hamiltonian contribution to the dynamics: the functional form of the entropy is such that it cannot be affected by the operator generating reversible dynamics. The requirement that the energy gradient is in the null-space of M in eq. (3) expresses the conservation of the total energy in a closed system by the irreversible contribution to dynamics.
Further general properties of L and M are discussed most conveniently in terms of the two brackets (4)(5) where A, B are sufficiently regular, real-valued functions defined on the space of independent variables and the dot indicates a canonical product. In terms of these brackets, eq. (1) leads to the following time evolution equation of an arbitrary function A generated by E and S: (6) Further conditions for L can now be stated as the antisymmetry property (7) the product or Leibniz rule (8) and the Jacobi identity (9) where C is another sufficiently regular, real-valued function defined on the state space. These properties are well known from the Poisson brackets of classical mechanics and they express the essence of reversible dynamics.
Further properties of M can be formulated in terms of the symmetry condition (10) and the non-negativity condition (11) The symmetry condition is a generalization of the Onsager symmetry of linear irreversible thermodynamics , ,  to non-linear problems (we here do not consider the possibility of Casimir symmetry , ). The non-negativity condition, together with the degeneracy requirement (2), guarantees that the entropy is a non-decreasing function of time and that entropy production results only from irreversible processes, (12) The properties (10) and (11) correspond to the symmetry and the positive-semidefiniteness of M. From a physical point of view, M may be regarded as a friction matrix.
The Jacobi identity (9), which is a highly restrictive condition for formulating proper reversible dynamics, expresses the time–structure invariance of Poisson brackets. As it is tedious to verify the Jacobi identity, symbolic software has been developed for that purpose , . It is natural to consider integrators which leave the underlying Poisson bracket invariant even under finite time steps. This idea is well known from the symplectic integrators used in classical mechanics . Symplectic integrators are known for better performance in numerical calculations and hence provide the motivation for introducing GENERIC integrators to perform better calculations for non-equilibrium systems in an analogous way. Even numerical methods that focus only on the proper treatment of entropy can have significant advantages, as has been illustrated for the Lattice Boltzmann method ,  and for the discussion of shock waves in terms of thirteen-moment equations .
The question of structure preserving integrators for dissipative systems has been addressed by several groups working on numerical mathematics and is a topic of ongoing work (see, e. g., , ,  and references therein). In the mathematical literature, the GENERIC structure is also known as metriplectic structure, and metriplectic integrators have been mentioned in Section V of . In general, however, the characterization of structure preserving integrators seems to be different from the one given in the present paper. In particular, the metriplectic integrators proposed in  do not qualify as GENERIC integrators. Whereas the spatial discretization is done in a fully structure preserving manner (in the same spirit as the discretization of hydrodynamics in ), the temporal discretization aims at strict discrete conservation laws for energy (and momentum) and at proper monotonicity of the entropy.
We first review the ideas of symplectic time integration and develop the requirements to be imposed on GENERIC integrators. We then construct GENERIC integrators for systems with a single dissipative process. After discussing some details for the specific example of a harmonic oscillator with friction, we summarize the general features of GENERIC integrators and identify some possible directions for future work.
2 Symplectic integrators
Symplectic integrators for the numerical time integration of Hamiltonian systems can be characterized in several different ways. An integrator with a time step of size ϵ is symplectic if one of the following equivalent conditions holds:
the mapping is canonical (that is, the mapping leaves the symplectic form invariant);
the mapping is obtained from Hamilton’s variational principle by using a discrete Lagrangian (variational integrators);
the mapping results from continuous Hamiltonian evolution with a modified Hamiltonian at time ϵ (depending on the time step ϵ).
An elegant alternative approach to symplectic integrators can be based on Hamilton’s variational principle. Symplectic integrators can be obtained as the stationary points of a discrete action obtained from a discrete Lagrangian without any need for an underlying geometric structure . However, as can be concluded from the idea of variational self-adjointness, the variational approach seems to be restricted to non-degenerate Poisson brackets  and not to be generally applicable to non-equilibrium thermodynamics .
Among the above three characterizations of symplectic integrators, the last one clearly is by far the most inconvenient one for practical purposes. Unfortunately, this is the only one that can be generalized in a straightforward way to irreversible systems because the counterparts of canonical transformations or a general variational principle are not known for irreversible evolution equations.
3 Definition of GENERIC integrators
We can now discuss the problem of integrating eq. (1) for a given system with the independent variables x and GENERIC building blocks E, S, L, M. Following the ideas of Moser , we define a mapping to be a GENERIC integrator if it can be obtained from a continuous time evolution of the GENERIC form (13) where we modify the energy and the friction matrix in a time step–dependent manner, but not the Poisson matrix or the entropy. More precisely, the solution of eq. (13) with should produce exactly the same result at time ϵ as the integrator, . In terms of the formal solution of eq. (13), a GENERIC integrator possesses the following structure, (14) The dissipative bracket associated with must be symmetric and non-negative, and a modified version of the degeneracy condition (3), (15) must hold so that, like for a symplectic integrator, the modified energy is strictly conserved by a GENERIC integrator. We then expect that the physical energy E remains close to the conserved quantity , even for long integration periods. As an additional requirement for the modified friction matrix, should not introduce any additional dissipative processes not present in the original matrix M. In the finite-dimensional case, this corresponds to preserving the rank of the friction matrix.
The introduction of a modified energy is inspired by the experience with Hamilton’s equations of motion of classical mechanics. After leaving the Poisson matrix L in eq. (13) unchanged, it is natural to keep also the original entropy S, because the degeneracy (2) then continues to guarantee a clear separation of reversible and irreversible processes by a GENERIC integrator. In particular, the entropy production rate is given entirely by the irreversible contribution in eq. (13), (16) which should be a small modification of the physical entropy production in eq. (12).
In summary, GENERIC integrators preserve the time invariance of the Poisson bracket expressed by the Jacobi identity, the mutual degeneracy requirements, and the symmetry and positive-semidefiniteness of the friction matrix. The important advantages of GENERIC integrators hence are:
The rigorous conservation of the near-energy , which avoids a systematic drift in the physical energy E, even over long periods of time.
The strict separation of reversible and irreversible dynamics.
4 Construction of GENERIC integrators
In the previous section, we have formulated a wish list of properties for GENERIC integrators. As a next step, we construct such integrators for the special case of a friction matrix of rank unity, that is, in the presence of a single dissipative process. We look for a modified friction matrix which also has the rank unity so that we do not introduce any artificial dissipative processes. Our construction is based on a formal expansion in terms of the time step width ϵ. Like Moser in his work for Hamilton’s equations of motion with symplectic structure , we leave convergence issues to future work.
As a first step, we consider the reversible problem, that is, eq. (1) with . We construct such that eq. (13) with reproduces the reversible part of the integrator (14). For a non-degenerate Poisson operator, this is exactly the program carried out by Moser  and refined in later work , . The expansion of must be chosen such that the transformation in eq. (14) becomes canonical. In the degenerate case, Darboux’ theorem (see ) offers a splitting of the variables into those on a symplectic leave and degenerate variables, also known as the Casimirs of the Poisson bracket. In the symplectic leaves, the results of Moser can be applied. The degenerate variables must be left unchanged by a structure preserving integrator (or, at least, transformed among themselves). In this way, we obtain a natural extension from symplectic integrators to structure preserving integrators for Hamiltonian dynamics based on degenerate Poisson brackets, which we refer to as Poisson integrators. Of course, the energy is far from unique because (i) symplectic integrators are not unique, even in the non-degenerate case, and (ii) any function of the Casimir variables can be added.
Once the modified energy has been identified and the Poisson bracket is preserved by the reversible integrator (14), we need to construct the modified friction matrix. Focusing on a single dissipative mechanism, we express the friction matrices of rank unity in terms of dyadic products of vectors, (17) where we construct by formal expansion in terms of the time step, (18) To order ϵ, we have . Given the modified energy , a GENERIC integrator must fulfill the degeneracy condition (15), (19)
We next construct the formal expansion of in the time step ϵ, which is the analog of Moser’s expansion of the energy associated with a symplectic integrator. These expansions are rather of theoretical interest than of practical value. According to eq. (14), the irreversible contribution to a GENERIC integrator must be of the form (20) with the following second- and higher-order contributions in ϵ: (21)
In order to construct for a given integrator , we introduce the matrices that are given entirely in terms of the original GENERIC building blocks, (22) Rewriting the representation (20) as (23) which is our starting point for constructing the expansion (18), we find (24) In view of the identity , we try the ansatz (25) Whereas this ansatz solves the projected eq. (24) for any value of α, the original eq. (23) is solved only for , as can be verified directly. In order to obtain the nth-order contribution to on the left-hand side of eq. (25), only lower-order contributions to are required on the right-hand side if the second expression for in eq. (23) is used. We hence have a convenient set of equations for constructing the expansion (18).
5 Damped harmonic oscillator
5.1 Evolution equations
As the simplest possible example, we consider a one-dimensional harmonic oscillator in the presence of friction. We choose the independent variables , where q is the position of the particle, p is its momentum, and S is the entropy of a homogeneous medium causing the friction on the particle. The equations of motion are (26)(27)(28) where the constant parameters m, H, γ, and T are the mass of the particle, the Hookean spring constant, the frictional relaxation rate, and the temperature of the medium, respectively. For given initial values , , , the analytical solution of the linear ordinary differential equations (26), (27) is well known, and eq. (28) can subsequently be solved by a straightforward time integration.
The equations of motion (26)–(28) possess a natural GENERIC structure. Whereas the entropy S is among the independent variables, the energy is given by (29) Assuming T to be a constant parameter results in the medium acting as a heat bath. The gradients of the generators energy and entropy are given by (30) The Poisson and friction matrices are (31) and (32)
The above equations for the harmonic oscillator with friction can be simplified by dimensional analysis. We can choose the basic units such that . Then the evolution equations involve only the single dimensionless parameter and we have (33)(34)(35) Also the initial conditions involve only a single parameter () because, without loss of generality, we can assume . We simply need to redefine S as the deviation from the initial entropy which, for a heat bath, actually is very large. In the following, we moreover choose because more general values of essentially correspond to a shift of the initial time.
We now consider integrators of the general form (36)(37) and (38) For and arbitrary bounded , , eqs. (36)–(38) clearly provide a valid integrator for the equations of motion. Our goal is to choose these coefficients such that the integrator (36)–(38) preserves the GENERIC structure by adding suitable higher-order terms in ϵ to , , and by selecting proper , .
We first discuss the numerical integration of eqs. (33) and (34). The exact solution of eqs. (33), (34) is obtained for (39) where the frequency ω depends on the friction parameter γ as follows: (40) A class of GENERIC integrators are obtained by replacing the friction parameter γ by with the corresponding change of frequency from ω to , where (41) As we know the exact solution of the problem and our construction of GENERIC integrators is based on exact solutions for a modified problem, the choice of the rate parameter is somewhat arbitrary. For a rate parameter, it is natural to assume (42) where c is a numerical coefficient. We assume that the damping rates γ and are sufficiently small so that the frequencies ω and are real. Note that the ansatz in eq. (42) leads to a first-order GENERIC integrator.
5.2.3 Quasisymplectic integrators
For constructing GENERIC integrators for the damped harmonic oscillator, we made use of explicit expressions for the modified energy and friction matrix obtained from exact solutions of the problem. The friction matrix is given in eq. (32) with instead of γ, and the energy in eq. (29) actually is not even modified. Of course, such a construction is possible only for very simple problems. We hence try to identify some characteristic features of our very special GENERIC integrators.
According to eq. (4), the Poisson matrix (31) is associated with the canonical Poisson bracket of classical mechanics. We have (46) for arbitrary functions F, G of . If we consider the definitions (36), (37) for , as functions of , then we find (47) where the second equality, which eliminates the details of the force law, holds for the exact solution (and for GENERIC integrators with instead of γ). A Jacobian smaller than unity implies a loss of phase space volume, which is characteristic for irreversible dynamics. Even for non-linear force laws of non-Hamiltonian systems, integrators with a Jacobian independent of the point in phase space and of the details of the force law have been found , where a constant Jacobian is equivalent to the constant Poisson bracket (47). The corresponding integrators have been referred to as quasisymplectic. For non-linear forces, the quasisymplectic integrators discussed in  have been designed only for problems where the noise associated with the friction force according to the fluctuation–dissipation theorem is additive so that their full generality is unclear. To emphasize the meaning of quasisymplectic we write the following invariance within a constant factor: (48) However, the brackets and may be non-zero.
The problem of structure preserving integration can also be considered from the perspective of contact Hamiltonian dynamics , , , . The details of the contact Hamiltonian approach for the damped harmonic oscillator have been elaborated in . The factor in eq. (48) is the inverse of an integrating factor that leads to a variational problem (see Section 3.1 of ) and can be used as a starting point for constructing structure preserving integrators.
5.2.4 Exponential Runge–Kutta integrators
The occurrence of exponentials in eqs. (36) and (37) suggests that there might be a relation to exponential Runge–Kutta methods (see  and references therein). The exponentials can, for example, result from the use of integrating factors. Exponential Runge–Kutta methods are capable of preserving conformal symplecticity, which corresponds to the quasisymplectic property (48) with the proper exponentially decaying prefactor. However, these methods are limited to linear relaxation terms, whereas GENERIC relaxation typically must be non-linear (see eq. (35) for our damped oscillator). The solution for p and q for the damped harmonic oscillator can nevertheless be constructed with a partitioned exponential Runge–Kutta method. For example, the first-order algorithm given in eq. (16) of , which is based on a symplectic Euler method, reads (49)(50)
5.3 Numerical results
To evaluate the properties of the GENERIC integrator, we consider the damped harmonic oscillator (33)–(35) with frictional relaxation rate . We choose according to eq. (42) with . The reasons for choosing a rather large value of c are twofold: (i) if c is of order unity, we hardly see any deviation from the exact result and (ii) because the corrections in eq. (42) might be of the alternative form where, according to eq. (40), is ten times larger than γ. The first-order estimate shows that the effect on the frequency is still very small so that noticeable effects on frequency would require values of significantly larger than unity (or c significantly larger than ten). Note that the deviation of from γ is of first order in ϵ so that also the GENERIC integrator is of first order. It is hence meaningful to compare it to the explicit Euler scheme.
Figure 1 shows the position as a function of time. We always start from the initial conditions , , and . The exact solution for a harmonic oscillator with friction is given by exponentially damped oscillations (continuous line). For this simple linear problem, any integrator produces damped oscillations for so that the key question is whether the angular frequency and the damping rate are reproduced properly. The GENERIC integrator with time step (dots in Figure 1) reproduces the exact result very well; only the damping rate is slightly too small. In contrast, the explicit Euler scheme with time step (+ symbols in Figure 1) produces undamped oscillations; smaller time steps are required to find the proper damping and larger time steps even lead to an exponential growth of the oscillations. The result obtained from the partitioned exponential Runge–Kutta method (49), (50) is practically indistinguishable from the curve obtained from the GENERIC integrator.
The increase of the reservoir entropy associated with the damped oscillations of Figure 1 is shown in Figure 2. As the explicit Euler scheme misses the damping of the oscillations, it misses also the saturation of the entropy increase displayed by the exact solution. For the GENERIC integrator, the deviations from the exact result are larger for than for , but the qualitative behavior of is reproduced properly. For smaller time steps, also the Euler scheme would reproduce the qualitative behavior of and .
The crucial test for the simple problem of a damped harmonic oscillator is the total energy E, including the internal energy of the environment, which is conserved. For our initial conditions, the total energy in eq. (29) is 1/2 (recall that we did not need to modify the energy to obtain our GENERIC integrator). Figure 3 shows the results for the energy obtained from the explicit Euler and GENERIC integrators. Whereas the latter integrator keeps the energy rigorously constant for any time step ϵ, the Euler integrator with time step fails badly.
So far, we have compared two first-order integration schemes, namely the Euler method and a GENERIC integrator. How do standard second-order schemes perform for the damped harmonic oscillator? For , both the explicit and the implicit midpoint methods reproduce the curves and extremely well; only for the explicit midpoint method small deviations can be recognized. According to Figure 4, the crucial test of the conservation of total energy is failed by the explicit midpoint method where, of course, the failure is much less dramatic than for the first-order Euler scheme in Figure 3. We actually need to increase the time step ϵ from 0.1 to 0.25 so see a clear effect in Figure 4. The implicit midpoint method, on the other hand, reproduces a constant energy even for large time steps. For the simple example of a damped harmonic oscillator, the implicit midpoint method can therefore compete with our GENERIC integrator in all respects. As a second-order scheme, it is even more precise than the GENERIC integrator. If we modified eq. (42) to obtain a second-order GENERIC integrator, then we would also obtain robust high-precision results.
6 Summary and outlook
Thermodynamically admissible evolution equations for non-equilibrium systems possess a distinct structure. Within the GENERIC approach, the formulation of reversible dynamics is based on a Poisson structure. Furthermore, the friction matrix employed to generate irreversible dynamics from the entropy gradient must be (Onsager–Casimir) symmetric and positive-semidefinite. Mutual degeneracy requirements guarantee energy conservation and a clear separation of reversible and irreversible dynamics.
We have investigated the possibility of preserving all the above structural elements in time-discretized equations. The reversible contribution should consist of canonical transformations leaving the Poisson bracket invariant. Such canonical transformations can be expressed as a continuous time evolution with a modified Hamiltonian. We further postulate that the full discretized equations should be reproduced by a continuous evolution of the GENERIC type with a modified friction matrix in addition to the modified energy. The modified friction matrix should be (Onsager–Casimir) symmetric and positive-semidefinite, and we impose the degeneracy requirement that the gradient of the modified energy should be in the kernel of the modified friction matrix. Such GENERIC integrators are expected to have similar advantages as symplectic integrators for Hamilton’s equations of motion in classical mechanics.
In the presence of a single dissipative process, we have established the existence of GENERIC integrators by a formal expansion procedure. The modified degeneracy requirement turns out to provide the only restriction for the irreversible contribution to a structured integrator. For the damped harmonic oscillator, we have developed GENERIC integrators based on exact solutions. Their most obvious advantage is the conservation of total energy.
While symplectic integrators for non-degenerate Hamiltonian systems can be defined and identified without any reference to the modified Hamiltonian, our definition and construction of GENERIC integrators massively relies on the expressions for the modified energy and friction matrix. It is hence not straightforward to find GENERIC integrators with only a few non-zero terms, or with an infinite number of terms summing up to a tractable implicit scheme. This is a severe limitation for practical purposes. Moreover, the freedom in selecting GENERIC integrators seems to be too large. It would hence be desirable to impose some more abstract structural requirements on the modified friction matrix which imply the degeneracy of the modified energy, without a need to know the explicit form of the energy. Such a construction might also narrow down the large class of GENERIC integrators formulated in this work.
Our construction of GENERIC integrators for the damped harmonic oscillator is of little practical value because it is based on exact solutions. The desirable more abstract characterization of GENERIC integrators might be achieved by a fundamentally different approach to structure preserving integrators based on the contact Hamiltonian formulation of the GENERIC equations in an enlarged space (see Section III.A of ). Legendre transformations are then recognized as the counterpart of canonical transformations for Hamiltonian dynamics. Whereas the evolution in the enlarged space is simpler and more structured (as in the case of gauge theories), the numerical handling of constraints must now be consistent with the thermodynamic structure. In such an approach, the natural focus of attention is on thermodynamic potentials and entropy production. Important aspects of the reversible contribution to dynamics (Poisson structure, no contribution to entropy production), however, require additional attention. Splitting methods might be ideal for that purpose. Contact Hamiltonian dynamics does not only provide a generalization of canonical transformations but also (inexact and implicit) variational principles ,  (see also Section 3 of ) for the characterization of structure preserving thermodynamic integrators.
I wish to thank Miroslav Grmela and Martin Kröger for many helpful discussions.
J. Moser, Lectures on Hamiltonian systems, Mem. Am. Math. Soc. 81 (1968), 1–60. Google Scholar
H. C. Öttinger, Beyond Equilibrium Thermodynamics, Wiley, Hoboken, 2005. Google Scholar
S. R. de Groot and P. Mazur, Non-Equilibrium Thermodynamics, 2nd ed., Dover, New York, 1984. Google Scholar
J. M. Sanz-Serna and M. P. Calvo, Numerical Hamiltonian Problems, Applied Mathematics and Mathematical Computation 7, Chapman & Hall, London, 1994. Google Scholar
C. P. Zinner and H. C. Öttinger, Numerical stability with help from entropy, preprint (2017), arxiv.org/abs/1408.6817. Google Scholar
D. Portillo, J. C. García Orden and I. Romero, Energy-entropy-momentum integration schemes for general discrete non-smooth dissipative problems in thermomechanics, Int. J. Numer. Meth. Engng 112 (2017), 776–802. CrossrefGoogle Scholar
M. Krüger, M. Groß and P. Betsch, An energy-entropy-consistent time stepping scheme for nonlinear thermo-viscoelastic continua, Z. Angew. Math. Mech. 96 (2016), 141–178. CrossrefWeb of ScienceGoogle Scholar
E. Hairer, Backward analysis of numerical integrators and symplectic methods, Ann. Numer. Math. 1 (1994), 107–132. Google Scholar
G. Benettin and A. Giorgilli, On the Hamiltonian interpolation of near to the identity symplectic mappings with application to symplectic integration algorithms, J. Stat. Phys. 74 (1994), 1117–1143. CrossrefGoogle Scholar
R. M. Santilli, The Inverse Problem in Newtonian Mechanics, Foundations of Theoretical Mechanics I, Springer, Berlin, 1978. Google Scholar
W. Muschik, P. Ván and C. Papenfuss, Variational principles in thermodynamics, Technische Mechanik 20 (2000), 105–112. Google Scholar
J. E. Marsden and T. S. Ratiu, Introduction to Mechanics and Symmetry, 2nd ed., Texts in Applied Mathematics 17, Springer, New York, 1999. Google Scholar
D. Eberard, B. M. Maschke and A. J. van der Schaft, An extension of Hamiltonian systems to the thermodynamic phase space: Towards a geometry of nonreversible processes, Rep. Math. Phys. 60 (2007), 175–198. Web of ScienceCrossrefGoogle Scholar
A. Bhatt and B. E. Moore, Structure-preserving exponential Runge-Kutta methods, SIAM J. Sci. Comput. 39 (2017), A593–A612. Google Scholar
About the article
Published Online: 2018-02-08
Published in Print: 2018-04-25
Citation Information: Journal of Non-Equilibrium Thermodynamics, Volume 43, Issue 2, Pages 89–100, ISSN (Online) 1437-4358, ISSN (Print) 0340-0204, DOI: https://doi.org/10.1515/jnet-2017-0034.
© 2018 Öttinger, published by De Gruyter. This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License. BY-NC-ND 4.0