from __future__ import division
# Given data
P_m = 760 # pressure of mercury in mm
P_m_bar = P_m/750 # in bar
P_W = 0.006867 # pressure of water in bar
P = P_m_bar+P_W # in bar
print "The absolute pressure of gas = %0.3f bar " %P
# Given data
Rho = 13.6
g = 9.81
a = 760 # in mm
b = 480 # in mm
h = a-b # in mm
P = (1000*Rho*g*h)/(1000) # in N/m**2
P= int(P/100)*100 #in N/m**2
print "The absolute pressure = %0.f N/m**2 " %P
P = int(P /100) # in mbar
print "The absolute pressure = %0.f mbar " %P
# Given data
G_P = 30 # guage pressure of steam in bar
P1 = 745 # in mm
P1= P1/750 # in bar
PressureInBoiler = G_P+P1 # in bar
print "The absolute pressure in the bioler =",round(PressureInBoiler,3),"bar"
P2 = 708.2 # in mm
P2= P2/750 # in
PressureInCond = P1-P2 # in bar
print "The absolute pressure in the Condenser = %0.4f bar " %PressureInCond
PressureInCond = round(PressureInCond*10**4)*10**1 # in N/m**2
print "The absolute pressure in the Condenser = %0.f N/m**2 " %(PressureInCond)
# Given data
Rho = 0.78 # in kg/m**3
g = 9.81
h = 3 # in m
b = g*Rho*h*1000 # in N/m**2
b = b * 10**-3 # in kN/m**2
print "The gauge pressure = %0.3f kN/m**2 " %b
# Given data
B_h = 755 # Barometric height in mm
M_h= 240 # Manometer height in mm
P = B_h+M_h # in mm
P = P/750 # absolute pressure in bar
P= P*10**5 # in N/m**2
print "The absolute pressure in the vessel = %0.4f MN/m**2 " %(P*10**-6)
print "The absolute pressure in the vessel = %0.3f bar " %(P*10**-5)
# Given data
T = 287 # in degree C
T = T + 273 # in K
print "The temperature on absolute scale = %0.f K " %T
from math import sqrt
# Given data
a = 0.26
b = 5*10**-4
E = 10 # in mV
T = (a/(2*b))*( sqrt(1+(4*E*b/a**2)) - 1 ) # in degree C
print "The unit of a will be mV/°C and the unit of b will be mV/°C**2"
print "The Temperature = %0.2f degree C " %T
# Given data
Q_w = 500 # quantity of water flowing in kg/minute
T1 = 80 # in ° C
T2 = 20 # in °C
del_T = T1-T2 # in °C
Spe_heat = 4.182 # in kJ/kg
Q_h = Q_w*del_T*Spe_heat # in kJ/minute
print "Quantity of heat supplied to water in the economizer is",int(Q_h),"kJ/minute or",round(Q_h*10**-3,2)," MJ/minute"
# Given data
CopperMass = 3 # in kg
WaterMass= 6 # in kg
Spe_heat_copper= 0.394 # in kJ/kg-K
T1 = 90 # in degree C
T2 = 20 # in degree C
del_T = T1-T2 # in degree C
H_C = CopperMass*Spe_heat_copper*del_T # heat required by copper in kJ
Spe_heat_water= 4.193 # in kJ/kg-K
H_W = WaterMass*Spe_heat_water*del_T # heat required by water in kJ
H = H_C+H_W #heat required by vessel and water in kJ
H = H * 10**-3 # in MJ
print "Heat required by vessel and water = %0.3f MJ " %H
# Given data
m = 18.2 #quantity of air supplied of coal in kg
T1 = 200 # in degree C
T2 = 18 # in degree C
del_T = T1-T2 # in degree C
Spe_heat = 1 # in kJ/kg-K
Q_C = m*Spe_heat*del_T # in kJ
print "The Quantity of heat supplied per kg of coal = %0.1f kJ " %Q_C