# Box Configuration 2 c2 = 0.53 xdim2 = [-0.8990566037735849, 0.8990566037735849] af2 = Airfoil(c2, name='box') # B1 Box beam (0.5 x 0.923 in^2 box with laminate schedule [15]_6) n_i_B1 = [6] m_i_B1 = [2] th_B1 = [-15] lam1_B1 = Laminate(n_i_B1, m_i_B1, matLib, th=th_B1) lam2_B1 = Laminate(n_i_B1, m_i_B1, matLib, th=th_B1) lam3_B1 = Laminate(n_i_B1, m_i_B1, matLib, th=th_B1) lam4_B1 = Laminate(n_i_B1, m_i_B1, matLib, th=th_B1) lam1_B1.printPlies() laminates_B1 = [lam1_B1, lam2_B1, lam3_B1, lam4_B1] xsect_B1 = XSect(af2, xdim2, laminates_B1, matLib, typeXsect='box', meshSize=2) import time t1 = time.time() # With lu factorization xsect_B1.xSectionAnalysis() xsect_B1.printStiffMat() t2 = time.time() # With linalg.solve xsect_B1.xSectionAnalysis(linalgSolve=True) xsect_B1.printStiffMat() t3 = time.time() # With cholesky xsect_B1.xSectionAnalysis(sparse=True) xsect_B1.printStiffMat() t4 = time.time()
xdim2 = [-0.8990566037735849,0.8990566037735849] af2 = Airfoil(c2,name='box') # B1 Box beam (0.5 x 0.923 in^2 box with laminate schedule [15]_6) n_i_B1 = [6] m_i_B1 = [2] th_B1 = [-15] lam1_B1 = Laminate(n_i_B1, m_i_B1, matLib, th=th_B1) lam2_B1 = Laminate(n_i_B1, m_i_B1, matLib, th=th_B1) lam3_B1 = Laminate(n_i_B1, m_i_B1, matLib, th=th_B1) lam4_B1 = Laminate(n_i_B1, m_i_B1, matLib, th=th_B1) lam1_B1.printPlies() laminates_B1 = [lam1_B1,lam2_B1,lam3_B1,lam4_B1] xsect_B1 = XSect(af2,xdim2,laminates_B1,matLib,typeXsect='box',meshSize=2) import time t1 = time.time() # With lu factorization xsect_B1.xSectionAnalysis() xsect_B1.printStiffMat() t2 = time.time() # With linalg.solve xsect_B1.xSectionAnalysis(linalgSolve=True) xsect_B1.printStiffMat() t3 = time.time() # With cholesky xsect_B1.xSectionAnalysis(sparse=True) xsect_B1.printStiffMat() t4 = time.time()
n_i_4 = [1, 1, 1, 1, 1, 1] m_i_4 = [1, 1, 1, 1, 1, 1] th_4 = [-15, 15, -15, 15, -15, 15] lam4 = Laminate(n_i_4, m_i_4, matLib, th=th_4) lam1.printPlies() lam2.printPlies() lam3.printPlies() lam4.printPlies() laminates_Lay3 = [lam1, lam2, lam3, lam4] xsectDict = {} for i in range(len(cs)): xsectDict['xsect' + str(i)] = XSect(Airfoil(cs[i], name='box'), xdim, laminates_Lay3, matLib, typeXsect='box', meshSize=4) xsectDict['xsect' + str(i)].xSectionAnalysis() #xsectDict['xsect'+str(i)].strn2dspl(strn,figName='xsect'+str(i),contour_Total_T=True) ''' xsect1 = XSect(af1,xdim,laminates_Lay3,matLib,typeXsect='box',meshSize=4) xsect2 = XSect(af2,xdim,laminates_Lay3,matLib,typeXsect='box',meshSize=4) xsect3 = XSect(af3,xdim,laminates_Lay3,matLib,typeXsect='box',meshSize=4) xsect4 = XSect(af4,xdim,laminates_Lay3,matLib,typeXsect='box',meshSize=4) xsect5 = XSect(af5,xdim,laminates_Lay3,matLib,typeXsect='box',meshSize=4) xsect6 = XSect(af6,xdim,laminates_Lay3,matLib,typeXsect='box',meshSize=4) xsect7 = XSect(af7,xdim,laminates_Lay3,matLib,typeXsect='box',meshSize=4) xsect8 = XSect(af8,xdim,laminates_Lay3,matLib,typeXsect='box',meshSize=4) xsect9 = XSect(af9,xdim,laminates_Lay3,matLib,typeXsect='box',meshSize=4) xsect10 = XSect(af10,xdim,laminates_Lay3,matLib,typeXsect='box',meshSize=4)
xsect_B1.printStiffMat() strn = np.array([0.,0.,0.,0.,0.,1.0]) xsect_B1.strn2dspl(strn,figName='Validation Case B1',contour_Total_T=True) ''' # Layup 1 Box beam (0.5 x 0.923 in^2 box with laminate schedule [0]_6) 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) lam1_Lay1.printPlies() laminates_Lay1 = [lam1_Lay1,lam2_Lay1,lam3_Lay1,lam4_Lay1] xsect_Lay1 = XSect(af2,xdim2,laminates_Lay1,matLib,typeXsect='box',meshSize=2) xsect_Lay1.xSectionAnalysis() xsect_Lay1.printStiffMat() #xsect_Lay1.strn2dspl(strn,figName='Validation Case Layup 1',contour_Total_T=True) xsect_Lay1_off = XSect(af2,xdim2_off,laminates_Lay1,matLib,typeXsect='box',meshSize=2) xsect_Lay1_off.xSectionAnalysis() Ktmp = xsect_Lay1_off.K print('\n\nThe cross-section stiffness matrix is:') print(tabulate(np.around(Ktmp,decimals=2),tablefmt="fancy_grid")) xsc,ysc = xsect_Lay1_off.genXYSC() xsc = -xsc ysc = -ysc