SCHISM Numerical Formulation
Total Page:16
File Type:pdf, Size:1020Kb
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) 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) x (m) S (PSU) *Make sure there is no jump in Cd between 2D/3D zones Semi-implicit scheme 12 nn1 - Continuity uunn1dz (1 - ) dz 0 t --hh 풖풏+ퟏ − 풖∗ = 풇 − 휃훻휂푛+1 − (1 − 휃)훻휂푛 + 풎풏+ퟏ − 훼 풖 풖풏+ퟏ퐿 푥, 푦, 푧 Momentum Δ푡 풛 n1 nu n1 n τw , at z ; b.c. (3D) z un1 n nu n1, 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 , y )1 2 x 3 y ii K (|xx - |) i1 Cubic spline Drift function Fluctuation K is called generalized covariance function K( h )- h , h23ln h , h , 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 uunn1dz (1 - ) dz 0 t --hh 풖풏+ퟏ − 풖∗ = 풇 − 휃훻휂푛+1 − (1 − 휃)훻휂푛 + 풎풏+ퟏ − 훼 풖 풖풏+ퟏ퐿 푥, 푦, 푧 Momentum Δ푡 풛 n1 nu n1 n τw , at z ; b.c. z un1 n nu n1, 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 u d L u d i i j i i j m 0, jN1,..., i1 m 1 i 1 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 I()ˆˆ nn1 g 2 t 2 H퐻ෙˆ 1 d 1 i ' i ' j j1 j i34(j) Ni 3 2 n1 1 dil', gt A Hi퐻ෙˆ ' l j j, l12 j 4A jl11 j i i’ is local index of node i in j.