Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Generate a MATLAB code to answer the following 1. For a linear progressive wave

ID: 3676102 • Letter: G

Question

Generate a MATLAB code to answer the following

1. For a linear progressive wave of period T = 8s :

a) Calculate and plot the trajectories of water particles, for 4 intermediate depths z from bottom to surface (i.e., h to 0), in water of total depth h = 70 m, 20 m and 2 m.

b) For the same cases (T, h), calculate and plot the variation of the maximum hydrodynamic pressure pD and the horizontal velocity of water particles u, as a function of depth z. Assume a relevant value of water density and wave height or use meaningful non-dimensional parameters

Explanation / Answer

a) See the code below: Change the value of h to generate plots for other depth values.

------------------------------------------------------------

h=70; %in meters
s=0; %represents surface
num_depths=4; %number of intermediate depths
interval=h/num_depths; %depth interval
T=8 %Time period in seconds
g=9.8; %gravitational acceleration. in m/s/s
c=sqrt(g*h) %speed of water particles
time_taken=h/c;
disp(time_taken);
x=linspace(0,time_taken,4); %time axis
y=-h:interval:s; %depth axis
figure;
plot(x,y);

------------------------------------------------------------------

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote