Coastal Engineering - EXERCISE - 2 - 2020
Coastal Engineering - EXERCISE - 2 - 2020
Exercise title: EXERCISE 2 – Working with the wave propagation model, MILDwave
- Make groups of two students and always use your group number as a name extension for any
directories, figures, Matlab-scripts, texts, MILDwave-runs, etc., produced by your group.
- Each group will generate a short report. Make a cover page, using the course title, the lecturer’s
names, the exercise title (see above), your names and your group number.
- A zipped file has to be uploaded on Ufora via the “MILDwave” assignment. This file must contain:
- Use clear chapters in your report, using the same titles given below for the Exercise Parts (A-D). For
answering the questions in each Exercise Part use the ‘question’ number: e.g. ‘QA-1: […]’
- All figures (including Print Screens) in your report, should be accompanied (i) by a short figure
description in the text and (ii) a figure caption (below the figure). All figures should be numbered in
their captions, using the letter of the Exercise Part (e.g. A) they belong to, and starting always at
number 1 for each of the Exercise Parts (A-E). Example: Figure A-1; Figure A-2; Figure B-1; Figure B-2.
- Do not use “-“ or “.” in the names of Matlab-scripts or any files used by Matlab. You may use “_”,
instead.
- BEFORE YOU START running any simulations you need to change the symbol for decimals on your
computer. Go to “Control panel”(Configuratiescherm)”Region and Language”(Land en
Taal)”Formats””Additional Settings”(Meer instellingen). Change “Decimal symbol” from “,” to “.”,
and “Digit grouping symbol” from “.” To “,”.
- Questions on Exercise 2 and the reporting will be dealt during the exercises by the present lecturers.
1
EXERCISE PARTS A-E
INTRODUCTION:
Post-processing of MILDwave results using MATLAB.
1. Go to ‘Ufora’ and download the directory of the tutorial with the MATLAB scripts, for generating
figures from MILDwave results: Postprocessing_MILDwave_calculations.
2. If you use your own laptop and you do not have MATLAB installed: go to ‘Athena’ and open
MATLAB.
3. Copy the MATLAB-scripts named ‘create_MW_data.m’, ‘plot_MW_data.m’ and ‘plot_WG_data’
in the folder you will be working with MILDwave in your local hard drive.
4. Change the Matlab directory to the folder where you copied the Matlab scripts. Open the
‘create_MW_data.m’ script and go through the script and especially the comments. Take your
time to make sure that you understand everything! Do the same with the ‘plot_MW_data’ and
‘plot_WG_data’ scripts.
5. Each time you run each script a window will prompt to choose the folder you want to post-
process.
! When you generate figures using Matlab do not forget to rename the ‘jpg-files’ you have generated
by adding your Group number in the ‘jpg’ name which is found in the Matlab-script.
Exercise based on the ZEEBRUGGE test case for regular and irregular waves
Wave characteristics
Wave Height (m) Wave Period (s) Wave angle(°) Water Depth
Case A1 1.0 9.0 0.0 19.5
1. Go to ‘Ufora’ and download the files for the Zeebrugge test case, for irregular and regular waves
(two directories). Make copies of the two directories on your local hard drive and rename them,
so that it is clear that they will contain results for an empty wave basin (e.g. ‘MILDwave_irr-
waves_short_dt=XXs_time_XXs_empty_wave_basin_GROUP-XX’).
2. Using the given grid and wave characteristics, calculate the disturbance coefficients, Kd, for
regular and irregular waves.
To perform the numerical simulations, you need to first open (i) MILDwave (MW_GUI_4.1.exe).
Then choose “Use Existing Project” (ii) and open the corresponding “MILDwave.xml” file inside
the given regular and irregular waves folder. Afterwards, click on “Change Settings”(iii) to open
the simulation settings window and check the input parameters for the two simulations.
For running the simulation first create the output directories (check that the “data” folder has
been created), then allocate the memory and finally start the calculation. Take some time to
observe the propagating waves through the “Show 2D graph” option of the MILDwave
Calculator, however this will increase the simulation time.
QA-1: Make the two (for regular and irregular waves) Kd-contour plots (using the ‘Kd.dat’-files) using
the ‘create_MW_data.m’ and ‘plot_MW_data.m’ MATLAB-scripts. Make the two Kd cross-section plots
(using the ‘Kd.dat’-files) at position y = 3260 m and at position x = 2800 m. Which changes do you need
2
to make in the MATLAB-scripts for the case of (i) regular waves and (ii) for irregular waves? Report
shortly (also with figures).
QA-2: What do you observe in the kd results (min-max values, etc) ? Report.
QA-3: Make the five (for regular and irregular waves) surface elevation “η(t)” plots for the 5 WG shown
in Figure A -3. What do you observe in the different locations? Report shortly (also with figures).
Figure A-3. Location of the WG in the MILDwave numerical basin for Section A. Dark blue represents
the sponge layers while teal blue represents water.
QA-4: Re-run the simulations changing the time interval for calculating “η(t)” in order that the incident
waves are fully propagated in the numerical basin. To do that go to “Change Settings (iv)” and click on
the Tab “Output” and define the new initial and final time. Be careful with the values you choose as it
has to a multiple of “dt”. Report shortly (also with figures).
B. Simulation of the given test cases for a slopping bathymetry with a wave angle of 30 °.
Wave characteristics
Wave Height (m) Wave Period (s) Wave angle(°) Water Depth
Case B1 1.0 9.0 30.0 Varying
1. Go to the runs for the Zeebrugge test case, for regular waves, which you have downloaded in
Exercise Part A. Make copies of the directory on your local hard drive and rename them using your
group number.
2. Calculate the disturbance coefficient Kd for regular waves in an empty basin with a slopping
bathymetry and an incident angle of 30°. To change the wave angle go to the “Wave” tab and
change the “Angle of wave propagation to 30°”. To introduce the slopping bathymetry layout in
the domain: First click on “Change Setting” (iv) in order to open the simulation settings window.
Then click on “Bathymetry” tab. Afterwards, click on “Bathymetry from text file” and select the
“slope.txt” that is included in the folder. Then click save to generate the new xml file containing
the new incident wave angle and bathymetry.
3. Calculate the surface elevation at 5 relevant points of the domain using the new time defined
in QA-4. To change the WG locations modify the “Pos_WG.xml” file using “Notepad++” indicating
3
the new grid points for the location of each WG (be careful as the grid size is different for regular
and irregular waves).
QB-1: What are the wave transformation phenomena present in this test case. Use a snapshot of
the fully developed sea state to justify your answer (using the View Graph option in the MILDwave
GUI).
QB-2: How is the wave phenomena observed affecting the wave height and the Kd values. Justify
your answers providing relevant cross-sections of the Kd and surface elevation plots obtained with
the numerical WG.
C. Simulation of the Zeebrugge test case (introducing harbor layout)for H = 1.0 m and H = 2.0 m .
Wave characteristics
Wave Height (m) Wave Period (s) Wave angle(°) Water Depth
Case C1 1.0 9.0 0.0 19.5
Case C2 2.0 9.0 0.0 19.5
1. Go to the short runs for the Zeebrugge test case, for irregular and regular waves (two
directories), which you have downloaded in Exercise Part A. Make copies of the two directories
on your local hard drive and rename them, so that it is clear that they will contain your results
for the short Zeebrugge runs, e.g. “MILDwave_Zeebrugge_irr-
waves_short_dt=0.XXs_time_XXs_GROUP-XX”.
2. Calculate the disturbance coefficients, Kd, for regular and irregular waves in the harbor of
Zeebrugge using a wave height of H = 1.0 m and H = 2.0 m. To introduce the harbor layout in
the domain. First click on “Change Settings” (iv) in order to open the simulation settings
window. Load your bitmap file for the geometry of the harbor (vi). Check the “Cell type editor”
and press “Ok”. To implement the harbor in the domain click on “Create obstacles from
bitmap” (vii). Check that the harbor has been correctly loaded with “View Simulation Domain”
and “Save”.
3. Calculate the surface elevation at 5 relevant points of the domain using the new time defined
in QA-4. To change the WG locations modify the “Pos_WG.xml” file using “Notepad++”
indicating the new grid points for the location of each WG (be careful as the grid size is different
for regular and irregular waves).
QC-1: For H = 1.0 m using the ‘Kd.dat’-files, make (i) the two kd-contour plots and (ii) the four kd cross-
section plots (2 at position y = 3260 m and 2 at position x = 2800 m), using the ‘create_MW_data.m’
and ‘plot_MW_data.m’ MATLAB-script. This time you can use the Matlab-scripts you saved in QA-1
(you only need to change the path directories in the scripts). Report your results (also with figures).
Repeat the same for H = 2.0 m. What do you observe in the Kd-results for the different wave heights?
QC-2: Using ‘create_WG_data.m’ MATLAB-script plot the surface elevation for the 5 WG in regular and
irregular waves for H = 1.0m and H = 2.0 m. Report your results (also with figures).
4
D. Simulation of the test cases for Zeebrugge for a different incident wave angle.
Wave characteristics
Wave Height (m) Wave Period (s) Wave angle(°) Water Depth
Case D1 1.0 9.0 30.0 19.5
Case D2 1.0 9.0 - 30.0 19.5
1. Go to the short runs for the Zeebrugge test case, for irregular waves, which you have
downloaded in Exercise Part C. Make copies of the directories on your local hard drive and
rename them, so that it is clear that they will contain your results for the simulations with
different wave angle, e.g. “MILDwave_Zeebrugge_irr-waves_short_dt=0.21s_500s_ANGLE-
A_GROUP-XX”.
2. Calculate the disturbance coefficients, Kd, for irregular waves in the harbor of Zeebrugge for
cases D1 and D2.
QD-1: Using the ‘Kd.dat’-files, make the Kd-contour plot for each test case. Report your results (also
with figures).
QD-2: Using the ‘Kd.dat’-files for D1 and D2 test cases, make two contour plots of the Kd percentage
differences with the irregular wave results of part C test case C1 (H = 1.0 m).
-For producing the “percentage difference plots” you need to modify the provided Matlab scripts:
‘create_MW_data.m’ and ‘plot_MW_data.m’ to load two ‘Kd.dat” files (Remember to change the
name of the Matlab variables that you are loading).
-You will be asked to calculate the kd percentage differences, using Equation D-1:
QD-3: What do you observe in the difference contour plots? What do negative or positive difference
percentages mean?
QD-4: Make a table (Table D-1) in which you report an estimation of the percentage differences you
find for each of the output points 1-14 indicated in Figure D-1 (do not forget to comment on the sign
of the calculated percentage differences). In this way you get an idea of how the different incident
wave angles affect the kd values (and therefore the wave heights) inside the harbor. You can use the
‘Data Cursor’ of Matlab shown in the toolbar of a figure to visualize the value of kd at a certain location
on a contour plot.
5
Figure D-1. Output points 1-14 for QD-4.