summaryrefslogtreecommitdiff
path: root/Heat_And_Thermodynamics_by_D_S_Mathur/9-entropy.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Heat_And_Thermodynamics_by_D_S_Mathur/9-entropy.ipynb')
-rw-r--r--Heat_And_Thermodynamics_by_D_S_Mathur/9-entropy.ipynb512
1 files changed, 512 insertions, 0 deletions
diff --git a/Heat_And_Thermodynamics_by_D_S_Mathur/9-entropy.ipynb b/Heat_And_Thermodynamics_by_D_S_Mathur/9-entropy.ipynb
new file mode 100644
index 0000000..1017bdd
--- /dev/null
+++ b/Heat_And_Thermodynamics_by_D_S_Mathur/9-entropy.ipynb
@@ -0,0 +1,512 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: entropy"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.10: chapter_9_example_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation\n",
+"st=1.75\n",
+"sw=0.30\n",
+"t=100//c\n",
+"T=273+t//k\n",
+"//CALCULATIONS\n",
+"L=T*(st-sw)\n",
+"//results\n",
+"printf(' \n specific latent heat of steam= % 1f cal/gm',L)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.11: chapter_9_example_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation\n",
+"r=3\n",
+"n=2\n",
+"R=8314\n",
+"//CALCULATIONS\n",
+"ds=2.3026*n*R*log(r)\n",
+"//results\n",
+"printf(' \n change in entropy= % 1f j/k',ds)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.13: chapter_9_example_13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"m1=90//gm\n",
+"m2=10//gm\n",
+"T1=373//k\n",
+"T2=273//k\n",
+"T3=331.2//k\n",
+"l=540\n",
+"//CALCULATIONS\n",
+"ds=(m1+m2)*log(T3/T2)-m2*l/T1+m2*log(T3/T1)\n",
+"//results\n",
+"printf(' change in entropy = % 1f cal/k',ds)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.14: chapter_9_example_14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"m1=3//gm\n",
+"m2=28\n",
+"ds=0.621//J/k\n",
+"//CALCULATIONS\n",
+"r=ds*m2/(m1*8.31)\n",
+"a=2.3026^r\n",
+"//results\n",
+"printf(' change in volume = % 1f ',a)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.15: chapter_9_example_15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation\n",
+"e=0.31\n",
+"e1=1.76//cal/gm/k\n",
+"t=100//c\n",
+"T=273+t//k\n",
+"//-CALCULATIONS\n",
+"ds=e1-e\n",
+"dq=ds*T\n",
+"//results\n",
+"printf(' \n heat of vaporisation at this temperature= % 1f cal/gm',dq)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.16: chapter_9_example_16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation\n",
+"i=3//amp\n",
+"r=10//ohm\n",
+"t=27//c\n",
+"T=273+t//k\n",
+"//CALCULATIONS\n",
+"dq1=0\n",
+"ds1=dq1/T\n",
+"dq2=i*i*r\n",
+"ds2=dq2/T\n",
+"//results\n",
+"printf(' \n change in entropy of resistor= % 1f j/k',ds1)\n",
+"printf(' \n change in entropy of universe= % 1f j/k',ds2)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.17: chapter_9_example_17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"m1=1//gm\n",
+"m2=28\n",
+"cv=0.18\n",
+"T2=373//k\n",
+"T1=323//k\n",
+"//CALCULATIONS\n",
+"ds=m1*cv*log(T2/T1)/m2\n",
+"//results\n",
+"printf(' change in entropy = % 1f cal/k',ds)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.18: chapter_9_example_18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"T1=40//k\n",
+"T2=120//k\n",
+"c1=0.076\n",
+"c2=0.00026\n",
+"c3=0.15\n",
+"//CALCULATIONS\n",
+"r1=c1*(T2-T1)\n",
+"r2=(c2/2)*(T2^2-T1^2)\n",
+"r3=c3*log(T2/T1)\n",
+"ds=5*(r1-r2-r3)\n",
+"//results\n",
+"printf(' change in entropy = % 1f cal/k',ds)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.1: chapter_9_example_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation\n",
+"m=10//gm\n",
+"l=80//\n",
+"t=273//k\n",
+"//CALCULATIONS\n",
+"dq=m*l\n",
+"ds=dq/t\n",
+"//results\n",
+"printf(' \n change in entropy= % 1f cal/k',ds)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.2: chapter_9_example_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"m=0.001//kg\n",
+"l=80000//cal/kg\n",
+"T1=273//k\n",
+"T2=373//k\n",
+"s=1000\n",
+"l1=540000//cal/kg\n",
+"//CALCULATIONS\n",
+"ds=(m*l/T1)+(m*s*log(T2/T1))+(m*l1/T2)\n",
+"//results\n",
+"printf(' change in entropy = % 1f cal/k',ds)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.3: chapter_9_example_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"m=0.001//kg\n",
+"s=500//cal/kg\n",
+"li=80000//cal/kg\n",
+"l1=540000//cal/kg\n",
+"T1=273//k\n",
+"T2=263//k\n",
+"T3=373//k\n",
+"s1=1000//cal/kg\n",
+"//CALCULATIONS\n",
+"d1=m*s*log(T1/T2)\n",
+"d2=m*li/T1\n",
+"d3=m*s1*log(T3/T1)\n",
+"d4=m*l1/T3\n",
+"d5=d4+d3+d2+d1\n",
+"//results\n",
+"printf(' increase in entropy = % 1f cal/k',d5)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4: chapter_9_example_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"m1=0.08//kg\n",
+"m2=0.12//kg\n",
+"t1=20//c\n",
+"t2=50//c\n",
+"T1=t1+273//k\n",
+"T2=t2+373//k\n",
+"s=1000//cal/kg\n",
+"//CALCULATIONS\n",
+"t=(m2*t2+m1*t1)/(m1+m2)\n",
+"T3=t+273\n",
+"s1=m1*s*log(T3/T1)\n",
+"s2=m2*s*log(T3/T2)\n",
+"ds=s1+s2\n",
+"//results\n",
+"printf(' change in entropy of universe = % 1f cal/k',ds)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6: chapter_9_example_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"r=4\n",
+"//CALCULATIONS\n",
+"w=log(r)\n",
+"//results\n",
+"printf(' change in entropy = % 1f R/J cal for each',w)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.7: chapter_9_example_7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"m=1//kg\n",
+"c=1000\n",
+"T1=273//k\n",
+"T2=50+273//k\n",
+"l=571700//cal/kg\n",
+"//CALCULATIONS\n",
+"ds=m*c*log(T2/T1)+m*l/T2\n",
+"//results\n",
+"printf(' difference in entropy = % 1f cal per degree c',ds)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.8: chapter_9_example_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"m=0.01//kg\n",
+"T1=800//k\n",
+"T2=500//k\n",
+"T3=400//k\n",
+"s1=60//cal/kg/k\n",
+"s2=70//cal/kg/k\n",
+"l=14000//cal/kg\n",
+"//CALCULATIONS\n",
+"ds=m*s1*log(T2/T3)+m*l/T2+m*s2*log(T1/T2)\n",
+"//results\n",
+"printf(' change in entropy = % 1f cal/k',ds)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.9: chapter_9_example_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//initialisation of variables\n",
+"c1=0.08\n",
+"c2=0.003\n",
+"c3=0.1\n",
+"T2=100//k\n",
+"T1=50//k\n",
+"//CALCULATIONS\n",
+"r1=c1*(T2-T1)\n",
+"r2=(c2/2)*(T2^2-T1^2)\n",
+"r3=c3*log(T2/T1)\n",
+"ds=5*(r1-r2-r3)\n",
+"//results\n",
+"printf(' change in entropy = % 1f cal/k',ds)"
+ ]
+ }
+],
+"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
+}