Esempio n. 1
0
xdim2 = [-.953/(c2*2),.953/(c2*2)]
# Generate the airfoil box:
af2 = Airfoil(c2,name='box')
# Now let's make all of the laminate objects we will need for the box beam. In
# this case it's 4:
n_i_Lay1 = [6]
m_i_Lay1 = [2]
th_Lay1 = [0.]
lam1_Lay1 = Laminate(n_i_Lay1, m_i_Lay1, matLib, th=th_Lay1)
lam2_Lay1 = Laminate(n_i_Lay1, m_i_Lay1, matLib, th=th_Lay1)
lam3_Lay1 = Laminate(n_i_Lay1, m_i_Lay1, matLib, th=th_Lay1)
lam4_Lay1 = Laminate(n_i_Lay1, m_i_Lay1, matLib, th=th_Lay1)
# Assemble the laminates into an array.
laminates_Lay1 = [lam1_Lay1,lam2_Lay1,lam3_Lay1,lam4_Lay1]
# Create the cross-section vector:
xsect_Lay1 = XSect(2,af2,xdim2,laminates_Lay1,matLib,typeXSect='rectBox',\
    meshSize=2)
# Create the cross-section object.
xsect_Lay1.xSectionAnalysis()
# 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)
nodes = [n1, n2, n3, n4, n5, n6, n7, n8, n9]

elem1 = CQUADX9(1, nodes, 3, matLib)

N1 = Node(1, [0., 0., 0.])
N2 = Node(2, [1., 0., 0.])
N3 = Node(3, [1., 1., 0.])
N4 = Node(4, [0., 1., 0.])
nodes1 = [N1, N2, N3, N4]
elem2 = CQUADX(2, nodes1, 3, matLib)

b = 1
h = 1
elemX = 24
elemY = elemX
xsect1 = XSect(1,None,[b,h],None,matLib,elemX=elemX,elemY=elemY,typeXSect='solidBox',\
    MID=3,elemOrder=1)
xsect1.xSectionAnalysis()
xsect2 = XSect(1,None,[b,h],None,matLib,elemX=elemX,elemY=elemY,typeXSect='solidBox',\
    MID=3,elemOrder=2)
xsect2.xSectionAnalysis()

E = 71.7e9
nu = .33
G = E / (2 * (1 + nu))
A = 1
k = 5. / 6
I = b * h**3 / 12.
Ktrue = np.array([[G*A*k,0,0,0,0,0],[0,G*A*k,0,0,0,0],[0,0,E*A,0,0,0],\
    [0,0,0,E*I,0,0],[0,0,0,0,E*I,0],[0,0,0,0,0,G*2.25*(b/2.)**4]])
Kapprox1 = xsect1.K
Kapprox2 = xsect2.K
Esempio n. 3
0
lam2 = Laminate(n_i_2, m_i_2, matLib, th=th_2)
n_i_3 = [8]
m_i_3 = [1]
th_3 = [-10]
lam3 = Laminate(n_i_3, m_i_3, matLib, th=th_3)
n_i_4 = [1, 1, 1, 1]
m_i_4 = [1, 1, 1, 1]
th_4 = [45, -45, 45, -45]
lam4 = Laminate(n_i_4, m_i_4, matLib, th=th_4)
# Organize the laminates into an array
laminates_Lay3 = [lam1, lam2, lam3, lam4]
# Create the cross-section object and mesh it
xsect_Lay3 = XSect(4,
                   af3,
                   xdim3,
                   laminates_Lay3,
                   matLib,
                   typeXSect='box',
                   meshSize=4)
# Run the cross-sectional analysis. Since this is an airfoil and for this,
# symmetric airfoils the AC is at the 1/c chord, we will put the reference axis
# here
xsect_Lay3.xSectionAnalysis()  #ref_ax=[0.25*c3,0.])
K_tmp = xsect_Lay3.K
F_tmp = xsect_Lay3.F
xs_tmp = xsect_Lay3.xs
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)
Esempio n. 4
0
xsect_Lay3.calcWarpEffects(force=force)
xsect_Lay3.plotWarped(figName='Warping Displacement My',warpScale=0,contour='none')
xsect_Lay3.plotWarped(figName='Warping Displacement My',warpScale=1e9,contLim=[0,1e-9])

force = np.array([0,0,0,0,0,1.])
xsect_Lay3.calcWarpEffects(force=force)
xsect_Lay3.plotWarped(figName='Warping Displacement Mz',warpScale=0,contour='none')
xsect_Lay3.plotWarped(figName='Warping Displacement Mz',warpScale=5e8,contLim=[0,1e-9])
'''

lam1.printSummary()
lam2.printSummary()
lam3.printSummary()
lam4.printSummary()
laminates_Lay3 = [lam1,lam2,lam3,lam4]
xsect_Lay3 = XSect(4,af2,xdim2,laminates_Lay3,matLib,typeXSect='rectBox',meshSize=1.87)
xsect_Lay3.xSectionAnalysis()
xsect_Lay3.printSummary(stiffMat=True)
xsect_Lay3.calcWarpEffects(force=force)

#import mayavi.mlab as mlab

#xsect_Lay3.plotWarped(figName='Stress sig_11',warpScale=1,contLim=[-500,500],contour='sig_11')
xsect_Lay3.plotWarped(figName='Stress sig_11',warpScale=0,contour='sig_11')
#xsect_Lay3.plotRigid(figName='Stress sig_11')
#mlab.colorbar()

#xsect_Lay3.plotWarped(figName='Stress sig_22',warpScale=1,contLim=[-5075,9365],contour='sig_22')
xsect_Lay3.plotWarped(figName='Stress sig_22',warpScale=0,contour='sig_22')
#mlab.colorbar()
th_1 = [0, 45, 90]
n_1 = [2, 1, 3]
m_1 = [1, 1, 1]
# Notice how the orientations are stored in the 'th_1' array, the subscripts are
# stored in the 'n_1' array, and the material information is held in 'm_1'.
# Create the laminate object:
lam1 = Laminate(n_1, m_1, matLib, th=th_1, sym=True)
# In order to make a cross-section, we must add all of the laminates to be used
# to an array:
laminates1 = [lam1]
# We now have all the information necessary to make a laminate beam cross-
# section:
xsect1 = XSect(1,
               af1,
               xdim1,
               laminates1,
               matLib,
               typeXSect='laminate',
               meshSize=2)
# With the cross-section object initialized, let's run the cross-sectional
# analysis to get cross-section stiffnesses, etc.
xsect1.xSectionAnalysis()
# Let's see what our rigid cross-section looks like when plotted in 3D:
xsect1.plotRigid(mesh=True)
# Note that while it might look like the cross-section is made of triangular
# elements, it's actually made of quadrilaterals. This is an artifact of how
# the visualizer mayavi works. Let's get a summary of the cross-section's
# stiffnesses, ect.
xsect1.printSummary(stiffMat=True)
# Notice that from the command line output, all of the important cross-
# sectional geometric properties are located at the origin. By observing the
Esempio n. 6
0
# generated:
a = 0.91
b = 0.75
r = 0.437 * 2 / 3
xdim3 = [a, b, r]
n_i_1 = [1]
m_i_1 = [1]
lam1 = Laminate(n_i_1, m_i_1, matLib)
# Organize the laminates into an array
laminates_Lay3 = [lam1]
af3 = Airfoil(1., name='NACA2412')
# Create the cross-section object and mesh it
xsect_Lay3 = XSect(4,
                   af3,
                   xdim3,
                   laminates_Lay3,
                   matLib,
                   typeXSect='rectHole',
                   nelem=40)
# Run the cross-sectional analysis. Since this is an airfoil and for this,
# symmetric airfoils the AC is at the 1/c chord, we will put the reference axis
# here
xsect_Lay3.xSectionAnalysis()  #ref_ax=[0.25*c3,0.])
# Let's see what the rigid cross-section looks like:
xsect_Lay3.plotRigid()
# Print the stiffness matrix
xsect_Lay3.printSummary(stiffMat=True)

force3 = np.array([0., 0., 0., 0., 0., 216.])
# Calculate the force resultant effects
xsect_Lay3.calcWarpEffects(force=force3)