当前位置:网站首页>[wave modeling 2] three dimensional wave modeling and wave generator modeling matlab simulation
[wave modeling 2] three dimensional wave modeling and wave generator modeling matlab simulation
2022-07-05 00:54:00 【FPGA and MATLAB】
1. Software version
matlab2017b
2. Core source code
function func_power_gen_machine(HHup,R_buoy,seepart,seeall);
if seepart == 0 & seeall == 1
% First generate the fixed part
% First of all : Cylinder on the seafloor
t = 0:pi/20:2*pi;
RR = 100;
HH = -6.5;
x= 600+RR*sin(t);
y= 300+RR*cos(t)/2;
z=linspace(-8,HH,length(t));
X=meshgrid(x);
Y=meshgrid(y);
Z=[meshgrid(z)]';
surf(X,Y,Z);
xlabel('x'),ylabel('y'),zlabel('z')
shading interp;
colormap([255/255,100/255,103/255]);
hold on
clear X Y Z
% second : The upper half of the column
t = 0:pi/20:2*pi;
RR2 = 60;
HH2 = -6;
x= 600+RR2*sin(t);
y= 300+RR2*cos(t)/2;
z=linspace(-8,HH2,length(t));
X=meshgrid(x);
Y=meshgrid(y);
Z=[meshgrid(z)]';
surf(X,Y,Z);
xlabel('x'),ylabel('y'),zlabel('z')
shading interp;
colormap([255/255,100/255,103/255]);
hold on
clear X Y Z
% Third : coil
HH3 = -8:0.5:-3;
for i = 1:floor(length(HH3)/2)
t = 0:pi/20:2*pi;
RR3 = 10;
x= 600+RR3*sin(t);
y= 300+RR3*cos(t)/2;
z=linspace(HH3(2*i-1),HH3(2*i),length(t));
X=meshgrid(x);
Y=meshgrid(y);
Z=[meshgrid(z)]';
plot3(X,Y,Z,'b');
xlabel('x'),ylabel('y'),zlabel('z')
shading interp;
colormap([255/255,100/255,103/255]);
hold on;
end
alpha(0.5);
clear X Y Z
HHup = HHup + 0.1;
% Fourth : Slide the piston
t = 0:pi/20:2*pi;
RR2 = 15;
x= 600+RR2*sin(t);
y= 300+RR2*cos(t)/2;
z=linspace(-6+HHup,-5+HHup,length(t));
X=meshgrid(x);
Y=meshgrid(y);
Z=[meshgrid(z)]';
surf(X,Y,Z);
xlabel('x'),ylabel('y'),zlabel('z')
shading interp;
colormap([255/255,100/255,103/255]);
hold on
alpha(0.5);
clear X Y Z
% The fifth : Connect leads
t = 0:pi/20:2*pi;
RR2 = 0.01;
x= 600+RR2*sin(t);
y= 300+RR2*cos(t)/2;
z=linspace(-5+HHup,0+HHup,length(t));
X=meshgrid(x);
Y=meshgrid(y);
Z=[meshgrid(z)]';
plot3(X,Y,Z,'k');
xlabel('x'),ylabel('y'),zlabel('z')
shading interp;
colormap([255/255,100/255,103/255]);
hold on
alpha(0.5);
clear X Y Z
% The sixth : Surface buoy , spherical
t=linspace(0,pi,25);
p=linspace(0,2*pi,25);
[theta,phi]=meshgrid(t,p);
x= 600+R_buoy*sin(theta).*sin(phi);
y= 300+R_buoy*sin(theta).*cos(phi)/2;
z=R_buoy*cos(theta)/28 + HHup;
surf(x,y,z);
shading interp;
colormap([255/255,100/255,103/255]);
hold on
alpha(0.5);
alpha(0.5);
end
if seepart == 1 & seeall == 0
% The sixth : Surface buoy , spherical
t=linspace(0,pi,25);
p=linspace(0,2*pi,25);
[theta,phi]=meshgrid(t,p);
x= 600+R_buoy*sin(theta).*sin(phi);
y= 300+R_buoy*sin(theta).*cos(phi)/2;
z=R_buoy*cos(theta)/28 + HHup;
surf(x,y,z);
shading interp;
colormap([255/255,100/255,103/255]);
hold on
alpha(0.5);
alpha(0.5);
end 3. test result
On the basis of the last achievement 【 Wave modeling 1】, Add the dynamic effect of wave generator , And simply calculate the power generation . According to the design requirements , After the whole generator , The simulation results are as follows :

You can see it here , The control interface has been adjusted , Three buttons are added , among ,part_View It is the dynamic effect of the sea buoy ,All_View It is the dynamic effect of the whole generator ,Close the power mach It is the dynamic effect of turning off the generator , Only show the effect of waves ,electricity It shows the effect of power generation . The simulation results of the whole system are as follows :
The initial wave modeling :

Click on Part_View Key :

Adjust the view slider , The following effect :

Click on All_View Key :

Adjust the view slider , The following effect :

Click on Close the power Mach Key :

A19-07
边栏推荐
- 资深测试/开发程序员写下无bug?资历(枷锁)不要惧怕错误......
- P4281 [AHOI2008]紧急集合 / 聚会(LCA)
- 107. Some details of SAP ui5 overflow toolbar container control and resize event processing
- Apifox (postman + swagger + mock + JMeter), an artifact of full stack development and efficiency improvement
- 【selenium自动化】常用注解
- Identifiers and keywords
- 潘多拉 IOT 开发板学习(RT-Thread)—— 实验4 蜂鸣器+马达实验【按键外部中断】(学习笔记)
- 创新引领方向 华为智慧生活全场景新品齐发
- There is a new Post-00 exam king in the testing department. I really can't do it in my old age. I have
- URLs and URIs
猜你喜欢

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

lambda表达式

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

Insert sort of sort

2022.07.03(LC_6111_统计放置房子的方式数)

测试部新来了个00后卷王,上了年纪的我真的干不过了,已经...

Talking about JVM 4: class loading mechanism

1189. Maximum number of "balloons"

leetcode518,377

2022.07.03 (LC 6108 decryption message)
随机推荐
两个数相互替换
程序员SQL数据脚本编码能力弱,BI做不出来怎么办?
What if the programmer's SQL data script coding ability is weak and Bi can't do it?
[Yocto RM]11 - Features
那些一门心思研究自动化测试的人,最后都怎样了?
海思3559万能平台搭建:YUV422的踩坑记录
What did I pay for it transfer to testing post from confusion to firmness?
2022.07.03 (LC 6109 number of people who know secrets)
资深测试/开发程序员写下无bug?资历(枷锁)不要惧怕错误......
Check if this is null - checking if this is null
[Yocto RM]10 - Images
skimage: imread & imsave & imshow
Playwright recording
The performance of major mainstream programming languages is PK, and the results are unexpected
TS quick start - functions
2022.07.03(LC_6108_解密消息)
SAP UI5 应用开发教程之一百零六 - 如何提高 SAP UI5 应用路由 url 的可读性试读版
Detailed explanation of multi-mode input event distribution mechanism
“薪资倒挂”、“毕业生平替” 这些现象说明测试行业已经...
Two numbers replace each other