In [1]:
import pyPLY
from pyPLYTools import LXMatrix
from IPython.display import Latex
CarbonEpoxy = pyPLY.CompositeMaterial()
CarbonEpoxy.define("CarbonEpoxy", "psi", E11=20e6, E22=1.5e6, G12=1e6, niu12=0.29, thk=0.005,
Sigma_ut0 = 310e3, Sigma_uc0 = 310e3, Sigma_ut90 = 6e3, Sigma_uc90 = 30e3, Tau_u = 15e3)
layer1 = pyPLY.Lamina()
layer2 = pyPLY.Lamina()
layer3 = pyPLY.Lamina()
layer4 = pyPLY.Lamina()
layer5 = pyPLY.Lamina()
layer6 = pyPLY.Lamina()
layer7 = pyPLY.Lamina()
layer8 = pyPLY.Lamina()
layer1.define("Layer_1", 1, 45)
layer2.define("Layer_2", 1, -45)
layer3.define("Layer_3", 1, 90)
layer4.define("Layer_4", 1, 0)
layer5.define("Layer_5", 1, 0)
layer6.define("Layer_6", 1, 90)
layer7.define("Layer_7", 1, -45)
layer8.define("Layer_8", 1, 45)
layer1.update()
layer2.update()
layer3.update()
layer4.update()
layer5.update()
layer6.update()
layer7.update()
layer8.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.add_Lamina(layer7)
laminate1.add_Lamina(layer8)
laminate1.update()
In [2]:
Latex("$A = " + LXMatrix(laminate1.A, '.3e', ipython=True) + " lb/in$")
Out[2]:
In [3]:
load1 = pyPLY.Loading()
criterion1 = pyPLY.PlyFailure()
load1.define_Load(1917,0,0,0,0,0,0,0)
load1.apply_To(laminate1)
In [4]:
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])
In [5]:
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])
In [6]:
criterion1.MaxStrainCrit(load1, 0)
print "------------------------layer 1--------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 1)
print "------------------------layer 2---------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 2)
print "------------------------layer 3--------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 3)
print "------------------------layer 4---------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
print "---------------------------------------------------------"
In [7]:
CarbonEpoxyFailed = pyPLY.CompositeMaterial()
CarbonEpoxyFailed.define("CarbonEpoxyFailed", "psi", E11=20e6, E22=0.01, G12=0.01, niu12=0.29, thk=0.005,
Sigma_ut0 = 310e3, Sigma_uc0 = 310e3, Sigma_ut90 = 6e3, Sigma_uc90 = 30e3, Tau_u = 15e3)
layer3.change_Material_No_Lamina(2)
layer6.change_Material_No_Lamina(2)
layer3.update()
layer6.update()
laminate1.replace_Lamina(2, layer3)
laminate1.replace_Lamina(5, layer6)
laminate1.update()
In [8]:
Latex("$A_{degraded} = " + LXMatrix(laminate1.A, '.3e', ipython=True) + " lb/in$")
Out[8]:
Note: again only half of laminate is reported on.
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])
In [10]:
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])
print
In [11]:
criterion1.MaxStrainCrit(load1, 0)
print "------------------------layer 1--------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 1)
print "------------------------layer 2---------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 2)
print "------------------------layer 3--------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 3)
print "------------------------layer 4---------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
print "---------------------------------------------------------"
In [12]:
load1.change_Load(3598.5,0,0,0,0,0,0,0)
load1.apply_To(laminate1)
In [13]:
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])
In [14]:
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])
In [15]:
criterion1.MaxStrainCrit(load1, 0)
print "------------------------layer 1--------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 1)
print "------------------------layer 2---------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 2)
print "------------------------layer 3--------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 3)
print "------------------------layer 4---------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
print "---------------------------------------------------------"
In [16]:
layer1.change_Material_No_Lamina(2)
layer2.change_Material_No_Lamina(2)
layer7.change_Material_No_Lamina(2)
layer8.change_Material_No_Lamina(2)
layer1.update()
layer2.update()
layer7.update()
layer8.update()
laminate1.replace_Lamina(0, layer1)
laminate1.replace_Lamina(1, layer2)
laminate1.replace_Lamina(6, layer7)
laminate1.replace_Lamina(7, layer8)
laminate1.update()
In [17]:
Latex("$A_{degraded} = " + LXMatrix(laminate1.A, '.3e', ipython=True) + " lb/in$")
Out[17]:
In [18]:
# only half of laminate is reported on
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])
In [19]:
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])
In [20]:
criterion1.MaxStrainCrit(load1, 0)
print "------------------------layer 1--------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 1)
print "------------------------layer 2---------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 2)
print "------------------------layer 3--------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 3)
print "------------------------layer 4---------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
print "---------------------------------------------------------"
In [21]:
load1.change_Load(4133.7,0,0,0,0,0,0,0)
load1.apply_To(laminate1)
In [22]:
# only half of laminate is reported on
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])
In [23]:
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])
In [24]:
criterion1.MaxStrainCrit(load1, 0)
print "------------------------layer 1--------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 1)
print "------------------------layer 2---------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 2)
print "------------------------layer 3--------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
criterion1.MaxStrainCrit(load1, 3)
print "------------------------layer 4---------------------------"
print "criterion1.ret_centroid = ", criterion1.ret_centroid
print "---------------------------------------------------------"