Previously implemented functions:
from compositelib import fE_maxstress, fE_maxstrain, fE_tsaiwu, fE_hashin
Material properties for the examples:
import matlib
m1=matlib.get('Carbon/Epoxy(a)')
import matplotlib.pyplot as plt
%matplotlib inline
fig,ax = plt.subplots(figsize=(8,4))
# empty list of normal stresses in the 1-2 plane:
s1_MS,s2_MS=[],[] # maximum stress
s1_ME,s2_ME=[],[] # maximum strain
s1_TW,s2_TW=[],[] # tsai-wu
from math import cos,sin,radians
for a in range(0,3600):
s1i=cos(radians(a/10))
s2i=sin(radians(a/10))
feMS=fE_maxstress((s1i,s2i,0,0,0,0),m1)
feME=fE_maxstrain((s1i,s2i,0,0,0,0),m1)
feTW=fE_tsaiwu((s1i,s2i,0,0,0,0),m1)
# then scaling by the load-proportionality ratio (1/fE):
s1_MS.append(s1i/feMS)
s2_MS.append(s2i/feMS)
s1_ME.append(s1i/feME)
s2_ME.append(s2i/feME)
s1_TW.append(s1i/feTW)
s2_TW.append(s2i/feTW)
ax.plot(s1_MS,s2_MS,'--',color='black',label='Max Stress',linewidth=1)
ax.plot(s1_ME,s2_ME,'--',color='blue',label='Max Strain',linewidth=1)
ax.plot(s1_TW,s2_TW,'--',color='green',label='Tsai-Wu',linewidth=1)
ax.plot((0,),(0,),'+',color='black',markersize=50)
ax.grid(True)
ax.legend(loc='best')
ax.set_xlabel(r'$\sigma_1$',fontsize=14)
ax.set_ylabel(r'$\sigma_2$',fontsize=14)
plt.tight_layout()
import matplotlib.pyplot as plt
%matplotlib inline
fig,ax = plt.subplots(figsize=(6,6))
s2_MS,s3_MS=[],[]
s2_ME,s3_ME=[],[]
s2_TW,s3_TW=[],[]
s2_HH,s3_HH=[],[]
from math import cos,sin,radians
for a in range(0,3600):
s2i=cos(radians(a/10))
s3i=sin(radians(a/10))
feMS=fE_maxstress((0,s2i,s3i,0,0,0),m1)
feME=fE_maxstrain((0,s2i,s3i,0,0,0),m1)
feTW=fE_tsaiwu((0,s2i,s3i,0,0,0),m1)
feHH=fE_hashin((0,s2i,s3i,0,0,0),m1)[1]
# then scaling by the load-proportionality ratio (1/fE):
s2_MS.append(s2i/feMS)
s3_MS.append(s3i/feMS)
s2_ME.append(s2i/feME)
s3_ME.append(s3i/feME)
s2_TW.append(s2i/feTW)
s3_TW.append(s3i/feTW)
if feHH>0:
s2_HH.append(s2i/feHH)
s3_HH.append(s3i/feHH)
ax.plot(s2_MS,s3_MS,'--',color='black',label='Max Stress',linewidth=1)
ax.plot(s2_ME,s3_ME,'--',color='blue',label='Max Strain',linewidth=1)
ax.plot(s2_TW,s3_TW,'--',color='green',label='Tsai-Wu',linewidth=1)
ax.plot(s2_HH,s3_HH,'--',color='orange',label='Hashin',linewidth=1)
ax.plot((0,),(0,),'+',color='black',markersize=50)
ax.grid(True)
ax.legend(loc='best')
ax.set_xlabel(r'$\sigma_2$',fontsize=14)
ax.set_ylabel(r'$\sigma_3$',fontsize=14)
ax.set_xlim(-300,100)
ax.set_ylim(-300,100)
plt.tight_layout()
Disclaimer:This site is about polymer composites, designed for educational purposes. Consumption and use of any sort & kind is solely at your own risk.
Fair use: I spent some time making all the pages, and even the figures and illustrations are my own creations. Obviously, you may steal whatever you find useful here, but please show decency and give some acknowledgment if or when copying. Thanks! Contact me: nils.p.vedvik@ntnu.no www.ntnu.edu/employees/nils.p.vedvik
Copyright 2021, All right reserved, I guess.