You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This experiment shows how to create an airfoil profile in CascadeStudio. The code below contains two approaches:
Using straight lines between the airfoil coordinates
Using the BSplineTo method to force a curve through the airfoil coordinates
The second approach requires a small hack to make it work, namely starting the sketch at a position that is displaced by a small amount from the trailing edge of the profile. If the curve is started at the trailing edge two points are at the same location resulting in an error. An alternative would probably be to remove the first point from the data file.
As a third approach I tried to use a 3D spline through the airfoil coordinates. I then ran into the issue that I was not able to create a face from this wire. Without creating a face the extrusion of the airfoil yields a surface instead of a solid.
// chord, span and dihedral of the wingletchord=50;letspan=200;letdihedral=10;// the following array of points was created from a // standard airfoil coordinate data file// the airfoil coordinate file is normalised to a standard chord of 1letairfoilPoints=[[1.0000000,0.0000000],[0.9985383,0.0003261],[0.9943357,0.0012896],[0.9874835,0.0028991],[0.9780353,0.0051591],[0.9660390,0.0080639],[0.9515443,0.0115947],[0.9346057,0.0157195],[0.9152843,0.0203926],[0.8936495,0.0255547],[0.8697794,0.0311333],[0.8437625,0.0370433],[0.8156986,0.0431884],[0.7857000,0.0494617],[0.7538929,0.0557483],[0.7204180,0.0619265],[0.6854321,0.0678706],[0.6491079,0.0734536],[0.6116358,0.0785498],[0.5732228,0.0830380],[0.5340930,0.0868053],[0.4944863,0.0897496],[0.4546574,0.0917838],[0.4148737,0.0928383],[0.3754127,0.0928639],[0.3365591,0.0918344],[0.2986011,0.0897478],[0.2618267,0.0866279],[0.2265198,0.0825240],[0.1929555,0.0775104],[0.1613969,0.0716848],[0.1320908,0.0651660],[0.1052651,0.0580905],[0.0811259,0.0506086],[0.0598565,0.0428803],[0.0416163,0.0350696],[0.0265420,0.0273396],[0.0147495,0.0198457],[0.0063383,0.0127275],[0.0013965,0.0060949],[0.0000000,0.0000000],[0.0025589,-0.0060606],[0.0092026,-0.0115698],[0.0196689,-0.0165551],[0.0336781,-0.0209976],[0.0509521,-0.0248665],[0.0712157,-0.0281356],[0.0941973,-0.0307883],[0.1196300,-0.0328200],[0.1472530,-0.0342383],[0.1768128,-0.0350618],[0.2080639,-0.0353198],[0.2407701,-0.0350502],[0.2747044,-0.0342981],[0.3096492,-0.0331148],[0.3453962,-0.0315557],[0.3817458,-0.0296795],[0.4185066,-0.0275463],[0.4554945,-0.0252170],[0.4925323,-0.0227516],[0.5294482,-0.0202088],[0.5660754,-0.0176447],[0.6022513,-0.0151121],[0.6378161,-0.0126595],[0.6726125,-0.0103308],[0.7064852,-0.0081646],[0.7392796,-0.0061931],[0.7708424,-0.0044425],[0.8010203,-0.0029317],[0.8296603,-0.0016722],[0.8566098,-0.0006682],[0.8817164,0.0000844],[0.9048280,0.0005973],[0.9257939,0.0008906],[0.9444642,0.0009917],[0.9606910,0.0009361],[0.9743280,0.0007659],[0.9852307,0.0005300],[0.9932535,0.0002828],[0.9982433,0.0000842],[1.0000000,0.0000000]]letnumberPoints=airfoilPoints.length// scale the airfoil points to the chord lengthletairfoilPointsLarge=airfoilPoints.map(function([x,y]){return[x*chord,y*chord]})// create a sketch of the airfoil using straight linesletairfoil=newSketch([chord,0])for(leti=0;i<(numberPoints);i++){airfoil.LineTo(airfoilPointsLarge[i]);}airfoil.End(true);// create a sketch of the airfoil using a BSpline// to make the BSpline work the starting point is moved 0.001 times the chord letairfoil2=newSketch([chord*(1.001),0])airfoil2.BSplineTo(airfoilPointsLarge)airfoil2.End(true)letwing=Rotate([1,0,0],90-dihedral,Extrude(airfoil.Face(),[0,0,span]))letwing2=Rotate([1,0,0],90+dihedral,Extrude(airfoil2.Face(),[0,0,-span]))// Experiment to create a 3D spline along the airfoil coordinates// let airfoilPointsLarge3D = []// for (let j=0 ; j < numberPoints-1 ; j++)// {// let x = airfoilPointsLarge[j+1][0]// let y = airfoilPointsLarge[j+1][1]// airfoilPointsLarge3D[j]=[x,y,0]// }// let path = BSpline(airfoilPointsLarge3D,true)// let wing3 = Extrude(path.Face(),[0,0,200])// issue: it seems not possible to create a face using path.Face()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This experiment shows how to create an airfoil profile in CascadeStudio. The code below contains two approaches:
BSplineTo
method to force a curve through the airfoil coordinatesThe second approach requires a small hack to make it work, namely starting the sketch at a position that is displaced by a small amount from the trailing edge of the profile. If the curve is started at the trailing edge two points are at the same location resulting in an error. An alternative would probably be to remove the first point from the data file.
As a third approach I tried to use a 3D spline through the airfoil coordinates. I then ran into the issue that I was not able to create a face from this wire. Without creating a face the extrusion of the airfoil yields a surface instead of a solid.
Beta Was this translation helpful? Give feedback.
All reactions