Example 4 page 51 from "Basic Mechanics of Laminated Composite Plates"

# A.T. Nettles
# NASA Reference Publication 1351

In [1]:
import pyPLY

In [2]:
# define the material. An example on how to define material's extended properties.
AS4_3501_6 = pyPLY.CompositeMaterial()
AS4_3501_6.define("AS4_3501_6", "imperial", E11=20010000.0, E22=1301000.0, G12=1001000.0, niu12=0.3, thk=0.005,
             Sigma_ut0 = 616.0, Sigma_uc0 = 355.0, Sigma_ut90 = 42.0, Sigma_uc90 = 105.0, Tau_u = 50.0,
             alpha_11 = -0.04e-6, alpha_22 = 18.0e-6, beta_11 = 0.01, beta_22 = 0.35)

# define the ply's layers.
layer1 = pyPLY.Lamina()
layer2 = pyPLY.Lamina()
layer3 = pyPLY.Lamina()
layer4 = pyPLY.Lamina()

# define the properties of each layer.
# the parameters are "layer's name", "material number", "ply angle".
layer1.define("Layer_1", 1, 0)
layer2.define("Layer_2", 1, 45)
layer3.define("Layer_3", 1, 45)
layer4.define("Layer_4", 1, 0)

# update the properties. Required after each change of properties.
layer1.update()
layer2.update()
layer3.update()
layer4.update()

# add each defined layer to the laminate stack.
laminate1 = pyPLY.Laminate()
laminate1.add_Lamina(layer1)
laminate1.add_Lamina(layer2)
laminate1.add_Lamina(layer3)
laminate1.add_Lamina(layer4)

# update the properties. Required after each change of properties.
laminate1.update()

# define the loading case.
# the parameters are Nx, Ny, Nz, Mx, My, Mz, DeltaT, DeltaM
load1 = pyPLY.Loading()
load1.define_Load(500,0,0,0,0,0,-155.6,0)
load1.apply_To(laminate1)

In [3]:
# after update one can print the laminate properties.
print "A = ", laminate1.A
print "B = ", laminate1.B


A =  [[ 266841.87075194   49470.0519381    47047.80371499]
 [  49470.0519381    78650.65589197   47047.80371499]
 [  47047.80371499   47047.80371499   61638.10569193]]
B =  [[  0.00000000e+00  -1.59872116e-14  -2.84217094e-14]
 [ -1.59872116e-14  -3.55271368e-14  -2.13162821e-14]
 [ -2.84217094e-14  -2.84217094e-14  -2.13162821e-14]]

In [4]:
# pretty print the ply strains and stresses in xy and 12 directions.
# print the thermal induced load
print "Thermal Load = ", load1.thermal_load


Thermal Load =  [[ -3.29288937e+01]
 [ -5.98142310e+01]
 [  1.34426686e+01]
 [  1.38777878e-17]
 [  2.77555756e-17]
 [ -6.93889390e-18]]

In [5]:
print "epsilon_K = ", load1.epsilon_K


epsilon_K =  [[  2.11376694e-03]
 [ -2.31016376e-03]
 [  3.67998136e-04]
 [ -5.43536681e-19]
 [ -9.17305206e-18]
 [ -8.54843925e-19]]

In [6]:
print "     layerNo", "epsx", " epsy", " gammaxy"
for i in range (0, 4):
    strain = load1.list_ply_strains_xy[i*3 + 0]
    print "bottom  ", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])
    strain = load1.list_ply_strains_xy[i*3 + 1]
    print "centroid", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])
    strain = load1.list_ply_strains_xy[i*3 + 2]
    print "top     ", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])


     layerNo epsx  epsy  gammaxy
bottom   1 +0.002114 -0.00231 +0.000368
centroid 1 +0.002114 -0.00231 +0.000368
top      1 +0.002114 -0.00231 +0.000368
bottom   2 +0.002114 -0.00231 +0.000368
centroid 2 +0.002114 -0.00231 +0.000368
top      2 +0.002114 -0.00231 +0.000368
bottom   3 +0.002114 -0.00231 +0.000368
centroid 3 +0.002114 -0.00231 +0.000368
top      3 +0.002114 -0.00231 +0.000368
bottom   4 +0.002114 -0.00231 +0.000368
centroid 4 +0.002114 -0.00231 +0.000368
top      4 +0.002114 -0.00231 +0.000368

In [7]:
print "     layerNo", "sigmax", "    sigmay", "    sigmaxy"
for i in range (0, 4):
    stress = load1.list_ply_stresses_xy[i*3 + 0]
    print "bottom  ", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])
    stress = load1.list_ply_stresses_xy[i*3 + 1]
    print "centroid", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])
    stress = load1.list_ply_stresses_xy[i*3 + 2]
    print "top     ", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])


     layerNo sigmax     sigmay     sigmaxy
bottom   1 +4.261e+04 +1469.0 +368.4
centroid 1 +4.261e+04 +1469.0 +368.4
top      1 +4.261e+04 +1469.0 +368.4
bottom   2 +7387.0 -1469.0 -368.4
centroid 2 +7387.0 -1469.0 -368.4
top      2 +7387.0 -1469.0 -368.4
bottom   3 +7387.0 -1469.0 -368.4
centroid 3 +7387.0 -1469.0 -368.4
top      3 +7387.0 -1469.0 -368.4
bottom   4 +4.261e+04 +1469.0 +368.4
centroid 4 +4.261e+04 +1469.0 +368.4
top      4 +4.261e+04 +1469.0 +368.4

In [8]:
print "     layerNo", "eps11", "      eps22", "    gamma12"
for i in range (0, 4):
    strain = load1.list_ply_strains_12[i*3 + 0]
    print "bottom  ", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])
    strain = load1.list_ply_strains_12[i*3 + 1]
    print "centroid", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])
    strain = load1.list_ply_strains_12[i*3 + 2]
    print "top     ", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])


     layerNo eps11       eps22     gamma12
bottom   1 +0.002114 -0.00231 +0.000368
centroid 1 +0.002114 -0.00231 +0.000368
top      1 +0.002114 -0.00231 +0.000368
bottom   2 +8.58e-05 -0.0002822 -0.004424
centroid 2 +8.58e-05 -0.0002822 -0.004424
top      2 +8.58e-05 -0.0002822 -0.004424
bottom   3 +8.58e-05 -0.0002822 -0.004424
centroid 3 +8.58e-05 -0.0002822 -0.004424
top      3 +8.58e-05 -0.0002822 -0.004424
bottom   4 +0.002114 -0.00231 +0.000368
centroid 4 +0.002114 -0.00231 +0.000368
top      4 +0.002114 -0.00231 +0.000368

In [9]:
print "     layerNo", "sigma11", "      sigma22", "    tau12"
for i in range (0, 4):
    stress = load1.list_ply_stresses_12[i*3 + 0]
    print "bottom  ", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4e}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])
    stress = load1.list_ply_stresses_12[i*3 + 1]
    print "centroid", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4e}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])
    stress = load1.list_ply_stresses_12[i*3 + 2]
    print "top     ", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4e}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])
    print


     layerNo sigma11       sigma22     tau12
bottom   1 +4.261e+04 +1.4695e+03 +368.4
centroid 1 +4.261e+04 +1.4695e+03 +368.4
top      1 +4.261e+04 +1.4695e+03 +368.4

bottom   2 +2590.0 +3.3272e+03 -4428.0
centroid 2 +2590.0 +3.3272e+03 -4428.0
top      2 +2590.0 +3.3272e+03 -4428.0

bottom   3 +2590.0 +3.3272e+03 -4428.0
centroid 3 +2590.0 +3.3272e+03 -4428.0
top      3 +2590.0 +3.3272e+03 -4428.0

bottom   4 +4.261e+04 +1.4695e+03 +368.4
centroid 4 +4.261e+04 +1.4695e+03 +368.4
top      4 +4.261e+04 +1.4695e+03 +368.4