summaryrefslogtreecommitdiff
path: root/sample_notebooks/marupeddisameer chaitanya
diff options
context:
space:
mode:
authorhardythe12015-07-03 12:23:43 +0530
committerhardythe12015-07-03 12:23:43 +0530
commit9d260e6fae7328d816a514130b691fbd0e9ef81d (patch)
tree9e6035702fca0f6f8c5d161de477985cacad7672 /sample_notebooks/marupeddisameer chaitanya
parentafcd9e5397e3e1bde0392811d0482d76aac391dc (diff)
downloadPython-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.tar.gz
Python-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.tar.bz2
Python-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.zip
add/remove books
Diffstat (limited to 'sample_notebooks/marupeddisameer chaitanya')
-rwxr-xr-xsample_notebooks/marupeddisameer chaitanya/Sample_(chapter_9).ipynb247
1 files changed, 247 insertions, 0 deletions
diff --git a/sample_notebooks/marupeddisameer chaitanya/Sample_(chapter_9).ipynb b/sample_notebooks/marupeddisameer chaitanya/Sample_(chapter_9).ipynb
new file mode 100755
index 00000000..bff5435f
--- /dev/null
+++ b/sample_notebooks/marupeddisameer chaitanya/Sample_(chapter_9).ipynb
@@ -0,0 +1,247 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9 : Theories of Mass Transfer"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.1.1 pgno31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The film thickness is cm 0.00765\n"
+ ]
+ }
+ ],
+ "source": [
+ "#initialization of variables\n",
+ "p1 = 10. # pressure in atm\n",
+ "H = 600. # henrys constant in atm\n",
+ "c1 = 0 # gmol/cc\n",
+ "N1 = 2.3*10**-6 # mass flux in mol/cm**2-sec\n",
+ "c = 1./18. #total Concentration in g-mol/cc\n",
+ "D = 1.9*10**-5 # Diffusion co efficient in cm**2/sec\n",
+ "#Calculations\n",
+ "c1i = (p1/H)*c # Component concentration in gmol/cc\n",
+ "k = N1/(c1i-c1)#Mass transfer co efficient in cm/sec\n",
+ "l = D/k # Film thickness in cm\n",
+ "#Results\n",
+ "print\"The film thickness is cm\",round(l,5)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.2.1 pgno:34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The contact time sec 3.9\n",
+ "\n",
+ "The surface resident time sec 3.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#initialization of variables\n",
+ "D = 1.9*10**-5 #Diffusion co efficient in cm**2/sec\n",
+ "k = 2.5*10**-3 # M.T.C in cm/sec\n",
+ "from math import pi\n",
+ "#Calculations\n",
+ "Lbyvmax = 4*D/((k**2)*pi)#sec\n",
+ "tou = D/k**2 # sec\n",
+ "#Results\n",
+ "print\"The contact time sec\",round(Lbyvmax,1)\n",
+ "print\"\\nThe surface resident time sec\",round(tou,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.3.1 pgno:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The apparent m.t.c for the first case is cm/sec 0.000379885493042\n",
+ "\n",
+ "The apparent m.t.c for the second case is cm/sec 0.000742723884992\n",
+ "\n",
+ "The apparent is proportional to the power of of the velocity 0.61\n"
+ ]
+ }
+ ],
+ "source": [
+ "#initialization of variables\n",
+ "const = 0.5 # The part of flow in the system which bypasses the region where the mass transfer occurs\n",
+ "v1 = 1. # cm/sec\n",
+ "al = 10**3\n",
+ "k = 10**-3 # cm/sec\n",
+ "v2 = 3. # cm/sec\n",
+ "from math import log\n",
+ "from math import exp\n",
+ "#Calculations\n",
+ "C1byC10first = const + (1-const)*(exp(-k*al/v1))# c1/c10\n",
+ "appk1 = (v1/al)*(log(1/C1byC10first))# Apparent m.t.c for first case in cm/sec\n",
+ "C1byC10second = const + (1-const)*(exp(-((3)**0.5)*k*al/v2))#c1/c10 in second case\n",
+ "appk2 = (v2/al)*log(1/C1byC10second)# apparent m.t.c for second case in cm/sec\n",
+ "power = log(appk2/appk1)/log(v2/v1)\n",
+ "#Results\n",
+ "print\"The apparent m.t.c for the first case is cm/sec\",appk1\n",
+ "print\"\\nThe apparent m.t.c for the second case is cm/sec\",appk2\n",
+ "print\"\\nThe apparent is proportional to the power of of the velocity\",round(power,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4.1 pgno:37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The average mass transfer coefficient is cm/sec 0.000431530124388\n"
+ ]
+ }
+ ],
+ "source": [
+ "#initialization of variables\n",
+ "D = 1*10**-5 #cm**2/sec\n",
+ "d = 2.3 # cm\n",
+ "L = 14 # cm\n",
+ "v0 = 6.1 # cm/sec\n",
+ "#gamma(4./3.)=0.8909512761;\n",
+ "#calculations\n",
+ "k = ((3**(1./3.))/(0.8909512761))*((D/d))*(((d**2)*v0/(D*L))**(1./3.))# cm/sec\n",
+ "#Results\n",
+ "print\"The average mass transfer coefficient is cm/sec\",k\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4.2 pgno:40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The distance at which turbulent flow starts is cm 300.0\n",
+ "\n",
+ "The boundary layer for flow at this point is cm 300.0\n",
+ "\n",
+ "The boundary layer for concentration at this point is cm 300.0\n",
+ "\n",
+ "The local m.t.c at the leading edge and at the position of transistion is x10**-5 cm/sec 0.589714620247\n"
+ ]
+ }
+ ],
+ "source": [
+ "#initialization of variables\n",
+ "tn = 300000 # turbulence number\n",
+ "v0 = 10 # cm/sec\n",
+ "p = 1 # g/cc\n",
+ "mu = 0.01 # g/cm-sec\n",
+ "delta = 2.5 #cm\n",
+ "D = 1*10**-5 # cm**2/sec\n",
+ "#Calculations\n",
+ "x = tn*mu/(v0*p)# cm\n",
+ "delta = ((280/13)**(1/2))*x*((mu/(x*v0*p))**(1/2))#cm\n",
+ "deltac = ((D*p/mu)**(1/3))*delta#cm\n",
+ "k = (0.323*(D/x)*((x*v0*p/mu)**0.5)*((mu/(p*D))**(1/3)))*10**5# x*10**-5 cm/sec\n",
+ "#Results\n",
+ "print\"The distance at which turbulent flow starts is cm\",x\n",
+ "print\"\\nThe boundary layer for flow at this point is cm\",delta\n",
+ "print\"\\nThe boundary layer for concentration at this point is cm\",deltac\n",
+ "print\"\\nThe local m.t.c at the leading edge and at the position of transistion is x10**-5 cm/sec\",k\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "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
+}