【离岸漂浮风力发电机唤醒诱导动力学模拟器(WInDS)】一种为风力发电机气动分析开发的提升线自由涡尾迹方法编码(Matlab代码实现)

  💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

 ⛳️赠与读者

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码、文章


 ⛳️赠与读者

👨‍💻做科研,涉及到一个深在的思想系统,需要科研者逻辑缜密,踏实认真,但是不能只是努力,很多时候借力比努力更重要,然后还要有仰望星空的创新点和启发点。当哲学课上老师问你什么是科学,什么是电的时候,不要觉得这些问题搞笑。哲学是科学之母,哲学就是追究终极问题,寻找那些不言自明只有小孩子会问的但是你却回答不出来的问题。建议读者按目录次序逐一浏览,免得骤然跌入幽暗的迷宫找不到来时的路,它不足为你揭示全部问题的答案,但若能让人胸中升起一朵朵疑云,也未尝不会酿成晚霞斑斓的别一番景致,万一它居然给你带来了一场精神世界的苦雨,那就借机洗刷一下原来存放在那儿的“躺平”上的尘埃吧。

     或许,雨过云收,神驰的天地更清朗.......🔎🔎🔎

💥1 概述

唤醒诱导动力学模拟器(WInDS)是一个基于提线理论(LLT)的自由涡尾流方法(FVM)代码,由马萨诸塞大学阿默斯特分校风能中心开发,其明确目的是以比动量平衡方法更高的精确度来模拟海上漂浮风力发电机(OFWT)的气动力学。WInDS本身集成了海上漂浮风力发电机中存在的多个自由度,从而实现了对流场更真实的模拟。

唤醒诱导动力学模拟器(WInDS),由Sebastian和Lackner[1]编写,是一个基于提线理论(LLT)的自由涡尾流方法(FVM)代码,该代码在马萨诸塞大学阿默斯特分校风能中心开发,其明确目标是为了模拟海上漂浮风力发电机(OFWT)的气动力学,达到比动量平衡方法所能达到的更高精度。WInDS本身就融入了海上漂浮风力发电机中存在的多自由度,这使得流场的模拟更加逼真。

Sebastian和Lackner[2]证明,与海上漂浮风力发电机平台运动(图1)相关的额外自由度将导致气动不稳定性,这种不稳定性超过了陆上和传统海上系统的经历的不稳定性。

势流理论允许叠加基本流以构建更复杂的流体运动。涡丝是三维基本流的一个例子,是集中涡度的物质线。Helmholtz定理指出,涡丝上的环量强度或涡度沿涡丝是恒定的,涡丝必须形成一个闭合的环或者延伸至无穷远。多个涡丝可以组合起来形成一个随每个时间步长增长的闭合涡格,以此来模拟与尾流相关的复杂且不稳定的流场。由强度为Γ、长度为L、位于节点x1和x2之间的涡丝段(图2)在感兴趣的点P处诱导的速度,可以通过Biot-Savart定律进行计算。详细文章见第4部分。

📚2 运行结果

部分代码:

user.t=[0 5 5]; %Initial t, final t, and frequency in Hz
user.filename='NRELrotor'; %Test case (elliptical, rotor type, or .fst file)
user.tol=1e-8; %Tolerance value for convergence of numerical methods
user.d='visc1'; %Core model for filaments (numerical values are the squared cutoff radius, 
                %'viscX' applied viscous model of index X) 
user.co=1000; %Distance from wake nodes beyond which influence is negligible
user.integ='pcc'; %Numerical integration scheme
user.ns=20; %Number of spanwise stations
user.maxiter=30; %Maximum number of iterations for Kutta-Joukowski theorem
user.roll='true'; %If 'true', will apply induction to all wake nodes
user.anim='true'; %If 'true', will generate animation of wake evolution
user.time=datestr(now ,'mm-dd-yyyy_HHMM'); %Date and time of code execution
user.kjtype='fixed'; %Use either fixed point or Brent's method for convergence (Brent is
                     %still a bit coarse)
user.relax=0.25; %Relaxation value for fixed-point iteration

%%Variables for user.ellip.* used only if user.filename='elliptical'
user.ellip.b=10; %Elliptical wingspan
user.ellip.AR=6; %Elliptical wing aspect ratio (AR=b^2/S)
user.ellip.wind=[1 0 0]; %Wind velocity vector
user.ellip.pitch=[5 5 0]; %Pitch angle of elliptical wing (in degrees)
user.ellip.pitchrate=0; %Pitch rate of elliptical wing (in degrees)
user.ellip.yaw=0; %Yaw angle of elliptical wing (in degrees)

%%Variables for user.rotor.* used only if user.filename='rotor'
user.rotor.wind=[11.4 0 0]; %Wind velocity vector
user.rotor.tsr=7; %Tip speed ratio
user.rotor.casetype='static_rated';
user.rotor.pitch=0; %Pitch angle of rotor blade (in degrees)
user.rotor.yaw=0;
user.rotor.modes=[];%{'Surge' 0.72520 0.00740 -1.16256 -0.44205 0.07750 2.60940 13.60156 10};

addpath(genpath(fullfile(cd))); %Add directories to search path

%% Load constants (physical and derived)
[const]=constants;


%% Load test case (elliptical wing, rotor, or FAST-generated)
if strcmp(user.filename,'elliptical')
    [blade,turbine,platform,fastout,airfoils,wind]=elliptical(user);
elseif strcmp(user.filename,'NRELflat')
    [blade,turbine,platform,fastout,airfoils,wind]=NRELflat(user);
elseif strcmp(user.filename,'NRELrotor')
    [blade,turbine,platform,fastout,airfoils,wind]=NRELrotor(user);
elseif strcmp(user.filename,'FAST')
    [airfoils,blade,turbine,platform,wind]=input_import(user.filename);
    [fastout]=output_import(user.filename,user.t);
end

%% Compute positions of blade stations in inertial reference frame
[pos]=kinematics(blade,turbine,platform,fastout);

%% Compute velocities of blade stations due to external motions
[vel,pos]=velocity(pos,blade,turbine,wind,fastout);

%% Define initial values (wake strength, geometry, etc)
[wake,vel,perf]=initials(pos,vel,blade,turbine,wind,airfoils,fastout,const,user);

%% !!!PRIMARY LOOP OVER TIMESERIES!!!
%Determine size of test vectors/arrays
nt=length(fastout.Time); %Number of timesteps
nb=turbine.NumBl; %Number of blades
ns=length(blade.RNodes); %Number of shed nodes (stations)
tm=zeros(nt,1); %Preallocate memory for timer (time for each timestep)

for p=2:nt
    tic; %Begin timing this timestep
%Update shed and trailing filament strength
    %Bound filament for previous timestep becomes new bound filament
    wake.gamma.shed{p}(:,:,1,:)=wake.gamma.shed{p-1}(:,:,1,:);
    %Compute spanwise change in bound filament to compute first set of trailing filaments
    wake.gamma.trail{p}(:,:,1,:)=diff([zeros(1,1,1,nb) ; wake.gamma.shed{p}(:,:,1,:) ; ...
        zeros(1,1,1,nb)],1);
    %Previous set of trailing filaments becomes new set of trailing filaments
    wake.gamma.trail{p}(:,:,2:end,:)=wake.gamma.trail{p-1};
    %Shed filaments computed via spanwise summation of trailing filaments (ensure Kelvin's 
    %theorem is satisfied)
    wake.gamma.shed{p}(:,:,2:end,:)=diff(cat(3,cumsum(wake.gamma.trail{p}(1:end-1,:,:,:),1), ...
        zeros(ns,1,1,nb)),1,3); 
    
%Modify vortex core size via Ramasamy-Leishman model and include effect of filament stretching
%from previous timestep
    wake=vcore(wake,const,fastout,user,p);
    
%Compute induced velocity at all points
    %Velocity induced by shed filaments on all nodes in wake
    if strcmp(user.roll,'true')
        vel.uind_shed=BiotSavart(wake.domain{p}(1:end-1,:,:,:),wake.domain{p}(2:end,:,:,:), ...
            wake.domain{p},wake.gamma.shed{p},wake.rc_eff.shed{p},user.d,user.co,'full');
        %Velocity induced by trailing filaments on all nodes in wake
        vel.uind_trail=BiotSavart(wake.domain{p}(:,:,2:end,:),wake.domain{p}(:,:,1:end-1,:), ...
            wake.domain{p},wake.gamma.trail{p},wake.rc_eff.trail{p},user.d,user.co,'full');
        %Sum the induced velocity contributions due to shed and trailing filaments
        vel.uind{p}=vel.uind_shed+vel.uind_trail;
    end
    %Add the total induced velocity in the wake to the freestream velocity
    vel.domain{p}=vel.domain{p}+vel.uind{p};    
    
%Numerically convect wake nodes to time+1
    if strcmp(user.integ,'fe') && p~=nt
        wake=fe(wake,vel,user,p); %Foward euler
    elseif strcmp(user.integ,'ab2') && p~=nt
        wake=ab2(wake,vel,user,p); %2nd-order Adams-Bashforth
    elseif strcmp(user.integ,'ab4') && p~=nt
        wake=ab4(wake,vel,user,p); %2nd-order Adams-Bashforth
    elseif strcmp(user.integ,'pcc') && p~=nt
        wake=pcc(wake,vel,const,fastout,user,p); %Predictor-corrector, central-difference
    end

%Compute strength of new bound vortex via Kutta-Joukowski theorem
    [wake,perf,vel,ctj]=KuttaJoukowski(pos,vel,blade,turbine,wake,airfoils,user,perf,p, ...
        user.kjtype);
    
%Determine time spent on current timeloop and estimate time remaining
    tm(p-1)=toc; %Time spent on current loop
    if p>2
        pt=polyfit([0 ; (2:p)'],cumsum([0 ; tm(1:p-1)]),2);
        tr=polyval(pt,nt)-sum(tm(1:p-1)); %Extrapolate to determine time remaining
        clc; disp([num2str(ctj) ': ' num2str(p/nt*100) ...
            '% complete, estimated time remaining: ' num2str(tr/60) ' minutes'])
    end
end

🎉3 参考文献

文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。

🌈4 Matlab代码、文章

资料获取,更多粉丝福利,MATLAB|Simulink|Python资源获取

                                                           在这里插入图片描述

  • 7
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Winds 是一个基于 Electron 框架开发的跨平台桌面应用程序,它可以帮助用户更加高效地管理他们的 RSS 订阅、播客和新闻源。而 Sscms 则是一个开源的 CMS 系统,它可以帮助用户快速搭建自己的博客网站。本文将会介绍如何在 Winds 中运行 Sscms。 ## 准备工作 在开始之前,我们需要先进行一些准备工作: 1. 安装 Node.js 和 npm。 2. 安装 Winds。 3. 下载 Sscms 的源代码并解压。 ## 安装依赖 在运行 Sscms 之前,我们需要先安装一些依赖。打开终端并进入 Sscms 的根目录,然后运行以下命令: ```bash npm install ``` 这会安装 Sscms 所需要的依赖。 ## 修改配置文件 在运行 Sscms 之前,我们需要先修改一些配置。在 Sscms 的根目录中,有一个名为 `config.js` 的文件,打开它并修改以下配置: ```javascript module.exports = { port: 3000, // 修改为任意未被占用的端口号 db: { host: 'localhost', port: 3306, user: 'root', // 修改为你的数据库用户名 password: '123456', // 修改为你的数据库密码 database: 'sscms' // 修改为你的数据库名称 } } ``` 将上述配置中的 `port`、`user`、`password` 和 `database` 分别修改为你所需的值。 ## 运行 Sscms 在终端中进入 Sscms 的根目录,并运行以下命令来启动 Sscms: ```bash npm run dev ``` 这会启动 Sscms 并监听你所设置的端口号。 ## 在 Winds 中打开 Sscms 现在我们已经成功启动了 Sscms,接下来我们需要在 Winds 中打开它。打开 Winds 并点击菜单栏中的 `View`,然后选择 `Toggle Developer Tools`。在打开的开发者工具窗口中,输入以下命令并按下回车: ```javascript window.api.openExternal('http://localhost:3000/') ``` 注意将上述命令中的 `http://localhost:3000/` 替换为你所设置的实际地址。 这样,Sscms 就会在 Winds 中以网页的形式打开了。 ## 总结 通过上述步骤,我们成功地在 Winds 中运行了 Sscms。如果你在使用 Winds 过程中遇到了任何问题,可以查看 Winds 的官方文档或者在社区中寻求帮助。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

荔枝科研社

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值