Coastal engineering using Matlab

Question I

A submerged pressure sensor can serve as a wave gauge if it is adequately sensitive to detect the wave induced dynamic pressure. There is a swell wave with the deep-water characteristics (period T0 and wave height H0 measured by an offshore buoy) perpendicularly propagating toward a straight shoreline. At the coast near the shoreline, a pressure sensor is installed as shown in the Figure below.

For the progressive swell wave, the minimum and maximum pressures (Pmin and Pmax at the Sensor are recorded as well. (The density of seawater to be 1026 kg/m3 ). The wave data of 5 storm events have been included in the Table below. Develop a model to estimate the swell wave height at the coast using the measured data and estimate the Shoaling Coefficient for all events. Assume the linear wave theory is valid.

Figure 1

Table 1

(i) Calculate the wave characteristics (i.e. wave height, wave length, wave number, wave celerity) at the coast by solving the Dispersion relation equation numerically using fzero( ) function in MATLAB with relevant linear wave equations;

Develop MATLAB codes to:

To determine the wave characteristics such as wave height, wave length, wave number and wave celerity, the dispersion relation was solved numerically with the fzero() function in matlab. Linear wave equations were substituted into formula to determine the wave characteristics. Fzero is a function handle that uses numerical iteration to determine the zero of a function. This is a built in formula of matlab. I created the function as a zero function and used this handle to solve the wave length close to value of Lo.

To determine Wave number and wave celerity, wave length was calculated with Fenton and Mckee approximation general expression and substituted as Lo and Lf for deep and general wave conditions. Wave number the below formulas were used to input into Matlab:

L: General expression 1

L: Deep water approximation 1

(ii) Calculate the Shoaling Coefficient using the linear wave theory and the recorded data for the 5 events and compare the results for further uncertainty discussion, and generate a figure to show the relationship between the relative water depth and the shoaling coefficient;

(iii) Generate figures to show the surface wave elevations offshore and at the coast of Event 5 for 2 wave periods, and

(iv) Generate figures to present the time series (t varies from 0 to 2T) of the water particle horizontal and vertical velocities at the location of the Sensor for Event 1 (for the discussion of the relationship between the horizontal and vertical velocities). Question II

The aim of this assignment is to determine the procedure and methodology to determine the long shore sediment transport of a coastal section. Longshore drift is the geological process that includes the transportation of sediment, in this example sand. Incoming winds and tidal surges force water to generate a water current that travels parallel to the coast. This current transports particles along the coast resulting in a constantly changing coastline and a need for future sediment deposition formulated.

Calculation of sediment transport is crucial in developing sediment budgets for coastal areas with and without structures as well as long term affects to determine the longevity and reliability of the coastal structure. This calculation and modelling is also needed to determine the most appropriate direction or orientation of groins or structures to maximise or minimise sediment transport.

In the example used for this assignment, Sediment budget formula shown below was used to calculate the sediment budget.

To determine the longshore transport, the following formula was used:

The question evaluated is stated below:

The coast is a 5km stretch oriented in the north-south direction with the ocean to the east. The predominant wave direction is from the east-south-east. At the southern end the typical breaker height is 1.4m and the breaker angle is 10. At the northern end, the breaker height is 1.45m and the breaker angle is 12. The breaker parameter b = 0.8. The beach profiles along the section are similar with slopes near the break point of 1/40. The sand is made of quartz (s = 2.63, p = 0.28) with a median grain size of 0.22mm and measureable seasonal bed level changes are restricted to depths less than 6 metres. The berm height is 3 m AHD.

The Average shore normal sediment transport rates for 1993 – 2015 were applied to the model in excel format and inputed into matlab for calculation purposes.

The aerial photographs of the stretch of the coast from 1993 to 2015 indicate the shoreline location, xs which were saved in the file “shoreline.xlsm”.

%% Question 1

close;

clear;

clc;

rho= 1026

g= 9.81

T0=[25, 15 , 18, 12, 7]

H0=[1.8,1.3,2.2, 1.8, 6.2 ]

Pmin = [82400, 83200 , 80600, 82200,83600]

Pmax = [106700, 96200, 106200,98200, 120600]

h = (Pmax+Pmin)/(2*rho*g)

Lo= g*T0.^2/2/pi

for i=1:length(H0) % 5 rows

f=@(L)L-g*T0(i)^2/2/pi*tanh(2*pi*h(i)/L);

Lf(i)=fzero(f,Lo(i));

end

% wave celerity c=L/T

c = Lf./T0

c0 = Lo ./ T0

%wave number, wave celerity Lf general and Lo for deep

% wave number k = 2pi / L

k = 2*pi./Lf

%H1 from static water equation

%top line of equation = 1 due to cos0 = 1 and z = -h %

%Kp=1/cosh(k*h)

%H1 = (Pmax-Pmin)/(rho*g*Kp)

eta=0.5.*H0;

K=(2*pi)./Lo

H1 = (Pmax-Pmin)./(rho.*g).*(cosh(k.*h))

%Kp cosh (k(z+h) / cosh (kh ) and z = -h as its on the ocean floor

%therefore Kp= 1/cosh(kg )

%wave height pmax – pmin Kp, coeffiecient depends on wave number Ks, Kp,

%wave heigh in shallow water / wave height in deep water is shoaling coefficient

%

%cg1 = general expression of group velocity

for i=1:5

cg1(i) = (0.5).*(1+2.*k(i).*h(i)/(sinh(2*k(i)*h(i)))).*c(i)

end

%cg2 = deep water approx

cg2 = c0./2

ks= sqrt(cg2./cg1)

%relative depth –

rd = h./Lf

% relative water depth. h/Lf

%plot against ks .

plot(rd,ks,’*’)

%wave elevations – use surface profile eqn,

%plot useign surface profile where gamma = angular frewquency * period

%and then model from 0 – 2T

t=0:0.2:14

w=(2*pi)./T0

n=(H1/2)*cos(w*t)

%plot(H1,t,’*’)

%% Question 2

clc;clear;close;

Shoreline=xlsread(‘shoreline(4).xls’) %actual observed data

Xa=Shoreline(:,2);

Sediment=xlsread(‘sediment(4).xls’) %volume taken from area

Qx=Sediment(:,2);

%Input conditions

yn=0; % distance along coast in meters

ys= 5000; % distance along coast south in meters

thetabn= 12; %north breaker angle 12degrees

Hbn= 1.45; %height breaker north meters

thetabs=10; %breaker angle 10degrees

Hbs=1.4; %breaker height is 1.4m

gamab=0.8; %breaker gama

slope=0.025; %slope of surface near break

sspec=2.63; %weight of sand specific

poro=0.28; %porosity

grainsize= 0.22; %average size of sand grain

K=0.77; %sand coeff.

g=9.81; %gravity 9.81m/s/s

t=365*24*3600;

Hcl=6; %depth of closure

BH=3; %height of berm

%Qy North transport

Qyn=-K/(16*(sspec-1)*sqrt(gamab))*sqrt(g)*(Hbn^2.5)*sind(2*thetabn);

%Qy south transport

Qys=-K/(16*(sspec-1)*sqrt(gamab))*sqrt(g)*(Hbs^2.5)*sind(2*thetabs);

Qy=(Qys-Qyn)/(ys-yn)*t; %delta Qy / delta y

%Xs shorline coordinates

Xs(1)=0;

for i=1:length(Qx)-1

Xs(i+1)=Xs(i)+(-Qx(i)+Qy)/((1-poro)*(Hcl+BH)) %m3

end

%Evaluate the accurancy

n=23;

Xs=Xs’ %to get all data onto the same pane

%mean absolute error

err1=sum(abs(Xa-Xs))/n;

fprintf(‘The mean absolute error for the model is %5.3f m.n’,err1)

%Mean absolute percentage error

err2=sum((abs(Xa(2:end)-Xs(2:end)))./Xa(2:end))/(n-1);

fprintf(‘The Mean absolute percentage error for the model is %5.3f. n’,err2)

%root mean square error

err3=sqrt(sum((Xa-Xs).^2)./n);

fprintf(‘The root mean square error for the model is %5.3f m.n’,err3)

subplot(2,1,1);

plot(Xa,’-o’);

title(‘Actual Observed Shoreline Location Data’);

xlabel(‘Time (years)’);

ylabel(‘Shoreline position(m)’);

grid on;

subplot(2,1,2);

plot(Xs,’-o’);

title(‘Calculated Shoreline Location Data’);

xlabel(‘Time (years)’);

ylabel(‘Shoreline position(m)’);

grid on;

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *