資源簡介
matlab開發-使用xFoiland ParseCGeometric參數化進行機翼優化。包括使用xfoil接口優化翼型所需的所有文件。

代碼片段和文件信息
%%?Airfoil?Optimization?objective?Function
%?Authors:?Sean?Wu?&?Sheida?Hosseini?UC?Davis?MAE?Dept.?
%?Date:???Mar.?2015
%?CC?BY-SA?Sean?Wu?2015
%{?
This?function?returns?the?drag?coefficient?for?a?given?airfoil?as?defined
by?the?PARSEC?parameters?p=[p1...p11]?using?Xfoil?for?the?aerodynamic
analysis.
%}
function?cd?=?cdmin(p)
a=parsec(p);
point=100;
n=(1/point);
nn=n/5;?%?to?create?more?points?at?the?LE
%?upper?surface?coordinates
x1=1:-n:0.1;
x2=0.1:-nn:0;
%?lower?surface?coordinates
%xxx=0:n:1;
x3=0:nn:0.1;
x4=0.1:n:1;
xu(1:length(x1))=x1;
xu(length(x1)+1:length(x1)+length(x2))=x2;
xl(1:length(x3))=x3;
xl(length(x3)+1:length(x3)+length(x4))=x4;
X(1:length(xu))=xu;
X(length(xu)+1:length(xu)+length(xl))=xl;
X=X‘;
yu=a(1)*xu.^.5+a(2)*xu.^(1.5)+a(3)*xu.^(2.5)+a(4)*xu.^(3.5)+a(5)*xu.^(4.5)+a(6)*xu.^(5.5);
yl=-(a(7)*xl.^.5+a(8)*xl.^(1.5)+a(9)*xl.^(2.5)+a(10)*xl.^(3.5)+a(11)*xl.^(4.5)+a(12)*xl.^(5.5));
Y(1:length(yu)1)=yu;
Y(length(yu)+1:length(yu)+length(yl)1)=yl;
Y=round(Y7);
X=round(X7);
coord=[X?Y];
%?Run?Xfoil?requires?xfoil.m
[ab]=xfoil(coord5E60.5);
%?Plot?airfoil?evolution?comment?out?if?desired
hold?on
plot(XY)
????????
%?objective?function
cd=a.CD;?
end
%Sean?Wu?2015
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1293??2015-03-22?13:42??airfoil?optim\cdmin.m
?????文件?????????606??2015-03-22?13:42??airfoil?optim\central.m
?????文件????????2908??2015-03-22?13:42??airfoil?optim\conjugate.m
?????文件?????????534??2015-03-22?13:42??airfoil?optim\fwd.m
?????文件?????????959??2015-03-22?13:42??airfoil?optim\golden.m
?????文件????????1691??2015-03-22?13:42??airfoil?optim\parsec.m
?????文件???????11351??2015-03-22?13:42??airfoil?optim\xfoil.m
?????文件????????1337??2015-03-22?13:42??license.txt
評論
共有 條評論