summaryrefslogtreecommitdiff
path: root/Heat_And_Thermodynamics_by_A_Manna/5-Equations_of_state.ipynb
diff options
context:
space:
mode:
authorprashantsinalkar2020-04-14 10:19:27 +0530
committerprashantsinalkar2020-04-14 10:23:54 +0530
commit476705d693c7122d34f9b049fa79b935405c9b49 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Heat_And_Thermodynamics_by_A_Manna/5-Equations_of_state.ipynb
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
downloadall-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.gz
all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.bz2
all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.zip
Initial commit
Diffstat (limited to 'Heat_And_Thermodynamics_by_A_Manna/5-Equations_of_state.ipynb')
-rw-r--r--Heat_And_Thermodynamics_by_A_Manna/5-Equations_of_state.ipynb127
1 files changed, 127 insertions, 0 deletions
diff --git a/Heat_And_Thermodynamics_by_A_Manna/5-Equations_of_state.ipynb b/Heat_And_Thermodynamics_by_A_Manna/5-Equations_of_state.ipynb
new file mode 100644
index 0000000..99daf91
--- /dev/null
+++ b/Heat_And_Thermodynamics_by_A_Manna/5-Equations_of_state.ipynb
@@ -0,0 +1,127 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Equations of state"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: The_values_of_constant_a_and_b_in_vanderwaal_equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"\n",
+"//INPUT\n",
+"t=304;//temperature of the gas in k\n",
+"p=73;//pressure of the gas in atm\n",
+"r=0.00366;//universal gas constant in j/K/mole\n",
+"//ct=8a/27br;cp=a/27b^2\n",
+"\n",
+"//CALCULATIONS\n",
+"b=(t*r/(8*p));\n",
+"a=p*27*b^2;\n",
+"\n",
+"//OUTPUT\n",
+"mprintf('the value of the constant b is %3.7f \n the value of the constant a is %3.5f',b,a)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: Vanderwaal_constants.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"\n",
+"//INPUT\n",
+"tc=132;//critical temperature in K\n",
+"pc=37.2;//critical pressure in atm\n",
+"r=82.07;//universal gas constant in cm^3atm/mole/K\n",
+"\n",
+"//CALCULATIONS\n",
+"a=27*(r^2)*(tc^2)/(64*pc);//value of a in atm/cm^6/mol^2\n",
+"b=r*tc/(8*pc);//value of b in cm^3/mol\n",
+"\n",
+"//OUTPUT\n",
+"mprintf('the value of is %3.2f atm/cm^6/mol^2 \n the value of b is %3.2f cm^3/mol',a,b)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: Temperature_of_the_gas.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"\n",
+"//INPUT\n",
+"p=2.26*1.013*10^5;//critical pressure in N/m^2\n",
+"v=4/69;//critical volume in m^3/kmol\n",
+"r=8.31*10^3;//universal gas constant in J/kmol.K\n",
+"\n",
+"//CALCULATIONS\n",
+"t=(8*p*v/(3*r));//critical temperature in K\n",
+"\n",
+"//OUTPUT\n",
+"mprintf('critical temperature of the given problem is %3.2f K',t)"
+ ]
+ }
+],
+"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
+}