ES440/ES911: CFD. Chapter 5. Solution of Linear Equation Systems

Σχετικά έγγραφα
Partial Differential Equations in Biology The boundary element method. March 26, 2013

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Example Sheet 3 Solutions

Numerical Analysis FMN011

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

Areas and Lengths in Polar Coordinates

Inverse trigonometric functions & General Solution of Trigonometric Equations

6.3 Forecasting ARMA processes

EE512: Error Control Coding

D Alembert s Solution to the Wave Equation

Areas and Lengths in Polar Coordinates

Appendix to On the stability of a compressible axisymmetric rotating flow in a pipe. By Z. Rusak & J. H. Lee

Matrices and Determinants

Matrices and vectors. Matrix and vector. a 11 a 12 a 1n a 21 a 22 a 2n A = b 1 b 2. b m. R m n, b = = ( a ij. a m1 a m2 a mn. def

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

Finite Field Problems: Solutions

Homework 3 Solutions

Section 8.3 Trigonometric Equations

CE 530 Molecular Simulation

Differentiation exercise show differential equation

Second Order Partial Differential Equations

ΜΑΣ 473/673: Μέθοδοι Πεπερασμένων Στοιχείων

The Simply Typed Lambda Calculus

Concrete Mathematics Exercises from 30 September 2016

1. (a) (5 points) Find the unit tangent and unit normal vectors T and N to the curve. r(t) = 3cost, 4t, 3sint

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

ECE Spring Prof. David R. Jackson ECE Dept. Notes 2

Second Order RLC Filters

4.6 Autoregressive Moving Average Model ARMA(1,1)

Parametrized Surfaces

Durbin-Levinson recursive method

Discontinuous Hermite Collocation and Diagonally Implicit RK3 for a Brain Tumour Invasion Model

Srednicki Chapter 55

derivation of the Laplacian from rectangular to spherical coordinates

Lanczos and biorthogonalization methods for eigenvalues and eigenvectors of matrices

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

High order interpolation function for surface contact problem

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

CRASH COURSE IN PRECALCULUS

New bounds for spherical two-distance sets and equiangular lines

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Problem Set 9 Solutions. θ + 1. θ 2 + cotθ ( ) sinθ e iφ is an eigenfunction of the ˆ L 2 operator. / θ 2. φ 2. sin 2 θ φ 2. ( ) = e iφ. = e iφ cosθ.

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Tridiagonal matrices. Gérard MEURANT. October, 2008

TMA4115 Matematikk 3

DiracDelta. Notations. Primary definition. Specific values. General characteristics. Traditional name. Traditional notation

2. Μηχανικό Μαύρο Κουτί: κύλινδρος με μια μπάλα μέσα σε αυτόν.

Study of In-vehicle Sound Field Creation by Simultaneous Equation Method

Quick algorithm f or computing core attribute

FEM Method 2/5/13. FEM Method. We will explore: 1 D linear & higher order elements 2 D triangular & rectangular elements

1 String with massive end-points

Computing the Gradient

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

2 Composition. Invertible Mappings

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

Homework 8 Model Solution Section

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.

The Negative Neumann Eigenvalues of Second Order Differential Equation with Two Turning Points

Partial Trace and Partial Transpose

ADVANCED STRUCTURAL MECHANICS

Vol. 38 No Journal of Jiangxi Normal University Natural Science Nov. 2014

Congruence Classes of Invertible Matrices of Order 3 over F 2

A Bonus-Malus System as a Markov Set-Chain. Małgorzata Niemiec Warsaw School of Economics Institute of Econometrics

( y) Partial Differential Equations

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

MATHEMATICS. 1. If A and B are square matrices of order 3 such that A = -1, B =3, then 3AB = 1) -9 2) -27 3) -81 4) 81

Approximation of distance between locations on earth given by latitude and longitude

Figure A.2: MPC and MPCP Age Profiles (estimating ρ, ρ = 2, φ = 0.03)..

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Reminders: linear functions

Numerical Methods for Civil Engineers. Lecture 10 Ordinary Differential Equations. Ordinary Differential Equations. d x dx.

Optimal Parameter in Hermitian and Skew-Hermitian Splitting Method for Certain Two-by-Two Block Matrices

DERIVATION OF MILES EQUATION FOR AN APPLIED FORCE Revision C

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Lecture 26: Circular domains

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Solutions to Exercise Sheet 5

ΜΑΘΗΜΑΤΙΚΗ ΠΡΟΣΟΜΟΙΩΣΗ ΤΗΣ ΔΥΝΑΜΙΚΗΣ ΤΟΥ ΕΔΑΦΙΚΟΥ ΝΕΡΟΥ ΣΤΗΝ ΠΕΡΙΠΤΩΣΗ ΑΡΔΕΥΣΗΣ ΜΕ ΥΠΟΓΕΙΟΥΣ ΣΤΑΛΑΚΤΗΦΟΡΟΥΣ ΣΩΛΗΝΕΣ ΣΕ ΔΙΑΣΤΡΩΜΕΝΑ ΕΔΑΦΗ

Geodesic Equations for the Wormhole Metric

g-selberg integrals MV Conjecture An A 2 Selberg integral Summary Long Live the King Ole Warnaar Department of Mathematics Long Live the King

Jordan Form of a Square Matrix

ST5224: Advanced Statistical Theory II

C.S. 430 Assignment 6, Sample Solutions

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

Finite difference method for 2-D heat equation

Other Test Constructions: Likelihood Ratio & Bayes Tests

DETERMINATION OF DYNAMIC CHARACTERISTICS OF A 2DOF SYSTEM. by Zoran VARGA, Ms.C.E.

The ε-pseudospectrum of a Matrix

The challenges of non-stable predicates

Chapter 6 BLM Answers

Section 9.2 Polar Equations and Graphs

Problem 3.1 Vector A starts at point (1, 1, 3) and ends at point (2, 1,0). Find a unit vector in the direction of A. Solution: A = 1+9 = 3.

Math221: HW# 1 solutions

PARTIAL NOTES for 6.1 Trigonometric Identities

Answer sheet: Third Midterm for Math 2339

Trigonometric Formula Sheet

w o = R 1 p. (1) R = p =. = 1

Wavelet based matrix compression for boundary integral equations on complex geometries

Fractional Colorings and Zykov Products of graphs

Transcript:

ES440/ES911: CFD Chapter 5. Solution of Linear Equation Systems Dr Yongmann M. Chung http://www.eng.warwick.ac.uk/staff/ymc/es440.html Y.M.Chung@warwick.ac.uk School of Engineering & Centre for Scientific Computing University of Warwick 1

Chapter 5 Solution of Linear Equation Systems 2

Algebraic Equation System for FVM u 0 2u 1 + u 2 = f 1, u 1 2u 2 + u 3 = f 2,. u i 1 2u i + u i+1 = f i,. u NX 2 2u NX 1 + u NX = f NX 1, u NX 1 2u NX + u NX+1 = f NX. Here, NX is the number of Control Volume and we have NX number of equations for u 1, u 2,... u i,..., u NX 1, u NX. u 0 and u NX+1 are boundary values. 3

Matrix Equations for 1D FDM The result of discretisation is a system of linear algebraic equations: 2 1 1 2 1 1 2 1 1 2 1 1 2 u 1 u 2 u i u NX 1 u NX = f 1 u 0 f 2 f i f NX 1 f NX u NX+1. 4

Matrix Equations - Cont d Algebraic Equation: Aφ = Q. (3.43 F&P ) 5

Matrix Equations - Cont d Algebraic Equation: Aφ = Q. (3.43 F&P ) A = 2 1 1 2 1 1 2 1 1 2 1 1 2, 5

Matrix Equations - Cont d Algebraic Equation: Aφ = Q. (3.43 F&P ) A = 2 1 1 2 1 1 2 1 1 2 1 1 2,Q = f 1 u 0 f 2 f i f NX 1 f NX u NX+1, 5

Matrix Equations - Cont d Algebraic Equation: Aφ = Q. (3.43 F&P ) A = 2 1 1 2 1 1 2 1 1 2 1 1 2,Q = f 1 u 0 f 2 f i f NX 1 f NX u NX+1, and φ = (u 1, u 2,..., u i,... u NX 1, u NX ) T. 5

Tri-Diagonal Matrix A = AX = B b 1 c 1 a 2 b 2 c 2 a 3 b 3 c 3 a NX 1 b NX 1 c NX 1,B = f 1 f 2 f 3 f NX 1, a NX X = (u 1, u 2, u 3, u NX 1, u NX ) T. b NX f NX 6

5.2.3 TDMA: Thomas Algorithm An upper triangular form of the tridiagonal matrix may be obtained by computing the new b i by b i = b i and the new f i by f i = f i a i b i 1 c i 1, a i b i 1 f i 1, i = 2,3,..., NX, i = 2,3,..., NX, then computing the unknowns from back substitution according to u NX = f NX /b NX and then u k = f k c k u k+1 b k, k = NX 1, NX 2,...,2,1. 7

One-Dimensional FDM Governing Equation: 1D Navier-Stokes Equation. 2 u y 2 = dp dx. (1) 8

One-Dimensional FDM Governing Equation: 1D Navier-Stokes Equation. 2 u y 2 = dp dx. (3) Second-Order Central Difference Method for u x : 2 u x 2 = u i+1 2u i + u i 1 x 2, 2 u y 2 = u j+1 2u j + u j 1 y 2. (3.30 FP ) 8

One-Dimensional FDM Governing Equation: 1D Navier-Stokes Equation. 2 u y 2 = dp dx. (5) Second-Order Central Difference Method for u x : Finite Difference Equation is: 2 u x 2 = u i+1 2u i + u i 1 x 2, 2 u y 2 = u j+1 2u j + u j 1 y 2. (3.30 FP ) u j+1 2u j + u j 1 y 2 = dp dx. (6) 8

One-Dimensional FDM Finite Difference Equation is: u j+1 2u j + u j 1 y 2 = dp dx. (7) 9

One-Dimensional FDM Finite Difference Equation is: u j+1 2u j + u j 1 y 2 = dp dx. (10) Rearranging gives or 1 y 2u j 1 2 y 2u j + 1 y 2u j+1 = dp dx, (11) u j 1 2u j + u j+1 = dp dx y2. (12) 9

One-Dimensional FDM Finite Difference Equation is: u j+1 2u j + u j 1 y 2 = dp dx. (13) Rearranging gives or Let s f j = dp dx y2. 1 y 2u j 1 2 y 2u j + 1 y 2u j+1 = dp dx, (14) u j 1 2u j + u j+1 = dp dx y2. (15) 9

One-Dimensional FDM 2 u x 2 = dp dx. Divide the computational domain into NX steps (control volumes). x 1 2 i i+1 NX NX+1 u j 1 2u j + u j+1 = f j. 10

One-Dimensional FDM 2 u x 2 = dp dx. Divide the computational domain into NX steps (control volumes). Apply the FDE to the interior points x 1 2 i i+1 NX NX+1 x 2, x 3,..., x i,..., x N. x 1 & x N+1 are boundary points. u j 1 2u j + u j+1 = f j. 10

One-Dimensional FDM 2 u x 2 = dp dx. Divide the computational domain into NX steps (control volumes). Apply the FDE to the interior points x 1 2 i i+1 NX NX+1 x 2, x 3,..., x i,..., x N. x 1 & x N+1 are boundary points. Domain size L = 2, N = 4 & x = 0.5 u j 1 2u j + u j+1 = f j. x 1, x 2, x 3, x 4, x 5. x 1 & x 5 are boundary. 10

Algebraic Equation System Finite Difference Equation is: u j 1 2u j + u j+1 = dp dx y2. With x = 0.5 & dp dx = 2: 11

Algebraic Equation System Finite Difference Equation is: With x = 0.5 & dp dx = 2: f j = dp dx y2 = 0.5 u j 1 2u j + u j+1 = dp dx y2. u 1 2u 2 + u 3 = 0.5, u 2 2u 3 + u 4 = 0.5, u 3 2u 4 + u 5 = 0.5. Here, N = 4 is the number of x and we have 3 number of equations for u 2, u 3 & u 4. 11

Algebraic Equation System Finite Difference Equation is: 1 y 2u j 1 2 y 2u j + 1 y 2u j+1 = dp dx, With x = 0.5 & dp dx = 2: 12

Algebraic Equation System Finite Difference Equation is: 1 y 2u j 1 2 y 2u j + 1 y 2u j+1 = dp dx, With x = 0.5 & dp dx = 2: 1 y 2 = 4 4u 1 8u 2 + 4u 3 = 2, 4u 2 8u 3 + 4u 4 = 2, 4u 3 8u 4 + 4u 5 = 2. u 1 and u 5 are boundary values. 12

Matrix Equations for 1D FDM The result of discretisation is a system of linear algebraic equations: 2 1 1 2 1 1 2 u 2 u 3 u 4 0.5 u 1 = 0.5. 0.5 u 5 13

Matrix Equations for 1D FDM The result of discretisation is a system of linear algebraic equations: 2 1 1 2 1 1 2 u 2 u 3 u 4 0.5 u 1 = 0.5. 0.5 u 5 At walls, due to no-slip boundary condition, u 1 = 0 & u 5 = 0. 2 1 u 2 0.5 1 2 1 u 3 = 0.5. 1 2 0.5 u 4 13

Matrix Equations for 1D FDM Finite Difference Equation is: u j 1 2u j + u j+1 = dp dx y2. 14

Matrix Equations for 1D FDM Finite Difference Equation is: u j 1 2u j + u j+1 = dp dx y2. The result of discretisation is a system of linear algebraic equations: 2 1 1 2 1 1 2 u 2 u 3 u 4 = 0.5 0.5 0.5. 14

Matrix Equations for 1D FDM Finite Difference Equation is: 1 y 2u j 1 2 y 2u j + 1 y 2u j+1 = dp dx, 15

Matrix Equations for 1D FDM Finite Difference Equation is: 1 y 2u j 1 2 y 2u j + 1 y 2u j+1 = dp dx, The result of discretisation is a system of linear algebraic equations: 8 4 4 8 4 4 8 u 2 u 3 u 4 = 2 2 2. 15

1D FDM Solution 1 y/h 0 N=4 N=10 N=50 N=100-1 0 0.5 1 1.5 U/U m 16

Two-Dimensional FDM Divide the computational domain into NX steps in x direction, y NY steps in y direction. y x x 17

Two-Dimensional FDM Divide the computational domain into NX steps in x direction, y NY steps in y direction. y NX NY control volumes. x x 17

Two-Dimensional FDM Divide the computational domain into NX steps in x direction, y NY steps in y direction. y NX NY control volumes. x x Resulting Finite Difference Equations (FDE) are u i+1,j 2u i,j + u i 1,j x 2 + u i,j+1 2u i,j + u i,j 1 y 2 = f i,j. 17

Two-Dimensional FDM 2D Finite Difference Equations are 1 x 2u i+1,j 2 x 2u i,j + 1 x 2u i 1,j + 1 y 2u i,j+1 2 y 2u i,j + 1 y 2u i,j 1 = f i,j, 1 x 2u i+1,j + 1 x 2u i 1,j + 1 y 2u i,j+1 + 1 y 2u i,j 1 1 2( x 2 + 1 y 2)u i,j = f i,j, 18

Two-Dimensional FDM 2D Finite Difference Equations are 1 x 2u i+1,j 2 x 2u i,j + 1 x 2u i 1,j + 1 y 2u i,j+1 2 y 2u i,j + 1 y 2u i,j 1 = f i,j, 1 x 2u i+1,j + 1 x 2u i 1,j + 1 y 2u i,j+1 + 1 y 2u i,j 1 1 2( x 2 + 1 y 2)u i,j = f i,j, Rearrange the equation using α = 1 x 2 & β = 1 y 2 αu i 1,j + αu i+1,j + βu i,j 1 + βu i,j+1 2(α + β)u i,j = f i,j. 18

Matrix Equations for 2D FDM The result of discretisation is a system of linear algebraic equations: A P φ P + l A l φ l = Q P. (3.42 F&P ) 19

Solution to 1D Matrix Equations The result of discretisation is a system of linear algebraic equations: A P φ P = Q P l A l φ l. 20

Solution to 1D Matrix Equations The result of discretisation is a system of linear algebraic equations: A P φ P = Q P l A l φ l. 1D FDM au i 1 + bu i }{{} +cu i+1 = f i. bu i = f i (au i 1 + cu i+1 ), u i = f i (au i 1 + cu i+1 ). b 20

Solution to 2D Matrix Equations The result of discretisation is a system of linear algebraic equations: A P φ P = Q P l A l φ l. 21

Solution to 2D Matrix Equations The result of discretisation is a system of linear algebraic equations: A P φ P = Q P l A l φ l. 2D FDM αu i 1,j + αu i+1,j + βu i,j 1 + βu i,j+1 2(α + β) u i,j }{{} = f i,j. 2(α + β)u i,j = αu i 1,j + αu i+1,j + βu i,j 1 + βu i,j+1 f i,j, u i,j = αu i 1,j + αu i+1,j + βu i,j 1 + βu i,j+1 f i,j 2(α + β). 21

Solution to 2D Matrix Equations 1D FDM in the x-direction αu i 1,j + αu i+1,j + βu i,j 1 + βu i,j+1 2(α + β)u i,j = f i,j. }{{} OLD αu i 1,j 2(α + β)u i,j + αu i+1,j = f i,j βu i,j 1 + βu i,j+1. }{{} OLD 22

Solution to 2D Matrix Equations 1D FDM in the x-direction αu i 1,j + αu i+1,j + βu i,j 1 + βu i,j+1 2(α + β)u i,j = f i,j. }{{} OLD αu i 1,j 2(α + β)u i,j + αu i+1,j = f i,j βu i,j 1 + βu i,j+1. }{{} OLD 1D FDM in the y-direction αu i 1,j + αu i+1,j +βu i,j 1 + βu i,j+1 2(α + β)u i,j = f i,j. }{{} OLD βu i,j 1 2(α + β)u i,j + βu i,j+1 = f i,j αu i 1,j + αu i+1,j. }{{} OLD 22

Solution to 2D Matrix Equations 2D Finite Difference Equations are αu i+1,j + αu i 1,j + βu i,j+1 + βu i,j 1 2(α + β)u i,j = f i,j. 23

Solution to 2D Matrix Equations 2D Finite Difference Equations are αu i+1,j + αu i 1,j + βu i,j+1 + βu i,j 1 2(α + β)u i,j = f i,j. No direct solver - Iterative solver. 23

Solution to 2D Matrix Equations 2D Finite Difference Equations are αu i+1,j + αu i 1,j + βu i,j+1 + βu i,j 1 2(α + β)u i,j = f i,j. No direct solver - Iterative solver. Using Tri-Diagonal Matrix Algorithm in each direction. αu i+1,j + αu i 1,j 2 (α + β)u i,j = f i,j βu i,j+1 βu i,j 1, βu i,j+1 + βu i,j 1 2 (α + β)u i,j = f i,j αu i+1,j αu i 1,j. Repeat until solution converges. 23

Solution to 2D Matrix Equations 2D Finite Difference Equations are αu i+1,j + αu i 1,j + βu i,j+1 + βu i,j 1 2(α + β)u i,j = f i,j. No direct solver - Iterative solver. Using Tri-Diagonal Matrix Algorithm in each direction. αu i+1,j + αu i 1,j 2 (α + β)u i,j = f i,j βu i,j+1 βu i,j 1, βu i,j+1 + βu i,j 1 2 (α + β)u i,j = f i,j αu i+1,j αu i 1,j. Repeat until solution converges. More details on Martix Computation. 23

2D FDM Solution 1 y/h 0 ITER=1 ITER=2 ITER=3 ITER=4 ITER=5 ITER=10 ITER=15 ITER=100-1 0 0.2 0.4 0.6 0.8 1 U/U max 24

Convergency U(y=0) 1 N=4 N=8 N=16 0.8 N=32 N=64 N=128 0.6 N=256 0.4 0.2 0 0 20 40 60 80 100 iteration number 25

Convergency - Cont d U(y=0) 1 N=4 N=8 N=16 0.8 N=32 N=64 N=128 0.6 N=256 0.4 0.2 0 10 0 10 1 10 2 10 3 10 4 iteration number 26

Convergency - Cont d 0.1 0.08 0.06 error 0.04 0.02 N=4 N=8 N=16 N=32 N=64 N=128 N=256 0 0 20 40 60 80 100 iteration number 27

Convergency - Cont d 10 0 10-2 10-4 error 10-6 10-8 10-10 10-12 N=4 N=8 N=16 N=32 N=64 N=128 N=256 10-14 0 1000 2000 3000 4000 5000 iteration number 28