You are on page 1of 7

Computer Methods and Finite Element Analysis

Assignment - 1
Mr. Sukalyan Sarkar
Master of Engineering (Structural Engineering)
1st Semester
2020 - 2022
Roll - 002010402005
Civil Engineering department
Jadavpur University
Kolkata -700032
CONTENTS
SL. NO. ITEM PAGE NO.
1 Solution by Gauss Elimination Method (for 4 X 4 sized coefficient matrix) 1
Solution by LU Decomposition Method / Method of Factorization (for 4 X 4
2 3
sized coefficient matrix)
Solution by Gauss Elimination Method (for 4 X 4 sized coefficient matrix):

5 0 -2 1 x1 9
3 5 1 -1 x2 0
=
0 -3 4 2 x3 0
1 1 1 1 x4 0

STEP 1 : TRIANGULARISATION (Conversion to upper triangular matrix):

R2 - 3 / 5 R1 => R2 Transformation applicable.

5 0 -2 1 x1 9
0 5 2.2 -1.6 x2 -5.4
=
0 -3 4 2 x3 0
1 1 1 1 x4 0

R3 - 0 / 0 R1 => R3 Transformation not applicable.

5 0 -2 1 x1 9
0 5 2.2 -1.6 x2 -5.4
=
0 -3 4 2 x3 0
1 1 1 1 x4 0

R4 - 1 / 5 R1 => R4 Transformation applicable.

5 0 -2 1 x1 9
0 5 2.2 -1.6 x2 -5.4
=
0 -3 4 2 x3 0
0 1 1.4 0.8 x4 -1.8

R3 - -3 / 5 R2 => R3 Transformation applicable.

5 0 -2 1 x1 9
0 5 2.2 -1.6 x2 -5.4
=
0 0 5.32 1.04 x3 -3.24
0 1 1.4 0.8 x4 -1.8

R4 - 1 / 5 R2 => R4 Transformation applicable.

5 0 -2 1 x1 9
0 5 2.2 -1.6 x2 -5.4
=
0 0 5.32 1.04 x3 -3.24
0 0 0.96 1.12 x4 -0.72

R4 - 0.96 / 5.32 R3 => R4 Transformation applicable.

5 0 -2 1 x1 9
0 5 2.2 -1.6 x2 -5.4
=
0 0 5.32 1.04 x3 -3.24
0 0 0 0.932 x4 -0.135
STEP 2 : BACK SUBSTITUTION:

0.932 x4 = -0.135
x4 = -0.145

5.32 x3 + 1.04 x4 = -3.24

Putting value of x4,

5.32 x3 + 1.04 X -0.145 = -3.24


5.32 x3 + -0.151 = -3.24
5.32 x3 = -3.089
x3 = -0.581

5 x2 + 2.2 x3 + -1.6 x4 = -5.4

Putting value of x4 and x3,

5 x2 + 2.2 X -0.581 + -1.6 X -0.145 = -5.4


5 x2 + -1.277 + 0.232 = -5.4
5 x2 = -4.355
x2 = -0.871

5 x1 + 0 x2 + -2 x3 + 1 x4 = 9

Putting value of x4, x3 and x2,

5 x1 + 0 X -0.871 + -2 X -0.581 +
1 X -0.145 = 9
5 x1 + 0 + 1.161 + -0.145 = 9
5 x1 = 7.984
x1 = 1.597

Solution is:
x1 = 1.597
x2 = -0.871
x3 = -0.581
x4 = -0.145
Solution by LU Decomposition Method / Method of Factorization (for 4 X 4 sized coefficient matrix):

5 0 -2 1 x1 9
3 5 1 -1 x2 0
=
0 -3 4 2 x3 0
1 1 1 1 x4 0

STEP 1 : LU FACTORIZATION:

Let the coefficient matrix be A = LU


where L = Lower triangular matrix and U = Upper triangular matrix.

5 0 -2 1
3 5 1 -1
0 -3 4 2
1 1 1 1

1 0 0 0 u11 u12 u13 u14


l21 1 0 0 0 u22 u23 u24
=
l31 l32 1 0 0 0 u33 u34
l41 l42 l43 1 0 0 0 u44

u11 u12 u13 u14


l21u11 l21u12+u l21u13+u l21u14+u
22 23 24

l31u12+l3 l31u13+l3 l31u14+l3


= l31u11
2u22 2u23+u33 2u24+u34

l41u12+l4 l41u13+l4 l41u14+l4


l41u11
2u22 2u23+l43 2u24+l43
u33 u34+u44

u11 = 5 l21u14+u24 = -1 l41u11 = 1


u12 = 0 u24 = -(*) l41 = /
u13 = -2 = -1.6 = 0.2
u14 = 1
l31u11 = 0 l41u12+l42u22 = 1
l21u11 = 3 l31 = / l42 = (-(*))/
l21 = / = 0 = 0.2
= 0.6
l31u12+l32u22 = -3 l41u13+l42u23+l43u33 = 1
l21u12+u22 = 5 l32 = (-(*))/ l43 = (-(*)-(*))/
u22 = -(*) = -0.6 = 0.180
= 5
l31u13+l32u23+u33 =4 l41u14+l42u24+l43u34+u44 = 1
l21u13+u23 = 1 u33 = -(*)-(*) u44 = -(*)-(*)-(*)
u23 = -(*) = 5.32 0.932
= 2.2
l31u14+l32u24+u34 =2
u34 = -(*)-(*)
= 1.04
1 0 0 0 5 0 -2 1
0.6 1 0 0 0 5 2.2 -1.6
L= U=
0 -0.6 1 0 0 0 5.32 1.04
0.2 0.2 0.180 1 0 0 0 0.932

Let constant column matrix be B and variable column matrix be x

So, Ax = B
=> LUx = B

Let Ux = Z

So, LZ = B

1 0 0 0 Z1 9
0.6 1 0 0 Z2 0
=
0 -0.6 1 0 Z3 0
0.2 0.2 0.180 1 Z4 0

1.000 Z1 9.000
Z1 9.000

0.6 Z1+ 1 Z2 = 0

Putting value of Z1,

1 Z2+ 0.6 X 9.000 = 0


1 Z2+ 5.400 = 0
1 Z2 = -5.400
Z2 = -5.400

0 Z1 + -0.6 Z2 + 1 Z3 = 0

Putting value of Z1 and Z2,

1 Z3 + 0 X 9.000 + -0.6 X -5.400 = 0


1 Z3 + 0.000 + 3.240 = 0
1 Z3 = -3.240
Z3 = -3.240

0.2 Z1 + 0.2 Z2 + 0.180451 Z3 + 1 Z4 = 0

Putting value of Z1, Z2 and Z3,

1 Z4 + 0.2 X 9.000 + 0.2 X -5.400 +


0.180451 X -3.240 = 0
1 Z4 + 1.8 + -1.080 + -0.585 = 0
1 Z4 = -0.135
Z4 = -0.135
From Ux = Z,

5 0 -2 1 x1 9.000
0 5 2.2 -1.6 x2 -5.400
=
0 0 5.32 1.04 x3 -3.240
0 0 0 0.932 x4 -0.135

STEP 2 : BACK SUBSTITUTION:

0.932 x4 = -0.135
x4 = -0.145

5.32 x3 + 1.04 x4 = -3.240

Putting value of x4,

5.32 x3 + 1.04 X -0.145 = -3.24


5.32 x3 + -0.151 = -3.24
5.32 x3 = -3.089
x3 = -0.581

5 x2 + 2.2 x3 + -1.6 x4 = -5.400

Putting value of x4 and x3,

5 x2 + 2.2 X -0.581 + -1.6 X -0.145 = -5.4


5 x2 + -1.277 + 0.232 = -5.4
5 x2 = -4.355
x2 = -0.871

5 x1 + 0 x2 + -2 x3 + 1 x4 = 9.000

Putting value of x4, x3 and x2,

5 x1 + 0 X -0.871 + -2 X -0.581 +
1 X -0.145 = 9
5 x1 + 0 + 1.161 + -0.145 = 9
5 x1 = 7.984
x1 = 1.597

Solution is:
x1 = 1.597
x2 = -0.871
x3 = -0.581
x4 = -0.145

You might also like