diff options
Diffstat (limited to 'Engineering_Thermodynamics_by_O._Singh/chapter2_3.ipynb')
-rwxr-xr-x | Engineering_Thermodynamics_by_O._Singh/chapter2_3.ipynb | 314 |
1 files changed, 314 insertions, 0 deletions
diff --git a/Engineering_Thermodynamics_by_O._Singh/chapter2_3.ipynb b/Engineering_Thermodynamics_by_O._Singh/chapter2_3.ipynb new file mode 100755 index 00000000..6d7e9bc4 --- /dev/null +++ b/Engineering_Thermodynamics_by_O._Singh/chapter2_3.ipynb @@ -0,0 +1,314 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# chapter 2:Zeroth Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 2.1;pg no:46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 2.1, Page:46 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 1\n",
+ "degree celcius and farenheit are related as follows\n",
+ "Tc=(Tf-32)/1.8\n",
+ "so temperature of body in degree celcius 37.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of temperature of body of human\n",
+ "#intiation of all variables\n",
+ "# Chapter 2\n",
+ "print\"Example 2.1, Page:46 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 1\")\n",
+ "Tf=98.6;#temperature of body in farenheit\n",
+ "Tc=(Tf-32)/1.8\n",
+ "print(\"degree celcius and farenheit are related as follows\")\n",
+ "print(\"Tc=(Tf-32)/1.8\")\n",
+ "print(\"so temperature of body in degree celcius\"),round(Tc,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 2.2;pg no:47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 2.2, Page:47 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 2\n",
+ "using thermometric relation\n",
+ "t=a*log(p)+(b/2)\n",
+ "for ice point,b/a=\n",
+ "so b=2.1972*a\n",
+ "for steam point\n",
+ "a= 101.95\n",
+ "and b= 224.01\n",
+ "thus, t=in degree celcius\n",
+ "so for thermodynamic property of 6.5,t=302.83 degree celcius= 302.84\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of celcius temperature\n",
+ "#intiation of all variables\n",
+ "# Chapter 2\n",
+ "import math\n",
+ "print\"Example 2.2, Page:47 \\n \\n\"\n",
+ "print(\"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",
+ "print(\"using thermometric relation\")\n",
+ "print(\"t=a*log(p)+(b/2)\")\n",
+ "print(\"for ice point,b/a=\")\n",
+ "b=2*math.log(p1)\n",
+ "print(\"so b=2.1972*a\")\n",
+ "print(\"for steam point\")\n",
+ "a=t2/(math.log(p2)-(2.1972/2))\n",
+ "print(\"a=\"),round(a,2)\n",
+ "b=2.1972*a\n",
+ "print(\"and b=\"),round(b,2)\n",
+ "t=a*math.log(p3)+(b/2)\n",
+ "print(\"thus, t=in degree celcius\")\n",
+ "print(\"so for thermodynamic property of 6.5,t=302.83 degree celcius=\"),round(t,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 2.3;page no:47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 2.3, Page:47 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 3\n",
+ "emf equation\n",
+ "E=(0.003*t)-((5*10^-7)*t^2))+(0.5*10^-3)\n",
+ "using emf equation at ice point,E_0 in volts\n",
+ "E_0= 0.0\n",
+ "using emf equation at steam point,E_100 in volts\n",
+ "E_100= 0.3\n",
+ "now emf at 30 degree celcius using emf equation(E_30)in volts\n",
+ "now the temperature(T) shown by this thermometer\n",
+ "T=in degree celcius 30.36\n",
+ "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.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of temperature shown by this thermometer\n",
+ "#intiation of all variables\n",
+ "# Chapter 2\n",
+ "print\"Example 2.3, Page:47 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 3\")\n",
+ "print(\"emf equation\")\n",
+ "print(\"E=(0.003*t)-((5*10^-7)*t^2))+(0.5*10^-3)\")\n",
+ "print(\"using emf equation at ice point,E_0 in volts\")\n",
+ "t=0.;#ice point temperature in degree celcius\n",
+ "E_0=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n",
+ "print(\"E_0=\"),round(E_0,2)\n",
+ "print(\"using emf equation at steam point,E_100 in volts\")\n",
+ "t=100.;#steam point temperature in degree celcius\n",
+ "E_100=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n",
+ "print(\"E_100=\"),round(E_100,2)\n",
+ "print(\"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",
+ "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",
+ "print(\"now the temperature(T) shown by this thermometer\")\n",
+ "print(\"T=in degree celcius\"),round(T,2)\n",
+ "print(\"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.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 2.4;pg no:48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 2.4, Page:48 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 4\n",
+ "emf equation,e=0.18*t-5.2*10^-4*t^2 in millivolts\n",
+ "as ice point and steam points are two reference points,so\n",
+ "at ice point,emf(e1)in mV\n",
+ "at steam point,emf(e2)in mV\n",
+ "at gas temperature,emf(e3)in mV\n",
+ "since emf variation is linear so,temperature(t)in degree celcius at emf of 7.7 mV 60.16\n",
+ "temperature of gas using thermocouple=60.16 degree celcius\n",
+ "percentage variation=((t-t3)/t3)*100variation in temperature reading with respect to gas thermometer reading of 50 degree celcius 20.31\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of percentage variation in temperature\n",
+ "#intiation of all variables\n",
+ "# Chapter 2\n",
+ "import math\n",
+ "print\"Example 2.4, Page:48 \\n \\n\"\n",
+ "print(\"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",
+ "print(\"emf equation,e=0.18*t-5.2*10^-4*t^2 in millivolts\")\n",
+ "print(\"as ice point and steam points are two reference points,so\")\n",
+ "print(\"at ice point,emf(e1)in mV\")\n",
+ "e1=0.18*t1-5.2*10**-4*t1**2\n",
+ "print(\"at steam point,emf(e2)in mV\")\n",
+ "e2=0.18*t2-5.2*10**-4*t2**2\n",
+ "print(\"at gas temperature,emf(e3)in mV\")\n",
+ "e3=0.18*t3-5.2*10**-4*t3**2\n",
+ "t=((t2-t1)/(e2-e1))*e3\n",
+ "variation=((t-t3)/t3)*100\n",
+ "print(\"since emf variation is linear so,temperature(t)in degree celcius at emf of 7.7 mV\"),round(t,2)\n",
+ "print(\"temperature of gas using thermocouple=60.16 degree celcius\")\n",
+ "print(\"percentage variation=((t-t3)/t3)*100variation in temperature reading with respect to gas thermometer reading of 50 degree celcius\"),round(variation,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 2.5;pg no:48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 2.5, Page:48 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 5\n",
+ "let the conversion relation be X=aC+b\n",
+ "where C is temperature in degree celcius,a&b are constants and X is temperature in X degree \n",
+ "at freezing point,temperature=0 degree celcius,0 degree X\n",
+ "so by equation X=aC+b\n",
+ "we get b=0\n",
+ "at boiling point,temperature=100 degree celcius,1000 degree X\n",
+ "conversion relation\n",
+ "X=10*C\n",
+ "absolute zero temperature in degree celcius=-273.15\n",
+ "absolute zero temperature in degree X= -2731.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of absolute zero temperature\n",
+ "#intiation of all variables\n",
+ "# Chapter 2\n",
+ "print\"Example 2.5, Page:48 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 5\")\n",
+ "print(\"let the conversion relation be X=aC+b\")\n",
+ "print(\"where C is temperature in degree celcius,a&b are constants and X is temperature in X degree \")\n",
+ "print(\"at freezing point,temperature=0 degree celcius,0 degree X\")\n",
+ "print(\"so by equation X=aC+b\")\n",
+ "X=0;#temperature in degree X\n",
+ "C=0;#temperature in degree celcius\n",
+ "print(\"we get b=0\")\n",
+ "b=0;\n",
+ "print(\"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",
+ "print(\"conversion relation\")\n",
+ "print(\"X=10*C\")\n",
+ "print(\"absolute zero temperature in degree celcius=-273.15\")\n",
+ "X=10*-273.15\n",
+ "print(\"absolute zero temperature in degree X=\"),round(X,2)\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
|