当前位置:网站首页>【海浪建模3】三维随机真实海浪建模以及海浪发电机建模matlab仿真
【海浪建模3】三维随机真实海浪建模以及海浪发电机建模matlab仿真
2022-07-05 00:49:00 【fpga和matlab】
1.软件版本
matlab2017b
2.算法概述
依照上次的海浪模拟的模式【海浪建模1】【海浪建模2】,这次把海浪从之前的规则海浪做成随机海浪,模拟真是海浪情况。
然后分别把两个发电机模拟在不规则海浪中。
发电机模式1之前刚刚做好,应该技术人员留有备份。
发电机模式2如下图:
如图),四个圆管中分别装有能量转化器。图是设备整体外观图,随着海波产生运动,带动能量转化器运动从而产生电能。整个设备浮于海面中。
3.核心源码
global Winds; %风速
global g; %重力加速度
global kk; %仿真模型沙盘和实际区域的大小比例
global Xmax;
global Ymax;
global Dxy;
global flag;
global VX;
global VY;
global VZ;
global seepart;
global seeall;
global sel;
RandStream.setDefaultStream(RandStream('mt19937ar','seed',3));
flag = 0;
g = 9.8; %重力加速度
kk = 1/40; %仿真模型沙盘和实际区域的大小比例
%仿真的间隔
Dxy = 4;
%仿真覆盖的海域范围
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));
%海浪自身运动的波高
r = (3.5325*Winds^2.5)/1000;
%海浪自身运动的波长
k = 2*g/(3*Winds^2);
L = 2*pi/k;
%周期T
T = sqrt(2*pi*L/g);
%波频率
w = sqrt(2/3)*g/T;
T = 0;
%发电量
Power = 0;
amps = 0;
while(flag == 0)
T = T + 1;
PP = floor(6*(Winds - 5.8));%1~90
[d,g,H,alpha,beta,waves,wave_no_lookup,angle_lookup,scales] = func_Random_Ocean_Initial(PP);
t = 0.1*T;
surfo = zeros(scales,scales);
for X=1:scales
x = X-1;
xplot(X) = x;
for Y=1:scales
y = Y-1;
yplot(Y) = y;
for i=1:PP
surfo(X,Y) = surfo(X,Y) + waves(i).amp*cos( waves(i).xcoeff*x + waves(i).ycoeff*y + waves(i).w*t + waves(i).phase);
end
end
end
%显示局部效果
axes(handles.axes1);
surf(xplot,yplot,surfo);
hold on;
amps = surfo(50,50);
if sel == 1
func_power_gen_machine_randomOcean(amps,1.6,seepart,seeall);
else
func_power_gen_machine2_randomOcean(amps,1.6,seepart,seeall);
end
axis([0,scales,0,scales,-H,H]);
shading interp;
colormap([143/255,157/255,203/255]);
lightangle(-30,90);
xlabel('x');
ylabel('y');
zlabel('z');
grid on;
view([VX,VY,VZ]);
pause(0.000001);
%海浪自身运动的波长
k = 2*g/(3*Winds^2);
Ls = 2*pi/k;
set(handles.edit1,'String',num2str(Ls));
%计算得到海浪的参数指标
%海浪自身运动的波高
rs = (3.5325*Winds^2.5)/1000;
set(handles.edit3,'String',num2str(rs));
%周期T
T = sqrt(2*pi*L/g);
%速度
c = g*T/(2*pi);
set(handles.edit4,'String',num2str(c));
%波频率
w = sqrt(2/3)*g/T;
set(handles.edit5,'String',num2str(w/2/pi));
%发电量
%注意,由于海浪发电的具体的计算公式,你没有提供,所以这里发电量仅仅使用简单的海浪的大小来表示,
%实际中,发电量就是和海浪大小相关的。所以在得到公式之后,修改210行代码即可。
Power = abs(2*max(surfo(1,:)));
set(handles.edit12,'String',num2str(Power));
hold off;
end
4.测试结果
通过这次新的模型的建模,以及结合前一次的效果,这次得到的软件的界面如下所示:
从上面的界面可知,原先的界面中多了一个choose power mach的按键,这个按键的主要功能就是选择不同的发电机的按钮,
下面对整个仿真过程进行截图以及说明分析:
下面点击那个新放进去的那个按钮,选择不同的发电机,得到如下的结果:
再点一下,得到如下的界面:
下面对这个新放进去的发电模型的侧面进行介绍:
A19-08
边栏推荐
- He worked as a foreign lead and paid off all the housing loans in a year
- 7. Scala process control
- Paxos 入门
- 兩個數相互替換
- Recursive execution mechanism
- 海思3559万能平台搭建:YUV422的踩坑记录
- 2022.07.03 (lc_6111_counts the number of ways to place houses)
- [selenium automation] common notes
- uniapp上传头像
- 《论文笔记》Multi-UAV Collaborative Monocular SLAM
猜你喜欢
Continuous modification of business scenario functions
Parameter passing mechanism of member methods
2022.07.03(LC_6111_统计放置房子的方式数)
SAP UI5 应用开发教程之一百零六 - 如何提高 SAP UI5 应用路由 url 的可读性试读版
大专学历,33岁宝妈又怎样?我照样销售转测试,月入13k+
Recursive execution mechanism
SAP ui5 application development tutorial 106 - how to improve the readability of SAP ui5 application routing URL trial version
创新引领方向 华为智慧生活全场景新品齐发
Detailed explanation of openharmony resource management
[selenium automation] common notes
随机推荐
Leetcode70 (Advanced), 322
2022.07.03(LC_6111_统计放置房子的方式数)
Is it safe to open an account in the College of Finance and economics? How to open an account?
各大主流编程语言性能PK,结果出乎意料
dotnet-exec 0.6.0 released
Detailed explanation of openharmony resource management
那些一门心思研究自动化测试的人,最后都怎样了?
全网最全正则实战指南,拿走不谢
Recursive execution mechanism
abc 258 G - Triangle(bitset)
创新引领方向 华为智慧生活全场景新品齐发
P3304 [sdoi2013] diameter (diameter of tree)
MongoDB系列之学习笔记教程汇总
Five papers recommended for the new development of convolutional neural network in deep learning
107. SAP UI5 OverflowToolbar 容器控件以及 resize 事件处理的一些细节介绍
Hisilicon 3559 universal platform construction: YUV422 pit stepping record
TS快速入门-函数
Date time type and format in MySQL
Reasons and solutions of redis cache penetration and avalanche
ORB(Oriented FAST and Rotated BRIEF)