当前位置:网站首页>[wave modeling 1] theoretical analysis and MATLAB simulation of wave modeling
[wave modeling 1] theoretical analysis and MATLAB simulation of wave modeling
2022-07-05 00:53:00 【FPGA and MATLAB】
1. Software version
matlab2017b
2. System principle
The design of ocean wave modeling mainly involves the determination of ocean wave model , Calculation of various parameters of ocean waves , This system ,
The wave model is as follows :
![]()
In reality , There are many kinds of wave models , This model is used here , Mainly because the effect of this model is the closest to the effect on the website you give .

G Is the acceleration of gravity , Take the constant 9.8
3. Core source code
global Winds; % The wind speed
global g; % Acceleration of gravity
global kk; % The size ratio between the sand table of the simulation model and the actual area
global Xmax;
global Ymax;
global Dxy;
global flag;
global VX;
global VY;
global VZ;
flag = 0;
g = 9.8; % Acceleration of gravity
kk = 1/40; % The size ratio between the sand table of the simulation model and the actual area
% Interval of simulation
Dxy = 4;
% The sea area covered by the simulation
Xmax = 1000;
Ymax = 1000;
Start = 200;
x = [Start:Dxy:Xmax];
Ymax2 = round(Ymax/2);
y = [Start:Dxy:Ymax2];
[xo,yo]= meshgrid(x,y);
z2 = zeros(size(x));
% The wave height of the wave itself
r = (3.5325*Winds^2.5)/1000;
% The wave length of the wave itself
k = 2*g/(3*Winds^2);
L = 2*pi/k;
% cycle T
T = sqrt(2*pi*L/g);
% Wave frequency
w = sqrt(2/3)*g/T;
t = 0;
while(flag == 0)
disp('the wind speed is');Winds
t = t + 1;
for i = 1:(Ymax2-Start)/Dxy+1
for j = 1:(Xmax-Start)/Dxy+1
% Attenuation coefficient
d = sqrt((xo(1,j)-0)^2 + (yo(1,j)-0)^2);
alphas = exp(-0.07*d) - 0.18;
z2(i,j) = alphas*r*cos(k*sqrt((xo(1,j)-0)^2 + (yo(1,j)-0)^2) - w*t);
end
end
% Show local effects
axes(handles.axes1);
surfl(xo,yo,z2);
axis([Start-50 Xmax+50 Start-50 Ymax2+50 -8 10]);
shading interp;
colormap([143/255,157/255,203/255]);
alpha(0.75);
lightangle(-30,90);
view([VX,VY,VZ]);
pause(0.1);
% The wave length of the wave itself
k = 2*g/(3*Winds^2);
Ls = 2*pi/k;
set(handles.edit1,'String',num2str(Ls));
% Calculate the parameter index of the wave
% The wave height of the wave itself
rs = (3.5325*Winds^2.5)/1000;
set(handles.edit3,'String',num2str(rs));
% cycle T
T = sqrt(2*pi*L/g);
% Speed
c = g*T/(2*pi);
set(handles.edit4,'String',num2str(c));
% Wave frequency
w = sqrt(2/3)*g/T;
set(handles.edit5,'String',num2str(w/2/pi));
end4. test result

The simulation operation is shown in the above figure ,
First click on START Start simulating the effect of waves , And then click stop Can pause .
Upper figure 3 The tag is the corresponding button on the website to adjust the wind speed .
4 All parameters of the wave are displayed . See the theoretical introduction on the previous page for the calculation of specific parameters
5 Here is 3D Display of effect , You can observe the waves from different angles (MATLAB in GUI Of AXIS It is impossible to rotate the mouse directly for 3D display , So you need to display through this function )
A19-06
边栏推荐
- P4281 [ahoi2008] emergency assembly / gathering (LCA)
- Maximum number of "balloons"
- [STM32] (I) overview and GPIO introduction
- leetcode494,474
- Paper notes multi UAV collaborative monolithic slam
- [Yocto RM]10 - Images
- 兩個數相互替換
- 潘多拉 IOT 开发板学习(RT-Thread)—— 实验4 蜂鸣器+马达实验【按键外部中断】(学习笔记)
- Huawei employs millions of data governance experts! The 100 billion market behind it deserves attention
- 测试部新来了个00后卷王,上了年纪的我真的干不过了,已经...
猜你喜欢

leetcode518,377

【海浪建模3】三维随机真实海浪建模以及海浪发电机建模matlab仿真

Applet live + e-commerce, if you want to be a new retail e-commerce, use it!

“薪資倒掛”、“畢業生平替” 這些現象說明測試行業已經...
![Pandora IOT development board learning (RT thread) - Experiment 4 buzzer + motor experiment [key external interrupt] (learning notes)](/img/ad/5fbf8c3f71ea204bcd48473c3811f6.png)
Pandora IOT development board learning (RT thread) - Experiment 4 buzzer + motor experiment [key external interrupt] (learning notes)

Les phénomènes de « salaire inversé » et de « remplacement des diplômés » indiquent que l'industrie des tests a...

There is a new Post-00 exam king in the testing department. I really can't do it in my old age. I have

URL和URI
![[selenium automation] common notes](/img/d3/6699792e85b5ee5a2d6192f4e4d07c.png)
[selenium automation] common notes

那些一门心思研究自动化测试的人,最后都怎样了?
随机推荐
【海浪建模2】三维海浪建模以及海浪发电机建模matlab仿真
(script) one click deployment of any version of redis - the way to build a dream
The difference between string STR and new string
Maximum number of "balloons"
Huawei employs millions of data governance experts! The 100 billion market behind it deserves attention
SAP ui5 application development tutorial 106 - how to improve the readability of SAP ui5 application routing URL trial version
const、volatile和restrict的作用和用法总结
2022.07.03 (LC 6109 number of people who know secrets)
[STM32] (I) overview and GPIO introduction
Get to know ROS for the first time
P3304 [sdoi2013] diameter (diameter of tree)
Upload avatar on uniapp
SAP UI5 应用开发教程之一百零七 - SAP UI5 OverflowToolbar 容器控件介绍的试读版
Playwright recording
2022.07.03(LC_6111_统计放置房子的方式数)
BGP comprehensive experiment
Apifox (postman + swagger + mock + JMeter), an artifact of full stack development and efficiency improvement
【FPGA教程案例9】基于vivado核的时钟管理器设计与实现
Summary of the function and usage of const, volatile and restrict
6. Scala operator