summaryrefslogtreecommitdiff
path: root/sample_notebooks
diff options
context:
space:
mode:
Diffstat (limited to 'sample_notebooks')
-rw-r--r--sample_notebooks/AshvaniKumar/ch10.ipynb395
-rw-r--r--sample_notebooks/MohdAsif/chapter1.ipynb389
-rw-r--r--sample_notebooks/karansingh/ch1.ipynb227
3 files changed, 1011 insertions, 0 deletions
diff --git a/sample_notebooks/AshvaniKumar/ch10.ipynb b/sample_notebooks/AshvaniKumar/ch10.ipynb
new file mode 100644
index 00000000..d5617323
--- /dev/null
+++ b/sample_notebooks/AshvaniKumar/ch10.ipynb
@@ -0,0 +1,395 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10 - Other Power Amplifiers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1 Page No 425"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value of P_DQ = 11.25 mW\n",
+ "The value of P_Dmax = 112.50 mW\n",
+ "The value of P_Lmax = 562.50 mW\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given data\n",
+ "V_CEQ= 7.5## V\n",
+ "R_L= 50## Ω\n",
+ "I_Csat= V_CEQ/R_L## A\n",
+ "I_CQ= 0.01*I_Csat## A\n",
+ "P_DQ= V_CEQ*I_CQ## W\n",
+ "PP= 2*V_CEQ## V\n",
+ "P_Dmax= PP**2/(40*R_L)## W\n",
+ "P_Lmax= PP**2/(8*R_L)## W\n",
+ "# The value of P_DQ \n",
+ "P_DQ= P_DQ*10**3## mW\n",
+ "# The value of P_Dmax \n",
+ "P_Dmax= P_Dmax*10**3## mW\n",
+ "# The value of P_Lmax \n",
+ "P_Lmax= P_Lmax*10**3## mW\n",
+ "print \"The value of P_DQ = %.2f mW\"%P_DQ\n",
+ "print \"The value of P_Dmax = %.2f mW\"%P_Dmax\n",
+ "print \"The value of P_Lmax = %.2f mW\"%P_Lmax"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.2 Page No 425"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The efficiency of amplifier = 74.03 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given data\n",
+ "V_CC= 15## V\n",
+ "I_Csat= 150## mA\n",
+ "P_Lmax= 563## mW\n",
+ "I= 0.02*I_Csat## mA\n",
+ "Idc= 0.318*I_Csat## mA\n",
+ "I_CC= I+Idc## mA\n",
+ "P_CC= V_CC*I_CC## mW\n",
+ "# The efficiency of amplifier \n",
+ "Eta= P_Lmax/P_CC*100## %\n",
+ "print \"The efficiency of amplifier = %.2f %%\"%Eta\n",
+ "\n",
+ "# Note: The answer in the book is not accurate"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3 Page No 426"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFnxJREFUeJzt3Xvw5XV93/HnSy4qXjBxhcKCAw7gCPGyZUqJxPCrmdEF\nrea2CqYVbcfQphAV4limKptgE5xpUyRY1BZXY+OChg3BSrzE+FNjqsYVhHCpYiGA4NKVS4GlFuXd\nP8532cOP3+Wc8zvf37k9HzNn9ly+v3M+e+bs77PP7+2kqpAk6UmjHoAkaTw4IUiSACcESVLDCUGS\nBDghSJIaTgiSJMAJQQIgyUeTnNfC884luX2Zxx9N8rzm+sVJ3jXsMUi9ckLQREsyn+S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QJEkN\nJwRJEuCEIElqOCFIkgD4/2yFPh7tHE6jAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f863864ffd0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "AC load line shown in figure\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange\n",
+ "%matplotlib inline\n",
+ "from matplotlib import pyplot as plt\n",
+ "# given data\n",
+ "V_CC= 40.0## V\n",
+ "V_CEQ= 20.0## V\n",
+ "R_L= 10.0## Ω\n",
+ "I_Csat= V_CEQ/R_L## A\n",
+ "V_CEcutoff= V_CEQ## V\n",
+ "V_CE= arange(0,0.1+V_CEcutoff,0.1) # V\n",
+ "I_C= (V_CEQ-V_CE)/R_L## A\n",
+ "# The plot of ac load line,\n",
+ "plt.plot(V_CE,I_C)\n",
+ "plt.xlabel(\"VCE in volts\")\n",
+ "plt.ylabel(\"IC in A\")\n",
+ "plt.title(\"AC load line\")\n",
+ "plt.show()\n",
+ "print \"AC load line shown in figure\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.4 Page No 427"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value of P_DQ = 0.39 W\n",
+ "The value of P_Lmax = 20.00 W\n",
+ "The value of P_Dmax = 4.00 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given data\n",
+ "V_CC= 40## V\n",
+ "V_BE= 0.7## V\n",
+ "R= 1*10**3## Ω\n",
+ "R_L= 10## Ω\n",
+ "V_CEQ= 20## V\n",
+ "I_CQ= (V_CC-2*V_BE)/(2*R)## A\n",
+ "# The value of P_DQ\n",
+ "P_DQ= V_CEQ*I_CQ## W\n",
+ "print \"The value of P_DQ = %.2f W\"%P_DQ\n",
+ "PP= 2*V_CEQ## V\n",
+ "# The value of P_Lmax\n",
+ "P_Lmax= PP**2/(8*R_L)## W\n",
+ "# The value of P_Dmax\n",
+ "P_Dmax= PP**2/(40*R_L)## W\n",
+ "print \"The value of P_Lmax = %.2f W\"%P_Lmax\n",
+ "print \"The value of P_Dmax = %.2f W\"%P_Dmax"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.5 Page No 428"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The voltage gain of the driver stage = 9.36\n",
+ "On ignoring the value of Zin and r'e, the voltage gain = 10.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given data\n",
+ "V_E= 1.43## V\n",
+ "R_E= 100## Ω\n",
+ "R_L= 100## Ω\n",
+ "R_C= 1*10**3## Ω\n",
+ "bita= 200#\n",
+ "Vt= 25*10**-3## V\n",
+ "I_E= V_E/R_E## A\n",
+ "I_CQ= I_E## A\n",
+ "Zin= bita*R_L## Ω\n",
+ "r_desh_e= Vt/I_CQ## Ω\n",
+ "# The voltage gain of the driver stage \n",
+ "A= (R_C*Zin/(R_C+Zin))/(R_E+r_desh_e)#\n",
+ "print \"The voltage gain of the driver stage = %.2f\"%A\n",
+ "# On ignoring Zin and r_desh_e,\n",
+ "A= R_C/R_E#\n",
+ "print \"On ignoring the value of Zin and r'e, the voltage gain = %.2f\"%A"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.6 Page No 429"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value of PP = 30.00 volts\n",
+ "The value of P_Lmax = 1.12 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given data\n",
+ "V_CC= 30.0## V\n",
+ "PP= V_CC## V\n",
+ "R_L= 100.0## Ω\n",
+ "# The value of P_Lmax \n",
+ "P_Lmax= PP**2/(8*R_L)## W\n",
+ "print \"The value of PP = %.2f volts\"%PP\n",
+ "print \"The value of P_Lmax = %.2f W\"%P_Lmax"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.7 Page No 430"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The overall voltage gain = 2000.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given data\n",
+ "R_C= 1*10**3## Ω\n",
+ "r_desh_e= 2.5##in Ω\n",
+ "Zin= 1.0*10**3## Ω\n",
+ "A2= 10## unit less\n",
+ "A3= 1## unit less\n",
+ "A1= (R_C*Zin/(R_C+Zin))/r_desh_e## unit less\n",
+ "# The overall voltage gain \n",
+ "A= A1*A2*A3#\n",
+ "print \"The overall voltage gain = %.2f\"%A"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.8 Page No 431"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The minimum base current that produces saturation = 108.89 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given data\n",
+ "V_CC= 50.0## V\n",
+ "V_CEsat= 1.0## V\n",
+ "R_L= 5## Ω\n",
+ "bita_dc= 90## unit less\n",
+ "I_Csat= (V_CC-V_CEsat)/R_L## A\n",
+ "# The minimum base current that produces saturation \n",
+ "I_Bsat= I_Csat/bita_dc## A\n",
+ "I_Bsat= I_Bsat*10**3## mA\n",
+ "print \"The minimum base current that produces saturation = %.2f mA\"%I_Bsat"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.9 Page No 432"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The input voltage = 2.85 volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given data\n",
+ "I_Csat= 109*10**-3## A\n",
+ "bita_dc= 200#\n",
+ "R_B= 1*10**3## Ω\n",
+ "V_BE1= 0.7## V\n",
+ "V_BE2= 1.6## V\n",
+ "# The base current,\n",
+ "I_Bsat= I_Csat/bita_dc## A\n",
+ "# The input voltage\n",
+ "Vin= I_Bsat*R_B+V_BE1+V_BE2## V\n",
+ "print \"The input voltage = %.2f volts\"%Vin"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/sample_notebooks/MohdAsif/chapter1.ipynb b/sample_notebooks/MohdAsif/chapter1.ipynb
new file mode 100644
index 00000000..aa2a3025
--- /dev/null
+++ b/sample_notebooks/MohdAsif/chapter1.ipynb
@@ -0,0 +1,389 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1 - Linear Algebraic Equations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa1.1 Page 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the solution of ex 1.1 by TDMA method is\n",
+ "317.5\n",
+ "395.0\n",
+ "432.5\n",
+ "430.0\n",
+ "387.5\n",
+ "305.0\n",
+ "182.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import zeros\n",
+ "from __future__ import division\n",
+ "a=[0];b=[];c=[]\n",
+ "for i in range(1,7):\n",
+ " a.append(1) #sub diagonal assignment\n",
+ "\n",
+ "for j in range(0,7):\n",
+ " b.append(-2) #main diagonal assignment\n",
+ "\n",
+ "for k in range(0,6):\n",
+ " c.append(1) #super diagonal assignment\n",
+ "\n",
+ "d=[-240] #given values assignment\n",
+ "for l in range(1,6):\n",
+ " d.append(-40) \n",
+ "\n",
+ "d.append(-60)\n",
+ "i=1#\n",
+ "n=7#\n",
+ "beta1=[b[i-1]]# #initial b is equal to beta since a1=0\n",
+ "gamma1=[d[i-1]/beta1[i-1]]# #since c7=0\n",
+ "m=i+1\n",
+ "for j in range(m,n+1):\n",
+ " beta1.append(b[j-1]-a[j-1]*c[j-1-1]/beta1[j-1-1])\n",
+ " gamma1.append((d[j-1]-a[j-1]*gamma1[j-1-1])/beta1[j-1])\n",
+ "\n",
+ "#x(n)=gamma1(n)# #since c7=0\n",
+ "x=zeros(n-1)\n",
+ "#x[n-1]=gamma1[n-1]\n",
+ "x=list(x)\n",
+ "x.append(gamma1[-1])\n",
+ "n1=n-i# \n",
+ "\n",
+ "for k in range(0,n1):\n",
+ " j=n-k-1\n",
+ " x[j-1]=gamma1[j-1]-c[j-1]*x[j+1-1]/beta1[j-1]\n",
+ "\n",
+ "\n",
+ "print \"the solution of ex 1.1 by TDMA method is\"\n",
+ "for i in range(0,7):\n",
+ " print x[i]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa1.2 Page 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the solution using gauss elimination method is 3, 4 and 5\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "a1=10; a2=1; a3=2; #1st row\n",
+ "b1=2; b2=10; b3=1; #2nd row\n",
+ "c1=1; c2=2; c3=10; #3rd row \n",
+ "d1=44; d2=51; d3=61; #given values\n",
+ "\n",
+ "b3=b3-(b1/a1)*a3 # for making b1=0\n",
+ "b2=b2-(b1/a1)*a2\n",
+ "d2=d2-(b1/a1)*d1\n",
+ "b1=b1-(b1/a1)*a1\n",
+ "\n",
+ "c3=c3-(c1/a1)*a3 # for making c1=0\n",
+ "c2=c2-(c1/a1)*a2\n",
+ "d3=d3-(c1/a1)*d1\n",
+ "c1=c1-(c1/a1)*a1\n",
+ "\n",
+ "c3=c3-(c2/b2)*b3 # for making c2=0\n",
+ "d3=d3-(c2/b2)*d2\n",
+ "c2=c2-(c2/b2)*b2\n",
+ "\n",
+ "x3=d3/c3# # final values of x\n",
+ "x2=(d2-(b3*x3))/b2#\n",
+ "x1=(d1-(x3*a3)-(x2*a2))/a1#\n",
+ "print \"the solution using gauss elimination method is %d, %d and %d\"%(x1,x2,x3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa1.3 Page 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the solution using gauss elimination method is 3, -2 and 0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "a1=3; a2=1; a3=-2; #1st row\n",
+ "b1=-1; b2=4; b3=-3; #2nd row\n",
+ "c1=1; c2=-1; c3=4; #3rd row \n",
+ "d1=9; d2=-8; d3=1; #given values\n",
+ "\n",
+ "b3=b3-(b1/a1)*a3 # for making b1=0\n",
+ "b2=b2-(b1/a1)*a2\n",
+ "d2=d2-(b1/a1)*d1\n",
+ "b1=b1-(b1/a1)*a1\n",
+ "\n",
+ "c3=c3-(c1/a1)*a3 # for making c1=0\n",
+ "c2=c2-(c1/a1)*a2\n",
+ "d3=d3-(c1/a1)*d1\n",
+ "c1=c1-(c1/a1)*a1\n",
+ "\n",
+ "c3=c3-(c2/b2)*b3 # for making c2=0\n",
+ "d3=d3-(c2/b2)*d2\n",
+ "c2=c2-(c2/b2)*b2\n",
+ "\n",
+ "x3=d3/c3# # final values of x\n",
+ "x2=(d2-(b3*x3))/b2#\n",
+ "x1=(d1-(x3*a3)-(x2*a2))/a1#\n",
+ "print \"the solution using gauss elimination method is %d, %d and %d\"%(x1,x2,x3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa1.4 Page 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the values of MOLAR FLOW RATES of D1, B1, D2, B2 respectively are : 26, 18, 9 and 17\n",
+ "the composition of stream B is 0.077, 0.247, 0.467 & 0.210\n",
+ "the composition of stream D is 0.274 0.492 0.12 0.114\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "\n",
+ "a1=.35; a2=.16; a3=.21; a4=.01 #1st row \n",
+ "b1=.54; b2=.42; b3=.54; b4=.1 #2nd row\n",
+ "c1=.04; c2=.24; c3=.1; c4=.65 #3rd row\n",
+ "d1=.07; d2=.18; d3=.15; d4=.24 #4th row \n",
+ "r1=14; r2=28; r3=17.5; r4=10.5 #given values\n",
+ "\n",
+ "b4=b4-(b1/a1)*a4 # for making b1=0\n",
+ "b3=b3-(b1/a1)*a3\n",
+ "b2=b2-(b1/a1)*a2\n",
+ "r2=r2-(b1/a1)*r1\n",
+ "b1=b1-(b1/a1)*a1\n",
+ "\n",
+ "c4=c4-(c1/a1)*a4 # for making c1=0\n",
+ "c3=c3-(c1/a1)*a3\n",
+ "c2=c2-(c1/a1)*a2\n",
+ "r3=r3-(c1/a1)*r1\n",
+ "c1=c1-(c1/a1)*a1\n",
+ "\n",
+ "d4=d4-(d1/a1)*a4 # for making d1=0\n",
+ "d3=d3-(d1/a1)*a3\n",
+ "d2=d2-(d1/a1)*a2\n",
+ "r4=r4-(d1/a1)*r1\n",
+ "d1=d1-(d1/a1)*a1\n",
+ "\n",
+ "c4=c4-(c2/b2)*b4 # for making c2=0\n",
+ "c3=c3-(c2/b2)*b3\n",
+ "r3=r3-(c2/b2)*r2\n",
+ "c2=c2-(c2/b2)*b2\n",
+ "\n",
+ "d4=d4-(d2/b2)*b4 # for making d2=0\n",
+ "d3=d3-(d2/b2)*b3\n",
+ "r4=r4-(d2/b2)*r2\n",
+ "d2=d2-(d2/b2)*b2\n",
+ "\n",
+ "d4=d4-(d3/c3)*c4 #for making d3=0\n",
+ "r4=r4-(d3/c3)*r3\n",
+ "d3=d3-(d3/c3)*c3\n",
+ "\n",
+ "B2=r4/d4#\n",
+ "D2=(r3-(c4*B2))/c3#\n",
+ "B1=(r2-(D2*b3)-(B2*b4))/b2#\n",
+ "D1=(r1-(B2*a4)-(D2*a3)-(B1*a2))/a1#\n",
+ "print \"the values of MOLAR FLOW RATES of D1, B1, D2, B2 respectively are : %.f, %.f, %.f and %.f\"%(D1,B1,D2,B2)\n",
+ "\n",
+ "B=D2+B2#\n",
+ "x1B=(.21*D2 + .01*B2)/B#\n",
+ "x2B=(.54*D2 + .1*B2)/B#\n",
+ "x3B=(.1*D2 + .65*B2)/B#\n",
+ "x4B=(.15*D2 + .24*B2)/B#\n",
+ "print \"the composition of stream B is %.3f, %.3f, %.3f & %.3f\"%(x1B,x2B,x3B,x4B)\n",
+ "\n",
+ "D=D1+B1#\n",
+ "x1D=(.35*D1 + .16*B1)/D#\n",
+ "x2D=(.54*D1 + .42*B1)/D#\n",
+ "x3D=(.04*D1 + .24*B1)/D#\n",
+ "x4D=(.07*D1 + .18*B1)/D#\n",
+ "print \"the composition of stream D is\",x1D,x2D,x3D,x4D"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa1.5 Page 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the values of x1,x2,x3 respectively is\n",
+ "3\n",
+ "4\n",
+ "5\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "xnew=[];e=[]\n",
+ "for i in range(0,3):\n",
+ " xnew.append(2)\n",
+ " e.append(1)\n",
+ "\n",
+ "x=1e-6\n",
+ "while e[0]>x and e[1]>x and e[2]>x:\n",
+ " xold=[]\n",
+ " for i in range(0,3):\n",
+ " xold.append(xnew[i])\n",
+ " \n",
+ " xnew[0]=(44-xold[1]-2*xold[2])/10\n",
+ " xnew[1]=(-2*xnew[0]+51-xold[2])/10\n",
+ " xnew[2]=(-2*xnew[1]-xnew[0]+61)/10\n",
+ " e=[]\n",
+ " for i in range(0,3):\n",
+ " e.append(abs(xnew[i]-xold[i]))\n",
+ " \n",
+ "print \"the values of x1,x2,x3 respectively is\"\n",
+ "for i in range(0,3):\n",
+ " print '%.f'%xnew[i]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa1.6 Page 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the values of x1,x2,x3 respectively is\n",
+ "3\n",
+ "-2\n",
+ "-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "xnew=[];e=[];\n",
+ "for i in range(0,3):\n",
+ " xnew.append(2)\n",
+ " e.append(1)\n",
+ "\n",
+ "x=1e-6\n",
+ "while e[0]>x and e[1]>x and e[2]>x:\n",
+ " xold=[]\n",
+ " for i in range(0,3):\n",
+ " xold.append(xnew[i])\n",
+ " \n",
+ " xnew[0]=(9-xold[1]+2*xold[2])/3\n",
+ " xnew[1]=(xnew[0]-8+3*xold[2])/4\n",
+ " xnew[2]=(xnew[1]-xnew[0]+1)/4\n",
+ " e=[]\n",
+ " for i in range(0,3):\n",
+ " e.append(abs(xnew[i]-xold[i]))\n",
+ " \n",
+ "print \"the values of x1,x2,x3 respectively is\"\n",
+ "for i in range(0,3):\n",
+ " print '%.f'%xnew[i]"
+ ]
+ }
+ ],
+ "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
+}
diff --git a/sample_notebooks/karansingh/ch1.ipynb b/sample_notebooks/karansingh/ch1.ipynb
new file mode 100644
index 00000000..424c23f8
--- /dev/null
+++ b/sample_notebooks/karansingh/ch1.ipynb
@@ -0,0 +1,227 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter1 - Survey Of Units And Dimensions"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:1.1 Pg: 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force to accelerate = 3.108 lbf\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "gc=32.1739 #lbm ft/lbf s**2\n",
+ "m=10 #lbm\n",
+ "a=10 #ft/s**2\n",
+ "#calculations\n",
+ "F=m*a/gc\n",
+ "#results\n",
+ "print \"Force to accelerate = %.3f lbf\"%(F)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:1.2 Pg: 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force to accelerate = 10 lbf\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "gc=32.1739 #lbm ft/lbf s**2\n",
+ "m=10 #lbm\n",
+ "a=gc #ft/s**2\n",
+ "#calculations\n",
+ "F=m*a/gc\n",
+ "#results\n",
+ "print \"Force to accelerate = %d lbf\"%(F)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:1.3 Pg: 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity = 60 mph\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "v=88 #ft/s\n",
+ "#calculations\n",
+ "v2=v*3600/5280\n",
+ "#results\n",
+ "print \"velocity = %d mph\"%(v2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:1.4 Pg: 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity = 0 mph\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "v=88 #ft/s\n",
+ "#calculations\n",
+ "v2=v*1/5280*3600\n",
+ "#results\n",
+ "print \"velocity = %d mph\"%(v2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:1.5 Pg: 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force without dimensions = 5.79e-04 lbm/ft sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "F=5e-9 #lbf/ft**2 hr\n",
+ "g=32.1739\n",
+ "#calculations\n",
+ "F2=F*3600*g\n",
+ "#results\n",
+ "print \"Force without dimensions = %.2e lbm/ft sec\"%(F2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:1.6 Pg: 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Density of water in this system = 1.937 lbf/ft**2\n",
+ "\n",
+ " Specific weight = 62.305 lbf/ft**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "rho=62.305 #lbf/ft**2\n",
+ "g=32.1739 #ft/s**2\n",
+ "#calculations\n",
+ "gam=rho/g\n",
+ "#results\n",
+ "print \"Density of water in this system = %.3f lbf/ft**2\"%(gam)\n",
+ "print \"\\n Specific weight = %.3f lbf/ft**2\"%(rho)"
+ ]
+ }
+ ],
+ "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
+}