{ "metadata": { "name": "", "signature": "sha256:13cb37b7bedc939f2932970f808cc63def43a3ee0a76b1e4d1958377aebef52c" }, "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 : 8" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#Given \n", "m = 100 #m is the mass of the object in kg\n", "a = 10 #a is the acceeleration due to gravity in m/s**2\n", "\n", "#To determine the force exerted\n", "F = m*a #F is the force exerted by the object in kg\n", "print \"Force exerted by the object= \",\n", "print \"%.6f\" %F,\n", "print \"N\"\n", "F = (1/9.8065)*m*a;#F is the force exerted by the object in kgf\n", "print \"Force exerted by the object= \",\n", "print \"%.6f\" %F,\n", "print \"N\"\n", "#end\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Force exerted by the object= 1000.000000 N\n", "Force exerted by the object= 101.973181 N\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.4 Page No : 13" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#Given\n", "h = 100 #h is the height of the water fall in m\n", "n = .855 #n is the efficiency of the turbine\n", "g = 9.8 #g is the acceleration due to gravity in m/(s**2)\n", "E = 100*10*3600;#E is the potential enery of water available to the bulb for 10 hours in watt or J/s\n", "\n", "#To determine the mass of water required\n", "m = (E/(g*h*n)) #m is the mass of water required for lighting the bulb for 10 hours in Kg\n", "print \"Mass of water required for lighting the bulb for 10 hours in Kg= \",\n", "print \"%.6f\"%m,\n", "print \"Kg\"\n", "print \"Mass of water required for lighting the bulb for 10 hours in tonnes= \",\n", "print \"%.6f\"%(m/907.2),\n", "print \"Kg\"\n", "#end\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Mass of water required for lighting the bulb for 10 hours in Kg= 4296.455424 Kg\n", "Mass of water required for lighting the bulb for 10 hours in tonnes= 4.735952 Kg\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.5 Page No : 17" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "#Given\n", "n = 1. #n is the Kg mole of an ideal gas\n", "P = 700.*(10**4) #P is the pressure of the system in N/(m**2)\n", "W = 45. #W is the weight of the mass in Kg\n", "M = 20. #M is the weight of the piston and piston rod together in Kg\n", "T = 300. #T is the consmath.tant temperature of the bath in K\n", "h = .4 #h is the height difference of the piston after expansion in m\n", "\n", "#To calculate the work obtained\n", "a = (10**-4) #a is the cross sectional area of the cylinder in m**2\n", "V = h*a #V is the volume changed as gas expands in m**3\n", "\n", "#(i). If gas alone is the system\n", "#1Kgf = 9.8065Nm\n", "P1 = ((W+M)*9.8065)/(10**-4) #P1 is the resisting pressure when the gas confined in the cylinder taken as a system\n", "W1 = P1*V #W1 is the work done if the gas confined in the cylinder us taken as system\n", "print \"Work done by the system if the gas confined in the cylinder is taken as a system is \",\n", "print \"%.6f \"%W1,\n", "print \"Nm\"\n", "\n", "#(ii). If gas + piston + piston rod is a system\n", "P2 = ((W*9.8065)/(10**-4)) #P2 is the resisting pressure when the gas plus piston plus piston rod is taken as a system\n", "W2 = P2*V #W2 is the Work done by the system if the gas plus piston plus piston rod is taken as a system\n", "print \"Work done by the system if the gas plus piston plus piston rod is taken as system is \",\n", "print \"%.6f\"%W2,\n", "print \"Nm\"\n", "\n", "#(iii). If gas + piston + piston rod +weight is system\n", "P3 = 0 #P3 is the resisting pressure when the gas plus piston plus piston rod plus weight is taken as a system\n", "W3 = P3*V #W3 is the work done by the system if the gas plus piston plus piston rod plus weight is taken as a system\n", "print \"Work done by the system if the gas plus piston plus piston rod plus weight is taken as a system is \",\n", "print \"%.4f\"%W3,\n", "#end\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Work done by the system if the gas confined in the cylinder is taken as a system is 254.969000 Nm\n", "Work done by the system if the gas plus piston plus piston rod is taken as system is 176.517000 Nm\n", "Work done by the system if the gas plus piston plus piston rod plus weight is taken as a system is 0.0000\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.6 Page No : 19" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "#Given\n", "n = 1 #n is the Kg mole of ideal gas.\n", "P1 = 700*(10**4) #P1 is the initial pressure of the system in N/(m**2)\n", "P2 = 638*(10**4) #P2 is the final pressure of the system in N/(m**2)\n", "T = 300 #T is temperature of the system in K\n", "R = 8314.4 #R is gas consmath.tant in Nm/Kgmole deg K\n", "\n", "#To calculate the work done\n", "W = n*R*T*math.log(P1/float(P2)) #W is the work done by the system in Nm\n", "print \"Work done by the system is \",\n", "print \"%.2e\"%W,\n", "print \"Nm\"\n", "#end" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Work done by the system is 2.31e+05 Nm\n" ] } ], "prompt_number": 7 } ], "metadata": {} } ] }