Basics for model setup¶
In the directory /simple_cases/surface_wave_1d/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
Setup in “input.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 = 2 PY = 1Set the bathymetry to match the figure above:
!-----DEPTH----- DEPTH_TYPE = SLOPE DEPTH_FLAT = 10.0 SLP = 0.05 Xslp = 800.0(refer to Grid and Computational Time for parameter descriptions)
Send the results to a folder named “output”:
!-----PRINT----- RESULT_FOLDER = output/Set the dimensions of the domain to 1024 x 3 (need at least 3 points in the y-direction):
!------DIMENSION---- Mglob = 1024 Nglob = 3Set the total computational time, plot time, and screen intervals to 200.0 s, 10.0 s, and 10.0 s, respectively:
!-----TIME----- TOTAL_TIME = 200.0 PLOT_INTV = 10.0 SCREEN_INTV = 10.0Set the grid spacing in x and y to 1.0 m:
!------GRID----- DX = 1.0 DY = 1.0Wavemaker
Wavemaker parameters will be defined on the respective Regular wave, JONSWAP spectral waves, and Solitary wave pages.
Set the periodic boundary conditions to FALSE:
!-----PERIODIC BOUNDARY CONDITION----- PERIODIC = FSet the sponge layer width to 180.0 m on the left boundary:
!-----SPONGE LAYER----- DIFFUSION_SPONGE = F FRICTION_SPONGE = T DIRECT_SPONGE = T Csp = 0.0 CDsponge = 1.0 Sponge_west_width = 180.0 ! this line 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, BREAKING,
andWAVE AVERAGE
sections. Refer to DEFINITIONS OF PARAMETERS for a description of all parameters.Set the
ETA
andMASK
output files to TRUE:!-----OUTPUT----- ETA = T MASK = T
Postprocessing
For postprocessing examples, MATLAB and Python scripts are located in /simple_cases/surface_wave_1d/postprocessing/
.