1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

.Ocean Modelling for Beginners Phần 5 ppt

19 286 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 19
Dung lượng 624,39 KB

Nội dung

3.17 Scaling 63 where T i is the inertial period, which is the temporal Rossby number. Consequently, we can neglect the Coriolis force for waves of a period much shorter compared with the inertial period. If we now deal with a wave of T << T i and c >> U o ,the governing momentum equation reduces to: ∂u ∂t =− 1 ρ o ∂ P ∂x (3.75) It is obvious that scaling considerations can lead to substantail simplificatio of the dynamical equations governing a certain process. It is also fascinating that the nature of the Navier–Stokes equations varies in dependence on the scales of a dynamical process. Chapter 4 Long Waves in a Channel Abstract This chapter introduces the reader to the modelling of layered fl ws in one-dimensional channel applications including a simple floodin algorithm. Prac- tical exercises address a variety of processes including shallow-water surface waves, tsunamis and interfacial waves in a multi-layer fluid 4.1 More on Finite Differences 4.1.1 Taylor Series The value of a function in vicinity of given location x can be expressed in form of a Taylor series (Taylor, 1715) as: f (x + Δx) = f (x) +Δx ∂ f ∂x + Δx 2 1 ·2 ∂ 2 f ∂x 2 + Δx 3 1 ·2 ·3 ∂ 3 f ∂x 3 +··· (4.1) The essence of this series is that the neighboring value can be reconstructed by means of the value at x plus a linear correction using the slope of f at location x plus a higher-order correction involving the curvature of f at x and so on. Accordingly, the f rst derivative of a function can be approximated by: ∂ f ∂x ≈ f (x + Δx) − f (x) Δx (4.2) but we have to admit that this expression is not 100% accurate owing to neglection of higher-order terms. Alternatively, the Taylor series can be written as: f (x − Δx) = f (x) −Δx ∂ f ∂x + Δx 2 1 ·2 ∂ 2 f ∂x 2 − Δx 3 1 ·2 ·3 ∂ 3 f ∂x 3 +··· (4.3) J. K ¨ ampf, Ocean Modelling for Beginners, DOI 10.1007/978-3-642-00820-7 4, C  Springer-Verlag Berlin Heidelberg 2009 65 66 4 Long Waves in a Channel On the basis of this, another approximation of the firs derivative of a function is: ∂ f ∂x ≈ f (x) − f (x − Δx) Δx (4.4) The third option is to take the sum of both Taylor series, yielding: ∂ f ∂x ≈ f (x + Δx) − f (x −Δx) 2Δx (4.5) There are three different options of expressing the f rst derivative of a function in terms of a finit difference. Fig. 4.1 Example of equidistant grid spacing. Distance is given by k ·Δx,wherek is the cell index and Δx is grid spacing 4.1.2 Forward, Backward and Centred Differences With the choice of equidistant grid spacing and index notation (Fig. 4.1), we can formulate the different finite-di ference forms of the firs derivative of a function as: ∂ f ∂x ≈ f k+1 − f k Δx (4.6) called forward difference,or ∂ f ∂x ≈ f k − f k−1 Δx (4.7) called backward difference,or ∂ f ∂x ≈ f k+1 − f k−1 2Δx (4.8) called centred difference. 4.1.3 Scheme for the Second Derivative The sum of the Taylor series (4.1) and (4.3) gives an approximation of the second derivative of a function: 4.1 More on Finite Differences 67 ∂ 2 f ∂x 2 ≈ f (x + Δx) −2 f (x) + f (x −Δx) (Δx) 2 = f k+1 −2 f k + f k−1 (Δx) 2 (4.9) 4.1.4 Truncation Error The following example specifie the truncation error made when using finit differ- ences. Consider the function: f (x) = A sin (2π x/λ) (4.10) where A is a constant amplitude and λ is a certain wavelength. The derivative of this function is given by: df dx = 2π A/λ cos (2πx/λ) (4.11) If we use the centred difference as a proxy for the firs derivative, we obtain: f (x + Δx) − f (x − Δx) 2Δx = A sin [ 2π(x +Δx)/λ ] − A sin [ 2π(x −Δx)/λ ] 2Δx With some mathematical manipulation, the latter equation can be formulated as: f (x + Δx) − f (x − Δx) 2Δx = 2π A/λ cos (2πx/λ) · [ 1 − ] where the relative error with respect to the true solution – the truncation error –is given by:  ( Δx ) = 1 − sin (2πΔx/λ) 2πΔx/λ Fig. 4.2 Relative error (%) inherent with use of the centred scheme for (4.11) as a function of Δx /λ 68 4 Long Waves in a Channel The truncation error becomes reasonably small if we resolve the wavelength by more than 10 grid points (Fig. 4.2). In other words, when using finit differences, only waves with a wavelength greater than tenfold the grid spacing are resolved accurately. Similar conclusion can be drawn for time step requirements to resolve a given wave period. 4.2 Long Surface Gravity Waves 4.2.1 Extraction of Individual Processes The Navier–Stokes equations describe a great variety of processes that can occur simultaneously in fluid on different time scales and lengthscales. Nevertheless, under certain assumptions, we can extract individual processes from these equations to study them in isolation from other processes. For instance, waves of a period short compared with the inertial period are unaffected by the Coriolis force and we can ignore the Coriolis force for such waves, which simplifie the governing equations. By making certain assumptions, we will progressively learn more about a variety of physical processes existing in fluids 4.2.2 Shallow-Water Processes From scaling considerations, it can be shown that the hydrostatic relation holds for processes of horizontal lengthscale exceeding by far the vertical lengthscale. These processes are referred to as shallow-water processes, even if they occur in the atmo- sphere or in deep portions of the ocean. It is the ratio between horizontal and vertical lengthscales that matters here! 4.2.3 The Shallow-Water Model We consider a flui layer of uniform density with a freely moving surface to study long surface waves of a wavelength long compared with the flui depth (Fig. 4.3). We assume wave periods short compared with the inertial period, so that the Coriolis force can be neglected, and we simply ignore frictional effects to first-orde approximation. We neglect the nonlinear terms (advection of momen- tum), which implies that the phase speed of waves exceeds by far the speed of water parcels. As another simplification we consider waves that propagate exclusively along a channel aligned with the x-direction and being void of variations in the y-direction. 4.2 Long Surface Gravity Waves 69 Fig. 4.3 Configuratio of the one-dimensional shallow-water model. Undisturbed water depth is h o 4.2.4 The Governing Equations With the above simplifications the equations governing the dynamics of long sur- face waves can be written as: ∂u ∂t =−g ∂η ∂x (4.12) ∂η ∂t =− ∂ ( uh ) ∂x (4.13) where u is speed in the x-direction, t is time, g is acceleration due to gravity, η is sea-level elevation, and h is total water depth. The f rst equation is an expression of Newton’s laws of motions and states that a slope in the sea surface operates to change the lateral velocity. The second equation – the vertically integrated form of the continuity equation – relates temporal changes in sea level to convergence/divergence of the depth-integrated lateral f ow. 4.2.5 Analytical Wave Solution Total water depth h can be approximated as constant for a fla seafloo together with wave amplitudes small compared with total water depth. In this case, the wave solution of the above equations is: η(t, x) = η o sin (2π x/λ −2π t/T ) (4.14) u(t, x) = u o sin (2π x/λ −2π t/T ) (4.15) where η o is wave amplitude, λ is wavelength, T is wave period, and the magnitude of u is given by: u o = η o  g h 70 4 Long Waves in a Channel It can also be shown (Cushman-Roisin, 1994) that these waves are governed by the well-known dispersion relation: c = λ T =  gh (4.16) implying that the phase speed of a long surface gravity wave exclusively depends on total water depth. Consequently, it follows that the ratio between horizontal speed of a water parcel and phase speed is very small: u o c = η h << 1 which is justificatio for neglection of the nonlinear terms. For instance, a long wave of 1 m in amplitude in a 100 m deep ocean propagates with a phase speed of about c =30 m/s, while water parcels attain maximum lateral displacement speeds of only u o = 0.3 m/s. Horizontal fl w under a long surface wave is depth-independent and so are hori- zontal gradients of u. On the basis of the local form of the continuity equation, given for our channel by: ∂w ∂z =− ∂u ∂x we can derive the solution for vertical speed of a flui parcel as a function of depth: w(t, x, z ∗ ) =−2π u o z ∗ /λ cos (2π x/λ −2π t/T ) where z ∗ is (positive) distance from the seafloo . Vertical speed vanishes at the plane seafloo (per definition and approaches an oscillating maximum at the sea surface. The ratio between vertical and horizontal speeds of water parcels is 2π h/λ.This ratio is small compared with unity for shallow-water waves (λ>>h). Accordingly, motions of water parcels in a shallow-water wave are largely horizontal. Another important feature inherent with long waves is that they reach the seafloo and are capable of stirring up sediment from the seafloo , if energetic enough. Figure 4.4 shows a snapshot of the analytical solution of a shallow-water wave. 4.2.6 Animation Script A SciLab script, called “AnalWaveSol.sce”, can be found in the folder “Miscel- laneous/Waves” on the CD-ROM accompanying this book. This script creates an animation of the analytical wave solution. 4.2 Long Surface Gravity Waves 71 Fig. 4.4 Snapshot of a shallow-water wave of 1 m in amplitude and 500 m in wavelength in a 20 m deep ocean. Shown are sea-level elevation and vertical displacements of flui parcels at selected depths 4.2.7 Numerical Grid We use a spatial grid of constant grid spacing in which velocity grid points are located halfway between adjacent sea-level grid points (Fig. 4.5). Fig. 4.5 The staggered grid. The cell index k refers to a certain grid cell. Water depth is calculated at sea-level grid points 4.2.8 Finite-Difference Scheme On the basis of the staggered grid (see Fig. 4.5), the momentum equation (4.12) can be written in finite-di ference form as: u n+1 k = u n k −Δtg  η n k+1 −η n k  /Δx (4.17) where n is time level, k is grid index, Δt is time step, and Δx is grid spacing. A control volume (Fig. 4.6) is used to discretise equation (4.3). Accordingly, we can write this equation as: η ∗ k = η n k −Δt  u n+1 k h e −u n+1 k−1 h w  /Δx (4.18) 72 4 Long Waves in a Channel Fig. 4.6 The control-volume approach. A control volume of length Δx is centred around a water- depth grid point h k . Temporal sea-level changes are computed from volume flu es through the left and right-hand faces of the control volume using the upstream approach where h w and h e , respectively, are the layer thicknesses at the western and eastern faces of the control volume. Input to this equation are prognostic values of u calcu- lated a step earlier from (4.17). The fina prediction for η will be slightly smoothed by applying a f lter (see below) to η ∗ . Here, the choices for h w and h e are made dependent of the f ow direction at the respected face in an upstream sense. For example, we take h w = h n k−1 for u n+1 k−1 > 0, but h w = h n k for u n+1 k−1 < 0. This can be elegantly formulated by means of: η ∗ k = η n k −Δt/Δx  u + k h n k +u − k h n k+1 −u + k−1 h n k−1 −u − k−1 h n k  (4.19) where u + k = 0.5  u n+1 k +   u n+1 k    and u − k = 0.5  u n+1 k −   u n+1 k    This control-volume approach is numerically diffusive, but conserves volume of the water column. 4.2.9 Stability Criterion The stability criterion for the above equations, known as Courant-Friedrichs-Lewy condition or CFL condition (Courant et al., 1928), is: λ = Δt Δx  gh max ≤ 1 (4.20) where h max is the maximum water depth encountered in the model domain. In other words, the time step is limited by: Δt ≤ Δx √ gh max which can be a problem for deep-ocean applications if a fin lateral grid spacing is required. 4.2 Long Surface Gravity Waves 73 4.2.10 First-Order Shapiro Filter As will be shown below, the finite-di ference equation presented above are subject to oscillations developing on wavelengths of 2Δx. Some of these oscillations might represent true physics, others might be artificia numerical waves. To remove these small-scale oscillations, the following first-orde Shapiro filte (Shapiro, 1970) can be used: η n+1 k = (1 −)η ∗ k +0.5(η ∗ k−1 +η ∗ k+1 ) (4.21) where η ∗ k are predicted from (4.19) and  is a smoothing parameter. This method removes curvatures in distributions to a certain degree. The smoothing parameter in this scheme should be chosen as small as possible. 4.2.11 Land and Coastlines Land grid points are realised by requesting absence of fl w on land. In addition to this, no f ow is allowed across coastlines unless a special floodin algorithm is implemented (see Sect. 4.4). The layer thickness h can be used as a control as to whether grid cells are “dry” or “wet” . Then, we can set u k to zero in grid cells where h k ≤ 0. Owing to the staggered nature of the grid (see Fig. 4.5), coastlines require the additional condition that u k has to be zero if h k+1 ≤ 0. 4.2.12 Lateral Boundary Conditions The model domain is define such that the prediction ranges from k =1tok = nx. Values have to be allocated to the f rst and last grid cells of the model domain; that is, to k = 0 and k = nx+1 (Fig. 4.7). One option is to treat these boundaries as closed. Advective lateral flu es of any property are eliminated via the statements: u n 0 = 0 u n nx = 0 Fig. 4.7 The boundary grid cells of the model domain used for implementation of lateral boundary conditions [...]... functions, FORTRAN codes can attain a much clearer structure 4.2.14 Structure of the Following FORTRAN Codes FORTRAN codes of the following exercises consist of three files a main code, one module for declarations and another module comprising subroutines (Fig 4.8) Compiling a FORTRAN code that contains modules consists of two steps The modules are compiled f rst with: g 95 -c file2.f9 f le3.f 95 Then,... Channel Fig 4.10 Exercise 5 Scenario 1 Model output after 24 s of simulation for the right half of the channel for = 0 The top panel shows sea-level elevation (m), the middle panel horizontal velocity (m/s), and the bottom panel velocity vectors (stickplots) Stickplots are strongly deformed owing to the axis ratio chosen Fig 4.11 Exercise 5 Scenario 1 Same as Fig 4.9, but with = 0. 05 4.4 Exercise 6: The... code via: g 95 -o run.exe file1.f9 f le2.o f le3.o The code can then be executed by entering “run.exe” in the Command Prompt window 76 4 Long Waves in a Channel Fig 4.8 Structure of the FORTRAN code for the following exercises 4.3 Exercise 5: Long Waves in a Channel 4.3.1 Aim The aim of this exercise is to simulate the progression of shallow-water surface gravity waves in a channel of uniform water... ground (Fig 4. 15) All this takes 82 4 Long Waves in a Channel place well above sea level! The plume dynamics are influence by the steepness of the hill, which the reader can easily verify Fig 4. 15 Exercise 6 Scenario 2 Snapshots of sea-level elevation after 60, 90, 120 and 180 s of simulation 4 .5 The Multi-Layer Shallow-Water Model 4 .5. 1 Basics Under the shallow-water assumption, we can formulate a dynamical... = C1 n n Cnx+1 = Cnx Some applications justify the use of so-called cyclic boundary conditions that for a property C read: n C0 n Cnx+1 n = Cnx n = C1 Here, both ends of the model domain are connected to form a channel of infinit length 4.2.13 Modular FORTRAN Scripting It makes sense to split longer FORTRAN codes into several f les containing different parts of the code containing the main code and... Sample Code and Animation Script FORTRAN simulation codes and Scilab animation scripts for both scenarios can be found in the folder “Exercise 6” of the CD-ROM Several changes of the FORTRAN code for Exercise 5 are required for implementation of the floodin algorithm The fil “info.txt” outlines these changes 4.4 Exercise 6: The Flooding Algorithm 81 Fig 4.14 Exercise 6 Scenario 1 Snapshots of sea-level... explored for different values of the parameter in the Shapiro filte The choice of = 0 switches off this f lter The time step is set to Δt = 0.1 s, which satisfie the CFL stability criterion 4.4 Exercise 6: The Flooding Algorithm 77 Fig 4.9 Two different scenarios considered in Exercise 5 4.3.3 Sample Code and Animation Script The folder “Exercise 5 on the CD-ROM contains the computer codes for this... cells This calculation is performed whenever the pressure-gradient force is directed toward the dry cell Otherwise, velocity at this grid point is kept at zero value With a nonzero infl w, the water level in the dry cell will rise and this cells eventually turns into a wet grid cell once the layer thickness exceeds h min 4.4.4 Flooding of Sloping Beaches The pressure-gradient force is evaluated from the... shallower water This happens in a similar fashion for wind waves approaching a beach Secondly, only a fraction of water passes the island creating a smaller tsunami in the lee of the island A fraction of water is blocked by the island and becomes reflecte to form a tsunami propagating into the opposite direction In the end, the island is void of water again, except for a thin inactive layer of thickness h min... hillside Zero-gradient conditions are imposed for all variables at lateral boundaries Will the model be able to cope with this task? After passage of the plume, will there be water left over in the depression? Fig 4.13 Exercise 6 Ultimate crash tests of the f ooding algorithm 4.4.6 Sample Code and Animation Script FORTRAN simulation codes and Scilab animation scripts for both scenarios can be found in the . ·2 ·3 ∂ 3 f ∂x 3 +··· (4.3) J. K ¨ ampf, Ocean Modelling for Beginners, DOI 10.1007/978-3-642-00820-7 4, C  Springer-Verlag Berlin Heidelberg 2009 65 66 4 Long Waves in a Channel On the basis. Script FORTRAN simulation codes and Scilab animation scripts for both scenarios can be found in the folder “Exercise 6” of the CD-ROM. Several changes of the FORTRAN code for Exercise 5 are required. the respected face in an upstream sense. For example, we take h w = h n k−1 for u n+1 k−1 > 0, but h w = h n k for u n+1 k−1 < 0. This can be elegantly formulated by means of: η ∗ k = η n k −Δt/Δx  u + k h n k +u − k h n k+1 −u + k−1 h n k−1 −u − k−1 h n k  (4.19) where u + k =

Ngày đăng: 07/08/2014, 04:20

TỪ KHÓA LIÊN QUAN