diff options
Diffstat (limited to 'Engineering_Thermodynamics_by_O_Singh/2-Zeroth_Law_Of_Thermodynamics.ipynb')
-rw-r--r-- | Engineering_Thermodynamics_by_O_Singh/2-Zeroth_Law_Of_Thermodynamics.ipynb | 230 |
1 files changed, 230 insertions, 0 deletions
diff --git a/Engineering_Thermodynamics_by_O_Singh/2-Zeroth_Law_Of_Thermodynamics.ipynb b/Engineering_Thermodynamics_by_O_Singh/2-Zeroth_Law_Of_Thermodynamics.ipynb new file mode 100644 index 0000000..5bd4538 --- /dev/null +++ b/Engineering_Thermodynamics_by_O_Singh/2-Zeroth_Law_Of_Thermodynamics.ipynb @@ -0,0 +1,230 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Zeroth Law Of Thermodynamics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_2_Example_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Display mode\n", +"mode(0);\n", +"// Display warning for floating point exception\n", +"ieee(1);\n", +"clear;\n", +"clc;\n", +"disp('Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 1')\n", +"Tf=98.6;//temperature of body in farenheit\n", +"disp('degree celcius and farenheit are related as follows')\n", +"disp('Tc=(Tf-32)/1.8')\n", +"disp('so temperature of body in degree celcius')\n", +"Tc=(Tf-32)/1.8" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_2_Example_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Display mode\n", +"mode(0);\n", +"// Display warning for floating point exception\n", +"ieee(1);\n", +"clear;\n", +"clc;\n", +"disp('Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 2')\n", +"t1=0;//ice point temperature in degree celcius\n", +"p1=3;//thermometric property for ice point\n", +"t2=100;//steam point temperature in degree celcius\n", +"p2=8;//thermometric property for steam point\n", +"p3=6.5;//thermometric property for any temperature\n", +"disp('using thermometric relation')\n", +"disp('t=a*log(p)+(b/2)')\n", +"disp('for ice point,b/a=')\n", +"b=2*log(p1)\n", +"disp('so b=2.1972*a')\n", +"disp('for steam point')\n", +"a=t2/(log(p2)-(2.1972/2))\n", +"disp('and b=')\n", +"b=2.1972*a\n", +"disp('thus, t=a*log(p3)+(b/2) in degree celcius')\n", +"t=a*log(p3)+(b/2)\n", +"disp('so for thermodynamic property of 6.5,t=302.83 degree celcius')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_2_Example_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Display mode\n", +"mode(0);\n", +"// Display warning for floating point exception\n", +"ieee(1);\n", +"clear;\n", +"clc;\n", +"disp('Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 3')\n", +"disp('emf equation')\n", +"disp('E=(0.003*t)-((5*10^-7)*t^2))+(0.5*10^-3)')\n", +"disp('using emf equation at ice point,E_0 in volts')\n", +"t=0;//ice point temperature in degree celcius\n", +"disp('E_0=(0.003*t)-((5*10^-7)*t^2)+(0.5*10^-3)')\n", +"E_0=(0.003*t)-((5*10^-7)*t^2)+(0.5*10^-3)\n", +"disp('using emf equation at steam point,E_100 in volts')\n", +"t=100;//steam point temperature in degree celcius\n", +"disp('E_100=(0.003*t)-((5*10^-7)*t^2)+(0.5*10^-3)')\n", +"E_100=(0.003*t)-((5*10^-7)*t^2)+(0.5*10^-3)\n", +"disp('now emf at 30 degree celcius using emf equation(E_30)in volts')\n", +"t=30;//temperature of substance in degree celcius\n", +"E_30=(0.003*t)-((5*10^-7)*t^2)+(0.5*10^-3)\n", +"disp('now the temperature(T) shown by this thermometer')\n", +"disp('T=((E_30-E_0)/(E_100-E_0))*(T_100-T_0) in degree celcius')\n", +"T_100=100;//steam point temperature in degree celcius\n", +"T_0=0;//ice point temperature in degree celcius\n", +"T=((E_30-E_0)/(E_100-E_0))*(T_100-T_0)\n", +"disp('NOTE=>In this question,values of emf at 100 and 30 degree celcius is calculated wrong in book so it is corrected above so the answers may vary.')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_2_Example_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Display mode\n", +"mode(0);\n", +"// Display warning for floating point exception\n", +"ieee(1);\n", +"clear;\n", +"clc;\n", +"disp('Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 4')\n", +"t1=0;//temperature at ice point\n", +"t2=100;//temperature at steam point\n", +"t3=50;//temperature of gas\n", +"disp('emf equation,e=0.18*t-5.2*10^-4*t^2 in millivolts')\n", +"disp('as ice point and steam points are two reference points,so')\n", +"disp('at ice point,emf(e1)in mV')\n", +"e1=0.18*t1-5.2*10^-4*t1^2\n", +"disp('at steam point,emf(e2)in mV')\n", +"e2=0.18*t2-5.2*10^-4*t2^2\n", +"disp('at gas temperature,emf(e3)in mV')\n", +"e3=0.18*t3-5.2*10^-4*t3^2\n", +"disp('since emf variation is linear so,temperature(t)in degree celcius at emf of 7.7 mV')\n", +"t=((t2-t1)/(e2-e1))*e3\n", +"disp('temperature of gas using thermocouple=60.16 degree celcius')\n", +"disp('% variation in temperature reading with respect to gas thermometer reading of 50 degree celcius')\n", +"variation=((t-t3)/t3)*100" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_2_Example_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Display mode\n", +"mode(0);\n", +"// Display warning for floating point exception\n", +"ieee(1);\n", +"clear;\n", +"clc;\n", +"disp('Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 5')\n", +"disp('let the conversion relation be X=aC+b')\n", +"disp('where C is temperature in degree celcius,a&b are constants and X is temperature in X degree ')\n", +"disp('at freezing point,temperature=0 degree celcius,0 degree X')\n", +"disp('so by equation X=aC+b')\n", +"X=0;//temperature in degree X\n", +"C=0;//temperature in degree celcius\n", +"disp('we get b=0')\n", +"b=0;\n", +"disp('at boiling point,temperature=100 degree celcius,1000 degree X')\n", +"X=1000;//temperature in degree X\n", +"C=100;//temperature in degree celcius\n", +"a=(X-b)/C\n", +"disp('conversion relation')\n", +"disp('X=10*C')\n", +"disp('absolute zero temperature in degree celcius=-273.15')\n", +"disp('absolute zero temperature in degree X=')\n", +"10*-273.15" + ] + } +], +"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 +} |