0% found this document useful (0 votes)
6 views

DEM Lecture 03

This section summarizes numerical techniques for solving nonlinear equations, linear systems of equations, and differential equations. These techniques include the Newton-Raphson method, Gauss-Seidel method, Euler method, and Newmark's β-method. The Newton-Raphson and Gauss-Seidel methods are discussed in further detail.

Uploaded by

Vasudevan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

DEM Lecture 03

This section summarizes numerical techniques for solving nonlinear equations, linear systems of equations, and differential equations. These techniques include the Newton-Raphson method, Gauss-Seidel method, Euler method, and Newmark's β-method. The Newton-Raphson and Gauss-Seidel methods are discussed in further detail.

Uploaded by

Vasudevan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

3.

OVERVIEW OF NUMERICAL METHODS

3.1 Introductory remarks


This chapter summarizes those numerical techniques whose knowledge is
indispensable for the understanding of the different discrete element methods:

 the Newton-Raphson-method, a powerful technique to numerically solve nonlinear


equations;
 the Gauss-Seidel-method, a relaxation technique which produces gradually improving
approximations for the solution of linear systems of equations;
 the Euler-method or first-order Runge-Kutta-method, to numerically solve initial
value problems of first-order differential equations;
 the method of central differences, which can be considered as an improved version of
the Euler-method;
 Newmark’s -method, for the time integration of second-order differential equations
like the equations of motion.
We shall not deal in detail with the deeper problems like convergence analysis, matrix
invertibility. The interested reader is advised to consult the wide literature of numerical
mathematics; an excellent starting point is Belytschko et al (2000).

3.2 The Newton-Raphson method


The aim of this method is to determine a vector û which satisfies the given nonlinear
equations
f1 (u1 , u2 ,..., un )  0
f 2 (u1 , u2 ,..., un )  0

f n (u1 , u2 ,..., un )  0
or shortly
f (u)  0 ,

where f(u) is a continuously differentiable function of u. It is assumed that we have an initial


estimate u0 for û , and also assumed that for any arbitrary u, we are able to determine f(u) as
well as its Jacobian matrix, K(u):
df (u)
K (u) 
du
or, in a more detailed form:
df (u , u ,..., un )
K pq  p 1 2 .
duq

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:

uˆ  u0  K (u0 )1  f (u0 )

(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:

u1  u0  K (u0 )1  f (u0 )

K (u0 )
1

f (u0 )

û u2 u1 u0 u

Figure 2.
The Newton-Raphson-method for a nonlinear equation

which can be used to produce one more approximation of the root:

ui 1  ui  K (ui )1  f (ui ) .

(Instead of inverting K, an alternative is to solve the linear equations

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.

3.3 Relaxation: The Gauss-Seidel method


Quasi-static DEM models are based on the solution of a system of linear equations. As
it will be explained later, they apply the well-known displacement method of structural
analysis, so the equilibrium equations corresponding to each degree of freedom give the
system of equations to solve, whose unknowns are the characteristic displacements of the
model. In these systems the number of equations equals the number of unknowns. The
problem to solve can be formulated as follows:

Determine the unknown vector u:


 u1 
u 
u   2
 
 
un 

so that it would satisfy the equations

K u  f  0

where K and f consist of given constants:

26
Katalin Bagi: Section 3
Fundaments of The Discrete Element Method Overview of Numerical Methods

 k11 k12 k1n   f1 


k k22 
k2 n  f 
K   21 and f   2  .
   
   
 kn1 kn 2 knn   f n 

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.

The Gauss-Seidel-method will be particularly important for us. It works in the


following way:

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

After some rearrangement, the solution for u p ,i 1 is:


1  p 1 n 
u p ,i 1 :   ph h ,i  k phuh ,i  f p  .
k u 
k pp  h 1 h  p 1 
 The rest of the components of ui+1 remain equal to the corresponding components of
ui:
u j ,i 1 : u j ,i for all j  p .
Then let i := i + 1 , and a next approximation can be prepared in the same way.

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.

3.4 Solution methods for initial value problems


3.4.1 Introductory remarks
Time-stepping DEM algorithms intend to determine (or, at least, approximate with sufficient
accuracy) the time-dependent displacements u(t ) and velocities
du(t )
v(t ) 
dt
of the model at the discrete “time points” t1, t2, …, ti, ti+1, … , starting from a known u(t0) and
v(t0) which belong to the initial time t0. The time-stepping algorithms calculate a series of
u(t1 ), v(t1 ); u(t2 ), v(t2 ); u(ti ), v(ti ), u(ti 1 ), v(ti 1 );
approximations for which the equations of motion, i.e. the equations
d 2u(t )
M  f (t , u(t ), v(t ))
dt 2
are sufficiently accurately satisfied at the t1, t2, …, ti, ti+1, … time instants.

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:

 Consider the k-th order differential equation:


d k u(t )  du(t ) d 2u(t ) d k 1u(t ) 
 f  t , u(t ), , ,  .
dt  dt dt 2 dt k 1 

 Introduce the following notations:


y1 (t )  u(t )
du(t )
y 2 (t ) 
dt
2
d u(t )
y 3 (t ) 
dt 2

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

 Summarize these k equations into the following system:

dy (t ) ˆ
 f (t , y (t ))
dt

where the notations are:

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”.)

3.4.2 First order Runge-Kutta-method (Euler-method)


Let the initial value of the function y(t) be y0 :
y(t0 )  y 0 ,
and the function y(t) satisfies the following differential equation in which fˆ (t , y (t )) is given,
not necessarily explicitly, but at least in the sense that it can be calculated for any t and y(t):
dy (t ) ˆ
 f (t , y (t )) .
dt
Our aim is to determine those y1, y2, …, yi, yi+1, … values which belong to the time instants
t1, t2, …, ti, ti+1, … . (The increasing indices – unlike in the previous cases where hey
indicated better and better approximations of the solution – now denote that time proceeds.)

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

Then the analysis of the next interval follows.

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

ui 1  ui  ui   vi 


 v    v   t  hi   v   t   f (t , u , v ) .
 i 1   i   i  i i i 

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 ) .

Since yi+1 is unknown, fˆ (ti 1 , y i 1 ) cannot be calculated. However, by using an iterative


scheme, better and better approximations can be produced for yi+1 , and the iteration is
stopped when the considered measure of the error of the equations becomes sufficiently small.
Using the notations applied in the equations of motion of DEM, the fundamental step of the
implicit Euler-method is

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.

3.4.3 The method of central differences


This method can be considered as an improved version of the explicit Euler-method.
For the sake of simplicity, without dealing with the general notations with (y(t), h(t)), the
application for the equations of motion will be introduced here only.

Based on the ui approximation of the function u(t) at ti , and on the approximation of


the function v(t) in the middle point of the interval (ti1, ti) , denoted by vi1/2 , the
approximations belonging to the time instants later by t are calculated as

vi 1/ 2 : vi 1/ 2  t  f (ti , ui , vi 1/ 2 )


and

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, vi1/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.

3.4.4 Newmark’s -method

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

r(t , u(t ), v(t ), a(t ))  f (t, u(t ), v(t ))  M  a(t )

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

These formulas are based on the following basis:

 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    ai1 ,

 the displacement at ti+1 is calculated from another “average” acceleration, a:


t 2
ui 1 : ui  t  vi  a
2
where
a : (1  2)ai  2  ai1

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.)

If choosing an approximation for ui+1 , the two formulas provide an approximation to


vi+1 and ai+1 . These can be inserted into the equation r(ti 1 , ui 1 , vi 1 , ai 1 )  0 , where the
unknowns are now only the components of ui+1 . This (usually nonlinear) equation can then be
numerically solved, e.g. with the Newton-Raphson-method, and after finding ui+1 sufficiently
exactly, from the two formulas ai+1 and vi+1 are also received.

This method is the fundament of the DDA models.

3.4.5 Remark: Stability of the solution


An important aspect of the time integration of the equations of motion (and of
differential equations in general) is stability. Stability can loosely be defined as the property
of an integration method to keep the errors resulting in the integration process of a given
equation bounded at subsequent time steps. An unstable method will make the integration
errors increase exponentially, and an arithmetic overflow can be expected even after just a
few time steps. Since stability depends not only on the given method but also on the type of
problem, for a one-dimensional case the test equation y’=y, where is a complex valued
constant, is used to characterize the stability properties of a given method. This
characterization is performed by defining the set of values of and t for which the
corresponding method is stable.

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.

An algorithm is said to be A-stable or unconditionally stable if the solution to y’=y


tends to zero as iwhen the Re()<0, which means that the numerical solution decays to
zero whenever the corresponding exact solution decays to zero. An A-stable algorithm may be
also defined as an algorithm whose region of absolute stability is the complete left half
complex plane including the imaginary axis. The most important consequence of the A-
stability property is that there is no limitation on the size of t for the stability of the
integration process: this is why A-stable algorithms are also called unconditionally stable.
Obviously, this property is very important and generally desired in the integration of
multibody and other engineering systems, since the analyst would only have to be concerned
with the step size for accuracy purposes and not for stability.

The unconditional stability of Newmark’s –method is guaranteed for 21/2. The


method of central differences is, on the other hand, only conditionally stable: the maximal
allowed length of the timestep depends on the largest eigenfrequency of the system. Since the
method of central differences is most widely applied in DEM, the reader will meet the
problem of allowable timestep length e.g. at the BALL-type models and at UDEC.

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

You might also like