# 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) # 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!
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) 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
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
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
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) 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
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 # 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
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 # 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