Basics for model setup

In the directory /simple_cases/inlet_shoal/input_files/, you will find multiple instances of input files that are specific to different variations of this example, e.g., regular (“input_reg.txt) versus irregular (“input_irr.txt”) wavemaker configuration. It should be noted that the model will accept only the file named “input.txt”. Therefore, if you want to switch wavemaker cases, you will need to modify the primary “input.txt” file.

Computational domain

alternate text

Setup in “intput.txt”

See an example of a complete “input.txt” here.

For this example, you will set the following in “input.txt”. Remember that all parameters are case sensitive.

If running in parallel, set the number of processors in X and Y:

!-----PARALLEL INFO-----
 PX = 8
 PY = 16

Set the bathymetry to match the figure above using the depth file provided in /simple_cases/inlet_shoal/bathy:

 DEPTH_FILE = ../bathy/dep_shoal_inlet.txt

Refer to Grid and Computational Time for parameter definitions. For optional bathymetry correction, review Bathymetry Correction.

Send the results to a folder named “output”:

 RESULT_FOLDER = output/

Set the dimensions of the domain to 512 X 1024 (x and y directions, respectively):

 Mglob = 512
 Nglob = 1024

Set the total computational time, plot time, and screen interval to 1200.0 s, 30.0 s, and 30.0 s, respectively. If printing to a station file, set the print time to 0.5 s:

 TOTAL_TIME = 1200.0
 PLOT_INTV = 30.0

Set the grid spacing in x and y to 2.0 m:

 DX = 2.0 m
 DY = 2.0 m


Wavemaker parameters will be defined on the respective case pages: Regular wave (baseline case), Regular wave 30 deg oblique incidence, Irregular wave, Irregular waves with 30 deg oblique incidence, 30 deg irregular waves and an obstacle, 30 deg irregular waves, a submerged/emerged breakwater, and 30 deg irregular waves, a submerged breakwater with partial reflection.

Set the periodic boundary condition to TRUE:


(refer to Periodic Boundary Condition for an example)

Set the sponge layer width to 180 m on the left boundary:

!-----SPONGE LAYER-----
 Csp = 0.0
 CDsponge = 1.0
 Sponge_west_width = 180.0
 Sponge_east_width = 0.0
 Sponge_south_width = 0.0
 Sponge_north_width = 0.0

(refer to Sponge Layers for example of 2D sponge case)

Keep the default values for the PHYSICS, NUMERICS, WET-DRY, and BREAKING sections. Refer to DEFINITIONS OF PARAMETERS for a description of all parameters.

Set the wave average properties as follows:

!-----WAVE AVERAGE-----
 T_INTV_mean = 240.0
 STEADY_TIME = 480.0

Set the following output files to TRUE:

 ETA = T
 WaveHeight = T

(refer to Output for parameter definitions)

Several “input.txt” files are located in the folder /simple_cases/inlet_shoal/input_files/ for different cases. When running on of the cases listed below, copy the wavemaker parameters from the respective file to the primary “input.txt” file:

  • Case 1: monochromatic wave, normal incidence – “input_reg.txt”

  • Case 2: monochromatic wave, 30-degree incidence – “input_reg_30deg.txt”

  • Case 3: irregular waves, peak direction - 0.0 – “input_irr.txt”

  • Case 4: irregular waves, peak direction - 30.0 – “input_irr_30deg.txt”

  • Case 5: irregular waves, peak direction - 30.0, plus an obstacle (breakwater) – “input_irr_30deg_obs.txt”

  • Case 6: irregular waves, peak direction - 30.0, plus submerged breakwater with partial reflection (full reflection if removing breakwater file (brk_shoal_inlet.txt) in the input file) – “input_irr_30deg_brkwtr.txt”

Similarly, additional bathymetry files are provided in the folder /simple_cases/inlet_shoal/bathy/ to represent each case above.

  • dep_shoal_inlet.txt – basic bathymetry

  • dep_shoal_inlet_brk.txt – bathymetry with a breakwater geometry

  • brk_shoal_inlet.txt – same format as bathymetry file but only contains breakwater width info

  • obs_shoal_inlet.txt – same format as bathymetry file but only contains 0 or 1, with 0 indicating an obstacle point


For postprocessing examples, MATLAB and Python scripts are located in /simple_cases/inlet_shoal/postprocessing/.