0% found this document useful (0 votes)
38 views38 pages

Intro To 2D Equations

Uploaded by

geordie.thewlis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views38 pages

Intro To 2D Equations

Uploaded by

geordie.thewlis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Introduction to

2D Hydraulics Equations
Alex Sánchez, Ph.D.
Senior Hydraulic Engineer
USACE, Institute for Water Resources, Hydrologic Engineering Center

1
Hydraulic Modeling
Formal Framework: Computational Concepts:
• Mass Conservation • Computational Mesh
• Momentum Conservation • Numerical Methods
• Empirical Equations • Subgrid Bathymetry

HEC-RAS
Data: Engineering Problems:
• Topography, Maps, LIDAR • Project Planning & Design
• Historical Information • Dam and Levee Breaks
• Modeler Experience • Overland Flows, Floods

2
Outline
• Mass Conservation (Continuity)
• Momentum Conservation (Depth-Averaged)
• Acceleration
• Coriolis term
• Hydrostatic pressure
• Turbulent mixing
• Friction
• Diffusion Wave Equation
• Numerical Methods

3
Mass Conservation
• Assuming a constant water density H : Water surface elevation
∂H h : Water depth
+ ∇ ⋅ (hV ) = q
∂t q : Water souce/sink
• Integrating over a computational cell Ωi : Cell water volume
∂ Ak : Face area
∂t ∫∫∫ d Ω + ∫∫ (V ⋅ n)dS =Q
Ω S
Vk : Face velocity
• Finite-Volume Discretization nik : Outward face-normal unit vector

Ωin +1 − Ωin ∆t : Time step

∆t
+ ∑ (V
k ∈i
k ⋅ nik )Ak =
Q

Change in volume in a
system balances with
Ω=volume flow through
boundaries 4
Momentum Conservation
• Momentum Equation (non-conservative form)
∂V 1 τs
+ (V ⋅ ∇ )V + fk × V = − g ∇H + ∇ ⋅ ( νt h∇V ) − c f V +
∂t h ρh
• From Newton’s 2nd Law of motion
• Assumes constant water density, small vertical velocities,
hydrostatic pressure, etc.
• Non-linear and a function of both velocity and water levels
• Continuity and Momentum Equations are the Shallow Water
Equations or sometimes referred to as the “Full Momentum”
equations in HEC-RAS

5
Acceleration and Total Derivative
• Eulerian: Frame of reference is fixed in space and time
∂V
+ (V ⋅ ∇ )V
∂t
• Easier to compute
• Time-step restricted by Courant condition
• Lagrangian: Frame of reference moves with total derivative along flow path
∂V DV V n +1 − VXn
+ (V ⋅ ∇=
)V = flow
∂t Dt ∆t path Velocity (u Nn +1)
Velocity (u )
n
X
at time t+Δt
• More expensive to compute at time t
• Allows larger time-steps

6
Coriolis Acceleration
• Effect of rotating frame of reference (earth’s rotation)
• Constant for the each 2D domain (f-plane approx.)
𝑓𝑓 = 2 ωsin 𝜑𝜑
• ω: sidereal angular velocity of the Earth
• 𝜑𝜑: latitude. Positive for northern hemisphere.
Negative for southern hemisphere
• Coriolis acceleration disabled by default
to save computational time
• Negligible for most river and flood simulations
• When to enable Coriolis term?
• Large domains
• Higher latitudes
7
Hydrostatic Pressure
• Assumes vertical water accelerations are small compared to gravity
• Total pressure is

𝑃𝑃 = 𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 + 𝜌𝜌𝜌𝜌(𝐻𝐻 − 𝑧𝑧)

• 𝑃𝑃𝑎𝑎𝑎𝑎𝑎𝑎: atmospheric pressure (assumed to be constant)


• 𝜌𝜌 : constant water density
• 𝑔𝑔: gravity acceleration constant
• 𝐻𝐻: water surface elevation
• z: vertical coordinate
• Pressure gradient
𝜕𝜕𝑃𝑃 𝜕𝜕𝐻𝐻
= 𝜌𝜌𝑔𝑔
𝜕𝜕𝜕𝜕 𝜕𝜕𝑥𝑥
8
Diffusion of Momentum
• Non-conservative Formulation ∆ = ∇ 2 : Laplacian
• Only option in Version 5.0.7 and earlier,
u N : Face-normal velocity
• Optional in Version 6.0
ν t : Turbulent eddy viscosity
DV
=− g ∇H + ν t ∆V − c f V h : Water depth
Dt
c f : Non-linear friction coefficient
• Conservative Formulation
• Default in Version 6.0
• Only option for Eulerian SWE solver

DV 1
= − g ∇H + ∇ ⋅ ( νt h∇V ) − c f V
Dt h
9
Mixing Term Formulation Comparison
Bathymetry and
water level

Produces a net
dissipation
Non-conservative

Decreases velocities in
middle of channel but
Conservative increases velocities
near banks
10
Eddy Viscosity: Turbulence Model
• Old: Parabolic ν t = Du* h u* : Shear velocity
• Versions 5.0.7 and earlier h : Water depth
• Isotropic (same in all directions) D : Mixing coefficient
• 1 parameter: mixing coefficient D DL : Longitudinal mixing coefficient
• New: Parabolic-Smagorisnky DT : Transverse mixing coefficient
νt= Du* h + ( Cs ∆ ) S
2
Cs : Smagorinsky coefficient

2
 ∂u 
2
 ∂v   ∂u ∂v 
2
 Dxx 0  = Dxx
DL
cos 2
θ + D,T
sin 2
θ
S
= 2  + 2  +  +  D=
 ∂x   ∂y   ∂y ∂x   0 Dyy  =Dyy DL sin 2 θ + DT cos 2 θ
• Default method in Version 6.0
• Non-Isotropic (not the same in all directions)
• 3 parameters: DL , DT , and Cs
11
Bottom Friction
• Resisting force due to relative motion of fluid against the bed
• Non-linear friction coefficient

𝑛𝑛2 𝑔𝑔 𝑽𝑽
𝑐𝑐𝑓𝑓 = 4/3
𝑅𝑅

• 𝑛𝑛 :Manning coefficient
• 𝑔𝑔: gravity acceleration constant
• 𝑽𝑽 : velocity magnitude
• 𝑅𝑅: hydraulic radius

12
Wind Stress -3 Drag Coefficient
10
5

• Surface Stress is given by


4

τ s = ρ a CD W10 W10 3

Drag Coefficient
2

• Wind Reference Frame Hsu (1988)


Garratt (1977)

1 Large and Pond (1981)

W − V for Lagrangian


E Andreas et al. (2012)
Charnock (1955) + smooth flow
10
W10 =  E 0

W10 for Eulerian


0 10 20 30 40 50 60

Wind Speed (m/s)

13
Diffusion-Wave Approximation
• Ignoring the acceleration, Coriolis, mixing, and wind-forcing terms, the
momentum equation reduces to
n2
V V = −∇H
R 4/3

• Dividing both sides by the square of its norm


R 2/3 ∇H
V= −
n ∇H 1/ 2
• Inserting the above equation into the Continuity Equation leads to the
Diffusion-Wave Equation (DWE)
∂H R 2/3 h
= ∇ ⋅ ( β ∇H ) + q β= 1/ 2
∂t n ∇H
14
SWE vs. DWE
• Use SWE for:
• Flows with dynamic changes in acceleration
• Studies with important wave effects, tidal flows
• Detail solution of flows around obstacles, bridges
or bends
• Simulations influenced by Coriolis, mixing, or wind
• To obtain high-resolution and detailed flows
• Use DWE for:
• Flow is mainly driven by gravity and friction
• Fluid acceleration is monotonic and smooth, no
waves
• To compute approximate global estimates such as
flood extent
• To assess approximate effects of dam breaks
• To assess interior areas due to levee breeches
• For quick estimations or preliminary runs

15
Computational Mesh
• Mesh/grid can be unstructured
• Polygonal cells of up to 8 sides
• Cells must be concave
• Multiple 2D mesh can be run together
or independently.
• Grid Notation
• Cells, Faces, Face Points (i.e. nodes or
vertices), Computational Points, etc.

16
Numerical Methods
• Both DWE and SWE solvers are Semi-implicit
• Terms treated as:
• Explicit: acceleration and diffusion terms
• Semi-implicit: friction, flow divergence terms, and water level gradient
• Fully-Implicit: water level gradient term
• By treating the “fast” pressure gradient term implicitly, the time step
limitation based on the wave celerity can be removed
• Both DWE and SWE use Finite-Difference and Finite-Volume
Methods
• Time integration: Finite-Difference
• Continuity Equation: Finite-Volume
• Momentum Equation: Finite-Difference (no control volume)
17
Face Water Surface Gradient

• Face-Normal Gradient

∂H H j − H i
∇H ⋅ nik= ≈
∂N ∆xN

• Uses Cell Centroids and


NOT the Computation Points
• Future versions may include non-orthogonal
• Compact two-point stencil is computationally
efficient and robust

18
Momentum Conservation
• Momentum conservation is directionally invariant
• Only “face-normal” component is needed at faces so
∂u N ∂H 1 τ s,N
+ (V ⋅ ∇ ) u N − fuT = − g + ∇ ⋅ ( νt h∇u N ) − c f u N +
∂t ∂N h ρh
where u N is the velocity in the N direction

19
Face-Tangential Velocity
Double-C Stencil
• Tangential velocities are computed on left and
right of face with a Least-squares Formulation
3 3

∑ (V ⋅ nk − (u N ) k ) ∑ (V ⋅ nk − (u N ) k )
2 2
S=
R R S=
L L
k ∈R k ∈L

• Of the left and right reconstructed velocities,


only the tangential component is used, because
the normal component is known
(uT )=
R VR ⋅ t f (uT )=
L VL ⋅ t f

• Average face-tangential velocity computed as


(uT ) R + (uT ) L
( uT ) f =
2
20
Discretization
• Cell Velocity Gradient (x-direction)
• Gauss’ Divergence Theorem
1 1 1
∇ui=
Ai A∫∇udA=
Ai ∫ undL=
Ai
∑u n
k ∈i
k ik Lk
L

• Needed tor turbulence modeling nik = sik nk


• Cell Velocity
• Perot’s Method
1
Vi
=
Ai
∑ ∆x
k ∈i
ik Lk nk (u N ) k

• Needed for the conservative form of the


mixing term and for Eulerian advection
21
Discretization: Laplacian
• Node Laplacian
j
(∇ V )
2
j
= ∇ ⋅ ( ∇V )  j ≈ ∑
i
d i ( ∇V )i

i : Cells
∑ ckVk
( ∇V )i = j : Nodes i
k
k : Faces
• Used only by non-conservative turbulence

22
Backtracking
1. Interpolate node velocities from faces ∂u N Du N u Nn +1 − u Xn
) uN
+ (V ⋅ ∇= ≈
2. Set starting location and time as A = f , TR = ∆t ∂t Dt ∆t
3. From starting location and velocity, find location B dx P
= V ( x, t )
4. Compute time to location B: T
=B ( x A − x B )V −1
A
dt
=
5. Interpolate velocity at location B: VB wn1Vn1 + wn 2Vn 2
if TB > TR
6. Set A = B, T= R TR − TB , and go to step 3
else
7. Find location X as x= X x f − TRVA
8. Interpolate velocity vector at X
VX TB−1 TRVB + (TB − TR )VA 
=
9. Compute advective velocity
u=
X n f ⋅V X
23
Fractional Step Method (ELM only)
• Coriolis Term approximated as
 f [ (1 − θ ) fv Xn + θ v n +1 ] 
fk ×V ≈  n +1 
 − f [ (1 − θ ) fu n
X
+ θ u ] 

where k : Unit vector in the vertical direction
f : Coriolis Parameter V = ( u , v ) : Velocity at face
T

θ : Implicit weighting factor VX = ( u X , vX ) : Velocity at face at location X


T

• First (Coriolis) Step


 1 θ∆tf   u *   u Xn + (1 − θ )∆tfv Xn   u *

  *  =  n n 
V = *
*

 θ∆tf 1   v   vX + (1 − θ )∆tfu X  v 
• Second Step includes all other terms
24
Eulerian-Lagrangian Momentum Equation
• Semi-discrete form (2nd Fractional Step)
τ s,N
n
u n +1
−u *
∂H 1
n +θ

N
= −g
N
+  ∇ ⋅ (ν t h ∇u N )  − c f u N + n
n n +1

∆t ∂N h X ρ hf
where
H n +θ =
(1 − θ ) H n + θ H n +1
u=
*
N
V *
⋅ nf
• Velocity V* includes Coriolis
• Mixing term is interpolated at backtracking location X and
based on previous time step velocity field
• Friction term is semi-implicit
25
Eulerian Momentum Equation
• Semi-discrete form
τ s,N
n
u n +1
−u n
∂H 1 n +θ

N
+ (V ⋅∇ ) u N − fuT = − g
N n n n
+  ∇ ⋅ (ν t h∇u N )  − c f u N + n
n +1

∆t ∂N h f ρ hf
where
n +θ
H (1 − θ ) H + θ H
= n n +1
h f α Lf hL + α Rf hR
=
• Coriolis term computed at face f and is explicit
• No fractional step method like ELM solver
• Mixing term is computed at face f and is explicit
• Friction and pressure gradient terms are semi-implicit

26
Discretization: Eulerian Advection
• Approach from Kramer and Stelling (2008)
α Lf
(V ⋅ ∇ ) u N ≈
h f AL

k ∈L
sLk Qk Vku ⋅ n f − ( u N ) f 

α Rf
+
h f AR

k ∈R
sRk Qk Vku ⋅ n f − ( u N ) f 

∆x Lf
α Lf = h f α Lf hL + α Rf hR
=
∆x Lf + ∆x Rf
α Rf = 1 − α Lf
• Courant-Freidrichs-Lewy (CFL) Condition
U ∆t
C
= ≤1
∆x 27
Discretization: Mixing Term
• Non-Conservative Form
(∇ V )
n
νt ∇ u N ≈ ν
2 n
t, f
2
X
⋅ nf

• Conservative Form
1 α L
n f ⋅ (V j − VL )+ α Rf n f ⋅ (V j − VR )
h
∇ ⋅ ( νt h∇u N ) ≈ f
h f AL
∑ Aν
k ∈L
k t ,k
∆xL , j h f AR
∑ Aν
k ∈R
k t ,k
∆xR , j
• Discretization same for both ELM and EM solvers
• Approximate Stability Criteria for EM solver ν ∆t 1
t

∆x 2
2
• ELM interpolates term to location X
n
1 
 h ∇ ⋅ ( νt h∇u N ) 
X 28
Eulerian-Lagrangian vs. Eulerian SWE Solvers
• ELM-SWE Strength/Feature/Capability ELM-SWE EM-SWE
• Only solver available in V5.0.7 and earlier Larger Time Step X
• Default in V6.0 Best Stability X
• Not limited by Courant condition Courant Stability Criteria X
• Excellent stability Diffusion Stability Criteria X
• Can have momentum conservation Computational Speed X
problems around shocks or Wet/dry > 1 cell per time step X
where the flow changes rapidly Best Momentum Conservation X

• EM-SWE Non-Conservative Mixing X


Conservative Mixing X X
• New to V6.0 as an option
Wind X X
• Limited to Courant less than 1.0
• Good Stability
• Improved momentum conservation
for all flow conditions 29
Subgrid Modeling

• Problem
• Water levels usually vary much more
smoothly than the terrain
• Unfeasible to resolve every detail of the
terrain with the computational mesh
• Approach
• Utilize a grid resolution sufficient
to resolve the hydraulics
• Capture the details of the subgrid terrain
through hydraulic properties tables

30
Subgrid Bathymetry: Cells

Elevation
Elevation
Cell Ai ( H ) Ωi ( H )

Area Volume

31
Subgrid Bathymetry: Faces
• Faces treated similar to cells
• Hydraulic property tables computed
• Wetted length
• Wetted Perimeter
• Area

32
Benefits of Subgrid Bathymetry

33
Solution Procedure
For both DWE and SWE:
• The face-normal momentum equation is inserted into the continuity
equation to obtain a non-linear and implicit equation for water levels
• For example, in the case of DWE
n +θ n +θ
n +1
Ωi − Ωi n  H j − Hi 
− ∑αk  Qi
 = Ωi =Ωi ( H i )
∆t  ∆xN
k∈i  
• Implicit weighting
H n +θ =(1 − θ ) H n + θ H n +1
• Once the water levels are computed, the new time step
face-normal velocities are computed
34
Solution Procedure
• System of equations
Ω + ΨH =
b H : Water level
Ω : Water volume
• Algorithm
1. Compute Right-Hand-Side b ψ : Coefficient matrix
• Contains explicit terms: b : Right-hand-side
advection, diffusion, wind, etc.
2. Outer Loop (Assembly and Updates) m : Iteration index
• Update linearized terms and variables A : Diagonal matrix of
including coefficient matrix Ψ
3. Inner Loop (Newton Iterations) cell wet surface areas

H m +1
= H − [Ψ + A
m
] (Ω
m −1 m
+ ΨH m − b )

35
Boundary Conditions
• Stage Hydrograph. Upstream or downstream
• Flow Hydrograph. Upstream or downstream. Local conveyance
and velocities computed automatically.
• Normal Depth BC. At downstream boundaries.
• Rating Curve BC.
• Wind. Only for shallow-water equations.
• Precipitation, evapotranspiration, and infiltration. Included as
sources and sinks in the continuity equation.
• 1D reaches and 2D areas can be connected
• Multiple 2D areas can be connected to each other
• 2D areas can be connected to 1D lateral structures
such as levees to simulate levee breaches
36
Computational Implementation
• Multiple 2D areas can be computed independently and
simultaneously
• All solvers are can be run on multiple cores
• 2D solvers and parameters can be selected independently for
each 2D area
• A partial grid solution keeps track of active portion of
mesh and only computes the solution for active portion
significantly reducing computational times.

37
Thank You!
HEC-RAS Website:
https://www.hec.usace.army.mil/software/hec-ras/

Online Documentation:
https://www.hec.usace.army.mil/confluence/rasdocs

38

You might also like