Presentation is loading. Please wait.

Presentation is loading. Please wait.

Landscape Erosion Kirsten Meeker

Similar presentations


Presentation on theme: "Landscape Erosion Kirsten Meeker"— Presentation transcript:

1 Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

2 Outline System of equations Numerical methods Project to produce parallel version

3 Conservation Equations

4 Flow Equations

5 Initial Conditions Small random perturbations

6 Boundary Conditions upper boundary (ridge) h = 0 q w = q s = 0 lower boundary (absorbing body of water) H = h 0 = h Lateral boundaries (infinite extent) periodic

7 System Properties Ill-posed problem Shocks develop in water flow Results vary widely with initial conditions Large Fourier components (smallest spatial scale) grow fastest, all modes grow exponentially Nonlinearities saturate, producing colored noise Statistical measures are invariant width function

8 Variation with Random Seed

9 Numerical Method for Water Equation Nonlinear hyperbolic PDE, wave equation Forward-time center space scheme with upwind differencing, explicit O(  x,  t)

10 Numerical Method for Sediment Equation Nonlinear parabolic PDE, heat equation

11 Numerical Method for Sediment Equation Crank-Nicholson scheme, implicit O(  x 2,  t 2 )

12 Numerical Method for Sediment Equation Sediment conservation equation with Crank-Nicholson scheme applied can be expressed in matrix form as Ax=b Solved using preconditioned biconjugate gradient method diag(A) used as preconditioner

13 Project to Produce Parallel Version Analyze sequential code Select parallel tools and partitioning Convert in stages, preserving functioning of whole simulation Stochastic PDE’s, individual results are a function of random parameters including numerical noise Success of results are measured by statistical parameters “Clean” maintainable, portable code Improve performance, currently hours to days

14 Sequential Code: Main program Prompt user for input Initialize grid water depth and elevation Loop: alternating between finding water depth and eroded surface Periodically (as a function of percent eroded) write result to file

15 Sequential Code: Find Water Depth Update water surface = elevation + depth (pass 1) Find upwind direction and x and y fluxes (pass 2) Find optimal time step, limit flux per step (pass 3) Update water depths (pass 4) Test for convergence

16 Sequential Code: Find Eroded Surface Allocate biconjugate gradient variables (first pass only) Update water surface = elevation + depth (pass 1) Find finite difference coefficients (pass 2) Find erosion time step, limit elevation change per step (pass 3) Convert grid to vector form, solve for water surface by biconjugate gradient method, convert back to array (pass 4) Update elevation (pass 5)

17 Issues from Analysis of Sequential Code System to be solved is not separated from solver FindWaterDepth makes 4 passes over grid FindErodedSurface makes 5 passes over grid FindErodedSurface is copying grid to vectors, then back to array each iteration Large Params structure is used as a global data structure poor data encapsulation poor function documentation

18 Decisions Maintainability: Use MPI for portability on clusters Investigate solver libraries: PETSc Modify functions to use only needed input parameters, to try to eliminate use of global Params struct Performance: Use column-wise partitioning Consider writing data to disk from each processor then reassembling result off-line Try to eliminate multiple passes over grid


Download ppt "Landscape Erosion Kirsten Meeker"

Similar presentations


Ads by Google