MACS471 Lecture 8 - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

MACS471 Lecture 8

Description:

Today we are going to discuss implementation of the simplest ... Do not assume cells are right-angled quadrilaterals (can be deformed) ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 18
Provided by: tim99
Category:

less

Transcript and Presenter's Notes

Title: MACS471 Lecture 8


1
MA/CS471Lecture 8
  • Fall 2003
  • Prof. Tim Warburton
  • timwar_at_math.unm.edu

2
Today
Today we are going to discuss implementation of
the simplestpossible partial differential
equations Example domain discretization
(L-shape domain with 3 cells)
3
Traveling Wave Solutions in 1D and 2D
This PDE is the two-dimensional analogue to the
PDE we saw last time
1D
2D
Solutions
t0 Later t
4
In Words
  • The initial condition is translated with
    velocity
  • i.e. the density does not change shape it
    simply translates with a constant velocity.

5
Conservation Law
  • We first divide the full domain into
    quadrilateral cells. For each cell e the
    following conservation law holds
  • i.e. the total density change in a cell e is
    equal to the flux of density through the boundary
    of e
  • -- or the rate of change of material in the
    cell e is equal to the amount translated
    through the boundary.

6
Boundary Conditions
  • Where do we need to apply boundary conditions
  • Hint which way is the solution translating?

7
Boundary Conditions
  • Where do we need to apply external boundary
    conditions ?
  • i.e. wherever where
    is the outwards facing normal for the cell e
    at the face f

e
8
Definition of Cell Average and Area
9
Use Upwinding At Boundary of e
  • The tau variable acts as a switch.
  • If tau1 at a face then rho is approximated by
    the local cell average at the face
  • If tau0 at a face then rho is approximated by
    the neighbor cell average.

10
Upwind Switch
rhoe
rhoe,1
  • In this case so
  • i.e. for the surface flux term we should use the
    cell average density from the neighbor cell.

11
Euler Forward In Time
  • For each cell we now have a discrete space in
    time and space which will compute
    approximations the cell average density at a
    given time level.
  • We do need to specify an initial value at each
    cell for the cell average density
  • We also need to specify boundary conditions at
    inflow edges.

12
Summary of Scheme
13
The time rate ofchange of total density in the
cell e
The flux through the boundary of the four faces
of cell e
14
Implementation
  • What do we need for the implementation
  • (1) A list of vertex locations (x0,y0,x1,y1)
  • (2) For each cell e a list of the four vertices
  • (3) A routine to calculate the area of each cell
    Ae
  • (4) A routine to calculate the length of each
    cell edge Ae,f
  • (5) A routine to calculate the outwards facing
    normal to each cell edge
  • (6) A routine to calculate the inflow switch tau
    for each cell edge.
  • (7) A routine to calculate the initial density
    profile.
  • (8) A routine to calculate dt in the following
    way
  • (9) A routine to figure out which cells connect
    to each cell.

15
Details
  • Compute cell area by dividing each cell into two
    triangles, find their areas, and sum up.
  • Do not assume cells are right-angled
    quadrilaterals (can be deformed).
  • To compute normal to a face

16
Project 2 continued
  • Create a serial version of the 2d finite volume
    scheme for the above one way wave equation.
  • Make it parallel.

17
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com