Shallow Water wave phase speed.
조회 수: 6 (최근 30일)
이전 댓글 표시
- I am working on a school assignment for a Tides and Water levels class and there is a question that says to make plots of the following:
- Shallow water wave phase speed (m/s) for water depths from 1 m to 4000 m. Label the axes.
- Minimum wavelength to be considered as shallow water waves for the same depth range ( 1 to 4000 meters).
- I believe I have the first part figured out but am unsure on the second. This is what I have so far:
clear;
clf;
clc;
% Constants
g = 9.81; % gravitational acceleration in m/s^2
d =1:4000 ; % water depth in meters
% Shallow water wave phase speed
c = sqrt(g*d)
%%
plot (c,d);
grid on
ylim([1, 4000]);
xlim([0,200]);
xlabel ('m/s^2')
ylabel('Depth')
title('Shallow Water Wave Phase Speed')
%%
L = g*T^2/2/pi %deep water
L = T*sqrt(gd)%shallow water
댓글 수: 2
답변 (1개)
Gabriel Ruiz-Martinez
2021년 9월 10일
@Jeremiah Thomas, a solution could be this:
% Wave period (s)
T = 2:15;
% Water depths vector (m)
d = 1:4000;
% Gravitational acceleration constant (ms^-2)
g = 9.81;
% Shallow water wave phase speed $ c = sqrt{gh} $
% (ms^-1)
c = sqrt(g.*d);
% Plotting
figure;
plot(d,c,'Color','red');
ax = gca;
ax.XLim = [1 4000];
ax.YLim = [0 200];
ax.XLabel.String = 'Water depth (m)';
ax.YLabel.String = 'Wave speed (ms^-1)';
% Solving dispersion equation, using Lo aproximation **********
for i = 1 : length(T)
for j = 1 : length(d)
Lo = (g*T(i)^2)/(2*pi);
L(j) = Lo*(tanh(((2*pi)*((sqrt(d(j)/g))/T(i)))^(3/2)))^(2/3);
end
end
ld = d./L;
ldq = find(ld <= 0.04);
fprintf('Minimum wavelength to be considered as shallow waters: %5.3f m \r\n',min(L(ldq)));
I hope this script can be useful!.
Regards.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Oceanography and Hydrology에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!