Stability of rigid body motion through an extended intermediate axis theorem: application to rockfall simulation

The stability properties of a freely rotating rigid body are governed by the intermediate axis theorem, i.e., rotation around the major and minor principal axes is stable whereas rotation around the intermediate axis is unstable. The stability of the principal axes is of importance for the prediction of rockfall. Current numerical schemes for 3D rockfall simulation, however, are not able to correctly represent these stability properties. In this paper an extended intermediate axis theorem is presented, which not only involves the angular momentum equations but also the orientation of the body, and we prove the theorem using Lyapunov’s direct method. Based on the stability proof, we present a novel scheme which respects the stability properties of a freely rotating body and which can be incorporated in numerical schemes for the simulation of rigid bodies with frictional unilateral constraints. In particular, we show how this scheme is incorporated in an existing 3D rockfall simulation code. Simulations results reveal that the stability properties of rotating rocks play an essential role in the run-out length and lateral spreading of rocks.


Introduction
In this paper an extended version of the intermediate axis theorem is presented and rigorously proven. These results are used to derive a novel simulation scheme which respects the stability properties of a freely rotating body. The research is being motivated by the practical application of rockfall simulation.
Rockfall is a serious natural hazard in mountainous areas and represents a major threat to infrastructure, transportation lines, and people [7]. The identification of potential rockfall starting zones, the calculation of the rock trajectories in complex three-dimensional terrain, and the interaction of falling rocks with protection measures, such as rockfall dams, catching nets, and mountain forests, are three major components of the rockfall problem and research [27]. Methods to predict rockfall trajectories in complex three-dimensional terrain (given an unstable source area) have great practical value as they can be used to determine the danger of rockfall run-out zones as well as to dimension protection measures. Although rockfall research has been dominated in the past by simple point mass and 2D models because of their computational efficiency, 3D rockfall simulation with complex shape models is now becoming standard. Several 3D codes exist (see [16] for an extensive overview), but only few consider a 3D rock shape for the inertia properties, contact detection, and contact laws. CRSP-3D (Colorado Rockfall Simulation Program) [2] employs the distinct element method together with a penalty approach. Aspherical boulder shapes, such as a rectangular cuboid or a cylinder, are approximated in [2] by a collection of rigid spheres with interconnecting elastic elements. The rockfall simulation code STAR3-D [6,13,14] is a fully three-dimensional rockfall simulation code with a rigid complex shape model. However, STAR3-D is limited to parallelepiped rock shapes. A full 3D simulation technique for rockfall dynamics, taking rock shape into account and using the state-of-the-art methods of multibody dynamics and nonsmooth contact dynamics, has been developed in [16]. The rockfall simulation technique is based on the nonsmooth contact dynamics method with hard contact laws, i.e., a Moreau-type timestepping method, see [1,15,21]. The rock is modeled as an arbitrary convex polyhedron and the terrain model is based on a high-resolution digital elevation model. The developed numerical methods have been implemented in the code RAMMS::ROCKFALL, which is being actively used in the natural hazards research community [5].
Field observations of natural rockfall events, 1 as well as high precision measurements with instrumented experimental rocks [4], have shown that platy disk-shaped rocks have the tendency to roll and bump down the slope around their major principal axis, performing a wheel-like motion. Simulations with the present scheme implemented in RAMMS::ROCK-FALL, which treats gyroscopic terms in an explicit way, fail to represent the observed wheellike motion of platy rocks around the major principal axis. Furthermore, numerical simulations with the present scheme showed that stable rotation in free flight around the major principal axis is not possible, contrary to the intermediate axis theorem. The speed of deviation from the major principal axis can be controlled by choosing a small integrator timestep, but leads to unacceptable simulation times. The stable rotation around the major principal axis of platy disk-shaped rocks enlarges the run-out distance of rockfall trajectories. The present "explicit" scheme leads to a reduced estimation of the run-out zone of wheel-shaped rocks and therefore underestimates the rockfall danger.
The intermediate axis theorem [8,19] is a result of the Euler equations describing the movement of a rigid body with three distinct principal moments of inertia. The theorem describes the following effect: rotation of a rigid body around its minor and major principal axes is stable, while rotation around its intermediate principal axis is unstable. These stability properties where already reported by Poinsot [22]. A rigorous proof of the stability of the minor and major principal axes of the Euler equations has been given in [11] using the energy-Casimir method, i.e., a Lyapunov function based on the Hamiltonian and a suitable Casimir function (see also [12]). The classical intermediate axis theorem, however, only involves the Euler equations for the three components of the angular velocity and not the orientation of the body.
In the course of the paper, we will see that the conservation of mechanical stability properties by numerical schemes (not to be confused with numerical stability properties) is closely related to their ability to exactly keep energy and momentum as invariants of motion. The development of energy-momentum conserving schemes is a field of active research [9,10]. We may distinguish between projective methods and schemes which directly preserve the energy and momentum. Of the latter type, we name the ALGO-C1 algorithm of Simo and Wong [26], the symplectic Discrete Moser-Veselov Algorithm [20] (being for rigid body equations equivalent to the RATTLE algorithm) [20] and the quaternion-based scheme of Betsch and Siebert [3]. However, the application and implementation of existing energy-momentum conserving schemes in rockfall simulation are not straightforward. The scheme needs to be able to deal with a singularity-free description of orientation. The scheme needs to be able to accommodate for dissipation and, at the same time, preserve invariants of motion in the dissipation-free case. Furthermore, the need to deal with frictional unilateral constraints in rockfall simulation asks to embed the energy-momentum conserving scheme in the Moreau-type timestepping scheme, which is not a trivial task. Moreover, existing rockfall simulation codes take into account a wealth of different types of dissipation mechanisms (e.g., to take into account the effect of trees and vegetation [18]). The fully implicit coupling between position and velocity updates of most energy-momentum conserving schemes makes it difficult to judge if they can be successfully combined with these specialized dissipation and contact laws.
The aims of the current paper are threefold: • An extended version of intermediate axis theorem for motion in the 6-dimensional statespace, which also involves the orientation of the body, is presented and rigorously proven. • An energy-momentum preserving scheme which preserves the stability properties in accordance with the (extended) intermediate axis theorem is presented. The novel scheme treats the gyroscopic terms in an implicit way. It is shown how this scheme can be easily incorporated in an existing rockfall simulation code, meeting all the requirements mentioned above. • As demonstration of the above, we briefly study the performance of the scheme in a 3D rockfall simulation software on two test cases.
The paper is organized as follows. In Sect. 2 we describe the dynamics of a freely rotating body in state-space form using as states the three angular velocity components and an arbitrary parametrization of the orientation of the body with respect to the inertial frame. Furthermore, we explicitly describe the stationary motion of which we want to assess the stability properties. Using the method of Lyapunov functions we rigorously prove in Sect. 3 an extended version of the intermediate axis theorem in the full state-space. In Sect. 4 we use the same techniques to investigate stability properties of numerical schemes. First, we prove that the present scheme, which is fully explicit during flight phases of the rock, does not respect the intermediate axis theorem. Furthermore, we present an alternative implicit scheme which correctly describes the stability properties of a freely rotating body. Results with the novel scheme implemented in RAMMS::ROCKFALL are given in Sect. 6.

Dynamics of a free spinning body
In this preliminary section, we first set notation in Sects. 2.1 and 2.2 and then cast the error dynamics with respect to a stationary motion in terms of an ordinary differential equation suitable for standard Lyapunov techniques in Sect. 2.3.

Equations of motion of a free spinning body
Let V be a Euclidean vector space. To describe the orientation of a rigid body, we use a body-fixed frame K = ( e K x , e K y , e K z ), as well as an inertial frame I = ( e I x , e I y , e I z ) (Fig. 1). An arbitrary vector a ∈ V can be expressed in the K-frame through the tuple K a ∈ R 3 , which is related to its representation I a in the inertial frame through where A I K = I e K x I e K y I e K z ∈ SO(3) is the transformation matrix describing the orientation of the body. Likewise, we introduce A KI = K e I x K e I y K e I z = A T I K = A −1 I K . Let K denote the angular velocity of the body expressed in the body-fixed frame K. The spin of the body (sometimes called "angular momentum with respect to the center of gravity," "spin angular momentum," or simply "angular momentum") is defined by where S is the inertia tensor. The inertia tensor takes a constant form in the body-fixed frame, which we choose to be aligned along the principal axes of inertia, such that where A, B, C > 0 are the principal moments of inertia around the minor, intermediate, and major principal axis, respectively. We will denote := K S as inertia matrix to have a short-hand notation. During flight, the rotational motion of the rock is decoupled from the translational motion and fully described by the spin invariance˙ N S = 0, yielding in the body-fixed frame, which leads to the Euler equations for a freely rotating rigid body Herein, we used the short-hand notation ω = K for the angular velocity expressed in the body-fixed frame. The evolution of the orientation of the body may be derived through the use of the rigid body formula on the triad which yields in the I -frame and similarly for e K y and e K z , where the tilde operator gives the skew-symmetric matrixω such thatωc = ω × c for all c ∈ R 3 . Hence, the time-derivative of the transformation matrix is given bẏ (8) which yields the resultȦ The orientation of the body may be freely parameterized using, for instance, unitquaternions p ∈ R 4 or axis-angle notation (n, χ ), see [23]. The matrix differential equation (9) results in a set of ordinary differential equations for the chosen parametrization. If a quaternion p = ( 0 , T ) T representation is used, then the rotation matrix is parametrized as resulting inṗ with

Invariants of motion of the Euler equations
The body has the rotational kinetic energy being a constant of motion as directly follows from the Euler equations (5), The second invariant is the spin which is constant in the inertial frame, i.e., using (15) and (9), When expressed in the body-fixed frame, the spin K N S is not constant but keeps a constant magnitude as follows from

Stationary motion
A rigid body may undergo a stationary motion for which its angular velocity is constant, i.e., ω = 0. We will denote such a stationary motion in state-space as (A I K (t), ω ). From the Euler equations (5), we infer that stationary motion is only possible if the term ω × ( ω) vanishes. Stationary motion therefore implies that ω is in an eigendirection of , resulting in three stationary directions of motion K e K x , K e K y , K e K z . Without loss of generality, let ω = e , where e = e 3 = 0 0 1 T agrees with K e K z . The vector e may be complemented by e 1 = 1 0 0 T and e 2 = 0 1 0 T to form an orthonormal basis. The evolution of the orientation of the body during stationary motion follows from the closed form solution of the matrix differential equation (9). Without loss of generality, we set A I K (0) = I . From  (19) it follows that e K z = e I z for all t . The stationary motion (A I K (t), ω ) itself cannot be stable, irrespective of the principal axis which is considered, because a small error in the magnitude of the angular velocity ω = ( + )e will cause A I K (t) to diverge from A I K (t). Hence, instead of the stationary motion, we need to study the stability of the axis of rotation, or, more precisely, of a manifold in state-space related to that. Hereto, we consider the difference between the axes of rotation e K z = e I z of the stationary motion and e K z of an arbitrary motion, which we express in the K-frame using the quantity Furthermore, to parametrize the transformation matrix A I K (t), we also introduce the timedependent quantities The transformation matrix may therefore be expressed as Furthermore, we introduce the quantity to express the difference in rotation speed, which is being governed by the Euler equations (5) Having introduced the quantities d and α, we can define the manifold of stationary rotation in a straightforward way by The dynamics of the difference d(t) to the axis of stationary rotation is given bẏ being only dependent on d and α. It holds Hence, the manifold M of stationary rotation is invariant. The differential equations (27) and (25) can be gathered using y(t) = d T α T T in the system of ordinary differential equationsẏ which is time-autonomous. The stability of the axis of rotation now bears down to the stability of the invariant manifold M, i.e., the stability of the equilibrium y = 0 of system (28). The stability properties of stationary rotation in the 6-dimensional state-space y will be referred to as the extended intermediate axis theorem.

Stability of rotation around the major principal axis
We consider motion in the vicinity of the stationary rotation ω = e , > 0, and C ≥ max(A, B) such that e is the major principal axis of inertia. Herein, the K -frame is the body-fixed frame of stationary motion, whereas we will reserve the K-frame for the bodyfixed frame of an arbitrary motion in the vicinity of the stationary motion. The frames are related through A KK = A KI A I K = A T I K A I K and it therefore holds that The following theorem may be viewed as an extended intermediate axis theorem, as it not only proves that the angular velocity ω remains close to ω (i.e., the classical intermediate axis theorem), but also proves that d remains small, i.e., the orientation of the axis of rotation is stable. Theorem 3.1 (Stability of rotation around the major principal axis) Let C ≥ max(A, B) be such that e is the major principal axis of inertia. The invariant manifold Proof In order to set up a Lyapunov function for the equilibrium y = 0 of system (28), we consider the functionV The spin N S can be easily expressed in the K -frame as K N S = ω = C e , which can be cast in the K-frame through Furthermore, we introduce the function which can be expressed aŝ To prove stability of the trivial equilibrium of (28) for C ≥ max(A, B), we consider the Lyapunov candidate function which purely consists of the invariants of motion N S = const. and T (ω) = const. and is therefore constant, i.e., it holds thatV = 0 along solutions of the system. The (local) positive definiteness of V remains to be investigated in the following.
First, we prove that the functionV (α) is a locally positive definite function of its argument α. We infer thatV (α) ≥ 0 for arbitrary α ∈ R 3 as it is a sum of squares with positive coefficients for C ≥ max (A, B). Moreover, the points whereV (α) = 0 are characterized by α x = 0, α y = 0 and α z (α z + 2 ) = 0. This implies thatV vanishes at the origin and at the point α = (0 0 − 2 ) T and is strictly positive for all other α ∈ R 3 , proving thatV (α) is locally positive definite.
As V is the sum ofV (d, α) ≥ 0 andV (α) ≥ 0, it may only vanish ifV (d, α) andV (α) vanish simultaneously. From the local positive definiteness ofV (α) it is clear that, in the neighborhood of the origin, V may only vanish for α = 0. Now we considerV (d, α) and note thatV (d, 0) = C 2 2 d 2 can only vanish if d = 0. This proves local positive definiteness of V and, thereby, that rotation around the major principal axis is stable.
Remark In [11] the stability of stationary rotation around the major principal axis of the 3-dimensional Euler equations (5), or equivalently of the error dynamics (25), was proven in a coordinate-free way using a Lyapunov function constructed using the sum of the Hamiltonian T (ω) and a suitable Casimir function ( 1 2 N S (ω) 2 ). The result of [11] would have given an alternative choice for the functionV (α) in Theorem 3.1, being constant and locally positive definite in α. Here, the aim is to derive a numerical scheme and we have refrained from a coordinate-free description. The choice (34) for the functionV (α) involves less powers of the components of α than a construction by using a Casimir function.

Stability of rotation around the minor principal axis
We now consider the stability of stationary rotation around the minor principal axis by setting again ω = e , > 0 with e = e 3 , but assuming C ≤ min(A, B). The proof of the stability of stationary rotation around the minor principal axis is completely analogous to the proof for the major principal axis.
Proof We consider again the Lyapunov candidate function of the form where the function is defined as before, butV (α) is chosen aŝ The Lyapunov function is constant along solutions and is locally positive definite for C ≤ min(A, B), proving stability of rotation around the minor principal axis.

Instability of rotation around the intermediate axis
Within Lyapunov stability theory, instability of equilibria is usually proven using Chetayev's instability theorem, which involves a continuously differentiable function V for whichV > 0 in a wedge V > 0 near the origin. The construction of such a function can therefore not be based on invariants of the system. For the instability proof, we therefore resort to an eigenvalue analysis. The angular velocity dynamics (25) is decoupled from the orientation dynamics (27). It therefore suffices to prove instability of the equilibrium α = 0 of (25), similar to the classical intermediate axis theorem, of which we briefly show the main steps. Rearranging (25) leads tȯ Neglecting terms of second-order leads to the linearized dynamicṡ The newly defined matrix A can be obtained from and, therefore, it holds that The eigenvalues of the error dynamics, i.e., the roots λ of the characteristic polynomial are given by We see that the eigenvalue analysis is inconclusive for rotation around the major principal axis (C ≥ max (A, B)) and minor principal axis C ≤ min

Numerical schemes for a free rotating body
We first briefly discuss the fully explicit scheme (or pseudoimplicit scheme) which is currently implemented in RAMMS::ROCKFALL in Sect. 4.1 and subsequently present a novel scheme in Sect. 4.2. A numerical comparison is given in Sect. 4.3.

Fully explicit scheme
Let ω k denote the angular velocity of the rock at time instant t k . The present scheme calculates the angular velocity ω k+1 at time instant t k+1 = t k + t (in the absence of contact with the terrain) through where G(ω) = ω +ω . The resulting explicit velocity update is where the last step is the result of a telescopic expansion. The rotation matrix is parametrized using a quaternion p k with a midpoint update rule where p k+ 1 2 = p k + t 2 F (p k )ω k . The rationale behind the explicit scheme is that it preserves the kinetic energy. The change in kinetic energy over the time step is Substitution of the explicit scheme (45) yields due to the skew-symmetry of G(ω) which shows that the kinetic energy is conserved. A stationary solution ω = ω k = ω k+1 of the scheme respects and corresponds to a stationary rotation of the Euler equations around principal axes.
Let α k be the perturbation of the angular velocity with respect to the stationary rotation ω = e around the principal axis e = e 3 . The perturbation dynamics is obtained using where the linearity of G and (50) have been used. For small perturbations we can neglect higher order terms in α k giving the linearized perturbation dynamics The linearized perturbation dynamics can be solved for α k+1 explicitly. Hereto, the second term is reformulated as where A = − ( ω ) +ω . Next, the matrixˆ = + t 2 G(ω ) in (52) has the inversê where the determinant ofˆ is given by detˆ = ABC + t 2 4 C(A + B) 2 . Hence, the linearized perturbation dynamics can be given in the explicit form in which the matrix D has the nonzero components The stability of rotation around the major principal axis is determined through the eigenvalues of D, being the roots of the characteristic polynomial given by Herein, the parameters b = D 11 + D 22 and c = D 11 D 22 − D 12 D 21 can be calculated as The eigenvalues λ 1/2 in (58) take the form For rotation around the major principal axis, it holds that C ≥ max (A, B), from which follows that d < 0. Therefore, at least one of the eigenvalues has a magnitude larger than unity which proves instability of rotation around the major principal axis, contrary to the intermediate axis theorem. Hence, the explicit scheme cannot correctly represent the stability properties of a freely rotating body.

A stability preserving implicit scheme
Here, we propose an alternative scheme for the rotational motion of a free body which preserves the stability properties of the principal axes of rotation in accordance with the extended intermediate axis theorem. As a side remark, one needs to keep in mind that the aim of the paper is the improved prediction of rockfall. There exists of course a wealth of general purpose schemes which are of higher order, e.g. (explicit or implicit) Runge-Kutta schemes, BDF schemes, etc. However, any scheme that is not energy-momentum preserving will perform poorly on the dynamics of a freely rotating rigid body as it cannot respect the stability properties. Moreover, for rockfall simulation a scheme is needed which can deal with a singularity-free description of orientation (e.g., using unit quaternions). Of course, as explained in the introduction, there already exist energy-momentum preserving schemes for rigid body motion (e.g., ALGO-C1), having much better properties than the scheme presented here. However, for rockfall simulation a few constraints need to be met: 1. The scheme needs to be energy-momentum preserving; 2. It needs to use a singularity-free description of the orientation; 3. It needs to fit within the Moreau timestepping scheme, together with specialized dissipation and contact laws.
The last requirement rules out the use of existing dedicated schemes for rigid body motion as for these schemes there is a close mutual coupling between the angular velocity and orientation dynamics. Moreover, the use of higher-order approximations within the Moreau timestepping scheme makes little sense as, due to the fact that it has to deal with collisions, the Moreau scheme is intrinsically of low order. We therefore present a very simple alternative scheme in this section and will show in the remainder of the paper that this leads to an improved rockfall simulation code. The alternative scheme consists of two consecutive parts: 1. As update rule for the angular velocity, we use the implicit midpoint scheme proposed by [24]; 2. As update rule for the orientation parametrization, we propose a novel scheme which preserves the spin.
The implicit midpoint scheme for the angular velocity calculates ω k+1 at time instant t k+1 = t k + t during a flight phase as Substitution of the scheme (61) in the kinetic energy expression (48) yields showing that the kinetic energy is preserved by the implicit scheme. The magnitude of the spin N S = K N S = ω , defined by (15), is only dependent on the angular velocity. The implicit scheme for the angular velocity also conserves the magnitude of the spin as follows from We now propose an update rule for the orientation parametrization. The update of the orientation A k+1 I K is chosen such that the spin remains constant, i.e., and such that the kinematic equation is correctly approximated in the sense that whereȦ I K = A I K (t)ω. We choose an update of the form where the matrix B depends on ω k and ω k+1 and needs to fulfill B T B = I to ensure that (A k+1 I K ) T A k+1 I K = I . Furthermore, we demand that B(x, x) = I for all x such that from which follows the kinematic consistency (65).
To ensure the conservation of spin (64), we demand which, after substitution of the update rule, gives The matrix B will now be chosen such that and therefore from which we see that it is indeed only dependent on ω k and ω k+1 . The matrix B is a pure rotation as it is orthogonal, i.e., B T B = I , and has a determinant +1. We recall that, by using Rodrigues formula, every pure rotation R around the unit vector k with rotation angle θ can be represented as (72) If k and θ are chosen as To prove that the proposed scheme has the desired stability properties of the principal axes of inertia, we use the Lyapunov functions V (y k ) for the major and minor principal axes as presented before. As the proposed scheme conserves the kinetic energy and the spin by construction it holds that V (y k+1 ) = V (y k ), whereas positive definiteness has already been shown. The proposed scheme therefore preserves the stability properties of the principal axes of inertia in accordance with the extended intermediate axis theorem.

Numerical comparison
We compare the explicit and the implicit scheme on a numerical example. We consider a cuboid of mass m = 1 kg with length a = 3 m, width b = 2 m, and height c = 1 m in the e K x , e K y and e K z direction, respectively. The principal moments of inertia are therefore A = m 12 (b 2 + c 2 ), B = m 12 (a 2 + c 2 ), and C = m 12 (a 2 + b 2 ) such that A < B < C. Rotation in the neighborhood of stationary rotation ω = e around the major principal axis e = e 3 is considered. As initial conditions we choose A I K (0) = I and ω = ω x ω y ω z T =  rotation around the major principal axis (approximately at t = 10 s) and tends to stable rotation around the minor principal axis with angular speed ω x = − C A . If a smaller timestep is taken in the explicit scheme, then the change of axis will be slower and will take place at a later point in time. This also follows from the fact that the eigenvalues λ 1,2 in (59) tend to 1 if the timestep is reduced. The solution of the implicit scheme remains very close to the major principal axis, both in angular velocity and in the difference vector d(t) = K e K z − K e K z and is therefore much more accurate. In Fig. 4, the results of both schemes are compared for an initial rotation around the unstable intermediate axis principal axis. An initial angular velocity of ω = ω x ω y ω z T = 10 −3 10 10 −3 T rad/s is chosen. For the explicit scheme, the rotation around the K e K yaxis is unstable, and the motion asymptotically tends towards rotation around the minor principal axis. The implicit scheme correctly predicts that the motion will move on the heteroclinic orbit and will keep on swapping back and forth from rotation around the K e K y -axis in positive direction to rotation around this axis in negative direction.

Implementation in a rockfall simulation code
The translational and rotational equations of motion and impact equations for rockfall simulation are described in detail in [16], together with the modeling of rock shape, contact interactions, dissipation mechanisms, and terrain. The explicit and implicit scheme are discussed in Sect. 4 for the rotational motion of a free body. Here we will explain how the implicit scheme can be implemented in RAMMS::ROCKFALL taking into account dissipation and contact interaction. First, we will briefly explain the current implementation of the explicit scheme.
The motion of the rock is described through a set of generalized coordinates where r := I r OS is the position of the center of mass and p is the quaternion which encodes the transformation matrix A I K . The equations of motion are expressed in the generalized where v := I v S = I˙ r OS is the velocity of the center of mass, i.e., the translational motion is expressed in the inertial frame and the rotational motion in the body-fixed frame. Various kinds of dissipation (e.g., viscous drag in layer close to the terrain) and gravity are taken into account through an external force f ext (q, u) := I F and torque M ext (q, u) := K M S with respect to the center of mass S. The velocity dependence of the external forces and torques stems from drag terms which are assumed to be linear [16] where the drag coefficients c drag and C drag are only active in a drag layer above the terrain and therefore depend on the position r of the rock. Contact interactions with the terrain lead to nonimpulsive contact forces and impulsive contact forces which are governed by frictional contact and impact laws. Velocity-impulse-based integration techniques, such as Moreau's timestepping scheme, are a very robust way to deal with multibody systems with frictional unilateral constraints, forming an active field of research within the Nonsmooth Dynamics community. The implementation in RAMMS::ROCKFALL may be seen as a variant of the classical Moreau timestepping scheme. Hence, the contact forces and impulsive forces are gathered in a discrete percussion P which enters into the translational and rotational part of the equations of motion through the generalized force directions W v (q) and W ω (q). Specially tailored contact laws are used for the discrete percussion P to correctly describe the physics of rock-terrain interaction. In particular, a dynamic slippage dependent friction law is employed to describe the scarring phenomenon, i.e., upon collision with the terrain the rock tends to slide along the slope pushing soil in front of it which increases the friction and finally lets it tumble over. These highly specialized contact laws have been developed and extensively reported in [16].

Implementation of the explicit scheme
In the style of Moreau's timestepping scheme, the explicit scheme first calculates a midpoint which is used to approximate the generalized force directions W 1 2 ). Subsequently, the generalized velocities u k+1 are obtained by solving the balance laws on velocity-impulse level together with set-valued combined contact-impact laws for the discrete percussions P k+1 , which implicitly depend on u k+1 . Also the external forces f k+ 1 2 ext = f ext (q k+ 1 2 , u k+ 1 2 ) and external torques M k+ 1 2 ext = M ext (q k+ 1 2 , u k+ 1 2 ) depend through u k+ 1 2 = 1 2 (u k + u k+1 ) on u k+1 . The stepping equations (80), together with the contact-impact laws, form a set of implicit equations for the unknowns (u k+1 , P k+1 ). The linearity of the drag terms in the external forces and torques, together with the explicit character of scheme, allows us to express u k+1 directly in the unknown percussion P k+1 , i.e., which can be used to reduce the set of equations to the unknowns P k+1 . In fact, the addition of the contact percussions to the explicit scheme renders it a semiimplicit scheme. Finally, the positions are updated through (83)

Implementation of the implicit scheme
We now discuss how to embed the implicit scheme for rotational motion within the Moreautype timestepping method in a way which is as little invasive as possible by using a two-step method.
First, similar to the explicit method a midpoint is calculated as in (79). In a first implicit step, a free angular velocity ω k+1 free is calculated through the implicit equation which does not account for the external torque and contact interaction. In a second implicit step, the final generalized velocity u k+1 are obtained by solving the implicit equations together with the contact-impact laws. In the case of linear drag, similar to (81) and (82), equations (85) can be solved for u k+1 , allowing us to reduce the equations to the unknowns P k+1 . The final velocity v k+1 is used to obtain the position update whereas we cannot use ω k+1 for the orientation update (66) because the spin is not conserved in the second implicit step. Instead, the free velocity ω k+1 free is used for the orientation update where A k I K is calculated from p k using (10) and B follows from (74). Finally, p k+1 is retrieved from A k+1 I K using, e.g., Shepperd's method [25].

Simulation results with RAMMS::ROCKFALL
A realistic modeling of platy shaped rocks, which descend downslope in a wheel-like motion, is of paramount importance in rockfall simulations. The following example simulations show the implications of the implicit integration scheme for accurate simulation results, especially for rocks that rotate around their major principal axis. Comparisons between the newly proposed implicit scheme versus the old explicit scheme are visualized for RAMMS::ROCKFALL simulations. All simulations were performed with a so-called EOTA 221 -platy shaped rock (see Table 1) which was also used in rockfall experiments with instrumented rocks at Chant Sura in Davos, Switzerland [4]. The rock mass is 780 kg, homogeneously distributed in a rigid body with dimensions of 0.93, 0.93, and 0.47 m along the three principal axes (x-, y-, and z-axis of the K-frame).

Idealized inclined slope
The first group of simulations was performed on an idealized digital elevation model (DEM) with an inclined slope of 40 • . In total 1000 simulations were performed. The initial rock orientation was the only varying input parameter. The same soil conditions as well as the same time step (0.002 s) was employed for both the explicit and the implicit scheme [17]. Figure 5 visualizes the maximal kinetic rock energy of the simulation ensemble of the thousand trajectories using the statistic mode of RAMMS::ROCKFALL for the explicit scheme and for the new implicit scheme (Figs. 5a and 5b, respectively). The maximal spatial spread of the explicit scheme is delineated with a red line for comparison purposes (Fig. 5b). The implicit scheme leads to a narrower distribution in the inclined section but longer and more curved run-out behavior in the flat run-out area in comparison to the explicit scheme. Figures 5c  and 5d show the altitude of the center of mass of the rock as a function of the projected distance, being the arclength of the horizontal projection of the trajectory. Furthermore, Figs. 5c and 5d compare the development of rock rotations along its principal axes for a single simulation with the same initial orientations. In the explicit scheme, the stability of the major  principal axis (z-axis in blue) is not well pronounced in the beginning, and is completely lost halfway down the slope. The implicit scheme on the other hand, stabilizes very fast along the major principal axis, and remains in this configuration after reaching the horizontal run-out zone. The longer run-out in the implicit scheme is due to the stable rotation along the major principal axis (wheel-motion). The new integrator is thus able to simulate the effective lateral spreading behavior during the run-out section with larger accuracy whereas the explicit integrator is producing a broad trajectory area coverage induced by the erratic tumbling motion. Table 2 compares the corresponding mean and standard deviation values obtained for both numerical schemes. Rotations and kinetic energy values are larger for the implicit scheme, whereas the jump heights are smaller and the velocities are only slightly smaller. The stable motion along the principal axis in the implicit scheme favors higher rotations and lower jump heights.

Chant Sura
The second group of simulations was performed using the DEM of the Chant Sura rockfall test site located near Davos, Switzerland [4]. Again, 1000 simulations were carried out, with identical soil parameters and the same time step (0.002 s) for both the explicit and the implicit schemes. The implicit scheme gives a similar extent in the acceleration zone for the rocks, see the first row in Fig. 6, whereas the lateral spreading and the run-out distance in the run-out zone are much longer when compared with the explicit scheme. The maximal spatial spread of the explicit scheme is indicated with a red line in Fig. 6b for comparison purposes. The implicit scheme captures the fast and stable rotation along the major principal axis (z-axis in blue) of the flat rock during the entire trajectory while the explicit scheme cannot reproduce the rock's stable rotation around its major principal axis throughout the entire traveling path. Table 3 lists the mean and standard deviation values for both numerical schemes. Equivalent trends as for the inclined plane are distinguishable, although the differences in kinetic energy are more obvious; the differences for the jump heights are less pronounced. Again, the stable motion along the principal axis in the implicit scheme favors higher rotations and velocities (and thus kinetic energies) and lower jump heights. Finally, Table 1 displays the computational time recorded for the 1000-rock simulations for the explicit and the implicit schemes. The implicit scheme is slower by a factor of around 2 in comparison to the explicit scheme, which is expected as the updating of rock rotations requires more computational effort. However, the former does respect the stability properties of rotating 3D objects, which is a key improvement for RAMMS::ROCKFALL. It is anticipated that for extremely long rolling phases of platy rocks the differences between the explicit and the implicit schemes could be even larger.

Conclusions
In this paper an extended intermediate axis theorem has been presented as a 6-dimensional extension of the classical stability results for the Euler equations. The stability of the major and minor principal axes of the 6-dimensional system has been proven using the method of Lyapunov functions. Using the same Lyapunov functions, we have given a rigorous proof that the implicit scheme conserves the energy and spin and, thereby, respects the extended intermediate axis theorem. Here, we have chosen an implicit scheme which uses the implicit midpoint rule for the angular velocity dynamics. It is evident that all energymomentum conserving schemes respect the extended intermediate axis theorem. Existing energy-momentum conserving schemes may have better accuracy than the scheme we proposed here, but the proposed scheme can be easily incorporated in existing rockfall simulation codes. Further research needs to be conducted to investigate how more sophisticated energy-momentum conserving schemes can be combined with the specialized dissipation and contact laws of rockfall simulation using Moreau-type timestepping methods.
The computational cost per time-step is larger for the implicit scheme than the explicit scheme, as Newton iterations are needed to solve the implicit equations. However, numerical simulations show that the implicit scheme is far more accurate as it respects both the energy conservation and the invariance of the spin.
Numerical simulations with RAMMS::ROCKFALL using the newly developed implicit scheme show that for the downward motion of a platy rock on an actual slope the rotation around the major principal axis is stable, even in the presence of intermediate collisions and contact phases with the slope as is also observed in field experiments. Furthermore, the simulations show that the proper simulation of wheel-like motion is essential for the correct statistical prediction of the run-out length. Future work will focus on the validation of simulation results against the real rockfall events and field experiments with instrumented rocks.
Funding Note Open Access funding enabled and organized by Projekt DEAL.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.