Numerical methods in geomechnics
Hasan Ghasemzadeh
یدﺪ ی شور ﮏﯿﺎﮑﻣﻮژ
http://wp.kntu.ac.ir/ghasemzadeh
ﯽ ﻮ ﻦﺪ اﺮ ﻪ اﻮ ﯽ هﺎﮕﺸاد
تﺎﻴﻠﻛ شور
يﺎﻫ يدﺪﻋ رد
ﻚﻴﻧﺎﻜﻣﻮﺋژ
- ﻲﭘ و كﺎﺧ رد تﻻدﺎﻌﻣ يدﺪﻋ يﺎﻬﺷور تﺎﻴﻠﻛ -
يدﺪﻋ يﺎﻬﺷور عاﻮﻧا -
يدﺪﻋ تﺎﺒﺳﺎﺤﻣ يروآدﺎﻳ -
ﺎﻄﺧ ناﺰﻴﻣ -
ﺮﻠﻴﺗ ﻪﻴﻀﻗ -
يژﺮﻧا لﻮﺻا -
3
- ﻲﭘ و كﺎﺧ رد تﻻدﺎﻌﻣ يدﺪﻋ يﺎﻬﺷور تﺎﻴﻠﻛ -
يدﺪﻋ يﺎﻬﺷور عاﻮﻧا -
يدﺪﻋ تﺎﺒﺳﺎﺤﻣ يروآدﺎﻳ -ﺎﻄﺧ ناﺰﻴﻣ - ﺮﻠﻴﺗ ﻪﻴﻀﻗ - يژﺮﻧا لﻮﺻا -
Numerical Methodes in Geomechnics
تﺎﻴﻠﻛ شور
يﺎﻫ يدﺪﻋ رد
ﻚﻴﻧﺎﻜﻣﻮﺋژ
Methods for solving Nonlinear Equations
o Bisection Method
o Newton-Raphson Method
o Secant Method
o Fixed-Point Method
solution analytic
0 No 5
2
29
x
e x
x x
5
Methods for solving Nonlinear Equations
o Bisection Method
o Newton-Raphson Method
o Secant Method
o Fixed-Point Method
solution analytic
0 No 5
2
29
x
e x
x x
Numerical Methodes in Geomechnics
( ) 0 ( )
f x g x x
1 ( )
i i
x g x
1 2
Cramer's Rule can be used to solve the system
3 1 1 3
5 2 1 5
1, 2
1 1 1 1
1 2 1 2
But Cramer's Rule is not practical for large problems.
To solve N equations in N unknowns we need (N 1)(N 1)N!
multiplications.
x x
To solve a 30 by 30 system, 2.3 10 multiplications are needed. 35
Solution of Systems of Linear Equations
1 2
1 1 3
1 2 5
x x
7
Methods for solving Systems of Linear Equations
o
Naive Gaussian Elimination
o
Gaussian Elimination with Scaled Partial pivoting
o
Algorithm for Tri-diagonal Equations
Numerical Methodes in Geomechnics
Curve Fitting
Given a set of data
Select a curve that best fit the data. One choice is find the curve so that the sum of the square of the error is minimized.
x 0 1 2
y 0.5 10.3 21.3
9
Interpolation
Given a set of data
find a polynomial P(x) whose graph passes through all tabulated points.
xi 0 1 2 yi 0.5 10.3 15.3
table in the
is )
( i i
i P x if x
y
Numerical Methodes in Geomechnics
Methods for Curve Fitting
o
Least Squares
o Linear Regression
o Nonlinear least Squares Problems
o
Interpolation
o Newton polynomial interpolation
o Lagrange interpolation
11
Methods for Numerical Integration
o
Upper and Lower Sums
o
Trapezoid Method
o
Romberg Method
o
Gauss Quadrature
2
0
? no analytical solutions
a
e
xdx
Numerical Methodes in Geomechnics
Solution of Partial Differential Equations
Partial Differential Equations are more difficult to solve than ordinary differential equations
) sin(
) 0 , ( , 0 ) , 1 ( )
, 0 (
0
2 2
2 2
2
x x
u t
u t
u
t u x
u
Numerical Solution ?
13
- ﻲﭘ و كﺎﺧ رد تﻻدﺎﻌﻣ يدﺪﻋ يﺎﻬﺷور تﺎﻴﻠﻛ -
يدﺪﻋ يﺎﻬﺷور عاﻮﻧا - يدﺪﻋ تﺎﺒﺳﺎﺤﻣ يروآدﺎﻳ -
ﺎﻄﺧ ناﺰﻴﻣ -ﺮﻠﻴﺗ ﻪﻴﻀﻗ - يژﺮﻧا لﻮﺻا -
Numerical Methodes in Geomechnics
تﺎﻴﻠﻛ شور
يﺎﻫ يدﺪﻋ رد
ﻚﻴﻧﺎﻜﻣﻮﺋژ
Normalized Floating Point Representation
Standard Representations
Normalized Floating Point Representation
Advantage Efficient in representing very small or very large numbers
1 2 3 4
0. 10
sign mantissa exponent
d d d d n
3 1 2 1 2 . 4 5 1 5 sign integral part fraction part
15
Significant Digits
Significant digits are those digits that can be used with confidence.
48.9
Numerical Methodes in Geomechnics
Accuracy and Precision
Accuracy is related to closeness to the true value
Precision is related to the closeness to other estimated values
17
Rounding and Chopping
Rounding: Replace the number by the nearest machine number
Chopping: Throw all extra digits
Numerical Methodes in Geomechnics
Error Definitions
if the true value is known
100 value *
true
ion approximat value
true
Error Relative
Percent Absolute
ion approximat value
true
Error True
Absolute
t
E
tTrue Error
19
Error Definitions
When the true value is not known
100 estimate *
current
estimate prevoius
estimate current
Error Relative
Percent Absolute
Estimated
estimate prevoius
estimate current
Error Absolute Estimated
a
E
a
Estimated error
Numerical Methodes in Geomechnics
Notation
the estimate is correct to n decimal digits if
the estimate is correct to n decimal digits roundedif
n
10 Error
n
10
2
Error 1
21
- ﻲﭘ و كﺎﺧ رد تﻻدﺎﻌﻣ يدﺪﻋ يﺎﻬﺷور تﺎﻴﻠﻛ -
يدﺪﻋ يﺎﻬﺷور عاﻮﻧا - يدﺪﻋ تﺎﺒﺳﺎﺤﻣ يروآدﺎﻳ - ﺎﻄﺧ ناﺰﻴﻣ -
ﺮﻠﻴﺗ ﻪﻴﻀﻗ -يژﺮﻧا لﻮﺻا -
Numerical Methodes in Geomechnics
تﺎﻴﻠﻛ شور
يﺎﻫ يدﺪﻋ رد
ﻚﻴﻧﺎﻜﻣﻮﺋژ
Taylor Series
( )
0 0
0
( )
0 0
0
1 ( ) ( )
!
if the series converge we can write
( ) 1 ( ) ( )
!
k k
k
k k
k
Taylor Series f x x x k
f x f x x x
k
( ) x ( ) ?
f x e f
-3 -2 -1 0 1 2 3 4
x
x-x3/3!
x-x3/3!+x5/5!
sin(x)
3 5 7
sin( ) ....
3! 5! 7!
x x x
x x 0.5
1 1.5 2 2.5 3
1 1+x 1+x+0.5x2 exp(x)
!
k
x x
e
23
Convergence of Taylor Series
(Observations, Example 1)
The Taylor series converges fast (few terms are needed) when xis near the point of expansion. If |x-c| is large then more terms are needed to get good approximation.
How many terms are needed to get good approximation???
These questions will be answered using Taylor Theorem
Numerical Methodes in Geomechnics
Taylor Theorem
h x x where
n h h f
k x h f
x f
x c h x x
c x where
c x n f
c f k x
c x f
f
n n n
k k k
n n n
k k k
and between is
)!
1 (
) (
! ) ) (
(
, and between is
) )! (
1 (
) ) (
! ( ) ) (
(
) 1 1 ( 0
) (
) 1 1 ( 0
) (
Error
25
Example 1
0 . 2 8 . 14268 05 )!
1 (
) )! (
1 (
) (
1
≥
)
≤( )
(
1 4 2
. 0 1
) 1 1 ( 1
2 . 0 )
( )
(
E n E
E e
c n x
E f
k for e
f e
x f
n n
n n n
k x
k
How large is the error if we replaced ( ) by the first 4 terms (n 3) of its Taylor series expansion
about 0 0.2?
f x ex
c when x
Numerical Methodes in Geomechnics