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) # This time let's plot the max principle stress: xsect_Lay3.plotWarped(figName='sigma_xz',\ warpScale=10,contour='sig_13',colorbar=True) xsect_Lay3.plotWarped(figName='sigma_yz',\ warpScale=10,contour='sig_23',colorbar=True) xsect_Lay3.plotWarped(figName='RSS Shear',\ warpScale=10,contour='rss_shear',colorbar=True) xsect_Lay3.plotWarped(figName='Axial Stress',\ warpScale=10,contour='sig_33',colorbar=True)
xsect_Lay3 = XSect(4,af3,xdim3,laminates_Lay3,matLib,typeXSect='box',meshSize=2) # 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) # Create an applied force vector. For a wing shape such as this, let's apply a # semi-realistic set of loads: force3 = np.array([10.,100.,0.,10.,1.,0.]) # Calculate the force resultant effects xsect_Lay3.calcWarpEffects(force=force3) # This time let's plot the max principle stress: xsect_Lay3.plotWarped(figName='NACA2412 Box Beam Max Principle Stress',\ warpScale=10,contour='MaxPrin',colorbar=True) # Establish Matricies A = xsect_Lay3.A R = xsect_Lay3.R E = xsect_Lay3.E C = xsect_Lay3.C L = xsect_Lay3.L M = xsect_Lay3.M D = xsect_Lay3.D Z6 = np.zeros((6,6)) nd = 3*len(xsect_Lay3.nodeDict) Tr = np.zeros((6,6));Tr[0,4] = -1;Tr[1,3] = 1 @profile def luDecomp():
''' 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() #xsect_Lay3.plotWarped(figName='Stress sig_33',warpScale=1,contLim=[25762,293000],contour='sig_33') xsect_Lay3.plotWarped(figName='Stress sig_33',warpScale=0,contour='sig_33') #mlab.colorbar() #xsect_Lay3.plotWarped(figName='Stress sig_12',warpScale=1,contLim=[-2932,3116],contour='sig_12') xsect_Lay3.plotWarped(figName='Stress sig_12',warpScale=0,contour='sig_12') #mlab.colorbar()
# 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 # cross-section stiffness matrix, it can be seen by the 1,3 entry that there # is shear-axial coupling. From the non-zero 4,6 entry, we can also tell that # the cross-section has bending-torsion coupling. # We can apply a force to the face of this cross-section at the reference axis # (which in this case is at x,y = 0,0) and see what the stresses look like. In # this case we'll apply [Fx,Fy,Fz,Mx,My,Mz]=[0.,0.,0.,100.,0.,0.] as if the # beam belonging to this cross-section were in pure bending. force1 = np.array([0., 100., 0., 10., 0., 0.]) xsect1.calcWarpEffects(force=force1) # Having applied the force, let's see what the sigma_zz (normal stresses of the # beam) look like xsect1.plotWarped(figName='Laminate Sigma_33 Stress',warpScale=10,\ contour='sig_33',colorbar=True) # Let's look at the sigma_13 stress state now since we know there is torsion # coupling: xsect1.plotWarped(figName='Laminate Sigma_13 Stress',warpScale=10,\ contour='sig_13',colorbar=True) # Notice the increased stress in two of the plies? Recall which ones those are? # Those plies are the 45 degree plies which are currently taking the shear! # CREATE A LAMIANTE CROSS-SECTION WITH A DIFFERENT REFERENCE AXIS # =============================================================== # The cross-section we just made happened to have all of it's geometrical # locations (mass center, shear center, tension center) at the origin, which # is where we applied our force resultant. Suppose we wanted to give the cross- # section a different reference axis. We can do this by executing the # xSectionAnalysis method again: ref_ax = [.5, 0.]
# 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 # cross-section stiffness matrix, it can be seen by the 1,3 entry that there # is shear-axial coupling. From the non-zero 4,6 entry, we can also tell that # the cross-section has bending-torsion coupling. # We can apply a force to the face of this cross-section at the reference axis # (which in this case is at x,y = 0,0) and see what the stresses look like. In # this case we'll apply [Fx,Fy,Fz,Mx,My,Mz]=[0.,0.,0.,100.,0.,0.] as if the # beam belonging to this cross-section were in pure bending. force1 = np.array([0.,100.,0.,10.,0.,0.]) xsect1.calcWarpEffects(force=force1) # Having applied the force, let's see what the sigma_zz (normal stresses of the # beam) look like xsect1.plotWarped(figName='Laminate Sigma_33 Stress',warpScale=10,\ contour='sig_33',colorbar=True) # Let's look at the sigma_13 stress state now since we know there is torsion # coupling: xsect1.plotWarped(figName='Laminate Sigma_13 Stress',warpScale=10,\ contour='sig_13',colorbar=True) # Notice the increased stress in two of the plies? Recall which ones those are? # Those plies are the 45 degree plies which are currently taking the shear! # CREATE A LAMIANTE CROSS-SECTION WITH A DIFFERENT REFERENCE AXIS # =============================================================== # The cross-section we just made happened to have all of it's geometrical # locations (mass center, shear center, tension center) at the origin, which # is where we applied our force resultant. Suppose we wanted to give the cross- # section a different reference axis. We can do this by executing the # xSectionAnalysis method again: ref_ax = [.5,0.]
meshSize=2) # 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) # Create an applied force vector. For a wing shape such as this, let's apply a # semi-realistic set of loads: force3 = np.array([10., 100., 0., 10., 1., 0.]) # Calculate the force resultant effects xsect_Lay3.calcWarpEffects(force=force3) # This time let's plot the max principle stress: xsect_Lay3.plotWarped(figName='NACA2412 Box Beam Max Principle Stress',\ warpScale=10,contour='MaxPrin',colorbar=True) # Establish Matricies A = xsect_Lay3.A R = xsect_Lay3.R E = xsect_Lay3.E C = xsect_Lay3.C L = xsect_Lay3.L M = xsect_Lay3.M D = xsect_Lay3.D Z6 = np.zeros((6, 6)) nd = 3 * len(xsect_Lay3.nodeDict) Tr = np.zeros((6, 6)) Tr[0, 4] = -1 Tr[1, 3] = 1
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) # This time let's plot the max principle stress: xsect_Lay3.plotWarped(figName='sigma_xz',\ warpScale=10,contour='sig_13',colorbar=True) xsect_Lay3.plotWarped(figName='sigma_yz',\ warpScale=10,contour='sig_23',colorbar=True) xsect_Lay3.plotWarped(figName='RSS Shear',\ warpScale=10,contour='rss_shear',colorbar=True) xsect_Lay3.plotWarped(figName='Axial Stress',\ warpScale=10,contour='sig_33',colorbar=True)