Esempio n. 1
0
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,
)
# How about the second?
model.plotDeformedModel(
    analysis_name="normal modes",
Esempio n. 2
0
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
# ======================
# The same analysis was conducted on a plate model in NX NASTRAN to verify the
# results produced by AeroComBAT
NASTRAN = np.genfromtxt('NASTRANFlutterResults.csv', delimiter=',')
UNAST = NASTRAN[:,0]
Damp1 = NASTRAN[:,1]
Freq1 = NASTRAN[:,2]
Damp2 = NASTRAN[:,3]
Freq2 = NASTRAN[:,4]
Damp3 = NASTRAN[:,5]
Freq3 = NASTRAN[:,6]
Esempio n. 3
0
# Let's see what results we get for the distributed load:
model.plotDeformedModel(analysis_name='distributed load',\
    figName='Distributed Load Analysis',numXSects=8,contour='VonMis',\
    contLim=[0,1e5],warpScale=50,displScale=10)
# Really quickly, let's discuss some of the keywords used in the analysis and
# plotting. The analysis_name designates the name where the results should be
# stored for the beam. Therefore if you want to keep multiple results stored
# at once you can give it a name. Otherwise this will always result to the
# default name. figName is just the name of the MayaVi figure, and numXSects
# designates how many cross-sections should be plotted. Note that the more
# cross-sections are plotted, the slower the plotting process will be. Both
# contour, contLim and warpScale were discussed in Tutorial 3. displScale is
# the scalling factor applied to the beam displacements and rotations.
# We can also run a normal modes analysis on the beam as well: having already
# applied the constraints, we can run:
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=2,mode=1)
# How about the second?
model.plotDeformedModel(analysis_name='normal modes',\
    figName='Normal Modes 2',numXSects=10,contour='none',\
    warpScale=1,displScale=5,mode=2)
# How about the third? It happens to be the torsional mode.
model.plotDeformedModel(analysis_name='normal modes',\
    figName='Normal Modes 3',numXSects=10,contour='none',\
    warpScale=1,displScale=1,mode=3)