Jump to ContentJump to Main Navigation
Show Summary Details
More options …

Journal of Non-Equilibrium Thermodynamics

Founded by Keller, Jürgen U.

Editor-in-Chief: Hoffmann, Karl Heinz

Managing Editor: Prehl, Janett / Schwalbe, Karsten

Ed. by Michaelides, Efstathios E. / Rubi, J. Miguel

4 Issues per year


IMPACT FACTOR 2016: 1.714

CiteScore 2016: 1.38

SCImago Journal Rank (SJR) 2016: 0.402
Source Normalized Impact per Paper (SNIP) 2016: 0.886

Online
ISSN
1437-4358
See all formats and pricing
More options …
Volume 43, Issue 2

Issues

GENERIC Integrators: Structure Preserving Time Integration for Thermodynamic Systems

Hans Christian Öttinger
Published Online: 2018-02-08 | DOI: https://doi.org/10.1515/jnet-2017-0034

Abstract

Thermodynamically admissible evolution equations for non-equilibrium systems are known to possess a distinct mathematical structure. Within the GENERIC (general equation for the non-equilibrium reversible–irreversible coupling) framework of non-equilibrium thermodynamics, which is based on continuous time evolution, we investigate the possibility of preserving all the structural elements in time-discretized equations. Our approach, which follows Moser’s [1] construction of symplectic integrators for Hamiltonian systems, is illustrated for the damped harmonic oscillator. Alternative approaches are sketched.

Keywords: GENERIC; thermodynamic integrator; symplectic integrator; structure preservation; damped harmonic oscillator; canonical transformations; Legendre transformations; contact Hamiltonian dynamics; metriplectic integrator

1 Introduction

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 [2], [3], [4], dxdt=LEx+MSx,(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 LSx=0(2) and MEx=0.(3) The requirement that the entropy gradient S/x 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 E/x 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 {A,B}=Ax·LBx,(4)[A,B]=Ax·MBx,(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: dAdt={A,E}+[A,S].(6) Further conditions for L can now be stated as the antisymmetry property {A,B}={B,A},(7) the product or Leibniz rule {AB,C}=A{B,C}+B{A,C},(8) and the Jacobi identity {A,{B,C}}+{B,{C,A}}+{C,{A,B}}=0,(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 [A,B]=[B,A](10) and the non-negativity condition [A,A]0.(11) The symmetry condition is a generalization of the Onsager symmetry of linear irreversible thermodynamics [5], [6], [7] to non-linear problems (we here do not consider the possibility of Casimir symmetry [5], [8]). 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, dSdt=Sx·MSx=[S,S]0.(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 [9], [10]. 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 [11]. 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 [12], [13] and for the discussion of shock waves in terms of thirteen-moment equations [14].

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., [15], [16], [17] 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 [15]. 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 [18] 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 [19]), 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 x0xϵ with a time step of size ϵ is symplectic if one of the following equivalent conditions holds:

  • the mapping x0xϵ is canonical (that is, the mapping leaves the symplectic form invariant);

  • the mapping x0xϵ is obtained from Hamilton’s variational principle by using a discrete Lagrangian (variational integrators);

  • the mapping x0xϵ results from continuous Hamiltonian evolution with a modified Hamiltonian E˜ϵ at time ϵ (depending on the time step ϵ).

In his pioneering work [1], Jürgen Moser constructed a formal expansion of the Hamiltonian E˜ϵ to reproduce the canonical transformation x0xϵ. An explicit discussion of the modified Hamiltonian based on a one-to-one correspondence between rooted trees and the expressions appearing in the Taylor expansion can be found in [20]. In a time-discrete simulation, one stays rigorously on the level surfaces of the modified Hamiltonian and, assuming structural stability (which seems to be essential for the success of any kind of numerical integration), those are close to the level surfaces of the original Hamiltonian so that the energy is nearly conserved over long periods of time. In other words, a drift of the energy in time is avoided. A clear and thoughtful discussion of the advantages of symplectic integrators based on a quantitative exponential estimate for the norm of the difference between flows rather than a formal expansion has been offered by Benettin and Giorgilli [21]. Their arguments explain nicely why even the simplest symplectic algorithms often outperform more sophisticated or higher-order non-symplectic schemes.

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 [22]. However, as can be concluded from the idea of variational self-adjointness, the variational approach seems to be restricted to non-degenerate Poisson brackets [23] and not to be generally applicable to non-equilibrium thermodynamics [24].

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 [1], we define a mapping x0xϵ to be a GENERIC integrator if it can be obtained from a continuous time evolution of the GENERIC form dxdt=LE˜ϵx+M˜ϵSx,(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 x(t) of eq. (13) with x(0)=x0 should produce exactly the same result at time ϵ as the integrator, x(ϵ)=xϵ. In terms of the formal solution of eq. (13), a GENERIC integrator xxϵ possesses the following structure, xϵ=expϵLE˜ϵx+M˜ϵSx·xx.(14) The dissipative bracket associated with M˜ϵ must be symmetric and non-negative, and a modified version of the degeneracy condition (3), M˜ϵE˜ϵx=0,(15) must hold so that, like for a symplectic integrator, the modified energy E˜ϵ is strictly conserved by a GENERIC integrator. We then expect that the physical energy E remains close to the conserved quantity E˜ϵ, even for long integration periods. As an additional requirement for the modified friction matrix, M˜ϵ 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 E˜ϵ 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), dSdt=Sx·M˜ϵSx,(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 E˜ϵ, which avoids a systematic drift in the physical energy E, even over long periods of time.

  • The strict separation of reversible and irreversible dynamics.

  • The expression (16) for the entropy production implies a good reproduction of the physical entropy production in eq. (12).

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 M˜ϵ 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 [1], we leave convergence issues to future work.

As a first step, we consider the reversible problem, that is, eq. (1) with M=0. We construct E˜ϵ such that eq. (13) with M˜ϵ=0 reproduces the reversible part of the integrator (14). For a non-degenerate Poisson operator, this is exactly the program carried out by Moser [1] and refined in later work [20], [21]. The expansion of E˜ϵ must be chosen such that the transformation in eq. (14) becomes canonical. In the degenerate case, Darboux’ theorem (see [25]) 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 E˜ϵ 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 E˜ϵ 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, M=yyT,M˜ϵ=y˜ϵy˜ϵT,(17) where we construct y˜ϵ by formal expansion in terms of the time step, y˜ϵ=y0+ϵy1+ϵ2y2.(18) To order ϵ, we have y0=y. Given the modified energy E˜ϵ, a GENERIC integrator must fulfill the degeneracy condition (15), y˜ϵ·E˜ϵx=0.(19)

We next construct the formal expansion of y˜ϵ in the time step ϵ, which is the analog of Moser’s expansion of the energy E˜ϵ 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 xϵirr=ϵM˜ϵSx+Qϵ,(20) with the following second- and higher-order contributions in ϵ: Qϵ=k=2ϵkk!{LE˜ϵx+M˜ϵSx·xkLE˜ϵx·xk}x.(21)

In order to construct y˜ϵ for a given integrator xϵirr, we introduce the matrices Pα that are given entirely in terms of the original GENERIC building blocks, Pα=1αy·Sx1ySxT.(22) Rewriting the representation (20) as [y(y˜ϵy)T+(y˜ϵy)yT]Sx=1ϵxϵirrϵMSxQϵ(y˜ϵy)(y˜ϵy)·Sx=Rϵ,(23) which is our starting point for constructing the expansion (18), we find P1(y˜ϵy)=y·Sx1P1Rϵ.(24) In view of the identity P1Pα=P1, we try the ansatz y˜ϵ=y+y·Sx1PαRϵ.(25) Whereas this ansatz solves the projected eq. (24) for any value of α, the original eq. (23) is solved only for α=1/2, as can be verified directly. In order to obtain the nth-order contribution to y˜ϵ on the left-hand side of eq. (25), only lower-order contributions to y˜ϵ are required on the right-hand side if the second expression for Rϵ 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 x=(q,p,S), 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 dqdt=1mp,(26)dpdt=Hqγp,(27)dSdt=γmTp2,(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 q0, p0, S0, 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 E=p22m+12Hq2+TS.(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 Ex=Hqp/mT,Sx=001.(30) The Poisson and friction matrices are L=010100000(31) and M=yyTwithy=γmT0mTp.(32)

The above equations for the harmonic oscillator with friction can be simplified by dimensional analysis. We can choose the basic units such that m=H=T=q0=1. Then the evolution equations involve only the single dimensionless parameter γ0 and we have dqdt=p,(33)dpdt=qγp,(34)dSdt=γp2.(35) Also the initial conditions involve only a single parameter (p0) because, without loss of generality, we can assume S0=0. 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 p0=0 because more general values of p0 essentially correspond to a shift of the initial time.

5.2 Integrators

We now consider integrators of the general form qϵ=eγϵ/2Aϵq0+Bϵγ2q0+p0ϵ,(36)pϵ=eγϵ/2Aϵp0Bϵγ2p0+q0ϵ,(37) and Sϵ=S0+γCϵp02ϵ+Dϵp0q0ϵ2+Eϵq02ϵ2.(38) For Aϵ=Bϵ=Cϵ=1 and arbitrary bounded Dϵ, Eϵ, 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 Aϵ, Bϵ, Cϵ and by selecting proper Dϵ, Eϵ.

5.2.1 Oscillator

We first discuss the numerical integration of eqs. (33) and (34). The exact solution of eqs. (33), (34) is obtained for Aϵ=cos(ωϵ),Bϵ=sin(ωϵ)ωϵ,(39) where the frequency ω depends on the friction parameter γ as follows: ω=1γ24.(40) A class of GENERIC integrators are obtained by replacing the friction parameter γ by γϵ with the corresponding change of frequency from ω to ωϵ, where ωϵ=1γϵ24.(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 1γϵ=1γ+cϵorγϵ=γ1+cϵγ,(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.2 Entropy

For the exact solution of eqs. (33)–(35), the coefficients in eq. (38) are given by Cϵ=12γϵ11ω2eγϵ1γ2ωsin(2ωϵ)γ24cos(2ωϵ),(43)Dϵ=eγϵsin(ωϵ)ωϵ2,(44) and Eϵ=12γϵ211ω2eγϵ1+γ2ωsin(2ωϵ)γ24cos(2ωϵ).(45) Again, we obtain first-order GENERIC integrators by replacing γ by γϵ given in eq. (42).

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 {F,G}=FqGpGqFp=detFqFpGqGp(46) for arbitrary functions F, G of x=(q,p,S). If we consider the definitions (36), (37) for qϵ, pϵ as functions of x=x0, then we find {qϵ,pϵ}=eγϵ(Aϵ2+Bϵ2ω2ϵ2)=eγϵ,(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 [26], 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 [26] 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: {qϵ,qϵ}{qϵ,pϵ}{pϵ,qϵ}{pϵ,pϵ}=eγϵ0110.(48) However, the brackets {qϵ,Sϵ} and {pϵ,Sϵ} may be non-zero.

The problem of structure preserving integration can also be considered from the perspective of contact Hamiltonian dynamics [27], [28], [29], [30]. The details of the contact Hamiltonian approach for the damped harmonic oscillator have been elaborated in [30]. The factor eγϵ in eq. (48) is the inverse of an integrating factor that leads to a variational problem (see Section 3.1 of [24]) 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 [31] 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 [31], which is based on a symplectic Euler method, reads qϵ=q0+ϵpϵ,(49)pϵ=eγϵp0ϵq0.(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 γ=0.1. We choose γϵ according to eq. (42) with c=10. 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 γϵ=γ/(1+cϵω) where, according to eq. (40), ω1 is ten times larger than γ. The first-order estimate ωϵ=ω+γ2cϵ/4 shows that the effect on the frequency is still very small so that noticeable effects on frequency would require values of c 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.

Time-dependent position for a harmonic oscillator with damping rate γ=0.1\gamma =0.1. The continuous line represents the exact result. The results obtained by numerical integration with time step ϵ=0.1\epsilon =0.1 are indicated by the + symbols for the Euler scheme and dots for the GENERIC integrator.
Figure 1

Time-dependent position for a harmonic oscillator with damping rate γ=0.1. The continuous line represents the exact result. The results obtained by numerical integration with time step ϵ=0.1 are indicated by the + symbols for the Euler scheme and dots for the GENERIC integrator.

Figure 1 shows the position q(t) as a function of time. We always start from the initial conditions q0=1, p0=0, and S0=0. 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 q(t) so that the key question is whether the angular frequency and the damping rate are reproduced properly. The GENERIC integrator with time step ϵ=0.1 (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 ϵ=0.1 (+ 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.

Time-dependent entropy increase for a harmonic oscillator with damping rate γ=0.1\gamma =0.1. The continuous line represents the exact result. The results obtained by numerical integration with time step ϵ=0.1\epsilon =0.1 are indicated by the + symbols for the Euler scheme and dots for the GENERIC integrator.
Figure 2

Time-dependent entropy increase for a harmonic oscillator with damping rate γ=0.1. The continuous line represents the exact result. The results obtained by numerical integration with time step ϵ=0.1 are indicated by the + symbols for the Euler scheme and dots for the GENERIC integrator.

The increase of the reservoir entropy S(t) 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 S(t) than for q(t), but the qualitative behavior of S(t) is reproduced properly. For smaller time steps, also the Euler scheme would reproduce the qualitative behavior of q(t) and S(t).

Total energy for a harmonic oscillator with damping rate γ=0.1\gamma =0.1. The exact value is given by 1/2. The results obtained by numerical integration with time step ϵ=0.1\epsilon =0.1 are indicated by the + symbols for the Euler scheme and dots for the GENERIC integrator.
Figure 3

Total energy for a harmonic oscillator with damping rate γ=0.1. The exact value is given by 1/2. The results obtained by numerical integration with time step ϵ=0.1 are indicated by the + symbols for the Euler scheme and dots for the GENERIC integrator.

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 ϵ=0.1 fails badly.

Total energy for a harmonic oscillator with damping rate γ=0.1\gamma =0.1. The exact value is given by 1/2. The results obtained by numerical integration with time step ϵ=0.25\epsilon =0.25 are indicated by the ◇ symbols for the explicit midpoint method and dots for the GENERIC integrator.
Figure 4

Total energy for a harmonic oscillator with damping rate γ=0.1. The exact value is given by 1/2. The results obtained by numerical integration with time step ϵ=0.25 are indicated by the ◇ symbols for the explicit midpoint method and dots for the GENERIC integrator.

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 ϵ=0.1, both the explicit and the implicit midpoint methods reproduce the curves q(t) and S(t) 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 [2]). 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 [28], [32] (see also Section 3 of [24]) for the characterization of structure preserving thermodynamic integrators.

Acknowledgment

I wish to thank Miroslav Grmela and Martin Kröger for many helpful discussions.

References

  • [1]

    J. Moser, Lectures on Hamiltonian systems, Mem. Am. Math. Soc. 81 (1968), 1–60. Google Scholar

  • [2]

    M. Grmela and H. C. Öttinger, Dynamics and thermodynamics of complex fluids. I. Development of a general formalism, Phys. Rev. E 56 (1997), 6620–6632. CrossrefGoogle Scholar

  • [3]

    H. C. Öttinger and M. Grmela, Dynamics and thermodynamics of complex fluids. II. Illustrations of a general formalism, Phys. Rev. E 56 (1997), 6633–6655. CrossrefGoogle Scholar

  • [4]

    H. C. Öttinger, Beyond Equilibrium Thermodynamics, Wiley, Hoboken, 2005. Google Scholar

  • [5]

    S. R. de Groot and P. Mazur, Non-Equilibrium Thermodynamics, 2nd ed., Dover, New York, 1984. Google Scholar

  • [6]

    L. Onsager, Reciprocal relations in irreversible processes. I, Phys. Rev. 37 (1931), 405–426. CrossrefGoogle Scholar

  • [7]

    L. Onsager, Reciprocal relations in irreversible processes. II, Phys. Rev. 38 (1931), 2265–2279. CrossrefGoogle Scholar

  • [8]

    H. B. G. Casimir, On Onsager’s principle of microscopic reversibility, Rev. Mod. Phys. 17 (1945), 343–350. CrossrefGoogle Scholar

  • [9]

    M. Kröger, M. Hütter and H. C. Öttinger, Symbolic test of the Jacobi identity for given generalized ‘Poisson’ bracket, Comput. Phys. Commun. 137 (2001), 325–340. CrossrefGoogle Scholar

  • [10]

    M. Kröger and M. Hütter, Automated symbolic calculations in nonequilibrium thermodynamics, Comput. Phys. Commun. 181 (2010), 2149–2157. CrossrefWeb of ScienceGoogle Scholar

  • [11]

    J. M. Sanz-Serna and M. P. Calvo, Numerical Hamiltonian Problems, Applied Mathematics and Mathematical Computation 7, Chapman & Hall, London, 1994. Google Scholar

  • [12]

    I. V. Karlin, A. Ferrante and H. C. Öttinger, Perfect entropy functions of the lattice Boltzmann method, Europhys. Lett. 47 (1999), 182–188. CrossrefGoogle Scholar

  • [13]

    S. Ansumali, I. V. Karlin and H. C. Öttinger, Minimal entropic kinetic models for hydrodynamics, Europhys. Lett. 63 (2003), 798–804. CrossrefGoogle Scholar

  • [14]

    C. P. Zinner and H. C. Öttinger, Numerical stability with help from entropy, preprint (2017), arxiv.org/abs/1408.6817. Google Scholar

  • [15]

    P. J. Morrison, Structure and structure-preserving algorithms for plasma physics, Phys. Plasmas 24 (2017), 055502. Web of ScienceGoogle Scholar

  • [16]

    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

  • [17]

    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

  • [18]

    M. Kraus and E. Hirvijoki, Metriplectic integrators for the Landau collision operator, Phys. Plasmas 24 (2017), 102311. Web of ScienceGoogle Scholar

  • [19]

    P. Español, M. Serrano and H. C. Öttinger, Thermodynamically admissible form for discrete hydrodynamics, Phys. Rev. Lett. 83 (1999), 4542–4545. CrossrefGoogle Scholar

  • [20]

    E. Hairer, Backward analysis of numerical integrators and symplectic methods, Ann. Numer. Math. 1 (1994), 107–132. Google Scholar

  • [21]

    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

  • [22]

    J. E. Marsden and M. West, Discrete mechanics and variational integrators, Acta Numerica 10 (2001), 357–514. CrossrefGoogle Scholar

  • [23]

    R. M. Santilli, The Inverse Problem in Newtonian Mechanics, Foundations of Theoretical Mechanics I, Springer, Berlin, 1978. Google Scholar

  • [24]

    W. Muschik, P. Ván and C. Papenfuss, Variational principles in thermodynamics, Technische Mechanik 20 (2000), 105–112. Google Scholar

  • [25]

    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

  • [26]

    S. Melchionna, Design of quasisymplectic propagators for Langevin dynamics, J. Chem. Phys. 127 (2007), 044108, 1–10. Web of ScienceGoogle Scholar

  • [27]

    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

  • [28]

    J. Merker and M. Krüger, On a variational principle in thermodynamics, Continuum Mech. Thermodyn. 25 (2013), 779–793. Web of ScienceCrossrefGoogle Scholar

  • [29]

    S. Goto, Legendre submanifolds in contact manifolds as attractors and geometric nonequilibrium thermodynamics, J. Math. Phys. 56 (2015), 073301. Web of ScienceGoogle Scholar

  • [30]

    A. Bravetti, H. Cruz and D. Tapias, Contact Hamiltonian mechanics, Ann. Phys. 376 (2017), 17–39. CrossrefWeb of ScienceGoogle Scholar

  • [31]

    A. Bhatt and B. E. Moore, Structure-preserving exponential Runge-Kutta methods, SIAM J. Sci. Comput. 39 (2017), A593–A612. Google Scholar

  • [32]

    K. Wang, L. Wang and J. Yan, Implicit variational principle for contact Hamiltonian systems, Nonlinearity 30 (2017), 492–515. CrossrefWeb of ScienceGoogle Scholar

About the article

Received: 2017-07-06

Revised: 2017-10-20

Accepted: 2017-12-01

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.

Export Citation

© 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

Citing Articles

Here you can find all Crossref-listed publications in which this article is cited. If you would like to receive automatic email messages as soon as this article is cited in other publications, simply activate the “Citation Alert” on the top of this page.

[1]
Miroslav Grmela
Journal of Physics Communications, 2018, Volume 2, Number 3, Page 032001

Comments (0)

Please log in or register to comment.
Log in