{ "metadata": { "name": "", "signature": "sha256:0acf769d31306f5bc291e2574308a74de8651b4a4723b52ee59419306e6b7112" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 1 : Introduction" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.1 Page No : 20" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "d_r = 13640.; \t\t\t# Density of mercury in kg/m3\n", "g = 9.79; \t\t\t # Acceleration due to gravity in m/s2\n", "z = 562e-03; \t\t\t# Difference in height in m\n", "z0 = 761e-03; \t\t\t# Reading of barometer in m\n", "\n", "# Calculation\n", "P = (d_r*g*(z+z0))*(0.987/1e05); \t\t\t# Gas Pressure in bar\n", "\n", "# Results\n", "print \"Gas Pressure is %.3f bar\"%P\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Gas Pressure is 1.744 bar\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.2 Page No : 21" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "d_r = 13.6e03; \t\t\t# Density of mercury in kg/m3\n", "g = 9.81; \t\t\t# Acceleration due to gravity in m/s2\n", "z = 710e-03; \t\t\t# Stean flow pressure in m\n", "z0 = 772e-03; \t\t\t# Reading of barometer in m\n", "P = 1.4e06; \t\t\t# Gauge pressure of applied steam in Pa\n", "\n", "# Calculation\n", "P0 = d_r*g*z0; \t\t\t# Atmospheric pressure in Pa\n", "Pi = P+P0 ; \t\t\t# Inlet steam pressure in Pa\n", "Pc = d_r*g*(z0-z); \t\t\t# Condenser pressure in Pa\n", "\n", "# Results\n", "print \"Inlet steam pressure is %.3e Pa\"%Pi\n", "print \"Condenser pressure is %.2e Pa\"%Pc\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Inlet steam pressure is 1.503e+06 Pa\n", "Condenser pressure is 8.27e+03 Pa\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.3 Page No : 21" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "z = 0.760; \t\t\t# Barometer reading in m\n", "# Part (a)\n", "h1 = 40e-02; \t\t\t# Mercury height in vaccume in m\n", "d_r = 13.6e03; \t\t\t# Density of mercury in kg/m3\n", "g = 9.80; \t\t\t# Acceleration due to gravity in m/s2\n", "\n", "# Calculation and Results\n", "Patm = z*d_r*g; \t\t\t# Atmospheric pressure in Pas\n", "Pv = h1*d_r*g; \t\t\t# Pressue in vaccume in Pa\n", "Pabst = Patm-Pv; \t\t\t# Absolute pressure in Pa\n", "Pabs = 101.325 - Pv/1000\n", "\n", "print \"Pvaccum = %.2f kPa\"%(Pv/1000)\n", "print \"Pabsolute = %.f\"%(Pabst/1000),\"kPa\"\n", "print \"40 cmHg vacuum : %.3f kPa\"%Pabs\n", "\n", "# Part (b)\n", "h2 = 90e-02; \t\t\t# Mercury height in gauge in m\n", "Pg = h2*d_r*g; \t\t\t# Gauge Pressure in Pa\n", "Pabs1 = Patm + Pg ; \t\t\t# Absolute pressure in Pa\n", "\n", "print \"\\nPgauge = %.f kPa\"%(Pg/1000)\n", "print \"90cmHg gauge is %.3f\"%(Pabs1/1000),\"kPa\"\n", "\n", "# Part(c)\n", "d_w = 1e03 ; \t\t\t# Density of water in kg/m3\n", "h3 = 1.2 ; \t\t\t# Gauge Pressure water height in m\n", "Pga = d_w*h3*g; \t\t\t# Gauge Pressure in Pa\n", "Pabs3 = Patm + Pga ; \t\t\t# Absolute pressure in Pa\n", "print \"\\n1.2 m H2O gauge is %.3f\"%(Pabs3/1000),\"kPa\"\n", "\n", "# rounding off error" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Pvaccum = 53.31 kPa\n", "Pabsolute = 48 kPa\n", "40 cmHg vacuum : 48.013 kPa\n", "\n", "Pgauge = 120 kPa\n", "90cmHg gauge is 221.245 kPa\n", "\n", "1.2 m H2O gauge is 113.053 kPa\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.4 Page No : 22" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from scipy.integrate import quad\n", "\n", "# Variables\n", "Pr = 1.033e05; \t\t\t# Required Pressure in bar\n", "\n", "# Calculation\n", "def pressure(p):\n", " return p**(-0.714);\n", "g = 9.81; \t\t\t# Acceleration due to gravity in m/s2\n", "H = ((2.5e05**0.714)/g)* quad(pressure,0,Pr)[0]; \t\t\t# Depth of atmosphere required in m\n", "\n", "# Results\n", "print \"The depth of atmosphere required is %.3f Km\"%(H/1000)\n", " \n", "# note : there will be rounding off error because of quad function" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The depth of atmosphere required is 69.203 Km\n" ] } ], "prompt_number": 23 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.5 Page No : 22" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "m = 68. ; \t\t\t# Astronaut mass in Kg\n", "g = 9.806; \t\t\t# Acceleration due to gravity in m/s2\n", "\n", "# Calculation\n", "a = 10*g ; \t\t\t# Lift off acceleration in m/s2\n", "F = m*a; \t\t\t# Net vertical force in N\n", "\n", "# Results\n", "print \"Net vertical force experienced by astronaut is %.0f N\"%F\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Net vertical force experienced by astronaut is 6668 N\n" ] } ], "prompt_number": 6 } ], "metadata": {} } ] }