diff options
author | Prashant S | 2020-04-14 10:25:32 +0530 |
---|---|---|
committer | GitHub | 2020-04-14 10:25:32 +0530 |
commit | 06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
parent | 476705d693c7122d34f9b049fa79b935405c9b49 (diff) | |
download | all-scilab-tbc-books-ipynb-master.tar.gz all-scilab-tbc-books-ipynb-master.tar.bz2 all-scilab-tbc-books-ipynb-master.zip |
Initial commit
Diffstat (limited to 'Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics')
15 files changed, 4063 insertions, 0 deletions
diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/10-Psychrometric_Operations.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/10-Psychrometric_Operations.ipynb new file mode 100644 index 0000000..9f89cea --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/10-Psychrometric_Operations.ipynb @@ -0,0 +1,277 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Psychrometric Operations" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 10.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"phi=0.7;\n", +"pg=0.3632;//lbf/in^2\n", +"omega2=0.0052;\n", +"pv1=phi*pg;\n", +"omega1=0.622*pv1/(14.7-pv1);\n", +"disp(omega1,'lb(vapor)/lb(dry air) is');\n", +"mv1=1/(1/omega1+1);\n", +"ma=1-mv1;\n", +"mv2=omega2*ma;\n", +"mw=mv1-mv2;\n", +"disp(mw,'mass of water vapor that condenses in lb');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 10.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"phi1=0.8;\n", +"pg1=0.01228;\n", +"pa1=0.9902*10^5;;\n", +"R=8314;//gasconstant\n", +"T=283;\n", +"pv1=phi1*pg1;\n", +"va1=R/28.97*T/pa1;\n", +"madot=150/va1;\n", +"omega=0.622*(pv1/(1-pv1));\n", +"Qcvdot=madot*(303.2-283.1)+omega*(2556.3-2519.8);\n", +"disp(Qcvdot,'heat flow rate in kJ/min');\n", +"pv2=pv1;\n", +"phi2=pv2/0.04246;\n", +"disp(phi2*100,'humidity in %');\n", +"//alternatively\n", +"madot=150/0.81;\n", +"Qcvdot=madot*(45.9-25.7);\n", +"disp(Qcvdot,'heat flow rate in kJ/min');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 10.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"pv1=0.02123*10^5;\n", +"patm=1.013*10^5;\n", +"ha2=283.1;\n", +"ha1=303.2;\n", +"hg1=2556.3;\n", +"hg2=2519.8;\n", +"omega2=0.0076;\n", +"hf2=42.01;\n", +"T=303;//temperature\n", +"R=8314;//gas constant\n", +"M=28.97;//molecular mass\n", +"pa1=patm-pv1;\n", +"madot=280*pa1*M/R/T;\n", +"disp(madot,'mass flow rate in kg/min');\n", +"omega1=0.622*pv1/pa1;\n", +"k=omega1-0.0076;\n", +"disp(k,'mwdot/madot is (kg/kg)');\n", +"Qcvdot=madot*((ha2-ha1)-omega1*hg1+omega2*hg2+(omega1-omega2)*hf2);\n", +"disp(Qcvdot,'heat flow rate in kJ/min');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 10.4\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"omega1=0.002;\n", +"mstdot=52;\n", +"madot=90;\n", +"omega2=omega1+mstdot/60/madot;\n", +"disp(omega2,'humidity ratio is ');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 10.5\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"T1=100;\n", +"T2=70;\n", +"cpa=0.24;\n", +"omega1=0.0045;//humidity\n", +"hg1=1105;\n", +"hg2=38.1;\n", +"hg2=1092;\n", +"hf=38.1;\n", +"p2=14.696;//lb/in^2\n", +"omega2=(cpa*(T1-T2)+omega1*(hg1-hf))/(hg2-hf);\n", +"mwdot=352.1*60*(omega2-omega1);\n", +"disp(mwdot,'mass flow rate in lb/h');\n", +"pv2=omega2*p2/(omega2+0.622);\n", +"phi2=pv2/0.36332;\n", +"disp(phi2*100,'relative humidity in %')\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 10.6\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"omega1=0.002;\n", +"omega2=0.0094;\n", +"ma1dot=180.0;\n", +"ma2dot=497.0;\n", +"omega3=(omega1*ma1dot+omega2*ma2dot)/(ma1dot+ma2dot);\n", +"disp(omega3,'relative humidity');\n", +"k1=10;//(ha+whv)1\n", +"k2=47.8;//(ha+whv)2\n", +"k3=(ma1dot*k1+ma2dot*k2)/(ma1dot+ma2dot)\n", +"disp(k3,'(ha+whv)3 in kJ/kg');\n", +"disp(19,'temperature by inspection in degreeC')\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 10.7\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"m1dot=4.5e7;\n", +"hf1=159.21;\n", +"hf2=125.79;\n", +"ha4=308.2;\n", +"ha3=298.2;\n", +"w4=0.0327;//humidity\n", +"hg4=2565.3;\n", +"hg3=2547.2;\n", +"w3=0.0068;//humidity\n", +"hf5=83.96;\n", +"madot=m1dot*(hf1-hf2)/(ha4-ha3+w4*hg4-w3*hg3-(w4-w3)*hf5);\n", +"m5dot=madot*(w4-w3);\n", +"disp(m5dot,'mass flow rate in kg/h');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/11-Getting_Started_in_Fluid_Mechanics.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/11-Getting_Started_in_Fluid_Mechanics.ipynb new file mode 100644 index 0000000..e51fbe0 --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/11-Getting_Started_in_Fluid_Mechanics.ipynb @@ -0,0 +1,127 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Getting Started in Fluid Mechanics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 11.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"gas=42.5;//gamma of gasoline\n", +"hgas=17.0;//height of gasoline\n", +"hw=3.0;//height of water\n", +"wat=62.4;//gamma of water\n", +"k=gas*hgas/144.0;//p1-p0\n", +"disp(k,'pressure difference in lbf/in^2');\n", +"disp(k*144/wat,'pressure difference in feet of water');\n", +"k1=wat*hw/144.0+k;//p2-p0\n", +"disp(k1*144,'pressure difference in lbf/ft^2');\n", +"disp(k1,'pressure difference in lbf/in^2');\n", +"disp(k1*144/wat,'pressure difference in feet of water');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 11.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"SGoil=0.9;//specific gravity of oil\n", +"wat=62.4;//gamma of water\n", +"SGhg=13.6;//specific gravity of mercury\n", +"h1=36.0/12;\n", +"h2=6.0/12;\n", +"h3=9.0/12;\n", +"pair=-SGoil*wat*(h1+h2)+SGhg*wat*h3;\n", +"pgage=pair/144.0;\n", +"disp(pgage,'Gauge pressure in lbf/in^2(psi)');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 11.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"b=2.0;\n", +"a=4.0;\n", +"gamm=9.8*10^3;//gamma\n", +"pi=3.14;\n", +"Fr=integrate('gamm*sin(pi*60/180)*b*y','y',6,10);\n", +"yr=gamm*sin(pi*60/180)/Fr*b*integrate('y^2','y',6,10);\n", +"disp(yr,'location of resultant weight in m');\n", +"//alternatively\n", +"yr1=b*a^3/12/b/a/8+8;\n", +"disp(yr1,'location of resultant weight in m');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/12-The_Momentum_and_Mechanical_Energy_Equations.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/12-The_Momentum_and_Mechanical_Energy_Equations.ipynb new file mode 100644 index 0000000..9fb7c7d --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/12-The_Momentum_and_Mechanical_Energy_Equations.ipynb @@ -0,0 +1,286 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: The Momentum and Mechanical Energy Equations" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 12.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"//for a sample value of theta=45degrees\n", +"pi=3.14;\n", +"rho=1.94;\n", +"A=0.06;//area\n", +"V=10.0;//velocity\n", +"theta=pi*45/180;\n", +"Fax=-rho*A*V^2*(1-cos(theta));\n", +"disp(Fax,'resultant force in x direction in lbf');\n", +"Fay=rho*A*V^2*sin(theta);\n", +"disp(Fay,'resultant force in y direction in lbf');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 12.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"rho=1.94;\n", +"A=0.1;\n", +"V=50;\n", +"p1=30;//pressure\n", +"p2=24;//pressure\n", +"mdot=rho*A*V;\n", +"Fay=-2*mdot*V-(p1+p2)*144*A;\n", +"disp(Fay,'resultant force in y direction in lbf');\n", +"disp('resultant force in -ve y direction')\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 12.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"pi=3.14;\n", +"rho=999.0;\n", +"Q=0.6/1000;\n", +"A1=pi*0.016^2/4;\n", +"A2=pi*0.005^2/4;\n", +"p1=464*1000;\n", +"p2=0;\n", +"Ww=0.03;\n", +"Wn=1;\n", +"mdot=rho*Q;\n", +"V1=Q/A1;\n", +"V2=Q/A2;\n", +"Fa=mdot*(V1-V2)+Wn+Ww+p1*A1;\n", +"disp(Fa,'Force in N');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 12.5\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"k=3.0;//p1/gamma\n", +"k2=0.5;//p2/gamma\n", +"z1=0;\n", +"z2=2;\n", +"hl=k-k2-z2+z1;\n", +"disp(hl,'head loss in terms of height of water')\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 12.6\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"z1=100;\n", +"V2=6;\n", +"g=9.81;\n", +"gamm=9.8*1000;//density\n", +"Q=4.72;//flow rate\n", +"ht=z1-V2^2/2/g;\n", +"Wtdot=gamm*Q*ht/1000;\n", +"disp(Wtdot,'power output in kW');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 12.7\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Wpdot=10*550;\n", +"gamm=62.4;//density\n", +"Q=2;//flow rate\n", +"hp=Wpdot/gamm/Q;\n", +"hl=-30+hp;\n", +"disp(hl,'head loss in ft');\n", +"Wdot=gamm*Q*hl/550;\n", +"disp(Wdot,'power output in hp');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 12.8\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"k=1.4;\n", +"p0=1*10^6;\n", +"p2=7.84*10^5;\n", +"k=1.4;\n", +"R=8314;//gas constant\n", +"T2=336;//temperature\n", +"M2=(2/(k-1)*((p0/p2)^((k-1)/k)-1))^0.5;\n", +"disp(M2,'the exit mach no is');\n", +"V2=M2*sqroot(k*R/28.97*T2);\n", +"mdot=p2*V2/1000/R/T2*28.97;\n", +"disp(mdot,'mass flow rate in kg/s');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 12.9\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"k1=0.88;//p2/poy;\n", +"k2=0.628;//poy/pox\n", +"pox=100;//pressure\n", +"R=1545;\n", +"T2=494;\n", +"k=1.4;\n", +"M2=0.24;\n", +"A=2.4;\n", +"V2=M2*sqroot(k*R/28.97*T2*32.2);\n", +"mdot=95.9*A*V2/T2/R*28.97;\n", +"disp(mdot,'mass flow rate in lb/s');\n", +"p2=k1*k2*pox;\n", +"disp(p2,'pressure in lbf/in^2')\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/14-Internal_and_External_Flow.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/14-Internal_and_External_Flow.ipynb new file mode 100644 index 0000000..5feb2bb --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/14-Internal_and_External_Flow.ipynb @@ -0,0 +1,234 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Internal and External Flow" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 14.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"rho=1.23;//density\n", +"V=50;//velocity\n", +"D=0.004;//diameter\n", +"l=0.1;\n", +"mu=1.79e-5;\n", +"Re=rho*V*D/mu;\n", +"disp(Re,'reynolds no');\n", +"f=0.028;//friction factor from Moody's chart\n", +"delP=f*l/D*.5*rho*V^2/1000.0;\n", +"disp(delP,'pressure diffference in kPa');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 14.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"rho=1.94;\n", +"V=8.7;\n", +"D=0.0625;\n", +"g=32.2;\n", +"V2=19.6;\n", +"l=60;\n", +"z2=20;\n", +"mu=2.34e-5;\n", +"Kl=2;//constant\n", +"Re=rho*V*D/mu;\n", +"disp(Re,'reynolds no');\n", +"f=0.0215;//friction factor from Moody's chart\n", +"P1=rho*g*z2+1/2*rho*(V2^2-V^2)+rho*f*l/D*V^2/2;\n", +"P1=P1/144+rho*V^2/2*(10+4*1.5+Kl)/144;;\n", +"disp(P1,'entire pressure drop in psi');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 14.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"rho=1.67;\n", +"V=9.31;//velocity\n", +"D=4;\n", +"mu=8.0e-5;\n", +"g=32.2;\n", +"l=799;\n", +"Q=117;\n", +"f=0.0125;//friction factor\n", +"Re=rho*V*D/mu;\n", +"disp(Re,'reynolds no');\n", +"hp=f*l/D*V^2/2/g*5280;\n", +"disp(hp,'pump head in ft of H20');\n", +"hp=round(hp/100)*100\n", +"W=rho*g*Q*hp/550;\n", +"disp(W,'power required in hp');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 14.7\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"rho=0.00238;\n", +"U=80.7;//velocity\n", +"l=8;\n", +"mu=3.74e-7;\n", +"Cd=0.0066;\n", +"d=4;\n", +"Re=rho*U*l/mu;\n", +"disp(Re,'reynolds no');\n", +"f=0.0066;//friction factor from Moody's chart\n", +"D=1/2*rho*U^2*l*d*f;\n", +"disp(D,'drag force in lbf');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 14.8\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"rho=0.00238;\n", +"U=93.5;//velocity\n", +"Cd1=0.55;//coeff of drag\n", +"A1=5.2*5.1;\n", +"D1940=1/2*rho*Cd1*A1*U^2;\n", +"disp(D1940,'drag force in lbf');\n", +"A2=5.2*4.3;\n", +"Cd2=0.3;\n", +"D2003=1/2*rho*Cd2*A2*U^2;\n", +"disp(D2003,'drag force in lbf');\n", +"W1940=D1940*U/550;\n", +"disp(W1940,'power required to overcome drag force in hp');\n", +"W2003=D2003*U/550;\n", +"disp(W2003,'power required to overcome drag force in hp');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 14.9\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"A=96*7.5;\n", +"W=210;\n", +"rho=2.38e-3;\n", +"U=15;\n", +"Cl=2*W/rho/U^2/A;\n", +"disp(Cl,'coeff. of lift ');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/15-Getting_Started_in_Heat_Transfer.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/15-Getting_Started_in_Heat_Transfer.ipynb new file mode 100644 index 0000000..47d8dab --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/15-Getting_Started_in_Heat_Transfer.ipynb @@ -0,0 +1,162 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Getting Started in Heat Transfer" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 15.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"k=1.7;\n", +"delT=250;\n", +"L=0.15;\n", +"H=0.5;\n", +"W=1.2;\n", +"qx=k*delT/L;\n", +"qx=H*W*qx;\n", +"disp(qx,'heat flux in W');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 15.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Ts=473;\n", +"sigma=5.67e-8;\n", +"Tsur=298;\n", +"h=15.0;\n", +"pi=3.14;\n", +"D=0.07;\n", +"epsilon=0.8;//emmisivity\n", +"E=epsilon*sigma*Ts^4;\n", +"G=sigma*Tsur^4;\n", +"disp(G,'irradiation in W/m^2');\n", +"q=h*pi*D*(Ts-Tsur)+epsilon*pi*D*sigma*(Ts^4-Tsur^4);\n", +"disp(q,'heat transfer per unit length in W/m');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 15.5\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"k=1.2;\n", +"epsilon=0.8;//emmisivity\n", +"h=20;\n", +"Ts=373;\n", +"Tsur=298;\n", +"sigma=5.67e-8;\n", +"L=.15;//length\n", +"a=h*(Ts-Tsur)+epsilon*sigma*(Ts^4-Tsur^4);\n", +"T1=Ts+L/k*a;\n", +"disp(T1,'inner wall temperature in K');\n", +"disp(T1-273,'inner wall temperature in K')\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 15.6\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"//solving for Ts\n", +"Tinfinity=293;\n", +"Tsurr=303;\n", +"epsilon=0.5;//emmisivity\n", +"alpha=0.8;\n", +"G=2000;\n", +"h=15;\n", +"sigma=5.67e-8;\n", +"deff('y=f(x)','y=alpha*G-h*(x-Tinfinity)-epsilon*sigma*(x^4-Tsurr^4)');\n", +"[x]=fsolve(307,f);\n", +"disp(x,'temperature in K');\n", +"disp(x-273,'temperature in degree C');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/16-Heat_Transfer_by_Conduction.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/16-Heat_Transfer_by_Conduction.ipynb new file mode 100644 index 0000000..f28520d --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/16-Heat_Transfer_by_Conduction.ipynb @@ -0,0 +1,336 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Heat Transfer by Conduction" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.10: 10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 16.10\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h=100;//W/m^2\n", +"L=0.025;\n", +"c=800;\n", +"rho=2325;//density\n", +"k=1.0;\n", +"Tinfinity=175;\n", +"Ti=25;\n", +"alpha=5.38e-7;\n", +"t=60*10;\n", +"theta=0.615;\n", +"Bi=h*L/k;\n", +"disp(Bi,'Biot number is');\n", +"Fo=alpha*t/L^2;\n", +"disp(Fo,'Fourier number is');\n", +"T10=Tinfinity+theta*(Ti-Tinfinity);\n", +"disp(T10,'midplane temperature after 10 min degreeC');\n", +"tstar=theta*cos(1.1347);\n", +"Tl10=Tinfinity+tstar*(Ti-Tinfinity);\n", +"disp(T10,'msurface temperature after 10 min degreeC');\n", +"ql=h*(Tl10-Tinfinity);\n", +"disp(ql,'heat transfer in W/m^2');\n", +"Q=rho*c*0.509*L*(Ti-Tinfinity);\n", +"disp(Q,'Energy per unit surface in J/m^2')\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 16.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Tso=50;//temperature\n", +"Tinfinity=25;//temperature\n", +"Tsi=385;//temperature\n", +"ka=0.15;\n", +"kb=0.08;\n", +"ho=25;//W/K/m^2\n", +"La=(Tsi-Tso)/(1/ka+0.5/kb)/(ho*(Tso-Tinfinity));\n", +"L=La+0.5*La\n", +"disp(L*1000,'required thickness of composite in mm');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 16.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h=100;\n", +"Tinfinity=25;\n", +"Pe=10^4;\n", +"Tc=Tinfinity+Pe*(1/(1/h)+1/(0.9e-4+0.008/238+1/h))^-1;\n", +"disp(Tc,'allowable maximum temperature in degreeC')\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 16.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"r1=0.25;//m\n", +"r2=0.275;//m\n", +"T1=300;\n", +"T2=77;\n", +"k=0.0017;\n", +"hfg=2.0e5;\n", +"pi=3.14;\n", +"q=(T1-T2)/(1/4/pi/k*(1/r1-1/r2)+1/20/4/pi/r2^2);\n", +"disp(q,'heat transfer in W');\n", +"mdot=q/hfg;\n", +"k=mdot/804*1000*3600*24;\n", +"disp(k,'mdot/rho in liters/day')\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 16.4\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Tinfinity=30;\n", +"q=1.5e6;\n", +"La=0.05;\n", +"h=1000;\n", +"T2=Tinfinity+q*La/h;\n", +"disp(T2,'temperature in degreeC');\n", +"T1=Tinfinity+(0.02/150+1/h)*q*La;\n", +"To=q*La^2/2/75+T1;\n", +"disp(To,'inner surface temperature in degreeC');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 16.6\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"pi=3.14;\n", +"h=100;//W/m^2/K\n", +"P=pi*0.005;\n", +"k=398;\n", +"Ac=pi/4*0.005^2;\n", +"thetab=100-25;\n", +"qf=(h*P*k*Ac)^0.5*thetab;\n", +"disp(qf,'heat rate in copper rod in W');\n", +"L=2.65*(k*Ac/h/P)^0.5*1000;\n", +"disp(L,'minimum value of the length in mm');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 16.7\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"pi=3.14;\n", +"T1=80;\n", +"Tinfinity=20;//temperature\n", +"Rtc1=1e-3;//m2K/W\n", +"r1=0.002;\n", +"r2=0.003;\n", +"H=0.006;\n", +"k=200;\n", +"Rtb=638;//K/W\n", +"Rtf12=24.4;\n", +"Rtc=Rtc1/2/pi/r1/H;\n", +"Rtsleeve=log(r2/r1)/2/pi/H/k;\n", +"Requiv=(1/Rtf12+1/Rtb)^-1;\n", +"Rtot=Rtc+Rtsleeve+Requiv;\n", +"qt=(T1-Tinfinity)/Rtot\n", +"disp(qt,'heat transfer rate in W');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 16.8\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"D=0.125;\n", +"h=25;//W/m^2\n", +"k=1.4;\n", +"c=835;//J/kg\n", +"Tinfinity=20;//degreeC\n", +"Ti=225;//degreeC\n", +"t=360;\n", +"rho=2225;//density\n", +"Lc=D/6;\n", +"Tt=Tinfinity+(Ti-Tinfinity)*exp(-h*t/rho/Lc/c);\n", +"disp(Tt,'temperature after 6 min in degreeC');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 16.9\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"rho=2770;\n", +"L=0.0015;\n", +"epsilon=0.8;//emmisivity\n", +"Tavg=360.5;\n", +"Tsur=448;\n", +"sigma=5.67e-8;\n", +"c=875;//J/kg-K\n", +"tc=rho*L*c/(40+12)*log((25-175)/(150-175));\n", +"te=tc+5*60;\n", +"disp(te,'total time spent in s');\n", +"hrad=epsilon*sigma*(Tavg+Tsur)*(Tavg^2+Tsur^2);\n", +"disp(hrad,'radiation energy in W/m^2-K');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/17-Heat_transfer_by_Convection.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/17-Heat_transfer_by_Convection.ipynb new file mode 100644 index 0000000..ae69d1f --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/17-Heat_transfer_by_Convection.ipynb @@ -0,0 +1,518 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17: Heat transfer by Convection" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.10: 10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.10\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"m=2;//kg/s\n", +"D=0.04;//m\n", +"mu=695*10^-6;//Ns/m^2;\n", +"pi=3.14;\n", +"Nu=396;//nusselt number\n", +"Re=4*m/pi/D/mu;\n", +"disp(Re,'reynolds number');\n", +"h=Nu*0.628/D;\n", +"Tmo=95-(95-25)*exp(-pi*D*h/m/4178*4);\n", +"disp(Tmo,'temperature in degree c');\n", +"q=m*4176*(Tmo-25);\n", +"disp(q/1000,'rate of heat transfer in kW');\n", +"Nu1=0.027*Re^0.8*4.62^0.33;\n", +"disp(Nu1,'Nusselt number');\n", +"h1=Nu1*0628/D;\n", +"disp(h1/1000,'coefficient of heat transfer in W/m-K');\n", +"clear()\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.11: 11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.11\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"k=33.8e-3;\n", +"L=0.71;\n", +"A=1.02*0.71;//area\n", +"Ts=505;//temperature\n", +"Tsur=296//temperature\n", +"Nu=147;\n", +"h=Nu*k/L;\n", +"q=h*A*(Ts-Tsur);\n", +"disp(q,'heat transfer by convection in W');\n", +"qrad=A*5.67e-8*(Ts^4-Tsur^4);\n", +"disp(qrad,'heat transfer by radiation in W');\n", +"hrad=5.67e-8*(Ts+Tsur)*(Ts^2+Tsur^2);\n", +"disp(hrad,'linearized radiation coffecient in W/m^2-K');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"k=integrate('x^-0.1','x',0,1);\n", +"disp(k,'ratio of average convection coefficient');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.12: 12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.12\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Nu=65.8;\n", +"k=0.028;\n", +"As=1.2*1.2;//area\n", +"Ts=350;//temperature\n", +"Tsurr=300;//temperature\n", +"sigma=5.67e-8;\n", +"epsilon=0.25;//emmisivity\n", +"h=Nu*k/0.3;\n", +"Pe=h*As*(Ts-Tsurr)+epsilon*sigma*As*(Ts^4-Tsurr^4);\n", +"disp(Pe,'allowable electrical power in W');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.13: 13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.13\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"pi=3.14;\n", +"D=0.1;\n", +"Nu=23.3;\n", +"k=0.0313;\n", +"Ts=438;//temperature\n", +"Tsurr=296;//temperature\n", +"sigma=5.67e-8;\n", +"epsilon=0.85;//emmisivity\n", +"h=Nu*k/D;\n", +"q=h*pi*D*(Ts-Tsurr)+epsilon*sigma*pi*D*(Ts^4-Tsurr^4);\n", +"disp(q,'heat transfer rate from the pipe in W/m');\n", +"clear()\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.14: 14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.14\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"pi=3.14;\n", +"k=0.625;\n", +"D=0.025;\n", +"Nu=90;\n", +"ho=40;\n", +"q=8524;\n", +"delT=(59.8-30)/log(59.8/30);\n", +"hi=Nu*k/D;\n", +"U=1/(1/hi+1/ho);\n", +"L=q/(U*pi*D*delT);\n", +"disp(L,'length of exchanger in m');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.15: 15.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.15\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"pi=3.14;\n", +"q=7.317e5;\n", +"c=2350;\n", +"Thi=160;\n", +"Thd=100;\n", +"delT=(75-85)/log(75/85);\n", +"mh=q/c/(Thi-Thd);\n", +"disp(mh,'mass flow rate of oil in kg/s');\n", +"ho=400;\n", +"k=0.643;\n", +"D=0.025;//diameter\n", +"Nu=119;\n", +"hi=k/D*Nu;\n", +"U=1/(1/hi+1/ho);\n", +"L=q/(U*pi*D*delT*10*0.87);\n", +"disp(L,'length of exchanger in m');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"U=10;//m/s\n", +"L=0.5;\n", +"nu=30.84e-6;\n", +"Pr=0.687;//prandtl number\n", +"Re=U*L/nu;\n", +"disp(Re,'reynolds number');\n", +"Nul=0.664*Re^0.5*Pr^0.33;\n", +"h=Nul*0.0364/L;\n", +"q=h*L*(300-27);\n", +"disp(q,'colling rate in W/m');\n", +"//if there is turbulence\n", +"Nul=0.037*Re^0.8*Pr^0.33;\n", +"h1=Nul*0.0364/L;\n", +"q1=h1*L*(300-27);\n", +"disp(q1,'colling rate in W/m in turbulence');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"u=60;//m/s\n", +"Nu5=546;\n", +"nu=26.41e-6;\n", +"L4=0.2;\n", +"L5=0.25;\n", +"Pr=0.69;\n", +"Re4=u*L4/nu;\n", +"Re5=u*L5/nu;\n", +"Nu4=0.664*Re4^0.5*Pr^0.33;\n", +"h14=Nu4*0.0338/L4;\n", +"Nu4=0.664*Re5^0.5*Pr^0.33;\n", +"h15=Nu5*0.0338/L5;\n", +"qconv=(h15*L5-h14*L4)*(230-25);\n", +"disp(qconv,'heat transfer rate in W');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.4\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"pi=3.14;\n", +"Ts=128.4;\n", +"Tinfinity=26.2;\n", +"k=0.03;\n", +"D=0.0127;//m\n", +"Re=6071;//reynold's no\n", +"Pr=0.7;\n", +"qconv=46;\n", +"A=pi*0.0127*0.094;\n", +"h=0.85*qconv/A/(Ts-Tinfinity);\n", +"disp(h,'heat transfer coefficient in W/m^2-K');\n", +"Nu=0.3+0.62*Re^0.5*Pr^0.33/(1+0.4^0.66*Pr^0.66)^0.25*(1+(Re/282000)^0.625)^0.8;\n", +"hbar=Nu*k/D;\n", +"disp(Nu,'Nusselt no is')\n", +"disp(hbar,'heat transfer coefficient in W/m^2-K');\n", +"//using Hilpert correlation\n", +"Nu1=0.193*Re^0.618*Pr^0.333;\n", +"disp(Nu1,'Nusselt no is');\n", +"hbar1=Nu1*k/D;\n", +"disp(hbar1,'heat transfer coefficient in W/m^2-K');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.5\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Ti=75;\n", +"k=0.02588;\n", +"D=0.01;\n", +"Nu=47.4\n", +"rho=8933;//density\n", +"c=387;\n", +"D=0.01;\n", +"Tinfinity=23;\n", +"T=35;\n", +"h=Nu*k/D;\n", +"t=rho*c*D/6/h*log((Ti-Tinfinity)/(T-Tinfinity));\n", +"disp(t,'cooling time required in s');\n", +"Bi=h*0.005/3/399;\n", +"disp(Bi,'Biots number')\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.6\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"m=0.1;\n", +"cp=4179;//J/kg/K\n", +"q=10^6;//W/m^3\n", +"Do=0.04;\n", +"Di=0.02;\n", +"pi=3.14;\n", +"L=4*m*cp/(Do^2-Di^2)/pi/q*(60-20);\n", +"disp(L,'tube length in m');\n", +"Re=4*m/pi/Di/6.57e-4;\n", +"disp(Re,'reynolds number');\n", +"qs=q*(Do^2-Di^2)/4/Di;\n", +"ho=qs/(70-60);\n", +"disp(ho,'local heat coefficient in W/m^2-K');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.7\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"m=0.25;//kg/s\n", +"cp=4178;//J/kg-K\n", +"Tmo=57;\n", +"Tmi=15;\n", +"pi=3.14;\n", +"D=0.05;//m\n", +"L=6;//m\n", +"delT=(-Tmo+Tmi)/log((100-Tmo)/(100-Tmi));\n", +"h=m*cp/pi/D/L*(Tmo-Tmi)/delT;\n", +"disp(h,'average convection coefficient in W/m^2-K');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 17.9\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"pi=3.14;\n", +"qs=2000;\n", +"cp=4181;\n", +"m=0.01;\n", +"D=0.06;\n", +"k=0.67;\n", +"Nu=4.36;\n", +"L=m*cp/pi/0.06/qs*(80-20);\n", +"disp(L,'tube length in m');\n", +"h=Nu*k/D;\n", +"Ts=qs/h+80;\n", +"disp(Ts,'surface temperature in degreeC');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/18-Heat_transfer_by_radiation.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/18-Heat_transfer_by_radiation.ipynb new file mode 100644 index 0000000..fd9c34a --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/18-Heat_transfer_by_radiation.ipynb @@ -0,0 +1,339 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18: Heat transfer by radiation" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.10: 10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 18.10\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"e1=0.8;\n", +"e2=0.4;\n", +"T1=1200;\n", +"T2=500;\n", +"A=1;\n", +"Jr=(108323+59043)/2;\n", +"sigma=5.67e-8;\n", +"q1=sigma*(T1^4-T2^4)/((1-e1/e1/A)+1/(A*0.5+(2+2)^-1)+(1-e2)/e2/A);\n", +"disp(q1/1000,'the rate of energy supply in kW/m');\n", +"\n", +"Tr=(Jr/sigma)^0.25;\n", +"disp(Tr,'temperature in radiating surface in K');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 18.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"G1=600;//G1=Glambda\n", +"alpha=0.85;\n", +"G=G1*(2.5-1)*0.5+G1*0.5*(0.5)+G1*(1.0-0.5);\n", +"disp(G,'total radiation in W/m^2');\n", +"Gabs=alpha*G;\n", +"disp(Gabs,'absorbed radiation in W/m^2');\n", +"J=0.15*G+525;\n", +"disp(J,'total radiosity');\n", +"qrad=525-Gabs;\n", +"disp(qrad,'net radiative flux leaving the surface in W/m^2');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 18.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"sigma=5.67e-8;\n", +"lambda1=2200;//mum\n", +"T=2000;//K\n", +"C1=3.742e8;//mum^4/m^2\n", +"C2=1.439e8;\n", +"lambdamax=1.45;//mum\n", +"E=sigma*T^4;\n", +"disp(E,'spectral emmisive power in W/m^2');\n", +"lambda=lambda1/T;\n", +"disp(lambda,'wavelength corresponding to upper limit in mum');\n", +"E=C1/lambdamax^5/(exp(C2/lambdamax/T)-1);\n", +"disp(E,'emissive power in W/m^2.mum');\n", +"disp('G=9.07*10^5 in W/m^2');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 18.4\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"F1=0.318;//F0---2 mum\n", +"F2=0.856;//F0---5 mum\n", +"sigma=5.67e-8;\n", +"T=1600;//kelvin\n", +"epsilon=0.4*F1+0.8*(F2-F1);\n", +"disp(epsilon,'emmisivity');\n", +"E=epsilon*sigma*T^4;\n", +"disp(E/1000,'total emmisive power in kW/m^2');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 18.5\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"F=0.738;//F0---l1' mum\n", +"F1=0.014;//F0---l1 mum\n", +"sigma=5.67e-8;\n", +"Ts=300;\n", +"Tf=1200;\n", +"alpha=0.8*F+0.1*(1-F);\n", +"disp(alpha,'total absorvity')\n", +"epsilon=0.8*F1+0.1*(1-F1);\n", +"disp(epsilon,'emmisivity');\n", +"qrad=epsilon*sigma*Ts^4-alpha*sigma*Tf^4;\n", +"disp(qrad/1000,'total emissice power in kW/m^2');\n", +"disp('epsilon=alpha=0.62 for final condition');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 18.6\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"plambda=0.05;\n", +"sigma=5.67e-8;\n", +"T=300;//K\n", +"epsilon=1-plambda;\n", +"qrad=epsilon*sigma*T^4-0.226*1353;\n", +"disp(qrad,'net radiative heat flux leaving in W/m^2');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 18.7\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"pi=3.14;\n", +"F12=0.5;\n", +"A1=4;//area in terms of L\n", +"A2=2*pi/4;//area in terms of L\n", +"F21=A1/A2*F12;\n", +"disp(F21,'reciprocity relation between A1 and A2');\n", +"//part2\n", +"F12=1;\n", +"A1=1/16;//area in terms of D\n", +"A2=1/2;//area in terms of D\n", +"F21=A1/A2*F12;\n", +"disp(F21,'reciprocity relation between A1 and A2');\n", +"//part3\n", +"F22=0.5;\n", +"F23=1-F21-F22;\n", +"disp(F23,'reciprocity relation');\n", +"//part4\n", +"F13=0.17;\n", +"F12=1-F13;\n", +"A1=1/4;//area in terms of D\n", +"A2=1;//area in terms of D\n", +"F21=A1/A2*F12;\n", +"disp(F21,'reciprocity relation between A1 and A2');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 18.8\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"pi=3.14;\n", +"sigma=5.67e-8;\n", +"T1=1623//K\n", +"T2=1923;//K\n", +"T3=300;//K\n", +"F23=0.06;\n", +"A2=pi*0.075^2/4;\n", +"A1=pi*0.075*0.15;\n", +"F21=1-F23;\n", +"F12=A2/A1*F21;\n", +"Pe=A1*0.118*sigma*(T1^4-T3^4)+A2*F23*sigma*(T2^4-T3^4);\n", +"disp(Pe,'Electrical power required in W');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 18.9\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"sigma=5.67e-8;\n", +"D1=0.02;\n", +"D2=0.05;\n", +"D3=0.035;\n", +"pi=3.14;\n", +"T1=77;\n", +"T2=300;\n", +"qwo=(sigma*pi*D1*(T1^4-T2^4))/(1/0.02+(1-0.05)/0.05*(D1/D2));\n", +"disp(qwo,'heat rate per unit length in W/m');\n", +"Rtot=(1-0.02)/(0.02*pi*D1)+1/pi/D1+2*(1-0.02/(0.02*pi*D3)+1/pi/0.035+(1-0.05)/pi/D2^2);\n", +"qw=sigma*(T1^4-T2^4)/1817;\n", +"disp(qw,'heat rate of radiation in W/m');\n", +"k=(qw-qwo)/qwo*100;\n", +"disp(k,'percentage change of heat transfer in %');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/3-Using_Energy_and_First_Law_of_thermodynamics.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/3-Using_Energy_and_First_Law_of_thermodynamics.ipynb new file mode 100644 index 0000000..ee17eb3 --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/3-Using_Energy_and_First_Law_of_thermodynamics.ipynb @@ -0,0 +1,229 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Using Energy and First Law of thermodynamics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//example 3.1 \n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"V1=0.1;\n", +"V2=0.2;\n", +"P1=3.0;//pressure\n", +"n1=1.5;\n", +"n2=1.0;\n", +"n3=0.0;\n", +"P2=P1*(V1/V2)^n1;\n", +"W=(P2*V2-P1*V1)/(1-n1);\n", +"disp(W*100,'work done in kj');\n", +"W2=P1*V1*log(V2/V1);\n", +"disp(W2*100,'work done in kj');\n", +"W3=P1*(V2-V1);\n", +"disp(W3*100,'work done in kj');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"\n", +"//example 3.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"k=-4.6;//u2-u1;\n", +"W=17.6;//work done\n", +"m=4;//mass\n", +"Q=W+m*k;\n", +"disp(Q,'Energy transferred in kJ');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 3.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"patm=14.7;//in lbf/in^2\n", +"mpiston=100;\n", +"g=32.2;\n", +"A=1;//area\n", +"mair=0.6;\n", +"delu=18;\n", +"k=1.6;//V2-V1;\n", +"P=mpiston*g/A/32.2/144+14.7;\n", +"W=P*k*144/778;\n", +"Q=W+mair*delu;\n", +"disp(Q,'Heat transferred in Btu')\n", +"W2=patm*k*144/778;\n", +"disp(W2,'Work done in Btu');\n", +"delz=k/A;\n", +"PE=mpiston*g*delz/32.2/778;\n", +"Q2=W2+PE+mair*delu;\n", +"disp(Q2,'Heat transferred in Btu')\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//example 3.4\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h=-0.171;\n", +"A=1;\n", +"Tb=300;//temperature\n", +"Tf=293;//temperature\n", +"W1dot=-60.0;\n", +"Qdot=h*A*(Tb-Tf);\n", +"disp(Qdot,'the rate of heat transfer in kW');\n", +"W2dot=Qdot-W1dot;\n", +"disp(W2dot,'the rate of energy transfer in kW');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 3.5\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Wdot=-0.225;\n", +"A=25.0e-6;\n", +"h=150;\n", +"Tf=293;//temperature\n", +"Tb=-Wdot/h/A+Tf;\n", +"disp(Tb,'temperature in kelvin (80 C)');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 3.6\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"clf()\n", +"t=linspace(0,100,11);\n", +"tau=18;\n", +"omega=100;\n", +"Wdotelec=-2.0;\n", +"Wdotshaft=tau*omega/1000;\n", +"Wdot=Wdotelec+Wdotshaft;\n", +"Q=0.2*2.71^-(0.05*t);\n", +"delE=4*(1-2.71^-(0.05*t));\n", +"plot(t,Q);\n", +"plot(t,delE,'r');\n", +"xtitle('Q or delE vs t','time','Q(blue)or delE(red)');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/4-Evaluating_Properties.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/4-Evaluating_Properties.ipynb new file mode 100644 index 0000000..4781d2e --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/4-Evaluating_Properties.ipynb @@ -0,0 +1,328 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Evaluating Properties" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10: 10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 4.10\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"m1=2;\n", +"m2=8;\n", +"T1=350;\n", +"T2=300;\n", +"P1=0.7;//bar\n", +"P2=1.2;//bar\n", +"Tf=315;//K\n", +"cv=0.745;//heat capacity\n", +"pf=(m1+m2)*Tf/(m1*T1/P1+m2*T2/P2);\n", +"disp(pf,'final pressure in bar');\n", +"Q=m1*cv*(Tf-T1)+m2*cv*(Tf-T2);\n", +"disp(Q,'heat transfer into the system in kJ');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11: 11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 4.11\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"P2=5.0;\n", +"P1=1.0;\n", +"n=1.3;\n", +"T1=530;\n", +"R=1.986;\n", +"u2=131.88;\n", +"u1=90.33;\n", +"T2=T1*(P2/P1)^(.3/n);\n", +"k1=R*(T2-T1)/(1-n)/28.97;//k1=W/m\n", +"disp(k1,'W/m in Btu/lb');\n", +"k2=k1+u2-u1;//k2=Q/m\n", +"disp(k2,'Q/m in Btu/lb');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 4.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"V=0.5;//volume\n", +"P1=1;//pressure\n", +"P2=0.5;\n", +"vf1=1.0432/1000;\n", +"vf2=1.0582/1000;\n", +"x=0.5;\n", +"T1=99.63;\n", +"v1=vf1+0.5*(1.694-vf1);\n", +"v2=v1;\n", +"T2=111.4;//from table\n", +"disp(T2,'temperature in degree celcius');\n", +"m=V/v1;\n", +"mg1=x*m;\n", +"disp(mg1,'mass of vapor in kg');\n", +"x2=(v1-vf2)/(1.159-vf2);\n", +"mg2=x2*m;\n", +"disp(mg2,'mass of vapor in kg');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 4.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"m=0.1;\n", +"v1=2.2661;\n", +"P2=20;//pressure\n", +"v2=2.6704;\n", +"V1=m*v1;\n", +"disp(V1,'volume in ft^3');\n", +"V2=m*v2;\n", +"disp(V2,'volume in ft^3');\n", +"W=P2*(V2-V1)*144/778;\n", +"disp(W,'Work done in Btu');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 4.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"V=10.0;//ft^3\n", +"v1=26.8;//ft^3/lb\n", +"u1=1077.6;//btu/lb\n", +"u2=1161.6;//Btu/lb;\n", +"m=V/v1;\n", +"W=-m*(u2-u1);\n", +"disp(W,'Work done in Btu');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 4.4\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"P=10;//pressure\n", +"v2=0.1944;//volume\n", +"v1=0.3066;//volume\n", +"uf3=631.68;\n", +"v3=0.1944;\n", +"vg3=0.3928;\n", +"vf3=1.0905/1000;\n", +"x3=(v3-vf3)/(vg3-vf3);\n", +"u3=uf3+x3*(2559.5-uf3);\n", +"k1=P*(v2-v1)*100;//k=W/m\n", +"k2=u3-2957.3+k1;//k2=Q/m\n", +"disp(k2,'Q/m in kJ/kg');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 4.6\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Tr1=793.0/647.3;\n", +"Pr1=22.0/22.09;\n", +"Rbar=8314.0;\n", +"M=18.02;\n", +"T1=793.0;\n", +"P1=20.0e6;\n", +"pr2=0.69;\n", +"v1=0.83*Rbar/M/P1*T1;\n", +"disp(v1,'Specific weight in m^3/kg');\n", +"vrdash=v1*22.09e6/Rbar*M/647.3;\n", +"Tr2=673/647.3;\n", +"P2=22.09e6*pr2;\n", +"disp(P2/10^6,'Pressure in Mpa');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 4.7\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"p2=2;//pressure\n", +"p1=1;//pressure\n", +"T1=540;//temperature\n", +"Rbar=1545;\n", +"M=28.97;\n", +"P1=14.7*144;\n", +"T2=p2/p1*T1;\n", +"disp(T2,'temperature in degreeR');\n", +"v3=Rbar/M*T2/P1;\n", +"disp(v3,'specific volume in ft^3/lb');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 4.8\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Q=-20;\n", +"m=2;\n", +"u2=143.98;\n", +"u1=92.04;\n", +"W=Q-m*(u2-u1);\n", +"disp(W,'work done on the system in Btu');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/5-Control_Volume_Analysis_Using_Energy.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/5-Control_Volume_Analysis_Using_Energy.ipynb new file mode 100644 index 0000000..7f384d2 --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/5-Control_Volume_Analysis_Using_Energy.ipynb @@ -0,0 +1,250 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Control Volume Analysis Using Energy" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 5.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"v3=1.108e-3;\n", +"m1dot=40;\n", +"A2=25.0e-4;\n", +"v2=1.0078e-3;\n", +"m3dot=0.06/v3;\n", +"m2dot=m3dot-m1dot;\n", +"disp(m2dot,'mass flow rate in kg/s');\n", +"V2=m2dot*v2/A2;\n", +"disp(V2,'velocity in m/s');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 5.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h1=3213.6;//kJ/kg\n", +"V1=10.0;\n", +"V2=665.0;\n", +"mdot=2.0;\n", +"h2=h1+(V1^2/2-V2^2/2)/1000;\n", +"//using table with given h2 values\n", +"v2=0.1627;//specific volume\n", +"V2=665;\n", +"A2=mdot*v2/V2;\n", +"disp(A2,'Area in m^2');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 5.4\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h1=3177.2;\n", +"x2=0.9;\n", +"hf2=191.83;\n", +"mdot=4600.0;\n", +"Wcvdot=1000.0;\n", +"V2=50.0;//velocity\n", +"V1=10.0;//velocity\n", +"h2=hf2+x2*2392.8;\n", +"k1=h2-h1;\n", +"k2=(V2^2/2-V1^2/2)/1000.0;\n", +"Qcvdot=Wcvdot+mdot*(k1+k2)/3600;\n", +"disp(Qcvdot,'specific kinetic energy difference in kW');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 5.5\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"A1=0.1;\n", +"V1=6.0;\n", +"V2=2.0;\n", +"delh=290.16-451.8;\n", +"p1=10^5;\n", +"Rbar=8314.0;\n", +"Qcvdot=-180.0/60;\n", +"M=28.97;//molecular mass\n", +"T1=290.0;\n", +"mdot=A1*V1*p1*M/Rbar/T1;\n", +"Wcvdot=Qcvdot+mdot*(delh+(V1^2/2-V2^2/2)/1000);\n", +"disp(Wcvdot,'heat transfer per unit time in kW')\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 5.7\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h1=2465.1;\n", +"h2=188.45;\n", +"k=62.7;//h3-h4;\n", +"k2=(h1-h2)/k;\n", +"disp(k2,'m3dot/m1dot is');\n", +"k3=h2-h1;\n", +"disp(k3,'Qcvdot/m1dot in kJ/kg');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 5.8\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"v1=1.3;\n", +"cp=1.005;\n", +"p1=1.01325*10^5;\n", +"T2=305;\n", +"T1=293;\n", +"pi=3.14;\n", +"Wcvdot=-98.0;\n", +"A1=1/v1*(-Wcvdot/cp/(T2-T1)/1000)*8314/28.97*T1/p1;\n", +"D1=sqroot(4*A1/pi)*100;\n", +"disp(round(D1),'minmum diameter required in cm');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 5.9\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"hf1=394.1;\n", +"hg1=1203.9;\n", +"h2=1168.8;\n", +"x1=(h2-hf1)/(hg1-hf1);\n", +"disp(x1*100,'the quality of line in %');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/6-The_Second_Law_of_Thermodynamics.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/6-The_Second_Law_of_Thermodynamics.ipynb new file mode 100644 index 0000000..6c8e85e --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/6-The_Second_Law_of_Thermodynamics.ipynb @@ -0,0 +1,121 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: The Second Law of Thermodynamics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 6.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Input=1000.0;\n", +"Tc=300.0;\n", +"Th=500.0;\n", +"Output=410.0;\n", +"neta=Output/Input*100;\n", +"nmax=(1-Tc/Th)*100;\n", +"disp(neta,'efficiency in %');\n", +"disp(nmax,'maximum efficiency in %');\n", +"disp('the system cannot exist');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 6.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Qcdot=8000;\n", +"Wcycledot=3200.0;\n", +"Tc=268.0;\n", +"Th=295.0;\n", +"Beta=Qcdot/Wcycledot;\n", +"disp(Beta,'coeff. of performance');\n", +"Betamax=Tc/(Th-Tc);\n", +"disp(Betamax,'maximum coeff. of performance');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 6.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Tc=492;\n", +"Th=530;//temperature\n", +"Qh=6e5;\n", +"Wcycle=(1-Tc/Th)*Qh;\n", +"disp(Wcycle,'Minimum Work input theoritical in Btu/day');\n", +"MTC=Wcycle/3413*0.08;\n", +"disp(MTC,'Minimum cost theoritical in $/day');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/7-Using_Entropy.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/7-Using_Entropy.ipynb new file mode 100644 index 0000000..1243fb1 --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/7-Using_Entropy.ipynb @@ -0,0 +1,308 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Using Entropy" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10: 10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 7.10\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h1=390.88;\n", +"h2s=285.27;\n", +"k=74.0;//Wcvdot/mdot\n", +"ks=h1-h2s;//(Wcvdot/mdot)s\n", +"nt=k/ks*100;\n", +"disp(nt,'efficiency in %');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 7.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"P=1.014;\n", +"vg=1.673;\n", +"vf=1.0435/1000;\n", +"T=373.15;//temperature\n", +"sg=7.3549;\n", +"sf=1.3069;\n", +"k=P*(vg-vf)*10^5/1000;\n", +"disp(k,'W/m in kJ/kg');\n", +"k1=T*(sg-sf);\n", +"disp(k1,'Q/m in kJ/kg');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13: 13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 7.13\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"T1=293;//kelvin\n", +"p2=5;//atm\n", +"p1=1;//atm\n", +"n=1.3;\n", +"h2=426.35;\n", +"h1=293.17;\n", +"T2=T1*(p2/p1)^((n-1)/n);\n", +"k=-n*8.314/28.97*(T2-T1)/(n-1);//Wcvdot/mdot\n", +"disp(k,'Wcvdot/mdot in kJ/kg');\n", +"k1=k+h2-h1;\n", +"disp(k1,'Qcvdot/mdot in kJ/kg');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 7.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"k=-2087.56;//from table t2\n", +"disp(k,'W/m in kJ/kg');\n", +"k1=6.048;//from table t2\n", +"disp(k1,'sigma/m in kJ/kg/K');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 7.4\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"Qdot=-1.2;\n", +"Tb=300.0;\n", +"Tf=293.0;\n", +"sigmadot=-Qdot/Tb;\n", +"disp(sigmadot,'heat transfer rate in kW/K');\n", +"sigmadot1=-Qdot/Tb;\n", +"disp(sigmadot1,'heat transfer rate in kW/K');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 7.5\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"k1=540.0;//Wcv/m\n", +"h2=2676.1;\n", +"h1=3230.9;\n", +"V2=100;\n", +"V1=160;\n", +"s2=7.3549;\n", +"s1=6.9212;\n", +"k2=k1+(h2-h1)+(V2^2/2-V1^2/2)/1000;\n", +"disp(k2,'Qcvdot/mdot in kJ/kg');\n", +"k3=-k2/350+(s2-s1);\n", +"disp(k3,'sigmacvdot/mdot in kJ/kg/K');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 7.6\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"T2=635;//temperature\n", +"T1=530;//temperature\n", +"T3=460;//temperature\n", +"P2=1;//pressure\n", +"P3=1;//pressure\n", +"P1=5.1;//pressure\n", +"cp=0.24;\n", +"R=1.986/28.97;\n", +"k1=-105;//T1-T2\n", +"k2=70;//T1-T3\n", +"a=0.4*k1+0.6*k2;\n", +"disp(a,'since mass is conserved thus value is ');\n", +"k=0.4*(cp*log(T2/T1)-R*log(P2/P1))+0.6*(cp*log(T3/T1)-R*log(P3/P1));\n", +"disp(k,'sigmacvdot/m1dot in Btu/lb/R');\n", +"disp('thus second law of thermodynamics is also conserved');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 7.8\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"p1=1;//pressure\n", +"pr2=21.18;\n", +"pr1=1.3860;\n", +"k=1.39;\n", +"T2=1160;//temperature\n", +"T1=540;//temperature\n", +"p=p1*pr2/pr1;\n", +"disp(p,'pressure in atm');\n", +"p2=p1*(T2/T1)^(k/(k-1));\n", +"disp(p2,'Pressure final in atm');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 7.9\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h1=3105.6;\n", +"h2s=2743.0;\n", +"nt=0.75;//effeiciency\n", +"k=nt*(h1-h2s);\n", +"disp(k,'Wcvdot/mdot in kJ/kg');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/8-Vapor_Power_and_Refrigeration_Sysytem.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/8-Vapor_Power_and_Refrigeration_Sysytem.ipynb new file mode 100644 index 0000000..8873146 --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/8-Vapor_Power_and_Refrigeration_Sysytem.ipynb @@ -0,0 +1,282 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Vapor Power and Refrigeration Sysytem" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 8.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h1=2758.0;\n", +"h2=1794.8;\n", +"h3=173.88;\n", +"h4=h3+1.0084/1000*(8-0.008)*1000;\n", +"neta=(h1-h2-h4+h3)/(h1-h4);\n", +"disp(neta*100,'thermal efficiency in %');\n", +"bwr=(h4-h3)/(h1-h2);\n", +"disp(bwr*100,'back work ratio in %');\n", +"mdot=100*1000*3600/(h1-h2-h4+h3);\n", +"disp(mdot,'mass flow rate in kg/h');\n", +"Qindot=mdot*(h1-h4)/3600/1000;\n", +"disp(Qindot,'energy inflow rate in MW');\n", +"Qoutdot=mdot*(h2-h3)/3600/1000;\n", +"disp(Qoutdot,'energy outflow rate in MW');\n", +"disp(Qoutdot/Qindot*100,'ratio of energy outflow/inflow in %');\n", +"mcwdot=mdot*(h2-h3)/(146.68-62.99);\n", +"disp(mcwdot,'mass flow rate in kg/h');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 8.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h1=2758.0;\n", +"h2=1939.3;\n", +"h3=173.88;\n", +"h4=h3+8.06/0.85;\n", +"neta=(h1-h2-h4+h3)/(h1-h4);\n", +"disp(neta*100,'thermal efficiency in %');\n", +"mdot=100*1000*3600/(h1-h2-h4+h3);\n", +"disp(mdot,'mass flow rate in kg/h');\n", +"Qindot=mdot*(h1-h4)/3600/1000;\n", +"disp(Qindot,'energy inflow rate in MW');\n", +"Qoutdot=mdot*(h2-h3)/3600/1000;\n", +"disp(Qoutdot,'energy outflow rate in MW');\n", +"mcwdot=mdot*(h2-h3)/(146.68-62.99);\n", +"disp(mcwdot,'mass flow rate in kg/h');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 8.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h1=3348.4;\n", +"h2=2741.8;\n", +"h3=3353.3;\n", +"h4=2428.5;\n", +"h6=181.94;\n", +"h5=173.88;\n", +"neta=(h1-h2-h4+h3-h6+h5)/(h1-h6+h3-h2);\n", +"disp(neta*100,'thermal efficiency in %');\n", +"mdot=100*1000*3600/(h1-h2-h4+h3-h6+h5);\n", +"disp(mdot,'mass flow rate in kg/h');\n", +"Qoutdot=mdot*(h4-h5)/3600/1000;\n", +"disp(Qoutdot,'energy outflow rate in MW');\n", +"//part2\n", +"h2=2832.8;\n", +"h4=2567.2;\n", +"neta=(h1-h2-h4+h3-h6+h5)/(h1-h6+h3-h2);\n", +"disp(neta*100,'thermal efficiency in %');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 8.4\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h1=3348.4;\n", +"h7=705.3;\n", +"h6=697.22;\n", +"h5=174.6;\n", +"h4=173.88;\n", +"h2=2832.8;\n", +"h3=2249.3;\n", +"k1=h1-h2+0.8034*(h2-h3);//Wt/m1\n", +"k2=h7-h6+0.8034*(h5-h4);//Wp/m1\n", +"k3=h1-h7;//Qin/m1\n", +"neta=(k1-k2)/k3;\n", +"disp(neta*100,'thermal efficiency in %');\n", +"m1dot=100*1000*3600/(k1-k2);\n", +"disp(m1dot,'mass flow rate in kg/h');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 8.5\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"mdot=0.08;\n", +"h2s=264.7;\n", +"h1=247.23;\n", +"h4=85.75;\n", +"Th=299.0;\n", +"Wcdot=mdot*(h2s-h1);\n", +"disp(Wcdot,'work input in kW');\n", +"Qindot=mdot*(h1-h4)*60.0/211;\n", +"disp(Qindot,'refrigration capacity in ton');\n", +"Beta=(h1-h4)/(h2s-h1);\n", +"disp(Beta,'coefficient of performance');\n", +"Bmax=273/(Th-273);\n", +"disp(Bmax,'maximum coefficient of performance');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 8.6\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h2s=272.39;\n", +"h1=241.35;\n", +"mdot=0.08;\n", +"h4=99.56;\n", +"Wcdot=mdot*(h2s-h1);\n", +"disp(Wcdot,'work input in kW');\n", +"Qindot=mdot*(h1-h4)*60.0/211;\n", +"disp(Qindot,'refrigration capacity in ton');\n", +"Beta=(h1-h4)/(h2s-h1);\n", +"disp(Beta,'coefficient of performance');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 8.7\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h1=241.35;\n", +"h2s=272.39;\n", +"nc=0.8;//efficiency\n", +"h4=91.49;\n", +"h2=(h2s-h1)/nc+h1;\n", +"mdot=0.08;\n", +"Wcdot=mdot*(h2-h1);\n", +"disp(Wcdot,'work input in kW');\n", +"Qindot=mdot*(h1-h4)*60.0/211;\n", +"disp(Qindot,'refrigration capacity in ton');\n", +"Beta=(h1-h4)/(h2-h1);\n", +"disp(Beta,'coefficient of performance');\n", +"clear()" + ] + } +], +"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 +} diff --git a/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/9-Gas_Power_Systems.ipynb b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/9-Gas_Power_Systems.ipynb new file mode 100644 index 0000000..0af3925 --- /dev/null +++ b/Introduction_to_Thermal_Systems_Engineering_Thermodynamics_by_Fluid_Mechanics/9-Gas_Power_Systems.ipynb @@ -0,0 +1,266 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Gas Power Systems" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 9.1\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"T2=1212.0;\n", +"p1=1.0;\n", +"T1=540.0;\n", +"T4=1878.0;\n", +"T3=3600.0;\n", +"u4=342.2;\n", +"u1=92.04;\n", +"u3=721.44;\n", +"u2=211.3;\n", +"m=1.47/1000;\n", +"V1=0.02;\n", +"k=8;//V1/V2\n", +"p2=k*p1*T2/T1;\n", +"disp(p2,'pressure in atm');\n", +"p3=p2*T3/T2;\n", +"disp(p3,'pressure in atm');\n", +"p4=p1*T4/T1;\n", +"disp(p4,'pressure in atm');\n", +"neta=1-(u4-u1)/(u3-u2);\n", +"disp(neta*100,'thermal efficiency in %');\n", +"W=m*(u3-u4-u2+u1);\n", +"mep=W/V1/(1-1/k)*778/144;\n", +"disp(mep,'mean effective pressure in lbf/in^2 is equal to 8.03 atm');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 9.2\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"T2=898.3;\n", +"T1=300.0;\n", +"T4=887.7;\n", +"vr3=3.97;\n", +"V1=0.861;\n", +"R=8314;//gas constant\n", +"u4=664.3;\n", +"u1=214.07;\n", +"h3=1999.1;\n", +"h2=930.98;\n", +"p1=0.1;\n", +"k=18.0;//V1/V2\n", +"rc=2.0;//V3/V2\n", +"p2=k*p1*T2/T1;\n", +"disp(p2,'pressure in atm');\n", +"T3=rc*T2;\n", +"disp(T3,'temperature in K');\n", +"vr4=vr3*k/rc;\n", +"p4=p1*T4/T1;\n", +"disp(p4,'pressure in atm');\n", +"neta=1-(u4-u1)/(h3-h2);\n", +"disp(neta*100,'thermal efficiency in %');\n", +"W=(h3-u4-h2+u1);//Wcycle/m\n", +"V1=R*T1/29.97/10^5;\n", +"mep=W/V1/(1-1/k)*1000/10^6;\n", +"disp(mep,'mean effective pressure in MPa');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 9.3\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h4=808.5;\n", +"h2=579.9;\n", +"h3=1515.4;\n", +"h1=300.19;\n", +"T=300;//temperature\n", +"R=8314;//gas constant\n", +"M=28.97;//mass molecular\n", +"neta=(h3-h4-h2+h1)/(h3-h2);\n", +"disp(neta*100,'thermal efficiency in %');\n", +"bwr=(h2-h1)/(h3-h4);\n", +"disp(bwr*100,'back work ratio in %');\n", +"mdot=5*10^5*M/R/T;\n", +"Wcycledot=mdot*[h3-h4-h2+h1];\n", +"disp(Wcycledot,'net power developed in kW');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 9.4\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h1=300.19;\n", +"k=349.6;//Wcdot/mdot\n", +"h2=h1+k;\n", +"h3=1515.4;\n", +"mdot=5.807;\n", +"k2=h3-h2;//Qindot/mdot\n", +"neta=(565.6-k)/k2;\n", +"disp(neta*100,'thermal efficiency in %');\n", +"bwr=k/565.5;\n", +"disp(bwr*100,'back work ratio in %');\n", +"Wcycledot=mdot*(565.5-k);\n", +"disp(Wcycledot,'net power developed in kW');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 9.5\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"h3=1515.4;//kJ/kg\n", +"h4=808.5;//kJ/kg\n", +"nreg=0.8;\n", +"h2=579.9;//kJ/kg\n", +"h1=300.19;//kJ/kg\n", +"hx=nreg*(h4-h2)+h2;\n", +"neta=(h3-h4-h2+h1)/(h3-hx);\n", +"disp(neta*100,'thermal efficiency in %');\n", +"clear()" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//example 9.6\n", +"clc; funcprot(0);\n", +"// Initialization of Variable\n", +"ha=102.7;//Btu/lb\n", +"Va=909.3;//ft/s\n", +"h3=546.54;//Btu/lb\n", +"h2=216.2;//Btu/lb\n", +"pr4=113.8;\n", +"h5=265.8;//Btu/lb\n", +"pr3=233.5;\n", +"h1=102.7+Va^2/2/32.2/778;\n", +"pr1=1.051;\n", +"pra=0.6268;\n", +"p1=pr1/pra*11.8;\n", +"disp(p1,'Pressure in lbf/in^2');\n", +"p2=8*p1;\n", +"disp(p2,'Pressure in lbf/in^2');\n", +"p3=p2;\n", +"h4=h3+h1-h2;\n", +"p4=p3*pr4/pr3;\n", +"disp(p4,'Pressure in lbf/in^2');\n", +"V5=sqroot(2*(h4-h5)*32.2*778);\n", +"disp(V5,'velocity in ft/s (2069 mi/h)');\n", +"clear()" + ] + } +], +"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 +} |