Numerical Methods for Partial Differential Equations-Differential Equations-Lecture Slides, Slides of Differential Equations and Transforms

This lecture slide is part of course Differential Equations by Dr. Madhu Raja at Institute of Mathematics and Applications. Its main points are: Numerical, Methods, Differential, Equations, Partial, Mass, Conservation, Derivation, Conservation, Law

Typology: Slides

2011/2012

Uploaded on 07/03/2012

puja
puja 🇮🇳

4.3

(8)

91 documents

1 / 44

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Numerical Methods for Partial
Differential Equations
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c

Partial preview of the text

Download Numerical Methods for Partial Differential Equations-Differential Equations-Lecture Slides and more Slides Differential Equations and Transforms in PDF only on Docsity!

Numerical Methods for Partial

Differential Equations

Today

  • Introduction to a very basic finite volume method

Derivation of Mass Conservation Law

  • Next we consider an arbitrary section of the pipe, say [a,b]
  • We now assume that the fluid is not created or destroyed at any point

inside the section and is traveling with velocity u (which is a function of space and time). For the moment we will assume that u is positive (i.e. the fluid is flowing in the direction of positive x)

  • This allows us to state the following:
    • The time rate of change of the total fluid inside the section [a,b] changes only due to the flux of fluid into and out of the pipe at the ends x=a and x=b.
  • A simple formula relating these two quantities is:

 ,^   ,^   ,^   ,^   , 

b

a

d x t dx u b t b t u a t a t dt

^   ^   

  • In detail:

 ,^   ,^   ,   ,^   , 

b

a

u b

d x t dx t b u a t t d

t t

^    ^   a

The time rate of change of total mass in the section of pipe [a,b]

The flux out of the section at the right end of the section of pipe per unit time

The flux into the section at the left end of the section of pipe per unit time

Finally…

  • Assuming that the integrand of:

is continuous and noting that this relation holds for

all choices of a,b then we may deduce:

  • In short hand:

 ,^  (^)   ,^   ,^ ^0

b

a

x t u x t x t dx t x

x t ,^^  (^)  u x t  ,^^   x t ,^ ^0 t x

 

u

t x

 ^ 

Advection Equation

  • Let’s choose a simple, constant, fluid velocity
  • Then the pde reduces to the advection equation:
  • This is a pretty easy equation to solve . Consider

the change of variables:

u x t  , (^)   u

u 0 t x

t t

x x ut

Solution and Interpretation

  • So we know:
  • Which we can instantly solve:

where:

  • So an interesting property of the advection

equation is the way that the profile of the

solution does not change shape but it does shift

in the positive x direction with constant velocity

0 t

   

   

 

0

0

x t , x

x ut

 

 

 0  x (^)  :  x t ,  (^0) 

Space Time Diagram

  • Let’s track the information:
  • The dashed lines are which are known as

characteristics of the equation.

  • If we choose a point on one of these dashed lines and track

back down to t=0 and we will find the value of the density which applies at all points on the dashed line

x

t

Slope =

1

u

xutconst

  1. Let’s consider the advection equation:

  2. Next we take a finite portion of the real line from

x 1 to xN divided into N-1 equal length sections

  1. In each section we will approximate the density by a

constant value

Building a Finite Volume Solver

 ,^   ,^   , 

b

a

d x t dx u b t u a t dt

^   ^   

x 1 xN

1,..., 1 i

iN

dx

In the n’th section the density will be approximated by the

constant:

Piecewise Constant Approximation

x 1 xN

n

Upwind Treatment for Flux Terms

  • Recall that the solution shifts from left to right

as time increases.

  • Idea: use the upwind values

t

Slope =

1

u

 1 ,^   ,^  1

n n

 u  xi  t  u  x ti   u  i  u  i 

Basic Upwind Finite Volume Method

1 (^11)

n n n i i i

dt dt u u dx dx

 

1

1

n n i i (^) n n i i

dx u u dt

simplify

dt u dx

 

1 (^11)

n n n

 i   i   i

    

Note we must supply a value for the left most average at each time step: 0

n

Convergence

  • We have constructed a physically reasonable numerical scheme to

approximate the advection equation.

  • However, we need to do some extra analysis to determine how

good at approximating the true PDE the discrete scheme is.

  • Let us suppose that the i’th subinterval cell average of the actual

solution to the PDE at time T=n*dt is denoted by

   

       

1 1

1

1

1

1 1 , ,

where q satisfies:

, , ,

i i

i i

i

i

x x n i i i (^) x x

x

i i i x

q q x ndt q x ndt x x dx

d d q x t dx dxq uq x t uq x t dt dt

 

  

   

 

Error Equation

  • The goal is to estimate the difference of the exact solution

and the numerically obtained solution at some time T=n*dt.

  • So we are interested in the error:
  • For the given finite volume scheme dt and dx will be

related in a fixed manner (i.e. dt = Cdx for some C, independent of dx).

  • Suppose we let and then

the scheme is said to be of order s.

, n

n n n i i i

T E q dt

   

dt  0  

n s

E  O dt