Abstract
In this paper, we consider numerical methods for the event location of differential algebraic equations. The event corresponds to cross a discontinuity surface, beyond which another differential algebraic equation holds. The methods are based on a particular change of the independent variable time, called time reparametrization or time transformation, reducing the equation to another equation where the event time is known in advance. From a numerical point of view, these methods never cross the discontinuity surface and reach it in a fixed number of steps. The methods works also for differential algebraic equations of index higher than one.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
This paper deals with differential algebraic equations (DAEs) with a discontinuity surface, where, during the numerical integration of the equation, it is required the accurate computation of the event point corresponding to reaching the discontinuity surface. Several real systems may be modeled by DAEs of this type, see for instance the applications in Chemical Engineering and Electrical Systems [1, 3, 21, 23]. In recent years, a growing interest has been observed concerning the theoretical aspects (see for example [10, 19, 20]), together with the numerical questions that arise in such DAEs (see for example [10, 15, 16, 19, 20, 22]). DAEs with a discontinuity surface are called in several way: non-smooth DAEs, hybrid DAEs, discontinuous DAEs, DAEs of Filippov type. Here, we use the term Discontinuous DAEs (DDAEs).
In the following, we consider a DAE of the form:
where \(y\left( t\right) \in \mathbb {R} ^{d_{1}}\), \(z\left( t\right) \in \mathbb {R}^{d_{2}}\) and \(f:\mathbb {R}^{d_{1}}\times \mathbb {R }^{d_{2}}\rightarrow \mathbb {R}^{d_{1}}\) and \(g:\mathbb {R}^{d_{1}}\times \mathbb {R }^{d_{2}}\rightarrow \mathbb {R}^{d_{2}}\) are sufficiently smooth functions. The initial value \((y_{0}, z_0) \in \mathbb {R}^{d_{1}}\times \mathbb {R}^{d_{2}}\) is assumed to be consistent, i.e. \(g(y_{0},z_{0})=0\).
Moreover, we consider the state space \(\mathbb {R} ^{d_{1}}\times \mathbb {R}^{d_{2}}\) as partitioned in the three subsets:
where \(h:\mathbb {R}^{d_{1}}\times \mathbb {R}^{d_{2}}\rightarrow \mathbb {R}\) is a sufficiently smooth function. The DAE (1) is assumed to hold in \(S^-\cup \Sigma \) and the initial value \((y_{0}, z_0)\) is assumed to belong to \(S^-\), while, in general, in \(S^+\cup \Sigma \) a different DAE is assigned. So, the DAE (1) is a DDAE with discontinuity surface \(\Sigma \).
We suppose that the DAE (1) has a unique solution (y, z) and this solution meets the discontinuity surface \(\Sigma \) at a certain time \(t^*>0\): we have \((y(t),z(t))\in S^{-}\) for \( t\in [t_0,t^*)\) and \((y(t^*),z(t^*))\in \Sigma \), i.e.
The time \(t^*\) is called the event time and the state \((y( t^*),z(t^*)) \) is called the event point. The event location is the determination of the event time \(t^*\) and the event point \((y( t^*),z(t^*))\).
The accurate evaluation of the event point is an important task in the integration of DDAEs, because, once evaluated the event point \((y(t^*),z(t^*)) \), one may decided what to do next. In general, after the event point, the solution can cross or slide on the discontinuity surface (see for istance [7]). In [18], it is studied how to compute the event time and the event point by means of the standard numerical methods for DAEs. In this paper, we compute the event time and the event point by means of a time reparametrization producing a new DAE where the event time is known a priori.
It is important for the event location to use numerical methods satisfying the following three properties:
-
(a)
the numerical event point \((y_{\tau }( t^*),z_{\tau }(t^*))\) lies on the discontinuity surface, i.e. \(h(y_{\tau }( t^*),z_{\tau }(t^*))=0\);
-
(b)
the numerical event point \((y_{\tau }( t^*),z_{\tau }(t^*))\) is consistent, i.e. \(g(y_{\tau }( t^*),z_{\tau }(t^*))\) \(=0\);
-
(c)
the numerical method is one-side, i.e. up to reaching the discontinuity surface the method uses values of f and g only at points of \(S^-\cup \Sigma \).
By using suitable numerical methods in the integration of the new DAE obtained by the time reparametrization, all the properties (a), (b) and (c) above can be satisfied. On the other hand, this cannot be achieved by standard numerical methods for DAEs.
Moreover, regarding the property (c), it is important that an one-side method can reach the discontinuity surface in an arbitrary number of steps fixed a priori, without needing to reduce the stepsize as one approaches the discontinuity surface. This is obtained in the numerical integration of the new DAE.
It is worthwhile to remark that the time reparametrization technique works also for DAEs of index higher than one.
The plan of the present paper is as follows. We start by recalling the standard numerical methods for DAEs and we show how to determine the event time and the event point by these methods. Then, we discuss one-side numerical methods and show the difficulties that the standard numerical methods encounter in satisfying the one-side property. After this, we describe the time reparametrization technique and then the related numerical methods fulfilling the properties (a), (b) and (c) above. Finally, some numerical tests conclude our paper.
2 Background on Standard Numerical Methods and Event Location for DAEs
In this section, we recall the standard numerical methods used for integrating DAEs, namely semi-implicit methods, implicit RK methods and Rosenbrock methods (for reference see [11, 12]). Moreover, we show how the event location is implemented for these methods (for reference see [18]).
The methods are applied over a mesh
of stepsizes
In the following, \(y_n\) and \(z_n\) denote the numerical approximations of the differential and algebraic variables y and z, respectively, at the mesh point \(t_n\).
During the numerical event location, the numerical integration continues up to mesh points \(t_{n^*}\) and \(t_{n^*+1}\) such that
After the individuation of such mesh points, the numerical event location determines the numerical event time \(t_{\tau }^{*} \) and numerical event point \((y_{\tau }^{*},z_{\tau }^{*})\).
2.1 Semi-implicit Methods
By using the usual notations for RK methods, a semi-implicit method is defined by the scheme
where the stage values \((y_{ni},z_{ni})\), \(i=1,\ldots ,\nu \), are successively obtained by
Here, \(b_i\) and \(a_{ij}\) are weights and coefficients, respectively, of a \(\nu \)-stage explicit RK method. Observe that the implicitness of this scheme consists in solving at each step the \(\nu +1\) non-linear equations (3)-(5) of dimension \(d_2\). By construction (see (3)), the numerical solution \((y_n,z_n)\) is consistent, i.e.
The numerical event time \(t_{\tau }^{*} \) and event point \((y_{\tau }^{*},z_{\tau }^{*})\) are obtained by solving the nonlinear system in the unknowns \(t_{\tau }^{*}\) and \(z_{\tau }^{*}\):
where
with
a continuous extension of the explicit RK method. By construction (see (6)), the numerical event point \((y_{\tau }^{*},z_{\tau }^{*})\) lies on the discontinuity surface (point a) in the introduction) and it is consistent (point b) in the introduction). The numerical event location requires the solution of the non-linear system (6) of dimension \(d_2+1\). The computational cost of solving such a system is a fraction of the computational cost of a step of the semi-implicit method, where \(\nu +1\) systems of dimension \(d_{2}\) need to be solved.
2.2 Implicit RK Methods
Implicit RK methods are given by
where the stage values \((y_{ni},z_{ni})\), \(i=1,\ldots ,\nu \), are obtained by solving the non-linear system of equations
Here, \(b_i\) and \(a_{ij}\) are weights and coefficients, respectively, of a \(\nu \)-stage implicit RK method and \(\omega _{ij}\) are the entries of the inverse of the RK matrix \(\left( a_{ij}\right) \). At each step of this implicit scheme, the non-linear system (8) of dimension \(\nu (d_1+d_2)\) has to be solved. If the implicit RK method is stiffly accurate, i.e.
then the numerical solution \((y_n,z_n)\) is consistent, since \((y_{n\nu },z_{n\nu })=(y_{n+1},z_{n+1})\) holds.
The numerical event time \(t_{\tau }^*\) and event point \((y_{\tau }^{*},z_{\tau }^{*})\) are obtained by
where the stepsize \(\tau ^*\) and the stage values \((y_{i}^{*},z_{i}^{*})\), \(i=1,\ldots ,\nu \), satisfy
As in case of semi-implicit methods, the numerical event point \((y_{\tau }^{*},z_{\tau }^{*})\) lies on the discontinuity surface (point a) in the introduction). Moreover, if the implicit RK method is stiffly accurate, then the numerical event point is consistent (point b) in the introduction). The numerical event location requires to solve the non-linear system (11) of dimension \( \nu (d_{1}+d_{2})+1\). So, the computational cost of solving such a non-linear system is essentially the same as the computational cost of a step of the implicit RK method, where a system of dimension \(\nu (d_{1}+d_2)\) needs to be solved.
2.3 Rosenbrock Methods
Rosenbrock methods read
where \((l_{ni},k_{ni})\), \(i=1,\ldots ,\nu \), are successively obtained by solving the linear system
with \((y_{ni},z_{ni})\), \(i=1,\ldots ,\nu \), on the right-hand side successively and explicitly given by
Here, \(b_i\), \(a_{ij}\) and \(\gamma _{ij}\) are weights and coefficients of a \(\nu \)-stage Rosenbrock method and \(f^n_y\), \(f^n_z\), \(g^n_y\) and \(g^n_z\) denote the jacobian matrices of f and g at \((y_n,z_n)\). The implicitness of this method consists in solving at each step \(\nu \) linear systems of dimension \(d_1+d_2\). In general, the numerical solution \((y_n,z_n)\) is not consistent.
The numerical event time \(t_{\tau }^{*}\) and event point \((y_{\tau }^{*},z_{\tau }^{*})\) are obtained by solving the equation
where
with
a continuous extension of the Rosenbrock method. As in case of semi-implicit methods and implicit RK methods, the event point \((y_{\tau }^{*},z_{\tau }^{*})\) belongs to the discontinuity surface by construction (point a) in the introduction). But, unlike semi-implicit methods and stiffly accurate implicit RK methods, it is not consistent in general (point b) in the introduction). The equation (15) is a scalar non-linear equation in the unknown numerical event time \(t_{\tau }^{*}\). The cost, for solving it, is a small fraction of the cost of a step of the Rosenbrock method, where \(\nu \) linear system of dimension \(d_1+d_2\) need to be solved.
3 One-side Methods
There are DDAEs where the functions f and g in (1) are defined only in \(S^{-}\cup \Sigma \) and not in \(S^{+}\) (see the example of DDAE given in [21]). In such situations, one needs to integrate the DAE (1) by a one-side numerical method, namely a method where the values of f and g are evaluated only at points of \(S^{-}\cup \Sigma \), while values of f and g at points of \(S^+\) cannot be computed.
The one-sideness is an important property that numerical methods for DDAEs have to satisfy (see point c) in the introduction).
For Discontinuous Ordinary Differential Equations (DODEs), numerical methods with this property based on one-step and multistep schemes have been developed in [6, 8]. However, such schemes can become expensive because they need to adapt the stepsize in order to approach the discontinuity surface. On the other hand, for DODEs, the methods studied in [9, 17] and based on a transformation of the time variable are one-side and they can reach the discontinuity surface in a number of steps fixed a priori, without needing to adapt the stepsize. In this paper, we propose for DDAEs similar one-side methods based on a time transformation.
Now, we briefly show the difficulties when we ask to be one-side to the standard numerical methods for DAEs. Here, we are thinking about methods that adapt the stepsize in approaching the discontinuity surface in order to be one-side.
In case of semi-implicit methods (2), (3), (4), (5), the one-side property requires
and
This cannot be obtained, since \( (y_{n^*+1},z_{n^*+1})\in S^{+}\). However, in the particular situation where \(h(y,z)=h(y)\), i.e h is a function of the sole variable y, the one-side property could be obtained first by checking for \(h(y_{n+1})>0\) and then, only in the situation where \(h(y_{n+1})\le 0\), to compute \(z_{n+1}\) by \(g(y_{n+1},z_{n+1})=0\).
In case of implicit RK methods (7), (8), the one-side property requires
This cannot be achieved if a stiffly accurate implicit RK method is used to obtain a consistent numerical solution, since \((y_{ns},z_{ns})=(y_{n^*+1},z_{n^*+1})\in S^{+}\) for \(n=n^*\). However, if the numerical integration up to \(t_{n^*+1}\) is accomplished by a non-stiffly-accurate method and the stiffly accurate method is used only in the event location (10), (11), the one-side property could be obtained.
In case of Rosenbrock methods (12), (13), (14), the one-side property require
and
This shows that techniques adapting the step in order to obtain a one-side method can be used for Rosenbrock methods. However, recall that these methods have the drawback of providing an event point which is not consistent in general (point b) in the introduction).
By summarizing, we can say that the numerical event locations by the three standard numerical methods presented above satisfy the property (a) in the introduction, but they fail to satisfy simultaneously the other two properties (b) and (c). On the other hand, the three properties (a), (b) and (c) can be satisfied simultaneously by numerically integrating the DAE obtained from the time transformation presented in the next section. Moreover, by this numerical integration, the discontinuity surface can be reached in an arbitrary number of steps fixed a priori.
4 Reparametrization of the Time
We present another approach to the event location for DDAEs, different from the use of standard numerical methods, called time reparametrization or time transformation. This approach has been introduced in [9] and [17] for DODEs and it has been also used in different contexts (see for instance [2, 4, 5, 13]).
We assume to have
which holds sufficiently close to the event time. This means that the time reparametrization should be used when the solution is definitely approaching the discontinuity surface.
4.1 The Time Transformation and the s-time DAE
Recall that \(t^*\) is the event time for the DAE (1). Fix \(s_{0}<0\) and let
be a \(C^1\) function such that \(\alpha (s_{0})=t_0\) and \(\alpha (0)=t^*\). We call \(\alpha \) a time transformation.
Now, we consider in the DAE (1) the time reparametrization (change of variable)
and we set
Observe that Y and Z are, respectively, the differential and algebraic variables in the new s-time, whereas y and z are the differential and algebraic variables in the old t-time.
The time transformation \(\alpha \) is chosen in order to have
where
is a given \(C^{1}\) strictly increasing function with \(\kappa (s_{0})=h(y_{0},z_0)<0\) and \(\kappa (0)=0\). In this manner, in advance we prescribe in the s-time how the negative values of the function h have to increase in order to reach zero at the event time. The simplest choice for \(\kappa (s)\) is \(\kappa (s)=s\) and then the initial s-time is \(s_0=h(y_0,z_0)\). Other forms of \(\kappa (s)\) are possible: for example, \(\kappa (s)=s^m\) with \(m\ge 2\) is used in [17].
The original t-time DAE (1) is transformed in a new s-time DAE where the time-transformation \(\alpha \) is one of the unknowns.
Theorem 1
The functions Y and Z and the time transformation \(\alpha \) satisfy
Proof
For \(s\in \left[ s_{0},0\right] \), we have
and
Moreover, (16) holds, the initial values for Y and Z at \(s_0\) are the initial values \(y_0\) and \(z_0\) for y and z at \(t_0\) and the initial value for \(\alpha \) at \(s_0\) is \(t_0\). \(\square \)
In this approach, where the time t is transformed in the time s and the event time becomes known to be 0 a priori, the event location consists in integrating the DAE (17) in the unknown Y, Z and \(\alpha \) over the interval \([s_0,0]\): the event time is \(\alpha (0)\) and the event point is (Y(0), Z(0)).
Observe that (17) is a DAE where \(\alpha ^\prime \), not \(\alpha \), is an unknown scalar algebraic variable. By introducing the fictitious differential equation \(\alpha ^\prime (s)=\beta (s)\), \(\alpha \) becomes a new differential variable and \(\beta \) is a new algebraic variable. The DAE (17) takes the form
Observe that the algebraic scalar variable \(\beta \) appears in the differential equations, but not in the algebraic equations.
4.2 Index and Form of the s-time DAE
A general DAE is said of index m, m positive integer, if m differentations of the algebraic equations provide explicit differential equations for the algebraic variables by reducing the DAE to an ODE.
Thus, by following this definition, if the original t-time DAE (1) has index 1, then the s-time DAE (18) is of index 2, and if the t-time DAE has index higher than 1, then the s-time DAE (18) has the same index as the t-time DAE. In fact, by two differentiations of the algebraic equation
we can obtain an explicit differential equation for \(\beta \).
Suppose that the t-time DAE (1) has index 1. Since the algebraic equation \(g(y,z)=0\) can be written as \(z=G(y)\) for some function G, the s-time DAE (18) reads
The DAE (19) is an Hessenberg index-2 DAE, i.e. a DAE where the algebraic variables appear only in the differential equations.
If the t-time DAE (1) is of index higher than 1, then the s-time DAE (18) inherits this higher index and it has in addition the scalar differential variable \(\alpha \) and the scalar algebraic variable \(\beta \), which appears only in the differential equations. In particular, if the t-time DAE (1) is an Hessenberg index-2 DAE
then the s-time DAE (18) becomes
The s-time DAE (21) has index 2, but in general it is not Hessenberg index-2, since the algebraic variable Z appears in the second algebraic equation. Of course, in the particular case \(h(y,z)=h(y)\), the s-time DAE (21) is Hessenberg index-2.
In the next two subsections, we see two alternative approaches for the solution of (17), different from viewing it as a DAE of index (at least) 2. One is to reduce it to an ODE by a unique differentiation (not two differentations) of the algebraic equation. The other is to reduce it to a DAE with the sole algebraic equation of the original DAE.
4.3 Reduction to an ODE
The DAE (17) can be reduced to an ODE by differentiating the algebraic equations.
Theorem 2
The functions Y and Z and the time transformation \(\alpha \) satisfy the ODE
where
and
with \(g_z,g_y,h_y,h_z\) derivatives (jacobian matrices) of the functions g and h with respect to the variables y and z.
Proof
For \(s\in \left[ s_{0},0\right] \), we have
and
Hence, we obtain
by (23) and
and then
by (24). Now, (22) easily follows. \(\square \)
Although the ODE (22) is equivalent to the DAE (17), it has a much more complicated form than (17) and it involves \(g_{y}\), the inverse of \(g_z\), \(h_{y}\) and \(h_{z}\).
4.4 Reduction to a DAE
In the particular case where \(h\left( y,z\right) =h\left( y\right) \), the DAE (17) is equivalent to a DAE with the same algebraic equation of the original DAE (1). This is obtained by differentiating the scalar algebraic equation involving h.
Theorem 3
Suppose \(h\left( y,z\right) =h\left( y\right) \). The functions Y and Z satisfy the DAE
and the time-transformation \(\alpha \) satisfy
Proof
For \(s\in \left[ s_{0},0\right] \), we have,
and then
in the differential equation of the DAE (17). \(\square \)
Observe that (25) is a DAE in the sole variables Y and Z and it has the same algebraic equation of the DAE (1). The time transformation \(\alpha \) satisfies the pure quadrature problem (26), which can be solved once Y and Z are determined. This reformulation of (17) as a DAE similar to the original DAE (1) only involves the derivative \(h_{y}\).
We have seen that, when the t-time DAE has index 1, the s-time DAE (18) has index 2. On the other hand, the index 1 of the t-time DAE turns out to be preserved in the DAE (25).
Remark 4
When the DAE (1) is an ODE, i.e. \(f(y,z)=f(y)\) and the algebraic equation is not present, the equation (17) remains a DAE and the equation (18) remains an Hessenberg index-2 DAE. Thus, we pay for the simplification of the problem, achieved through the time reparametrization, with the change in the nature of the equation, even in the simplest case of an ODE. Observe that in [17], the DAE (17) corrisponding to an ODE (1) is reduced to (25), which is an ODE.
5 Numerical Solution in the s-time
In this section we present numerical methods for the s-time DAE (18). When we consider such methods as methods for the numerical event location in the original t-time DAE (1), they turn out to be methods satisfying all three properties (a), (b) and (c) in the introduction. It is important to remark that none of the standard methods presented in Section 2 can do this.
We consider the situation where the s-time DAE (18) is Hessenberg index-2. This happens when the original t-time DAE has index 1 or has the Hessenberg index-2 form (20) and \(h(y,z)=h(y)\).
The s-time Hessenberg index-2 DAE reads
where
-
the first algebraic equation reads \(Z(s)=G(Y(s))\) for a t-time DAE of index 1;
-
the algebraic equations read \(g(Y(s))=0\) and \(h(Y(s))=\kappa (s)\) for a t-time Hessenberg index-2 DAE.
We integrate the Hessenberg index-2 DAE (27), over a mesh
of stepsizes
by RK methods (A, b, c) as illustrated in Chapter VII.4 of [12]. For a general Hessenberg index-2 DAE
where U is the vector of the differentiable variables and V is the vector of the algebraic variables, the RK numerical integration over the mesh (28) takes the form
where the stage values \((U_{ni},V_{ni})\), \(i=1,\ldots ,\nu \), are determined by the non-linear equations
with \(s_{ni}=s_n+c_i\tau _{n+1}\), and the derivatives \(l_{ni}\), \(i=1,\ldots ,\nu \), are determined by the linear equations
once the system (30) is solved,
About the convergence of the scheme (29), (30), (31), one can refer to the results in Chapter VII.4 in [12], in particular Table 4.1.
When the original t-time DAE has index 1, the RK numerical integration of the s-time DAE is
where the stage values \(\left( Y_{ni},Z_{ni},\beta _{ni}\right) \), \(i=1,\ldots ,\nu \), are obtained by solving the non-linear system
of dimension \(\nu (d_1+d_2+1)\).
When the original t-time DAE is Hessenberg index-2 and \(h(y,z)=h(y)\), the RK numerical integration of the s-time DAE is
where, first, the stage values \(\left( Y_{ni},Z_{ni},\beta _{ni}\right) \), \(i=1,\ldots ,\nu \), are obtained by solving the non-linear system
of dimension \(\nu (d_1+d_2+1)\) and, then, the derivatives \(l_{ni}\), \(i=1,\ldots ,\nu \), are obtained by solving the linear system
of dimension \(\nu d_2\).
The numerical integration of (27) provides the numerical event time \(\alpha _N\) and the numerical event point \((Y_N,Z_N)\). Observe that there is no equation for \(\beta _{n+1}\) in (32) or (34), since we are not interested in the nodal values \(\beta _{n}\) but only in the stage values \(\beta _{ni}\). In this manner, we can avoid to assign an initial value \(\beta _0\) for the variable \(\beta \).
If the s-time DAE is not Hessenberg index-2, then other RK schemes need to be used. In case of DAEs of index 3, see for example [14].
5.1 Diagonally Implicit Stiffly Accurate RK Methods
Suppose that a stiffly accurate RK method (recall (9)) is used for the integration (32), (33) or (34), (35), (36) of the s-time DAE (27). We have
and then the method consists only in the equations (33) or (35) and the equation for \(\alpha _{n+1}\).
The next theorem contains a fundamental result of our study
Theorem 5
If the t-time DAE (1) is of index 1, or it is Hessenberg index-2 and \(h(y,z)=h(y)\), and the numerical event location for such DAE is accomplished with an integration of the s-time DAE (27) by a stiffly accurate RK method, then the properties (a), (b) and (c) in the introduction are satisfied.
Proof
By construction (see (33) and (35)), we have a consistent numerical solution, i.e.
In particular, we have \(g(Y_{N},Z_{N})=0\) and so the numerical event point \((Y_N,Z_N)\) is consistent (point b) in the introduction).
Moreover, we have
i.e.
Thus, the method is one-side (point c) in the introduction), since the values of f and g are required only at points (37).
Finally, we have
In particular, we have \(h(Y_{N},Z_{N})=0\) and thus the numerical event point \((Y_N,Z_N)\) lies on the discontinuity surface (point a) in the introduction). \(\square \)
Observe that the one-side stiffly accurate RK method reaches the discontinuity surface, i.e. it reaches the final s-time \(s=0\), in an arbitrary number of steps fixed a priori, since there are no restrictions posed on the mesh (28).
5.1.1 Diagonally Implicit RK Methods
To avoid a large computational cost, we can use a diagonally implicit stiffly accurate RK method, instead of a fully implicit stiffly accurate RK method. Remind that a diagonally implicit RK method is a RK method such that
So, in (33) or (35), the stage values \(\left( Y_{ni},Z_{ni},\beta _{ni}\right) \), \(i=1,\ldots ,\nu \), are obtained by successively solving, for \(i=1,\ldots ,\nu \), the non-linear system
or
of dimension \(d_1+d_2+1\), where the stage value \(\left( Y_{ni},Z_{ni},\beta _{ni}\right) \) are the unknowns and the stage-values \(\left( Y_{nj},Z_{nj},\beta _{nj}\right) \), \(j=1,\ldots ,i-1\), have been already computed.
The computational saving is given, at any step, by the solution of \(\nu \) non-linear systems of dimension \(d_1+d_2+1\), rather than a unique non-linear system of dimension \(\nu (d_1+d_2+1)\).
5.1.2 Some Methods
The simplest diagonally implicit stiffly accurate RK method is the implicit Euler method.
Two-stage diagonally implicit stiffly accurate RK methods of order two (for ODEs) are given by the tableau
where
For \(b=\frac{1}{2}\), we have the trapezoidal rule. For \(b=0\), we have the implicit midpoint rule.
As another example of a diagonally implicit accurately stiff RK method, we give the following five-stage method of order four (for ODEs)
appearing in [12, IV.(6.16)]. Indeed, since all the diagonal coefficients \(a_{ii}\) are equal, this method is a singly diagonally implicit RK (SDIRK) method.
The global orders of convergence when the implicit Euler method, the trapezoidal rule, the implicit midpoint rule and the method (38) are applied to Hessenberg index-2 DAE are given in Table 1 derived from Table 4.1 in [12].
6 Numerical Tests
We consider three numerical examples for testing our approach to the numerical event location for DDAEs by the time reparametrization. Indeed, the first and third examples are event locations problems for DAEs, where one can imagine that the event equation could constitute a surface of discontinuity. Whereas, the second example comes from a model formulated as a DDAE.
6.1 The First Test
The first example is the three-dimensional DAE of index 1
whose solution is
with the event equation
where
In this situation, the event time is \(t^*=\frac{\pi }{3}\) and the event point is
The numerical event location is accomplished by integrating the Hessenberg index-2 DAE (18), relevant to the DAE (39), with \(\kappa (s)=s\). The implicit Euler method, the trapezoidal rule and the method (38), are used for the numerical integration. We consider uniform meshes (28) with
subintervals.
In Fig. 1, we see the time-transformation (computed with the method (38) over the mesh with \(k=10\)).
In Fig. 2, we see, for the three methods, the logarithm in base 10 of the errors
in red dashed lines marked with \(\diamondsuit \). The black solid lines marked with \(\star \) show convergences with order one, two, three and four.
The orders of convergence one, two and two in the differential variables (\(\alpha \) included) for implicit Euler method, trapezoidal rule and method (38), respectively, given in Table 1 are here confirmed. The order of convergence of the algebraic variable Z is the order of the differential variables since \(Z=G(Y)\) holds.
6.2 The Second Test
The second example is the DAE of index 1
where
describing the gas-phase in a model of soft-drink production (see [7]). The event equation is
and involves only y(t). After the event, we have a transition to the liquid-phase described by another DAE. About constants and parameters in (40), the following values
in suitable units are used.
The numerical event location is accomplished by integrating the Hessenberg index-2 DAE (18), relevant to the DAE (40), with \(\kappa (s)=s\). We use the three methods of the previous test over the same meshes.
In Fig. 3, we see the time-transformation.
In Fig. 4, we see the logarithm in base 10 of the errors as in the previous test. For the computation of the errors, the exact event time and event point are estimated by integrating with the method (38) over a uniform mesh with \(N=2^{13}\) subintervals, one thousand time more subintervals than the more refined mesh used: We obtain the values
For the implicit Euler method, the trapezoidal rule and the method (38) the observed orders are one, two and four, respectively. The method (38) has, on this problem, the order four for ODEs, not the order two of Table 1 for Hessenberg index-2 DAEs. This could be due to the fact that, since h depends only on the differentiable variable and the t-time DAE is of index 1, the s-time DAE can be reduced to a DAE of index 1 as described in Sect. 4.4, where the convergence order is the convergence order for ODEs.
6.3 The Third Test
The third example is given by the second order Hessenberg index-2 DAE describing the motion of the simple pendulum in cartesian coordinates x and y (the x-axis is horizontal and the y-axis is vertical downward)
where the algebraic variable n(t) appearing only in the differential equations is the tension of the pendulum rod. Here, we are assuming that the rod has unit length and the pendulum bob has unit mass.
We consider the initial condition
i.e. the pendulum starts with unit speed at \(45^{\circ }\) with respect to the vertical axis, and the event equation
i.e. the event is when the pendulum bob reaches the lowest point in the motion.
The DAE (41) has index 3 (by three differentiations of the algebraic equation we obtain a differential equation for n) and then the DAE (18) also has index 3. Thus, suitable numerical methods for the index 3 (see [14]) should be used for its integration. However, the DAE (41) can be reduced to an Hesseberg index-2 DAE by differentiating only one time the algebraic equation. We obtain
The numerical event location is accomplished by integrating the DAE (18), relevant to the first order version of the second order DAE (42), with \(\kappa (s)=s\). Unlike the previous tests, where the original t-time DAE was of index 1, here the t-time DAE is Hessenberg index-2. The s-time DAE is Hessenberg index-2, since \(h(y,z)=h(y)\).
For the numerical integration of the s-time DAE, we use the same methods with the same meshes of the two previous tests.
In Fig. 5, we see the time-transformation.
In Fig. 6, we see the logarithm in base 10 of the errors of \(t^*\), \(x^\prime (t^*)\) and \(n(t^*)\). The exact values of \(t^*\), \(x^\prime (t^*)\) and \(n(t^*)\) can be easily determined by well-known physics: we have
The implicit Euler method appears to converge with order one as predicted in Table 1. The trapezoidal rule appears to converge with order two for the differential variables as predicted in Table 1, but it does not converge for the algebraic variable although the order is two for such variables in Table 1. The method (38) appears to converge with order two, also for the algebraic variable although the order is one for such variables in Table 1.
Just for a comparison, by replacing the trapezoidal rule with the implicit midpoint rule, we obtain the errors in Fig. 7. The orders agree with Table 1, although the order for \(x^\prime (t^*)\) is four rather than two.
7 Conclusion
In this paper, we have presented a new approach to the event location for DDAEs based on a time reparametrization reducing the event location to the integration of an Hessenberg index-2 DAE up to a known final time. By integrating this DAE by a diagonally implicit stiffly accurate RK method, we obtain a not-so-computationally-expensive method for the numerical event location satisfying the properties (a), (b) and (c) in the introduction. None of the standard methods for the numerical event location of DDAEs satisfies all three of these properties. The approach can be used also for DAEs of index higher than 1.
Data availability
Data sharing not applicable to this article as no datasets were generated or analysed during the current study.
References
Agrawal, J., Moudgalya, K.M., Pani, A.K.: Sliding motion of discontinuous dynamical systems described by semi-implicit index one differential algebraic equations. Chem. Eng. Sci. 61, 4722–4731 (2006)
Amodio, P., Brugnano, L., Iavernaro, F.: Arbitrary high-order methods for one-sided direct event location in discontinuous differential problems with nonlinear event function. Appl. Numer. Math. 179, 39–49 (2022)
Biak, M., Hanus, T., Janovska, D.: Some applications of Filippov’s dynamical systems. J. Comput. Appl. Math. 254, 132–143 (2013)
Brunner, H., Maset, S.: Time transformation for delay differential equations. Discr. Contin. Dyn. Syst. 25, 751–775 (2009)
Brunner, H., Maset, S.: Time transformation for state-dependent delay differential equations. Commun. Pure Appl. Anal. 9, 23–45 (2010)
Berardi, M., Lopez, L.: On the continuous extension of Adams-Bashforth methods and the event location in discontinuous ODEs. Appl. Math. Lett. 25, 995–999 (2015)
Dieci, L., Elia, C., Lopez, L.: On Filippov solutions of discontinuous DAEs of index 1. Commun. Nonlinear Sci. Numer. Simulat. 95, 1105656 (2021)
Dieci, L., Lopez, L.: Numerical solution of discontinuous differential systems: approaching the discontinuity surface from one side. Appl. Numer. Math. 67, 98–110 (2013)
Dieci, L., Lopez, L.: One-sided direct event location techniques in the numerical solution of discontinuous differential systems. BIT Numer. Math. 55, 987–1003 (2015)
Galan, D.S., Barton, P.I.: Dynamic optimization of hybrid systems. Comput. Chem. Eng. 22 Suppl., S183–S190 (1998)
Hairer, E., Lubich, C., Roche, M.: The numerical solution of differential-algebraic systems by Runge-Kutta methods. Springer (1989)
Hairer, E., Wanner, G.: Solving ordinary differential equations II. Stiff Differential-Algebraic problems. Springer, Berlin (1996)
Henon, M.: On the numerical computation of Poincaré maps. Physica 5D, 412–414 (1982)
Jay, L.: Convergence of Runge-Kutta methods for differential-algebraic systems of index 3. Appl. Numer. Math. 17, 97–118 (1995)
Kunkel, P., Mehrmann, V.: Numerical solution of hybrid systems of differential-algebraic equations. Comput. Methods Appl. Mech. Eng. 197, 693–705 (2008)
Kunkel, P., Mehrmann, V.: Regular solutions of DAE hybrid systems and regularization techniques. BIT Numer. Math. 58, 1049–1077 (2018)
Lopez, L., Maset, S.: Time-transformations for the event location in discontinuous ODEs. Math. Comput. 87, 2321–2341 (2018)
Lopez, L., Maset, S.: Numerical event location techniques in discontinuous differential algebraic equations. Appl. Numer. Math. 178, 98–122 (2022)
Mao, G., Petzold, L.R.: Efficient integration over discontinuities for differential-algebraic systems. Comput. Math. Appl. 43, 65–79 (2002)
Majer, C., Marquardt, W., Gilles, E.D.: Reinitialilization of DEAs after discontinuities. Comput. Chem. Eng. 6, 8507–8512 (1995). (Suppl.,)
Najafi, M., Nikoukhah, R.: Modeling and simulation of differential equations in Scicos. Modelica, The Modelica Association: 177-185, (2006)
Park, T., Barton, P.I.: State event location in differential-algebraic models. ACM Trans. Model. Comput. Simul. 6, 137–165 (1996)
Stechlinski, P., Patrascu, M., Barton, P.I.: Nonsmooth differential-algebraic equations in chemical engineering. Comput. Chem. Eng. 114, 52–68 (2017)
Acknowledgements
The authors acknowledge that this research was supported by funds from the Italian MUR (Ministero dellUniversità e della Ricerca) within the PRIN 2017 Project Discontinuous dynamical systems: theory, numerics and applications; and by the INdAM Research group GNCS (Gruppo Nazionale di Calcolo Scientifico).
Funding
Open access funding provided by Università degli Studi di Trieste within the CRUI-CARE Agreement. The authors have no relevant financial or non-financial interests to disclose.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors have not disclosed any competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
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/.
About this article
Cite this article
Lopez, L., Maset, S. Time Reparametrization and Event Location for Discontinuous Differential Algebraic Equations. J Sci Comput 100, 3 (2024). https://doi.org/10.1007/s10915-024-02546-w
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10915-024-02546-w