Wednesday 11 March 2015

2. Specific Weight

Specific weight is defined as the weight per unit volume. It can also be defined as the product of Density and gravitational force. It is denoted by the symbol γ(Pronounced as Gamma). Mathematically it can be shown as:
γ=ρ.g 
Its units are kg/s2.m2

It's units can also be expressed as N/m3


Note:
  1. Specific weight of the substance changes from place to place as there is a change in gravity from one place to other.
  2. It is also called as weight density. 
  3.  It can also be expressed as γ = w/v, Where w-weight of the body(m.g),v-volume of the body.
  4. If we consider the ideal case of gravity as 9.81m2. Then γair = 12.5568, γwater = 9810, γmercury = 133416. All in N/m3
 Example Problem

Find the specific mass of the substance whose density is 0.085kg/m2.s2 .(Consider the gravity at the place is 9.81 m2).

Solution:
Specific weight (γ) = ρ.g 
=> 0.085x9.81
=>0.83385N/m3.
Therefore the specific mass of the body is found 0.83385N/m3.


Python Program:


 #!/usr/bin/python
# -*- coding: utf-8 -*-
def specific_mass(density,gravity=9.81):
specific_mass = density*gravity
print u"The specific mass(γ) of the substance is found to be {}".format(specific_mass)

def weight_density(mass,volume,gravity=9.81):
weight_density = mass*gravity/volume
print u"The Weight Density/Specific mass(γ) of the substance is found to be {}".format(weight_density)

def take_user_input():
print "Choose with what you want to calculate specific_mass/weight_density."
print "Type 1 for: denstiy and gravity input."
print "Type 2 for: mass, volume and gravity input."
print "However entering the gravity value is optional."
choice = raw_input("> ")
print "Do you want to enter the gravity value? 'y'-Yes, 'n'- No"
yes_no = raw_input("> ")
if yes_no == 'Y' or 'y':
gravity = raw_input("Enter the value of gravity > ")
elif yes_no == 'N' or 'n':
gravity = 9.81
else:
print "Wrong input please choose again"
take_user_input()

if choice == "1":
density = raw_input("Enter the value of density > ")
specific_mass(float(density),float(gravity))
elif choice == "2":
mass = raw_input("Enter the mass value > ")
volume = raw_input("Enter the volume > ")
weight_density(float(mass),float(volume),float(gravity))
else:
print "Your choice was not in the given options. Please choose again."
take_user_input()

take_user_input()
 
Output:

Choose with what you want to calculate specific_mass/weight_density.
Type 1 for: denstiy and gravity input.
Type 2 for: mass, volume and gravity input.
However entering the gravity value is optional.
> 1
Do you want to enter the gravity value? 'y'-Yes, 'n'- No
> y
Enter the value of gravity > 9.63
Enter the value of density > 98653
The specific mass(γ) of the substance is found to be 950028.39

 

No comments:

Post a Comment