From f270f72badd9c61d48f290c3396004802841b9df Mon Sep 17 00:00:00 2001 From: kinitrupti Date: Fri, 12 May 2017 18:53:46 +0530 Subject: Removed duplicates --- .../Chapter1_2.ipynb | 209 +++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100755 Thermodynamics_Demystified_by_Merle_C._Potter/Chapter1_2.ipynb (limited to 'Thermodynamics_Demystified_by_Merle_C._Potter/Chapter1_2.ipynb') diff --git a/Thermodynamics_Demystified_by_Merle_C._Potter/Chapter1_2.ipynb b/Thermodynamics_Demystified_by_Merle_C._Potter/Chapter1_2.ipynb new file mode 100755 index 00000000..68c66861 --- /dev/null +++ b/Thermodynamics_Demystified_by_Merle_C._Potter/Chapter1_2.ipynb @@ -0,0 +1,209 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2622b864e241f67942d9af83d84aabbbf519132ac138f1180d8869df35c708b4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER 1 : Basic Principles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.2 : PG-9 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# initialization of variables\n", + "m=10 # mass in Kg\n", + "V=5 # velocity in m/s\n", + "\n", + "KE=m*V**2/2 # kinetic energy in N-m \n", + "print \"The Kinetic Energy is \",round(KE),\" N.m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Kinetic Energy is 125.0 N.m\n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.3 : PG-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# initialization of variables\n", + "V= 3*5*20; # Volume of air in m^3 from dimensions\n", + "m= 350.0; # mass in kg\n", + "g= 9.81; # gavitational acceleration in m/s^2\n", + "\n", + "rho=m/V;# density\n", + "print \" The Density is \",round(rho,3),\"kg/m^3 \\n\"\n", + "\n", + "v= 1/rho # specific volume of air\n", + "print \" The specific volume is\", round(v,3),\"m^3/kg \\n\"\n", + "\n", + "gama= rho*g # specific weight of air\n", + "print \" The specific weight is\", round(gama,2),\" N/m^3\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Density is 1.167 kg/m^3 \n", + "\n", + " The specific volume is 0.857 m^3/kg \n", + "\n", + " The specific weight is 11.45 N/m^3\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.4 : PG-13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# initialization of variables\n", + "h=0.020 # height of mercury in m\n", + "gammawater=9810 # specific weight of water in N/m^3\n", + "Patm=0.7846*101.3 # atmospheric pressure in kPa from table B.1\n", + "\n", + "Pgauge=13.6*gammawater*h/1000 # pressure in Pascal from condition gammaHg=13.6*gammawater\n", + "\n", + "P=(Pgauge+Patm)# absolute pressure in KPa\n", + "#result\n", + "print \"The Pressure is\",round(P,2),\" kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Pressure is 82.15 kPa\n" + ] + } + ], + "prompt_number": 79 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.5 : PG-13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# initialization of variables\n", + "d=10.0/100 # diameter of cylinder in 'm'\n", + "P=600 # pressure in KPa\n", + "Patm=100 # atmospheric pressure in Kpa\n", + "K=4.8*1000 # spring constant in N/m \n", + "\n", + "deltax=(P-Patm)*(math.pi*1000*d**2)/(4*K) # by balancing forces on piston\n", + "#result\n", + "print \"The Compression in spring is\",round(deltax,3),\" m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Compression in spring is 0.818 m\n" + ] + } + ], + "prompt_number": 80 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.6 : PG-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# initialization of variables\n", + "ma=2200 # mass of Automobile 'a' in kg\n", + "va=25 #velocity of Automobile 'a' in m/s before collision\n", + "va1=13.89 # velocity of Automobile 'a' after collision in m/s\n", + "mb=1000 # mass of Automobile 'b' in kg\n", + "vb=24.44 #velocity of Automobile 'b' after collision in m/s\n", + "\n", + "KE1=(ma*va**2)/2 # kinetic energy before collision\n", + "KE2=(ma*va1**2)/2+(mb*vb**2)/2 # kinetic energy after collision\n", + "U=(KE1-KE2)/1000 # internal energy from conservation of energy principle in kJ\n", + "#result\n", + "print \"The increase in kinetic energy is of\",round(U,1),\" kJ\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The increase in kinetic energy is of 176.6 kJ\n" + ] + } + ], + "prompt_number": 81 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file -- cgit