{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 12: Non steady flow friction and availability" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 12.1: Work_done_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "p1=100 //psia\n", "p2=14.7 //psia\n", "k=1.4\n", "T1=700 //R\n", "R=10.73/29\n", "V=50\n", "cv=0.171\n", "cp=0.24\n", "R2=1.986/29\n", "//calculations\n", "T2=T1/ (p1/p2)^((k-1)/k)\n", "m1=p1*V/(R*T1)\n", "m2=p2*V/(R*T2)\n", "Wrev= cv*(m1*T1 - m2*T2) - (m1-m2)*(T2)*cp\n", "//results\n", "printf('Work done in case 1 = %d Btu',Wrev)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 12.2: Friction_calculations.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "p1=100 //psia\n", "p2=10 //psia\n", "n=1.3\n", "T1=800 //R\n", "cv=0.172\n", "R=1.986/29\n", "T0=537 //R\n", "cp=0.24\n", "//calculations\n", "T2=T1*(p2/p1)^((n-1)/n)\n", "dwir=cv*(T1-T2)\n", "dwr=R*(T2-T1)/(1-n)\n", "dq=dwr-dwir\n", "dI=-T0*(cp*log(T2/T1) - R*log(p2/p1))\n", "//results\n", "printf('The friction of the process per pound of air = %.1f Btu/lbm',dq)\n", "printf('\n Loss of available energy = %.2f Btu/lbm',dI)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 12.3: Energy_loss_calculations.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "ms=10 //lbm\n", "den=62.3 //lbm/ft^3\n", "A1=0.0218 //ft^2\n", "A2=0.00545 //ft^2\n", "p2=50 //psia\n", "p1=100 //psia\n", "gc=32.2 //ft/s^2\n", "dz=30 //ft\n", "T0=537 //R\n", "T1=620 //R\n", "T2=420 //R\n", "//calculations\n", "V1=ms/(A1*den)\n", "V2=ms/(A2*den)\n", "df=-144/den*(p2-p1) - (V2^2 -V1^2)/(2*gc) - dz\n", "dI=-T0/T1 *df\n", "dI2= -T0/T2 *df\n", "//results\n", "printf('Friction = %.1f ft-lbf/lbm',df)\n", "printf('\n Available energy loss in case a = %.1f ft-lbf/lbm',dI)\n", "printf('\n Available energy loss in case b = %.1f ft-lbf/lbm',dI2)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 12.4: Pressure_drop_calculatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "r=2.5 //in\n", "mf=160 //cfm\n", "rho=1/14\n", "mu=0.0000121\n", "v=14 //ft^3/lbm\n", "g=32.2 //ft/s^2\n", "z=100 //ft\n", "//calculations\n", "A=3.14*(r/12)^2\n", "V=mf/A /60\n", "Re=(2*r/12)*V*rho/mu\n", "disp('From fig 12.4,')\n", "f=0.0225/4\n", "dp=4*f*(rho)*(V/v)^2 /(2*g*(2*r/12)) *z\n", "//dp=2.32\n", "//results\n", "printf('Pressure drop = %.2f lbf/ft^2 100 ft',dp)\n", "disp('The answer in the textbook is wrong. Please use a calculator to verify it.')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 12.5: Mass_rate_calculatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "D=0.0724 //ft\n", "gc=32.2 //ft/s^2\n", "rho=1/14\n", "L=100 //ft\n", "mu2=1.46*10^(-10)\n", "dp=2.32\n", "dia=5 //in\n", "rho2=48500\n", "vol=14 //ft^3/lbm\n", "//calculations\n", "ref=D^3 *2*dp*gc*rho/(mu2*L)\n", "mf=rho2*%pi/4 *(dia/12) *sqrt(mu2)\n", "mfr=mf*vol*60\n", "//results\n", "printf('Mass rate of air flow = %d cfm',mfr)\n", "disp('The answer is a bit different due to rounding off error in textbook')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 12.6: Loss_and_effectiveness_calculations.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "cp=0.25\n", "T=3460 //R\n", "T0=520 //R\n", "dG=1228 //Btu/lbm\n", "//calculations\n", "hf=cp*(T-T0)-T0*cp*log(T/T0)\n", "dC=hf-dG\n", "Ec=hf/dG\n", "//results\n", "printf('Loss of available energy = %d Btu/lbm mixture ',dC)\n", "printf('\n Effectiveness of combustion = %.3f ',Ec)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 12.7: Loss_and_effectiveness_calculations.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "cp1=0.25\n", "T=3460 //R\n", "T0=946.2 //R\n", "T00=520 //R\n", "dG=1228 //Btu/lbm\n", "cp=0.45\n", "//calculations\n", "dqa=cp1*(T-T0)\n", "w=cp*dqa\n", "hf=cp1*(T-T00)-T00*cp1*log(T/T00)\n", "heat=w-hf\n", "eff=w/hf\n", "epower=w/dG\n", "//results\n", "printf('Loss of available energy = %.1f Btu/lbm mixture ',heat)\n", "printf('\n Efficiency of cycle = %.3f ',eff)\n", "printf('\n Effectiveness of overall cycle = %.2f',epower)\n", "disp('The answer is a bit different due to rounding off error in textbook')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 12.8: Loss_and_effectiveness_calculations.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "p1=400 //psia\n", "t1=600 //F\n", "h1=1306.9 //Btu/lbm\n", "b1=480.9 //Btu/lbm\n", "p2=50 //psia\n", "h2=1122 //Btu/lbm\n", "h3=1169.5 //Btu/lbm\n", "b3=310.9 //Btu/lbm\n", "//calculations\n", "disp('All the values are obtained from Mollier chart,')\n", "dw13=h1-h3\n", "dw12=h1-h2\n", "dasf=b3-b1\n", "etae=dw13/dw12\n", "eta=abs(dw13/dasf)\n", "dq=dw13+dasf\n", "//results\n", "printf('Engine efficiency = %.1f percent',etae*100)\n", "printf('\n Effectiveness = %.1f percent',eta*100)\n", "printf('\n Loss of available energy = %.1f Btu/lbm',dq)" ] } ], "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 }