Erosion parallel project slides (Powerpoint)

Download Report

Transcript Erosion parallel project slides (Powerpoint)

Landscape Erosion
Kirsten Meeker
[email protected]
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 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
Variation with Random Seed
Numerical Method for
Water Equation
Nonlinear hyperbolic PDE, wave equation
Forward-time center space scheme with
upwind differencing, explicit O(Dx, Dt)
Numerical Method for
Sediment Equation
Nonlinear parabolic PDE, heat equation
Numerical Method for
Sediment Equation
Crank-Nicholson scheme, implicit O(Dx2, Dt2)
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 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
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 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
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