landscape erosion kirsten meeker [email protected]

18
Landscape Erosion Kirsten Meeker [email protected]

Post on 20-Dec-2015

215 views

Category:

Documents


2 download

TRANSCRIPT

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

Landscape Erosion

Kirsten Meeker

[email protected]

Page 2: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Outline

System of equations

Numerical methods

Project to produce parallel version

Page 3: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Conservation Equations

Page 4: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Flow Equations

Page 5: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Initial Conditions

Small random perturbations

Page 6: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Boundary Conditions

upper boundary (ridge) h = 0

qw = qs = 0

lower boundary (absorbing body of water) H = h0 = h

Lateral boundaries (infinite extent) periodic

Page 7: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

System Properties

Ill-posed problemShocks develop in water flowResults vary widely with initial conditionsLarge Fourier components (smallest spatial scale) grow fastest, all modes grow exponentiallyNonlinearities saturate, producing colored noiseStatistical measures are invariant

width function

Page 8: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Variation with Random Seed

Page 9: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Numerical Method for Water Equation

Nonlinear hyperbolic PDE, wave equation

Forward-time center space scheme with upwind differencing, explicit O(x, t)

Page 10: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Numerical Method for Sediment Equation

Nonlinear parabolic PDE, heat equation

Page 11: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Numerical Method for Sediment Equation

Crank-Nicholson scheme, implicit O(x2, t2)

Page 12: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

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

Page 13: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Project to Produce Parallel Version

Analyze sequential codeSelect parallel tools and partitioningConvert 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 codeImprove performance, currently hours to days

Page 14: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

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

Page 15: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

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

Page 16: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

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)

Page 17: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Issues from Analysis of Sequential Code

System to be solved is not separated from solverFindWaterDepth makes 4 passes over gridFindErodedSurface makes 5 passes over gridFindErodedSurface is copying grid to vectors, then back to array each iterationLarge Params structure is used as a global data structure

poor data encapsulation poor function documentation

Page 18: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu

Decisions

Maintainability:Use MPI for portability on clustersInvestigate solver libraries: PETScModify functions to use only needed input parameters, to try to eliminate use of global Params struct

Performance:Use column-wise partitioningConsider writing data to disk from each processor then reassembling result off-lineTry to eliminate multiple passes over grid