Example 1 page 31 from "Basic Mechanics of Laminated Composite Plates" A.T. Nettles NASA Reference Publication 1351

# Start by importing the pyPLY module.


In [1]:
import pyPLY

# Define the ply material.
# First by instantiating an object of "pyPLY.CompositeMaterial" class.
# Define the parameters:
"name string" - it can be any string, not necessarily unique (used for printing purposes only).
"units" - the units used need to be consistent, the string is informative only. In our case Young's Modulus is measured in lb/sqin and the thickness in in.
"E11" - Young's Modulus in 1,1 direction (measured along fibres).
"E22" - Young's Modulus in 2,2 direction (measured perpendicular on fibres).
"G12" - Shear Modulus in 1,1 direction.
"niu12" - Poisson ratio in 1,1 direction.
"thk" - ply thickness.
This set is the minimal set of parameters required for calculations. Extended characteristics (like strength) can be added - see separate examples.


In [2]:
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)

# Define four layers.


In [3]:
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".
# "layer's name" can be any string (it doesn't need to be unique - in this version of pyPLY at least).
# "material number" can be the i-th material defined here or its variable name.
# "ply angle" is in degrees.


In [4]:
layer1.define("Layer_1", 1, 0)
layer2.define("Layer_2", AS4_3501_6, -45)
layer3.define("Layer_3", AS4_3501_6, 45)
layer4.define("Layer_4", 1, 0)

# Update the properties. Required after each change of properties.


In [5]:
layer1.update()
layer2.update()
layer3.update()
layer4.update()

# Add each defined layer to the laminate stack


In [6]:
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.


In [7]:
laminate1.update()

[QU] is an array of laminate's Q-bar matrices (in the defined order).
# Print the results in Python console ...


In [8]:
print "For the 0degree plies:"
print "---------------------------"
print "Qbar11 = ", '{0:10.0f}'.format(laminate1.QU[0][0,0])
print "Qbar12 = ", '{0:10.0f}'.format(laminate1.QU[0][0,1])
print "Qbar22 = ", '{0:10.0f}'.format(laminate1.QU[0][1,1])
print "Qbar16 = ", '{0:10.0f}'.format(laminate1.QU[0][1,2])
print "Qbar26 = ", '{0:10.0f}'.format(laminate1.QU[0][2,1])
print "Qbar66 = ", '{0:10.0f}'.format(laminate1.QU[0][2,2])
print "---------------------------"
print "For the +/-45degree plies:"
print "---------------------------"
print "Qbar11 = ", '{0:10.0f}'.format(laminate1.QU[1][0,0])
print "Qbar12 = ", '{0:10.0f}'.format(laminate1.QU[1][0,1])
print "Qbar22 = ", '{0:10.0f}'.format(laminate1.QU[1][1,1])
print "Qbar16 = ", '{0:10.0f}'.format(laminate1.QU[1][1,2])
print "Qbar26 = ", '{0:10.0f}'.format(laminate1.QU[1][2,1])
print "Qbar66 = ", '{0:10.0f}'.format(laminate1.QU[1][2,2])
print "---------------------------"
print "Young Modulus:"
print "---------------------------"
print "A11 = ", '{0:10.0f}'.format(laminate1.A[0,0])
print "A12 = ", '{0:10.0f}'.format(laminate1.A[0,1])
print "A22 = ", '{0:10.0f}'.format(laminate1.A[1,1])
print "A16 = ", '{0:10.0f}'.format(laminate1.A[1,2])
print "A26 = ", '{0:10.0f}'.format(laminate1.A[2,1])
print "A66 = ", '{0:10.0f}'.format(laminate1.A[2,2])
print "---------------------------"
print "Young Modulus:"
print "---------------------------"
print "Ex = ", '{0:10.0f}'.format(laminate1.Ex)


For the 0degree plies:
---------------------------
Qbar11 =    20127779
Qbar12 =      392597
Qbar22 =     1308658
Qbar16 =           0
Qbar26 =           0
Qbar66 =     1001000
---------------------------
For the +/-45degree plies:
---------------------------
Qbar11 =     6556408
Qbar12 =     4554408
Qbar22 =     6556408
Qbar16 =    -4704780
Qbar26 =    -4704780
Qbar66 =     5162811
---------------------------
Young Modulus:
---------------------------
A11 =      266842
A12 =       49470
A22 =       78651
A16 =          -0
A26 =          -0
A66 =       61638
---------------------------
Young Modulus:
---------------------------
Ex =    11672709

# ... or print the same results in LATEX style. For this one needs to import LXMatrix function from pyPLYTools.py module.


In [9]:
from pyPLYTools import LXMatrix
from IPython.display import Latex

Latex("$Q_{0,90} = " + LXMatrix(laminate1.QU[0], '.3e', ipython=True) + "$")


Out[9]:
$Q_{0,90} = \left[\begin{array}{ccc} 2.013e+07 & 3.926e+05 & 0.000e+00\\ 3.926e+05 & 1.309e+06 & 0.000e+00\\ 0.000e+00 & 0.000e+00 & 1.001e+06 \end{array}\right]$

In [10]:
Latex("$Q_{+/-45} = " + LXMatrix(laminate1.QU[1], '.3e', ipython=True) + "$")


Out[10]:
$Q_{+/-45} = \left[\begin{array}{ccc} 6.556e+06 & 4.554e+06 & -4.705e+06\\ 4.554e+06 & 6.556e+06 & -4.705e+06\\ -4.705e+06 & -4.705e+06 & 5.163e+06 \end{array}\right]$

In [11]:
Latex("$A = " + LXMatrix(laminate1.A, '.3e', ipython=True) + "$")


Out[11]:
$A = \left[\begin{array}{ccc} 2.668e+05 & 4.947e+04 & -3.638e-12\\ 4.947e+04 & 7.865e+04 & -3.638e-12\\ -3.638e-12 & -3.638e-12 & 6.164e+04 \end{array}\right]$

In [12]:
Latex("$E_x = " + '{0:10.0f}'.format(laminate1.Ex) + "$")


Out[12]:
$E_x = 11672709$