当前位置:网站首页>[wave modeling 3] three dimensional random real wave modeling and wave generator modeling matlab simulation
[wave modeling 3] three dimensional random real wave modeling and wave generator modeling matlab simulation
2022-07-05 00:53:00 【FPGA and MATLAB】
1. Software version
matlab2017b
2. Description of algorithm
According to the last wave simulation mode 【 Wave modeling 1】【 Wave modeling 2】, This time, the waves are made into random waves from the previous regular waves , The simulation is really a wave situation .
Then the two generators are simulated in irregular waves .
Generator mode 1 It was just done before , Technicians should keep a backup .
Generator mode 2 Here's the picture :
Pictured ), The four circular tubes are respectively equipped with energy converters . The figure is the overall appearance of the equipment , With the movement of sea waves , Drive the energy converter to generate electric energy . The whole equipment floats in the sea .
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;
global seepart;
global seeall;
global sel;
RandStream.setDefaultStream(RandStream('mt19937ar','seed',3));
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;
% Power generation
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
% Show local effects
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);
% 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));
% Power generation
% Be careful , Due to the specific calculation formula of wave power generation , You didn't provide , So the power generation here is only expressed by the size of simple waves ,
% In the actual , Power generation is related to the size of waves . So after getting the formula , modify 210 Lines of code .
Power = abs(2*max(surfo(1,:)));
set(handles.edit12,'String',num2str(Power));
hold off;
end
4. test result
Through the modeling of this new model , And combine the effect of the previous time , The interface of the software obtained this time is as follows :
From the above interface , There is one more in the original interface choose power mach The buttons , The main function of this button is to select buttons of different generators ,
The following is a screenshot of the whole simulation process and an explanation and analysis :
Next, click the new button , Choose a different generator , The results are as follows :
A little more , Get the following interface :
Next, we will introduce the side of this new power generation model :
A19-08
边栏推荐
- Open3d uses GICP to register point clouds
- 【Unity】InputSystem
- Hisilicon 3559 universal platform construction: YUV422 pit stepping record
- Leetcode70 (Advanced), 322
- uniapp上传头像
- POAP:NFT的采用入口?
- [Yocto RM]11 - Features
- 华为百万聘请数据治理专家!背后的千亿市场值得关注
- Grabbing and sorting out external articles -- status bar [4]
- 华为200万年薪聘请数据治理专家!背后的千亿市场值得关注
猜你喜欢
测试部新来了个00后卷王,上了年纪的我真的干不过了,已经...
URL和URI
【C】(笔试题)指针与数组,指针
abc 258 G - Triangle(bitset)
Several simplified forms of lambda expression
Safety learning week4
URLs and URIs
Hisilicon 3559 universal platform construction: YUV422 pit stepping record
Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention
ORB(Oriented FAST and Rotated BRIEF)
随机推荐
Two numbers replace each other
P4408 [noi2003] truant children (tree diameter)
Inventory of more than 17 typical security incidents in January 2022
Detailed explanation of openharmony resource management
华为百万聘请数据治理专家!背后的千亿市场值得关注
Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention
Pycharm professional download and installation tutorial
What you learned in the eleventh week
uniapp上传头像
Pandora IOT development board learning (RT thread) - Experiment 4 buzzer + motor experiment [key external interrupt] (learning notes)
【海浪建模2】三维海浪建模以及海浪发电机建模matlab仿真
Complete knapsack problem (template)
P4281 [ahoi2008] emergency assembly / gathering (LCA)
Oracle case: SMON rollback exception causes instance crash
4. Scala writes HelloWorld in idea, in-depth analysis of accompanying objects, and association of source packages
Huawei employs millions of data governance experts! The 100 billion market behind it deserves attention
[STM32] (I) overview and GPIO introduction
Is it safe to open an account in the College of Finance and economics? How to open an account?
College degree, what about 33 year old Baoma? I still sell and test, and my monthly income is 13K+
There is a new Post-00 exam king in the testing department. I really can't do it in my old age. I have