landscape erosion kirsten meeker [email protected]
Post on 20-Dec-2015
217 views
TRANSCRIPT
![Page 2: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/2.jpg)
Outline
System of equations
Numerical methods
Project to produce parallel version
![Page 3: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/3.jpg)
Conservation Equations
![Page 4: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/4.jpg)
Flow Equations
![Page 5: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/5.jpg)
Initial Conditions
Small random perturbations
![Page 6: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/6.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/7.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/8.jpg)
Variation with Random Seed
![Page 9: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/9.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/10.jpg)
Numerical Method for Sediment Equation
Nonlinear parabolic PDE, heat equation
![Page 11: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/11.jpg)
Numerical Method for Sediment Equation
Crank-Nicholson scheme, implicit O(x2, t2)
![Page 12: Landscape Erosion Kirsten Meeker kmeeker@cs.ucsb.edu](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/12.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/13.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/14.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/15.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/16.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/17.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022032800/56649d4e5503460f94a2e416/html5/thumbnails/18.jpg)
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