You are on page 1of 4

Name:

Cruz, Francis Paulo M. 1st Trimester AY 2021-2022


MECp 1 -Computer Application for ME Due Date: 20 October, 2021(5:00pm)

Matrix Solution using SOR Method

Problem Statement

Using SOR or Successive over relaxation of elimination, we are tasked to find the displacement
components of a truss system in which its equilibrium equation is [𝐴]𝑥⃗ = 𝑏⃗⃗ .
A is shown as:
8 0 -4 0 0 0 -2 3.464102 0 0

0 12 0 0 0 0 3.464102 -6 0 0

-4 0 12 0 -4 0 -2 -3.4641 -2 3.464102

0 0 0 12 0 0 -3.4641 -6 3.464102 -3.4641

0 0 -4 0 8 0 0 0 -2 -3.4641

0 0 0 0 0 12 0 0 -3.4641 -6

-2 3.464102 -2 -3.4641 0 0 12 0 -4 0

3.464102 -6 3.464102 -6 0 0 0 12 0 0

0 0 -2 3.464102 -2 -3.4641 -4 0 12 0

0 0 3.464102 -3.4641 -3.4641 -6 0 0 0 12

while x and b are shown as 𝑥 = [𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑥5 , 𝑥6 , 𝑥7 , 𝑥8 , 𝑥9 , 𝑥10 ] and 𝑏 =


4𝑙
[𝑃1 , 𝑃2 , 𝑃3 , 𝑃4 , 𝑃5 , 𝑃6 , 𝑃7 , 𝑃8 , 𝑃9 , 𝑃10 ] where l is defined as length, E is young’s modulus and A as the
𝐸
cross-sectional area of the member. 𝐴𝑖=1𝑖𝑛2,𝑖=1,2,…,5; 𝐴𝑖=2𝑖𝑛2,𝑖=6,7,…,11; 𝐸=30𝑥106 𝑝𝑠𝑖; 𝑙=30 𝑖𝑛;
𝑃𝑖=−1000 𝑙𝑏,𝑖=2,4,6,8,10; 𝑃𝑖=0,𝑖=1,3,5,7,9;

Results and Discussion

Successive over relaxation or SOR is almost the same as gauss seidel in process, but SOR has an
additional constant that is added to solve it quickly or converge quickly. Again, we will be using excel to
help us solve this problem.
[A] b
8 0 -4 0 0 0 -2 3.464102 0 0 0
0 12 0 0 0 0 3.464102 -6 0 0 -0.004
-4 0 12 0 -4 0 -2 -3.4641 -2 3.464102 0
0 0 0 12 0 0 -3.4641 -6 3.464102 -3.4641 -0.004
0 0 -4 0 8 0 0 0 -2 -3.4641 0
0 0 0 0 0 12 0 0 -3.4641 -6 -0.004
-2 3.464102 -2 -3.4641 0 0 12 0 -4 0 0
3.464102 -6 3.464102 -6 0 0 0 12 0 0 -0.004
0 0 -2 3.464102 -2 -3.4641 -4 0 12 0 0
0 0 3.464102 -3.4641 -3.4641 -6 0 0 0 12 -0.004
X1 X2 X3 X4 X5 X6 X7 X8 X9 X10

Basing in the figure, we will substitute each component to it’s x component while following the
equation [𝐴]𝑥⃗ = 𝑏⃗⃗. But unlike the seidel method, we will add omega which is 1.1 in a way that the
equation is still the same equation. Meaning if we add 1.1, we must find a way to remove 1.1 in the
equation in a different manner.

1.1(0 − (0x2 − 4x3 + 0x4 + 0x5 + 0x6 − 2x7 + 2√(3)x8 + 0x9 + 0x10))
x1 = − .1𝑥1
8

the process is the same as the gauss seidel method but due to the omega constant, the convergence of
the solution is quicker. And take up less iterations.

x vector values
x1 x2 x3 x4 x5 x6 x7 x8 x9 x10
0 0 0 0 0 0 0 0 0 0 0
1 -0.00055 -0.00037 -0.1 -0.00037 0 -0.00037 0 -0.00037 0 -0.00037
2 -0.05532 -0.00053 -0.1002 -0.00065 -0.05517 -0.00053 -0.01843 0.031196 -0.01833 0.031106
3 -0.07006 0.022698 -0.14723 0.026701 -0.03982 0.010973 -0.03343 0.04525 -0.03337 0.010322

Answers:

X1= 1.40126540e-03 X6= -1.27726134e-03

X2= -2.02627680e-03 X7 = 4.30004698e-06

X3 = -1.29733351e-04 X8= -3.38340512e-03

X4= -3.18994408e-03 X9= 3.84899701e-04

X5= -8.82332314e-04 X10= -2.11007818e-03

Problems Encountered
Reviewing the subject and learning to implement the problem to code has always been a hard task for me. Since
every error that will rise during the running of the code is a headache.

References

https://www.youtube.com/watch?v=Rd5Fevrk5MY&t=174s

https://en.wikipedia.org/wiki/Successive_over-relaxation

Appendix

Finals(SOR)_Cruz_Fr
ancisPaulo_M_MECP1 code.txt

You might also like