DEM Lecture 03
DEM Lecture 03
f n (u1 , u2 ,..., un ) 0
or shortly
f (u) 0 ,
Note that the explicit form of f(u) and K(u) is not necessary to know; but we must be able to
calculate them for any arbitrary u.
24
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods
K (u0 )
1
f (u0 )
û u0 u
Figure 1.
The Newton-Raphson-method for a linear equation
Imagine first that f is a linear function of u. In this case K is constant (the same for any
u). Assume, in addition, that K is not singular, i.e. it is invertable. In this case the equations
are easy to solve in a single step:
(Figure 1. illustrates this for the very special case n = 1). However, for a non-linear f the
above calculation leads to a next approximation:
K (u0 )
1
f (u0 )
û u2 u1 u0 u
Figure 2.
The Newton-Raphson-method for a nonlinear equation
25
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods
K (ui ) ui 1 ui f (ui ) .
for ui+1.)
This has to be repeated until the “magnitude” of f(uk) (e.g. the Euclidean norm,
f f T f ) becomes smaller than a pre-defined error limit. In addition to the termination
criterion f [a prescribed value], the value of ui 1 ui is also often tracked, which is
particularly helpful if the function f(u) is rather “flat”, i.e. K is nearly singular around the
root.
Usually the method quickly converges to a root of the equation, assuming that the
initial “guess” u0 was close enough. However, there are many situations when the method
fails or badly converges, for instance:
Bad starting point: e.g. K is singular or nearly singular at the starting point; or the
starting point is not in an interval from where the method converges. The starting point
may also enter an infinite cycle, jumping back-and-forth between two (or perhaps
more) points without a convergence.
The derivative K does not exist at the root, or is discontinuous near the root.
Among the different discrete element techniques this method is applied for instance in
the DDA methods and in the Bagi-Bojtar-method.
K u f 0
26
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods
There exist several methods to solve large systems of linear equations. Direct solvers
(e.g. Gauss-Jordan elimination, LU-factorization) aim to produce the exact (up to numerical
rounding errors) solution, e.g. by inverting the coefficient matrix K, or by other techniques:
they obtain the solution in a finite number of calculation steps. Relaxation methods, on the
other hand, produce a sequence of approximations of the solution, hopefully getting closer
and closer to the exact solution.
Starting from an initial u0 estimation, the method prepares a u1, u1, … ui , ui+1 , …
series of approximations, converging to the exact solution. Denote the j-th scalar component
of the solution by uj, and its i-th estimation by uj,i. From the i-th estimation, ui, the i+1-th
estimation, ui+1, is calculated as follows.
Calculate the ri “residual vector” belonging to the i-th approximation:
ri K ui f .
If ui were equal to the exact solution, then the components of ri were all zeros, and the
calculations should be terminated. However, if this is not the case, then the scalar
components of ri are not all zeros. A general, say j-th component is:
rj ,i k j1u1,i k j 2u2,i ...k jnun,i f j
Find that scalar in ri which has the largest absolute value, say this is the p-th
component of ri:
rp ,i max rj ,i
( j)
(We can also say that the p-th equation is satisfied “worst” by the i-th approximation
of the solution.)
Calculate now what value should be stand at the p-th position of ui so that this “worst”
value in the residual would become zero. In other words, determine u p ,i 1 to replace
u p ,i so that
p 1 n
rp ,i 1 k phuh,i k pp u p ,i 1 k u fp 0 .
ph h ,i
h 1 h p 1
27
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods
Further and further iteration steps have to be done, until the components of the
residual vector r become sufficiently small (e.g. the Euclidean norm of r can be the used for a
terminating criterion).
Method of Cross, widely applied in the 20ieth century in manual structural analysis, is
based on this relaxation technique. Method of Cross is for frames whose nodes have rotational
degrees of freedom. The moment balance equations of the nodes are a system of linear
equations, and the unknowns are the rotations of the nodes which lead to such a position
where the moment balance is satisfied for all nodes. In any step, the node with the largest
equilibrium error is selected, and while keeping all others fixed, the considered node is
allowed to rotate into the equilibrium position.
The method of Kishino, a quasi-static DEM technique, applies this type of relaxation.
There are a vast number of numerical techniques to numerically solve initial value
problems of differential equations. Part of these techniques are explicit: as explained already
in Section 2., it means that when considering a time interval, those u and v values
(generalized displacements and velocities) belonging to the endpoint ti+1 are determined in
such a way that the equations of motion are compiled at time point ti and the values at ti+1 are
predicted from the approximated u and v values belonging to ti. The implicit time integration
techniques are more reliable. In these methods the u and v values belonging to the endpoint
ti+1 are calculated in such a way that the equations of motion should be satisfied at the
endpoint of the time interval, which is done with the help of a gradually improving iteration
scheme: the approximated values of u and v at ti+1 are checked and modified again and again,
until a sufficiently exact match is reached; and these values are then used as the starting data
for the next timestep.
There are three methods which will be particularly important in discrete element
modelling:
(i) the first order Runge-Kutta-method (Euler-method);
(ii) the method of central differences;
(iii) Newmark’s -method.
28
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods
The Euler-method and the method of central differences is suitable for the calculation of first-
order differential equations (i.e. when the differential equations contain only the first
derivative of the unknown function). The equations of motion are, on the other hand, second-
order equations. Fortunately, general higher-order differential equations can easily be
transformed into first-order equations in the following way:
d k 1u(t )
y k (t )
dt k 1
and using them, the original differential equations can be written in the form:
dy k 1 (t )
f (t , y1 (t ), y 2 (t ), y k (t )) .
dt
The relations between the functions y1(t), y1(t), …, yk(t) are given by the (k-1)
differential equations
dy1 (t )
(1.) y 2 (t )
dt
dy 2 (t )
(2.) y 3 (t )
dt
dy k 1 (t )
(k-1.) y k (t )
dt
Let the k-th equation be the original differential equation by using the new notations,
as seen above:
dy k (t )
(k) f (t , y1 (t ), y 2 (t ), y k 1 (t ))
dt
dy (t ) ˆ
f (t , y (t ))
dt
29
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods
y1 (t ) y 2 (t )
y (t ) y (t )
2 3
y (t ) ; ˆ
f (t , y (t )) .
y k 1 (t ) y k (t )
y k (t ) f (t , y (t ))
A first-order (but of course much larger) system of differential equations is received this way.
The equations of motion are of second order, so the application of the above
transformation is straightforward. Introduce the following notations:
u(t ) v(t )
y (t ) : ; f (t , u(t ), v(t )) : M 1 f (t , u(t ), v(t )) ; fˆ (t , u(t ), v(t )) :
v(t ) f (t , u(t ), v(t ))
or shortly:
dy (t ) ˆ
f (t , y (t )) .
dt
The solution of such a differential equation means to find the function y(t) if its first
derivative is known, and the initial value, i.e. the y(t0) which belongs to the given t0time
instant is specified. (Hence the name “initial vaule problem”.)
According to the Euler-method, from value yi which belongs to ti the value yi+1
belonging to ti+1 is calculated in the way illustrated in Figure 3.:
Calculate f̂ at (ti, yi) (it means to approximate the first derivative of the unknown
function y(t) at ti):
hi fˆ (ti , y i ) .
Assuming that this first derivative remains constant on the (ti, ti+1) interval, the
approximation of yi+1 at ti+1 (denoting the length of the interval by t, so ti 1 ti t ):
y i 1 : y i t hi
30
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods
yi 1
hi
1
yi
ti ti 1 t
Figure 3.
The main step of the Euler-method
Figure 4. illustrates that since at the endpoint of the interval it is not checked whether
the equations of motion are satisfied within the necessary accuracy, the errors of the
consecutive approximations accumulate, and the estimated y1, y2, …, yi, yi+1, … values may
deviate from the exact y(t) more and more as t increases.
y hi 1
1
yi 2
yi 1
hi
1
yi
ti ti 1 ti 2 t
Figure 4.
Euler-method: Increasing deviations from the exact solution
The Euler-method can simply be applied to the DEM equations of motion. Introduce
the notation
du(t )
dt v(t )
dv(t ) f (t , u(t ), v(t ))
dt
(here the f (t , u(t ), v(t )) function is “known”), and the initial values belonging to t0 are the
given u0 and v0:
31
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods
u(t0 ) u 0
v(t ) v
0 0
From the already known (ui, vi) approximations which belong to ti , those (ui+1, vi+1)
belonging to a ti+1 can be calculated by using the derivative, hi, belonging to ti:
vi
hi
f (ti , ui , vi )
which yields
The main disadvantage of the Euler-method is its explicit nature (the accumulating
errors of the approximations), which can be avoided by using the implicit version of the
method. Its main idea is formulated as
y i 1 : y i t hi 1 ,
where
hi 1 fˆ (ti 1 , y i 1 ) .
ui 1 ui vi 1
v v t f (t , u , v ) .
i 1 i i i 1 i 1
This method is applied in the Contact Dynamics methods of discrete element modelling.
32
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods
ui 1 : ui t vi 1/ 2
and then the next time interval can follow. (At the beginning of the whole analysis, i.e. at the
first interval when i = 0, vi1/2 can be approximated by the given initial value v0.)
Due to its simplicity and effectiveness, this method is very widely applied: it can be
found in several commercial softwares like PFC, UDEC, EDEM etc.
As every implicit technique, Newmark’s -mehod analyses the (ti, ti+1) interval to find
the unknowns belonging to ti+1 so that the equations of motion would be satisfied at the
endpoint, i.e. at ti+1. The method applies for second-order differential equations like the
equations of motion.
Let us search for the solution of the equation
M a(t ) f (t , u(t ), v(t ))
in which
du(t ) d 2u(t )
v(t ) , a(t ) .
dt dt 2
and given the u(t0 ) u0 , v(t0 ) v0 initial values. For those u(t), v(t), a(t) functions which
exactly satisfy the equations of motion, the residual function
would be constantly zero for every t ; these u(t), v(t), a(t) functions would indeed describe the
real history of the analysed system. Assume now that the ui, vi and ai numerical solutions
which belong to ti indeed satisfy the equations; and our aim is to find the ui+1, vi+1 and ai+1
belonging to ti 1 ti t so that
r(ti 1 , ui 1 , vi 1 , ai 1 ) 0 .
According to Newmark’s -method the velocities and accelerations at ti+1 are approximated in
terms of the unknown ui+1 with the help of the parameters and which control the
behaviour of the time integration:
1 t 2
ai 1 :
i 1 i
u u t v (1 2)ai
t 2
i
2
vi 1 : vi (1 ) t ai t ai 1
The velocity at ti+1 is approximated with the help of an “average” acceleration, a:
vi 1 : vi t a
where
33
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods
a : (1 )ai ai1 ,
After some rearrangement, the above two formulas are received. (Note that for special values
of and the method becomes equivalent to other, previously shown methods. For = = 0,
for example, the explicit Euler-method is given: the velocities and accelerations are assumed
to be the same along the whole interval as at its beginning point, and no iteration is needed for
the calculation. For = 0 and = 1/2, the method of central differences, also explicit, is given.
For other values of and other time integration methods are received, being mostly
implicit.)
Algorithms that are stable for some restricted range of values (,t) are called
conditionally stable. When using such methods, the time step should be chosen depending on
the characteristics of the problem as defined by (or a set of ). In the case of a nonlinear
problem for which the value of changes with time, the algorithm may be stable for some
part of the integration and unstable for another. Consequently, it is very important when using
conditionally stable algorithms to know in advance the range of values (,t) for which the
method is stable and to compare it with the possible range of values of the given problem.
For this purpose the region of absolute stability of a method is defined as that set of values
(,t) for which a perturbation in the solution yi will produce a change in subsequent values
which does not increase from step to step. The region of absolute stability is an intrinsic
34
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods
characteristic of the method which should be considered prior to the use of conditionally
stable algorithms. As an example, Euler’s method described above is conditionally stable and
t must be less than ||/2 to assure stability.
Questions
3.1. Introduce the Newton-Raphson-method!
3.2. Introduce the Gauss-Seidel-method!
3.3. Introduce the Euler-method!
3.4. Introduce the method of central differences!
3.5. Introduce Newmark’s -method!
35