%matplotlib inline
from matplotlib.pyplot import *
# Variables
a1 = 222.*10**9; #in N
a2 = 168.*10**9; #in N
e1 = 1.90; #in sqm
e2 = 1.42; #in sqm
da = a1-a2; #in N
de = e1-e2; #in sqm
MPa = [14,28,56,84,110,138,193,221,276]
strain = [.1,.21,.44,.67,.88,1.14,1.7,1.95,2.9]
# Calculations
e_math_tan = da/de;
e_math_tann = e_math_tan*10**-9; #in Gpa
a3 = 180.*10**9; #in N
e3 = 1.46; #in sqm
e_sec = 10**-9*a3/e3; #in Gpa
a = 85*10**6;
e = .68*10**-3;
e_y = 10**-9*a/e; #in Gpa
plot(strain,MPa)
plot(strain,MPa,"go")
xlabel("STRAIN")
ylabel("STRESS(MPa)")
suptitle("Stress-strain diagram")
# Results
print "Tangent Modulous of elasticity (in Gpa) = %.1f GPa"%e_math_tann
print "Secant modulous of elasticity (in Gpa) = %d GPa"%e_sec
print "Youngs modulous (in Gpa) = %d GPa"%e_y
%matplotlib inline
from matplotlib.pyplot import *
# Variables
t = [0,1,2,4,8,16,24,32,40,48,60,72] #time
s = [0,.02,.029,.041,.057,.078,.094,.109,.122,.136,.156,.176] # strain E (mm/mm)
# calculations
min_creep_rate = 12./14 # from curve
creep_intercept = .055 # from curve
#results
plot(t,s)
plot(t,s,"go")
suptitle("Strain-Time Curve")
xlabel("Time(minute)")
ylabel("Strain")
print "Minimum Creep rate : %.3f mm/mm"%min_creep_rate
print "The creep intercept : %.3f mm/mm"%creep_intercept
import math
#Find Stress
# Variables
n = 3.;
a = 300.;
t = 365. * 24; #in hours
e = 2.*10**6; #kgf/sqcm
ai = 750.; #in kgf/sqcm
# Calculations
v_cr = 2.8*10**-8; # in cm/cm/hour creep rate
x = math.log(v_cr)-n*math.log(a);
a1 = math.exp(x);
a_tf = round(math.sqrt(1./((1./ai**(n-1))+(a1*e*(n-1)*t))),-2);
# Results
print "Stress Remaining (in kgf/sq cm) = %.f kgf/cm**2"%a_tf