Physics of Nano Materials

Example number 8.1, Page number 320

In [5]:
 
#import modules
import math
from __future__ import division

#Variable decleration
r=5;    #radius in m
pi=3.14;

#Calculation 
SA=4*pi*r**2;    #surface area of sphere in m^2
V=(4/3)*pi*r**3;   #volume of sphere in m^3
R=SA/V;    #ratio
#surface area to volume ratio can also be given by 3/radius

#Result
print("surface area to volume ratio of sphere in m-1 is",R);
('surface area to volume ratio of sphere in m-1 is', 0.6)

Example number 8.2, Page number 321

In [7]:
 
#import modules
import math
from __future__ import division

#Variable decleration
d=26;   #distance in m
r=d/2;  #radius in m
pi=3.14;

#Calculation
SA=4*pi*r**2;      #surface area of sphere in m^2
V=(4/3)*pi*r**3;   #volume of sphere in m^3
R=SA/V;    #ratio
R=math.ceil(R*10**3)/10**3;   #rounding off to 3 decimals
#surface area to volume ratio can also be given by 3/radius

#Result
print("surface area to volume ratio of sphere in m-1 is",R);
('surface area to volume ratio of sphere in m-1 is', 0.231)

Example number 8.3, Page number 321

In [11]:
 
#import modules
import math
from __future__ import division

#Variable decleration
r=1;   #radius in m
h=1;   #height in m
pi=3.14

#Calculation
V=(1/3)*pi*(r**2)*h;
V=math.ceil(V*10**2)/10**2;   #rounding off to 2 decimals

#Result
print("volume of cone in m^3 is",V); 
('volume of cone in m^3 is', 1.05)

Example number 8.4, Page number 321

In [16]:
 
#import modules
import math
from __future__ import division

#Variable decleration
r=3;   # radius in m
h=4;   # height in m
pi=3.14

#Calculation
SA=pi*r*math.sqrt((r**2)+(h**2));
TSA=SA+(pi*r**2);

#Result
print("total surface area of cone in m^2 is",TSA);
('total surface area of cone in m^2 is', 75.36)

Example number 8.5, Page number 322

In [18]:
 
#import modules
import math
from __future__ import division

#Variable decleration
V=100;   #volume of cone in cubic inches
r=5;   #radius of cone in inches
pi=3.14;

#Calculation
r_m=r*0.0254;    #radius of cone in m
#volume V=(1/3)*pi*(r**2)*h
#therefore h = (3*V)/(pi*r**2)
h=(3*V)/(pi*r**2);   #height in inches
R=3/r_m;
h=math.ceil(h*10**3)/10**3;   #rounding off to 3 decimals

#Result
print("height of the cone in inches is",h);
print("surface area to volume ratio in m-1 is",R);

#answer for the surface area to volume ratio given in the book is wrong
('height of the cone in inches is', 3.822)
('surface area to volume ratio in m-1 is', 23.62204724409449)
In [ ]: