1
SCHISM numerical formulation
Joseph Zhang 2 Horizontal grid: hybrid 3 4 Side 2 3 Side 2 Side 1 Side 3 Side 1
1 Side 4 2 1 Side 3 2 3 2 1
1 Counter-clockwise convention 3 2 3 ys 2 2 x i 2 1 s N 1 i i 1 2 Ni
N i 1 Ni 1 i • Internal ‘ball’: starting elem is arbitrary • Boundary ball: starting elem is unique Vertical grid (1): SZ 3 Terrain-following zone
s zone S zone SZ zone z s=0 Nz
hc h hs s S-levels kz
s=-1 kz-1
Z-levels 2
1
z(1 s ) h s ( h - h ) C ( s ) ( - 1 s 0) cc tanh ( s- 1/ 2) tanh( / 2) sinh(sf ) ff C(s ) (1 - b ) b (0 b 1; 0 f 20) sinhff 2tanh( / 2) h min( h , hs ) S-coordinates 4
-3 f=10 , any b f=10, b=1
hc
f=10, b=0 f=10, b=0.7 Vertical grid: SZ 5
z=-hs
The bottom cells are shaved – no staircases! Vertical grid (2): LSC2 via VQS
Dukhovskoy et al. (2009)
Procedure for VQS
• Different # of levels are used at different depths • At a given depth, the # of levels is interpolated from the 2 adjacent master grids • Thin layers near the bottom are masked • Staircases appear near the bottom (like Z), but otherwise terrain following What to do with the staircases?
A
u u P 1 B 2 Q R 1
2
LSC2= Localized Sigma Coordinates with Shaved Cells
(ivcor =1 in vgrid.in)
*No masking of thin layers (c/o implicit scheme)
Vertical grid: LSC2 8 z (m) z
Degenerate prism Vertical grid (3) 9 • 3D computational unit: uneven prisms • Equations are not transformed into S- or s-coordinates, but solved in the original Z-space • Pressure gradient d z •Z-method with cubic spline (extrapolation on surface/bottom)
nk nk k k (whole level) Nz N -1 ……. z uj,k+1 vj,k+1 uj,k+1 vj,k+1 k Ci,k
……. k-1 Ci,k k-1 k-1 k +1 wi,k-1 wi,k-1 b kb Polymorphism
Zhang et al. (2016) Bathymetry (m) Polymorphism
flood z (m) z
x (m)
S (PSU)
*Make sure there is no jump in Cd between 2D/3D zones Semi-implicit scheme 12
nn1 - Continuity -uunn1dzdz(1)0 t --hh 풖풏+ퟏ − 풖∗ = 풇 − 𝑔휃훻휂푛+1 − 𝑔(1 − 휃)훻휂푛 + 풎풏+ퟏ − 훼 풖 풖풏+ퟏ퐿 푥, 푦, 푧 Momentum Δ푡 풛
n1 nnnu 1 τw , at ;z b.c. (3D) z un1 nnn -u 1, at ,zh nn C ||u z b Db
Du uun1 - Advection: ≈ * ; u (x , y , z , t t , t ) Dt t *
Implicit treatment of divergence, pressure gradient and SAV form drag terms by-passes most severe stability constraints: 0.5 ≤≤1
Explicit treatment: Coriolis, baroclinicity, horizontal viscosity, radiation stress… Eulerian-Lagrangian Method (ELM) 13
ELM: takes advantage of both Lagrangian and Eulerian methods
Grid is fixed in time, and time step is not limited by Courant number condition
Advections are evaluated by following a particle that starts at certain point at time t and ends right at a pre-given point at time t+t.
The process of finding the starting point of the path (foot of characteristic line) is called
backtracking, which is done by integrating dx/dt=u3 backward in 3D space and time. To better capture the particle movement, the backward integration is often carried out in small sub-time steps
Simple backward Euler method
2nd-order R-K method
Interpolation-ELM does not conserve; integration ELM does
Interpolation: numerical diffusion vs. dispersion ut 1 x Characteristic line t+t t advection
Flow dispersion diffusion Operating range of SCHISM 14
…. for a fixed grid
( 풖 + 𝑔ℎ)∆푡 퐶퐹퐿 = ∆푥
• ELM prefers larger t (truncation error ~1/t) • As a result, SCHISM requires CFL>0.4 • Convergence: CFL=const, t0 • For barotropic field applications: [100,450] sec • For baroclinic field applications: [100,200] sec (e.g., start with 150 sec) ELM with high-order Kriging 15
• Best linear unbiased estimator for a random function f(x) • “Exact” interpolator • Works well on unstructured grid (efficient) • Needs filter (ELAD) to reduce dispersion N f( x ,)(||) yxyK-123 iixx i1 Cubic spline Drift function Fluctuation K is called generalized covariance function Khhhhh(), -ln, , 23 Minimizing the variance of the fluctuation we get
N i 0 i1 N 2-tier Kriging cloud iix 0 i1 N iiy 0 i1 x f(,) xi y i f i
• The numerical dispersion generated by kriging is reduced by a diffusion ELAD filter (Zhang et al. 2016) Semi-implicit scheme 16
nn1 - Continuity -uunn1dzdz(1)0 t --hh 풖풏+ퟏ − 풖∗ = 풇 − 𝑔휃훻휂푛+1 − 𝑔(1 − 휃)훻휂푛 + 풎풏+ퟏ − 훼 풖 풖풏+ퟏ퐿 푥, 푦, 푧 Momentum Δ푡 풛
n1 nnnu 1 τw , at ;z b.c. z un1 nnn -u 1, at ,zh nn C ||u z b Db
Du uun1 - ≈ * ; u (x , y , z , t t , t ) Dt t *
Implicit treatment of divergence and pressure gradient terms by-passes most severe CFL condition : 0.5 ≤≤1
Explicit treatment: Coriolis, baroclinicity, horizontal viscosity, radiation stress… Galerkin finite-element formulation 17
A Galerkin weighted residual statement for the continuity equation:
휂푛+1 − 휂푛 න 휙 푑Ω + 휃 − න 훻휙 ∙ 푼푛+1푑Ω + න 휙 푈푛+1푑Γ + 1 − 휃 − න 훻휙 ∙ 푼푛푑Ω + න 휙 푈푛푑Γ = 0, 푖 Δ푡 푖 푖 푛 푖 푖 푛 Ω Ω Γ Ω Γ (𝑖 = 1, ⋯ , 푁푝)
휙푖: shape/weighting function; U: depth-integrated velocity; :implicitness factor
Need to eliminate Un+1 to get an equation for alone. We’ll do this with the aid from momentum equation:
풖풏+ퟏ − 풖∗ = 풇 − 𝑔휃훻휂푛+1 − 𝑔(1 − 휃)훻휂푛 + 풎풏+ퟏ − 훼 풖 풖풏+ퟏ퐿 푥, 푦, 푧 Δ푡 풛 Shape function (global) 2D case 18
The unknown velocity can be easily found as:
퐻2 푼푛+1 = 푮ෙ − 𝑔휃Δ푡 훻휂푛+1 퐻෩
퐻 푮ෙ = 푼∗ + ∆푡 푭 + 흉 − 𝑔(1 − 휃)퐻훻휂푛 (explicit terms) 퐻෩ 푤
퐻෩ = 퐻 + (휒 + 훼|풖|퐻)Δ푡 3D case 19 Vertical integration of the momentum equation
푼풏+ퟏ − 푼∗ 푛+1 푛 푛+1 휶 ub = 푭 − 𝑔휃훻휂 − 𝑔 1 − 휃 훻휂 + 흉푤 − 휒풖푏 − 훼 풖 푼 Δ푡 db 푧푣 풛풗 Assuming: න |풖|풖푑푧 ≅ 풖 න 풖푑푧 ≡ 풖 푼휶 z=-h −ℎ −풉
Momentum equation applied to the bottom boundary layer
풖풏+ퟏ − 풖∗ 휕 휕풖 풃 풃 = 풇 − 𝑔휃훻휂푛+1 − 𝑔 1 − 휃 훻휂푛 − 훼 풖 풖풏+ퟏ + 휈 Δ푡 풃 풃 풃 휕푧 휕푧
Therefore
푛+1 1 ∗ 푛 𝑔휃∆푡 푛+1 풖푏 = 풖푏 + 풇풃∆푡 − 𝑔(1 − 휃)∆푡훻휂 − 훻휂 1 + 훼|풖푏|∆푡 1 + 훼|풖푏|∆푡
Now still need to find U 3D case: locally emergent vegetation 20
We have 푼훼 = 푼n+1
So: 푛+1 𝑔휃퐻Δ푡 푛+1 푼 = 푮ퟏ − 훻휂 1 + 훼|풖|∆푡
∗ 푛 ∗ 푼 + 푭 + 흉풘 ∆푡 − 𝑔 1 − 휃 퐻∆푡훻휂 − 휒∆푡(풖푏 + 풇푏∆푡) 푮1 = 1 + 훼|풖|∆푡
퐻 = 퐻 − 휒∆푡
휒 휒 = 1 + 훼|풖풃|∆푡 3D case: locally submerged vegetation 21 Integrating from bottom to top of canopy: 푼훼 휕풖 푧푣 = 푼∗훼 + 푭휶∆푡 − 𝑔휃퐻훼∆푡훻휂푛+1 − 𝑔(1 − 휃)퐻훼∆푡훻휂푛 − 훼∆푡 풖 푼훼 + ∆푡휈 ቤ 푧 푧 휕푧 푣 푣 −ℎ 푼∗훼 = න 풖∗푑푧, 푭휶 = න 풇푑푧 −ℎ −ℎ Inside vegetation layer, the stress obeys exponential law (Shimizu and Tsujimoto 1994)
휕풖 휈 ≡ 푢′푤′ = 푹 푒훽2(푧−푧푣), (푧 ≤ 푧 ) 휕푧 0 푣
훽2 is a constant found from empirical formula:
푁 퐻 − 퐻훼 휒|풖푏| 훽 = 푣 −0.32 − 0.85 log 퐼 퐼 = 2 퐻훼 10 퐻훼 𝑔퐻
휕풖 푧푣 Therefore 휈 ቤ = 훽휒풖푛+1 (훽 = 푒훽2 푧푣−푧푏 − 1) 휕푧 푏 𝑔휃−ℎ 퐻훼∆푡 훼 푛+1 푼∗훼 + 푭휶∆푡 + 훽휒∆푡 풖∗ + 풇 ∆푡 − 𝑔(1 − 휃)퐻훼∆푡훻휂푛 푼 = 푮3 − 훻휂 푏 푏 훼 훼 1 + 훼|풖|∆푡 푮3 = 퐻 = 퐻 + 훽휒∆푡 1 + 훼|풖|∆푡 Finally: 훼|풖|∆푡 푛+1 푛+1 훼 푼 = 푮ퟐ − 𝑔휃퐻നΔ푡훻휂 퐻ന = 퐻 − 휒Δ푡 − 푐퐻 푐 = 1 + 훼|풖|∆푡 General case 22
In compact form:
푼푛+1 = 푬 − 𝑔휃퐻Δ푡훻휂푛+1
퐻2 , locally 2D 퐻෩ 퐻 = 퐻 , locally 3D emergent 1 + 훼|풖|∆푡 (Note the difference in 퐻ෙ between 2D/3D) 퐻ന, locally 3D submerged
푮, 2D 푬 = ൞ 푮ퟏ, 3D emergent 푮ퟐ, 3D submerged Finite-element formulation (cont’d) 23 Finally, substituting this eq. back to continuity eq. we get one equation for elevations alone: I1
푛+1 2 2 푛+1 න 휙푖휂 + 𝑔휃 Δ푡 퐻ෙ훻휙푖 ∙ 훻휂 푑Ω I3 Ω
푛 푛 푛+1 푛 푛+1 = න 휙푖휂 + 휃Δ푡훻휙푖 ∙ 푬 + (1 − 휃)Δ푡훻휙푖 ∙ 퐔 푑Ω − 휃Δ푡 න 휙푖푈푛 푑Γ푣 − (1 − 휃) Δ푡 න 휙푖푈푛 푑Γ − 휃Δ푡 න 휙푖푈푛 푑Γത푣 + 퐼7
Ω Γ푣 Γ Γഥ푣
I5 I6 I4 sources (i=1,…,Np)
Notes: • When node i is on boundaries where essential b.c. is imposed, is known and so no equations are
needed, and so I2 and I6 need not be evaluated there • When node i is on boundaries where natural b.c. is imposed, the velocity is known and so the last term on LHS is known only the first term is truly unknown! • b.c. is free lunch in FE model (cf. staggering in FV) • The inherent numerical dispersion in FE nicely balances out the numerical diffusion inherent in the implicit time stepping scheme! Shape function 24
Used to approximate the unknown function
Although usually used within each individual elements, shape function is global not local! N u ui i, i ( x j ) d ij i1
Must be sufficiently smooth to allow integration by part in weak formulation
Mapping between local and global coordinates
Assembly of global matrix
NMN L udL ud i i ji i j m 0, jN 1,..., imi111 m x
1 j-1 j j+1 N x
1 j-1 j j+1 N Conformal Non-conformal (Elevation, velocity) (optional for velocity: indvel=0 -> less dissipation and needs further stabilization (MB* schemes) Matrices: I1 25 Ni Igt Hd ()ˆˆ nn1221 퐻ෙˆ 1'' iij j1 j i34(j) Ni 3 2 n1 1 dil', gt AHil 퐻ෙˆ ' j j, lj 124 A jl11 j i i’ is local index of node i in j. il' reaches its max when i’=l, and so does I1. 3 i’ i'0 so diagonal is dominant if the averaged friction-reduced i '1 depth ≥0 (can be relaxed) Mass matrix is positive definite and symmetric! JCG or PETSc solvers work fine > (i’,2) (i’,1) i ' 26 Matrices: I3 and I5
I Uˆˆnn11 d U d 3 i n v i n ij n j v ij j L Nz -1 i ij ˆˆnn11 ij zij, k 1()() u n ij , k 1 u n ij , k j4 k kbs
Flather b.c. (overbar denotes mean) j
nn11 uugˆnn- h - / () ()U n ij ghij nn11 IL3 -ijiijj - 2() () 26 j
L Nz -1 Similarly Iˆ Uˆ n d ij z()() uˆˆ n u n 5 i ' n ij ij , k 1 n ij , k 1 n ij , k j j4 k k ij bs 27 Matrices: I7
Related to source/sink
Bi: ball of node i Um: elements that have source/sink 3 Sj: volume discharge rate [m /s] 28 Matrices: I4
Has the most complex form
i34(j) Ni A 3 IttdtAtd -nnnn (1 )(1) (1UGUG ) ˆˆˆ - ˆ j ' 3,',' iiij li lj iji j E jl12 1
Most complex part of E is the baroclinicity g f - d at elements/sides c z 0 Baroclinicity: z-method 29 o Interpolate density along horizontal planes B o Advantage: alleviate pressure gradient errors (Fortunato and Baptista 1996) 3 1 0 o Disadvantage: near surface or bottom Element j o Density is defined at prism centers (half levels) A o Re-construction method: compute directional derivatives along two direction at node i and 2 then convert them back to x,y o Density gradient calculated at prism centers first (for continuity eq.); the values at face centers are averaged from those at prism centers (for momentum eq.) o constant extrapolation (shallow) is used near bottom (under resolution) o Cubic spline is used in all interpolations of o Mean density profile () z can be optionally removed o 3 or 4 eqs for the density gradient vs. 2 unknowns – averaging needed for 3 pairs; e.g. ''' ' (x ) i, ky ()x i 1 k - ( xy 0, ) - () 1 y 0 - 1 0 ''' ' (x ) i, ky ()x i 2 k - ( xy 0, ) - () 2 y 0 - 2 0 o Degenerate cases: when the two vectors are co-linear (discard) o Vertical integration using trapzoidal rule Momentum equation: 2D case 30
The depth-averaged velocity can be directly solved once unknown elevations are found:
퐻 풖풏+ퟏ = 풖∗ + (풇 + 흉 /퐻)∆푡 − 𝑔휃훻휂푛+1 − 𝑔(1 − 휃)훻휂푛 퐻 풘 Momentum equation: 3D case 31
Galerkin FE in the vertical
휂 휕 휕풖푛+1 휂 න 휑 푏풖푛+1 − Δ푡 휈 푑푧 = න 휑 품푑푧 , (푙 = 푘 + 1, ⋯ , 푁 ) 푙 휕푧 휕푧 푙 푏 푧 푧푏 푧푏
푛 푏 = 1 + 훼|풖 |Δ푡ℋ(푧푣 − 푧)
휑푙: vertical hat function; g: explicit terms
b--zzu u uun1 nn 11 n 1 b AA(N- ltk )ll- -111 (2)( lttun lll 1 1) uu nn l 11 d uu nn - (2) 11 zl l lbl l1 ll - k1/21 - k 1/2,1 1 bb 66zzll1 zz d -tNτgnn11+ lk gg AA ( l ) -ll1 (2 ) ( 1 ) (2 gn1) l,1 Nz w zl l66 bl l -1
(l kbz 1, N )
…….. N • The matrix is tri-diagonal (Neumann b.c. can be imposed easily) z • Solution at bottom from the b.c. there (u=0 for ≠0); otherwise free slip k +2 • Vegetation terms are also treated implicitly b kb+1 db z=-h kb Velocity at nodes 32
• Needed for ELM (interpolation), and can serve as a way to further stabilize the mom solver by adding some inherent numerical diffusion • Method 1: inverse-distance averaging around ball (indvel=1 or MA schemes) – i larger dissipation; no further stabilization needed • Method 2: use linear shape function (conformal) (indvel=0 or MB schemes) uuuu- 1 IIIIII 3
• Discontinuous across elements; averaging to get the final value at node II I • Generally needs velocity b.c. (for incoming info) • indvel=0 generally gives less dissipation but needs further stabilization in 1 III 2 the form of viscosity or Shapiro filter for stabilization (important for eddying regime)
Eternal struggle between diffusion and dispersion Diffusion Dispersion Shaprio filter 33
A simple filter to reduce sub-grid scale (unphysical) oscillations while leaving the physical signals largely intact (=0.5 optimal)
4 1 4 ˆ uuuu000- i 4, (00.5) 4 i1 0 • No filtering for boundary sides – so need b.c. there especially for incoming flow 2 3 • Equivalent to Laplacian viscosity Horizontal viscosity 34 Important for eddying regime for adding proper dissipation u P (u) 0 d 1 4 1 6 0 A A n Assuming uniformity I II I II Q 0x S 2 x0 5 2 3 I II (like Shapiro filter) (u) 0 (u u u u - 4u ) R 3 4 0 1 2 3 4 0 3AI
Bi-harmonic viscosity (ideal in eddying regime) 1a 4b
- 4u - (2u 2u 2u 2u - 42u ) 1b 1 4 4a 0 3 1 2 3 3 0 0x 2 7(u u u u ) - u - u - u - u - u - u - u - u - 20u 2a 3 3b t 1 2 3 4 1a 1b 2a 2b 3a 3b 4a 4b 0 2 2b 3a
(Zhang et al. 2016) Vertical velocity 35
Vertical velocity using Finite Volume
ˆˆnxnynznxnynz111111 SunvnwnSkkkkki11111,()() kkk 11, kkkki unvnw- k k n 3 ˆ ˆˆnn11 PsqqkkNjs( i , m ) i ,( mjs ,()/ ),( i m 20, , kjs ), i 1 m(,...,1)- kbz m1
qˆ j,, kun j k j
i34(j) 1 3 wPsnnnn11111111--- qqS xn yn u x nv nˆ nS yn u z()/ˆˆ n 2()() v , n w n ˆˆ i, kjs 1( i m , ) iz m ,( ,ˆ ),( js , i m ), kjs 11 i m kk 1 11 k kk 1, kk k k k ki k k nSkk11m1
(,...,1)k- kNbz |푄 | = |푄 | n In compact form: 푗 푗 k+1 푗∈푆+ 푗∈푆− k+1 This is the foundation of mass conservation and monotonicity in transport solvers Pˆ Bottom b.c. b un1 n x v n 1 n y w n 1 n z , ( k k ) k k k k i, k kt b Sˆ k Surface b.c. not enforced (closure error) Inundation algorithms 36 Algorithm 1 (inunfl=0) Update wet and dry elements, sides, and nodes at the end of each time step based on the newly computed elevations. Newly wetted vel., S,T etc calculated using average Algorithm 2 (inunfl=1; accurate inundation for wetting and drying with sufficient grid resolution) Wet add elements & extrapolate velocity Dry remove elements Iterate until the new interface is found at step n+1 Extrapolate elevation at final interface (smoothing effects)
dry A n B wet
Extrapolation of surface Transport: upwind (1) 37 S j k TT ˆ 3 ()()uTQT h t z z S T Ti,k Tzˆ, z k-1 T 0, - zh (sources: bdy_frc, flx_sf and flx_bt) T n i* Finite volume discretization in a prism (i,k): mass conservation i34(j)+2 mm1 5 TTTTmmmm1111-- TTii- ^ m i, ki- 1,,,ki ki k 1 Vuij S j TV ji i QA kii ki k t - *,,, 1 '- m≠n, t’ ≠ t; tzz' jV i, ki- 1/k 2, 1/ 2 i34(j) Ti=Ti,k; 3 TTmm- tSk'( ), kN (1,ji ,) u is outward normal h jjbz d j j1 ij velocity Focus on the advection first t ' mm1 QuS TTQiij j - T n * jjj Vi jV QQQ0| || | From continuity equation jjj j j Sj- S S+: outflow faces; S -: inflow faces Ti , j S Upwinding Tj* - Tj , j S Transport: upwind (2) S 38 j k Drop “m” for brevity (and keep only advection terms) S Ti,k m1 t''' t t TTQTQTQTQTi i -n | j | i - | j | j 1 - | j | i | j | j VVV - - ij S j S i j S i j S k-1 S (1- )TTij
Max. principle is guaranteed if
′ ∆푡 푉푖 ≥ ′σ푗∈푆− |푄푗| ≥ 0 ֜ ∆푡 − 1 푉푖 σ푗∈푆− |푄푗| Courant number condition (3D case) Global time step for all prisms Implicit treatment of vertical advective fluxes to bypass vertical Courant number restriction in shallow depths
푉 ∆푡′ ≤ 푖 σ − |푄 | (Modified Courant number condition) 푗∈푆 퐻 푗
Mass conservation • Budget – vertical and horizontal sums • movement of free surface: small conservation error • Includes source/sink Solar radiation 39
total solar radiation 1 H ˆ --D// dD12 d QH- zH , ( )(0) Re(1R)e 0Czp
0 H (0) Budget Qdzˆ - 0C p The source term in the upwind scheme (F.D.)
HHAmmmm-- HH () ˆ m Vi i,, ki kii 1,, ki 1 k -- VQii 0,0CzCpi kp H m 0 ik, b
*Assume the heat is completely absorbed by the bed (black body) to prevent overheating in shallow depths 2 Transport: TVD 40
Solve the transport eq in 3 sub-steps: t t m1 n m m m m ˆ m Horizontal advection Ci Ci | Q j | (C j - Ci ) - Q j j , (m 1,..., M ) V - V (explicit TVD method or WENO) i jSH i jSH ~ t ~ ~ t M 1 Vertical advection (implicit TVD2) Ci Ci |Q j | (C j - Ci ) - Q j ( j j ), ( j kb,.., Nz ) V - V i jSV i jSV n1 n1 n1 ~ A t C C t n C C i - F dV, (k k ,.., N ) i i h b z Remaining (implicit diffusion) Vi z i,k z i,k-1 Vi Vi
• 1st step: explicit TVD or WENO3 • 2nd step: Taylor expansion in space and time
n1/ 2 n1 n1 n1 t C n1 C j C jup j j C jup r [C] jup - [ ] jup 2 t Duraisamy and Baeder (2007) Space limiter Time limiter IMPORTANT: built-in monotonicity constraint is very important for higher-order transport; use of additional diffusion would degrade order of accuracy 2 TVD 41 t 1 p ~ ~ | Q j | 1 - j (Ci - C j ) V - 2 r ~ i jSV pSV p M 1 Ci Ci t q 1 | Q j | ( - j ) 2V - s i jSV qSV q ~ ~ | Qq | (Cq - Ci ) - qSV Upwind ratio rp ~ ~ , p SV | Q p | (Ci - C p ) ~ M 1 (Ci - Ci ) | Q p | pS - Downwind ratio V • Iterative solver converges very fast sq ~ M 1 , q SV nd | Qq | (Cq - Cq ) • 2 -order accurate in space and time • Monotone 1 p • Alleviate the sub-cycling/small t for 1 - j 0 transport that plagued explicit TVD 2 r TVD condition: pSV p • Can be used at any depths!
t q 1 | Q j | ( - j ) d 0 (iterative solver) 2V - s i jSV qSV q Turbulence closure (itur=3) 42 퐷푘 휕 휕푘 = 휈휓 + 휈푀2 + 휅푁2 + 푐 훼 풖 3ℋ 푧 − 푧 − 휖 퐷푡 휕푧 푘 휕푧 푓푘 푣
퐷휓 휕 휕휓 휓 = 휈 + 푐 휈푀2 + 푐 휅푁2 + 푐 훼 풖 3ℋ(푧 − 푧) − 푐 휖퐹 퐷푡 휕푧 휓 휕푧 푘 휓1 휓3 푓휓 푣 휓2 푤푎푙푙
Essential b.c. Natural b.c. k 1 u 0, - zhor kzh - , or k z ()cz02 0 -nzh , lzh0 -, or zl 0 pmn ()()ckzh - , or 0 - nz, zl0
FE formulation
• k, and diffusivities are defined at nodes and whole levels • Use natural b.c. first and essential b.c. is used to overwrite the solution at boundary • Neglect advection • The production and buoyancy terms are treated explicitly or implicitly depending on the sum to enhance stability Turbulence closure (itur=3) 43
nn11 -zkll11 kn l 11 n n n A(l- Nkzl )22( - k l ) - k l - kt lk111/ l 2 6 zl1 nn11 -zklln k11 l n n n -1 A(l- kkbl ) - k l 22( - k l) ---111/ kt lk 2 l 6 zl
z 22n l1 MNP l1/ 2 n 2 0 3 1/ 2- 11 1zl1 nn A()l- Nz t -(c )(2) k lk k ll1 z n l1/ 2 l1 MN22P (2)kknn11 6 n l1/2 ll1 6kl1/ 2
z 22n l MNP l-1/ 2 n 2 0 3 1/ 2- 11 zl n n1 A(l- kbl )( - tc )(2 l k lk k -1 ) z n l-1/ 2 l M2P Nk 21 k(2) 1 nn 6 n l-1/ 2 ll-1 6kl-1/ 2
(,,)l kbz N Turbulence closure 44
nn11 -zl11n11 n n n l l A(l- Nz ) 2 l l1 - 2 l - l 1 - ( ) l 1/ 2 t 6 zl1 nn11 -zln11 n n n l l-1 A(l- kb ) 2 l l---1 - 2 l - l 1 ( ) l 1/ 2 t 6 zl n n zl1 22 c13 MQ c N 2 l1/ 2 k l1/ 2 - n zl1 2 2nn 1 1 A()l- Nz t c MQ c N (2 ) n 1 3l1/ 2 ll 1 6kl1/ 2
n 0 3 1/ 2- 1zl1 nn 1 1 (c ) c21 k l Fwall (2 l l ) l1/ 2 6 n n zl 22 c13 MQ c N 2 l-1/ 2 k l-1/ 2 - n zl 22nn11 A()l- kb t c M c N (2) n 13Q l-1/ 2 ll-1 6kl-1/ 2
n 0 3 1/ 2- 1zl nn 1 1 (c ) c21 k l Fwall (2 l l- ) l-1/ 2 6
(,,)l kbz N GOTM turbulence library (itur=4) 45
General Ocean Turbulence Model
One-dimensional water column model for marine and limnological applications
Coupled to a choice of traditional as well as state-of-the-art parameterizations for vertical turbulent mixing (including KPP)
Some perplexing problems on some platforms – robustness?
Bugs page
Division by 0? Newer versions may have resolved this issue
Works better than itur=3 otherwise
www.gotm.net Radiation stress 46
Sxx etc are functions of wave energy, which is integrated over all freq. and direction WBBL (Grant-Madsen) 47
Wave-current friction factor
Ratio of shear stresses
angle between bottom current and dominant wave direction
tb: current induced bottom stress Uw: orbital vel. amplitude w: representative angular freq.
The nonlinear eq. system is solved with a simple iterative scheme starting from =0 (pure wave), c=1. Strong convergence is observed for practical applications Hydraulics 48
Q Faces 1 2 (b) 1 1’
2 2’
3 3’
4 4’
5 5’ 1-1’ etc are node pairs
The 2 ‘upstream’ and ‘downstream’ reference nodes on each side of the structure are used to calculate the thru flow Q Hydraulics 49
The differential-integral eq. for continuity eq. is modified as
And for the momentum eq. • Add b as a horizontal boundary in backtracking • At b and also for all internal sides in b, the side vel. is imposed
from Q – like an open bnd (add to I3 and I5) SCHISM flow chart 50
Initialization end or hot start yes forcings no
backtracking Completed? output Turbulence closure Update levels & eqstate
Transport Preparation (Mom+cont.) Momentum w eq. Most expensive part solver Numerical stability 51
Semi-implicitness circumvents CFL (most severe) (Casulli and Cattani 1994)
ELM bypasses Courant number condition for advection (actually CFL>0.4) 2 Implicit TVD transport scheme along the vertical bypasses Courant number condition in the vertical
Explicit terms ght' Baroclinicity internal Courant number restriction (usually not a problem) 1 t x 0.5 Horizontal viscosity/diffusivity diffusion number condition (mild) x2 2 3 Upwind, TVD transport or WEON : horizontal Courant number condition sub-cycling
Coriolis – “inertial modes” in eddying regime (Le Roux 2009; Danilov 2013); needs to be stabilized by viscosity/filter
nnn111 20uuu1- 2 - 3 Lateral b.c. and nudging 52 bctides.in param.in
Variable Type 1 (*.th) Type 2: Type 3 Type 4 Type 5 Type -1 Type -4, -5 Nudging/spon (*[23]D.th) (uv3D.th); ge layer near nudging boundary
elev.th: constant Tidal elev2D.th.n elev2D.th.n Must =0 Time history; amp/phases c: time- and c: uniform space- combination along bnd varying of 3&4 along bnd S&T, tracers [MOD]_?.th Relax to Relax to i.c. [MOD]_3D. : relax to constant for for inflow th.nc: relax time history inflow to time- and (uniform space- along bnd) varying for inflow values along bnd during inflow u,v flux.th: via Via Tides uv3D.th.nc: uv3D.th.nc: Flather (‘0’ Relax to discharge discharge (uniform time- and combination for ) uv3D.th.nc (<0 for (<0 for amp/phase space- of 3&4 (but (2 separate inflow!) inflow!) along bnd) varying tidal relaxations along bnd amp/phases for in & (in lon/lat for vary along outflow) ics=2) bnd) 4H’s of SCHISM
o Hybrid FE-FV formulation o Hybrid horizontal grid o Hybrid vertical grid o Hybrid code (openMP-MPI)