{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 1: Fundamentals" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.1: Chapter_1_Example_1.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//page no.8\n", "T = 80;//temperature of chlorine gas in degree F\n", "p = 100;//pressure in psia\n", "W = 2*35.45;//molecular weight of chlorine \n", "R = 1545/W;//specific gas constant in ft-lb/lb-degreeR\n", "gam = p*(144/R)*(1/(460+T));//specific weight of chlorine in lb/cuft\n", "Spec_vol = 1/gam;//specific volume in cuft/lb\n", "rho = gam/32.2;//density of chlorine in slug/cuft\n", "printf('Spec. weight = %.3f lb/cuft\n Spec. volume = %.3f cuft/lb\n density = %.4f slug/cuft',gam,Spec_vol,rho);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.2: Chapter_1_Example_2.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//page no. 12\n", "\n", "funcprot(0);\n", "gamma = 1.4;\n", "T1 = 60;//temperature of air in degree F\n", "p1 = 14.7;//pressure in psia\n", "k = 0.5;//(final volume/initial volume) = k\n", "R = 53.3;//Engineering gas constant\n", "gam1 = p1*(144/R)*(1/(460+T1));//lb/cuft\n", "gam2 = gam1/k;//lb/cuft\n", "p2 = (p1/(gam1^(gamma)))*(gam2^(gamma));// in psia\n", "T2 = p2*(144/R)*(1/gam2);//in degree F\n", "a1 = sqrt(gamma*32.2*R*(460+T1));// in fps\n", "a2 = sqrt(gamma*32.2*R*(T2));// in fps\n", "printf('Final pressure = %.1f psia\n Final temperature = %d degreeR \n Sonic velocity before compression = %d fps\n Sonic velocity after compression = %d fps',p2,T2,a1,a2);\n", "\n", "//there are small errors in the answers given in textbook" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.3: Chapter_1_Example_3.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "//page no. 17\n", "\n", "r1 = 0.25;// radius of cylinder in feet\n", "l = 2;//length of cylnider in feet\n", "r2 = 0.30;// radius of co-axial cylinder in feet\n", "mu = 0.018;//lb-sec/ft^2\n", "torque = 0.25;// in ft-lb\n", "dv_dy1 = torque/(4*%pi*mu*r1^2);//velocity gradient at radius = 0.25 in fps/ft\n", "dv_dy2 = torque/(4*%pi*mu*r2^2);//velocity gradient at radius = 0.30 in fps/ft\n", "V1 = integrate('-torque/(4*%pi*mu*r^2)','r',r2,r1);// velocity in fps\n", "rpm1 = V1*60/(2*%pi*r1);\n", "V2 = torque*(r2-r1)/(4*%pi*mu*r1^2);//in fps\n", "rpm2 = V2*60/(2*%pi*r1);\n", "hp = 2*%pi*r1*(rpm1/(550*60));\n", "printf('Velocity gradient at the inner cylinder wall is %.1f fps/ft and \n at the outer cylinder wall is %.1f fps/ft',dv_dy1,dv_dy2);\n", "printf('\n rpm = %.1f and approximate rpm = %.1f \n hp = %.5f ',rpm1,rpm2,hp);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.4: Chapter_1_Example_4.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "\n", "//page no.20\n", "\n", "T = 70;//degreeF\n", "del_p = 0.1;// in psi\n", "sigma = 0.00498;// lb/ft\n", "R = (sigma*2)/(del_p*144);//in ft\n", "d = 12*2*R;// in inches\n", "printf('Diameter of the droplet of water, d = %.4f in',d);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.5: Chapter_1_Example_5.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear;\n", "clc;\n", "\n", "//page no. 20\n", "\n", "l = 12;// length of the cylinder\n", "T = 150;//temperature of water in degreeF\n", "p1 = 14.52;//atmospheric pressure in psia\n", "p2 = 3.72;//the pressure on the inside of the piston in psia\n", "F = 0.25*(p1-p2)*%pi*l^2;//Force on the piston in lb\n", "printf('Minimum force on the piston to be applied is, F = %d lb.',F);\n", "\n", "//there is an error in the answer given in textbook" ] } ], "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 }