In [2]:
import pyPLY
# see other examples for the parameters meaning
GraphiteEpoxy = pyPLY.CompositeMaterial()
GraphiteEpoxy.define("GraphiteEpoxy", "metric", E11=170e9, E22=10e9, G12=13e9, niu12=0.3, thk=0.125e-3,
Sigma_ut0 = 1500e6, Sigma_uc0 = 1200e6, Sigma_ut90 = 50e6, Sigma_uc90 = 100e6, Tau_u = 75e6,
alpha_11 = -0.9e-6, alpha_22 = 27.0e-6, beta_11 = 150e-6, beta_22 = 4800e-6)
layer1 = pyPLY.Lamina()
layer2 = pyPLY.Lamina()
layer3 = pyPLY.Lamina()
layer4 = pyPLY.Lamina()
layer5 = pyPLY.Lamina()
layer6 = pyPLY.Lamina()
layer1.define("Layer_1", 1, 0)
layer2.define("Layer_2", 1, 30)
layer3.define("Layer_3", 1, 60)
layer4.define("Layer_4", 1, 60)
layer5.define("Layer_5", 1, 30)
layer6.define("Layer_6", 1, 0)
layer1.update()
layer2.update()
layer3.update()
layer4.update()
layer5.update()
layer6.update()
laminate1 = pyPLY.Laminate()
laminate1.add_Lamina(layer1)
laminate1.add_Lamina(layer2)
laminate1.add_Lamina(layer3)
laminate1.add_Lamina(layer4)
laminate1.add_Lamina(layer5)
laminate1.add_Lamina(layer6)
laminate1.update()
load1 = pyPLY.Loading()
criterion1 = pyPLY.PlyFailure()
In [3]:
load1.change_Load(0,0,0,0,0,0,-155.0,0)
load1.apply_To(laminate1)
In [4]:
print " plyNo", "sigma11", " sigma22", " tau12"
for i in range (0, 6):
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])
In [5]:
load1.change_Load(1,0,0,0,0,0,0,0)
load1.apply_To(laminate1)
In [6]:
print " plyNo", "sigma11", " sigma22", " tau12"
for i in range (0, 6):
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])
An additional force $Nx = 123 \times 10^3 N/m$ is applied:
In [7]:
load1.change_Load(123.0e3,0,0,0,0,0,-155.0,0)
load1.apply_To(laminate1)
Applying a criterion result in three vectors (lists in Python): ret_bottom, ret_centroid, ret_top each of them containing three values. I.e. ret_centroid is a list of 3 components:
In [8]:
criterion1.MaxStressCrit(load1, 0)
print "------------------------layer 1--------------------------"
print "criterion1.ret_centroid = ", '{0:.4}'.format(criterion1.ret_centroid[0]), \
'{0:.4}'.format(criterion1.ret_centroid[1]),'{0:.4}'.format(criterion1.ret_centroid[2])
criterion1.MaxStressCrit(load1, 1)
print "------------------------layer 2---------------------------"
print "criterion1.ret_centroid = ", '{0:.4}'.format(criterion1.ret_centroid[0]), \
'{0:.4}'.format(criterion1.ret_centroid[1]),'{0:.4}'.format(criterion1.ret_centroid[2])
criterion1.MaxStressCrit(load1, 2)
print "------------------------layer 3--------------------------"
print "criterion1.ret_centroid = ", '{0:.4}'.format(criterion1.ret_centroid[0]), \
'{0:.4}'.format(criterion1.ret_centroid[1]),'{0:.4}'.format(criterion1.ret_centroid[2])
criterion1.MaxStressCrit(load1, 3)
print "------------------------layer 4---------------------------"
print "criterion1.ret_centroid = ", '{0:.4}'.format(criterion1.ret_centroid[0]), \
'{0:.4}'.format(criterion1.ret_centroid[1]),'{0:.4}'.format(criterion1.ret_centroid[2])
criterion1.MaxStressCrit(load1, 4)
print "------------------------layer 5--------------------------"
print "criterion1.ret_centroid = ", '{0:.4}'.format(criterion1.ret_centroid[0]), \
'{0:.4}'.format(criterion1.ret_centroid[1]),'{0:.4}'.format(criterion1.ret_centroid[2])
criterion1.MaxStressCrit(load1, 5)
print "------------------------layer 6---------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
print "---------------------------------------------------------"
In [9]:
from pyPLYTools import LXMatrix
from IPython.display import Latex
data = '$\\begin{array}{|c|c|c|c|} \\hline' + '\n'
data = data + 'PlyNo & \\sigma_{11} / \\sigma_{u0} & \\sigma_{22} / \\sigma_{u90} & \\tau_{12} / \\tau_{u} \\\\ \\hline \n'
for i in range(6):
criterion1.MaxStressCrit(load1, i)
data = data + ' ply~' + str(i) + ' & ' + '{0:.4}'.format(criterion1.ret_centroid[0]) + ' & ' + \
'{0:.4}'.format(criterion1.ret_centroid[1]) + ' & ' + '{0:.4}'.format(criterion1.ret_centroid[2]) + ' \\\\' + '\n'
data = data + '\\hline \\end{array}$'
Latex(data)
Out[9]:
In [9]: