In [2]:
import pyPLY
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 = 4800)
layer1 = pyPLY.Lamina()
layer2 = pyPLY.Lamina()
layer3 = pyPLY.Lamina()
layer1.define("Layer_1", 1, 30)
layer2.define("Layer_2", 1, 0)
layer3.define("Layer_3", 1, 90)
layer1.update()
layer2.update()
layer3.update()
laminate1 = pyPLY.Laminate()
laminate1.add_Lamina(layer1)
laminate1.add_Lamina(layer2)
laminate1.add_Lamina(layer3)
laminate1.update()
load1 = pyPLY.Loading()
load1.define_Load(50000,-10000,0,1,-1,0,0,0)
load1.apply_To(laminate1)
In [3]:
from pyPLYTools import LXMatrix
from IPython.display import Latex
Latex("$abd = " + LXMatrix(laminate1.abd, '.3e', ipython=True) + "$")
Out[3]:
In [8]:
Latex("$\epsilon_K = " + LXMatrix(load1.epsilon_K, '.3e', ipython=True) + "$")
Out[8]:
Note: In pyPLY applying a load to a laminate the return is a list of strains measured at the top, centroid and bottom of the each ply. For example to extract the bottom strains for the second ply one would do:
In [21]:
# 2 = plyno, 3x component per ply ("epsx", "epsy", "gammaxy"), 0 is the bottom component (1 is centroid, 2 is top component).
strainPly2 = load1.list_ply_strains_xy[2*3 + 0]
print strainPly2
In [13]:
print " plyNo", "epsx", " epsy", " gammaxy"
for i in range (0, 3):
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])
Note: In the same manner, applying a load to a laminate the return has also a list of stresses measured at the top, centroid and bottom of the each ply. For example to extract the bottom stress for the second ply one would do:
In [19]:
# 2 = plyno, 3x component per ply ("sigmax", "sigmay", "tauxy"), 0 the bottom component.
stressPly2 = load1.list_ply_stresses_xy[2*3 + 0]
print stressPly2
In [14]:
print " plyNo", "sigmax", " sigmay", " tauxy"
for i in range (0, 3):
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])
In [ ]: