Event-Capturing schemes#
General Principle#
Roughtly speaking, the event-capturing, a.k.a. time-stepping, method consists in the time-discretisation of the whole system (dynamics + relations + non-smooth laws), leading to a so-called one-step non smooth problem (OSNSP) solved at each time step.
Indeed, the main stages of the process are:
integrate the dynamics without constraints, to get some “free” solutions
formalize and solve a OSNSP (a LCP for example)
update the dynamics with the OSNSP solutions to get the full state.
The discretization process for different dynamical systems, relations and laws is described thereafter. A summary of all the results can be found in section Summary of the time discretized equations
Notations:
In the following sections, the systems are integrated over a time step \([t_i,t_{i+1}]\) of constant size \(h\). The approximation of any function \(F(t,...)\) at the time \(t_i\) is denoted \(F_i\). Note that in the relations writings, upper case letters are used for all variables related to DynamicalSystem objects: \(X , Q, \ldots\) are concatenation of \(x, q,\ldots\) of the dynamical systems variables concerned by the relation.
First order systems#
Time Discretisation of the Dynamics#
First Order Non Linear Systems#
with \(r = r^d = \sum_{\alpha} r^{\alpha}, \alpha \in I_d\), \(I_d\) being the set of all relations in which the current dynamical system, number \(d\), is involved. In the following, the index “d” will be omitted to lighten notations.
The integration of the ODE over a time step \([t_i,t_{i+1}]\) of length \(h\) is :
The left-hand term is \(M(x(t_{i+1})-x(t_i)) \approx M(x_{i+1} - x_i)\) .
Right-hand terms are approximated with a \(\theta\)-method:
and the third integral is approximated with:
Then, we get the following “residu”
Note: We introduce the “free” notation for terms related to the smooth part of the system.
A Newton method is used to solve \(\mathcal R(x_{k+1}) = 0\). The gradient of the residu according to \(x\) is:
And we get (index k corresponds to the Newton iteration number):
with
If we assume that \(W_{i+1}^k\) is invertible, we get the solution at Newton iteration k+1:
First Order Linear Systems#
For the integration of the ODE over a time-step, we proceed as in the previous section for non-linear systems to get:
We denote:
and assuming it is invertible, we get:
First Order Linear Systems with time invariant coefficients#
Using the results of the previous section, the discretisation is straightforward:
with a W that does not depend on time:
Time discretization of the relations#
In the following, \(R\) represents the concatenation of all \(r^{\alpha}\) vectors for the DS involved in the present relation.
First Order (non-linear) Relations#
Then, for the iteration \(k+1\) of the Newton process, we get:
These constraints are linearized around state \((X_{i+1}^{k+1},\lambda_{i+1}^{k+1})\):
Where \(S_{i+1}^k\) stands for \((X_{i+1}^{k},t_{i+1},\lambda_{i+1}^{k})\) and
In the case where :
We can write
where \((W_{i+1}^k)^{-1}\), is a diagonal block matrix holding the \((w_{i+1}^k)^{-1}\), then, if there is one and only one interaction we have:
and finally:
First Order Linear Relations#
Note: for time-invariant relations, B, C, F, D and e are constant vectors and matrices </em>
The Time discretization of the relations is fully implicit and may be written as :
Discretisation of the non-smooth law#
Complementarity Condition#
The complementarity condition reads:
and the discretisation is straightforward:
Lagrangian systems#
Time Discretisation of the Dynamics#
Lagrangian (second order) Non Linear Systems#
We provide in the following sections a time discretization method of the Lagrangian dynamical systems, consistent with the non smooth character of the solution.
with
Remark: recall that \(v^+(t)\) means \(v(t^+)\) ie right limit of \(v\) in t.
Left hand side is discretised by assuming that:
As for first order non-linear systems, we use a \(\theta\)-method to integrate the other terms, and obtain:
and for the last term, we set a new variable \(p_{i+1}\) such that:
Finally the full system discretisation results in:
The “free” notation still stands for terms related to the smooth part of the system. The displacement is integrated through the velocity with :
Substituing this into the residu leads to a function depending only on \(v_{i+1}\), since state “i” and “k” are supposed to be known.
A Newton method will be applied to solve \(\mathcal R(v_{i+1}) = 0\).
That requires to compute the gradient of the residu; assuming that the mass matrix evolves slowly with the configuration in a single time step, we get:
and denoting:
we get (index k corresponds to the Newton iteration number):
with
As an approximation for \(q^*\), we choose:
with \(\gamma \in \left[0,1\right]\). Moreover, if \(M\) is evaluated at the first step of the Newton iteration, with \(v_{i+1}^0 = v_i\), we get:
Finally, if \(W\) is invertible, the solution at iteration k+1 is given by,
Lagrangian (second order) Linear Systems with Time Invariant coefficients#
Proceeding in the same way as in the previous section, with \(M\) constant and \(f_L(t,v^+(t), q(t), z) = F_{ext}(t) - Cv^+(t) - Kq(t)\), integration is straightforward:
Using the displacement integration through the velocity,
we get:
with \(W\) a constant matrix:
and if \(W\) is invertible,
The free velocity \(v^{free}\) correponds to the velocity of the system without any constraints.
Time discretization of the relations#
Lagrangian Scleronomous Relations#
with
From now on, to lighten the notations, the parameter \(Z\) will omitted.
Considering the Newton process introduced above for Lagrangian non linear systems, the constraints write:
To evaluate \(G_0\) we still use the prediction \(Q^*\) defined in the previous section:
Then we get:
These constraints are linearized around the point \(V_{i+1}^{k}\) and we neglect the second order terms in the computation of the jacobians. It leads to:
As for the evaluation of the mass, the prediction of the position, \(Q^*\) can be evaluated at the first iteration of the Newton process,
Lagrangian Rheonomous Relations#
As for scleronomous relations, we get:
Lagrangian Compliant Relations#
Following the same process as in the paragraph above, it comes:
Lagrangian Linear Relations#
The discretisation is straightforward:
Time discretization of the Non Smooth laws#
A natural way of discretizing the unilateral constraint leads to the following implicit discretization :
In the Moreau’s time–stepping, we use a reformulation of the unilateral constraints in terms of velocity:
which leads to the following discretisation :
where \(y^{p}\) is a prediction of the position at time \(t_{i+1}\), for instance, \(y^{p} = y_{i} + \frac{h}{2} \dot y_i\).
To introduce a Newton impact law, consider an equivalent velocity defined by
and apply the constraints directly on this velocity :
Summary of the time discretized equations#
First order systems#
Non Linear dynamics:
Linear dynamics:
Linear dynamics with time-invariant coefficients:
Non Linear Relations
Linear Relations
Lagrangian second-order systems#
Non Linear Dynamics:
Linear Dynamics with and Time–Invariant Coefficients
Lagrangian Scleronomous Relations
Lagrangian Rheonomous Relations
Lagrangian Compliant Relations
Lagrangian Linear Relations