summaryrefslogtreecommitdiff
path: root/backup/mechanics_of_fluid_version_backup/Chapter1-.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'backup/mechanics_of_fluid_version_backup/Chapter1-.ipynb')
-rwxr-xr-xbackup/mechanics_of_fluid_version_backup/Chapter1-.ipynb151
1 files changed, 151 insertions, 0 deletions
diff --git a/backup/mechanics_of_fluid_version_backup/Chapter1-.ipynb b/backup/mechanics_of_fluid_version_backup/Chapter1-.ipynb
new file mode 100755
index 00000000..9483f3d7
--- /dev/null
+++ b/backup/mechanics_of_fluid_version_backup/Chapter1-.ipynb
@@ -0,0 +1,151 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b9f90dbe8cdd3ac15f14ed9a5dcea4d99b8c522db4806d23bf359fc881d94c73"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter1-Fundamental concepts"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate denisty of air and its mass\n",
+ "p=2.*10**5; ## Pa\n",
+ "T=300.; ## K\n",
+ "R=287.; ## J/(kg.K)\n",
+ "V=3.; ## m^3\n",
+ "\n",
+ "rho=p/(R*T);\n",
+ "print'%s %.2f %s'%('The density of air =',rho,'kg/m^3')\n",
+ "m=rho*V;\n",
+ "print'%s %.2f %s'%('Its mass =',m,'m^3')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The density of air = 2.32 kg/m^3\n",
+ "Its mass = 6.97 m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate gas constant Co ,Co2 ,No,N2o\n",
+ "M_C=12.;\n",
+ "M_N=14.;\n",
+ "M_O=16.;\n",
+ "R=8314.; ## J/(kg.K)\n",
+ "\n",
+ "M_CO=M_C+M_O;\n",
+ "R_CO=R/M_CO;\n",
+ "\n",
+ "M_CO2=M_C+2.*M_O;\n",
+ "R_CO2=R/M_CO2;\n",
+ "\n",
+ "M_NO=M_N+M_O;\n",
+ "R_NO=R/M_NO;\n",
+ "\n",
+ "M_N2O=2.*M_N+M_O;\n",
+ "R_N2O=R/M_N2O;\n",
+ "\n",
+ "print'%s %.1f %s'%('Gas constant for CO =',R_CO,'J/(kg.K)')\n",
+ "print'%s %.1f %s'%('Gas constant for CO2 =',R_CO2,'J/(kg.K)')\n",
+ "print'%s %.1f %s'%(\"Gas constant for NO =\",R_NO,\"J/(kg.K)\")\n",
+ "print'%s %.1f %s'%(\"Gas constant for N2O =\",R_N2O,\"J/(kg.K)\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gas constant for CO = 296.9 J/(kg.K)\n",
+ "Gas constant for CO2 = 189.0 J/(kg.K)\n",
+ "Gas constant for NO = 277.1 J/(kg.K)\n",
+ "Gas constant for N2O = 189.0 J/(kg.K)\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate reynodls number and prove the \n",
+ "d=0.004; ## m\n",
+ "rho=1000; ## kg/m^3\n",
+ "v=3; ## m/s\n",
+ "meu=10**(-3); ## khm(m.s)\n",
+ "\n",
+ "Re=rho*v*d/meu; \n",
+ "print'%s %.f %s'%(\"Reynolds number =\",Re,\"\")\n",
+ "\n",
+ "print(\"The Reynolds number is well in excess of 4000, so the flow is turbulent.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reynolds number = 12000 \n",
+ "The Reynolds number is well in excess of 4000, so the flow is turbulent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file