summaryrefslogtreecommitdiff
path: root/Introduction_To_Chemical_Engineering/ch2.ipynb
diff options
context:
space:
mode:
authordebashisdeb2014-06-20 15:42:42 +0530
committerdebashisdeb2014-06-20 15:42:42 +0530
commit83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (patch)
treef54eab21dd3d725d64a495fcd47c00d37abed004 /Introduction_To_Chemical_Engineering/ch2.ipynb
parenta78126bbe4443e9526a64df9d8245c4af8843044 (diff)
downloadPython-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.gz
Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.bz2
Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.zip
removing problem statements
Diffstat (limited to 'Introduction_To_Chemical_Engineering/ch2.ipynb')
-rw-r--r--Introduction_To_Chemical_Engineering/ch2.ipynb132
1 files changed, 0 insertions, 132 deletions
diff --git a/Introduction_To_Chemical_Engineering/ch2.ipynb b/Introduction_To_Chemical_Engineering/ch2.ipynb
index 7f49d9ae..845b485b 100644
--- a/Introduction_To_Chemical_Engineering/ch2.ipynb
+++ b/Introduction_To_Chemical_Engineering/ch2.ipynb
@@ -27,21 +27,17 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the volume of oxygen that can be obtained\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"p1=15. #in bar\n",
"p2=1.013 #in bar\n",
"t1=283. #in K\n",
"t2=273. #in K\n",
"v1=10. #in l\n",
"\n",
- "# Calculations\n",
"v2=p1*v1*t2/(t1*p2);\n",
"\n",
- "# Results\n",
"print \"volume of oxygen = %f liters\"%(v2)\n"
],
"language": "python",
@@ -69,16 +65,13 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find volumetric composition,partial pressue of each gas and total pressure of mixture\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"nCO2 = 2./44; #moles of CO2\n",
"nO2 = 4./32; #moles of O2\n",
"nCH4 = 1.5/16; #moles of CH4\n",
"\n",
- "# Calculations and Results\n",
"total_moles = nCO2+nO2+nCH4;\n",
"yCO2 = nCO2/total_moles;\n",
"yO2 = nO2/total_moles;\n",
@@ -122,21 +115,17 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find equivalent mass of metal\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"P=104.3 #total pressure in KPa\n",
"pH2O=2.3 #in KPa\n",
"pH2=P-pH2O; #in KPa\n",
"\n",
- "# Calculations and Results\n",
"VH2=209*pH2*273/(293*101.3)\n",
"\n",
"print \"volume of hydrogen obtained = %f ml\"%(VH2)\n",
"\n",
- "#calculating amount of metal having 11.2l of hydrogen\n",
"\n",
"m=350/196.08*11.2 #mass of metal in grams\n",
"print \"mass of metal equivalent to 11.2 litre/mol of hydrogen = %f gm\"%(m)\n"
@@ -167,15 +156,11 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find NaCl content in NaOH solution\n",
"\n",
"import math \n",
- "# Variables\n",
"w=2 #in gm\n",
"m=0.287 #in gm\n",
"\n",
- "# Calculations and Results\n",
- "#precipitate from 58.5gm of NaCl=143.4gm\n",
"mNaCl=58.5/143.4*m;\n",
"\n",
"print \"mass of NaCl = %f gm\"%(mNaCl )\n",
@@ -209,20 +194,16 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the carbon content in sample\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"w=4.73 #in gm5\n",
"VCO2=5.30 #in liters\n",
"\n",
- "# Calculations\n",
"weight_CO2=44/22.4*VCO2;\n",
"carbon_content=12./44*weight_CO2;\n",
"percentage_content=(carbon_content/w)*100;\n",
"\n",
- "# Results\n",
"print \"percentage amount of carbon in sample = %f\"%(percentage_content)\n"
],
"language": "python",
@@ -250,19 +231,15 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the volume of air\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"volume_H2=0.5 #in m3\n",
"volume_CH4=0.35 #in m3\n",
"volume_CO=0.08 #in m3\n",
"volume_C2H4=0.02 #in m3\n",
"volume_oxygen=0.21 #in m3 in air\n",
"\n",
- "# Calculations\n",
- "#required oxygen for various gases\n",
"H2=0.5*volume_H2;\n",
"CH4=2*volume_CH4;\n",
"CO=0.5*volume_CO;\n",
@@ -271,7 +248,6 @@
"total_O2=H2+CH4+CO+C2H4;\n",
"oxygen_required=total_O2/volume_oxygen;\n",
"\n",
- "# Results\n",
"print \"amount of oxygen required = %f cubic meter\"%(oxygen_required)\n"
],
"language": "python",
@@ -299,23 +275,19 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the volume of sulphuric acid and mass of water consumed\n",
"\n",
"import math \n",
"\n",
"\n",
- "# Variables\n",
"density_H2SO4 = 1.10 #in g/ml\n",
"mass_1 = 100*density_H2SO4; #mass of 100ml of 15% solution\n",
"mass_H2SO4 = 0.15*mass_1;\n",
"density_std = 1.84 #density of 96% sulphuric acid\n",
"mass_std = 0.96*density_std; #mass of H2SO4 in 1ml 96% H2SO4\n",
"\n",
- "# Calculations\n",
"volume_std = mass_H2SO4/mass_std; #volume of 96%H2SO4\n",
"mass_water = mass_1 - mass_H2SO4;\n",
"\n",
- "# Results\n",
"print \"volume of 0.96 H2SO4 required = %f ml\"%(volume_std)\n",
"print \"mass of water required = %f g\"%(mass_water)\n"
],
@@ -345,18 +317,15 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find molarity,molality and normality\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"w_H2SO4=0.15 #in gm/1gm solution\n",
"density=1.10 #in gm/ml\n",
"m=density*1000; #mass per liter\n",
"weight=m*w_H2SO4; #H2SO4 per liter solution\n",
"molar_mass=98;\n",
"\n",
- "# Calculations and Results\n",
"Molarity=weight/molar_mass;\n",
"print \"Molarity = %f mol/l\"%(Molarity)\n",
"\n",
@@ -394,18 +363,14 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find normality\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"molar_mass_BaCl2=208.3; #in gm\n",
"equivalent_H2SO4=0.144;\n",
"\n",
- "# Calculations\n",
"normality=equivalent_H2SO4*1000/28.8;\n",
"\n",
- "# Results\n",
"print \"Normality = %f N\"%(normality)\n"
],
"language": "python",
@@ -433,20 +398,16 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find amount of KClO3 precipitated\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"solubility_70=30.2 #in gm/100gm\n",
"w_solute=solubility_70*350/130.2; #in gm\n",
"\n",
- "# Calculations\n",
"w_water=350-w_solute;\n",
"solubility_30=10.1 #in gm/100gm\n",
"precipitate=(solubility_70-solubility_30)*w_water/100\n",
"\n",
- "# Results\n",
"print \"amount precipitated = %f gm\"%(precipitate)\n"
],
"language": "python",
@@ -474,19 +435,15 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the pressure for solubility of CO2\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"absorbtion_coefficient=1.71 #in liters\n",
"molar_mass=44;\n",
"\n",
- "# Calculations\n",
"solubility=absorbtion_coefficient*molar_mass/22.4; #in gm\n",
"pressure=8/solubility*101.3;\n",
"\n",
- "# Results\n",
"print \"pressure required = %f kPa\"%(pressure)\n"
],
"language": "python",
@@ -514,23 +471,19 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the vapor pressure of water\n",
"\n",
"import math \n",
"\n",
"\n",
- "# Variables\n",
"w_water=540. #in gm\n",
"w_glucose=36. #in gm\n",
"m_water=18.; #molar mass of water\n",
"m_glucose=180.; #molar mass of glucose\n",
"\n",
- "# Calculations\n",
"x=(w_water/m_water)/(w_water/m_water+w_glucose/m_glucose);\n",
"p=8.2*x;\n",
"depression=8.2-p;\n",
"\n",
- "# Results\n",
"print \"depression in vapor pressure = %f Pa\"%(depression*1000)\n"
],
"language": "python",
@@ -558,21 +511,17 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the boiling point of solution\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"w_glucose=9. #in gm\n",
"w_water=100. #in gm\n",
"E=0.52;\n",
"m=90/180.; #moles/1000gm water\n",
"\n",
- "# Calculations\n",
"delta_t=E*m;\n",
"boiling_point=100+delta_t;\n",
"\n",
- "# Results\n",
"print \"boiling_point of water = %f degreeC\"%(boiling_point)\n"
],
"language": "python",
@@ -600,16 +549,13 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the molar mass and osmotic pressure\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"K=1.86;\n",
"c=15 #concentration of alcohol\n",
"delta_t=10.26;\n",
"\n",
- "# Calculations and Results\n",
"m=delta_t/K; #molality\n",
"M=c/(m*85); #molar mass\n",
"print \"molar mass = %f gm\"%(M*1000)\n",
@@ -648,22 +594,18 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find u_in, M_v, k'\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"u_in = 0.575 #from the graph\n",
"u_s = 0.295 #in mPa-s\n",
"\n",
- "# Calculations\n",
"M_v = (u_in/(5.80*10**-5))**(1/0.72);\n",
"u_red = 0.628; #in dl/g\n",
"\n",
"c = 0.40 #in g/dl\n",
"k = (u_red-u_in)/((u_in**2)*c);\n",
"\n",
- "# Results\n",
"print \"k = %f Mv = %fu_in = %f dl/gm\"%(k,M_v,u_in)\n"
],
"language": "python",
@@ -691,11 +633,9 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the molecular formula\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"C=54.5 #% of carbon\n",
"H2=9.1 #% of hydrogen\n",
"O2=36.4 #% of oxygen\n",
@@ -705,13 +645,11 @@
"molar_mass=88.;\n",
"density=44.;\n",
"\n",
- "# Calculations\n",
"ratio=molar_mass/density;\n",
"x=ratio*2;\n",
"y=ratio*1;\n",
"z=ratio*4;\n",
"\n",
- "# Results\n",
"print \"x = %f y = %f z = %f\"%(x,y,z)\n",
"print \"formula of butyric acid is = C4H8O2\"\n"
],
@@ -741,11 +679,9 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find molecular foemula \n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"C=93.75 #% of carbon\n",
"H2=6.25 #% of hydrogen\n",
"x=C/12 #number of carbon atoms\n",
@@ -753,12 +689,10 @@
"molar_mass=64\n",
"density=4.41*29;\n",
"\n",
- "# Calculations\n",
"ratio=density/molar_mass;\n",
"x=round(ratio*5);\n",
"y=round(ratio*4);\n",
"\n",
- "# Results\n",
"print \"x = %f y = %f\"%(x,y)\n",
"print \"formula of butyric acid is = C10H8\"\n",
"\n"
@@ -789,11 +723,9 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find molecular formula\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"C=50.69 #% of carbon\n",
"H2=4.23 #% of hydrogen\n",
"O2=45.08 #% of oxygen\n",
@@ -802,7 +734,6 @@
"b=H2/2; #number of hydrogen molecules\n",
"molar_mass=71;\n",
"\n",
- "# Calculations and Results\n",
"def f(m):\n",
" return (2.09*1000)/(60*m);\n",
"\n",
@@ -849,18 +780,15 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the molecular formula\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"C=64.6 #% of carbon\n",
"H2=5.2 #% of hydrogen\n",
"O2=12.6 #% of oxygen\n",
"N2=8.8 #% of nitrogen\n",
"Fe=8.8 #% of iron\n",
"\n",
- "# Calculations\n",
"a=C/12; #number of carbon molecules\n",
"c=8.8/14; #number of nitrogen molecules\n",
"b=H2; #number of hydrogen molecules\n",
@@ -871,7 +799,6 @@
"\n",
"molar_mass=63.3/cm;\n",
" \n",
- "# Results \n",
"print \"a = %d, b = %d, c = %d, d = %d, e = %d\"%(a*6.5,b*6.5,c*6.5,d*6.5,e*6.5)\n",
"print \"formula of butyric acid is = C34H33N4O5Fe\"\n",
"\n"
@@ -902,20 +829,16 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find sequence of deposition\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"E1=-0.25;\n",
"E2=0.80;\n",
"E3=0.34;\n",
"\n",
- "# Calculations\n",
"a=[E1,E2,E3];\n",
"sorted(a)\n",
"\n",
- "# Results\n",
"print \"sorted potential in volts =\"\n",
"print (a)\n",
"print (\"E2>E3>E1\")\n",
@@ -951,22 +874,18 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the emf of cell\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"E0_Zn=-0.76;\n",
"E0_Pb=-0.13;\n",
"c_Zn=0.1;\n",
"c_Pb=0.02;\n",
"\n",
- "# Calculations\n",
"E_Zn=E0_Zn+(0.059/2)*math.log10(c_Zn);\n",
"E_Pb=E0_Pb+(0.059/2)*math.log10(c_Pb);\n",
"E=E_Pb-E_Zn;\n",
"\n",
- "# Results\n",
"print \"emf of cell = %f V\"%(E)\n",
"print \"Since potential of lead is greater than that of zinc thus reduction will occur at\\\n",
" lead electrode and oxidation will occur at zinc electrode\"\n"
@@ -997,22 +916,18 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the emf of cell\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"E0_Ag=0.80;\n",
"E0_AgNO3=0.80;\n",
"c_Ag=0.001;\n",
"c_AgNO3=0.1;\n",
"\n",
- "# Calculations\n",
"E_Ag=E0_Ag+(0.059)*math.log10(c_Ag);\n",
"E_AgNO3=E0_AgNO3+(0.059)*math.log10(c_AgNO3);\n",
"E=E_AgNO3-E_Ag;\n",
"\n",
- "# Results\n",
"print \"emf of cell = %f V\" %(E)\n",
"print \"since E is positive, the left hand electrode will be anode and\\\n",
" the electron will travel in the external circuit from the left hand to the right hand electrode\"\n"
@@ -1043,18 +958,14 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find emf of cell\n",
"\n",
"import math \n",
- "# Variables\n",
"pH=12; #pH of solution\n",
"E_H2=0;\n",
"\n",
- "# Calculations\n",
"E2=-0.059*pH;\n",
"E=E_H2-E2;\n",
"\n",
- "# Results\n",
"print \"EMF of cell = %f V\"%(E)\n"
],
"language": "python",
@@ -1082,20 +993,16 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find amount of silver deposited\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"I=3 #in Ampere\n",
"t=900 #in s\n",
"m_eq=107.9 #in gm/mol\n",
"F=96500;\n",
"\n",
- "# Calculations\n",
"m=(I*t*m_eq)/F;\n",
"\n",
- "# Results\n",
"print \"mass = %f gm\"%(m)\n"
],
"language": "python",
@@ -1123,24 +1030,20 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the time for electroplating\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"volume=10*10*0.005; #in cm3\n",
"mass=volume*8.9;\n",
"F=96500;\n",
"atomic_mass=58.7 #in amu\n",
"current=2.5 #in Ampere\n",
"\n",
- "# Calculations\n",
"charge=(8.9*F*2)/atomic_mass;\n",
"yield_=0.95;\n",
"actual_charge=charge/(yield_*3600);\n",
"t=actual_charge/current;\n",
"\n",
- "# Results\n",
"print \"time required = %f hours\"%(t)\n"
],
"language": "python",
@@ -1168,17 +1071,13 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find hardness of water\n",
"\n",
- "# Variables\n",
"m_MgSO4=90. #in ppm\n",
"MgSO4_parts=120.;\n",
"CaCO3_parts=100.;\n",
"\n",
- "# Calculations\n",
"hardness=(CaCO3_parts/MgSO4_parts)*m_MgSO4;\n",
"\n",
- "# Results\n",
"print \"hardness of water = %f mg/l\"%(hardness)\n"
],
"language": "python",
@@ -1214,7 +1113,6 @@
"\n",
"import math \n",
"\n",
- "# Variables\n",
"m1 = 162. #mass of calcium bi carbonate in mg\n",
"m2 = 73. #mass of magnesium bi carbonate in mg\n",
"m3 = 136. # mass of calsium sulfate in mg\n",
@@ -1222,19 +1120,16 @@
"m5 = 500. #mass of sodium cloride in mg\n",
"m6 = 50. # mass of potassium cloride in mg\n",
"\n",
- "# Calculations and Results\n",
"content_1 = m1*100/m1; #content of calcium bi carbonate in mg\n",
"content_2 = m2*100/(2*m2); #content of magnesium bi carbonate in mg\n",
"content_3 = m3*100/m3; # content of calsium sufate in mg\n",
"content_4 = m4*100/m4; # content of magnesium cloride\n",
"\n",
- "#part_1\n",
"\n",
"temp_hardness = content_1 + content_2; #depends on bicarbonate only\n",
"total_hardness = content_1+content_2+content_3+content_4;\n",
"print \"total hardness = %.0f mg/l temporary hardness = %.0f mg/l\"%(temp_hardness,total_hardness)\n",
"\n",
- "#part 2\n",
"wt_lime = (74./100)*(content_1+2*content_2+content_4);\n",
"actual_lime = wt_lime/0.85;\n",
"print \"amount of lime required = %.1f mg/l\"%(actual_lime)\n",
@@ -1270,19 +1165,15 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find hardness of water\n",
"\n",
- "# Variables\n",
"volume_NaCl=50. #in l\n",
"c_NaCl=5000. #in mg/l\n",
"\n",
- "# Calculations\n",
"m=volume_NaCl*c_NaCl;\n",
"equivalent_NaCl=50/58.5;\n",
"\n",
"hardness=equivalent_NaCl*m;\n",
"\n",
- "# Results\n",
"print \"hardness of water = %f mg/l\"%(hardness/1000.)\n"
],
"language": "python",
@@ -1310,16 +1201,13 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the total vapor pressure and molar compositions\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"m_benzene = 55. #in kg\n",
"m_toluene = 28. #in kg\n",
"m_xylene = 17. # in kg\n",
"\n",
- "# Calculations and Results\n",
"mole_benzene = m_benzene/78.;\n",
"mole_toluene = m_toluene/92.;\n",
"mole_xylene = m_xylene/106.;\n",
@@ -1364,22 +1252,17 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the mixture composition\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"vapor_pressure=8. #in kPa\n",
"pressure=100. #in kPa\n",
"\n",
- "# Calculations and Results\n",
- "#part 1\n",
"volume=1 #in m3\n",
"volume_ethanol=volume*(vapor_pressure/pressure);\n",
"volume_air=1-volume_ethanol;\n",
"print \"volumetric composition:- air composition = %f ethanol compostion = %f\"%(volume_air*100,volume_ethanol*100)\n",
"\n",
- "#part 2\n",
"molar_mass_ethanol=46;\n",
"molar_mass_air=28.9;\n",
"mass_ethanol=0.08*molar_mass_ethanol; #in kg\n",
@@ -1388,16 +1271,13 @@
"fraction_air=(mass_air*100)/(mass_air+mass_ethanol);\n",
"print \"composition by weight:-Air = %f Ethanol vapor = %f\"%(fraction_air,fraction_ethanol)\n",
"\n",
- "#part 3\n",
"mixture_volume=22.3*(101.3/100)*(299./273); #in m3\n",
"weight_ethanol=mass_ethanol/mixture_volume;\n",
"print \"weight of ethanol/cubic meter = %f Kg\"%(weight_ethanol)\n",
"\n",
- "#part 4\n",
"w_ethanol=mass_ethanol/mass_air;\n",
"print \"weight of ethanol/kg vapor free air = %f Kg\"%(w_ethanol)\n",
"\n",
- "#part 5\n",
"moles_ethanol=0.08/0.92;\n",
"print \"kmol of ethanol per kmol of vapor free air = %f\"%(moles_ethanol)\n"
],
@@ -1430,23 +1310,18 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find relative saturation and dew point\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"vapor_pressure=8. #in kPa\n",
"volume_ethanol=0.05;\n",
"\n",
"\n",
- "# Calculations and Results\n",
- "#basis 1kmol of mixture\n",
"partial_pressure=volume_ethanol*100;\n",
"relative_saturation=partial_pressure/vapor_pressure;\n",
"mole_ratio=volume_ethanol/(1-volume_ethanol);\n",
"print \"mole ratio = %f \\nrelative saturation = %f %%\"%(mole_ratio,relative_saturation*100)\n",
"\n",
- "#basis 1kmol saturated gas mixture at 100kPa\n",
"volume_vapor=(8./100)*100;\n",
"ethanol_vapor=volume_vapor/100.;\n",
"air_vapor=1-ethanol_vapor;\n",
@@ -1455,7 +1330,6 @@
"\n",
"print \"percentage saturation = %f %%\"%(percentage_saturation*100)\n",
"\n",
- "#dew point\n",
"print \"corresponding to partial pressure of 5kPa we get a dew point of 17.3 degree celcius\"\n"
],
"language": "python",
@@ -1486,26 +1360,21 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "#to find the properties of humid air\n",
"\n",
"import math \n",
"\n",
- "# Variables\n",
"p = 4.24 #in kPa\n",
"H_rel = 0.8;\n",
"\n",
- "# Calculations and Results\n",
"p_partial = p*H_rel;\n",
"molal_H = p_partial/(100-p_partial);\n",
"print \"initial molal humidity = %.3f\"%(molal_H)\n",
"\n",
- "#part 2\n",
"P = 200. #in kPa\n",
"p_partial = 1.70 #in kPa\n",
"final_H = p_partial/(P-p_partial);\n",
"print \"final molal humidity = %.4f\"%(final_H)\n",
"\n",
- "#part 3\n",
"p_dryair = 100 - 3.39;\n",
"v = 100*(p_dryair/101.3)*(273./303);\n",
"moles_dryair = v/22.4;\n",
@@ -1514,7 +1383,6 @@
"water_condensed = (vapor_initial-vapor_final)*18;\n",
"print \"amount of water condensed = %f kg\"%(water_condensed)\n",
"\n",
- "#part 4\n",
"total_air = moles_dryair+vapor_final;\n",
"final_v = 22.4*(101.3/200)*(288./273)*total_air;\n",
"print \"final volume of wety air = %f m**3\"%(final_v)\n"