In [3]:

```
#initiation of variable
v_f = 40.0 # volume percent of fibre in composite
E_f= 69.0 # Modulus of elasticity of fibre in GPa
v_m = 60.0 # volume percent of matrix in composite
E_m = 3.4# Modulus of elasticity of matrix in GPa
a = 250.0 # cross sectional area in mm^2
sigma = 50.0 # Tensile stress in MPa
Fm = 1.0 # let
Ff = 13.5*Fm
#calculation
#Part A
E_cl = (v_f*E_f+v_m*E_m)/100.0
#result
print"\n Modulus of elasticity of composite is %0.0f GPa" %E_cl
# Part B"
Fc = a*sigma
Fm = Fc/(Fm+Ff)
Ff = Fc - Fm
#result
print" Force supported by m is %d" %Fm, "N Force supported by fibre is %d N" %Ff
print "Answer in book is as Fm = 860 N and Ff = 11640. It is due to approximation"
# Part C
a_m = v_m*a/100
a_f = v_f*a/100
sigma_m = Fm/a_m
sigma_f = Ff/a_f
epsilon_m = sigma_m/(E_m*1000)
epsilon_f = sigma_f/(E_f*1000)
#result
print "Strain for matrix phase is %0.2e" %epsilon_m
print " Strain for fibre phase is %.2e. Both are identical" %epsilon_f
```

In [10]:

```
#initiation of variable
import math
E_gf=69 # Elasticity of glass fibre in GPa
mf_gf=0.4 #Volume percentage of glass fibre
E_pr=3.4 # Elasticity of polyester resin in GPa
mf_pr=0.6 #Vol percentage of polyester resin
#calculation
E_ct=E_pr*E_gf/((E_pr*mf_gf)+(E_gf*mf_pr)) # Calculation of modulus of elasticity in GPa
#result
print"In transverse direction, modulus of elasticity is %.1f GPa." %E_ct
```

In [14]:

```
#initiation of variable
from math import pi
F = 1000.0 # Force in N
L = 1.0 # length in m
del_y = 0.35 # extension in mm
d_o = 70 # Outer diameter in mm
d_i = 50 # Innrer diameter in mm
V_f_max = 0.6 # Maximum allowable fiber Volume in cm fraction
Vf_glass = 0.945 # V_f for glass
Vf_C_standard = 0.293# V_f for carbon standard modulus
Vf_c_intermediate = 0.237# V_f for carbon intermediate modulus
Vf_c_high = 0.168 # V_f for carbon high modulus
d_epoxy = 1.14 # density of epoxy resin in g/cm^3
d_C_sm = 1.8 # density of carbon fiber (Standard modulus) in g/cm^3
d_C_im = 1.8 # density of carbon fiber (intermediate modulus) in g/cm^3
d_C_hm = 1.8 # density of carbon fiber (high modulus) in g/cm^3
C_im_cost = 70.00 # cost of carbon fiber (intermediate modulus) in USD/kg
C_sm_cost = 35.00 # cost of carbon fiber (Standard modulus) in USD/kg
C_hm_cost = 175.00 # cost of carbon fiber (high modulus) in USD/kg
d_epoxy = 1.14 # density of epoxy resin in g/cm^3
epoxy_cost = 9.00 # cost of epoxy resin in USD/kg
#calculation
I = pi/64* (1e-12*(d_o*1e-3)**4-(d_i*1e-3)**4)
E = 4*F*L**3/(3*pi*del_y*1e-3*((d_o*1e-3)**4-(d_i*1e-3)**4)) # Required modulus of elasticity
#parta
if Vf_glass < V_f_max :
print "Glass, when embedded in epoxy matrix, meet the stipulated criteria. "
if Vf_C_standard < V_f_max :
print " Carbon (standard modulus), when embedded in epoxy matrix, meet the stipulated criteria. "
if Vf_c_intermediate < V_f_max :
print" Carbon (intermediate modulus), when embedded in epoxy matrix, meet the stipulated criteria. "
if Vf_c_high < V_f_max :
print" Carbon (high modulus), when embedded in epoxy matrix, meet the stipulated criteria."
#partb
Vc = pi*L*1e-6*(d_o**2 - d_i**2)/4
F_v_C_sm = Vc*Vf_C_standard*1e6 # Fiber Volume in cm^3 for carbon (Standard modulus)
F_m_C_sm = F_v_C_sm * d_C_sm/1000 # Fiber mass for carbon (Standard modulus) in kg
F_c_C_sm = F_m_C_sm * C_sm_cost # Fiber cost for carbon (Standard modulus) in USD
m_v_C_sm = Vc*(1-Vf_C_standard)*1e6 # Matrix Volume in cm^3 for carbon (Standard modulus)
m_m_C_sm = m_v_C_sm * d_epoxy/1000 # Matrix mass for carbon (Standard modulus) in kg
m_c_C_sm = m_m_C_sm * epoxy_cost # Matrix cost for carbon (Standard modulus) in USD
Total_c_C_sm = m_c_C_sm + F_c_C_sm # Total cost for carbon (Standard modulus) in USD
F_v_C_im = Vc*Vf_c_intermediate*1e6 # Fiber Volume in cm^3 for carbon (intermediate modulus)
F_m_C_im = F_v_C_im * d_C_im/1000 # Fiber mass for carbon (intermediate modulus) in kg
F_c_C_im = F_m_C_im * C_im_cost# Fiber cost for carbon (intermediate modulus) in USD
m_v_C_im = Vc*(1-Vf_c_intermediate)*1e6 # Matrix Volume in cm^3 for carbon (intermediate modulus)
m_m_C_im = m_v_C_im * d_epoxy/1000 # Matrix mass for carbon (intermediate modulus) in kg
m_c_C_im = m_m_C_im * epoxy_cost # Matrix cost for carbon (intermediate modulus) in USD
Total_c_C_im = m_c_C_im + F_c_C_im # Total cost for carbon (intermediate modulus) in USD
F_v_C_hm = Vc*Vf_c_high*1e6 # Fiber Volume in cm^3 for carbon (high modulus)
F_m_C_hm = F_v_C_hm * d_C_hm/1000 # Fiber mass for carbon (high modulus) in kg
F_c_C_hm = F_m_C_hm * C_hm_cost # Fiber cost for carbon (high modulus) in USD
m_v_C_hm = Vc*(1-Vf_c_high)*1e6 # Matrix Volume in cm^3 for carbon (high modulus)
m_m_C_hm = m_v_C_hm * d_epoxy/1000 # Matrix mass for carbon (high modulus) in kg
m_c_C_hm = m_m_C_hm * epoxy_cost # Matrix cost for carbon (high modulus) in USD
Total_c_C_hm = m_c_C_hm + F_c_C_hm # Total cost for carbon (high modulus) in USD
#result
print" Cost of Carbon (standard modulus) composite is:%.2f " %Total_c_C_sm # whereas Value in table is 48.50 USD
print" Cost of Carbon (intermediate modulus) composite is:%.2f " %Total_c_C_im# whereas Value in table is 71.10 USD
print" Cost of Carbon (high modulus) composite is:%.2f " %Total_c_C_hm # whereas Value in table is 115.00 USD
print" The material of choice (i.e. least expensive) is standard modulus carbon fiber composite; the relatively low cost per unit mass of this fiber offsets its relatively low modulus of elasticity and required high Volume fraction."
```