SlideShare a Scribd company logo
ME4010 Computational Methods for
Mechanical Engineering
Chapter 4 Solution of system of equations
Instructor: Nikolai V. Priezjev
Office: 430 Russ Engineering Center
Phone: 937-775-3214
Email: nikolai.priezjev@wright.edu
The course is adopted from Prof. Huang at WSU
 
 
)(
2)(
2
23332
2
3
1222322
2
2
111212
2
1
xxkgmx
dt
d
m
xxkgmxxkx
dt
d
m
kxgmxxkx
dt
d
m



1 2 1
1 2 3 2
2 3 3
3 2 0
2 3
0
kx kx m g
kx kx kx m g
kx kx m g
  
   
  
The steady state equations are:
1 1
2 2
3 3
3 2 0
2 3
0
k k x m g
k k k x m g
k k x m g
     
            
          
In matrix form:
Dynamics
Statics
R1 + T1 cos 60 + T2 = 0
R2 + T1 sin 60 = 0
-T2 -T3 cos 60 + T4 cos 60 + T5 = 0
T3 sin 60 + T4 sin 60 = 0
-T5 - T6 cos 60 = 0
T6 sin 60 + R3 = 0
-T1 cos 60 + T3 cos 60 + T7 - F1 cos = 0
-T1 sin 60 - T3 sin 60 - F1 sin= 0
-T4 cos 60 - T7 + T6 cos 60 - F2 cos  = 0
-T4 sin 60 - T6 sin 60 - F2 sin = 0
In matrix form
1 cos60 1 0 0 0 0 0 0 0
0 sin60 0 1 0 0 0 0 0 0
0 0 1 0 cos60 cos60 1 0 0 0
0 0 0 0 sin60 sin60 0 0 0 0
0 0 0 0 0 0 1 cos60 0 0
0 0 0 0 0 0 0 sin60 1 0
0 cos60 0 0 cos60 0 0 0 0 1
0 sin60 0 0 sin60 0 0 0 0 0
0 0 0 0 0 cos60 0 cos60 0 1
0 0 0 0 0 sin60 0 sin60 0 0
 
 
 
  
 
 
  
 

 

 
  
   
1
1
2
2
3
4
5 1 1
6 1 1
3 2 2
7 2 2
0
0
0
0
0
0
cos
sin
cos
sin
R
T
T
R
T
T
T F
T F
R F
T F




   
   
   
   
   
   
   
    
   
   
   
   
   
   
      
Circuit
1
2
3
4
9 4 2 0 24
4 17 6 3 16
2 6 14 6 0
0 3 6 11 18
i
i
i
i
      
           
      
    
     
V = I * R
1: i1*9 - i2*4 - i3*2 = 24
Method
[A] = [L][U]
where
[L] = lower triangular matrix
[U] = upper triangular matrix
LU Decomposition
Given [A][X] = [B]
1. Decompose [A] into [L] and [U]
2. Solve [L][Z] = [B] for [Z]
3. Solve [U][X] = [Z] for [X]
Method: [A] Decomposes to [L] and [U]
    





















33
2322
131211
3231
21
00
0
1
01
001
u
uu
uuu
ULA


[U] is the same as the coefficient matrix at the end of the forward elimination step.
[L] is obtained using the multipliers that were used in the forward elimination process
Finding the [U] matrix
Using the Forward Elimination Procedure of Gauss Elimination
112144
1864
1525










 
112144
56.18.40
1525
56.212;56.2
25
64










 RowRow
 
76.48.160
56.18.40
1525
76.513;76.5
25
144











 RowRow
Step 1:
Finding the [U] Matrix
Step 2:












76.48.160
56.18.40
1525
 
7.000
56.18.40
1525
5.323;5.3
8.4
8.16













RowRow
 











7.000
56.18.40
1525
U
Matrix after Step 1:
Finding the [L] matrix
Using the multipliers used during the Forward Elimination Procedure










1
01
001
3231
21


56.2
25
64
11
21
21 
a
a

76.5
25
144
11
31
31 
a
a

From the first step
of forward
elimination
112144
1864
1525










Finding the [L] Matrix
 











15.376.5
0156.2
001
L
From the second
step of forward
elimination












76.48.160
56.18.40
1525
5.3
8.4
8.16
22
32
32 



a
a

Does [L][U] = [A]?
   






















7.000
56.18.40
1525
15.376.5
0156.2
001
UL
?
112144
1864
1525










Try this…
4 2 3 6
6 7 6.5 6
1 7.5 6.25 5.5
12 22 15.5 1
  
   
 
 
  
Using LU Decomposition to solve SLEs
Solve the following set of
linear equations using LU
Decomposition































2279
2177
8106
112144
1864
1525
3
2
1
.
.
.
x
x
x
Using the procedure for finding the [L] and [U] matrices
    






















7.000
56.18.40
1525
15.376.5
0156.2
001
ULA
Example
Set [L][Z] = [B]
Solve for [Z]































2.279
2.177
8.106
15.376.5
0156.2
001
3
2
1
z
z
z
1
1 2
1 2 3
106.8
2.56 177.2
5.76 3.5 279.2
z
z z
z z z

 
  
Example
Complete the forward substitution to solve for [Z]
 
   
735.0
21.965.38.10676.52.279
5.376.52.279
2.96
8.10656.22.177
56.22.177
8.106
213
12
1







zzz
zz
z
 






















735.0
21.96
8.106
3
2
1
z
z
z
Z
Example
Set [U][X] = [Z]
Solve for [X] The 3 equations become
































7350
2196
8106
7.000
56.18.40
1525
3
2
1
.
.
.
x
x
x
1 2 3
2 3
3
25 5 106.8
4.8 1.56 96.21
0.7 0.735
x x x
x x
x
  
   

Example
From the 3rd equation
3
3
3
0 7 0 735
0 735
0 7
1 050
. x .
.
x
.
x .



Substituting in a3 and using the
second equation
2 34 8 1 56 96 21. x . x .   
 
3
2
2
2
96 21 1 56
4 8
96 21 1 56 1 050
4 8
19 70
. . x
x
.
. . .
x
.
x .
 


 



Example
Substituting in a3 and a2 using
the first equation
1 2 325 5 106 8x x x .  
Hence the Solution Vector is:
1
2
3
0.2900
19.70
1.050
x
x
x
   
      
       
2 3
1
106 8 5
25
106 8 5 19 70 1 050
25
0 2900
. x x
x
. . .
.
 

 


Try this…
1
2
3
4
4 2 3 6 12
6 7 6.5 6 6.5
1 7.5 6.25 5.5 16
12 22 15.5 1 17
x
x
x
x
      
          
    
    
     
Module LU_solver
Contains
! SUBROUTINE TO PERFORM DOLITTLE FACTORIZATION: A=LU
SUBROUTINE LU(N,A,B,X)
integer::N,I,j,k
double precision:: A(N,N),L(N,N),U(N,N),B(N),Z(N),X(N)
double precision:: S,S1,S2,SS,S3,S4
DO I = 1,N
L(I,I)=1.
ENDDO
U(1,1)=A(1,1)
IF(U(1,1).EQ.0.)THEN
WRITE(1,*)'LU FACTORIZATION IS IMPOSSIBLE'
RETURN
ENDIF
DO J =2,N
U(1,J)=A(1,J) ! DETERMINE THE FIRST ROW OF U
L(J,1)=A(J,1)/U(1,1) ! DETERMINE THE FIRST COLUMN OF XL
ENDDO
DO I = 2, N-1
S=0.
DO K = 1, I-1
S=S+L(I,K)*U(K,I)
ENDDO
U(I,I)= A(I,I)-S
IF(U(I,I).EQ.0.)THEN
WRITE(1,*)'LU FACTORIZATION IS IMPOSSIBLE'
RETURN
ENDIF
DO J = I+1, N
S1=0.
S2=0.
DO K = 1, I-1
S1=S1+L(I,K)*U(K,J) ! DETERMINE THE (ith) ROWS OF U
S2=S2+L(J,K)*U(K,I) ! DETERMINE THE (ith) COLUMN OF XL
U(I,J)=A(I,J)-S1
L(J,I)=(A(J,I)-S2)/U(I,I)
ENDDO
ENDDO
ENDDO
SS=0
DO K = 1,N-1
SS=SS+L(N,K)*U(K,N)
U(N,N)=A(N,N)-SS
ENDDO
IF(U(N,N).EQ.0) THEN
WRITE(1,*)' THE MATRIX A IS SINQULAR'
ENDIF
! SUBROUTINE TO SOLVE LZ=B USING FORWARD SUBSTITUTION
Z(1)=B(1)
DO I =2,N
S3=0.
DO J =1,I-1
S3=S3+L(I,J)*Z(J)
ENDDO
Z(I)=B(I)-S3
ENDDO
X(N)=Z(N)/U(N,N)
DO K = N-1,1,-1 ! SOLVING UX=Z
S4=0.
DO J=K+1,N
S4=S4+U(K,J)*X(J)
ENDDO
X(K)=(Z(K)-S4)/U(K,K)
ENDDO
RETURN
END subroutine LU
end module solver
program main
use LU_solver
double precision, dimension(4,4)::A
double precision, dimension (4)::B,X
integer::i,j,N=4
open (1, file='matrix.dat')
do i=1,n
read(1,*)(a(i,j),J=1,N)
enddo
read(1,*)B
call LU(N,A,B,X)
print *,x
stop
end program main 4. -2. -3. 6.
-6. 7. 6.5 -6.
1. 7.5 6.25 5.5
-12. 22. 15.5 -1.
12. -6.5 16. 17.
matrix.dat file
1
2
3
4
4 2 3 6 12
6 7 6.5 6 6.5
1 7.5 6.25 5.5 16
12 22 15.5 1 17
x
x
x
x
      
          
    
    
     

More Related Content

What's hot

Fast and efficient exact synthesis of single qubit unitaries generated by cli...
Fast and efficient exact synthesis of single qubit unitaries generated by cli...Fast and efficient exact synthesis of single qubit unitaries generated by cli...
Fast and efficient exact synthesis of single qubit unitaries generated by cli...
JamesMa54
 
Matrices i
Matrices iMatrices i
Matrices i
Solo Hermelin
 
Inner product spaces
Inner product spacesInner product spaces
Inner product spaces
EasyStudy3
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniquesKrishna Gali
 
Relaxation method
Relaxation methodRelaxation method
Relaxation method
Parinda Rajapaksha
 
NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)
krishnapriya R
 
Iit jam 2016 physics solutions BY Trajectoryeducation
Iit jam 2016 physics solutions BY TrajectoryeducationIit jam 2016 physics solutions BY Trajectoryeducation
Iit jam 2016 physics solutions BY Trajectoryeducation
Dev Singh
 
Gradient , Directional Derivative , Divergence , Curl
Gradient , Directional Derivative , Divergence , Curl Gradient , Directional Derivative , Divergence , Curl
Gradient , Directional Derivative , Divergence , Curl
VishalVishwakarma59
 
서포트 벡터 머신(Support Vector Machine, SVM)
서포트 벡터 머신(Support Vector Machine, SVM)서포트 벡터 머신(Support Vector Machine, SVM)
서포트 벡터 머신(Support Vector Machine, SVM)
Hansol Kang
 
Ma8353 TRANSFORMS AND PARTIAL DIFFERENTIAL EQUATIONS
Ma8353 TRANSFORMS AND PARTIAL DIFFERENTIAL EQUATIONSMa8353 TRANSFORMS AND PARTIAL DIFFERENTIAL EQUATIONS
Ma8353 TRANSFORMS AND PARTIAL DIFFERENTIAL EQUATIONS
BIBIN CHIDAMBARANATHAN
 
system of algebraic equation by Iteration method
system of algebraic equation by Iteration methodsystem of algebraic equation by Iteration method
system of algebraic equation by Iteration method
Akhtar Kamal
 
Integration SPM
Integration SPMIntegration SPM
Integration SPM
Hanini Hamsan
 
Dobule and triple integral
Dobule and triple integralDobule and triple integral
Dobule and triple integral
sonendra Gupta
 
1638 vector quantities
1638 vector quantities1638 vector quantities
1638 vector quantities
Dr Fereidoun Dejahang
 
Matrix Methods of Structural Analysis
Matrix Methods of Structural AnalysisMatrix Methods of Structural Analysis
Matrix Methods of Structural Analysis
DrASSayyad
 
Tensor Train decomposition in machine learning
Tensor Train decomposition in machine learningTensor Train decomposition in machine learning
Tensor Train decomposition in machine learning
Alexander Novikov
 
Transformations (complex variable & numerical method)
Transformations (complex variable & numerical method)Transformations (complex variable & numerical method)
Transformations (complex variable & numerical method)
Digvijaysinh Gohil
 
Gram-Schmidt Orthogonalization and QR Decompositon
Gram-Schmidt Orthogonalization and QR Decompositon Gram-Schmidt Orthogonalization and QR Decompositon
Gram-Schmidt Orthogonalization and QR Decompositon
Mohammad Umar Rehman
 
Verification of Solenoidal & Irrotational
Verification of Solenoidal & IrrotationalVerification of Solenoidal & Irrotational
Verification of Solenoidal & Irrotational
MdAlAmin187
 
Calculo integral - Larson
Calculo integral - LarsonCalculo integral - Larson
Calculo integral - Larson
Juan Alejandro Alvarez Agudelo
 

What's hot (20)

Fast and efficient exact synthesis of single qubit unitaries generated by cli...
Fast and efficient exact synthesis of single qubit unitaries generated by cli...Fast and efficient exact synthesis of single qubit unitaries generated by cli...
Fast and efficient exact synthesis of single qubit unitaries generated by cli...
 
Matrices i
Matrices iMatrices i
Matrices i
 
Inner product spaces
Inner product spacesInner product spaces
Inner product spaces
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniques
 
Relaxation method
Relaxation methodRelaxation method
Relaxation method
 
NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)
 
Iit jam 2016 physics solutions BY Trajectoryeducation
Iit jam 2016 physics solutions BY TrajectoryeducationIit jam 2016 physics solutions BY Trajectoryeducation
Iit jam 2016 physics solutions BY Trajectoryeducation
 
Gradient , Directional Derivative , Divergence , Curl
Gradient , Directional Derivative , Divergence , Curl Gradient , Directional Derivative , Divergence , Curl
Gradient , Directional Derivative , Divergence , Curl
 
서포트 벡터 머신(Support Vector Machine, SVM)
서포트 벡터 머신(Support Vector Machine, SVM)서포트 벡터 머신(Support Vector Machine, SVM)
서포트 벡터 머신(Support Vector Machine, SVM)
 
Ma8353 TRANSFORMS AND PARTIAL DIFFERENTIAL EQUATIONS
Ma8353 TRANSFORMS AND PARTIAL DIFFERENTIAL EQUATIONSMa8353 TRANSFORMS AND PARTIAL DIFFERENTIAL EQUATIONS
Ma8353 TRANSFORMS AND PARTIAL DIFFERENTIAL EQUATIONS
 
system of algebraic equation by Iteration method
system of algebraic equation by Iteration methodsystem of algebraic equation by Iteration method
system of algebraic equation by Iteration method
 
Integration SPM
Integration SPMIntegration SPM
Integration SPM
 
Dobule and triple integral
Dobule and triple integralDobule and triple integral
Dobule and triple integral
 
1638 vector quantities
1638 vector quantities1638 vector quantities
1638 vector quantities
 
Matrix Methods of Structural Analysis
Matrix Methods of Structural AnalysisMatrix Methods of Structural Analysis
Matrix Methods of Structural Analysis
 
Tensor Train decomposition in machine learning
Tensor Train decomposition in machine learningTensor Train decomposition in machine learning
Tensor Train decomposition in machine learning
 
Transformations (complex variable & numerical method)
Transformations (complex variable & numerical method)Transformations (complex variable & numerical method)
Transformations (complex variable & numerical method)
 
Gram-Schmidt Orthogonalization and QR Decompositon
Gram-Schmidt Orthogonalization and QR Decompositon Gram-Schmidt Orthogonalization and QR Decompositon
Gram-Schmidt Orthogonalization and QR Decompositon
 
Verification of Solenoidal & Irrotational
Verification of Solenoidal & IrrotationalVerification of Solenoidal & Irrotational
Verification of Solenoidal & Irrotational
 
Calculo integral - Larson
Calculo integral - LarsonCalculo integral - Larson
Calculo integral - Larson
 

Similar to Numerical Methods: Solution of system of equations

MMAC presentation 16_09_20_20_41.pptx
MMAC presentation 16_09_20_20_41.pptxMMAC presentation 16_09_20_20_41.pptx
MMAC presentation 16_09_20_20_41.pptx
Juber33
 
Lelt 240 semestre i-2021
Lelt   240 semestre i-2021Lelt   240 semestre i-2021
Lelt 240 semestre i-2021
FrancoMaytaBernal
 
Factorization from Gaussian Elimination
  Factorization from Gaussian Elimination  Factorization from Gaussian Elimination
Factorization from Gaussian Elimination
Mudassir Parvi
 
Central tedancy & correlation project - 2
Central tedancy & correlation project - 2Central tedancy & correlation project - 2
Central tedancy & correlation project - 2
The Superior University, Lahore
 
07. LU Decomposition.pptx
07. LU Decomposition.pptx07. LU Decomposition.pptx
07. LU Decomposition.pptx
kibriaswe
 
Project_Report.pdf
Project_Report.pdfProject_Report.pdf
Project_Report.pdf
LuisCarvalho731494
 
1st Semester Physics Cycle (Dec-2015; Jan-2016) Question Papers
1st Semester Physics Cycle  (Dec-2015; Jan-2016) Question Papers1st Semester Physics Cycle  (Dec-2015; Jan-2016) Question Papers
1st Semester Physics Cycle (Dec-2015; Jan-2016) Question Papers
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Question bank Engineering Mathematics- ii
Question bank Engineering Mathematics- ii Question bank Engineering Mathematics- ii
Question bank Engineering Mathematics- ii
Mohammad Imran
 
Newton two Equation method
Newton two Equation  method Newton two Equation  method
Newton two Equation method
shanto017
 
math1مرحلة اولى -compressed.pdf
math1مرحلة اولى -compressed.pdfmath1مرحلة اولى -compressed.pdf
math1مرحلة اولى -compressed.pdf
HebaEng
 
Solution of matlab chapter 3
Solution of matlab chapter 3Solution of matlab chapter 3
Solution of matlab chapter 3
AhsanIrshad8
 
Counting Sort and Radix Sort Algorithms
Counting Sort and Radix Sort AlgorithmsCounting Sort and Radix Sort Algorithms
Counting Sort and Radix Sort Algorithms
Sarvesh Rawat
 
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291z
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291zSolutions manual for college algebra 10th edition by larson ibsn 9781337282291z
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291z
Certo612
 
Constant strain triangular
Constant strain triangular Constant strain triangular
Constant strain triangular
rahul183
 
Perfect method for Frames
Perfect method for FramesPerfect method for Frames
Perfect method for Framesandreslahe
 
T.I.M.E. JEE Advanced 2013 Solution Paper1
T.I.M.E. JEE Advanced 2013 Solution Paper1T.I.M.E. JEE Advanced 2013 Solution Paper1
T.I.M.E. JEE Advanced 2013 Solution Paper1
askiitians
 
3rd Semester Computer Science and Engineering (ACU - 2022) Question papers
3rd Semester Computer Science and Engineering  (ACU - 2022) Question papers3rd Semester Computer Science and Engineering  (ACU - 2022) Question papers
3rd Semester Computer Science and Engineering (ACU - 2022) Question papers
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...nutkoon
 

Similar to Numerical Methods: Solution of system of equations (20)

MMAC presentation 16_09_20_20_41.pptx
MMAC presentation 16_09_20_20_41.pptxMMAC presentation 16_09_20_20_41.pptx
MMAC presentation 16_09_20_20_41.pptx
 
Lelt 240 semestre i-2021
Lelt   240 semestre i-2021Lelt   240 semestre i-2021
Lelt 240 semestre i-2021
 
Factorization from Gaussian Elimination
  Factorization from Gaussian Elimination  Factorization from Gaussian Elimination
Factorization from Gaussian Elimination
 
Central tedancy & correlation project - 2
Central tedancy & correlation project - 2Central tedancy & correlation project - 2
Central tedancy & correlation project - 2
 
07. LU Decomposition.pptx
07. LU Decomposition.pptx07. LU Decomposition.pptx
07. LU Decomposition.pptx
 
Project_Report.pdf
Project_Report.pdfProject_Report.pdf
Project_Report.pdf
 
1st Semester Physics Cycle (Dec-2015; Jan-2016) Question Papers
1st Semester Physics Cycle  (Dec-2015; Jan-2016) Question Papers1st Semester Physics Cycle  (Dec-2015; Jan-2016) Question Papers
1st Semester Physics Cycle (Dec-2015; Jan-2016) Question Papers
 
Question bank Engineering Mathematics- ii
Question bank Engineering Mathematics- ii Question bank Engineering Mathematics- ii
Question bank Engineering Mathematics- ii
 
Newton two Equation method
Newton two Equation  method Newton two Equation  method
Newton two Equation method
 
math1مرحلة اولى -compressed.pdf
math1مرحلة اولى -compressed.pdfmath1مرحلة اولى -compressed.pdf
math1مرحلة اولى -compressed.pdf
 
Solution of matlab chapter 3
Solution of matlab chapter 3Solution of matlab chapter 3
Solution of matlab chapter 3
 
G e hay's
G e hay'sG e hay's
G e hay's
 
Counting Sort and Radix Sort Algorithms
Counting Sort and Radix Sort AlgorithmsCounting Sort and Radix Sort Algorithms
Counting Sort and Radix Sort Algorithms
 
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291z
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291zSolutions manual for college algebra 10th edition by larson ibsn 9781337282291z
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291z
 
Constant strain triangular
Constant strain triangular Constant strain triangular
Constant strain triangular
 
Perfect method for Frames
Perfect method for FramesPerfect method for Frames
Perfect method for Frames
 
T.I.M.E. JEE Advanced 2013 Solution Paper1
T.I.M.E. JEE Advanced 2013 Solution Paper1T.I.M.E. JEE Advanced 2013 Solution Paper1
T.I.M.E. JEE Advanced 2013 Solution Paper1
 
solution for 2D truss1
solution for 2D truss1solution for 2D truss1
solution for 2D truss1
 
3rd Semester Computer Science and Engineering (ACU - 2022) Question papers
3rd Semester Computer Science and Engineering  (ACU - 2022) Question papers3rd Semester Computer Science and Engineering  (ACU - 2022) Question papers
3rd Semester Computer Science and Engineering (ACU - 2022) Question papers
 
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...
13200836 solution-manual-process-dynamics-and-control-donald-r-coughanowr-130...
 

More from Nikolai Priezjev

Rapid cooling across the glass transition temperature at finite strain rate
Rapid cooling across the glass transition temperature at finite strain rateRapid cooling across the glass transition temperature at finite strain rate
Rapid cooling across the glass transition temperature at finite strain rate
Nikolai Priezjev
 
Heterogeneous relaxation dynamics in amorphous materials under cyclic loading
Heterogeneous relaxation dynamics in amorphous materials under cyclic loadingHeterogeneous relaxation dynamics in amorphous materials under cyclic loading
Heterogeneous relaxation dynamics in amorphous materials under cyclic loading
Nikolai Priezjev
 
Collective nonaffine rearrangements in binary glasses during large-amplitude ...
Collective nonaffine rearrangements in binary glasses during large-amplitude ...Collective nonaffine rearrangements in binary glasses during large-amplitude ...
Collective nonaffine rearrangements in binary glasses during large-amplitude ...
Nikolai Priezjev
 
Molecular dynamics simulation study of a polymer droplet motion over an array...
Molecular dynamics simulation study of a polymer droplet motion over an array...Molecular dynamics simulation study of a polymer droplet motion over an array...
Molecular dynamics simulation study of a polymer droplet motion over an array...
Nikolai Priezjev
 
Lecture Statics Analysis of Trusses
Lecture Statics Analysis of TrussesLecture Statics Analysis of Trusses
Lecture Statics Analysis of Trusses
Nikolai Priezjev
 
Lecture Statics Moments of Forces
Lecture Statics Moments of ForcesLecture Statics Moments of Forces
Lecture Statics Moments of Forces
Nikolai Priezjev
 
Dynamics Instantaneous center of zero velocity
Dynamics Instantaneous center of zero velocityDynamics Instantaneous center of zero velocity
Dynamics Instantaneous center of zero velocity
Nikolai Priezjev
 
Dynamics Kinematics Curvilinear Motion
Dynamics Kinematics Curvilinear MotionDynamics Kinematics Curvilinear Motion
Dynamics Kinematics Curvilinear Motion
Nikolai Priezjev
 
Lecture: Ensembles and free energy in Monte Carlo simulations
Lecture: Ensembles and free energy in Monte Carlo simulationsLecture: Ensembles and free energy in Monte Carlo simulations
Lecture: Ensembles and free energy in Monte Carlo simulations
Nikolai Priezjev
 
Lecture: Solidification and Growth Kinetics
Lecture: Solidification and Growth KineticsLecture: Solidification and Growth Kinetics
Lecture: Solidification and Growth Kinetics
Nikolai Priezjev
 
Lecture: Crystal Interfaces and Microstructure
Lecture: Crystal Interfaces and MicrostructureLecture: Crystal Interfaces and Microstructure
Lecture: Crystal Interfaces and Microstructure
Nikolai Priezjev
 
Lecture: Diffusion in Metals and Alloys
Lecture: Diffusion in Metals and AlloysLecture: Diffusion in Metals and Alloys
Lecture: Diffusion in Metals and Alloys
Nikolai Priezjev
 
Lecture: Binary phase diagrams and Gibbs free energy curves
Lecture: Binary phase diagrams and Gibbs free energy curvesLecture: Binary phase diagrams and Gibbs free energy curves
Lecture: Binary phase diagrams and Gibbs free energy curves
Nikolai Priezjev
 
Lecture: Polymer Processing
Lecture: Polymer Processing Lecture: Polymer Processing
Lecture: Polymer Processing
Nikolai Priezjev
 
Lecture: Dynamics of Polymer Solutions and Melts
Lecture: Dynamics of Polymer Solutions and Melts Lecture: Dynamics of Polymer Solutions and Melts
Lecture: Dynamics of Polymer Solutions and Melts
Nikolai Priezjev
 
Lecture: Mechanical Properties: Macro Viewpoint
Lecture: Mechanical Properties: Macro ViewpointLecture: Mechanical Properties: Macro Viewpoint
Lecture: Mechanical Properties: Macro Viewpoint
Nikolai Priezjev
 
Lecture: Microstructures in polymers
Lecture: Microstructures in polymersLecture: Microstructures in polymers
Lecture: Microstructures in polymers
Nikolai Priezjev
 
Lecture: Polymerization Reactions and Techniques
Lecture: Polymerization Reactions and TechniquesLecture: Polymerization Reactions and Techniques
Lecture: Polymerization Reactions and Techniques
Nikolai Priezjev
 
Lecture: Polymeric Materials: Molecular Viewpoint
Lecture: Polymeric Materials: Molecular ViewpointLecture: Polymeric Materials: Molecular Viewpoint
Lecture: Polymeric Materials: Molecular Viewpoint
Nikolai Priezjev
 
Molecular origin of surface tension at liquid-vapor interfaces
Molecular origin of surface tension at liquid-vapor interfacesMolecular origin of surface tension at liquid-vapor interfaces
Molecular origin of surface tension at liquid-vapor interfaces
Nikolai Priezjev
 

More from Nikolai Priezjev (20)

Rapid cooling across the glass transition temperature at finite strain rate
Rapid cooling across the glass transition temperature at finite strain rateRapid cooling across the glass transition temperature at finite strain rate
Rapid cooling across the glass transition temperature at finite strain rate
 
Heterogeneous relaxation dynamics in amorphous materials under cyclic loading
Heterogeneous relaxation dynamics in amorphous materials under cyclic loadingHeterogeneous relaxation dynamics in amorphous materials under cyclic loading
Heterogeneous relaxation dynamics in amorphous materials under cyclic loading
 
Collective nonaffine rearrangements in binary glasses during large-amplitude ...
Collective nonaffine rearrangements in binary glasses during large-amplitude ...Collective nonaffine rearrangements in binary glasses during large-amplitude ...
Collective nonaffine rearrangements in binary glasses during large-amplitude ...
 
Molecular dynamics simulation study of a polymer droplet motion over an array...
Molecular dynamics simulation study of a polymer droplet motion over an array...Molecular dynamics simulation study of a polymer droplet motion over an array...
Molecular dynamics simulation study of a polymer droplet motion over an array...
 
Lecture Statics Analysis of Trusses
Lecture Statics Analysis of TrussesLecture Statics Analysis of Trusses
Lecture Statics Analysis of Trusses
 
Lecture Statics Moments of Forces
Lecture Statics Moments of ForcesLecture Statics Moments of Forces
Lecture Statics Moments of Forces
 
Dynamics Instantaneous center of zero velocity
Dynamics Instantaneous center of zero velocityDynamics Instantaneous center of zero velocity
Dynamics Instantaneous center of zero velocity
 
Dynamics Kinematics Curvilinear Motion
Dynamics Kinematics Curvilinear MotionDynamics Kinematics Curvilinear Motion
Dynamics Kinematics Curvilinear Motion
 
Lecture: Ensembles and free energy in Monte Carlo simulations
Lecture: Ensembles and free energy in Monte Carlo simulationsLecture: Ensembles and free energy in Monte Carlo simulations
Lecture: Ensembles and free energy in Monte Carlo simulations
 
Lecture: Solidification and Growth Kinetics
Lecture: Solidification and Growth KineticsLecture: Solidification and Growth Kinetics
Lecture: Solidification and Growth Kinetics
 
Lecture: Crystal Interfaces and Microstructure
Lecture: Crystal Interfaces and MicrostructureLecture: Crystal Interfaces and Microstructure
Lecture: Crystal Interfaces and Microstructure
 
Lecture: Diffusion in Metals and Alloys
Lecture: Diffusion in Metals and AlloysLecture: Diffusion in Metals and Alloys
Lecture: Diffusion in Metals and Alloys
 
Lecture: Binary phase diagrams and Gibbs free energy curves
Lecture: Binary phase diagrams and Gibbs free energy curvesLecture: Binary phase diagrams and Gibbs free energy curves
Lecture: Binary phase diagrams and Gibbs free energy curves
 
Lecture: Polymer Processing
Lecture: Polymer Processing Lecture: Polymer Processing
Lecture: Polymer Processing
 
Lecture: Dynamics of Polymer Solutions and Melts
Lecture: Dynamics of Polymer Solutions and Melts Lecture: Dynamics of Polymer Solutions and Melts
Lecture: Dynamics of Polymer Solutions and Melts
 
Lecture: Mechanical Properties: Macro Viewpoint
Lecture: Mechanical Properties: Macro ViewpointLecture: Mechanical Properties: Macro Viewpoint
Lecture: Mechanical Properties: Macro Viewpoint
 
Lecture: Microstructures in polymers
Lecture: Microstructures in polymersLecture: Microstructures in polymers
Lecture: Microstructures in polymers
 
Lecture: Polymerization Reactions and Techniques
Lecture: Polymerization Reactions and TechniquesLecture: Polymerization Reactions and Techniques
Lecture: Polymerization Reactions and Techniques
 
Lecture: Polymeric Materials: Molecular Viewpoint
Lecture: Polymeric Materials: Molecular ViewpointLecture: Polymeric Materials: Molecular Viewpoint
Lecture: Polymeric Materials: Molecular Viewpoint
 
Molecular origin of surface tension at liquid-vapor interfaces
Molecular origin of surface tension at liquid-vapor interfacesMolecular origin of surface tension at liquid-vapor interfaces
Molecular origin of surface tension at liquid-vapor interfaces
 

Recently uploaded

road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 

Recently uploaded (20)

road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 

Numerical Methods: Solution of system of equations

  • 1. ME4010 Computational Methods for Mechanical Engineering Chapter 4 Solution of system of equations Instructor: Nikolai V. Priezjev Office: 430 Russ Engineering Center Phone: 937-775-3214 Email: nikolai.priezjev@wright.edu The course is adopted from Prof. Huang at WSU
  • 2.     )( 2)( 2 23332 2 3 1222322 2 2 111212 2 1 xxkgmx dt d m xxkgmxxkx dt d m kxgmxxkx dt d m    1 2 1 1 2 3 2 2 3 3 3 2 0 2 3 0 kx kx m g kx kx kx m g kx kx m g           The steady state equations are: 1 1 2 2 3 3 3 2 0 2 3 0 k k x m g k k k x m g k k x m g                               In matrix form: Dynamics
  • 3. Statics R1 + T1 cos 60 + T2 = 0 R2 + T1 sin 60 = 0 -T2 -T3 cos 60 + T4 cos 60 + T5 = 0 T3 sin 60 + T4 sin 60 = 0 -T5 - T6 cos 60 = 0 T6 sin 60 + R3 = 0 -T1 cos 60 + T3 cos 60 + T7 - F1 cos = 0 -T1 sin 60 - T3 sin 60 - F1 sin= 0 -T4 cos 60 - T7 + T6 cos 60 - F2 cos  = 0 -T4 sin 60 - T6 sin 60 - F2 sin = 0
  • 4. In matrix form 1 cos60 1 0 0 0 0 0 0 0 0 sin60 0 1 0 0 0 0 0 0 0 0 1 0 cos60 cos60 1 0 0 0 0 0 0 0 sin60 sin60 0 0 0 0 0 0 0 0 0 0 1 cos60 0 0 0 0 0 0 0 0 0 sin60 1 0 0 cos60 0 0 cos60 0 0 0 0 1 0 sin60 0 0 sin60 0 0 0 0 0 0 0 0 0 0 cos60 0 cos60 0 1 0 0 0 0 0 sin60 0 sin60 0 0                                1 1 2 2 3 4 5 1 1 6 1 1 3 2 2 7 2 2 0 0 0 0 0 0 cos sin cos sin R T T R T T T F T F R F T F                                                                    
  • 5. Circuit 1 2 3 4 9 4 2 0 24 4 17 6 3 16 2 6 14 6 0 0 3 6 11 18 i i i i                                      V = I * R 1: i1*9 - i2*4 - i3*2 = 24
  • 6. Method [A] = [L][U] where [L] = lower triangular matrix [U] = upper triangular matrix LU Decomposition Given [A][X] = [B] 1. Decompose [A] into [L] and [U] 2. Solve [L][Z] = [B] for [Z] 3. Solve [U][X] = [Z] for [X]
  • 7. Method: [A] Decomposes to [L] and [U]                           33 2322 131211 3231 21 00 0 1 01 001 u uu uuu ULA   [U] is the same as the coefficient matrix at the end of the forward elimination step. [L] is obtained using the multipliers that were used in the forward elimination process
  • 8. Finding the [U] matrix Using the Forward Elimination Procedure of Gauss Elimination 112144 1864 1525             112144 56.18.40 1525 56.212;56.2 25 64            RowRow   76.48.160 56.18.40 1525 76.513;76.5 25 144             RowRow Step 1:
  • 9. Finding the [U] Matrix Step 2:             76.48.160 56.18.40 1525   7.000 56.18.40 1525 5.323;5.3 8.4 8.16              RowRow              7.000 56.18.40 1525 U Matrix after Step 1:
  • 10. Finding the [L] matrix Using the multipliers used during the Forward Elimination Procedure           1 01 001 3231 21   56.2 25 64 11 21 21  a a  76.5 25 144 11 31 31  a a  From the first step of forward elimination 112144 1864 1525          
  • 11. Finding the [L] Matrix              15.376.5 0156.2 001 L From the second step of forward elimination             76.48.160 56.18.40 1525 5.3 8.4 8.16 22 32 32     a a 
  • 12. Does [L][U] = [A]?                           7.000 56.18.40 1525 15.376.5 0156.2 001 UL ? 112144 1864 1525          
  • 13. Try this… 4 2 3 6 6 7 6.5 6 1 7.5 6.25 5.5 12 22 15.5 1              
  • 14. Using LU Decomposition to solve SLEs Solve the following set of linear equations using LU Decomposition                                2279 2177 8106 112144 1864 1525 3 2 1 . . . x x x Using the procedure for finding the [L] and [U] matrices                            7.000 56.18.40 1525 15.376.5 0156.2 001 ULA
  • 15. Example Set [L][Z] = [B] Solve for [Z]                                2.279 2.177 8.106 15.376.5 0156.2 001 3 2 1 z z z 1 1 2 1 2 3 106.8 2.56 177.2 5.76 3.5 279.2 z z z z z z      
  • 16. Example Complete the forward substitution to solve for [Z]       735.0 21.965.38.10676.52.279 5.376.52.279 2.96 8.10656.22.177 56.22.177 8.106 213 12 1        zzz zz z                         735.0 21.96 8.106 3 2 1 z z z Z
  • 17. Example Set [U][X] = [Z] Solve for [X] The 3 equations become                                 7350 2196 8106 7.000 56.18.40 1525 3 2 1 . . . x x x 1 2 3 2 3 3 25 5 106.8 4.8 1.56 96.21 0.7 0.735 x x x x x x        
  • 18. Example From the 3rd equation 3 3 3 0 7 0 735 0 735 0 7 1 050 . x . . x . x .    Substituting in a3 and using the second equation 2 34 8 1 56 96 21. x . x .      3 2 2 2 96 21 1 56 4 8 96 21 1 56 1 050 4 8 19 70 . . x x . . . . x . x .         
  • 19. Example Substituting in a3 and a2 using the first equation 1 2 325 5 106 8x x x .   Hence the Solution Vector is: 1 2 3 0.2900 19.70 1.050 x x x                    2 3 1 106 8 5 25 106 8 5 19 70 1 050 25 0 2900 . x x x . . . .       
  • 20. Try this… 1 2 3 4 4 2 3 6 12 6 7 6.5 6 6.5 1 7.5 6.25 5.5 16 12 22 15.5 1 17 x x x x                                  
  • 21. Module LU_solver Contains ! SUBROUTINE TO PERFORM DOLITTLE FACTORIZATION: A=LU SUBROUTINE LU(N,A,B,X) integer::N,I,j,k double precision:: A(N,N),L(N,N),U(N,N),B(N),Z(N),X(N) double precision:: S,S1,S2,SS,S3,S4 DO I = 1,N L(I,I)=1. ENDDO U(1,1)=A(1,1) IF(U(1,1).EQ.0.)THEN WRITE(1,*)'LU FACTORIZATION IS IMPOSSIBLE' RETURN ENDIF DO J =2,N U(1,J)=A(1,J) ! DETERMINE THE FIRST ROW OF U L(J,1)=A(J,1)/U(1,1) ! DETERMINE THE FIRST COLUMN OF XL ENDDO DO I = 2, N-1 S=0. DO K = 1, I-1 S=S+L(I,K)*U(K,I) ENDDO U(I,I)= A(I,I)-S IF(U(I,I).EQ.0.)THEN WRITE(1,*)'LU FACTORIZATION IS IMPOSSIBLE' RETURN ENDIF DO J = I+1, N S1=0. S2=0. DO K = 1, I-1 S1=S1+L(I,K)*U(K,J) ! DETERMINE THE (ith) ROWS OF U S2=S2+L(J,K)*U(K,I) ! DETERMINE THE (ith) COLUMN OF XL U(I,J)=A(I,J)-S1 L(J,I)=(A(J,I)-S2)/U(I,I) ENDDO ENDDO ENDDO SS=0 DO K = 1,N-1 SS=SS+L(N,K)*U(K,N) U(N,N)=A(N,N)-SS ENDDO IF(U(N,N).EQ.0) THEN WRITE(1,*)' THE MATRIX A IS SINQULAR' ENDIF ! SUBROUTINE TO SOLVE LZ=B USING FORWARD SUBSTITUTION Z(1)=B(1) DO I =2,N S3=0. DO J =1,I-1 S3=S3+L(I,J)*Z(J) ENDDO Z(I)=B(I)-S3 ENDDO X(N)=Z(N)/U(N,N) DO K = N-1,1,-1 ! SOLVING UX=Z S4=0. DO J=K+1,N S4=S4+U(K,J)*X(J) ENDDO X(K)=(Z(K)-S4)/U(K,K) ENDDO RETURN END subroutine LU end module solver
  • 22. program main use LU_solver double precision, dimension(4,4)::A double precision, dimension (4)::B,X integer::i,j,N=4 open (1, file='matrix.dat') do i=1,n read(1,*)(a(i,j),J=1,N) enddo read(1,*)B call LU(N,A,B,X) print *,x stop end program main 4. -2. -3. 6. -6. 7. 6.5 -6. 1. 7.5 6.25 5.5 -12. 22. 15.5 -1. 12. -6.5 16. 17. matrix.dat file 1 2 3 4 4 2 3 6 12 6 7 6.5 6 6.5 1 7.5 6.25 5.5 16 12 22 15.5 1 17 x x x x                                  