当前位置:网站首页>[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
边栏推荐
- Safety learning week4
- lambda expressions
- 【海浪建模3】三维随机真实海浪建模以及海浪发电机建模matlab仿真
- TS快速入门-函数
- Get to know ROS for the first time
- I was beaten by the interviewer because I didn't understand the sorting
- 【海浪建模1】海浪建模的理论分析和matlab仿真
- Introduction to the gtid mode of MySQL master-slave replication
- Relationship between classes and objects
- 2022.07.03(LC_6108_解密消息)
猜你喜欢
Parameter passing mechanism of member methods
Applet live + e-commerce, if you want to be a new retail e-commerce, use it!
Basic concept and usage of redis
Arbitrum:二维费用
BGP comprehensive experiment
全栈开发提效神器——ApiFox(Postman + Swagger + Mock + JMeter)
小程序直播 + 电商,想做新零售电商就用它吧!
那些一门心思研究自动化测试的人,最后都怎样了?
Pandora IOT development board learning (RT thread) - Experiment 4 buzzer + motor experiment [key external interrupt] (learning notes)
Learn C language from scratch day 024
随机推荐
GDB常用命令
GDB common commands
IT转测试岗,从迷茫到坚定我究竟付出了什么?
Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention
lambda expressions
leetcode494,474
华为百万聘请数据治理专家!背后的千亿市场值得关注
Operator explanation
The waterfall flow layout demo2 (method 2) used by the uniapp wechat applet (copy and paste can be used without other processing)
Liangzai's first program life and annual summary in 2022
Les phénomènes de « salaire inversé » et de « remplacement des diplômés » indiquent que l'industrie des tests a...
What you learned in the eleventh week
P3304 [SDOI2013]直径(树的直径)
POAP:NFT的采用入口?
[Yocto RM]10 - Images
[untitled]
【海浪建模3】三维随机真实海浪建模以及海浪发电机建模matlab仿真
FEG founder rox:smartdefi will be the benchmark of the entire decentralized financial market
Compare whether two lists are equal
[circuit design] optocoupler use and circuit design summary