Chapter 1:Centre Of Gravity

Problem 1.1,Page No.8

In [5]:
import math

#Initilization of Variables

#Rectangle-1
a_1=37.5 #cm**2    
y_1=26.25 #cm      

#Rectangle-2
a_2=50   #cm**2   
y_2=15   #cm      

#Rectangle-3
a_3=150  #cm**2    
y_3=2.5  #cm      


#Calculation


Y_bar=(a_1*y_1+a_2*y_2+a_3*y_3)*(a_1+a_2+a_3)**-1 #cm  

#Result
print"The centroid of the section is",round(Y_bar,2),"cm"
The centroid of the section is 8.88 cm

Problem 1.2,Page No.9

In [7]:
import math

#Initilization of variables

#Area-1
a_1=6 #cm**2 
x_1=3 #cm
y_1=0.5 #cm

#Area-2
a_2=6 #cm**2
x_2=2.671 #cm
y_2=3 #cm

#Area-3
a_3=16 #cm**2
x_3=1 #cm
y_3=5 #cm


#Calculation


X_bar=(a_1*x_1+a_2*x_2+a_3*x_3)*(a_1+a_2+a_3)**-1 #cm
Y_bar=(a_1*y_1+a_2*y_2+a_3*y_3)*(a_1+a_2+a_3)**-1 #cm


#Result
print"The centre of gravity of section is",round(X_bar,2),"cm"
print"The centre of gravity of section is",round(Y_bar,2),"cm"
The centre of gravity of section is 1.79 cm
The centre of gravity of section is 3.61 cm

Problem 1.3,Page no.10

In [8]:
import math

#Initilization of variables

#Area-1
a_1=93.75 #cm**2 
y_1=6.25 #cm

#Area-2
a_2=93.75 #cm**2 
y_2=6.25 #cm

#Area-3
a_3=375 #cm**2   
y_3=9.375 #cm

#Area-4
a_4=353.43 #cm**2
y_4=6.366 #cm


#Calculation

Y_bar=(a_1*y_1+a_2*y_2+a_3*y_3-a_4*y_4)*(a_1+a_2+a_3-a_4)**-1 #cm


#Result
print"The centre of gravity lies at a distance of ",round(Y_bar,2),"cm"
The centre of gravity lies at a distance of  11.66 cm

Problem 1.4,Page no.10

In [9]:
import math

#Initilization of variables


a_1=36*pi #cm**2  #Area of Quadrant of a circle
x_1=16/pi #cm  
y_1=16*pi**-1 #cm


a_2=18*pi #cm**2  #Area of the semicircle
x_2=6 #cm
y_2=8*pi**-1 #cm


#Calculation-1

X_bar=(a_1*x_1-a_2*x_2)*(a_1-a_2)**-1 #cm

#Calculation-2
#To calculate Y_bar,taking AB as the Reference line

Y_bar=(a_1*y_1-a_2*y_2)*(a_1-a_2)**-1 #cm

#Result

print"The centre of gravity is ",round(X_bar,2),"cm"
print"The centre of gravity is",round(Y_bar,2),"cm"
The centre of gravity is  4.19 cm
The centre of gravity is 7.64 cm

Problem 1.5,Page no.11

In [10]:
import math

#Initilization of variables

#Circle-1 
a_1=100*pi #cm**2
x_1=10 #cm
    
#Square-2 
a_2=50 #cm**2
x_2=15 #cm
    
#Calculation

X_bar=(a_1*x_1-a_2*x_2)*(a_1-a_2)**-1 #cm


#Result
print"The centre of gravity is",round(X_bar,2),"cm"
The centre of gravity is 9.05 cm

Problem 1.6,Page no.12

In [27]:
import math

#intilization of variables 

#Rectangle-1
a_1=51200 #mm**2 
x_1=160 #mm
y_1=80 #mm

#Triangle-2
a_2=6400 #mm**2
x_2=80*3**-1 #mm
y_2=320*3**-1 #mm

#Semicircle-3
a_3=1250*pi #mm**2
x_3=210 #mm
y_3=(160-(4*50-(3*pi)**-1)) #mm


#Calculation

X_bar=(a_1*x_1-a_2*x_2-a_3*x_3)*(a_1-a_2-a_3)**-1 #mm
Y_bar=(a_1*y_1-a_2*y_2-a_3*y_3)*(a_1-a_2-a_3)**-1 #mm

#Result
print"The centroid of the given area is",round(X_bar,2),"mm"
print"The centroid of the given area is",round(Y_bar,2),"mm"
The centroid of the given area is 176.07 mm
The centroid of the given area is 87.34 mm

Problem 1.8,Page no.12

In [11]:
import math

#Initilization of variables


alpha=pi/2 #degree #In case of semicircle

#Semicircle-1
r_1=20 #cm #radius of semicircle 
y_1=4*r_1*(3*pi)**-1 #cm #distance from the base
a_1=(pi*r_1**2)*2**-1 #cm**2 #area of semicircle

#Semicircle-2
r_2=16 #cm   #radius of semicircle
y_2=4*r_2*(3*pi)**-1 #cm #distance from the base
a_2=(pi*r_2**2)*2**-1 #cm**2 #area of semicircle

#Calculations


Y_bar=(a_1*y_1-a_2*y_2)*(a_1-a_2)**-1 #cm #centroid


#Result
print"The centroid of the area is ",round(Y_bar,2),"cm"
The centroid of the area is  11.51 cm

Problem no1.12,Page no.16

In [2]:
import math

#Initilization of variables

#Right Circular Cyclinder
#m_1=(16*pi*h*rho_1) #gm 
#y_1=4+h*2**-1 #cm

#Hemisphere
#m_2=256*pi*rho_1 #gm 
y_2=2.5 #cm 

Y_bar=4 #cm
r=4 #cm

#Calculation

#Y_bar=(m_1*y_1+m_2*y_2)*(m_1+m_2)**-1 #cm #Centroid
h=(402.114*25.132**-1)**0.5

#Result
print"The value of h is",round(h,2),"cm"
The value of h is 4.0 cm