{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 3: First Law of Thermodynamics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.10: To_calculate_the_pump_work_required.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.10\n", "clear;\n", "clc;\n", "\n", "//Given\n", "V = 0.3;//Volume of the tank in m^3\n", "P1 = 1;//Initial pressure of the tank in atm\n", "P2 = 0;//Final pressure of the tank in atm\n", "T = 298;//Temperature of the tank in K\n", "t = 10;//evacuation time in min\n", "\n", "//delN=(V/(R*T)*delP)..(a) change in moles as V and T are constant\n", "//delW=delN*R*T*lnP..(b)pump work required\n", "//From (a)&(b),delW=V*delP*lnP\n", "\n", "//To calculate the pump work required\n", "//On doing integration of dW we will get\n", "\n", "W = V*(P1-P2);//pump work done in J/sec\n", "W1=(W*(1.033*10^4))/(75*600);\n", "mprintf('The pump work required is %f hp',W1);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.11: To_calculate_the_quality_of_exit_steam.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.11\n", "clear;\n", "clc;\n", "\n", "//Given\n", "H1 = 680.6;//Enthalpy of entering steam at 6Kgf/cm^2 &200 deg cel in Kcal/Kg\n", "u1 = 60;//velocity at which steam entered the nozzle in m/sec\n", "u2 = 600;//velocity at which steam left the nozzle in m/sec\n", "g = 9.8;\n", "Hg = 642.8; Hlq = 110.2;//Enthalpy of saturated vapour & saturated liquid at 1.46 Kgf/cm^2 respectively\n", "\n", "//To calculate the quality of exit steam\n", "H2 = H1+((u1^2)-(u2^2))/(2*g*427);//enthalpy of leaving steam in Kcal/Kg\n", "x = (H2-Hlq)/(Hg-Hlq);\n", "mprintf('The quality of exit steam is %f percent',x*100);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.12: To_calculate_the_internal_energy_of_the_steam_in_the_chamber.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.12\n", "clear;\n", "clc;\n", "\n", "//Given\n", "W = 0;//pump work\n", "Mi = 0;//chamber is initially evacuated\n", "M2 = 0;//no exist stream\n", "H1 = 684.2;//enthalpy of steam at 200 deg cel & 3 Kgf/cm^2\n", "\n", "//To calculate the internal energy of the steam in the chamber\n", "//Q=150*m1;.. (a) heat lost from the chamber in Kcal/Kg\n", "//m1=mf;..(b) mass of steam added from large pipe is equal to steam in chamber\n", " //H1*M1-Q=Mf*Ef; using (a)&(b)\n", " Ef = H1-150;\n", " mprintf('The internal energy of steam in chamber is %f Kcal',Ef);\n", " //end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.13: To_calculate_the_final_weight_and_the_final_temperature_of_the_air_in_the_tank.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.13\n", "clear;\n", "clc;\n", "\n", "//Given\n", "//Q=W=delPE=delKE=0;\n", "//M2=0; no exit stream\n", "Ti = 288;//initial temperature in K\n", "H = 7*Ti;//enthalpy of air in Kcal/Kgmole\n", "Ei = 5*Ti;// initial internal energy of air in Kcal/Kgmole\n", "//Ef=5*Tf;Final internal energy of air in Kcal/Kgmole\n", "Pi = 0.3;//initial pressure in atm\n", "V = 0.57;//volume of the tank in m^3\n", "R = 848;//gas constant in mKgf/Kg mole K\n", "Pf = 1;//final prssure in atm\n", "\n", "//To calculate the final weight and the final temperature of the air in the tank\n", "Mi = (Pi*V*1.03*10^4)/(R*Ti);//initial quantity of air in tank in Kg mole\n", "//Tf=(Pf*V*1.033*10^4)/(Mf*R)..(a) final temperature,Mf=final quantity of air in tank in Kg mole\n", "//M1=Mf-Mi..(b) M1 is mass of steam added in Kg mole\n", "//H*M1=(Ef*Mf)-(Ei*Mi)\n", "//H*M1=((5*Pf*V*1.033*10^4)/(Tf*R))*Tf-(Ei*Mi)...(c)\n", "A = [1 -1;0 -H];\n", "B = [Mi;((Ei*Mi)-((5*Pf*V*1.03*10^4)/R))];\n", "x = A\B;\n", "Mf = x(1);\n", "mprintf('The final weight of air in the tank is%f Kg',Mf);\n", "\n", "Tf = (Pf*V*1.03*10^4)/(Mf*R);\n", "mprintf('\n The final temperature of air in the tank is %f K',Tf);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.14: Theoretical_problem.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.14\n", "clear;\n", "clc;\n", "\n", "//Given\n", "//The given example is a theoretical problem and it does not involve any numerical computation\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.1: To_calculate_the_change_in_internal_energy.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.1\n", "clear;\n", "clc;\n", "\n", "//Given\n", "W = -((2*745.6*(10^-3)/4.18)*3600);//work added to the system in Kcal/hr\n", "m = 10;//Amount of fluid in tank in Kg\n", "Q = -378;//Heat losses from the system in Kcal/hr\n", "\n", "//To calculate the change in internal energy\n", "delE=(Q-W)/m;// Change in internal energy in Kcal/hr kg\n", "mprintf('Change in Internal energy is %f Kcal/hr Kg',delE);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.2: To_calculate_the_change_in_internal_energy.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.2\n", "clear;\n", "clc;\n", "\n", "//Given\n", "n = 1;//kg moles of a gas\n", "Cv = 5;//specific heat in Kcal/Kgmole\n", "delT = 15;//increase in temperature in deg celsius\n", "\n", "//To calculate the change in internal energy\n", "Q = n*Cv*delT;//heat given to the system in Kcal\n", "W = 0;//work done\n", "delE = Q-W;//Change in internal energy\n", "mprintf('Change in internal energy is %f Kcal',delE);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.3: To_calculate_the_work_done_by_the_expanding_gas_and_increase_in_internal_energy.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.3\n", "clear;\n", "clc;\n", "\n", "//Given\n", "P = 1;//constant pressure throughout the process in atm\n", "T1 = 273;//Initial temperature in K\n", "T2 = 373;//Final temperature in K\n", "V1 = 0;//Volume of liquid water or initial volume\n", "V0 = 22.4;//volume of vapour at standard condition in cubic meter\n", "Q = 9.7//Heat of vapourisation in Kcal\n", "\n", "//To calculate the work done by the expanding gas and increase in internal energy\n", "//(i)Calculation of work done\n", "V2 = 22.4*(T2/T1)*(P)*(10^-3);//Volume of final vapour in cubic meter\n", "w = P*(V2-V1);//Work done in atm cubic meter\n", "W = w*(1.03*10^4)/427;//Work done in Kcal\n", "mprintf('(i)Work done by the expanding gas is %f Kcal',W);\n", "\n", "//(ii)Calculation of change in internal energy\n", "delE = Q-W;\n", "mprintf('\n\n (ii)Increase in internal energy is %f Kcal',delE);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.4: To_calculate_the_time_taken_for_the_gas_to_attain_10_atm.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.4\n", "clear;\n", "clc;\n", "\n", "//Given\n", "W = 0;//work done during the process\n", "P1 = 1;//Initial pressure in atm\n", "P2 = 10;//Final pressure in atm\n", "V2 = V1;//Initial & final volume are equal\n", "Cv = 0.23//specific heat at constant volume in Kcal/Kg deg K\n", "//(delQ/delT)=Q\n", "Q = 1.3;//Rate of heat addition in Kcal/min\n", "m = 2.5//Weight of an ideal gas in Kg\n", "T1 = 298//Initial temperature in Kelvin\n", "\n", "//To calculate the time taken for the gas to attain 10 atm\n", "//Q = m*Cv*(delT/delt)=1.3\n", "T2 = (P2*T1)/(P1);//Final temperature in Kelvin\n", "t = ((m*Cv)/1.3)*(T2-T1);//time taken in minutes\n", "mprintf('The time taken to attain a pressure of 10 atm is %f hrs',t/60);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.5: Theoretical_problem.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.5\n", "clear;\n", "clc;\n", "\n", "//Given\n", "//The given example is a theoretical problem and it does not involve any numerical computation\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.6: To_calculate_the_flow_work_per_kg_of_air.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.6\n", "clear;\n", "clc;\n", "\n", "//Given\n", "R = 1.98;//gas constant in kcal/Kgmole deg K\n", "T = 293;//Temperature in K\n", "M = 29;//Molecular weight of air\n", "\n", "//To calculate the flow work per kg of air\n", "//W=(P*V)=(R*T)\n", "W = R*T;//Flow work in Kcal/Kg mole\n", "W1 = W/M;\n", "mprintf('Flow work is %f Kcal/Kg',W1);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.7: To_calculate_the_horse_power_output_of_the_turbine.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.7\n", "clear;\n", "clc;\n", "\n", "//Given\n", "m = 5000;//Amount of steam recived per hour in Kg\n", "H1 = 666;//Specific enthalpy when steam entered in the turbine in Kcal/Kg\n", "H2 = 540;//Specific enthalpy when steam left the turbine in Kcal/Kg\n", "u1 = 3000/60;//velocity at which steam entered in m/sec\n", "u2 = 600/60;//velocity at which steam left in m/sec\n", "Z1 = 5;//height at which steam entered in m\n", "Z2 = 1;//height at which steam left in m\n", "Q = -4000;//heat lost in Kcal\n", "g = 9.81;\n", "\n", "//To calculate the horsepuwer output of the turbine\n", "delH = H2-H1;//change in enthalpy in Kcal\n", "delKE = ((u2^2)-(u1^2)/(2*g))/(9.8065*427);//change in kinetic energy in Kcal; 1kgf = 9.8065 N\n", "delPE = ((Z2-Z1)*g)/(9.8065*427);//change in potential energy in Kcal\n", "W = -(m*(delH+delKE+delPE))+Q;//work delivered in Kcal/hr\n", "W1 = W*(427/(3600*75));//work delivered by turbine in hp\n", "mprintf('Work delivered by turbine is %f hp',W1);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.8: EX3_8.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.8\n", "clear;\n", "clc;\n", "\n", "//Given\n", "m = 183;//rate of water flow in Kg/min\n", "H1 = 95;//enthalpy of storage tank 1 in Kcal/Kg\n", "h = 15;//height difference between two storage tanks in m\n", "Q = -10100;//extraced heat from storage tank 1 in a heat exchanger in Kcal/min\n", "W = -2;//work delivered by motor in hp\n", "\n", "// To find out the enthalpy of water tank2 and the temperature of water in the second tank\n", "delPE = h/427;//change in potential energy in Kcal/Kg\n", "delKE = 0;//change in kinetic energy\n", "W1 = W*(75/427);//work delivered by motor in Kcal/sec\n", "W2 = W1*60;//work delivered by motor in Kcal/min\n", "H2 = ((Q+W2)/m)-delKE-delPE+H1;//enthalpy of storage tank 2 in Kcal/Kg\n", "mprintf('The enthalpy of storage tank 2 is %f Kcal/Kg',H2);\n", "\n", "//The enthalpy H2=39.66 corresponds to the temperature T according to steam table\n", "T=40;//Temperature is in deg celsius\n", "mprintf('\n The temperature of water in the second tank is %d deg celsius',T);\n", "//end" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.9: To_calculate_the_mass_of_steam_required.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chemical Engineering Thermodynamics\n", "//Chapter 3\n", "//First Law of Thermodynamics\n", "\n", "//Example 3.9\n", "clear;\n", "clc;\n", "\n", "//To calculate the mass of steam required\n", "//Given\n", "m2 = 100;//mass of water to be heated\n", "//From diagram, \n", "//m3 = m1+m2;..(a)\n", "//Hs = H1;..(b) since throttling is a constant enthalpy process\n", "//m3*H3-(m1*H1+m2*H2)=0;..(c) since delH=0\n", "\n", "//From steam tables, \n", "Hs = 681.7//enthalpy of steam at 200 deg cel bleeded at the rate of 5Kgf/(cm^2) in Kcal/Kg\n", "H2 = 5.03;//enthalpy of liquid water at 5 deg cel\n", "H3 = 64.98;//enthalpy of liquid water at 65 deg cel\n", "//from equn (a),(b)&(c);(page no 80)\n", "m1 = ((H3-H2)/(Hs-H3))*m2;//mass of steam required in Kg (page no 80)\n", "mprintf('The mass of steam required to heat 100 Kg of water is %f Kg',m1);\n", "//end " ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }