"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from __future__ import division\n",
"import math\n",
"\n",
"# Initialization of Variable\n",
"P1 = 0.1 #bar\n",
"x1 = 0.95\n",
"P2 = 0.1 #bar\n",
"T2 = 45 #deg C\n",
"T3 = 20 #degC\n",
"T4 = 35 #degC\n",
"\n",
"#calculations:\n",
"#assumption\n",
"Wdot = 0\n",
"#from table T-3,\n",
"hf1 = 191.83 #kJ/kg\n",
"hf2 = 188.45 #kJ/kg\n",
"hg1 = 2584.7 #kJ/kg\n",
"h4_3 = 62.7 #kJ/kg\n",
"#specific enthalpy\n",
"h1 = hf1 + x1*(hg1-hf1)\n",
"h2 = hf2\n",
"\n",
"#ratio of mdots\n",
"m3dot_m1dot = (h1 - h2)/h4_3\n",
"\n",
"#rate of energy transfer from the condensing steam to the cooling water\n",
"Qdotm = h2 - h1\n",
"\n",
"#Results\n",
"print \"a) ratio of the mass flow rate of the cooling water to the mass flow rate of the condensing stream is\", round(m3dot_m1dot,1)\n",
"print \"b) rate of energy transfer from the condensing steam to the cooling water is\",round(Qdotm,1),\"kJ/kg\" \n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"a) ratio of the mass flow rate of the cooling water to the mass flow rate of the condensing stream is 36.3\n",
"b) rate of energy transfer from the condensing steam to the cooling water is -2276.6 kJ/kg\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"