fork download
  1. import numpy as np
  2.  
  3. def CLT(myE1,myE2,myG12,myNu12,myLaminate,myLaminateThickness,myPlyNumber):
  4. #--------------------------------------------------------------------------
  5. #
  6. # This function calculates the ABD Composite Stiffness Matrix Components
  7. # Classical Lamination Theory (CLT)
  8. #
  9. #--------------------------------------------------------------------------
  10.  
  11. i=0
  12. myThickness = myPlyNumber*myLaminateThickness
  13. Z = []
  14. Z.append(-myThickness/2.0)
  15.  
  16. for j in range(1,myPlyNumber+1,1):
  17. Z.append(Z[j-1]+myLaminateThickness)
  18.  
  19. # Calcuate Reduced Stiffnesses
  20.  
  21. myQ11 = []
  22. myQ12 = []
  23. myQ16 = []
  24. myQ22 = []
  25. myQ26 = []
  26. myQ66 = []
  27.  
  28. myQ11_S = []
  29. myQ12_S = []
  30. myQ16_S = []
  31. myQ22_S = []
  32. myQ26_S = []
  33. myQ66_S = []
  34.  
  35. for i in range(0,1,1):
  36. myQ11.append((myE1**2)/(myE1-myNu12**2*myE2))
  37. myQ12.append((myNu12*myE1*myE2)/(myE1-myNu12**2*myE2))
  38. myQ16.append(0)
  39. myQ22.append((myE1*myE2)/(myE1-myNu12**2*myE2))
  40. myQ26.append(0)
  41. myQ66.append(myG12)
  42.  
  43. i=0
  44. for j in range(0,myPlyNumber,1):
  45. myQ11_S.append(myQ11[i]*np.cos(myLaminate[j]*np.pi/180.0)**4 + 2*(myQ12[i]+2*myQ66[i])*(np.cos(myLaminate[j]*np.pi/180.0))**2*(np.sin(myLaminate[j]*np.pi/180.0))**2 + myQ22[i]*(np.sin(myLaminate[j]*np.pi/180.0))**4)
  46. myQ12_S.append(myQ12[i]*((np.cos(myLaminate[j]*np.pi/180.0)**4)+(np.sin(myLaminate[j]*np.pi/180.0)**4))+ (myQ11[i]+myQ22[i]-4*myQ66[i])*np.cos(myLaminate[j]*np.pi/180.0)**2*np.sin(myLaminate[j]*np.pi/180.0)**2)
  47. myQ16_S.append((myQ11[i]-myQ12[i]-2*myQ66[i])*np.cos(myLaminate[j]*np.pi/180.0)**3*np.sin(myLaminate[j]*np.pi/180.0) - (myQ22[i] - myQ12[i] - 2*myQ66[i])*np.cos(myLaminate[j]*np.pi/180.0)*np.sin(myLaminate[j]*np.pi/180.0)**3)
  48. myQ22_S.append(myQ11[i]*np.sin(myLaminate[j]*np.pi/180.0)**4 + 2*(myQ12[i]+2*myQ66[i])*(np.cos(myLaminate[j]*np.pi/180.0))**2*(np.sin(myLaminate[j]*np.pi/180.0))**2 + myQ22[i]*(np.cos(myLaminate[j]*np.pi/180.0))**4)
  49. myQ26_S.append((myQ11[i]-myQ12[i]-2*myQ66[i])*np.cos(myLaminate[j]*np.pi/180.0)*np.sin(myLaminate[j]*np.pi/180.0)**3 - (myQ22[i] - myQ12[i] - 2*myQ66[i])*np.cos(myLaminate[j]*np.pi/180.0)**3*np.sin(myLaminate[j]*np.pi/180.0))
  50. myQ66_S.append((myQ11[i] + myQ22[i] - 2*myQ12[i] - 2*myQ66[i])*np.cos(myLaminate[j]*np.pi/180.0)**2*np.sin(myLaminate[j]*np.pi/180.0)**2 + myQ66[i]*(np.cos(myLaminate[j]*np.pi/180.0)**4+np.sin(myLaminate[j]*np.pi/180.0)**4))
  51.  
  52.  
  53.  
  54. # Calcualte A Matrix
  55. #-------------
  56.  
  57. A11_v = []
  58. A12_v = []
  59. A16_v = []
  60. A22_v = []
  61. A26_v = []
  62. A66_v = []
  63. i = 1
  64. for j in range(0,myPlyNumber,1):
  65. A11_v.append(myQ11_S[j]*(Z[i]-Z[i-1]))
  66. A12_v.append(myQ12_S[j]*(Z[i]-Z[i-1]))
  67. A16_v.append(myQ16_S[j]*(Z[i]-Z[i-1]))
  68. A22_v.append(myQ22_S[j]*(Z[i]-Z[i-1]))
  69. A26_v.append(myQ26_S[j]*(Z[i]-Z[i-1]))
  70. A66_v.append(myQ66_S[j]*(Z[i]-Z[i-1]))
  71. i = i+1
  72.  
  73. A11 = sum(A11_v)
  74. A12 = sum(A12_v)
  75. A16 = sum(A16_v)
  76. A22 = sum(A22_v)
  77. A26 = sum(A26_v)
  78. A66 = sum(A66_v)
  79.  
  80. # Calcualte B Matrix
  81. #-------------
  82.  
  83. B11_v = []
  84. B12_v = []
  85. B16_v = []
  86. B22_v = []
  87. B26_v = []
  88. B66_v = []
  89. i = 1
  90. for j in range(0,myPlyNumber,1):
  91. B11_v.append(0.5*myQ11_S[j]*(Z[i]**2-Z[i-1]**2))
  92. B12_v.append(0.5*myQ12_S[j]*(Z[i]**2-Z[i-1]**2))
  93. B16_v.append(0.5*myQ16_S[j]*(Z[i]**2-Z[i-1]**2))
  94. B22_v.append(0.5*myQ22_S[j]*(Z[i]**2-Z[i-1]**2))
  95. B26_v.append(0.5*myQ26_S[j]*(Z[i]**2-Z[i-1]**2))
  96. B66_v.append(0.5*myQ66_S[j]*(Z[i]**2-Z[i-1]**2))
  97. i = i+1
  98.  
  99.  
  100.  
  101.  
  102. B11 = sum(B11_v)
  103. B12 = sum(B12_v)
  104. B16 = sum(B16_v)
  105. B22 = sum(B22_v)
  106. B26 = sum(B26_v)
  107. B66 = sum(B66_v)
  108.  
  109. # Calcualte D Matrix
  110. #-------------
  111.  
  112. D11_v = []
  113. D12_v = []
  114. D16_v = []
  115. D22_v = []
  116. D26_v = []
  117. D66_v = []
  118. i = 1
  119. for j in range(0,myPlyNumber,1):
  120. D11_v.append((1/3.0)*myQ11_S[j]*(Z[i]**3-Z[i-1]**3))
  121. D12_v.append((1/3.0)*myQ12_S[j]*(Z[i]**3-Z[i-1]**3))
  122. D16_v.append((1/3.0)*myQ16_S[j]*(Z[i]**3-Z[i-1]**3))
  123. D22_v.append((1/3.0)*myQ22_S[j]*(Z[i]**3-Z[i-1]**3))
  124. D26_v.append((1/3.0)*myQ26_S[j]*(Z[i]**3-Z[i-1]**3))
  125. D66_v.append((1/3.0)*myQ66_S[j]*(Z[i]**3-Z[i-1]**3))
  126. i = i+1
  127.  
  128.  
  129. D11 = sum(D11_v)
  130. D12 = sum(D12_v)
  131. D16 = sum(D16_v)
  132. D22 = sum(D22_v)
  133. D26 = sum(D26_v)
  134. D66 = sum(D66_v)
  135. return A11,A12,A16,A22,A26,A66,B11,B12,B16,B22,B26,B66,D11,D12,D16,D22,D26,D66
  136.  
  137.  
  138.  
  139. #-----------------------------------------------------------------------------------------------
  140.  
  141. # def CLT(myE11,myE22,myG12,myNu12,myLaminate,myLaminateThickness,myPlyNumber):
  142. # ANY VALUES OF FIBER MATERIAL CAN BE ADDED HERE
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149. myE1 = 141 # Laminate E1 [Gpa]
  150. myE2 = 6.7 # Laminate E2 [Gpa]
  151. myNu12 = 0.33 # Laminate nu12 [-]
  152. myG12 = 3.2 # Laminate G12 [Gpa]
  153.  
  154.  
  155.  
  156. myLaminate = [90,0,90,0,0,90,0,90]
  157. myPlyNumber = len(myLaminate)
  158. myLaminateThickness = 0.001
  159.  
  160.  
  161. A11,A12,A16,A22,A26,A66,B11,B12,B16,B22,B26,B66,D11,D12,D16,D22,D26,D66 = CLT(myE1,myE2,myG12,myNu12,myLaminate,myLaminateThickness,myPlyNumber)
  162.  
  163.  
Success #stdin #stdout 0.1s 23540KB
stdin
Standard input is empty
stdout
Standard output is empty