summaryrefslogtreecommitdiff
path: root/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb')
-rw-r--r--Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb48
1 files changed, 42 insertions, 6 deletions
diff --git a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb
index fc8059ee..aa52001e 100644
--- a/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb
+++ b/Physical_And_Chemical_Equilibrium_For_Chemical_Engineers/ch2.ipynb
@@ -1,6 +1,7 @@
{
"metadata": {
- "name": ""
+ "name": "",
+ "signature": "sha256:0a185017fb6d8b2f89e2c9757a0bd5f1ee2fdeb7cbf86205eb93a1d0a3214502"
},
"nbformat": 3,
"nbformat_minor": 0,
@@ -28,36 +29,50 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "''' Calculate internal energy of the steam\n",
- "enthalpy of the steam,entropy of the steam and Piston expanding.\n",
- "'''\n",
+ " \n",
"import math \n",
"\n",
+ "# Variables\n",
"m = 1. #[lbm] Mass of the steam\n",
"T_1 = 300. #[F] Initial temperature\n",
"P_1 = 14.7 #[psia] Initial pressure\n",
"P_sorronding = 14.7 #[psia]\n",
"Q = 50. #[Btu] Amount of the energy added to the system as heat\n",
"\n",
+ "# This is a closed system and we can apply the following equations\n",
+ "# delta_U_system = sum(dQ_in_minus_out) + sum(dW_in_minus_out) (A)\n",
+ "# dS_system = (m*ds)_system = sum((dQ)/T)_in_minus_out + dS_reversible (B)\n",
"\n",
+ "# From the steam tables, we look up the properties of steam at temperature 300F and pressure 14.7 psia and find \n",
"u_initial = 1109.6 #[Btu/lbm] Internal energy of the steam\n",
"h_initial = 1192.6 #[Btu/lbm] Enthalpy of the steam\n",
"s_initial = 1.8157 #[Btu/(lbm*R)] Entropy of the steam\n",
"\n",
+ "# The work here is done by the system, equal to\n",
+ "# -delta_w = P*A_piston*delta_x = P*m*delta_v\n",
"\n",
+ "# Calculations\n",
+ "# Substituting this in the equation (A) and rearranging, we have\n",
+ "# m*delta_(u + P*v) = m*delta_h = delta_Q\n",
+ "# From which we can solve for the final specific enthalpy\n",
"h_final = h_initial + Q #[Btu/lbm]\n",
"\n",
+ "# Now, by the linear interpolation we find that at h = 1242.6 Btu/lbm and P = 1 atm, temperature of the steam is given \n",
"T_2 = 405.7 #[F] Final temperature\n",
"\n",
+ "# At this final temperature and pressure we have the steam properties \n",
"u_final = 1147.7 #[Btu/lbm]\n",
"s_final = 1.8772 #[Btu/(lbm*R)]\n",
"\n",
+ "# Thus, increase in the internal energy, enthalpy and entropy are \n",
"delta_u = u_final - u_initial #[Btu/lbm]\n",
"delta_s = s_final - s_initial #[Btu/(lbm*R)]\n",
"delta_h = Q #[Btu/lbm]\n",
"\n",
+ "# The work done on the atmosphere is given by\n",
"w = delta_h - delta_u #[Btulbm]\n",
"\n",
+ "# Results\n",
"print \"The increase in internal energy of the steam by adding the heat is %0.2f Btu/lbm\"%(delta_u)\n",
"print \"The increase in enthalpy of the steam by adding the heat is %0.2f Btu/lbm\"%(delta_h)\n",
"print \"The increase in entropy of the steam by adding the heat is %0.4f Btu/lbm\"%(delta_s)\n",
@@ -91,25 +106,40 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
"\n",
+ "# Variables\n",
"T_in = 600. #[F] Input steam temperature\n",
"P_in = 200. #[psia] Input steam pressure\n",
"P_exit = 50. #[psia]\n",
"\n",
+ "# Because this is a steady-state, steady-flow process, we use \n",
+ "# (work per pound) = W/m = -( h_in - h_out )\n",
"\n",
+ "# From the steam table we can read the the inlet enthalpy and entropy as \n",
"h_in = 1322.1 #[Btu/lbm]\n",
"s_in = 1.6767 #[Btu/(lb*R)]\n",
"\n",
+ "# Now, we need the value of h_out\n",
"\n",
+ "# For a reversible adiabatic steady-state, steady-flow process, we have\n",
+ "# sum(s*m_in_minus_out) = ( s_in - s_out ) = 0\n",
"\n",
+ "# Which indicates that inlet and outlet entropies are same\n",
+ "# We can find the outlet temperature by finding the value of the temperature in the steam table\n",
+ "# For which the inlet entropy at 50 psia is the same as the inlet entropy, 1.6767 Btu/(lb*R). \n",
+ "# By linear interpolation in the table we find \n",
"T_in = 307.1 #[R]\n",
"\n",
+ "# and by the linear interpolation in the same table we find that\n",
"h_out = 1188.1 #[Btu/lb]\n",
"\n",
+ "# Calculations\n",
+ "# Thus, we find \n",
"W_per_pound = (h_in - h_out) #[Btu/lb]\n",
"\n",
+ "# Results\n",
"print \" The work output of the turbine of steam is %0.1f Btu/lb\"%(-W_per_pound)\n"
],
"language": "python",
@@ -137,13 +167,17 @@
"cell_type": "code",
"collapsed": false,
"input": [
- "\n",
+ " \n",
"import math \n",
"\n",
"\n",
+ "# Variables\n",
"T = 500. #[F]\n",
"P = 680. #[psi]\n",
"\n",
+ "# Calculations\n",
+ "# It is reported in the book in the table A.1(page 417) that for water \n",
+ "# We know that T_r = T/T_c and P_r = P/P_c, so\n",
"T_c = 647.1*1.8 #[R]\n",
"P_c = 220.55*14.51 #[psia]\n",
"w = 0.345\n",
@@ -153,7 +187,9 @@
"z_1 = P_r/T_r*(0.139-0.172/T_r**(4.2))\n",
"z = z_0+w*z_1\n",
"\n",
+ "# Results\n",
"print \"The compressibility factor of steam at the given state is %0.3f\"%(z)\n",
+ "# Based on the steam table (which may be considered as reliable as the experimental data, the value of z is 0.804.\n"
],
"language": "python",
"metadata": {},