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 /Heat_And_Thermodynamics_by_A_Manna/13-Introduction_to_statistical_thermodynamics.ipynb | |
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 'Heat_And_Thermodynamics_by_A_Manna/13-Introduction_to_statistical_thermodynamics.ipynb')
-rw-r--r-- | Heat_And_Thermodynamics_by_A_Manna/13-Introduction_to_statistical_thermodynamics.ipynb | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/Heat_And_Thermodynamics_by_A_Manna/13-Introduction_to_statistical_thermodynamics.ipynb b/Heat_And_Thermodynamics_by_A_Manna/13-Introduction_to_statistical_thermodynamics.ipynb new file mode 100644 index 0000000..7287e76 --- /dev/null +++ b/Heat_And_Thermodynamics_by_A_Manna/13-Introduction_to_statistical_thermodynamics.ipynb @@ -0,0 +1,159 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Introduction to statistical thermodynamics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.1: The_probability.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//INPUT\n", +"p1=1/6;//probability for the first throw gives 6\n", +"p2=1/6;//probability for the first throw gives 5\n", +"n=2;//the no.of dice are two\n", +"\n", +"//CALCULATIONS\n", +"p=p1*p2*n;//the required probability is\n", +"\n", +"//OUTPUT\n", +"mprintf('the required probability is %3.2f',p)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.2: The_probability_of_drawing_four_aces.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//INPUT\n", +"p1=4/52;//the probability for getting ace in first draw is\n", +"p2=3/51;//the probability for getting ace in second draw is\n", +"p3=2/50;//the probability for getting ace in third draw is\n", +"p4=1/49;//the probability for getting ace in fourth draw is\n", +"\n", +"//CALCULATIONS\n", +"p=p1*p2*p3*p4;//total probability is\n", +"\n", +"//OUTPUT\n", +"mprintf('total probability is %3.7f',p)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.3: The_probability_of_distributio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//INPUT\n", +"n=12;//no.of particles\n", +"n1=8;\n", +"n2=4;\n", +"\n", +"//CALCULATIONS\n", +"p=n*(n-1)*(n-2)*(n-3)/(n2*(n2-1)*(n2-2)*(2^n));//probability of distribution (8,4)\n", +"\n", +"//OUTPUT\n", +"mprintf('probability of distribution (8,4) is %3.5f',p)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.4: The_probability.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//INPUT\n", +"m=32;//mass of the oxygen molecule in gm\n", +"n=1.67*10^-27;//mass of one electron\n", +"k=1.38*10^-23;//boltzzmann constant in ergs/cal\n", +"t=200;//temperature of the oxygen in K\n", +"c=(100+101)/2;//average speed of the oxygen molecule in m/s\n", +"\n", +"//CALCULATIONS\n", +"a=m*n/(2*3.14*k*t);\n", +"p=4*3.14*(a^(3/2))*(c^2)*(2.303^(-a));//probability that the oxygen speed is lies between in m/sec\n", +"\n", +"//OUTPUT\n", +"mprintf('probability that the oxygen speed is lies between is %3.16f m/sec',p)" + ] + } +], +"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 +} |