Solution of the St Venant Equations / Shallow-Water equations of open channel flow Dr Andrew Sleigh School of Civil Engineering University of Leeds, UK
Shock Capturing Methods Ability to examine extreme flows Changes between sub / super critical Other techniques have trouble with trans-critical Steep wave front Front speed Complex Wave interactions Alternative – shock fitting Good, but not as flexible
More recent Developed from work on Euler equations in the aero-space where shock capturing is very important (and funding available) 1990s onwards Euler equations / Numerical schemes: Roe, Osher, van Leer, LeVeque, Harten, Toro Shallow water equations Toro, Garcia-Navarro, Alcrudo, Zhao
Books E.F. Toro. Riemann Solvers and Numerical Methods for Fluid Dynamics. Springer Verlag (2nd Ed.) E.F. Toro. Shock-Capturing Methods for Free- Surface Flows. Wiley (2001) E.F. Toro. Riemann Problems and the WAF Method for Solving Two-Dimensional Shallow Water Equations. Philosophical Transactions of the Royal Society of London. A338:
Dam break problem The dam break problem can be solved It is in fact integral to the solution technique
Conservative Equations As earlier, but use U for vector
I 1 and I 2 Trapezoidal channel Base width B, Side slope S L = Y/Z Rectangular, S L = 0 Source term
Rectangular Prismatic Easily extendible to 2-d Integrate over control volume V
2-dimensions In 2-d have extra term: friction
Normal Form Consider the control volume V, border Ω
Rotation matrix H(U) can be expressed
Finite volume formulation Consider the homogeneous form i.e. without source terms And the rectangular control volume in x-t space
Finite Volume Formulation The volume is bounded by x i+1/2 and x i-1/2 t n+1 and t n The integral becomes
Finite Volume Formulation We define the integral averages And the finite volume formulation becomes
Finite Volume Formulation Up to now there has been no approximation The solution now depends on how we interpret the integral averages In particular the inter-cell fluxes F i+1/2 and F 1-1/2
Finite Volume in 2-D The 2-d integral equation is H(u) is a function normal to the volume
Finite Volume in 2-D Using the integral average Where |V| is the volume (area) of the volume then
Finite Volume in 2-D If the nodes and sides are labelled as : Where Fn s1 is normal flux for side 1 etc.
FV 2-D Rectangular Grid For this grid Solution reduces to
Flux Calculation We need now to define the flux Many flux definitions could be used to that satisfy the FV formulation We will use Godunov flux (or Upwind flux) Uses information from the wave structure of equations.
Godunov method Assume piecewise linear data states Means that the flux calc is solution of local Riemann problem
Riemann Problem The Riemann problem is a initial value problem defined by Solve this to get the flux (at x i+1/2 )
FV solution We have now defined the integral averages of the FV formulation The solution is fully defined First order in space and time
Dam Break Problem The Riemann problem we have defined is a generalisation of the Dam Break Problem
Dam Break Solution Evolution of solution Wave structure
Exact Solution Toro (1992) demonstrated an exact solution Considering all possible wave structures a single non-linear algebraic equation gives solution.
Exact Solution Consider the local Riemann problem Wave structure
Possible Wave structures Across left and right wave h, u change v is constant Across shear wave v changes, h, u constant
Determine which wave Which wave is present is determined by the change in data states thus: h* > h L left wave is a shock h* ≤ h L left wave is a rarefaction h* > h R right wave is a shock h* ≤ h R right wave is a rarefaction
Solution Procedure Construct this equation And solve iteratively for h (=h*). The functions may change each iteration
f(h) The function f(h) is defined And u*
Iterative solution The function is well behaved and solution by Newton-Raphson is fast (2 or 3 iterations) One problem – if negative depth calculated! This is a dry-bed problem. Check with depth positivity condition:
Dry–Bed solution Dry bed on one side of the Riemann problem Dry bed evolves Wave structure is different.
Dry-Bed Solution Solutions are explicit Need to identify which applies – (simple to do) Dry bed to right Dry bed to left Dry bed evolves h* = 0 and u* = 0 Fails depth positivity test
Shear wave The solution for the shear wave is straight forward. If v L > 0 v* = v L Elsev* = v R Can now calculate inter-cell flux from h*, u* and v* For any initial conditions
Complete Solution The h*, u* and v* are sufficient for the Flux But can use solution further to develop exact solution at any time. i.e. Can provide a set of benchmark solution Useful for testing numerical solutions. Choose some difficult problems and test your numerical code again exact solution
Complete Solution
Difficult Test Problems Toro suggested 5 tests Test No.h L (m)u L (m/s)h R (m)u R (m/s) Test 1: Left critical rarefaction and right shock Test 2: Two rarefactions and nearly dry bed Test 3: Right dry bed problem Test 4: Left dry bed problem Test 5: Evolution of a dry bed
Exact Solution Consider the local Riemann problem Wave structure
Returning to the Exact Solution We will see some other Riemann solvers that use the wave speeds necessary for the exact solution. Return to this to see where there come from
Possible Wave structures Across left and right wave h, u change v is constant Across shear wave v changes, h, u constant
Conditions across each wave Left Rarefaction wave Smooth change as move in x-direction Bounded by two (backward) characteristics Discontinuity at edges Left bounding characteristic x t h L, u L h *, u * Right bounding characteristic t
Crossing the rarefaction We cross on a forward characteristic States are linked by: or
Solution inside the left rarefaction The backward characteristic equation is For any line in the direction of the rarefaction Crossing this the following applies: Solving gives On the t axis dx/dt = 0
Right rarefaction Bounded by forward characteristics Cross it on a backward characteristic In rarefaction If Rarefaction crosses axis
Shock waves Two constant data states are separated by a discontinuity or jump Shock moving at speed S i Using Conservative flux for left shock
Conditions across shock Rankine-Hugoniot condition Entropy condition λ 1,2 are equivalent to characteristics. They tend towards being parallel at shock
Shock analysis Change frame of reference, add S i Rankine-Hugoniot gives
Shock analysis Mass flux conserved From eqn 1 Using also
Left Shock Equation Equating gives Also
Right Shock Equation Similar analysis gives Also
Complete equation Equating the left and right equations for u * Which is the iterative of the function of Toro
Approximate Riemann Solvers No need to use exact solution Expensive Iterative When other equations, exact may not exist Many solvers Some more popular than others
Toro Two Rarefaction Solver Assume two rarefactions Take the left and right equations Solving gives For critical rarefaction use solution earlier
Toro Primitive Variable Solver Writing the equations in primitive variables Non conservative Approximate A(W) by a constant matrix Gives solution
Toro Two Shock Solver Assuming the two waves are shocks Use two rarefaction solver to give h 0
Roe’s Solver Originally developed for Euler equations Approximate governing equations with: Where is obtained by Roe averaging
Roe’s Solver Properties of matrix Eigen values Right eigen vectors Wave strengths Flux given by
HLL Solver Harten, Lax, van Leer Assume wave speed Construct volume Integrate round Alternative gives flux
HLL Solver What wave speeds to use? Free to choose One option: For dry bed (right) Simple, but robust
Higher Order in Space Construct Riemann problem using cells further away Danger of oscillations Piecewise reconstruction Limiters
Obtain a gradient for variable in cell i, Δi Gradient obtained from Limiter functions Provide gradients at cell face Limiter Δi =G(a,b)
Limiters A general limiter β=1 give MINMOD β=2 give SUPERBEE van Leer Other SUPERBEE expression s = sign
Higher order in time Needs to advance half time step MUSCL-Hancock Primitive variable Limit variable Evolve the cell face values 1/2 t: Update as normal solving the Riemann problem using evolved W L, W R
Alternative time advance Alternatively, evolve the cell values using Solve as normal Procedure is 2 nd order in space and time
Boundary Conditions Set flux on boundary Directly Ghost cell Wall u, v = 0.Ghost cell u n+1 =-u n TransmissiveGhost cell h n+1 = h n u n+1 = u n
Wet / Dry Fonts Wet / Dry fronts are difficult Source of error Source of instability Common near tidal boundaries Flooding - inundation
Dry front speed We examined earlier dry bed problem Front is fast Faster than characteristic. Can cause problem with time-step / Courant
Solutions The most popular way is to artificially wet bed Give a small depth, zero velocity Loose a bit of mass and/or momentum Can drastically affect front speed E.g. a 1.0 dambeak with 1cm gives 38% error 1mm gives 25% error – try it!
Conservation Errors The conserved variable are h and hu Often require u Need to be very careful about divide by zero Artificial dry-bed depths could cause this
Source Terms “Lumped” in to one term and integrated Attempts at “upwinding source” Current time-step Could use the half step value E.g.
Main Problem is Slope Term Flat still waterover uneven bed starts to move. Problem with discretisation of
Discretisation Discretised momentum eqn For flat, still water Require
A solution Assume a “datum” depth, measure down Momentum eqn: Flat surface and
Some example solutions Weighted mesh gives more detail for same number of cells
Dam Break - CADAM Channel with 90° bend
Secondary Shocks