Presentation is loading. Please wait.

Presentation is loading. Please wait.

Numerical Methods for Partial Differential Equations

Similar presentations


Presentation on theme: "Numerical Methods for Partial Differential Equations"— Presentation transcript:

1 Numerical Methods for Partial Differential Equations
Introduction Finite difference method for first order hyperbolic PDEs Method of characteristics for first order hyperbolic PDEs Method of lines approach for first order hyperbolic PDEs Finite difference method for second order elliptic PDEs Finite element method for second order elliptic PDEs Weighted residuals method for second order elliptic PDEs Finite difference method for second order parabolic PDEs Slides adapted from Prof. Shang-Xu. Hu of ZJU, “Applied Numerical Computation Methods”

2 1. Introduction to PDEs number of variables: at least 2
order : the highest order of derivative characteristic using the first order PDE as an example

3

4 types first order linear PDE Advection Equation(AE) second order linear PDE

5 solution methods: Numerical questions: Convergence
Method of Finite Differences (MFD) Method of Characteristics (MOC) Method of Lines (MOL) Method of Finite Elements (MFE) Method of Weighled Residuals (MWR) Numerical questions: Convergence When the steps approach to infinitely small, will the numerical results coincide the theoretical results? Stability When the error is introduced at a certain step, will this error be amplified or attenuated after several steps of numerical computation?

6 2. Finite difference method for first order hyperbolic PDEs
known as Advection Equation (AE) v is the flow speed The analytical solution is: To find a specific solution, we need two auxiliary conditions:

7 Fig. 1. Propagation of the Wave Front
assuming the forcing function is a Rump The solution of is shown below. Fig. 1. Propagation of the Wave Front

8 2.1 The simplest finite difference format:
Fig. 2

9 The above method is called Forward Time Centered Space
FTCS representation In fact, this method is not practical since it is an unstable method Consider the numerical error r Because the original PDE is linear, the error propagation is by which is identical to the original equation Independent Solutions of Difference Equations

10 solution=auxiliary solution and specific solution Auxiliary solution:
Auxiliary solution composes of two independent solutions:

11 Finite difference solution
Let us use Operator Calculus to derive with the Difference Operator It is the same as the differential operator.It is a linear operator. When applied to the linear second order difference equation Similar to the differential equation, its auxiliary solution can be obtained as follows:

12 Two independent solutions are
So, from Two independent solutions are (Eigenmode)

13 The general form of the independent solution of difference equation is given by:
In our numerical error analysis problem of PDE solution, clearly, Substitute the independent solution into the difference expression, we have, So, we can get

14 2.2 Improved finite difference format
Fig. 3 Fig. 4 Courant Condition

15 Waveform travels along The line x=vt t knot selection
The physical meaning Of Courant condition Waveform travels along The line x=vt t knot selection when knot is on the line: when knot is outside the line: when knot is inside the line: The Lax finite difference format can also be written as This can be regarded as the FTCS difference format for the following PDE: Fig. 5 dissipative term Numerical Viscosity

16 3. Method of characteristics (MOC) for 1st order hyperbolic PDEs
So, this has the same solution as the original PDE. is called the MOC equation. On the characteristic curve, those satisfying Are the solution of the original PDE.

17 3.1 Method of Characteristics (MOC)
Fig. 6

18 3.1 Method of Characteristics (MOC)
Fig. 7

19

20 4 Method of lines (MOL) approach for first order hyperbolic PDEs
Finite Difference: PDE is completely discretized as a set of difference equations. Using linear algebra to solve. Method of lines: PDE is partly discretized as a set of ODEs and using ODE numerical solution method to solve.

21 Method of Lines (MOL) Line space Integration step Fig. 8

22 5. Finite difference method for second order elliptic PDEs
known as the steady-state heat conduction equation and general form is Dirichlet problem Neumann problem

23 Dirichlet boundary condition Neumann boundary condition
u(x0,y)=f1(y) u(xm,y)=f2(y) Fig. 9 Laplace equation: Dirichlet boundary condition and Neumann boundary condition. Poisson equation Four (4) boundary conditions required. There are 3 types of boundary conditions: Dirichlet boundary condition Neumann boundary condition Mixed or hybrid boundary condition.

24 5.1 Finite difference of Laplace operator
Apply the above for Laplace operator

25 Fig. 10

26 Example: Laplace equation with Dirichlet boundary
Fig. 11

27 To increase the accuracy, we should use a denser grid:
Fig. 12

28 Laplace equation with Dirichlet boundary condition – numerical solutions
elimination method: Direct iteration Liebmann method S.O.R. method Alternating direction iteration (A.D.I.) method

29 6 Finite element method for second order elliptic PDEs Finite Elements Method (FEM)
Let us use Laplace equation Dirichlet problem as an illustrative example Based on Variational Principles Equivalence theorem The solution of the above PDE will minimize the following functional Fig. 13

30 Discretize D, usually using trangulation method:
For each element use bivariate function to approximate At three vertices, we can get Then, where

31 Uk=Wk Ui=Wi Uj=Wj Fig. 14

32 Therefore, where Now that the vertices coordinates are specified, one can get Moreover,

33 Functional minimization problem amounts to
with the following approximation: The minimum solution is from Therefore, we can get That is W is given on the boundary n: the number of inner knots

34 For a more general situation
The functional to be minimized is We can similarly do the discretization and get the finite element solution Fig. 15

35 8 Finite difference method for second order parabolic PDEs
Dynamic diffusion equation: For one dimensional space When using finite difference to replace the differentiation, there are many options, e.g., So, We need We have some other easy methods:

36 Explicit method: We get or, Then, we have Fig. 16

37 Illustrative example:
where Compare the numerical result with the following analytical result: air Saturated steam C2H5OH Fig. 17

38 Fig. 18 Number of time steps Analytical Solutions Numerical Solutions
Analytical versus Numerical Solutions Diffusion Dynamics r0.25

39 Fig. 19 Number of time steps Analytical Solutions Numerical Solutions
Analytical versus Numerical Solutions Diffusion Dynamics r0.5

40 Stability analysis of the explicit method
Therefore,

41 Therefore, we have


Download ppt "Numerical Methods for Partial Differential Equations"

Similar presentations


Ads by Google