CE3330 Dr. Tarun Naskar
CE3330 Dr. Tarun Naskar
EI = Flexural rigidity
48 kN
Example: Analyze the rigid frame
2m 2m
10kN
• Each member will have two
Nodes.
4m
• Each node will have two translation
and one rotational degree of freedom.
• Total 6 degrees of freedom (DOF)
per member.
10
−24
−24
{P} =
0
−24
{ 24 }
1.43 ∗ 10−2
−3.84 ∗ 10−5
−3
{u} = −8.14 ∗ 10−2
1.43 ∗ 10
−5.65 ∗ 10−5
{ 3.85 ∗ 10−3 }
Solving Linear Equations:
References :
‘ ‘ ‘ ‘
‘ ‘ ‘ ‘
𝑘 𝑡ℎ 𝑟𝑜𝑤
Limitation: Computationally expensive for systems of more than two or three equations
Gaussian elimination (also known as row reduction) is an algorithm for solving systems of linear
equations. It is a sequence of operations performed on the corresponding matrix of coefficients
until we obtain an row equibalent augmented matrix that is in row-echelon form.
4x1 + 3x2 – x3 = -5.7 E1
5x1 + x2 + 3x3 = 2.8 E2
x1 – x2 + 2x3 = 3.8 E3
To perform row reduction on a matrix, one uses a sequence of elementary row operations to
modify the matrix until the lower left-hand corner of the matrix is filled with zeros, as much as
possible. There are three types of elementary row operations:
Ei + 2Ej Ej
After obtaining row echelon form , the row operations are continued until we obtain an augmented
matrix that is in reduced row-echelon form.
4 3 −1 −5.7
A = [5 1 3 2.8 ]
1 −1 2 3.8
5
1) E2 - E1 E2
4
𝑎31
2) E3 - E1 E3
𝑎11
𝑎32
3) E3 - E2 E3
𝑎22
4 3 −1 −5.7
[0 −2.75 4.25 9.925 ]
0 0 −0.4545 −1.0909
4x1+3x2-x3 = -5.7
-0.4545x3 = - 1.0909
X3 = 2.4
X2 = 0.1
X1 = -0.9
Operations Count:
No of divisions = ∑n
n(n+1)
=
2
n(n+1)(n−1)
multliplication for forward elimination = ∑n(n-1) =
3
n(n−1)
multliplication in backward substitution = ∑(n-1) =
2
n(𝑛2 +3n−1)
Total =
3
(𝑛 3 )
If n is large
3
(𝑛 3 )
LU decomposition =
3
(𝑛 3 )
Cholesky factorization =
6
LU decomposition :
L U decomposition of a matrix is the factorization of a given square matrix (A) into two
triangular matrices, one upper triangular matrix (U) and one lower triangular matrix (L), such
that the product of these two matrices gives the original matrix
A is written as a product of = LU
Ax=b
Ux=Y
Ly=b
Basically, the L U decomposition method comes handy whenever it is possible to model the
problem to be solved into matrix form. Conversion to the matrix form and solving with triangular
matrices makes it easy to do calculations in the process of finding the solution. It has an added
advantage if L is a lower triangular matrix with diagonal elements being equal to 1.
u1j = a1j
end
for j=i,
end
for j≠i,
1
𝑙𝑗,𝑖 = [𝑎𝑗,𝑖 − ∑𝑖−1
𝑘=1 𝑙𝑗𝑘 𝑢𝑘𝑖 ]
𝑢𝑖,𝑗
end
end
for, i =j=n
end
Iterative Methods for Solving System of Linear Equations:
References :
1. S.C. Chapra & R.P. Canale: Numerical Methods for Engineers (5th Edition); Tata McGRAW
Hill.
48 kN
2m 2m
10kN
n number of members,
4m
(n×3+3)
So, In most of the cases, the global matrix will be highly sparse. In this
kind of situations, the iterative methods will have an advantage.
Bracketing Methods :
There are several methods in this category, but most focuses of them are
f(xu)f(xl) <0
Step 2
Step 3
𝑥𝑟𝑛𝑒𝑤 − 𝑥𝑟𝑜𝑙𝑑
Relative Error = | |×100%
𝑥𝑟𝑛𝑒𝑤
For example
𝑓(𝑥𝑙 ) 𝑓(𝑥𝑢 )
=
𝑥𝑟 −𝑥𝑙 𝑥𝑟 −𝑥𝑢
𝑥𝑢 𝑓(𝑥𝑙 )− 𝑥𝑙 𝑓(𝑥𝑢 )
xr =
𝑓(𝑥𝑙 ) −𝑓(𝑥𝑢 )
because it replaces a curve with a straight line and gives a false position
of original root (xr) thus the name.
Problem with false position method:
However, it's not the answer so always put back f(xr) ≈ 0 to check.
f(l).f(r) > 0
fl = fl/2
Open Method:
Ax=b
X=Tx+C
⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ =⋮
⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ =⋮
We can write,
𝑥1 𝑥1 𝑏1/𝑎11
𝑥2 𝑥2 𝑏2/𝑎22
{ } = [𝑇] { } + ( )
⋮ ⋮ ⋮
𝑥𝑛 𝑥𝑛 𝑏𝑛/𝑎𝑛𝑛
Jacobi Iterative method:
Xk = Tx(k-1) + C
𝑥1 𝑘 𝑥1 𝑘−1 𝑏1/𝑎11
𝑥2 𝑥2 𝑏2/𝑎22
{ } = [𝑇] { } +( )
⋮ ⋮ ⋮
𝑥𝑛 𝑥𝑛 𝑏𝑛/𝑎𝑛𝑛
Gauss – Seidel:
Both the Jacobi and Gauss-Seidel methods are iterative methods for solving the linear system Ax
= b. In the Jacobi method the updated vector x is used for the computations only after all the
variables (i.e. all components of the vector x) have been updated. On the other hand in the
Gauss-Seidel method, the updated variables are used in the computations as soon as they are
updated.
bi] is modified as :
|| X(N) - X(N-1) || < TOL (very low tolerance value like 1×10-12
|| XN ||
|| b - AxN || < ∑ || b ||
|| X ||α = max | 𝑥 𝑖 𝑁 |
1≤𝑖≤𝑛
L1 norm = ∑ | xi |
Iterative solutions for non linear equation:
𝑓(𝑥𝑖 ) − 0
𝑓 ′ (x 𝑖 ) =
𝑥𝑖 − 𝑥𝑖+1
𝑓(𝑥𝑖 )
xi+1 =- + xi
𝑓′(x𝑖 )
f(x,y) = U
g(x,y) = V
∂u𝑖 ∂u𝑖
Ui+1 = Ui + (xi+1 - xi) + (yi+1 - yi)
∂x ∂y
∂v𝑖 ∂v𝑖
Vi+1 = Vi + (xi+1 - xi) + (yi+1 - yi)
∂x ∂y
Root of a function at point (i+1) implies f(xi+1, yi+1) =0; So Ui+1 = 0 and
for the same reason Vi+1 = 0
∂u𝑖 ∂u𝑖
−𝑈𝑖 ∂x ∂y 𝑥𝑖+1− 𝑥𝑖
( ) = [ ∂v ] (𝑦 )
−𝑉𝑖 𝑖 ∂v𝑖 𝑖+1− 𝑦𝑖
∂x ∂y
where, X = (𝑦𝑥 )
∂u𝑖 ∂u𝑖
∂x ∂y
J= jacobian matrix=[ ∂v ∂v𝑖
] .
𝑖
∂x ∂y
𝑓 (Xi )
Xi+1 = Xi -
J(Xi )
Pitfalls:
- Multiple roots
- Slowly converging function/diverging
we can derive,
𝑓(𝑥𝑖 )(𝑥𝑖−1 −𝑥𝑖 )
xi+1 = xi -
𝑓(𝑥𝑖−1 )−𝑓(𝑥𝑖 )
So we calculated the next iteration value but with out calculating the
derivative.
𝑓(𝑥𝑖 + δ𝑥 )−𝑓(𝑥𝑖 )
f '(xi) ≈
δ𝑥