-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
6,831 additions
and
6,124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
8ebf48deefbee52560197721d02d7f2cc8408c15 | ||
b192604451ac9427ddccfc2ca24a6796a22e4cc1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,70 @@ | ||
import numpy | ||
import numpy as np | ||
from pygeo import pyGeo | ||
from pyspline import pySpline | ||
|
||
# ============================================================================== | ||
# Start of Script | ||
# ============================================================================== | ||
naf = 20 | ||
n0012 = 'naca0012.dat' | ||
n0012 = "naca0012.dat" | ||
|
||
airfoil_list = [n0012 for i in range(naf)] | ||
for i in range(1,naf-1): | ||
for i in range(1, naf - 1): | ||
airfoil_list[i] = None | ||
|
||
# Use the digitize it data for the planform: | ||
le = numpy.array(numpy.loadtxt('bwb_le.out')) | ||
te = numpy.array(numpy.loadtxt('bwb_te.out')) | ||
front_up = numpy.array(numpy.loadtxt('bwb_front_up.out')) | ||
front_low = numpy.array(numpy.loadtxt('bwb_front_low.out')) | ||
le = np.array(np.loadtxt("bwb_le.out")) | ||
te = np.array(np.loadtxt("bwb_te.out")) | ||
front_up = np.array(np.loadtxt("bwb_front_up.out")) | ||
front_low = np.array(np.loadtxt("bwb_front_low.out")) | ||
|
||
le[0,:] = 0 | ||
te[0,0] = 0 | ||
front_up[0,0] = 0 | ||
front_low[0,0] = 0 | ||
le[0, :] = 0 | ||
te[0, 0] = 0 | ||
front_up[0, 0] = 0 | ||
front_low[0, 0] = 0 | ||
|
||
# Now make a ONE-DIMENSIONAL spline for each of the le and trailing edes | ||
le_spline = pySpline.curve(X=le[:,1],s=le[:,0], nCtl=11, k=4) | ||
te_spline = pySpline.curve(X=te[:,1],s=te[:,0], nCtl=11, k=4) | ||
up_spline = pySpline.curve(X=front_up[:,1],s=front_up[:,0], nCtl=11, k=4) | ||
low_spline = pySpline.curve(X=front_low[:,1],s=front_low[:,0], nCtl=11, k=4) | ||
le_spline = pySpline.curve(X=le[:, 1], s=le[:, 0], nCtl=11, k=4) | ||
te_spline = pySpline.curve(X=te[:, 1], s=te[:, 0], nCtl=11, k=4) | ||
up_spline = pySpline.curve(X=front_up[:, 1], s=front_up[:, 0], nCtl=11, k=4) | ||
low_spline = pySpline.curve(X=front_low[:, 1], s=front_low[:, 0], nCtl=11, k=4) | ||
|
||
# Generate consistent equally spaced spline data | ||
span = numpy.linspace(0,1,naf) | ||
span = np.linspace(0, 1, naf) | ||
|
||
le = le_spline(span) | ||
te = te_spline(span) | ||
up = up_spline(span) | ||
low = low_spline(span) | ||
|
||
ref_span = 138 | ||
chord = te-le | ||
chord = te - le | ||
x = le | ||
z = span*ref_span | ||
mid_y = (up[0]+low[0])/2.0 | ||
y = -(up+low)/2 + mid_y | ||
z = span * ref_span | ||
mid_y = (up[0] + low[0]) / 2.0 | ||
y = -(up + low) / 2 + mid_y | ||
|
||
# Scale the thicknesses | ||
toc = -(up-low)/chord | ||
thickness = toc/0.12 | ||
toc = -(up - low) / chord | ||
thickness = toc / 0.12 | ||
|
||
rot_x = numpy.zeros(naf) | ||
rot_y = numpy.zeros(naf) | ||
rot_z = numpy.zeros(naf) | ||
offset = numpy.zeros((naf,2)) | ||
rot_x = np.zeros(naf) | ||
rot_y = np.zeros(naf) | ||
rot_z = np.zeros(naf) | ||
offset = np.zeros((naf, 2)) | ||
|
||
bwb = pyGeo('liftingSurface', | ||
xsections=airfoil_list, | ||
scale=chord, offset=offset, | ||
thickness=thickness, | ||
bluntTe=True, teHeight=0.05, | ||
tip='rounded', | ||
x=x,y=y,z=z) | ||
bwb = pyGeo( | ||
"liftingSurface", | ||
xsections=airfoil_list, | ||
scale=chord, | ||
offset=offset, | ||
thickness=thickness, | ||
bluntTe=True, | ||
teHeight=0.05, | ||
tip="rounded", | ||
x=x, | ||
y=y, | ||
z=z, | ||
) | ||
|
||
bwb.writeIGES('bwb.igs') | ||
bwb.writeIGES("bwb.igs") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.