Bed, buildings and initial state

Plane bed

Without flume.bed.file the bed is a plane through the elevation \(z_0\) (flume.bed.elevation) at the lower corner \((x_0, y_0)\) of the domain, with slopes \(s_x\), \(s_y\) (flume.bed.slope):

\[z_b(x, y) = z_0 + s_x\,(x - x_0) + s_y\,(y - y_0) ,\]

evaluated at the cell centres. Two options for test cases change it:

  • Bowl (flume.bed.bowl_depth \(h_0\), flume.bed.bowl_radius \(a\)): with \(r\) the distance from the centre of the domain, the bed moves by \(-h_0\,(1 - r^2/a^2)\). A negative \(h_0\) makes a mound.

  • Rough bed (flume.bed.noise \(A\)): the bed of cell \((i, j)\) moves by \(A\,r_{ij}\), with \(r_{ij}\) a fixed pseudo-random number in \([-1, 1)\) computed from the cell indices. It is the same for any boxes and any number of ranks.

Bed from a raster

flume.bed.file gives the whole bed as an ESRI ASCII grid (Raster files). Let the raster have \(N_x \times N_y\) cells of size \(\delta_x \times \delta_y\), lower left corner \((X_0, Y_0)\) and values \(Z_{ab}\) (column \(a\) from the west, row \(b\) from the south). At a cell centre \((x, y)\) the position in raster cells, clamped to the raster cell centres, is

\[f_x = \min\Bigl(\max\Bigl(\frac{x - X_0}{\delta_x} - \frac{1}{2},\; 0\Bigr),\; N_x - 1\Bigr) ,\]

and \(f_y\) alike. With \(a = \lfloor f_x \rfloor\), \(w_x = f_x - a\), and \(b\), \(w_y\) likewise, the bed is the bilinear interpolant

\[z_b = (1 - w_x)(1 - w_y)\, Z_{a,b} + w_x (1 - w_y)\, Z_{a+1,b} + (1 - w_x)\, w_y\, Z_{a,b+1} + w_x w_y\, Z_{a+1,b+1} .\]

The interpolant is continuous, so a coarse raster on a fine grid leaves no steps in the bed, and it reproduces a plane exactly. Within half a raster cell of the raster’s edges the edge values are held.

Buildings

flume.buildings.file gives each cell the value \(H\) of the raster cell that holds its centre, with no interpolation. Where \(H > 0\) the bed is raised by \(H\), or by flume.buildings.height when the file is a mask. A building is a block of raised bed: the hydrostatic reconstruction (Hydrostatic reconstruction) lets water onto it only when the surface beside it is above its top, and below that its face acts as a wall.

Limitations:

  • No porosity. A building narrower than a cell is lost or widened to a cell.

  • The only force on the water at a building face is the hydrostatic pressure of the cell’s own depth. A wall boundary adds the pressure of the reflected flow; the two agree at rest and differ in moving water.

Initial state

The initial surface is level at \(\eta_0\) (flume.init.surface_elevation) and the water moves with one velocity \((u_0, v_0)\) (flume.init.velocity):

\[h = \max(\eta_0 - z_b,\; 0), \qquad hu = h\,u_0, \qquad hv = h\,v_0 .\]
5 Options

Option

Initial state

Dam

Cells whose centre is at or above flume.init.dam_position along flume.init.dam_direction take flume.init.dam_surface_elevation and, if given, flume.init.dam_velocity.

Tilted and curved surface

\(\eta = \eta_0 + \sigma_x X + \sigma_y Y + \kappa r^2\), with \(X\), \(Y\), \(r\) measured from the centre of the domain (flume.init.surface_slope, flume.init.surface_curvature). With the bowl these give Thacker’s solutions (Verification).

Wave

One sine wave of amplitude \(A\) (flume.init.wave_amplitude) along a periodic direction. With \(s\) the fraction of the domain length, \(H = \eta_0 - z_b\) and \(c = \sqrt{g h}\): \(h = \max(0, H + A \sin 2\pi s)\), \(u = u_0 + 2\,(c - \sqrt{g H})\). Over a flat bed this is a simple wave.