Appendix E
Utility Programs
GEN_DAMP
GEN_DAMP generates a damping file given the location of the damping
layers (north, south, east, or west boundaries of the grid), the width of the
damping layer, and the nondimensional damping strength at the end of the
damping layer, w. The damping values are initially set to zero over the entire
grid. The program then calculates the spatial variation of the damping values over
the width of the damping layers using a quadratic function, e.g.,
2
x - x0
nd ( x, y) =
w
xw - x0
where x0 and xw are the coordinates of the beginning and end of the damping
layer. The program is run interactively from an MS-DOS command prompt
window. An example is as follows:
C:\bouss2d\bin\gen_damp
bathy # name of input bathymetry file (.grd)
damp
# name of output damping file (.grd)
0
# width of damping layer - North (m) [0.0]
0
# non-dimensional damping strength (0-1) [0.0]
100
# width of damping layer - East (m) [0.0]
1
# non-dimensional damping strength (0-1) [0.0]
0
# width of damping layer - South (m) [0.0]
0
# non-dimensional damping strength (0-1) [0.0]
0
# width of damping layer - West (m) [0.0]
0
# non-dimensional damping strength (0-1) [0.0]
To effectively damp out waves at open boundaries, a damping layer half a wave-
length wide with a damping strength of 1.0 should be used. The damping file is
written out as an ASCII file in the grid file format described in Appendix D.
MAP_POROSITY
MAP_POROSITY creates a porosity grid file given the boundaries of porous
regions within the computational domain as a set of discrete (x,y) points. The
E1
Appendix E Utility Programs