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
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
In [5]:
print "epsilon_K = ", load1.epsilon_K
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])
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])
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])
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