calculate Cp history (from Fluent) using Matlab

本文详细介绍如何使用ANSYS Fluent的输出数据,包括未缩放的时间历史力矩/推力,来计算风力涡轮机叶片的动力系数(Cp)。步骤包括加载输入数据、提取时间与未缩放力矩、计算Cp并将其保存为txt文件,最后绘制Cp的时间历程图。此过程涉及数据处理、数学计算及可视化,适用于CFD模拟后的数据分析。


input data : unscaled time history of moment/thrust from ANSYS fluent

example of input data, "moment.out"

# iteration     moment
4283 6.983 -0.1910873139538953
4284 6.984 -0.191019809738711
4285 6.985 -0.1909838904131738
4286 6.986 -0.190943968230172
4287 6.987 -0.1908886443401208
4288 6.988 -0.1908541205872921

1. To load input data:
> load moment.out

2.  extract *time* and *unscaled moment* and assign it to a variable named "m"
> m=moment(:, 3);    # assign the 3rd column data of "moment.out" to variable "m"
> time = moment(:,2);

3. calculating power coefficient, Cp
cp=coeff(m);  # "coeff " is a function to calculate the Cp of 3 rotor  based on input moment (one rotor )

function cp=coeff(m)
% v : velocity
% m : unscaled moment of one blade
% rho : density
% cp : power coefficient of 3 blades
% omega: angular velocity, rad/s
v = 0.6;
A = 0.166;
omega = 11.087;
rho = 998.2;
cp=(3*m*omega)/(0.5*rho*v*v*v*A)

 


4. assign "time" and "cp" variables to a new variable "cp_his"
> cp_his = [time cp];

5. save the workspace variable, "cp_his", to a txt file
> save -ascii cp_his.txt cp_his
## syntax: save ; file format; export file name; variable

6. plotting the time history of Cp
> plot (time, cp);

转载于:https://www.cnblogs.com/code-saturne/p/10457434.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值