Lecture 19 MA471 Fall 2003.

Slides:



Advertisements
Similar presentations
Numerical Solution of Linear Equations
Advertisements

Partial Differential Equations
Parallel Jacobi Algorithm Steven Dong Applied Mathematics.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 9 Instructor: Tim Warburton.
Computational Modeling for Engineering MECN 6040
Chapter 8 Elliptic Equation.
MATH 685/ CSI 700/ OR 682 Lecture Notes
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
Rayan Alsemmeri Amseena Mansoor. LINEAR SYSTEMS Jacobi method is used to solve linear systems of the form Ax=b, where A is the square and invertible.
Equations of Continuity
CSCI 317 Mike Heroux1 Sparse Matrix Computations CSCI 317 Mike Heroux.
CS 584. Review n Systems of equations and finite element methods are related.
Motion Analysis Slides are from RPI Registration Class.
Sparse Matrix Algorithms CS 524 – High-Performance Computing.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 19 Solution of Linear System of Equations - Iterative Methods.
Special Matrices and Gauss-Siedel
Chapter 4 Numerical Solutions to the Diffusion Equation.
Monica Garika Chandana Guduru. METHODS TO SOLVE LINEAR SYSTEMS Direct methods Gaussian elimination method LU method for factorization Simplex method of.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 9 Instructor: Tim Warburton.
Systems of Linear Equations Iterative Methods
Solving Scalar Linear Systems Iterative approach Lecture 15 MA/CS 471 Fall 2003.
Lecture 22 MA471 Fall Advection Equation Recall the 2D advection equation: We will use a Runge-Kutta time integrator and spectral representation.
Chapter 4 Matrices By: Matt Raimondi.
Scientific Computing Partial Differential Equations Poisson Equation.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 5a.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 31.
A particle-gridless hybrid methods for incompressible flows
1 MA/CS471 Lecture 7 Fall 2003 Prof. Tim Warburton
Solution of a System of ODEs with POLYMATH and MATLAB, Boundary Value Iterations with MATLAB For a system of n simultaneous first-order ODEs: where x is.
Elliptic PDEs and the Finite Difference Method
Parallel Solution of the Poisson Problem Using MPI
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
MA/CS375 Fall MA/CS 375 Fall 2002 Lecture 8.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 24.
Lecture 21 MA471 Fall 03. Recall Jacobi Smoothing We recall that the relaxed Jacobi scheme: Smooths out the highest frequency modes fastest.
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Partial Derivatives Example: Find If solution: Partial Derivatives Example: Find If solution: gradient grad(u) = gradient.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 17.
Solving Scalar Linear Systems A Little Theory For Jacobi Iteration
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 25.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 32.
Programming assignment # 3 Numerical Methods for PDEs Spring 2007 Jim E. Jones.
All-to-All Pattern A pattern where all (slave) processes can communicate with each other Somewhat the worst case scenario! 1 ITCS 4/5145 Parallel Computing,
Numerical Algorithms Chapter 11.
MTH108 Business Math I Lecture 20.
Numerical Solutions to the Diffusion Equation
EEE 431 Computational Methods in Electrodynamics
Solving Systems of Linear Equations: Iterative Methods
Numerical Analysis Lecture12.
MA/CS 375 Fall 2002 Lecture 9 MA/CS375 Fall 2002.
© Fluent Inc. 1/10/2018L1 Fluids Review TRN Solution Methods.
Materials Science & Engineering University of Michigan
Autar Kaw Benjamin Rigsby
Numerical Analysis Lecture 45.
CSCE569 Parallel Computing
Matrix Methods Summary
Nonlinear regression.
Numerical Analysis Lecture14.
All-to-All Pattern A pattern where all (slave) processes can communicate with each other Somewhat the worst case scenario! ITCS 4/5145 Parallel Computing,
Numerical Analysis Lecture13.
Jacobi Project Salvatore Orlando.
Programming assignment #1 Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Numerical Analysis Lecture11.
Linear Algebra Lecture 16.
Topic 3 Discretization of PDE
Home assignment #3 (1) (Total 3 problems) Due: 12 November 2018
Ax = b Methods for Solution of the System of Equations:
Ax = b Methods for Solution of the System of Equations (ReCap):
Finite Element Modelling in Geosciences FEM in 2D for viscous materials Introduction to Finite Element Modelling in Geosciences Summer 2018.
Presentation transcript:

Lecture 19 MA471 Fall 2003

Course Summary So Far Writing a serial card playing game. Using MPI to convert the card playing game to run on multiple processors: Blocking point to point communication Non-blocking p2p. Global communication. 1-dimensional finite volume scheme for a basic: Serial implementation. Parallel implementation. Profiling the parallel code with upshot. Trouble shooting bottlenecks (i.e. delaying global error reduction). 2-dimensional finite volume scheme introduced. Bandwidth reduction (example algorithm Cuthill-McKee). Load balancing with Karypis’ Metis software. Introduction to solving simple electrical circuit problems. Using “direct” factorization methods (LU or Cholesky) Practical limit for solving on a serial computer. Using “iterative” solution methods (Jacobi, Gauss-Seidel, Conjugate-Gradient) Practical issues relating to parallel implementation. Using a sparse matrix methods with iterative methods. Sufficient conditions for the Jacobi method to converge. An approach for distributed storage and action of a sparse matrix on a parallel computer.

Remaining Topics We will discuss some simple finite difference methods for the heat equation. We may also cover details of spectral methods. Multigrid. Projects.

The Heat Equation in 1-D Examples of diffusion?

1-D Diffusion Equation We consider the motion of a tracer solute in a fluid with zero mean velocity. We will denote the concentration of the tracer by C(x,t) The tracer will diffuse by random particle motion. The diffusion equation is:

Diffusion An underlying assumption of diffusion equation is that mechanical dispersion, like molecular diffusion, can be described by Fick’s first law: where F is the mass flux of solute per unit area per unit time and D is the effective diffusion coefficient in a porous medium. Fick.s law states that particle flux is directly proportional to the spatial concentration gradient. But it is not the spatial concentration gradient that causes particle movement, i.e. particles do not .push. each other (Crank, 1976). Particles exhibit random motion on the molecular level. This random motion ensures that a tracer will diffuse, decreasing the concentration gradient (Crank, 1976). Crank, J., 1976. The Mathematics of Diffusion. Oxford University Press, New York.

Diagram of Diffusion Model b a b Assume that each particle is jumping with a rate of R(delta) jumps per second which take it a distance of delta or more then there will be a number of jumps out of the left delta width ~= -R(delta)*0.5*delta*(C(b) + C(b-delta)) We count the number of jumps in from the right delta width ~= +R(delta)*0.5*delta*(C(b+delta)+C(b)) Summing:

Rough Derivation of Fickian Diffusion Consider the x=b end of the section. We are going to “monitor” the random motions of a particle in and out of the region: Assume that each particle is jumping with a rate of R jumps per second then there will be a flux of out of the b end (similar at the a end) We apply tracer counting:

[ Note continuity assumptions ] We now recall that R is a function of delta and clearly R must be inversely proportional to delta. i.e. as the region we are monitoring shrinks to zero, the rate of random motions into and out of the control region increases… We denote and obtain:

2-D Diffusion We can follow the same line of reasoning to obtain the 2-D diffusion equation: We are now going to create a very basic finite difference numerical scheme which we will use to solve this equation:

First: Taylor’s Theorem with Cauchy Remainder i.e.

Approximation of the Second Derivatives We use Taylor’s theorem twice:

cont We add those two approximations together:

Approximate Formula For Second x-derivative Similarly:

The Separate Parts

Two Discrete Schemes Forward Euler: Backwards Euler: For the second we end up having to solve a linear system – so that’s the one we will consider

Index Notation We will assume that we store the approximation to C on a Cartesian grid, with horizontal spacing dx and vertical spacing dy. We will compute the values of C at all these points in time increments of dt.

Time Stepping The discrete scheme looks like: Assume dx = dy and set then: Tidying up:

Boundary Conditions Assume: i.e. the concentrate is zero at the boundary.

Summary The scheme now looks like: This is nothing more than a linear system. We need to solve for We only need to store where M is the number of data points in each coordinate direction.

Implementation Build a matrix (with N=M*M rows and columns) representing the system: with Where we drop terms at the boundary given by: Evaluate an initial condition for C at the datapoints (grid of values). At every time step solve the linear system for the update value of C.

y x

Stencil y x i.e.

Example Matlab Code Build matrix: 12-38) set the non-zero entries of the matrix 12-28) the if statements determine if the boundary condition is invoked. 36) set diagonal term = 1+4lambda

Jacobi Iterator 40-41) build sparse matrices for jacobi 43-49) build right hand side vector 52) initial guess for C 59-74) Jacobi iteration 70-73) plot contours of C computed as iteration continues.

Solving