wing1 = Wing(1,p1,p2,croot,ctip,x1,x2,Y_rib,n_ply,m_ply,matLib,name='box',\
    noe=noe_dens,chordVec=chordVec,ref_ax='shearCntr')#,th_ply=th_ply)
sbeam1 = wing1.wingSects[0].SuperBeams[0]


x1 = np.array([0,0.,0.])
x2 = np.array([c,0.,0.])
x3 = np.array([c,span,0.])
x4 = np.array([0,span,0.])
nspan = 37
nchord = 2*5

wing1.addLiftingSurface(1,x1,x2,x3,x4,nspan,nchord)

# Make a FEM model
model  = Model()

model.addAircraftParts([wing1])

# Apply the constraint for the model
model.applyConstraints(0,'fix')
model.plotRigidModel(numXSects=10)

# Aerodynamic Model Validation
M = .24
kr = .47
b = .4572/2
model.calcAIC(M,kr,b,symxz=True)

model.normalModesAnalysis()
Example #2
0
# Define the root trailing edge location
x2 = np.array([c,0.,0.])
# Define the tip trailing edge location
x3 = np.array([c,span,0.])
# Define the tip leading edge location
x4 = np.array([0,span,0.])
# Determine the number of boxes to be used in the spanwise direction
nspan = 36*2
# Determine the number of boxes to be used in the chordwise direction
nchord = 10
# Add the lifting surface to the wing.
wing1.addLiftingSurface(1,x1,x2,x3,x4,nspan,nchord)

# MAKE THE FINITE ELEMENT MODEL (FEM)
# ===================================
model  = Model()
# Add the aircraft wing to the model
model.addAircraftParts([wing1])
# Apply the constraint for the model
model.applyConstraints(0,'fix')
# Plot the rigid wing in the finite elment model
model.plotRigidModel(numXSects=10)
# Conduct a normal modes analysis. Since the normal mode shapes are used in the
# flutter analysis it is good to run this ahead of time to make sure you are
        # selecting enough mode shapes to include any relevant torsional and bending
# mode shapes.
model.normalModesAnalysis()
# Save the frequencies of the modal analysis
freqs = model.freqs

# IMPORT NASTRAN RESULTS
Example #3
0
ys_tmp = xsect_Lay3.ys
# Let's see what the rigid cross-section looks like:
xsect_Lay3.plotRigid()
# Print the stiffness matrix
xsect_Lay3.printSummary(stiffMat=True)

x1 = np.array([0, 0, 0])
x2 = np.array([0, 0, 160.5337])
# Initialize a superbeam ID
SBID = 1
# Next we need to initialize the number of elements the superbeam should mesh:
noe = 40
# Now let's make the superbeam
sbeam1 = SuperBeam(SBID, x1, x2, xsect_Lay3, noe)

model = Model()
# Easy right? Now let's add the superbeam to the model.
model.addElements([sbeam1])
# Now that our beam is loaded into the FEM, let's visualize it!
model.plotRigidModel(numXSects=8)
# First let's constrain the beam at it's root. Since we only added one
# superbeam and we never specified a starting node ID, we know that the first
# node ID is actually 1! So when we constrain the model, we can just select:
model.applyConstraints(1, "fix")
model.normalModesAnalysis(analysis_name="normal modes")
# For now, the frequencies can be accessed via the model attribute 'freqs'
Frequencies = model.freqs
# Let's plot the first mode:
model.plotDeformedModel(
    analysis_name="normal modes",
    figName="Normal Modes 1",
Example #4
0
b_s = np.linalg.norm((Y_rib[0], Y_rib[-1]))

matLib = MaterialLib()
matLib.addMat(1, 'AL', 'iso', [71.7e9, .33, 2810], .005)
matLib.addMat(2, 'Weak_mat', 'iso', [100, .33, 10], .005)

n_ply = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
m_i = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

noe_dens = 2
wing1 = Wing(1,p1,p2,croot,ctip,x1,x2,Y_rib,n_ply,m_i,matLib,name='box',\
    noe=noe_dens,meshSize=3,lam_sym=True)
sbeam1 = wing1.wingSects[0].SuperBeams[0]
xsect = sbeam1.xsect

model = Model()

model.addAircraftParts([wing1])

model.plotRigidModel(numXSects=10)

# Apply the constraint for the model
model.applyConstraints(0, 'fix')

# CASE 1:
# Apply the case load
tipLoad = np.array([-10000., 100000., -300000., 35000., 60000., 10000.])
F = {40: tipLoad}
model.applyLoads(1, F=F)
# Run the analysis
model.staticAnalysis(1)
Example #5
0
# Having created the cross-section, we can now generate a superbeam. A
# superbeam is just a collection of beam elements. In other words, a superbeam
# is just there to fascilitate beam meshing and other pre/post processing
# benefits. In order to make a superbeam, we need to initialize a few things.
# First, let's initialize the starting and stopping location of the beam:
x1 = np.array([0,0,0])
x2 = np.array([0,0,4])
# Initialize a superbeam ID
SBID = 1
# Next we need to initialize the number of elements the superbeam should mesh:
noe = 20
# Now let's make the superbeam
sbeam1 = SuperBeam(SBID,x1,x2,xsect_Lay1,noe)
# In order to analyze this beam, we'll need to add it to a finite element
# model. First let's make a finite element model!
model = Model()
# Easy right? Now let's add the superbeam to the model.
model.addElements([sbeam1])
# Now that our beam is loaded into the FEM, let's visualize it!
model.plotRigidModel(numXSects=8)
# First let's constrain the beam at it's root. Since we only added one
# superbeam and we never specified a starting node ID, we know that the first
# node ID is actually 1! So when we constrain the model, we can just select:
model.applyConstraints(1,'fix')
# There are two supported keywords for constraints, either 'fix' or 'pinned'.
# If the user wanted to apply a different constraint, they can just enter the
# degrees of freedom to constrain on the model. This can be done by supplying
# an array such as: [1,2,3,5]. Now let's apply a load. We will make two load
# cases. In the first case, we are going to apply a simple tip load:
load1 = {21:np.array([100.,100.,0.,0.,0.,100.])}
# We can also create a function for a distributed load:
Example #6
0
 def __init__(self):
     super(UserInterface, self).__init__()
     self.Model = Model()
Example #7
0
ys_tmp = xsect_Lay3.ys
# Let's see what the rigid cross-section looks like:
xsect_Lay3.plotRigid()
# Print the stiffness matrix
xsect_Lay3.printSummary(stiffMat=True)

x1 = np.array([0, 0, 0])
x2 = np.array([0, 0, 160.5337])
# Initialize a superbeam ID
SBID = 1
# Next we need to initialize the number of elements the superbeam should mesh:
noe = 40
# Now let's make the superbeam
sbeam1 = SuperBeam(SBID, x1, x2, xsect_Lay3, noe)

model = Model()
# Easy right? Now let's add the superbeam to the model.
model.addElements([sbeam1])
# Now that our beam is loaded into the FEM, let's visualize it!
model.plotRigidModel(numXSects=8)
# First let's constrain the beam at it's root. Since we only added one
# superbeam and we never specified a starting node ID, we know that the first
# node ID is actually 1! So when we constrain the model, we can just select:
model.applyConstraints(1, 'fix')
model.normalModesAnalysis(analysis_name='normal modes')
# For now, the frequencies can be accessed via the model attribute 'freqs'
Frequencies = model.freqs
# Let's plot the first mode:
model.plotDeformedModel(analysis_name='normal modes',\
    figName='Normal Modes 1',numXSects=10,contour='none',\
    warpScale=1,displScale=50,mode=1)
Example #8
0
chordVec = np.array([1., 0., 0.])
wing1 = Wing(1,p1,p2,croot,ctip,x1,x2,Y_rib,n_ply,m_ply,matLib,name='box',\
    noe=noe_dens,chordVec=chordVec,ref_ax='shearCntr')#,th_ply=th_ply)
sbeam1 = wing1.wingSects[0].SuperBeams[0]

x1 = np.array([0, 0., 0.])
x2 = np.array([c, 0., 0.])
x3 = np.array([c, span, 0.])
x4 = np.array([0, span, 0.])
nspan = 37
nchord = 2 * 5

wing1.addLiftingSurface(1, x1, x2, x3, x4, nspan, nchord)

# Make a FEM model
model = Model()

model.addAircraftParts([wing1])

# Apply the constraint for the model
model.applyConstraints(0, 'fix')
model.plotRigidModel(numXSects=10)

# Aerodynamic Model Validation
M = .24
kr = .47
b = .4572 / 2
model.calcAIC(M, kr, b, symxz=True)

model.normalModesAnalysis()
b_s = np.linalg.norm((Y_rib[0],Y_rib[-1]))

matLib = MaterialLib()
matLib.addMat(1,'AL','iso',[71.7e9,.33,2810],.005)
matLib.addMat(2,'Weak_mat','iso',[100,.33,10],.005)

n_ply = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
m_i = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]

noe_dens = 2
wing1 = Wing(1,p1,p2,croot,ctip,x1,x2,Y_rib,n_ply,m_i,matLib,name='box',\
    noe=noe_dens,meshSize=3,lam_sym=True)
sbeam1 = wing1.wingSects[0].SuperBeams[0]
xsect = sbeam1.xsect

model  = Model()

model.addAircraftParts([wing1])

model.plotRigidModel(numXSects=10)

# Apply the constraint for the model
model.applyConstraints(0,'fix')

# CASE 1:
# Apply the case load
tipLoad = np.array([-10000.,100000.,-300000.,35000.,60000.,10000.])
F = {40:tipLoad}
model.applyLoads(1,F=F)
# Run the analysis
model.staticAnalysis(1)