diff options
Diffstat (limited to 'Fundamentals_Of_Thermodynamics/Chapter5.ipynb')
-rwxr-xr-x | Fundamentals_Of_Thermodynamics/Chapter5.ipynb | 469 |
1 files changed, 0 insertions, 469 deletions
diff --git a/Fundamentals_Of_Thermodynamics/Chapter5.ipynb b/Fundamentals_Of_Thermodynamics/Chapter5.ipynb deleted file mode 100755 index 24351fdb..00000000 --- a/Fundamentals_Of_Thermodynamics/Chapter5.ipynb +++ /dev/null @@ -1,469 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:8e29dcea16eab605fcf93b95197200be339c1be6076d5413e7d70418a9a6df29"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter5:THE FIRST LAW OF THERMODYNAMICS"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.1:pg-131"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1\n",
- "#calculating height\n",
- "\n",
- "m=1100 #mass of car in kg\n",
- "ke=400 #kinetic energy of car in kJ\n",
- "V=(2*ke*1000/m)**0.5 #velocity of car in m/s\n",
- "g=9.807 #acc. due to gravity in m/s^2\n",
- "H=ke*1000/(m*g) #height to which the car should be lifted so that its potential energy equals its kinetic energy\n",
- "print\"hence,the car should be raised to a height is\",round(H,1),\"m\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "hence,the car should be raised to a height is 37.1 m\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.2:pg-134"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2\n",
- "#change in internal energy\n",
- "\n",
- "W=-5090 #work input to paddle wheel in kJ\n",
- "Q=-1500 #heat transfer from tank in kJ\n",
- "dU=Q-W #change in internal energy in kJ\n",
- "print\"hence,change in internal energy is\",round(dU),\"kj\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "hence,change in internal energy is 3590.0 kj\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.3:pg-134"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "#analysis of energy transfer\n",
- "\n",
- "g=9.806 #acceleration due to gravity in m/s^2\n",
- "m=10 #mass of stone in kg\n",
- "H1=10.2 #initial height of stone above water in metres\n",
- "H2=0 #final height in metres\n",
- "dKE1=-m*g*(H2-H1) #change in kinetic energy when stone enters state 2 in J\n",
- "dPE1=-1 #change in potential energy when stone enters state 2 in J\n",
- "print\"\\n hence,when stone is \",round(dKE1),\"J\"\n",
- "print\"\\n and change in potential energy is \",round(dPE1),\"J\"\n",
- "dPE2=0 #change in potential energy when stone enters state 3 in JQ2=0 //no heat transfer when stone enters state 3 in J\n",
- "W2=0 #no work done when stone enters state 3 in J\n",
- "dKE2=-1 #change in kinetic energy when stone enters state 3\n",
- "dU2=-dKE2 #change in internal energy when stone enters state 3 in J\n",
- "print\"\\n hence,when stone has just come to rest in the bucket is \",round(dKE2),\"J\" \n",
- "print\"\\n and dU is\",round(dU2),\"J\" \n",
- "dKE3=0 #change in kinetic energy when stone enters state 4\n",
- "dPE=0 #change in potential energy when stone enters state 4 in J\n",
- "W3=0 #no work done when stone enters state 4 in J\n",
- "dU3=-1 #change in internal energy when stone enters state 4 in J\n",
- "Q3=dU3 #heat transfer when stone enters state 4 in J\n",
- "print\"\\n hence,when stone has entered state 4 is\",round(dU3),\"J\" \n",
- "print\"\\n and Q3 is \",round(Q3),\"J\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " \n",
- " hence,when stone is 1000.0 J\n",
- "\n",
- " and change in potential energy is -1.0 J\n",
- "\n",
- " hence,when stone has just come to rest in the bucket is -1.0 J\n",
- "\n",
- " and dU is 1.0 J\n",
- "\n",
- " hence,when stone has entered state 4 is -1.0 J\n",
- "\n",
- " and Q3 is -1.0 J\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.4:pg-136"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4\n",
- "#Determinig the missing properties \n",
- "\n",
- "T1=300 #given temp. in Celsius\n",
- "u1=2780 #given specific internal enrgy in kJ/kg\n",
- "print\"From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\" #hiven pressure in kPa\n",
- "u2=2000 #given specific intrernal energy in kJ/kg\n",
- "print\"at P=2000 kPa\"\n",
- "uf=906.4 #in kJ/kg\n",
- "ug=2600.3 #in kJ/kg \n",
- "x2=(u2-906.4)/(ug-uf) \n",
- "print\"Also, under the given conditions\"\n",
- "vf=0.001177 #in m^3/kg \n",
- "vg=0.099627 #in m^3/kg\n",
- "v2=vf+x2*(vg-vf)#Specific volume for water in m^3/kg\n",
- "print\"\\n hence,specific volume for water is \",round(v2,5),\"m^3/kg\" \n",
- "print\"\\n Therefore ,this state is \",round(x2,4),\"N\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "From steam table, at T=300 C,ug=2563.0 kJ/kg.So,u1>ug ,it means the state is in the superheated vapor region.So, by interplotation,we find P=1648 kPa and v=0.1542 m^3/kg\n",
- "at P=2000 kPa\n",
- "Also, under the given conditions\n",
- "\n",
- " hence,specific volume for water is 0.06474 m^3/kg\n",
- "\n",
- " Therefore ,this state is 0.6456 N\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.5:pg-138"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5\n",
- "#calculating heat transfer for the given process\n",
- "\n",
- "Vliq=0.05 #volume of saturated liquid in m^3\n",
- "vf=0.001043 #in m^3/kg\n",
- "Vvap=4.95 #volume of saturated water vapour in m^3\n",
- "vg=1.6940 #in m^3/kg\n",
- "m1liq=Vliq/vf #mass of liquid in kg\n",
- "m1liq=round(m1liq,2)\n",
- "m1vap=Vvap/vg #mass of vapors in kg\n",
- "m1vap=round(m1vap,2)\n",
- "u1liq=417.36 #specific internal energy of liquid in kJ/kg\n",
- "u1vap=2506.1 #specific internal energy of vapors in kJ/kg\n",
- "U1=m1liq*u1liq + m1vap*u1vap #total internal energy in kJ\n",
- "m=m1liq+m1vap #total mass in kg\n",
- "V=5.0 #total volume in m^3\n",
- "v2=V/m #final specific volume in m^3/kg\n",
- "print\"by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\"\n",
- "u2=2600.5 #specific internal energy at final state in kJ/kg\n",
- "U2=m*u2 #internal energy at final state in kJ\n",
- "Q=U2-U1 #heat transfer for the process in kJ\n",
- "print\"\\n hence,heat transfer for the process is\",round(Q),\"kJ\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "by interplotation we find that for steam, if vg=0.09831 m^3/kg then pressure is 2.03 Mpa\n",
- "\n",
- " hence,heat transfer for the process is 104935.0 kJ\n"
- ]
- }
- ],
- "prompt_number": 36
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.6:pg-143"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6\n",
- "#calculating work and heat transfer for the process\n",
- "\n",
- "V1=0.1 #volume of cylinder in m^3\n",
- "m=0.5 #mass of steam in kg\n",
- "v1=V1/m #specific volume of steam in m^3/kg\n",
- "vf=0.001084 #m^3/kg\n",
- "vfg=0.4614 #m^3/kg\n",
- "x1=(v1-vf)/vfg #quality\n",
- "hf=604.74 #kJ/kg\n",
- "hfg=2133.8#kJ/kg\n",
- "h2=3066.8 #final specific heat enthalpy in kJ/kg\n",
- "h1=hf+x1*hfg #initial specific enthalpy in kJ/kg\n",
- "Q=m*(h2-h1) #heat transfer for this process in kJ\n",
- "P=400 #pressure inside cylinder in kPa\n",
- "v2=0.6548 #specific enthalpy in m^3/kg\n",
- "W=m*P*(v2-v1) #work done for the process in kJ\n",
- "print\"\\n hence, work done for the process is\",round(W),\"kJ\" \n",
- "print\"\\n and heat transfer is \",round(Q,1),\"kJ\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence, work done for the process is 91.0 kJ\n",
- "\n",
- " and heat transfer is 771.1 kJ\n"
- ]
- }
- ],
- "prompt_number": 38
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.8:pg-151"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8\n",
- "#calculating change in enthalpy\n",
- "import math\n",
- "\n",
- "h1=273.2 #specific heat enthalpy for oxygen at 300 K\n",
- "h2=1540.2 #specific heat enthalpy for oxygen at 1500 K\n",
- "T1=300 #initial temperature in K\n",
- "T2=1500 #final temparature in K\n",
- "\n",
- "dh1=h2-h1 #this change in specific heat enthalpy is calculated using ideal gas tables \n",
- "dh3=0.922*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 300K\n",
- "dh4=1.0767*(T2-T1) #it is claculated if we assume specific heat enthalpy to be constant and uses its value at 900K i.e mean of initial and final temperature\n",
- "print\"\\n Hence,change in specific heat enthalpy if ideal gas tables are used is \",round(dh1,1),\"kJ/kg\"\n",
- "print\"\\n if specific heat is assumed to be constant and using its value at T1 is\",round(dh3,1),\"kJ/kg\"\n",
- "print\"\\n if specific heat is assumed to be constant at its value at (T1+T2)/2 is\",round(dh4,1),\"kJ/kg\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " Hence,change in specific heat enthalpy if ideal gas tables are used is 1267.0 kJ/kg\n",
- "\n",
- " if specific heat is assumed to be constant and using its value at T1 is 1106.4 kJ/kg\n",
- "\n",
- " if specific heat is assumed to be constant at its value at (T1+T2)/2 is 1292.0 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.9:pg-152"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9\n",
- "#determining amount of heat transfer\n",
- "\n",
- "P=150 #pressure of nitrogen in cylinder in kPa\n",
- "V=0.1 #initial volume of cylinder in m^3\n",
- "T1=25 #initial temperature of nitrogen in celsius\n",
- "T2=150 #final tempareture of nitrogen in celsius\n",
- "R=0.2968 #in kJ/kg-K\n",
- "m=P*V/(R*(T1+273)) #mass of nitrogen in kg\n",
- "Cv=0.745 #constant volume specific heat for nitrogen in kJ/kg-K\n",
- "W=-20 #work done on nitrogen gas in kJ\n",
- "Q=m*Cv*(T2-T1)+W #heat transfer during the process in kJ\n",
- "print\"\\n hence,the heat transfer for the above process is\",round(Q,1),\"kJ\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the heat transfer for the above process is -4.2 kJ\n"
- ]
- }
- ],
- "prompt_number": 43
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.10:pg-155"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10\n",
- "#calculating rate of increase of internal energy\n",
- "\n",
- "W=-12.8*20 #power consumed in J/s\n",
- "Q=-10 #heat transfer rate from battery in J/s\n",
- "r=Q-W #rate of increase of internal energy\n",
- "print\"\\n hence,the rate of increase of internal energy is\",round(r),\"J/s\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the rate of increase of internal energy is 246.0 J/s\n"
- ]
- }
- ],
- "prompt_number": 45
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5.11:pg-155"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11\n",
- "#rate of change of temperature\n",
- "\n",
- "Q=1500.0 #power produced by burning wood in J/s\n",
- "mair=1 #mass of air in kg\n",
- "mwood=5 #mass of soft pine wood in kg \n",
- "miron=25 #mass of cast iron in kg\n",
- "Cvair=0.717 #constant volume specific heat for air in kJ/kg\n",
- "Cwood=1.38 #constant volume specific heat for wood in kJ/kg\n",
- "Ciron=0.42 #constant volume specific heat for iron in kJ/kg\n",
- "dT=75-20 #increase in temperature in Celsius\n",
- "T=(Q/1000)/(mair*Cvair+mwood*Cwood+miron*Ciron) #rate of change of temperature in K/s\n",
- "dt=(dT/T)/60 #in minutes\n",
- "print\" hence,the rate of change of temperature is\",round(T,4),\"k/s\" \n",
- "print\" and time taken to reach a temperature of T is\",round(dt),\"min\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " hence,the rate of change of temperature is 0.0828 k/s\n",
- " and time taken to reach a temperature of T is 11.0 min\n"
- ]
- }
- ],
- "prompt_number": 49
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file |