{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 2: Zeroth law of thermodynamics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.01: To_find_temperature_in_degree_celcius.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//pathname=get_absolute_file_path('2.01.sce')\n", "//filename=pathname+filesep()+'2.01-data.sci'\n", "//exec(filename)\n", "//Temperature of human body in degree Fahrenheit:\n", "Tf=98.6;\n", "//Temperature of the body in degree Celcius:\n", "Tc=(Tf-32)/1.8\n", "printf('\n\nRESULTS\n\n')\n", "printf('\n\nTemperature of the human body in degree Celcius= %f \n\n',Tc)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.02: To_find_final_pressure_and_temperature.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//pathname=get_absolute_file_path('2.02.sce')\n", "//filename=pathname+filesep()+'2.02-data.sci'\n", "//exec(filename)\n", "//Thermodynamic property at T=0:\n", "p0=3;\n", "//Thermodynamic property at T=100:\n", "p100=8;\n", "\n", "//Value of a:\n", "a=(100-0)/(log(8)-log(3))\n", "//Value of b:\n", "b=0-a*log(3)\n", "//At thermodynamic property p=6.5:\n", "t=a*log(6.5)+b/2\n", "printf('\n\nRESULTS\n\n')\n", "printf('\n\nTemperature at the value of thermodynamic property (p=6.5)= %f \n\n',t)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.03: To_find_out_the_temperature.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//pathname=get_absolute_file_path('2.03.sce')\n", "//filename=pathname+filesep()+'2.03-data.sci'\n", "//exec(filename)\n", "//EMF at temperature T=0\n", "E0=0.003*0-5*(10^-7)*(0^2)+0.5*10^-3\n", "//EMF at temperature T=100\n", "E100=0.003*100-5*(10^-7)*(100^2)+0.5*10^-3\n", "//EMF at temperature T=30\n", "E30=0.003*30-5*(10^-7)*(30^2)+0.5*10^-3\n", "//Temperature shown by the thermometer at T=30:\n", "t=(E30-E0)/(E100-E0)*(100-0)\n", "printf('\n\nRESULT \n\n')\n", "printf('\n\n The temperature shown by thermometer= %f \n\n',t)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.04: To_find_out_variation_in_temperature.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//pathname=get_absolute_file_path('2.04.sce')\n", "//filename=pathname+filesep()+'2.04-data.sci'\n", "//exec(filename)\n", "//Temperature of gas using gas thermometer:\n", "T1=50\n", "//EMF at T=0:\n", "E0=0.18*0-5.2*10^-4*(0^2)\n", "//EMF at T=100:\n", "E100=0.18*100-5.2*10^-4*(100^2)\n", "//EMF at T=50:\n", "E50=0.18*50-5.2*10^-4*(50^2)\n", "//Temperature at EMF=E50:\n", "t=(100-0)*E50/(E100-E0)\n", "p=(t-50)/50*100\n", "printf('\n\n RESULT \n\n')\n", "printf('\n\n percentage variation= %f \n\n',p)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.05: To_find_out_absolute_zero_temperature_on_new_scale.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//pathname=get_absolute_file_path('2.05.sce')\n", "//filename=pathname+filesep()+'2.05-data.sci'\n", "//exec(filename)\n", "//Freezing point of water in unknown temperature scale:\n", "X0=0\n", "//Boiling point of water in unknown temperature scale:\n", "X100=1000\n", "//Conversion Relation : X=aC+b\n", "//Value of a:\n", "a=(X100-X0)/(100-0)\n", "b=0\n", "//Absolute temperature in new temperature scale:\n", "X=a*-273.15+b\n", "printf('\n\n RESULT \n\n')\n", "printf('\n\n Conversion Relation: X=%f*C+%f',a,b)\n", "printf('\n\n Absolute temperature in new scale= %f',X)" ] } ], "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 }