landscape erosion kirsten meeker [email protected]
Post on 20-Dec-2015
215 views
TRANSCRIPT
Outline
System of equations
Numerical methods
Project to produce parallel version
Conservation Equations
Flow Equations
Initial Conditions
Small random perturbations
Boundary Conditions
upper boundary (ridge) h = 0
qw = qs = 0
lower boundary (absorbing body of water) H = h0 = h
Lateral boundaries (infinite extent) periodic
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
Variation with Random Seed
Numerical Method for Water Equation
Nonlinear hyperbolic PDE, wave equation
Forward-time center space scheme with upwind differencing, explicit O(x, t)
Numerical Method for Sediment Equation
Nonlinear parabolic PDE, heat equation
Numerical Method for Sediment Equation
Crank-Nicholson scheme, implicit O(x2, t2)
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
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
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
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
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)
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
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