当前位置:网站首页>【海浪建模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;
end4.测试结果
通过这次新的模型的建模,以及结合前一次的效果,这次得到的软件的界面如下所示:

从上面的界面可知,原先的界面中多了一个choose power mach的按键,这个按键的主要功能就是选择不同的发电机的按钮,
下面对整个仿真过程进行截图以及说明分析:

下面点击那个新放进去的那个按钮,选择不同的发电机,得到如下的结果:

再点一下,得到如下的界面:

下面对这个新放进去的发电模型的侧面进行介绍:


A19-08
边栏推荐
- Hisilicon 3559 universal platform construction: YUV422 pit stepping record
- 26.2 billion! These universities in Guangdong Province have received heavy support
- abc 258 G - Triangle(bitset)
- POAP:NFT的采用入口?
- [STM32] (I) overview and GPIO introduction
- Oracle case: SMON rollback exception causes instance crash
- Mongodb series learning notes tutorial summary
- lambda表达式
- SAP ui5 application development tutorial 106 - how to improve the readability of SAP ui5 application routing URL trial version
- (脚本)一键部署redis任意版本 —— 筑梦之路
猜你喜欢

leetcode494,474

Verilog tutorial (11) initial block in Verilog

【C】(笔试题)指针与数组,指针

Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention

Two numbers replace each other

基本放大电路的学习

分布式BASE理论

What if the programmer's SQL data script coding ability is weak and Bi can't do it?

2022.07.03 (LC 6108 decryption message)
![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)
随机推荐
初识ROS
Enterprise application business scenarios, function addition and modification of C source code
Learn C language from scratch day 024
ORB(Oriented FAST and Rotated BRIEF)
URLs and URIs
测试部新来了个00后卷王,上了年纪的我真的干不过了,已经...
Playwright之录制
基本放大电路的学习
107. Some details of SAP ui5 overflow toolbar container control and resize event processing
【C】(笔试题)指针与数组,指针
dotnet-exec 0.6.0 released
Paxos 入门
2022.07.03(LC_6111_统计放置房子的方式数)
Visual explanation of Newton iteration method
SAP UI5 应用的主-从-从(Master-Detail-Detail)布局模式的实现步骤
[Yocto RM]10 - Images
2022.07.03 (LC 6108 decryption message)
Fs8b711s14 electric wine bottle opener MCU IC scheme development special integrated IC
MongoDB系列之学习笔记教程汇总
The performance of major mainstream programming languages is PK, and the results are unexpected