Problem with inputting a set of tables

2 次查看(过去 30 天)
I'm using MATLAB to analyze the blades on a VAWT using the double-multiple streamtube model and I get stuck at this point. The code asks for the airfoil lift and drag coefficients that are dependent on the angle of attack and Reynolds number. The code then interpolates that data to get a proper lift and drag coefficient at a specific speed:
Re = Wu*c/kv;
[A1, Cl1, Cd1] = NACA0015 (Re);
A1 is the angle of attack, Cl1 is the lift coefficient, and Cd1 is the drag coefficient. All of the data that I need to put into a table is in the attached Excel file. I got the information in the Excel file from the 1981 Sandia National Laboratories energy report (https://www.osti.gov/scitech/servlets/purl/6548367/).
Any advice on where to look or what to do would greatly be appreciated. I'm not sure what kind of table to make.Thanks
  1 个评论
Amin Mohammed
Amin Mohammed 2017-5-2
编辑:Amin Mohammed 2017-5-2
I'm wondering how did you get the data in the Excel file for the lift and drag coefficients versus Re, and AoA. Are you able to download it from Sandia National Laboratories website, or you have typed it manually, just from the PDF.

请先登录,再进行评论。

回答(2 个)

Amin Mohammed
Amin Mohammed 2017-4-27
编辑:Amin Mohammed 2017-4-27
If I understand exactly what you are looking for, I think you want to read the data from the Excel file to Matlab, you may use xlsread, to do so, and store the airfoils data in a Matrix (n by 4), where n is the length of the data, which would be around 236, of course you will first need to rearrange the excel file, to make it one long table with 4 columns and around 236 rows.
Or you may used notepad++ (or other) to save the excel sheet in .dat format that Matlab can handle.
I hope this would help you, and if it not, could you kindly add more details to what exactly you are looking for, I'm doing similar stuff nowadays, so it's great to discuss.

yiuyin
yiuyin 2018-8-3
编辑:Stephen23 2018-8-3
The code in python to read the column is like this(for the raw table given, delete the first row):
data = xlrd.open_workbook('Airfoil.xls','r')
NACA = data.sheet_by_name('NACA0015')
if Re == NACA.cell_value(0,0):
AOA = NACA.col_values(1)
alpha = [(num*np.pi)/180 for num in AOA] #transform into arch
Cl = NACA.col_values(2)
Cd = NACA.col_values(3)
elif Re == NACA.cell_value(0,5):
AOA = NACA.col_values(6)
alpha = [(num*np.pi)/180 for num in AOA]
Cl = NACA.col_values(7)
Cd = NACA.col_values(8)
elif Re == NACA.cell_value(0,10):
AOA = NACA.col_values(11)
alpha = [(num*np.pi)/180 for num in AOA]
Cl = NACA.col_values(12)
Cd = NACA.col_values(13)
elif Re == NACA.cell_value(0,15):
AOA = NACA.col_values(16)
alpha = [(num*np.pi)/180 for num in AOA]
Cl = NACA.col_values(17)
Cd = NACA.col_values(18)
elif Re == NACA.cell_value(0,15):
AOA = NACA.col_values(16)
alpha = [(num*np.pi)/180 for num in AOA]
Cl = NACA.col_values(17)
Cd = NACA.col_values(18)
elif Re == NACA.cell_value(0,20):
AOA = NACA.col_values(21)
alpha = [(num*np.pi)/180 for num in AOA]
Cl = NACA.col_values(22)
Cd = NACA.col_values(23)
elif Re == NACA.cell_value(0,25):
AOA = NACA.col_values(26)
alpha = [(num*np.pi)/180 for num in AOA]
Cl = NACA.col_values(27)
Cd = NACA.col_values(28)
BTW. I really wonder where do you find this double-multiple streamtube model code?

类别

Help CenterFile Exchange 中查找有关 Airfoil tools 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by