diff options
Diffstat (limited to 'Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter17.ipynb')
-rw-r--r--[-rwxr-xr-x] | Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter17.ipynb | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter17.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter17.ipynb index 373cb84b..145463d3 100755..100644 --- a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter17.ipynb +++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter17.ipynb @@ -42,6 +42,7 @@ } ], "source": [ + "import math\n", "P1 = 0.18 # Diffuser static pressure in MPa\n", "R = 0.287 # Gas constant\n", "T1 = 37 # Static temperature \n", @@ -50,7 +51,7 @@ "V1 = 267 # Inlet velocity in m/s\n", "w = (P1*1e3/(R*(T1+273)))*A1*V1 # mass flow rate\n", "g = 1.4 # Heat capacity ratio\n", - "c1 = sqrt(g*R*(T1+273)*1000) # velocity\n", + "c1 = math.sqrt(g*R*(T1+273)*1000) # velocity\n", "M1 = V1/c1 # Mach number\n", "A1A_ = 1.0570 # A1/A* A* = A_\n", "P1P01 = 0.68207 # pressure ratio\n", @@ -94,7 +95,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 6, "metadata": { "collapsed": false }, @@ -131,6 +132,7 @@ } ], "source": [ + "import math\n", "M2 = 2.197 # Mach number\n", "P2P0 = 0.0939 # pressure ratio\n", "T2T0 = 0.5089 # Temperature ratio\n", @@ -140,7 +142,7 @@ "R = 0.287 # Gas constant\n", "P2 = P2P0*P0*1e3 # Static Pressure\n", "T2 = T2T0*T0 # Static temperature\n", - "c2 = sqrt(g*R*T2*1000)\n", + "c2 = math.sqrt(g*R*T2*1000)\n", "V2 = c2*M2 #velocity at the exit from the nozzle\n", "# for air\n", "P_P0 = 0.528 # pressure ratio\n", @@ -148,7 +150,7 @@ "P_ = P_P0*P0*1e3 # Static Pressure\n", "T_ = T_T0*T0 #Static temperature\n", "rho_ = P_/(R*T_) # density\n", - "V_ = sqrt(g*R*T_*1000) # Velocity at the exit from the nozzle \n", + "V_ = math.sqrt(g*R*T_*1000) # Velocity at the exit from the nozzle \n", "At = 500e-06 # throat area\n", "w = At*V_*rho_# Maximum flow rate of air\n", "\n", @@ -166,7 +168,7 @@ "T2T0b = 0.9812 # Temperature ratio\n", "P2b = P2P0b*P0*1e3#Static Pressure \n", "T2b = T2T0b*T0 # Static temperature\n", - "c2b = sqrt(g*R*T2b*1000) # Velocity \n", + "c2b = math.sqrt(g*R*T2b*1000) # Velocity \n", "V2b = c2b*Mb #Velocity at the exit from the nozzle\n", "print \"\\n\\n When divergent section act as a diffuser\"\n", "print \"\\n Maximum flow rate of air is \",w ,\" kg/s\"\n", @@ -185,7 +187,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 7, "metadata": { "collapsed": false }, @@ -203,7 +205,7 @@ } ], "source": [ - "\n", + "import math\n", "Px = 16.0 # pressure in kPa\n", "Poy = 70.0 #pressure in kPa \n", "Mx = 1.735 # Mach number\n", @@ -236,7 +238,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 9, "metadata": { "collapsed": false }, @@ -260,7 +262,7 @@ } ], "source": [ - "\n", + "import math\n", "Ax = 18.75 # cross sectional area in divergent part in m**2\n", "A_ = 12.50 # throat area in m**2\n", "AA_ = 1.5 # Area ratio\n", @@ -285,7 +287,7 @@ "M2 = 0.402\n", "P2oy = 0.895\n", "P2 = P2oy*Poy\n", - "syx = -R*log(Poy/Pox) # sy-sx\n", + "syx = -R*math.log(Poy/Pox) # sy-sx\n", "\n", "print \"\\n Example 17.5\\n\"\n", "print \"\\n Exit Mach number is \",M2\n", |