CHAPTER 1 : Mathematical Modeling And Engineering Problem Solving¶

Ex : 1.1 Pg : 14¶

In :
from numpy import arange, exp, inf
g=9.8##m/s**2# acceleration due to gravity
m=68.1##kg
c=12.5##kg/sec# drag coefficient
v=[]
j=0
for i in arange(0,12,2):
v.append(g*m*(1-exp(-c*i/m))/c)
print "Time(s) = %d\t"%i,"v(m/s) = %0.2f"%v[j]
j+=1
print "Time(s) = %0.2f\t"%inf,"v(m/s) = %0.2f"%(g*m/c)
Time(s) = 0	v(m/s) = 0.00
Time(s) = 2	v(m/s) = 16.40
Time(s) = 4	v(m/s) = 27.77
Time(s) = 6	v(m/s) = 35.64
Time(s) = 8	v(m/s) = 41.10
Time(s) = 10	v(m/s) = 44.87
Time(s) = inf	v(m/s) = 53.39

Ex : 1.2 Pg :17¶

In :
from numpy import arange, exp, inf
g=9.8##m/s**2# acceleration due to gravity
m=68.1##kg
c=12.5##kg/sec# drag coefficient
count=0#
v=[]
v.append(0)
print "Time(s) = %d\t"%(0),"v(m/s) = %0.2f"%v

for i in arange(1,13,2):
v.append(v[(count-1)]+(g-c*v[(count)]/m)*(2))
print "Time(s) = %d\t"%(i+1),"v(m/s) = %0.2f"%v[(count+1)]
count=count+1#

print "Time(s) = %0.2f\t"%inf,"v(m/s) = %0.2f\t"%(g*m/c)
Time(s) = 0	v(m/s) = 0.00
Time(s) = 2	v(m/s) = 19.60
Time(s) = 4	v(m/s) = 12.40
Time(s) = 6	v(m/s) = 34.65
Time(s) = 8	v(m/s) = 19.29
Time(s) = 10	v(m/s) = 47.17
Time(s) = 12	v(m/s) = 21.57
Time(s) = inf	v(m/s) = 53.39