summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_kN6Dpid.ipynb247
-rw-r--r--BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_tIlzIkR.ipynb403
-rw-r--r--BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_PgrcCS3.ipynb194
-rw-r--r--BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_eLqBEle.ipynb164
-rw-r--r--BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_F25WLJ6.ipynb532
-rw-r--r--BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_Eijvt7y.ipynb425
-rw-r--r--BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_rlhSgIB.ipynb446
-rw-r--r--BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_YQ3b0EW.ipynb664
-rw-r--r--BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_raABo34.ipynb844
-rw-r--r--BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_52Xb53f.ipynb172
-rw-r--r--BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_mk2HyQz.ipynb306
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter10_NUnB5Sw.ipynb599
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter11_pIim3x0.ipynb221
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter12_9A34qBU.ipynb890
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13_ZusP0LZ.ipynb641
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter14_HgYvpWb.ipynb735
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter15_o1Meb0U.ipynb760
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter16_xq1IcPx.ipynb555
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter17_JAzeWmK.ipynb323
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter18_7Yy7cvJ.ipynb706
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter19_GQTZX04.ipynb1372
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter1_seG0iD4.ipynb121
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter20_7AIMdUg.ipynb912
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter21_ingIztX.ipynb528
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter22_yljf4OR.ipynb497
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter2_exrY10K.ipynb113
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter3_4zPOo0N.ipynb370
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter4_UHVlvXM.ipynb343
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter5_He9TCwH.ipynb465
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter6_569mm1H.ipynb365
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter7_uRawaHX.ipynb453
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter8_KEcrcQP.ipynb1023
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter9_2XNkqrL.ipynb925
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/16.11_EVddapc.pngbin0 -> 76256 bytes
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/3.3_hWZB9rU.pngbin0 -> 24766 bytes
-rw-r--r--Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/7.10_IDdNUer.pngbin0 -> 67805 bytes
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter11_0YOsUSl.ipynb259
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter12_hzQe7ah.ipynb312
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter13_DuT5TXy.ipynb281
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter14_3UXi8E3.ipynb261
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter15_YmFtkbT.ipynb371
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter16_NzhdF5v.ipynb207
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter18_gAN9M3I.ipynb151
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter19_d2Dk0b0.ipynb107
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter20_oPoeIwV.ipynb112
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter21_g3i9pmI.ipynb232
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter22_kZ51MuY.ipynb114
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter23_MeQwZwE.ipynb145
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter2_9eBOyNb.ipynb363
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter5_0stc93N.ipynb258
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter6_Qjw2zj2.ipynb257
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter8_1dOnAi7.ipynb197
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter9_12ISo6t.ipynb417
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic1_SdzvQJK.pngbin0 -> 7144 bytes
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic2_6vjSxZe.pngbin0 -> 7115 bytes
-rw-r--r--Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic3_vqn3sAt.pngbin0 -> 25269 bytes
-rw-r--r--Problems_in_Electrical_Engineering_by_Parker_Smith/README.txt10
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter10_QlnhZhy.ipynb309
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter11_0iM0C4n.ipynb363
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter12_KLDtsnD.ipynb336
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter13_PUt6mPw.ipynb168
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter14_1MNPptQ.ipynb301
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter15_xVW7XGn.ipynb314
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter16_au5Aji1.ipynb279
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter17_0ixqhLJ.ipynb124
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter18_jjgTIC5.ipynb361
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter19_Z3Jn476.ipynb1367
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter1_nKyAwVf.ipynb600
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter2_jki9geU.ipynb469
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter3_9BtkYo4.ipynb728
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter4_KaWbXff.ipynb464
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter5_NTVaiVF.ipynb570
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter7_fElJXKG.ipynb350
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter8_P6SjSkH.ipynb331
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter9_5BJhRQ7.ipynb326
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/11.4_upwwc7G.pngbin0 -> 37523 bytes
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/13.1_fg5oW41.pngbin0 -> 42124 bytes
-rw-r--r--RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/15.4_yoOlH2F.pngbin0 -> 19682 bytes
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter01.ipynb171
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter02.ipynb418
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter03.ipynb252
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter04.ipynb211
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter05.ipynb421
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter06.ipynb700
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter07.ipynb80
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter08.ipynb172
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter09.ipynb468
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter10.ipynb71
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter11.ipynb314
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter12.ipynb484
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter13.ipynb286
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter14.ipynb508
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter15.ipynb221
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter16.ipynb287
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter17.ipynb508
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter18.ipynb419
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter19.ipynb356
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/15.8.pngbin0 -> 27164 bytes
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/4.3.pngbin0 -> 25148 bytes
-rw-r--r--Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/9.6.pngbin0 -> 28545 bytes
-rw-r--r--f_by_df/1_An_overview_of_C.ipynb254
-rw-r--r--f_by_df/screenshots/amit_Das.pngbin0 -> 145428 bytes
-rw-r--r--f_by_df/screenshots/amit_Das_2s4uFcV.pngbin0 -> 145428 bytes
-rw-r--r--f_by_df/screenshots/anshul_zMmwiWY.pngbin0 -> 75019 bytes
-rw-r--r--sample_notebooks/RahulJoshi/Chapter_1_An_Overview_of_Heat_Trasnfer.ipynb1396
105 files changed, 37125 insertions, 0 deletions
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_kN6Dpid.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_kN6Dpid.ipynb
new file mode 100644
index 00000000..254b9907
--- /dev/null
+++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_kN6Dpid.ipynb
@@ -0,0 +1,247 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 10: Vibrations in Bars"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1, Page number 348"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fundamental frequency of longitudinal vibrations is 1780.0 Hz\n",
+ "fundamental frequency of transverse vibrations is 31.691 Hz\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=1; #bar length(m)\n",
+ "R=0.01/2; #radius(m)\n",
+ "V=3560; #wave velocity(m/sec)\n",
+ "x=3.0112; \n",
+ "\n",
+ "#Calculation\n",
+ "k=R/2; #geometric radius(m)\n",
+ "fL=V/(2*l); #fundamental frequency of longitudinal vibrations(Hz)\n",
+ "fT=math.pi*V*k*x**2/(8*(l**2)); #fundamental frequency of transverse vibrations(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"fundamental frequency of longitudinal vibrations is\",fL,\"Hz\"\n",
+ "print \"fundamental frequency of transverse vibrations is\",round(fT,3),\"Hz\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2, Page number 348"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "youngs modulus is 1.96 *10**11 N/m**2\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "C=5050; #sound velocity(m/sec)\n",
+ "rho=7700; #steel density(kg/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "Y=C**2*rho; #youngs modulus(N/m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"youngs modulus is\",round(Y/10**11,2),\"*10**11 N/m**2\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3, Page number 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fundamental frequency of transverse vibrations is 25.35 Hz\n",
+ "first overtone of transverse vibrations is 69.9 Hz\n",
+ "answer for first overtone in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=1; #bar length(m)\n",
+ "R=0.004; #radius(m)\n",
+ "C=3560; #wave velocity(m/sec)\n",
+ "x=3.0112; \n",
+ "\n",
+ "#Calculation\n",
+ "k=R/2; #geometric radius(m)\n",
+ "f1=math.pi*C*k*x**2/(8*(l**2)); #fundamental frequency of transverse mode of vibration(Hz)\n",
+ "f2=math.pi*C*k*5**2/(8*(l**2)); #first overtone of transverse mode of vibration(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"fundamental frequency of transverse vibrations is\",round(f1,2),\"Hz\"\n",
+ "print \"first overtone of transverse vibrations is\",round(f2,1),\"Hz\"\n",
+ "print \"answer for first overtone in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4, Page number 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "value of a is 0.00195 m\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=0.2; #bar length(m)\n",
+ "C=4990; #wave velocity(m/sec)\n",
+ "x=3.0112; \n",
+ "f1=250; #frequency(Hz)\n",
+ "\n",
+ "#Calculation\n",
+ "a=f1*8*(l**2)*math.sqrt(12)/(math.pi*C*(x**2)); #value of a(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"value of a is\",round(a,5),\"m\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5, Page number 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "frequency is 0.155 MHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Y=21*10**10; #youngs modulus(N/m**2) \n",
+ "rho=8800; #nickel density(kg/m**3)\n",
+ "R=0.01; #radius(m)\n",
+ "\n",
+ "#Calculation\n",
+ "k=R/2; #geometric radius(m)\n",
+ "C=math.sqrt(Y/rho); #sound velocity(m/sec)\n",
+ "f=C/(2*math.pi*k); #frequency(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"frequency is\",round(f/10**6,3),\"MHz\""
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_tIlzIkR.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_tIlzIkR.ipynb
new file mode 100644
index 00000000..2722c8a0
--- /dev/null
+++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_tIlzIkR.ipynb
@@ -0,0 +1,403 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 11: Vibrations in Strings"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1, Page number 371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "amplitude is 10 cm\n",
+ "frequency is 1 Hz\n",
+ "wavelength is 200.0 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "#given Y=10sinmath.pi(0.01x-2t)\n",
+ "#by comparing with Y=Asin(kx-omegat) we get\n",
+ "A=10; #amplitude(cm)\n",
+ "omega=2*math.pi;\n",
+ "k=0.01*math.pi; #wavelength constant\n",
+ "\n",
+ "#Calculation\n",
+ "f=omega/(2*math.pi); #frequency(Hz)\n",
+ "lamda=2*math.pi/k; #wavelength(cm) \n",
+ "\n",
+ "#Result\n",
+ "print \"amplitude is\",A,\"cm\"\n",
+ "print \"frequency is\",int(f),\"Hz\"\n",
+ "print \"wavelength is\",lamda,\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2, Page number 371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "along negative axis displacement y= 0.01 sin( 10 *math.pi/3 x + 1100 t)\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "f=550; #frequency(Hz)\n",
+ "A=0.01; #amplitude(cm)\n",
+ "v=330; #wave velocity(m/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "omega=2*math.pi*f; #angular frequency\n",
+ "k=omega/v; #wavelength constant\n",
+ "#along negative axis displacement y=Asin(kx+omegat) substitute the values\n",
+ "\n",
+ "#Result\n",
+ "print \"along negative axis displacement y=\",A,\"sin(\",int(k*3/math.pi),\"*math.pi/3 x +\",int(omega/math.pi),\"t)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3, Page number 371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wave velocity is 40.82 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=2; #length(m)\n",
+ "m=0.6; #mass(kg)\n",
+ "T=500; #tension(N)\n",
+ "\n",
+ "#Calculation\n",
+ "mew=m/l; #linear density(kg/m)\n",
+ "v=math.sqrt(T/mew); #wave velocity(m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"wave velocity is\",round(v,2),\"m/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4, Page number 372"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "amplitude is 1.028 units\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "x=10; #stationary wave point\n",
+ "t=1; #assume\n",
+ "y1=5*math.sin(((2*math.pi*t)-(2*x))*math.pi/180); #transverse wave\n",
+ "y2=5*math.sin(((2*math.pi*t)+(2*x))*math.pi/180); #transverse wave\n",
+ "\n",
+ "#Calculation\n",
+ "y=y1+y2; #amplitude(units)\n",
+ "\n",
+ "#Result\n",
+ "print \"amplitude is\",round(y,3),\"units\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5, Page number 372"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "string linear density is 0.0249 kg/m\n",
+ "wave velocity is 633.56 m/s\n",
+ "fundamental frequency is 316.78 Hz\n",
+ "frequency of 1st overtone is 633.56 Hz\n",
+ "frequency of 2nd overtone is 950.34 Hz\n",
+ "fundamental wavelength is 2 m\n",
+ "1st overtone wavelength is 1 m\n",
+ "2nd overtone wavelength is 0.667 m\n",
+ "answers in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=1*10**-3; #string radius(m)\n",
+ "l=1; #length(m)\n",
+ "rho=7930; #density(kg/m**3)\n",
+ "T=10**4; #tension(N)\n",
+ "\n",
+ "#Calculation\n",
+ "mew=math.pi*r**2*rho/l; #string linear density(kg/m)\n",
+ "v=math.sqrt(T/mew); #wave velocity(m/s)\n",
+ "f1=v/(2*l); #fundamental frequency(Hz)\n",
+ "f2=2*f1; #frequency of 1st overtone(Hz)\n",
+ "f3=3*f1; #frequency of 2nd overtone(Hz)\n",
+ "lamda1=2*l/1; #fundamental wavelength(m)\n",
+ "lamda2=2*l/2; #1st overtone wavelength(m)\n",
+ "lamda3=2*l/3; #2nd overtone wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"string linear density is\",round(mew,4),\"kg/m\"\n",
+ "print \"wave velocity is\",round(v,2),\"m/s\"\n",
+ "print \"fundamental frequency is\",round(f1,2),\"Hz\"\n",
+ "print \"frequency of 1st overtone is\",round(f2,2),\"Hz\"\n",
+ "print \"frequency of 2nd overtone is\",round(f3,2),\"Hz\"\n",
+ "print \"fundamental wavelength is\",int(lamda1),\"m\"\n",
+ "print \"1st overtone wavelength is\",int(lamda2),\"m\"\n",
+ "print \"2nd overtone wavelength is\",round(lamda3,3),\"m\"\n",
+ "print \"answers in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 6, Page number 373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "power is 19.74 watts\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew=0.1; #string linear density(kg/m)\n",
+ "A=0.1; #amplitude(m)\n",
+ "f=10; #frequency(Hz)\n",
+ "T=10; #tension(N)\n",
+ "\n",
+ "#Calculation\n",
+ "v=math.sqrt(T/mew); #wave velocity(m/s)\n",
+ "P=2*math.pi**2*f**2*A**2*v*mew; #power(watt)\n",
+ "\n",
+ "#Result\n",
+ "print \"power is\",round(P,2),\"watts\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 7, Page number 373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "tension in string is 524.29 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "f=500; #frequency(Hz)\n",
+ "T=500; #tension(N)\n",
+ "f1=512; #required frequency(Hz)\n",
+ "\n",
+ "#Calculation\n",
+ "T1=T*f1**2/f**2; #tension in string(N)\n",
+ "\n",
+ "#Result\n",
+ "print \"tension in string is\",round(T1,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 8, Page number 374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "amplitude at x=5 is 4.0\n",
+ "first node position is 0.0 m\n",
+ "second node position is 30.0 m\n",
+ "third node position is 60.0 m\n",
+ "wavelength is 60.0 m\n",
+ "component transverse wave equations are y1= 4.0 sin math.pi((x/30)-(48*t))\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "#given Y=8sin(math.pi*x/30)cos(48*math.pi*t)\n",
+ "#by comparing with Y=2Asin(kx)cos(omegat) we get\n",
+ "A=8/2; #amplitude(cm)\n",
+ "omega=48*math.pi;\n",
+ "x=5; #stationary wave point\n",
+ "k=math.pi/30; #wavelength constant\n",
+ "y1=0;\n",
+ "y2=math.pi;\n",
+ "y3=2*math.pi;\n",
+ "\n",
+ "#Calculation\n",
+ "y=2*A*math.sin(math.pi*x/30); #amplitude at x=5\n",
+ "x1=y1*30/math.pi; #first node position(m) \n",
+ "x2=y2*30/math.pi; #second node position(m) \n",
+ "x3=y3*30/math.pi; #third node position(m) \n",
+ "lamda=2*(x3-x2); #wavelength(m) \n",
+ "\n",
+ "#Result\n",
+ "print \"amplitude at x=5 is\",y\n",
+ "print \"first node position is\",x1,\"m\"\n",
+ "print \"second node position is\",x2,\"m\"\n",
+ "print \"third node position is\",x3,\"m\"\n",
+ "print \"wavelength is\",lamda,\"m\"\n",
+ "print \"component transverse wave equations are y1=\",A,\"sin math.pi((x/30)-(48*t))\""
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_PgrcCS3.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_PgrcCS3.ipynb
new file mode 100644
index 00000000..a30f5154
--- /dev/null
+++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_PgrcCS3.ipynb
@@ -0,0 +1,194 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 12: Ultrasonics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1, Page number 394"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fundamental frequency is 958.33 KHz\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=5750; #velocity(m/s)\n",
+ "t=3*10**-3; #thickness(m)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=2*t; #wavelength(m)\n",
+ "f=v/lamda; #fundamental frequency(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"fundamental frequency is\",round(f/10**3,2),\"KHz\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2, Page number 394"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "natural frequency is 1365.0 KHz\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Y=7.9*10**10; #youngs modulus(N/m**2)\n",
+ "rho=2650; #density(Kg/m**3)\n",
+ "t=2*10**-3; #thickness(m)\n",
+ "\n",
+ "#Calculation\n",
+ "v=math.sqrt(Y/rho); #velocity(m/s)\n",
+ "lamda=2*t; #wavelength(m)\n",
+ "f=v/lamda; #natural frequency(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"natural frequency is\",round(f/10**3),\"KHz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3, Page number 395"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "pressure wave amplitude is 13.04 N/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho0=1.21; #air density(kg/m**3)\n",
+ "C=343; #sound velocity(m/sec)\n",
+ "f=500; #frequency(Hz)\n",
+ "A=10**-5; #displacement amplitude(m)\n",
+ "\n",
+ "#Calculation\n",
+ "omega=2*math.pi*f; #angular frequency(Hz)\n",
+ "Pe=rho0*C*omega*A; #pressure wave amplitude(N/m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"pressure wave amplitude is\",round(Pe,2),\"N/m**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4, Page number 395"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of pressure amplitudes is 58.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Z1=1.43*10**6; #value of constant in water(Rayls)\n",
+ "Z2=425.7; #value of constant in air(Rayls)\n",
+ "\n",
+ "#Calculation\n",
+ "Pe1byPe2=math.sqrt(Z1/Z2); #ratio of pressure amplitudes\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of pressure amplitudes is\",round(Pe1byPe2)"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_eLqBEle.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_eLqBEle.ipynb
new file mode 100644
index 00000000..f7586865
--- /dev/null
+++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_eLqBEle.ipynb
@@ -0,0 +1,164 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 1: Vector Analysis"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 13, Page number 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "divergence of force vector is 3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from scipy.integrate import tplquad\n",
+ "\n",
+ "#Calculation\n",
+ "func = lambda x,y,z: 2*(x+y+z)\n",
+ "x1,x2 = 0,1\n",
+ "y1,y2 = lambda x: 0, lambda x: 1\n",
+ "z1,z2 = lambda x,y: 0, lambda x,y: 1\n",
+ "r1,r2=tplquad(func,x1,x2,y1,y2,z1,z2) \n",
+ "r=r1-r2; #divergence of force vector\n",
+ "\n",
+ "#Result\n",
+ "print \"divergence of force vector is\",int(round(r))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 16, Page number 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the result is 59 /60\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from scipy.integrate import quad\n",
+ "\n",
+ "#Calculation\n",
+ "def zintg(x):\n",
+ " return x**3\n",
+ "r1=quad(zintg,0,1)[0]\n",
+ "def zintg(x):\n",
+ " return 2*x**4\n",
+ "r2=quad(zintg,0,1)[0]\n",
+ "def zintg(x):\n",
+ " return 3*x**8\n",
+ "r3=quad(zintg,0,1)[0]\n",
+ "r=r1+r2+r3; #result\n",
+ "\n",
+ "#Result\n",
+ "print \"the result is\",int(r*60),\"/60\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 17, Page number 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the result is 2 /3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from scipy.integrate import quad\n",
+ "from fractions import Fraction\n",
+ "\n",
+ "#Calculation\n",
+ "def zintg(x):\n",
+ " return (x-(x**2))\n",
+ "r1=quad(zintg,0,1)[0]\n",
+ "def zintg(x):\n",
+ " return 2*((x**2)+(x**3))\n",
+ "r2=quad(zintg,0,1)[0]\n",
+ "def zintg(y):\n",
+ " return 2*((y**3)-(y**2))\n",
+ "r3=quad(zintg,1,0)[0]\n",
+ "def zintg(y):\n",
+ " return (y**2)+y\n",
+ "r4=quad(zintg,1,0)[0]\n",
+ "r=r1+r2+r3+r4; #result\n",
+ "\n",
+ "#Result\n",
+ "print \"the result is\",int(r*3),\"/3\""
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_F25WLJ6.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_F25WLJ6.ipynb
new file mode 100644
index 00000000..68990ae4
--- /dev/null
+++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_F25WLJ6.ipynb
@@ -0,0 +1,532 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 2: Mechanics of Particles"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1, Page number 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "momentum of electron is 5.37 *10**-19 gm cm/sec\n",
+ "velocity of truck in 1st case is 12 m/sec\n",
+ "velocity of truck in 2nd case is 18.97 m/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=9*10**-28; #mass(gram)\n",
+ "E=100; #kinetic energy(eV)\n",
+ "e=1.6*10**-12; #kinetic energy(erg)\n",
+ "mc=4000; #mass of car(kg)\n",
+ "mt=10000; #mass of truck(kg)\n",
+ "vc=30; #speed of car(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "P=math.sqrt(E*e*2*m); #momentum of electron(gm cm/sec)\n",
+ "vt=mc*vc/mt; #velocity of truck in 1st case(m/sec)\n",
+ "v1=math.sqrt(mc*vc**2/mt); #velocity of truck in 2nd case(m/sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"momentum of electron is\",round(P*10**19,2),\"*10**-19 gm cm/sec\"\n",
+ "print \"velocity of truck in 1st case is\",int(vt),\"m/sec\"\n",
+ "print \"velocity of truck in 2nd case is\",round(v1,2),\"m/sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2, Page number 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnitude of velocity is 10 *math.sqrt(2) m/sec\n",
+ "direction of velocity is 135 degrees or 225 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=30; #speed(m/sec)\n",
+ "P1=30; #momentum of 1st part(i)\n",
+ "P2=30; #momentum of 2nd part(j)\n",
+ "P3=3; #momentum of 3rd part(v)\n",
+ "\n",
+ "#Calculation\n",
+ "#from conservation of momentum, 30i+30j+3v=0. from which we get v=-10(i+j)\n",
+ "i=1; #coordinate of i\n",
+ "j=1; #coordinate of j\n",
+ "m=math.sqrt(i**2+j**2); #magnitude\n",
+ "mv=10*m; #magnitude of velocity(m/sec)\n",
+ "vbar=math.acos(-10/mv); #direction of velocity(rad) \n",
+ "vbar1=int(vbar*180/math.pi); #direction of velocity(degrees)\n",
+ "vbar2=360-vbar1; #direction of velocity(degrees) \n",
+ "\n",
+ "#Result\n",
+ "print \"magnitude of velocity is\",int(mv/math.sqrt(2)),\"*math.sqrt(2) m/sec\"\n",
+ "print \"direction of velocity is\",vbar1,\"degrees or\",vbar2,\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3, Page number 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of mass of fuel to empty rocket is 1095\n",
+ "answer given in the book is wrong\n",
+ "time is 9.99 sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "v0=0; #initial velocity of rocket\n",
+ "vr=1.6; #velocity of gases(km/sec)\n",
+ "v=11.2; #final velocity(km/sec)\n",
+ "alphabyM0=1/10; #fuel burnt rate\n",
+ "\n",
+ "#Calculation\n",
+ "#assume x=log(M0/M)\n",
+ "x=(v-v0)/vr; \n",
+ "M0byM=math.exp(x); \n",
+ "MfbyMe=M0byM-1; #ratio of mass of fuel to empty rocket\n",
+ "t=(1-(1/M0byM))*(1/alphabyM0); #time(sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of mass of fuel to empty rocket is\",int(MfbyMe)\n",
+ "print \"answer given in the book is wrong\"\n",
+ "print \"time is\",round(t,2),\"sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4, Page number 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "final velocity of rocket is 7.82 km/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m1=300; #mass in 1st stage(kg)\n",
+ "m2=30; #mass in 2nd stage(kg)\n",
+ "m3=2400; #fuel filled(kg)\n",
+ "m4=270; #fuel filled(kg)\n",
+ "u=2; #velocity(km/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "M0=m1+m2+m3+m4; #mass(kg)\n",
+ "M=m1+m2+m4; #mass(kg)\n",
+ "v0=u*math.log(M0/M); #initial velocity of rocket to the second stage(km/sec)\n",
+ "M01=m2+m4; #mass(kg)\n",
+ "V=v0+(u*math.log(M01/m2)); #final velocity of rocket(km/sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"final velocity of rocket is\",round(V,2),\"km/sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5, Page number 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "final velocity of rocket is 2.8 km/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mr=40; #mass of rocket(kg)\n",
+ "mf=360; #mass of fuel(kg)\n",
+ "g=9.8; #acceleration due to gravity(kg/m**2)\n",
+ "v=2*10**3; #exhaust velocity(m/sec)\n",
+ "v0=0; #velocity(m/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "M=mr+mf; #mass(kg)\n",
+ "dmbydt=M*g/v; #thrust(kg/sec)\n",
+ "t=mf/dmbydt; #time taken(sec)\n",
+ "Vmax=v0+(v*math.log(M/mr))-(g*t); #final velocity of rocket(m/sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"final velocity of rocket is\",round(Vmax/10**3,1),\"km/sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 6, Page number 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "thrust on rocket is 98 kg/sec\n",
+ "thrust on rocket to give acceleration is 398 kg/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "g=9.8; #acceleration due to gravity(kg/m**2)\n",
+ "vr=800; #exhaust velocity(m/sec)\n",
+ "M=8000; #mass(kg)\n",
+ "a=30; #acceleration(m/s**2)\n",
+ "\n",
+ "#Calculation\n",
+ "dMbydt=M*g/vr; #thrust on rocket(kg/sec)\n",
+ "dMbydt1=M*(g+a)/vr; #thrust on rocket to give acceleration(kg/sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"thrust on rocket is\",int(dMbydt),\"kg/sec\"\n",
+ "print \"thrust on rocket to give acceleration is\",int(dMbydt1),\"kg/sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 8, Page number 81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "thrust acting on rocket is 200 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "urel=10000; #exhaust velocity(m/s)\n",
+ "dMbydt=0.02; #rate of fuel burnt(kg/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "Freaction=urel*dMbydt; #thrust acting on rocket(N)\n",
+ "\n",
+ "#Result\n",
+ "print \"thrust acting on rocket is\",int(Freaction),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 9, Page number 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "final velocity of rocket is 4.4 km/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=5000; #mass of rocket(kg)\n",
+ "mf=40000; #mass of fuel(kg)\n",
+ "urel=2*10**3; #exhaust velocity(m/sec)\n",
+ "v0=0; \n",
+ "\n",
+ "#Calculation\n",
+ "M0=M+mf; #mass(kg)\n",
+ "V=v0+(urel*math.log(M0/M)); #maximum velocity of rocket(m/sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"final velocity of rocket is\",round(V/10**3,1),\"km/sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 10, Page number 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "recoil velocity of nucleus is 0.27 *10**5 m/s\n",
+ "direction of momentum of nucleus is 150.0 degrees\n",
+ "kinetic energy is 0.145 *10**-15 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "P1=9.22*10**-21; #momentum(kgm/s)\n",
+ "P2=5.33*10**-21; #momentum(kgm/s)\n",
+ "m=3.9*10**-25; #mass of nucleus(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "P=math.sqrt(P1**2+P2**2); #momentum(kgm/s)\n",
+ "V=P/m; #recoil velocity of nucleus(m/s)\n",
+ "theta=math.atan(P2/P1); #direction of momentum of nucleus(rad)\n",
+ "theta=180-(theta*180/math.pi); #direction of momentum of nucleus(degrees) \n",
+ "K=P**2/(2*m); #kinetic energy(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"recoil velocity of nucleus is\",round(V/10**5,2),\"*10**5 m/s\"\n",
+ "print \"direction of momentum of nucleus is\",round(theta),\"degrees\"\n",
+ "print \"kinetic energy is\",round(K*10**15,3),\"*10**-15 J\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 13, Page number 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "recoil velocity of residual is -2.564 *10**5 m/s\n",
+ "kinetic energy of residual is 0.068 MeV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "malpha=4; #kinetic energy of alpha particle(MeV)\n",
+ "mth=234; #mass of thorium(kg)\n",
+ "valpha=1.5*10**7; #velocity(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "vth=-malpha*valpha/mth; #recoil velocity of residual(m/s)\n",
+ "Kalpha=malpha; #kinetic energy of alpha(MeV)\n",
+ "Kth=malpha*Kalpha/mth; #kinetic energy of residual(MeV)\n",
+ "\n",
+ "#Result\n",
+ "print \"recoil velocity of residual is\",round(vth/10**5,3),\"*10**5 m/s\"\n",
+ "print \"kinetic energy of residual is\",round(Kth,3),\"MeV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 14, Page number 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity before collision is 5.196\n",
+ "velocity after collision is 5.196\n",
+ "kinetic energy before collision is 40.5*m\n",
+ "kinetic energy before collision is 27.0*m\n",
+ "energy is not conserved\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import Symbol\n",
+ "\n",
+ "#Variable declaration\n",
+ "u1=9; #velocity(m/sec)\n",
+ "theta=30*math.pi/180; #scattering angle(rad)\n",
+ "u2=0; #velocity(m/sec)\n",
+ "m=Symbol(\"m\");\n",
+ "\n",
+ "#Calculation\n",
+ "v1plusv2=u1/math.cos(theta); \n",
+ "v1minusv2=u2/math.cos(180-theta); \n",
+ "v1=(v1plusv2+v1minusv2)/2; #velocity before collision\n",
+ "v2=(v1plusv2-v1minusv2)/2; #velocity after collisiovelocity after collision isn,v2\n",
+ "KE1=(m*(u1**2/2))+(m*(u2**2/2)); #kinetic energy before collision\n",
+ "KE2=((m*v1**2)/2)+((m*v2**2)/2); #kinetic energy before collision\n",
+ "\n",
+ "#Result\n",
+ "print \"velocity before collision is\",round(v1,3)\n",
+ "print \"velocity after collision is\",round(v2,3)\n",
+ "print \"kinetic energy before collision is\",KE1\n",
+ "print \"kinetic energy before collision is\",KE2\n",
+ "print \"energy is not conserved\""
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_Eijvt7y.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_Eijvt7y.ipynb
new file mode 100644
index 00000000..37d67888
--- /dev/null
+++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_Eijvt7y.ipynb
@@ -0,0 +1,425 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 3: Rigid Body Dynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1, Page number 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "moment of inertia through centre is 5 kg m**2\n",
+ "moment of inertia through length of rod is 10 kg m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ma=mb=10; #mass(kg)\n",
+ "ra1=rb1=0.5; #radius(m)\n",
+ "ra2=1; #radius(m)\n",
+ "rb2=0; #radius(m)\n",
+ " \n",
+ "#Calculation\n",
+ "I0=(ma*ra1**2)+(mb*rb1**2); #moment of inertia through centre(kg m**2)\n",
+ "IA=IB=(ma*ra2**2)+(mb*rb2**2); #moment of inertia through length of rod(kg m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"moment of inertia through centre is\",int(I0),\"kg m**2\"\n",
+ "print \"moment of inertia through length of rod is\",IA,\"kg m**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3, Page number 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "final angular velocity is 3 rev/sec\n",
+ "increase in kinetic energy 237.0 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I0=6; #initial moment of inertia(Kg m**2)\n",
+ "omega0=1; #initial angular velocity(rev/sec)\n",
+ "I=2; #final moment of inertia(Kg m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "omega=I0*omega0/I; #final angular velocity(rev/sec)\n",
+ "K0=I0*(omega0*2*math.pi)**2/2; #initial kinetic energy(J)\n",
+ "K=I*(omega*2*math.pi)**2/2; #final kinetic energy(J)\n",
+ "deltaK=K-K0; #increase in kinetic energy(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"final angular velocity is\",int(omega),\"rev/sec\"\n",
+ "print \"increase in kinetic energy\",round(deltaK),\"J\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4, Page number 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "precessional angular velocity is 2 rad/sec in clockwise direction\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I=5*10**-4; #moment of inertia(Kg m**2)\n",
+ "omega=30*2*math.pi; #angular velocity(rad/sec)\n",
+ "m=0.5; #mass(Kg) \n",
+ "g=9.8; #acceleration due to gravity(m/sec**2)\n",
+ "r=0.04; #radius(m)\n",
+ "\n",
+ "#Calculation\n",
+ "J=I*omega; #angular momentum(Kg m**2/sec)\n",
+ "tow=m*g*r; #torque(Nm)\n",
+ "omegap=tow/J; #precessional angular velocity(rad/sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"precessional angular velocity is\",int(omegap),\"rad/sec in clockwise direction\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5, Page number 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "common speed is 250 revolutions/min\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I1=I2=1; #assume\n",
+ "omega1=500; #angular velocity(rev/min)\n",
+ "omega2=0; #angular velocity(rev/min)\n",
+ "\n",
+ "#Calculation\n",
+ "omega=((I1*omega1)+(I2*omega2))/(I1+I2); #common speed(revolutions/minute)\n",
+ "\n",
+ "#Result\n",
+ "print \"common speed is\",int(omega),\"revolutions/min\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 6, Page number 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "precessional angular velocity is 12.19 rad/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=50; #mass of sphere(g)\n",
+ "g=980; #acceleration due to gravity(gm/sec**2)\n",
+ "r=0.02; #radius(m)\n",
+ "l=0.005; #length(m)\n",
+ "n=20; #number of revolutions\n",
+ "\n",
+ "#Calculation\n",
+ "I=2*M*r**2/5; #moment of inertia of sphere(kg m**2)\n",
+ "L=r+l; #distance from pivot(m)\n",
+ "omega=n*2*math.pi; #angular velocity(rad/sec)\n",
+ "omegap=M*g*L*100/(I*10**4*omega); #precessional angular velocity(rad/sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"precessional angular velocity is\",round(omegap,2),\"rad/sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 7, Page number 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "moment of inertia of ring is 1 *10**4 gram cm**2\n",
+ "angular momentum is 6.28 *10**5 erg sec\n",
+ "torque is 1 *10**4 dyne cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=100; #mass(gm)\n",
+ "R=10; #radius(cm)\n",
+ "omega=10*2*math.pi; #angular velocity(rad/sec)\n",
+ "t=10; #time(sec)\n",
+ "\n",
+ "#Calculation\n",
+ "I=M*R**2; #moment of inertia of ring(gram cm**2)\n",
+ "L=I*omega; #angular momentum(erg sec)\n",
+ "tow=L/(2*math.pi*t); #torque(dyne cm)\n",
+ "\n",
+ "#Result\n",
+ "print \"moment of inertia of ring is\",int(I/10**4),\"*10**4 gram cm**2\"\n",
+ "print \"angular momentum is\",round(L/10**5,2),\"*10**5 erg sec\"\n",
+ "print \"torque is\",int(tow/10**4),\"*10**4 dyne cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 8, Page number 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "precessional angular velocity is 1.2 radians/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "g=980; #acceleration due to gravity(gm/sec**2)\n",
+ "r=5; #radius(cm)\n",
+ "k=6; #radius of gyration(cm)\n",
+ "omega=2*math.pi*18; #angular velocity(revolutions/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "omegap=g*r/(k**2*omega); #precessional angular velocity(radians/sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"precessional angular velocity is\",round(omegap,1),\"radians/sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 13, Page number 128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "torque acting on it is ( 9.6 i -7.2 j+ 0.0 k)*10**-4 Nm\n",
+ "rate of change of kinetic energy is 0\n",
+ "hence kinetic energy is constant\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=0.1; #mass(kg)\n",
+ "R=0.04; #radius(m)\n",
+ "#omega=3i+4j+6k\n",
+ "omegax=3; #angular velocity(rad/s)\n",
+ "omegay=4; #angular velocity(rad/s)\n",
+ "omegaz=6; #angular velocity(rad/s)\n",
+ "domegaxbydt=domegaybydt=domegazbydt=0;\n",
+ "\n",
+ "#Calculation\n",
+ "Ixx=M*R**2/4; #principal inertia element(kg m**2)\n",
+ "Iyy=M*R**2/4; #principal inertia element(kg m**2)\n",
+ "Izz=M*R**2/2; #principal inertia element(kg m**2)\n",
+ "towx=(omegax*domegaxbydt)+(omegay*omegaz*(Izz-Iyy)); #torque on x(Nm)\n",
+ "towy=(omegay*domegaybydt)+(omegaz*omegax*(Ixx-Izz)); #torque on y(Nm)\n",
+ "towz=(omegaz*domegazbydt)+(omegax*omegay*(Iyy-Ixx)); #torque on x(Nm)\n",
+ "dTbydt=(omegax*towx)+(omegay*towy)+(omegaz*towz); #rate of change of kinetic energy\n",
+ "\n",
+ "#Result\n",
+ "print \"torque acting on it is (\",towx*10**4,\"i\",towy*10**4,\"j+\",towz,\"k)*10**-4 Nm\"\n",
+ "print \"rate of change of kinetic energy is\",int(dTbydt)\n",
+ "print \"hence kinetic energy is constant\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 14, Page number 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "precessional angular velocity is 40 *math.pi rad/sec or 20 revolutions/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=1; #assume\n",
+ "R=1; #assume\n",
+ "omega=20*2*math.pi; #angular velocity(rad/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "Ixx=Iyy=M*R**2/4; #moment of inertia about diametrical axis\n",
+ "Izz=M*R**2/2; #moment of inertia about axis normal to plane\n",
+ "omegap=(Izz-Ixx)*omega/Ixx; #precessional angular velocity(radians/sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"precessional angular velocity is\",int(omegap/math.pi),\"*math.pi rad/sec or\",int(omegap/(2*math.pi)),\"revolutions/sec\""
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_rlhSgIB.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_rlhSgIB.ipynb
new file mode 100644
index 00000000..d7a5d585
--- /dev/null
+++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_rlhSgIB.ipynb
@@ -0,0 +1,446 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 4: Mechanics of Continuous Media"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1, Page number 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "youngs modulus is 4.7 *10**12 N/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "F=1200*9.8; #tensile force(N)\n",
+ "A=0.025*10**-4; #area(m**2)\n",
+ "delta_l=0.003; #extension(m)\n",
+ "l=3; #length(m)\n",
+ "\n",
+ "#Calculation\n",
+ "Y=F*l/(A*delta_l); #youngs modulus(N/m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"youngs modulus is\",round(Y/10**12,1),\"*10**12 N/m**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2, Page number 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "volume occupied at 25atm is 3499 cm**3\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "v=3500; #volume(cm**3)\n",
+ "K=10*10**11; #bulk modulus(dyne/cm**2)\n",
+ "p=24*76*13.6*980; #change in pressure(dyne/cm**2)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_v=p*v/K; #volume occupied(cm**3)\n",
+ "V=v-delta_v; #volume occupied at 25atm(cm**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"volume occupied at 25atm is\",int(V),\"cm**3\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3, Page number 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "poissons ratio is 0.25\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "eta=1; #assume\n",
+ "Y=2.5*eta; #youngs modulus\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=Y/(2*eta)-1; #poissons ratio\n",
+ "\n",
+ "#Result\n",
+ "print \"poissons ratio is\",sigma"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4, Page number 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "bulk modulus is 1 *10**11 N/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=0.1; #side of cube(m)\n",
+ "p=10**6; #static pressure(pa)\n",
+ "delta_v=10**-8; #change in volume(m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "v=l**3; #volume of cube(m**3)\n",
+ "K=p*v/delta_v; #bulk modulus(N/m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"bulk modulus is\",int(K/10**11),\"*10**11 N/m**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5, Page number 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "poissons ratio is 0.25\n",
+ "bulk modulus is 1.33 *10**11 N/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Y=2*10**11; #youngs modulus(N/m**2)\n",
+ "eta=8*10**10; #rigidity modulus(N/m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=Y/(2*eta)-1; #poissons ratio\n",
+ "K=Y/(3*(1-2*sigma)); #bulk modulus(N/m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"poissons ratio is\",sigma\n",
+ "print \"bulk modulus is\",round(K/10**11,2),\"*10**11 N/m**2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 6, Page number 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "increase in temperature is 0.01653 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=2; #length(m)\n",
+ "A=2*10**-6; #area(m**2)\n",
+ "e=5*10**-3; #elongation(m)\n",
+ "rho=9000; #density(Kg/m**3)\n",
+ "C=4200; #specific heat(J/Kg/K)\n",
+ "F=1000; #force(N)\n",
+ "\n",
+ "#Calculation\n",
+ "v=l*A; #volume(m**3)\n",
+ "W=F*e*v/(2*A*l); #work done(J)\n",
+ "m=rho*v; #mass(kg)\n",
+ "delta_t=W/(m*C); #increase in temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"increase in temperature is\",round(delta_t,5),\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 7, Page number 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "potential energy is 1.125 J\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=3; #length(m)\n",
+ "A=2.5*10**-6; #area(m**2)\n",
+ "e=3*10**-3; #elongation(m)\n",
+ "F=750; #force(N)\n",
+ "\n",
+ "#Calculation\n",
+ "v=l*A; #volume(m**3)\n",
+ "E=F*e*v/(2*A*l); #potential energy(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"potential energy is\",E,\"J\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 8, Page number 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "depression of the rod from fixed end is 0.00648 m\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "L=0.5; #length(m)\n",
+ "x=0.5; #depression(m)\n",
+ "y=15*10**-3; #depression(m)\n",
+ "x1=0.3; #depression(m)\n",
+ "\n",
+ "#Calculation\n",
+ "A=(L*x**2/2)-(x**3/6); \n",
+ "y1=y*((L*x1**2/2)-(x1**3/6))/A; #depression of the rod from fixed end(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"depression of the rod from fixed end is\",y1,\"m\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 9, Page number 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "deformation strain is 0.24\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=0.4; #radius(cm)\n",
+ "l=100; #length(cm)\n",
+ "phi=60; #twisting angle(degree)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=r*phi/l #deformation strain\n",
+ "\n",
+ "#Result\n",
+ "print \"deformation strain is\",theta"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 10, Page number 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "depression at the mid point is 8.124 *10**-5 m\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=0.1; #mass(kg)\n",
+ "g=9.8; #acceleration due to gravity(m/sec**2)\n",
+ "L=1; #length(m)\n",
+ "Y=10**10; #youngs modulus(N/m**2)\n",
+ "r=0.02; #radius of wire(m)\n",
+ "\n",
+ "#Calculation\n",
+ "y1=5*m*g*L**3/(12*Y*math.pi*r**4); #depression at the mid point(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"depression at the mid point is\",round(y1*10**5,3),\"*10**-5 m\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_YQ3b0EW.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_YQ3b0EW.ipynb
new file mode 100644
index 00000000..3b038d09
--- /dev/null
+++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_YQ3b0EW.ipynb
@@ -0,0 +1,664 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 5: Central Forces"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4, Page number 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "gravitational energy is 1.6675 *10**-10 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m1=m2=0.5; #mass(kg)\n",
+ "r2=0.1; #distance(m)\n",
+ "r1=float(\"inf\"); #distance(m)\n",
+ "G=6.67*10**-11; #gravitational constant\n",
+ "\n",
+ "#Calculation\n",
+ "delta_U=G*m1*m2*((1/r2)-(1/r1)); #gravitational energy(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"gravitational energy is\",delta_U*10**10,\"*10**-10 J\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5, Page number 201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "net energy is -146.74 *10**-11 J\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m1=1; #mass(kg)\n",
+ "m2=2; #mass(kg)\n",
+ "m3=3; #mass(kg)\n",
+ "a=0.5; #side(m)\n",
+ "G=6.67*10**-11; #gravitational constant\n",
+ "\n",
+ "#Calculation\n",
+ "delta_U=-G*((m1*m2)+(m2*m3)+(m3*m1))/a; #net energy(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"net energy is\",round(delta_U*10**11,2),\"*10**-11 J\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 8, Page number 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "distance where potential becomes zero is 3.6 *10**8 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=4*10**8; #distance(m)\n",
+ "M1=6*10**24; #mass of earth(kg)\n",
+ "M2=7.5*10**22; #mass of moon(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "x=r/(1+math.sqrt(M2/M1)); #distance where potential becomes zero(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"distance where potential becomes zero is\",round(x/10**8,1),\"*10**8 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 10, Page number 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "initial velocity is 306.7 km/s\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "g=9.8; #acceleration due to gravity(m/s**2)\n",
+ "R=6.4*10**3; #radius(km)\n",
+ "\n",
+ "#Calculation\n",
+ "v=math.sqrt(3*g*R/2); #initial velocity(km/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"initial velocity is\",round(v,1),\"km/s\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 11, Page number 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity of particle is 5.77 *10**-14 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=10**-26; #mass(kg)\n",
+ "R=0.5*10**-10; #radius(m)\n",
+ "G=6.67*10**-11; #gravitational constant\n",
+ "\n",
+ "#Calculation\n",
+ "V=math.sqrt(G*m/(4*R)); #velocity of particle(m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"velocity of particle is\",round(V*10**14,2),\"*10**-14 m/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 13, Page number 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "gravitational potential is 6.67 *10**-10 J/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=1; #mass(kg)\n",
+ "r=0.1; #radius(m)\n",
+ "G=6.67*10**-11; #gravitational constant\n",
+ "\n",
+ "#Calculation\n",
+ "F=G*m/r**2; #force(N/kg)\n",
+ "U=F*r; #gravitational potential(J/kg)\n",
+ "\n",
+ "#Result\n",
+ "print \"gravitational potential is\",U*10**10,\"*10**-10 J/kg\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 15, Page number 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "eccentricity of orbit is 0.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rmax=1.2*10**12; #semi minor axis(m)\n",
+ "rmin=0.06*10**12; #semi major axis(m)\n",
+ "\n",
+ "#Calculation\n",
+ "e=(rmax-rmin)/(rmax+rmin); #eccentricity of orbit\n",
+ "\n",
+ "#Result\n",
+ "print \"eccentricity of orbit is\",round(e,1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 16, Page number 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum velocity is 525 km/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vmin=21; #minimum velocity(km/sec)\n",
+ "rmax=4*10**10; #apogee position(m)\n",
+ "rmin=1.6*10**9; #perigee position(m)\n",
+ "\n",
+ "#Calculation\n",
+ "Vmax=Vmin*rmax/rmin; #maximum velocity(km/sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum velocity is\",int(Vmax),\"km/sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 17, Page number 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "apogee position is 2.76 *10**10 m\n",
+ "velocity at apogee point is 32.57 km/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=0.05; #eccentricity of orbit\n",
+ "Vmin=36; #minimum velocity(km/sec)\n",
+ "rmin=2.5*10**10; #perigee position(m)\n",
+ "\n",
+ "#Calculation\n",
+ "rmax=rmin*((1+e)/(1-e)); #apogee position(m)\n",
+ "Vmax=Vmin*rmin/rmax; #velocity at apogee point(km/s) \n",
+ "\n",
+ "#Result\n",
+ "print \"apogee position is\",round(rmax/10**10,2),\"*10**10 m\"\n",
+ "print \"velocity at apogee point is\",round(Vmax,2),\"km/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 18, Page number 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "eccentricity of orbit is 0.0417\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vmin=23; #minimum velocity(km/sec)\n",
+ "Vmax=25; #velocity at apogee point(km/s) \n",
+ "\n",
+ "#Calculation\n",
+ "e=(Vmax-Vmin)/(Vmax+Vmin); #eccentricity of orbit\n",
+ "\n",
+ "#Result\n",
+ "print \"eccentricity of orbit is\",round(e,4)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 20, Page number 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mass of earth is 5.968 *10**24 kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=3.8*10**8; #radius(m)\n",
+ "T=27*24*3600; #time period(sec)\n",
+ "G=6.67*10**-11; #gravitational constant\n",
+ "\n",
+ "#Calculation\n",
+ "M=4*math.pi**2*r**3/(G*T**2); #mass of earth(kg)\n",
+ "\n",
+ "#Result\n",
+ "print \"mass of earth is\",round(M/10**24,3),\"*10**24 kg\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 21, Page number 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of semi major axis is 0.724\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=225; #time period of venus(days)\n",
+ "T2=365; #time period of earth(days)\n",
+ "\n",
+ "#Calculation\n",
+ "a1bya2=(T1/T2)**(2/3); #ratio of semi major axis\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of semi major axis is\",round(a1bya2,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 22, Page number 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time period of planet is 510 days\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a2=1; #assume\n",
+ "a1=1.25*a2; #axis of planet\n",
+ "T2=365; #time period of earth(days)\n",
+ "\n",
+ "#Calculation\n",
+ "T1=T2*math.sqrt((a1/a2)**3); #time period of planet(days)\n",
+ "\n",
+ "#Result\n",
+ "print \"time period of planet is\",int(T1),\"days\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 23, Page number 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "change in time period is 15.36 hours\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r1=1; #assume\n",
+ "r2=1-(40/100); #radius of earth\n",
+ "T1=24; #time period of earth(hours)\n",
+ "\n",
+ "#Calculation\n",
+ "T2=T1-(T1*((r2/r1)**2)); #change in time period(hours)\n",
+ "\n",
+ "#Result\n",
+ "print \"change in time period is\",T2,\"hours\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 24, Page number 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time interval to reach sun is 64.5 days\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=1; #assume\n",
+ "a1=R/2;\n",
+ "a=R;\n",
+ "T=365; #time period of earth(days)\n",
+ "\n",
+ "#Calculation\n",
+ "T1=T*math.sqrt((a1/a)**3)/2; #time interval to reach sun(days)\n",
+ "\n",
+ "#Result\n",
+ "print \"time interval to reach sun is\",round(T1,1),\"days\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 25, Page number 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mass of sun is 2 *10**30 kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=1.5*10**11; #radius(m)\n",
+ "T=86400*365; #time period(sec)\n",
+ "G=6.67*10**-11; #gravitational constant\n",
+ "\n",
+ "#Calculation\n",
+ "M=4*math.pi**2*R**3/(G*T**2); #mass of sun(kg)\n",
+ "\n",
+ "#Result\n",
+ "print \"mass of sun is\",int(M/10**30),\"*10**30 kg\""
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_raABo34.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_raABo34.ipynb
new file mode 100644
index 00000000..495cf888
--- /dev/null
+++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_raABo34.ipynb
@@ -0,0 +1,844 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 6: Special Theory of Relativity"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3, Page number 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fringe shift is 0.2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l=5; #length(m)\n",
+ "v=3*10**4; #velocity(m/sec)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "lamda=5000*10**-10; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "S=2*l*v**2/(c**2*lamda); #fringe shift\n",
+ "\n",
+ "#Result\n",
+ "print \"fringe shift is\",S"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4, Page number 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "coordinates w.r.t moving observer are (x1,y1,z1,t1)=( 800 100 100 0 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "x=1000; #x-coordinate(m)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "t=2*10**-6; #time(s)\n",
+ "v1=0.6*c;\n",
+ "y1=y=100; #y-coordinate(m)\n",
+ "z1=z=100; #z-coordinate(m)\n",
+ "\n",
+ "#Calculation\n",
+ "x1=(x-(v1*t))/math.sqrt(1-((v1/c)**2)); #coordinate along x-axis\n",
+ "t1=(t-(x*v1/c**2))/math.sqrt(1-((v1/c)**2)); #time\n",
+ "\n",
+ "#Result\n",
+ "print \"coordinates w.r.t moving observer are (x1,y1,z1,t1)=(\",int(x1),int(y1),int(z1),int(t1),\")\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5, Page number 236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "decay time is 3.83 micro s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_t=2.3; #time(micro s)\n",
+ "c=1; #assume\n",
+ "v=0.8*c; #velocity\n",
+ "\n",
+ "#Calculation\n",
+ "delta_t1=delta_t/math.sqrt(1-(v**2/c**2)); #decay time(micro s)\n",
+ "\n",
+ "#Result\n",
+ "print \"decay time is\",round(delta_t1,2),\"micro s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 6, Page number 236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "space shuttle velocity is 0.515 c\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_t=24; #time(hours)\n",
+ "delta_t1=28; #decay time(hours)\n",
+ "\n",
+ "#Calculation\n",
+ "v=math.sqrt(1-(delta_t/delta_t1)**2); #space shuttle velocity(c)\n",
+ "\n",
+ "#Result\n",
+ "print \"space shuttle velocity is\",round(v,3),\"c\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 7, Page number 236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "observed displacement is 375.0 m\n",
+ "relative displacement is 433.01 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_t=2.5*10**-6; #time(s)\n",
+ "c=3*10**8; #velocity of light\n",
+ "v=c/2; #velocity\n",
+ "\n",
+ "#Calculation\n",
+ "delta_t1=delta_t/math.sqrt(1-(v**2/c**2)); #decay time(s)\n",
+ "x=v*delta_t; #observed displacement(m)\n",
+ "x1=v*delta_t1; #relative displacement(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"observed displacement is\",x,\"m\"\n",
+ "print \"relative displacement is\",round(x1,2),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 8, Page number 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relative decay in earth diameter is 6.4 *10**-5 m\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=6400; #radius(km)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "v=30*10**3; #orbital velocity(m/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "d=2*R; #diameter(km)\n",
+ "d1=d*math.sqrt(1-(v**2/c**2)); \n",
+ "delta_d=d-d1; #relative decay in earth diameter(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"relative decay in earth diameter is\",round(delta_d*10**5,1),\"*10**-5 m\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 9, Page number 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity is 0.28 c\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "L=1; #length(m)\n",
+ "L1=0.96; #recorded length(m)\n",
+ "\n",
+ "#Calculation\n",
+ "v=math.sqrt(1-(L1/L)**2); #velocity(c)\n",
+ "\n",
+ "#Result\n",
+ "print \"velocity is\",v,\"c\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 10, Page number 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "change in area is 0.0063 sq m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=0.1; #radius(m)\n",
+ "c=1; #assume\n",
+ "v=0.6*c; #velocity\n",
+ "\n",
+ "#Calculation\n",
+ "A=math.pi*R**2; #area(sq m)\n",
+ "R1=R*math.sqrt(1-(v**2/c**2)); \n",
+ "A1=math.pi*R*R1; #plate area in ellipse shape(sq m) \n",
+ "deltaA=A-A1; #change in area(sq m)\n",
+ "\n",
+ "#Result\n",
+ "print \"change in area is\",round(deltaA,4),\"sq m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 11, Page number 238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "change in length is 28.0 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=1; #assume\n",
+ "v=0.8*c; #velocity\n",
+ "theta=30*math.pi/180; #angle(rad)\n",
+ "L=1; #length(m)\n",
+ "\n",
+ "#Calculation\n",
+ "Ix=L*math.cos(theta)*math.sqrt(1-(v**2/c**2));\n",
+ "Iy=L*math.sin(theta);\n",
+ "L1=math.sqrt((Ix**2)+(Iy**2)); #changed length(m)\n",
+ "delta_L=L-L1; #change in length(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"change in length is\",round(delta_L*100),\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 12, Page number 238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of bacteria grown is 16\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_t=10; #time(days)\n",
+ "c=1; #assume\n",
+ "v=0.99*c; #velocity\n",
+ "d=280; #number of days \n",
+ "\n",
+ "#Calculation\n",
+ "delta_t1=delta_t/math.sqrt(1-(v**2/c**2)); #decay time(days)\n",
+ "x=d/int(delta_t1); #number of folds\n",
+ "n=1*2**x; #number of bacteria grown \n",
+ "\n",
+ "#Result\n",
+ "print \"number of bacteria grown is\",int(n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 13, Page number 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relative velocity of B w.r.t A is 0.538 c\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=1; #assume\n",
+ "u1=c/3; #velocity\n",
+ "v=c/4; #velocity\n",
+ "\n",
+ "#Calculation\n",
+ "u=(u1+v)/(1+(u1*v/c**2)); #relative velocity of B w.r.t A(c)\n",
+ "\n",
+ "#Result\n",
+ "print \"relative velocity of B w.r.t A is\",round(u,3),\"c\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 14, Page number 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relative velocity is 0.9286 c\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=1; #assume\n",
+ "u1=0.8*c; #velocity\n",
+ "v=0.5*c; #velocity\n",
+ "\n",
+ "#Calculation\n",
+ "u=(u1+v)/(1+(u1*v/c**2)); #relative velocity(c)\n",
+ "\n",
+ "#Result\n",
+ "print \"relative velocity is\",round(u,4),\"c\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 16, Page number 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity is 0.866 c\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m0=1; #assume\n",
+ "m=2*m0;\n",
+ "\n",
+ "#Calculation\n",
+ "v=math.sqrt(1-(m0/m)**2); #velocity(c)\n",
+ "\n",
+ "#Result\n",
+ "print \"velocity is\",round(v,3),\"c\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 17, Page number 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity is 0.9428 c\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m0=1; #assume\n",
+ "m=3*m0;\n",
+ "\n",
+ "#Calculation\n",
+ "v=math.sqrt(1-(m0/m)**2); #velocity(c)\n",
+ "\n",
+ "#Result\n",
+ "print \"velocity is\",round(v,4),\"c\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 19, Page number 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "rest energy is 9 *10**17 J\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m0=10; #mass(kg)\n",
+ "c=3*10**8; #velocity of light(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "E=m0*c**2; #rest energy(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"rest energy is\",int(E/10**17),\"*10**17 J\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 20, Page number 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "kinetic energy is 0.1266 MeV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m0=9*10**-31; #mass of electron(g)\n",
+ "c=3*10**8; #velocity of light(m/sec) \n",
+ "v=0.6*c; #velocity of electron(m/sec)\n",
+ "e=1.6*10**-19; #conversion factor\n",
+ "\n",
+ "#Calculation\n",
+ "KE=m0*c**2*((1/math.sqrt(1-(v**2/c**2)))-1); #kinetic energy(J)\n",
+ "KE=KE/e; #kinetic energy(eV) \n",
+ "\n",
+ "#Result\n",
+ "print \"kinetic energy is\",round(KE/10**6,4),\"MeV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 21, Page number 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "loss in mass is 1.8667 *10**-13 kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=50; #mass(gm)\n",
+ "L=80*4.2; #latent heat(cal/gm)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "\n",
+ "#Calculation\n",
+ "Q=m*L; #heat loss(J)\n",
+ "delta_m=Q/c**2; #loss in mass(kg)\n",
+ "\n",
+ "#Result\n",
+ "print \"loss in mass is\",round(delta_m*10**13,4),\"*10**-13 kg\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 22, Page number 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 76,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "frequency of photon is 1.237 *10**20 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m0=9.1*10**-31; #mass of photon(g)\n",
+ "c=3*10**8; #velocity of light(m/sec) \n",
+ "h=6.62*10**-34; #planck's constant(Jsec)\n",
+ "\n",
+ "#Calculation\n",
+ "new=m0*c**2/h; #frequency of photon(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"frequency of photon is\",round(new/10**20,3),\"*10**20 Hz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 23, Page number 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 80,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "kinetic energy of electron is 0.506 MeV\n",
+ "kinetic energy of positron is 0.394 MeV\n",
+ "answer for kinetic energy of positron given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m0=9*10**-31; #mass of photon(g)\n",
+ "c=3*10**8; #velocity of light(m/sec) \n",
+ "e=1.6*10**-19; #conversion factor\n",
+ "E=1.8; #energy(MeV)\n",
+ "\n",
+ "#Calculation\n",
+ "E0=m0*c**2/(e*10**6); #kinetic energy of electron(MeV) \n",
+ "k=(E/2)-E0; #kinetic energy of positron(MeV) \n",
+ "\n",
+ "#Result\n",
+ "print \"kinetic energy of electron is\",round(E0,3),\"MeV\"\n",
+ "print \"kinetic energy of positron is\",round(k,3),\"MeV\"\n",
+ "print \"answer for kinetic energy of positron given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 24, Page number 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 83,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "binding energy is 106.9 MeV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Z=7; #atomic number of nitrogen\n",
+ "N=7; \n",
+ "mp=1.0086; #mass of proton(amu)\n",
+ "mn=1.0078; #mass of nucleus(amu)\n",
+ "amu=931.5; #energy(MeV)\n",
+ "A=14; #atomic mass \n",
+ "\n",
+ "#Calculation\n",
+ "EB=((Z*mp)+(N*mn)-A)*amu; #binding energy(MeV)\n",
+ "\n",
+ "#Result\n",
+ "print \"binding energy is\",round(EB,1),\"MeV\""
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_52Xb53f.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_52Xb53f.ipynb
new file mode 100644
index 00000000..13136d2a
--- /dev/null
+++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_52Xb53f.ipynb
@@ -0,0 +1,172 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 7: Vibrations-Fundamental Concepts"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1, Page number 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "force constant is 0.02 N/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=-0.0176; #acceleration(m/s**2)\n",
+ "x=0.44; #displacement(m)\n",
+ "m=0.5; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "omega0=math.sqrt(-a/x); #frequency\n",
+ "k=m*omega0**2; #force constant(N/m)\n",
+ "\n",
+ "#Result\n",
+ "print \"force constant is\",k,\"N/m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2, Page number 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "frequency of oscillation is 1.114 Hertz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "g=9.8; #acceleration(m/s**2)\n",
+ "x=0.5; #displacement(m)\n",
+ "m1=5; #mass(kg)\n",
+ "m2=2; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "k=m1*g/x; #spring constant(N/m)\n",
+ "omega=math.sqrt(k/m2)/(2*math.pi); #frequency of oscillation(Hertz)\n",
+ "\n",
+ "#Result\n",
+ "print \"frequency of oscillation is\",round(omega,3),\"Hertz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4, Page number 272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "amplitude is 0.3 m\n",
+ "frequency of oscillation is 1.0 /(2 math.pi) Hertz\n",
+ "initial phase is -2 *math.pi/6 rad\n",
+ "answer for initial phase given in the book is wrong\n",
+ "displacement is 0.3 m\n",
+ "velocity is -0.26 m/sec\n",
+ "acceleration is 0.15 m/s**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "#given y=0.3sin(t+pi/6)\n",
+ "A=0.3; #value of amplitude by comparing with the given equation\n",
+ "omega=1; #angular freuency(rad/sec)\n",
+ "theta=math.pi/6; #angle(rad)\n",
+ "t1=math.pi/3; #time(sec)\n",
+ "t2=2*math.pi/3; #time(sec)\n",
+ "t3=math.pi; #time(sec)\n",
+ "\n",
+ "#Calculation\n",
+ "new=omega/(2*math.pi); #frequency of oscillation(Hertz)\n",
+ "phi=theta-(math.pi/2); #initial phase(rad)\n",
+ "y=A*math.sin(theta+(math.pi/6)); #displacement(m)\n",
+ "V=omega*A*math.cos((omega*t2)+theta); #velocity(m/sec)\n",
+ "a=-A*omega**2*math.sin((omega*t3)+theta); #acceleration(m/s**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"amplitude is\",A,\"m\"\n",
+ "print \"frequency of oscillation is\",new*2*math.pi,\"/(2 math.pi) Hertz\"\n",
+ "print \"initial phase is\",int(phi*6/math.pi),\"*math.pi/6 rad\"\n",
+ "print \"answer for initial phase given in the book is wrong\"\n",
+ "print \"displacement is\",round(y,1),\"m\"\n",
+ "print \"velocity is\",round(V,2),\"m/sec\"\n",
+ "print \"acceleration is\",a,\"m/s**2\""
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_mk2HyQz.ipynb b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_mk2HyQz.ipynb
new file mode 100644
index 00000000..14a19e18
--- /dev/null
+++ b/BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_mk2HyQz.ipynb
@@ -0,0 +1,306 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 8: Damped and Forced Oscillations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 1, Page number 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "restoration energy is 125000 erg\n",
+ "frequency is 5 /math.pi Hz\n",
+ "time taken for reduction of amplitude is 3.22 sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=10**4; #Force constant(dyne/cm)\n",
+ "x=5; #displacement(cm)\n",
+ "m=100; #mass(gm)\n",
+ "R=100; #resistance(dyne/cm)\n",
+ "At=1; #amplitude(cm)\n",
+ "A0=5; #amplitude(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "E=(1/2)*k*x**2; #restoration energy(erg)\n",
+ "v=1/(2*math.pi)*math.sqrt(k/m) #frequency(Hz)\n",
+ "b=R/(2*m); \n",
+ "t=math.log(A0/At)/b; #time taken for reduction of amplitude(sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"restoration energy is\",int(E),\"erg\"\n",
+ "print \"frequency is\",int(v*math.pi),\"/math.pi Hz\"\n",
+ "print \"time taken for reduction of amplitude is\",round(t,2),\"sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 2, Page number 301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time taken is 61.08 sec\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "new=300; #frequency(Hz)\n",
+ "EbyE0=1/10; #ratio of energy\n",
+ "Q=5*10**4; #Q factor\n",
+ "\n",
+ "#Calculation\n",
+ "tbytow=math.log(1/EbyE0);\n",
+ "tow=Q/(2*math.pi*new); \n",
+ "t=tbytow*tow; #time taken(sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"time taken is\",round(t,2),\"sec\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 3, Page number 301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time taken is 6 sec\n",
+ "procedure followed in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Q=2.2*10**3; #Q value of sonometer wire\n",
+ "new=210; #frequency(Hz)\n",
+ "\n",
+ "#Calculation\n",
+ "tow=Q/(2*math.pi*new); #torque(Nm)\n",
+ "t=4*tow; #time taken(sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"time taken is\",int(t),\"sec\"\n",
+ "print \"procedure followed in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 4, Page number 302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "damping factor is 0.0618 N/m\n",
+ "Q-factor is 113.3\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=0.5; #mass(kg)\n",
+ "g=9.8; #acceleration due to gravity(m/sec**2)\n",
+ "x=0.05; #displacement(m)\n",
+ "\n",
+ "#Calculation\n",
+ "k=m*g/x; \n",
+ "omega0=math.sqrt(k/m); #angular velocity\n",
+ "T=50*2*math.pi/omega0; #time taken for 50 oscillations(sec)\n",
+ "b=math.log(4)/T; #damping factor(N/m)\n",
+ "R=2*b*m; #resistance(ohm)\n",
+ "Q=m*omega0/R; #Q-factor\n",
+ "\n",
+ "#Result\n",
+ "print \"damping factor is\",round(b,4),\"N/m\"\n",
+ "print \"Q-factor is\",round(Q,1)\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 5, Page number 302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of oscillations is 27.73\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=1; #mass(gm)\n",
+ "R=10; #damping constant\n",
+ "E=50; #energy(J)\n",
+ "E0=200; #energy(J)\n",
+ "new=200; #frequency(Hz)\n",
+ "\n",
+ "#Calculation\n",
+ "b=R/(2*m);\n",
+ "t=math.log(E0/E)/(2*b); #time taken(sec)\n",
+ "n=new*t; #number of oscillations\n",
+ "\n",
+ "#Result\n",
+ "print \"number of oscillations is\",round(n,2)\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example number 6, Page number 303"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mechanical resistance is 0.0628 m/sec\n",
+ "damping constant is 0.209\n",
+ "spring constant 11.84 N/cm\n",
+ "answer for spring constant given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=0.3; #mass(kg)\n",
+ "new=2; #frequency(Hz)\n",
+ "Q=60; #Q-factor\n",
+ "\n",
+ "#Calculation\n",
+ "omega=2*math.pi*new; #angular velocity\n",
+ "R=m*omega/Q; #mechanical resistance(m/sec)\n",
+ "b=R/m; #damping constant\n",
+ "k=4*(math.pi**2)*m; #spring constant(N/cm)\n",
+ "\n",
+ "#Result\n",
+ "print \"mechanical resistance is\",round(R,4),\"m/sec\"\n",
+ "print \"damping constant is\",round(b,3)\n",
+ "print \"spring constant\",round(k,2),\"N/cm\"\n",
+ "print \"answer for spring constant given in the book is wrong\""
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter10_NUnB5Sw.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter10_NUnB5Sw.ipynb
new file mode 100644
index 00000000..49866ab5
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter10_NUnB5Sw.ipynb
@@ -0,0 +1,599 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Properties of gases and gas mixture"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.1:pg-366"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 10.1\n",
+ "\n",
+ "\n",
+ " The final equilibrium pressure is 1.16869318853 MPa\n",
+ "\n",
+ " The amount of heat transferred to the surrounding is -226.04503125 kJ\n",
+ " \n",
+ "\n",
+ " If the vessel is perfectly insulated\n",
+ "\n",
+ " The final temperature is 45.4545454545 degree Celsius\n",
+ "\n",
+ " The final pressure is 1.24058552709 MPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Pa = 1.5 # Pressure in vessel A in MPa\n",
+ "Ta = 50 # Temperature in vessel A in K\n",
+ "ca = 0.5 # Content in vessel A in kg mol\n",
+ "Pb = 0.6 # Pressure in vessel B in MPa\n",
+ "Tb = 20 # Temperature in vessel B in K\n",
+ "mb = 2.5 # Content in vessel B in kg mol\n",
+ "R = 8.3143 # Universal gas constant\n",
+ "Va = (ca*R*(Ta+273))/(Pa*1e03) # volume of vessel A\n",
+ "ma = ca*28 # mass of gas in vessel A\n",
+ "Rn = R/28 # Gas content to of nitrogen\n",
+ "Vb = (mb*Rn*(Tb+273))/(Pb*1e03) # volume of vessel B\n",
+ "V = Va + Vb # Total volume\n",
+ "m = ma + mb # Total mass\n",
+ "Tf = 27 # Equilibrium temperature in degree Celsius\n",
+ "P = (m*Rn*(Tf+273))/V # Equilibrium pressure \n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "cv = Rn/(g-1) # Heat capacity at constant volume\n",
+ "U1 = cv*(ma*Ta+mb*Tb) # Initial internal energy \n",
+ "U2 = m*cv*Tf# Final internal energy \n",
+ "Q = U2-U1 # heat transferred\n",
+ "\n",
+ "print \"\\n Example 10.1\"\n",
+ "print \"\\n\\n The final equilibrium pressure is \",P/1e3 ,\" MPa\"\n",
+ "print \"\\n The amount of heat transferred to the surrounding is \",Q ,\" kJ\"\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "T_ = (ma*Ta+mb*Tb)/m # final temperature\n",
+ "P_ = (m*Rn*(T_+273))/V # final pressure\n",
+ "print \" \\n\\n If the vessel is perfectly insulated\"\n",
+ "print \"\\n The final temperature is \",T_ ,\" degree Celsius\"\n",
+ "print \"\\n The final pressure is \",P_/1e3 ,\" MPa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.2:pg-368"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 10.2\n",
+ "\n",
+ "\n",
+ " Gas constant of the gas is 0.461 kJ/kg K \n",
+ "\n",
+ " Molecular weight the gas is 18.0347071584 kg/kg mol\n",
+ "\n",
+ " The heat transfer at constant volume is 286.33 kJ\n",
+ "\n",
+ " Work done is 0 kJ\n",
+ "\n",
+ " The change in internal energy is 286.33 kJ\n",
+ "\n",
+ " The change in enthalpy is 373.92 kJ\n",
+ "\n",
+ " The change in entropy is 0.885987320143 kJ/k\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "cp = 1.968 # Heat capacity in kJ/kg\n",
+ "cv = 1.507 # Heat capacity in kJ/kg\n",
+ "R_ = 8.314 # Gas constant\n",
+ "V = 0.3 # Volume of chamber in m**3\n",
+ "m = 2 # mass of gas in kg\n",
+ "T1 = 5.0# Initial gas temperature in degree Celsius\n",
+ "T2 = 100.0 # Final gas temperature in degree Celsius\n",
+ "R = cp-cv # Universal gas constant\n",
+ "mu = R_/R # molecular weight\n",
+ "Q12 = m*cv*(T2-T1) # The heat transfer at constant volume\n",
+ "W12 = 0 # work done\n",
+ "U21 = Q12 # change in internal energy\n",
+ "H21= m*cp*(T2-T1) # change in enthalpy\n",
+ "S21 = m*cv*math.log((T2+273)/(T1+273)) #change in entropy \n",
+ "\n",
+ "print \"\\n Example 10.2\"\n",
+ "print \"\\n\\n Gas constant of the gas is \",R ,\" kJ/kg K \"\n",
+ "print \"\\n Molecular weight the gas is \",mu ,\" kg/kg mol\"\n",
+ "print \"\\n The heat transfer at constant volume is \",Q12 ,\" kJ\"\n",
+ "print \"\\n Work done is \",0 ,\" kJ\"\n",
+ "print \"\\n The change in internal energy is \",U21 ,\" kJ\"\n",
+ "print \"\\n The change in enthalpy is \",H21 ,\" kJ\"\n",
+ "print \"\\n The change in entropy is \",S21 ,\" kJ/k\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.3:pg-369"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 10.3\n",
+ "\n",
+ " The work done in the expansion is 300.72200185 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from scipy import integrate\n",
+ "m = 1.5 # Mass of gas in kg\n",
+ "P1 = 5.6 # Initial pressure of gas in MPa\n",
+ "V1 = 0.06 # Initial volume of gas in m**3\n",
+ "T2_ = 240 # Final temperature of gas in degree Celsius\n",
+ "a = 0.946 # Constant\n",
+ "b = 0.662 # Constant\n",
+ "k = 1e-4 # Constant\n",
+ "# Part (b)\n",
+ "R = a-b # constant\n",
+ "T2 = T2_+273 # Final temperature of gas in KK\n",
+ "T1 = (P1*1e03*V1)/(m*R) # Initial temperature\n",
+ "W12,er =integrate.quad(lambda T:m*(b+k*T),T1,T2) # Work done\n",
+ "\n",
+ "print \"\\n Example 10.3\"\n",
+ "print \"\\n The work done in the expansion is \",-W12 ,\" kJ\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.5:pg-371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 10.5\n",
+ "\n",
+ " The work transfer for the whole path is 93.4986082985 kJ\n",
+ "\n",
+ " The heat transfer for the whole path 571.638005316 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "m = 0.5 # mass of air in kg\n",
+ "P1 = 80 # Initial pressure kPa\n",
+ "T1 = 60 # Initial temperature in degree Celsius\n",
+ "P2 = 0.4 # Final pressure in MPa\n",
+ "R = 0.287 # Gas constant\n",
+ "V1 = (m*R*(T1+273))/(P1) # Volume of air at state 1\n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "T2 = (T1+273)*(P2*1e3/P1)**((g-1)/g)# Final temperature\n",
+ "W12 = (m*R*(T1+273-T2))/(g-1) # Work done in \n",
+ "V2 = V1*((P1/(P2*1e3))**(1/g)) # Final volume\n",
+ "W23 = P2*(V1-V2)*1e3 # # Work done\n",
+ "W = W12+W23 # Net work done\n",
+ "V3 = V1 # constant volume\n",
+ "T3 = (T2)*(V3/V2) # Temperature at state 3\n",
+ "cp = 1.005 # Heat capacity at constant volume in kJ/kgK\n",
+ "Q = m*cp*(T3-T2)# Heat transfer\n",
+ "print \"\\n Example 10.5\"\n",
+ "print \"\\n The work transfer for the whole path is \",W ,\" kJ\"\n",
+ "#The answers vary due to round off error\n",
+ "print \"\\n The heat transfer for the whole path \",Q ,\" kJ\"\n",
+ "#The answer provided in the textbook is wrong\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.6:pg-372"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 10.6\n",
+ "\n",
+ " The heat received in the cycle is 137.268292683 kJ\n",
+ "\n",
+ " The heat rejected in the cycle 84.2666952566 kJ\n",
+ "\n",
+ " The efficiency of the cycle is 39.0 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P1 = 700 # Initial pressure of gas in kPa\n",
+ "T1 = 260 # Initial temperature of gas in degree Celcius \n",
+ "T3 = T1 # Temperature at state 3\n",
+ "V1 = 0.028 # Initial volume of gas in m**3\n",
+ "V2 = 0.084 # Final volume of gas in m**3\n",
+ "R = 0.287 # Gas constant\n",
+ "m = (P1*V1)/(R*(T1+273)) # mass of gas \n",
+ "P2 = P1 # Pressure at state 2\n",
+ "T2 = (T1+273)*((P2*V2)/(P1*V1)) # Temperature at state 2\n",
+ "n = 1.5 # polytropic index \n",
+ "P3 = P2*(((T3+273)/(T2))**(n/(n-1))) # Pressure at state 3\n",
+ "cp = 1.005 # COnstant pressure heat capacity in kJ/kgK\n",
+ "cv = 0.718 # COnstant volume heat capacity in kJ/kgK\n",
+ "Q12 = m*cp*(T2-T1-273) # HEat transfer\n",
+ "Q23 = m*cv*(T3+273-T2) + (m*R*(T2-T3-273))/(n-1) # Heat transfer\n",
+ "Q31 = m*R*(T1+273)*math.log(P3/P2) # Heat transfer\n",
+ "Q1 = Q12 # Heat equivalance\n",
+ "Q2 = -(Q23+Q31) # Net heat transfer\n",
+ "e = 1-(Q2/Q1) # First law efficiency\n",
+ "\n",
+ "print \"\\n Example 10.6\"\n",
+ "print \"\\n The heat received in the cycle is \",Q1 ,\" kJ\"\n",
+ "print \"\\n The heat rejected in the cycle \",Q2 ,\" kJ\"\n",
+ "print \"\\n The efficiency of the cycle is \",math. ceil(e*100) ,\" percent\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.7:pg-374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 10.7\n",
+ "\n",
+ " Cv of the gas is 0.661000944287 kJ/kg K\n",
+ "\n",
+ " Cp of the gas is 0.89896128423 kJ/kg K\n",
+ "\n",
+ " Increase in the entropy of the gas is 0.080159241414 kJ/kg K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P1 = 300 # Initial gas pressure in kPa\n",
+ "V1 = 0.07 # Initial volume of gas in m**3\n",
+ "m = 0.25 # Mass of gas in kg\n",
+ "T1 = 80 # Initial temperature of gas in degree Celsius\n",
+ "R = (P1*V1)/(m*(T1+273)) # constant\n",
+ "P2 = P1 # process condition\n",
+ "V2 = 0.1 # Final volume in m**3\n",
+ "T2 = (P2*V2)/(m*R) # Final temperature in K\n",
+ "W = -25 #Work done in kJ\n",
+ "cv = -W/(m*(T2-T1-273)) # Constant volume heat capacity in kJ/kg\n",
+ "cp = R+cv #Constant pressure heat capacity in kJ/kg\n",
+ "S21 = m*cp*math.log(V2/V1) # Entropy change\n",
+ "print \"\\n Example 10.7\"\n",
+ "print \"\\n Cv of the gas is \",cv ,\" kJ/kg K\"\n",
+ "print \"\\n Cp of the gas is \",cp ,\" kJ/kg K\"\n",
+ "print \"\\n Increase in the entropy of the gas is \",S21 ,\" kJ/kg K\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.8:pg-374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 10.8\n",
+ "\n",
+ "\n",
+ " Mole fraction of N2 is 0.485294117647\n",
+ "\n",
+ " Mole fraction of CO2 is 0.514705882353\n",
+ "\n",
+ " Equivalent molecular weight of mixture is 36.2352941176 kg/kg mol\n",
+ "\n",
+ "\n",
+ " The equivalent gas constant of the mixture is 0.229444805195 kJ/kg K\n",
+ "\n",
+ "\n",
+ " Partial pressures of nitrogen and CO2 are \n",
+ " 145.588235294 kPa and 154.411764706 kPa respectively\n",
+ "\n",
+ " Partial volume of nitrogen and CO2 are \n",
+ " 0.870000714286 kPa and 0.922728030303 kPa respectively\n",
+ "\n",
+ "\n",
+ " Total volume of mixture is 1.79272874459 m**3\n",
+ "\n",
+ " Density of mixture is 4.46247098126 kg/m**3\n",
+ "\n",
+ "\n",
+ " Cp and Cv of mixture are \n",
+ " 0.920740483948 kJ/kg K and 0.691295678753 kJ/kg K respectively\n",
+ "\n",
+ "\n",
+ " Change in internal energy of the system heated at constant volume is 110.6073086 kJ\n",
+ "\n",
+ " Change in enthalpy of the system heated at constant volume is 147.318477432 kJ\n",
+ "\n",
+ " Change in entropy of the system heated at constant volume is 0.36517324538 kJ/kg K\n",
+ "\n",
+ "\n",
+ " Change in entropy of the system heated at constant Pressure is 0.486376236695 kJ/kgK\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "mn = 3.0 # Mass of nitrogen in kg\n",
+ "mc = 5.0 # mass of CO2 in kg\n",
+ "an = 28.0 # Atomic weight of nitrogen\n",
+ "ac = 44.0 # Atomic weight of CO2\n",
+ "# Part (a)\n",
+ "xn = (mn/an)/((mn/an)+(mc/ac)) # mole fraction of nitrogen\n",
+ "xc = (mc/ac)/((mn/an)+(mc/ac)) # mole fraction of carbon\n",
+ "\n",
+ "print \"\\n Example 10.8\"\n",
+ "print \"\\n\\n Mole fraction of N2 is \",xn \n",
+ "print \"\\n Mole fraction of CO2 is \",xc\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "# Part (b)\n",
+ "M = xn*an+xc*ac # Equivalent molecular weight\n",
+ "print \"\\n Equivalent molecular weight of mixture is \",M ,\"kg/kg mol\" \n",
+ "\n",
+ "# Part (c)\n",
+ "R = 8.314 # Gas constant\n",
+ "Req = ((mn*R/an)+(mc*R/ac))/(mn+mc)\n",
+ "print \"\\n\\n The equivalent gas constant of the mixture is \",Req ,\" kJ/kg K\" \n",
+ "\n",
+ "# Part (d)\n",
+ "P = 300.0 # Initial pressure in kPa\n",
+ "T = 20.0 # Initial temperature in degree Celsius\n",
+ "Pn = xn*P # Partial pressure of Nitrogen\n",
+ "Pc = xc*P # Partial pressure of CO2 \n",
+ "Vn = (mn*R*(T+273))/(P*an) # Volume of nitrogen\n",
+ "Vc = (mc*R*(T+273))/(P*ac) # Volume of CO2\n",
+ "print \"\\n\\n Partial pressures of nitrogen and CO2 are \\n \",Pn ,\" kPa and \",Pc ,\" kPa respectively\"\n",
+ "print \"\\n Partial volume of nitrogen and CO2 are \\n \",Vn ,\" kPa and \",Vc ,\" kPa respectively\"\n",
+ "# Part (e)\n",
+ "V = (mn+mc)*Req*(T+273)/P # Total volume\n",
+ "rho = (mn+mc)/V # mass density\n",
+ "print \"\\n\\n Total volume of mixture is \",V ,\" m**3\" \n",
+ "print \"\\n Density of mixture is \",rho ,\" kg/m**3\" \n",
+ "\n",
+ "# Part (f)\n",
+ "gn = 1.4 # Heat capacity ratio for nitrogen\n",
+ "gc = 1.286 # Heat capacity ratio for carbon dioxide \n",
+ "cvn = R/((gn-1)*an) # cp and cv of N2\n",
+ "cpn = gn*cvn # Constant pressure heat capacity of nitrogen\n",
+ "cvc = R/((gc-1)*ac) # cp and cv of CO2\n",
+ "cpc = gc*cvc# COnstant pressure heat capacity of carbon dioxide \n",
+ "cp = (mn*cpn+mc*cpc)/(mn+mc) # Constant pressure heat capacity ratio of mixture\n",
+ "cv = (mn*cvn+mc*cvc)/(mn+mc) # Constant volume Heat capacity ratio of mixture\n",
+ "print \"\\n\\n Cp and Cv of mixture are \\n \",cp ,\"kJ/kg K and \",cv ,\"kJ/kg K respectively\" \n",
+ "T1 = T \n",
+ "T2 = 40 \n",
+ "U21 = (mn+mc)*cv*(T2-T1)\n",
+ "H21 = (mn+mc)*cp*(T2-T1)\n",
+ "S21v = (mn+mc)*cv*math.log((T2+273)/(T1+273)) # If heated at constant volume\n",
+ "S21p = (mn+mc)*cp*math.log((T2+273)/(T1+273)) # If heated at constant Pressure\n",
+ "\n",
+ "print \"\\n\\n Change in internal energy of the system heated at constant volume is \",U21 ,\"kJ\" \n",
+ "print \"\\n Change in enthalpy of the system heated at constant volume is \",H21 ,\"kJ\" \n",
+ "print \"\\n Change in entropy of the system heated at constant volume is \",S21v ,\" kJ/kg K\"\n",
+ "print \"\\n\\n Change in entropy of the system heated at constant Pressure is \",S21p ,\"kJ/kgK\" \n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.9:pg-375"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 10.9\n",
+ "\n",
+ " Increase in entropy is 1.22920562691 kJ/kg K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "mo = 2.0 # mass of oxygen in kg\n",
+ "mn = 6.0 # mass of nitrogen in kg\n",
+ "muo = 32.0 # molecular mass of oxygen\n",
+ "mun = 28.0 # molecular mass of nitrogen\n",
+ "o = mo/muo # mass fraction of oxygen\n",
+ "n = mn/mun # mass fraction of nitrogen\n",
+ "xo = o/(n+o) # mole fraction of oxygen\n",
+ "xn = n/(n+o) # mole fraction of nitrogen\n",
+ "R = 8.314 # Universal gas constant\n",
+ "Ro = R/muo # Gas constant for oxygen\n",
+ "Rn = R/mun # Gas constant for nitrogen\n",
+ "dS = -mo*Ro*math.log(xo)-mn*Rn*math.log(xn) # Increase in entropy \n",
+ "\n",
+ "print \"\\n Example 10.9\"\n",
+ "print \"\\n Increase in entropy is \",dS ,\" kJ/kg K\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.10:pg-376"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 10.10\n",
+ "\n",
+ " Specific volume is 3.05515367719 *10**-3 m3/kg\n",
+ "\n",
+ " Specific temperature is 57.85 K\n",
+ "\n",
+ " Specific pressure is 5.46 MPa\n",
+ "\n",
+ " Reduced volume is 1.48226362179 m3/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "an = 20.183 # molecular weight of neon\n",
+ "Pc = 2.73 # Critical pressure\n",
+ "Tc = 44.5 # Critical tmperature in Kelvin\n",
+ "Vc = 0.0416 # volume of gas in m**3\n",
+ "Pr = 2 # Reduced Pressure\n",
+ "Tr = 1.3 # Reduced temperature\n",
+ "Z = 0.7 # Compressibility factor\n",
+ "P = Pr*Pc # Corresponding Pressure \n",
+ "T = Tr*Tc # Corresponding temperature\n",
+ "R = 8.314 # Gas constant\n",
+ "v = (Z*R*T)/(P*an) # Corresponding volume\n",
+ "vr = (v*an)/(Vc*1e3) # reduced volume\n",
+ "\n",
+ "print \"\\n Example 10.10\"\n",
+ "print \"\\n Specific volume is \",v ,\" *10**-3 m3/kg\"\n",
+ "print \"\\n Specific temperature is \",T ,\" K\"\n",
+ "print \"\\n Specific pressure is \",P ,\" MPa\"\n",
+ "print \"\\n Reduced volume is \",vr ,\" m3/kg\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter11_pIim3x0.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter11_pIim3x0.ipynb
new file mode 100644
index 00000000..3e09ba67
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter11_pIim3x0.ipynb
@@ -0,0 +1,221 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11:Thermodynamic relations Equilibrium and stability"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.3:pg-436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 11.3\n",
+ "\n",
+ " Vapour pressure of benzene is 17.6682592008 kPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Tb = 353.0 # boiling point of benzene in K\n",
+ "T = 303.0 # Operational temperature in K\n",
+ "R = 8.3143 #Gas constant\n",
+ "P = 101.325*math.exp((88/R)*(1.0-(Tb/T)))\n",
+ "\n",
+ "print \"\\n Example 11.3\"\n",
+ "print \"\\n Vapour pressure of benzene is \",P ,\" kPa\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.4:pg-436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 11.4\n",
+ "\n",
+ " Temperature at triple point is 195.197740113 K\n",
+ "\n",
+ " Pressure at triple point is 44.631622076 mm Hg\n",
+ "\n",
+ "\n",
+ " Latent heat of sublimation is 31211.8822 kJ/kg mol\n",
+ "\n",
+ " Latent heat of vapourization is is 25466.7009 kJ/kg mol\n",
+ "\n",
+ " Latent heat of fusion is 5745.1813 kJ/kg mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T = (3754-3063)/(23.03-19.49) # Temperature at triple point in K\n",
+ "P = math.exp(23.03-(3754/195.2)) # Pressure at triple point\n",
+ "R = 8.3143 # Gas constant\n",
+ "Lsub = R*3754 # Latent heat of sublimation\n",
+ "Lvap = 3063*R # Latent heat of vaporisation\n",
+ "Lfu = Lsub-Lvap # Latent heat of fusion\n",
+ "\n",
+ "print \"\\n Example 11.4\"\n",
+ "print \"\\n Temperature at triple point is \",T ,\" K\"\n",
+ "print \"\\n Pressure at triple point is \",P ,\" mm Hg\"\n",
+ "print \"\\n\\n Latent heat of sublimation is \",Lsub ,\" kJ/kg mol\"\n",
+ "print \"\\n Latent heat of vapourization is is \",Lvap ,\" kJ/kg mol\"\n",
+ "print \"\\n Latent heat of fusion is \",Lfu ,\" kJ/kg mol\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.6:pg-438"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 11.6\n",
+ "\n",
+ "\n",
+ " Energy of first system is 1.6212885 kJ,\n",
+ " Energy of second system is 2.43193275 kJ,\n",
+ " Volume of first system is 0.008 m**3,\n",
+ " Volume of second system is 0.012 m**3,\n",
+ " Pressure is 135.107375 kN/m**2,\n",
+ " Temperature is 260.0 K.\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "R = 8.3143 # Gas constant in kJ/kg-mol-K\n",
+ "N1 = 0.5 # Mole no. of first system\n",
+ "N2 = 0.75 # Mole no. of second system\n",
+ "T1 = 200 # Initial temperature of first system in K\n",
+ "T2 = 300 # Initial temperature of second system in K\n",
+ "v = 0.02 # Total volume in m**3\n",
+ "print \"\\n Example 11.6\\n\"\n",
+ "Tf = (T2*N2+T1*N1)/(N1+N2)\n",
+ "Uf_1 = (3.0/2.0)*(R*N1*Tf)*(10**-3)\n",
+ "Uf_2 = (3.0/2.0)*(R*N2*Tf)*(10**-3)\n",
+ "pf = (R*Tf*(N1+N2)*(10**-3))/v\n",
+ "Vf_1 = R*N1*(10**-3)*Tf/pf\n",
+ "Vf_2 = v-Vf_1\n",
+ "print \"\\n Energy of first system is \",Uf_1 ,\" kJ,\\n Energy of second system is \",Uf_2 ,\" kJ,\\n Volume of first system is \",Vf_1 ,\" m**3,\\n Volume of second system is \",Vf_2 ,\" m**3,\\n Pressure is \",pf ,\" kN/m**2,\\n Temperature is \",Tf ,\" K.\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.10:pg-446"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 11.10 \n",
+ "\n",
+ " Power required to run the compressor = -10.6853713009 kW, \n",
+ " The rate at which heat must be removed from the compressor = -11.9346733668 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "R = 0.082 # Gas constant in litre-atm/gmol-K\n",
+ "m = 1.5 # Mass flow rate in kg/s\n",
+ "p1 = 1.0 # Pressure in atm\n",
+ "t2 = 300.0 # Temperature after compression in K\n",
+ "p2 = 400.0 # Pressure after compression in atm\n",
+ "Tc = 151.0 # For Argon in K\n",
+ "pc = 48.0 # For Argon in atm\n",
+ "print \"\\n Example 11.10 \"\n",
+ "a = 0.42748*((R*1000)**2)*((Tc)**2)/pc\n",
+ "b = 0.08664*(R*1000)*(Tc)/pc\n",
+ "# By solving equation v2**2 - 49.24*v2**2 + 335.6*v2 - 43440 = 0\n",
+ "v2 = 56.8 # In cm**3/g mol\n",
+ "v1 = (R*1000)*(t2)/p1\n",
+ "delta_h = -1790 # In J/g mol\n",
+ "delta_s = -57 # In J/g mol\n",
+ "Q = (t2*delta_s*(10**5)/39.8)/(3600*1000)\n",
+ "W = Q - (delta_h*(10**5)/39.8)/(3600*1000)\n",
+ "print \"\\n Power required to run the compressor = \",W ,\" kW, \\n The rate at which heat must be removed from the compressor = \",Q ,\" kW\"\n",
+ "# Answers vary due to round off error.\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter12_9A34qBU.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter12_9A34qBU.ipynb
new file mode 100644
index 00000000..540dfc4d
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter12_9A34qBU.ipynb
@@ -0,0 +1,890 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12: Vapour power cycle"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.1:pg-492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.1\n",
+ "\n",
+ " The work required in saturated liquid form is -0.9387 kJ/kg\n",
+ "\n",
+ " The work required in saturated vapor form is -520.0 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Part (a)\n",
+ "P1 = 1 # Initial pressure in bar\n",
+ "P2 = 10 # Final pressure in bar\n",
+ "vf = 0.001043 # specific volume of liquid in m**3/kg\n",
+ "Wrev = vf*(P1-P2)*1e5 # Work done\n",
+ "\n",
+ "print \"\\n Example 12.1\"\n",
+ "print \"\\n The work required in saturated liquid form is \",Wrev/1000 ,\" kJ/kg\"\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "# Part (b)\n",
+ "h1 = 2675.5 # Enthalpy at state 1 in kJ/kg\n",
+ "s1 = 7.3594 # Entropy at state 1 kJ/kgK\n",
+ "s2 = s1 # Isentropic process\n",
+ "h2 = 3195.5 # Enthalpy at state 2 kJ/kg\n",
+ "Wrev1 = h1-h2 # Work done\n",
+ "print \"\\n The work required in saturated vapor form is \",Wrev1 ,\" kJ/kg\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.2:pg-493"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.2\n",
+ "\n",
+ " Net work per kg of steam is 969.599095338 kJ/kg\n",
+ "\n",
+ " Cycle efficiency is 32.4996706636 percent\n",
+ "\n",
+ "\n",
+ " Percentage reduction in net work per kg of steam is 20.093190186 percent\n",
+ "\n",
+ " Percentage reduction in cycle efficiency is 20.093190186 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h1 = 3159.3 # Enthalpy at state 1 in kJ/kg\n",
+ "s1 = 6.9917 # Entropy at state 1 in kJ/kgK\n",
+ "h3 = 173.88 # Enthalpy at state 3 in kJ/kg\n",
+ "s3 = 0.5926 # Entropy at state 3 in kJ/kgK\n",
+ "sfp2 = s3 # Isentropic process\n",
+ "hfp2 = h3 # Isenthalpic process\n",
+ "hfgp2 = 2403.1 # Latent heat of vaporization in kJ/kg\n",
+ "sgp2 = 8.2287 # Entropy of gas in kJ/kgK\n",
+ "vfp2 = 0.001008 # Specific volume in m**3/kg\n",
+ "sfgp2 = 7.6361# Entropy of liquid in kJ/kgK\n",
+ "x2s = (s1-sfp2)/(sfgp2)# Steam quality\n",
+ "h2s = hfp2+(x2s*hfgp2) # Enthalpy at state 2s\n",
+ "# Part (a)\n",
+ "P1 = 20 # Turbine inlet pressure in bar\n",
+ "P2 = 0.08 # Turbine exit pressure in bar\n",
+ "h4s = vfp2*(P1-P2)*1e2+h3 # Enthalpy at state 4s\n",
+ "Wp = h4s-h3 # Pump work\n",
+ "Wt = h1-h2s # Turbine work\n",
+ "Wnet = Wt-Wp # Net work \n",
+ "Q1 = h1-h4s # Heat addition\n",
+ "n_cycle = Wnet/Q1# Cycle efficiency\n",
+ "print \"\\n Example 12.2\"\n",
+ "print \"\\n Net work per kg of steam is \",Wnet ,\" kJ/kg\"\n",
+ "#The answer provided in the textbook is wrong\n",
+ "\n",
+ "print \"\\n Cycle efficiency is \",n_cycle*100 ,\" percent\"\n",
+ "\n",
+ "# Part (b)\n",
+ "n_p = 0.8 # pump efficiency\n",
+ "n_t = 0.8# Turbine efficiency\n",
+ "Wp_ = Wp/n_p # Pump work\n",
+ "Wt_ = Wt*n_t # Turbine work\n",
+ "Wnet_ = Wt_-Wp_# Net work\n",
+ "P = 100*((Wnet-Wnet_)/Wnet) # Percentage reduction in net work\n",
+ "n_cycle_ = Wnet_/Q1 # cycle efficiency\n",
+ "P_ = 100*((n_cycle-n_cycle_)/n_cycle) #reduction in cycle\n",
+ "print \"\\n\\n Percentage reduction in net work per kg of steam is \",P ,\" percent\"\n",
+ "print \"\\n Percentage reduction in cycle efficiency is \",P_ ,\" percent\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.3:pg-495"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.3\n",
+ "\n",
+ " The greatest allowable steam pressure at the turbine inlet is 16.832 bar\n",
+ "\n",
+ " Rankine cycle efficiency is 31.684100869 percent\n",
+ "\n",
+ " Mean temperature of heat addition is 187.657819629 degree celcius\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P1 = 0.08 # Exhaust pressure in bar\n",
+ "sf = 0.5926 # Entropy of fluid in kJ/kgK\n",
+ "x2s = 0.85 # Steam quality\n",
+ "sg = 8.2287 # Entropy of gas in kJ/kgK\n",
+ "s2s = sf+(x2s*(sg-sf)) # Entropy of mixture at state 2s in kJ/kgK\n",
+ "s1 = s2s # Isentropic process\n",
+ "P2 = 16.832 # by steam table opposite to s1 in bar\n",
+ "h1 = 3165.54 # Enthalpy at state 1 in kJ/kg\n",
+ "h2s = 173.88 + (0.85*2403.1) # Enthalpy at state 2s in kJ/kg\n",
+ "h3 = 173.88# Enthalpy at state 3 in kJ/kg\n",
+ "vfp2 = 0.001 # specific volume of liquid in m**3/kg\n",
+ "h4s = h3 + (vfp2*(P2-P1)*100)# Enthalpy at state 4s in kJ/kg\n",
+ "Q1 = h1-h4s # Heat addition\n",
+ "Wt = h1-h2s # Turbine work\n",
+ "Wp = h4s-h3 # Pump work\n",
+ "n_cycle = 100*((Wt-Wp)/Q1) # Cycle efficiency\n",
+ "Tm = (h1-h4s)/(s2s-sf) # Mean temperature of heat addition\n",
+ "\n",
+ "print \"\\n Example 12.3\"\n",
+ "print \"\\n The greatest allowable steam pressure at the turbine inlet is \",P2 ,\" bar\"\n",
+ "\n",
+ "print \"\\n Rankine cycle efficiency is \",n_cycle ,\" percent\"\n",
+ "\n",
+ "print \"\\n Mean temperature of heat addition is \",Tm-273 ,\" degree celcius\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.4:pg-496"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.4 \n",
+ "\n",
+ "\n",
+ " Quality at turbine exhaust is 0.88\n",
+ "\n",
+ " Cycle efficiency is 43.9043470625 percent\n",
+ "\n",
+ " Steam rate is 2.18181818182 kg/kW h\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h1 = 3465 # Enthalpy at state 1 in kJ/kgK\n",
+ "h2s = 3065 #Enthalpy at state 2s in kJ/kgK \n",
+ "h3 = 3565 #Enthalpy at state 3 in kJ/kgK\n",
+ "h4s = 2300 # Enthalpy at state 4s in kJ/kgK\n",
+ "x4s = 0.88 # Steam quality at state 4s\n",
+ "h5 = 191.83# Enthalpy at state 5 in kJ/kgK\n",
+ "v = 0.001 # specific volume in m**3/kg\n",
+ "P = 150 # Boiler outlet pressure in bar\n",
+ "Wp = v*P*100 # Pump work\n",
+ "h6s = 206.83 # Enthalpy at state 6s in kJ/kgK\n",
+ "Q1 = (h1-h6s)+(h3-h2s) # Heat addition\n",
+ "Wt = (h1-h2s)+(h3-h4s) # Turbine work\n",
+ "Wnet = Wt-Wp # Net work\n",
+ "n_cycle = 100*Wnet/Q1 # cycle efficiency\n",
+ "sr = 3600/Wnet #Steam rate\n",
+ "\n",
+ "print \"\\n Example 12.4 \\n\"\n",
+ "print \"\\n Quality at turbine exhaust is \",0.88\n",
+ "print \"\\n Cycle efficiency is \",n_cycle ,\" percent\"\n",
+ "print \"\\n Steam rate is \",sr ,\" kg/kW h\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.5:pg-497"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.5\n",
+ "\n",
+ "\n",
+ " Efficiency of the cycle is 36.0687573387 percent\n",
+ "\n",
+ " Steam rate of the cycle is 3.85264705574 kg/kW h\n",
+ "\n",
+ " Increase in temperature due to regeneration is 27.3862065182 degree centigrade\n",
+ "\n",
+ " Increase in steam rate due to regeneration is 0.385518227773 kg/kW h\n",
+ "\n",
+ " Increase in Efficiency of the cycle due to regeneration is 1.90293971596 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h1 = 3230.9 # Enthalpy at state 1 in kJ/kg\n",
+ "s1 = 6.9212 # Entropy at state 1 in kJ/kgK\n",
+ "s2 = s1 # Isentropic process\n",
+ "s3 = s1 # Isentropic process\n",
+ "h2 = 2796 # Enthalpy at state 2 in kJ/kg\n",
+ "sf = 0.6493 # ENtropy of fluid onkJ/kgK\n",
+ "sfg = 7.5009 # Entropy change due to vaporization\n",
+ "x3 = (s3-sf)/sfg # steam quality\n",
+ "h3 = 191.83 + x3*2392.8 # Enthalpy at state 3\n",
+ "h4 = 191.83 # Enthalpy at state 4 in kJ/kg\n",
+ "h5 = h4 # Isenthalpic process\n",
+ "h6 = 640.23 # Enthalpy at state 6 in kJ/kg\n",
+ "h7 = h6 # Isenthalpic process\n",
+ "m = (h6-h5)/(h2-h5) # regenerative mass\n",
+ "Wt = (h1-h2)+(1-m)*(h2-h3) # turbine work\n",
+ "Q1 = h1-h6 # Heat addition\n",
+ "n_cycle = 100*Wt/Q1 # Cycle efficiency\n",
+ "sr = 3600/Wt # Steam rate\n",
+ "s7 = 1.8607 # Entropy at state 7 in kJ/kgK\n",
+ "s4 = 0.6493 # Entropy at state 4 in kJ/kgK \n",
+ "Tm = (h1-h7)/(s1-s7) # Mean temperature of heat addition with regeneration\n",
+ "Tm1 = (h1-h4)/(s1-s4) # Mean temperature of heat addition without regeneration\n",
+ "dT = Tm-Tm1 # Change in temperature\n",
+ "Wt_ = h1-h3 # Turbine work\n",
+ "sr_ = 3600/Wt_ # Steam rate\n",
+ "dsr = sr-sr_# Change in steam rate\n",
+ "n_cycle_ = 100*(h1-h3)/(h1-h4) # Cycle effciency\n",
+ "dn = n_cycle-n_cycle_# Change in efficiency\n",
+ "print \"\\n Example 12.5\\n\"\n",
+ "print \"\\n Efficiency of the cycle is \",n_cycle ,\" percent\"\n",
+ "\n",
+ "print \"\\n Steam rate of the cycle is \",sr ,\" kg/kW h\"\n",
+ "#The answer provided in the textbook is wrong\n",
+ "\n",
+ "print \"\\n Increase in temperature due to regeneration is \",dT ,\" degree centigrade\"\n",
+ "print \"\\n Increase in steam rate due to regeneration is \",dsr ,\" kg/kW h\"\n",
+ "#The answer provided in the textbook is wrong\n",
+ "\n",
+ "print \"\\n Increase in Efficiency of the cycle due to regeneration is \",dn ,\" percent\"\n",
+ "\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.6:pg-499"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.6\n",
+ "\n",
+ "\n",
+ " Steam quality at turbine exhaust is 0.90269510582\n",
+ "\n",
+ " Net work per kg of stem is 798.641701509 kJ/kg\n",
+ "\n",
+ " Cycle efficiency is 33.3978046046 percent\n",
+ "\n",
+ " Stream rate is 4.50765342356 kg/kW h\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h1 = 3023.5 # Enthalpy of steam at state 1 in kJ/kg\n",
+ "s1 = 6.7664 # Enthalpy of steam at state 1 in kJ/kgK\n",
+ "s2 = s1 # Isentropic process\n",
+ "s3 = s1 #Isentropic process\n",
+ "s4 = s1 #Isentropic process\n",
+ "t_sat_20 = 212 # Saturation temperature at 20 bar in degree Celsius\n",
+ "t_sat_1 = 46 # Saturation temperature at 1 bar in degree Celsius\n",
+ "dt = t_sat_20-t_sat_1 # Change in temperature\n",
+ "n =3 # number of heaters\n",
+ "t = dt/n # temperature rise per heater\n",
+ "t1 = t_sat_20-t # Operational temperature of first heater\n",
+ "t2 = t1-t# Operational temperature of second heater\n",
+ "# 0.1 bar\n",
+ "hf = 191.83 # Enthalpy of fluid in kJ/kg\n",
+ "hfg = 2392.8 # Latent heat of vaporization in kJ/kg\n",
+ "sf = 0.6493# Entropy of fluid in kJ/kgK\n",
+ "sg = 8.1502# Entropy of gas in kJ/kgK\n",
+ "# At 100 degree\n",
+ "hf100 = 419.04 # Enthalpy of fluid in kJ/kg \n",
+ "hfg100 = 2257.0# Latent heat of vaporization in kJ/kg \n",
+ "sf100 = 1.3069 # Entropy of fluid in kJ/kgK \n",
+ "sg100 = 7.3549 # Entropy of gas in kJ/kgK\n",
+ "# At 150 degree\n",
+ "hf150 = 632.20 # Enthalpy of fluid in kJ/kg \n",
+ "hfg150 = 2114.3# Latent heat of vaporization in kJ/kg \n",
+ "sf150 = 1.8418 # Entropy of fluid in kJ/kgK \n",
+ "sg150 = 6.8379# Entropy of gas in kJ/kgK\n",
+ "x2 = (s1-sf150)/4.9961 # Steam quality\n",
+ "h2 = hf150+(x2*hfg150) # Enthalpy at state 2 in kJ/kg\n",
+ "x3 = (s1-sf100)/6.0480 # Steam quality\n",
+ "h3 = hf100+(x3*hfg100) # Enthalpy at state 3 in kJ/kg \n",
+ "x4 = (s1-sf)/7.5010 # Steam quality\n",
+ "h4 = hf+(x4*hfg)#Enthalpy at state 4 in kJ/kg\n",
+ "h5 = hf # Enthalpy at state 5 in kJ/kg\n",
+ "h6 = h5 #Enthalpy at state 6 in kJ/kg\n",
+ "h7 = hf100 # Enthalpy at state 7 in kJ/kg\n",
+ "h8 = h7 # Enthalpy at state 8 in kJ/kg\n",
+ "h9 = 632.2 # Enthalpy at state 9 in kJ/kg\n",
+ "h10 = h9 # Enthalpy at state 10 in kJ/kg\n",
+ "m1 = (h9-h7)/(h2-h7) # regenerative mass \n",
+ "m2 = ((1-m1)*(h7-h6))/(h3-h6) # regenerative mass\n",
+ "Wt = 1*(h1-h2)+(1-m1)*(h2-h3)+(1-m1-m2)*(h3-h4) # Turbine work\n",
+ "Q1 = h1-h9 # Heat addition\n",
+ "Wp = 0 # Pump work is neglected\n",
+ "n_cycle = 100*(Wt-Wp)/Q1 # Cycle efficiency\n",
+ "sr = 3600/(Wt-Wp) # Steam rate\n",
+ "\n",
+ "print \"\\n Example 12.6\\n\"\n",
+ "print \"\\n Steam quality at turbine exhaust is \",x3\n",
+ "print \"\\n Net work per kg of stem is \",Wt ,\" kJ/kg\"\n",
+ "print \"\\n Cycle efficiency is \",n_cycle ,\" percent\"\n",
+ "print \"\\n Stream rate is \",sr ,\" kg/kW h\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.7:pg-501"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.7\n",
+ "\n",
+ "\n",
+ " The second law efficiency is 47.3045857486 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Ti = 2000.0 # Hot gas inlet temperature in K\n",
+ "Te = 450.0 # Hot gas exhaust temperature in K\n",
+ "T0 = 300.0 # Ambient temperature in K\n",
+ "Q1_dot = 100.0 # Heating rate provided by steam in kW\n",
+ "cpg = 1.1 # Heat capacity of gas in kJ/kg\n",
+ "wg = Q1_dot/(cpg*(Ti-Te)) # mass flow rate of hot gas\n",
+ "af1 = wg*cpg*T0*((Ti/T0)-1-math.log(Ti/T0)) # Availability at inlet\n",
+ "af2 = wg*cpg*T0*((Te/T0)-1-math.log(Te/T0)) # Availability at exit\n",
+ "afi = af1-af2 # Change in availability\n",
+ "h1 = 2801.0 # Enthalpy at state 1 in kJ/kg\n",
+ "h3 = 169.0 #Enthalpy at state 3 in kJ/kg\n",
+ "h4 = 172.8 #Enthalpy at state 4 in kJ/kg\n",
+ "h2 = 1890.2 # Enthalpy at state 2 in kJ/kg\n",
+ "s1 = 6.068 # Entropy at state 1 in kJ/kgK\n",
+ "s2 = s1 # Isentropic process\n",
+ "s3 = 0.576 # Entropy at state 3 in kJ/kgK\n",
+ "s4 = s3 # Isentropic process\n",
+ "Wt = h1-h2 # Turbine work\n",
+ "Wp = h4-h3 # Pump work\n",
+ "Q1 = h1-h4 # Heat addition\n",
+ "Q2 = h2-h3# Heat rejection\n",
+ "Wnet = Wt-Wp # Net work\n",
+ "ws = Q1_dot/2628 # steam mass flow rate\n",
+ "afu = 38*(h1-h4-T0*(s1-s3)) # availability loss\n",
+ "I_dot = afi-afu # Rate of exergy destruction\n",
+ "Wnet_dot = ws*Wnet# Mechanical power rate\n",
+ "afc = ws*(h2-h3-T0*(s2-s3)) # Exergy flow rate of of wet steam\n",
+ "n2 = 100*Wnet_dot/af1 # second law efficiency\n",
+ "\n",
+ "print \"\\n Example 12.7\\n\"\n",
+ "print \"\\n The second law efficiency is \",n2 ,\" percent\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.8:pg-503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.8\n",
+ "\n",
+ "\n",
+ " Part (a)\n",
+ "\n",
+ " The first law efficiency n1 is 36.4738076622\n",
+ "\n",
+ " The second law efficiency n2 is 42.9755948516\n",
+ "\n",
+ " The work ratio is 0.991498405951\n",
+ "\n",
+ " Part (b)\n",
+ "\n",
+ " The first law efficiency n1 is 39.3996247655\n",
+ "\n",
+ " The second law efficiency n2 is 66.4411884747\n",
+ "\n",
+ " The work ration is 0.993690851735\n",
+ "\n",
+ " Part (c)\n",
+ "\n",
+ " The first law efficiency n1 is 40.5460576678\n",
+ "\n",
+ " The second law efficiency n2 is 68.3744648698\n",
+ "\n",
+ " The work ration is 0.994990607389\n",
+ "\n",
+ " Part (d)\n",
+ "\n",
+ " The first law efficiency n1 is 43.8732394366\n",
+ "\n",
+ " The second law efficiency n2 is 32.4128919233\n",
+ "\n",
+ " The work ration is 0.991498405951\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Part (a)\n",
+ "h1 = 2758.0 # Enthalpy at state 1 in kJ/kg\n",
+ "h2 = 1817.0 # Enthalpy at state 2 in kJ/kg\n",
+ "h3 = 192.0 # Enthalpy at state 3 in kJ/kg\n",
+ "h4 = 200.0# Enthalpy at state 4 in kJ/kg\n",
+ "Wt = h1-h2 # turbine work\n",
+ "Wp = h4-h3 # Pump work\n",
+ "Q1 = h1-h4 # Heat addition\n",
+ "Wnet = Wt-Wp # Net work doen\n",
+ "n1 = Wnet/Q1 # First law efficiency\n",
+ "WR = Wnet/Wt # Work ratio\n",
+ "Q1_ = 100.0 # Heat addition rate in MW\n",
+ "PO = n1*Q1_ # power output\n",
+ "cpg = 1000 # Specific heat capacity in J/kg\n",
+ "wg = (Q1_/(833-450)) # mass flow rate of gas\n",
+ "EIR = wg*cpg*((833-300)-300*(math.log(833/300)))/1000 # Exergy input\n",
+ "n2 = PO/EIR # Second law efficiency\n",
+ "\n",
+ "print \"\\n Example 12.8\\n\"\n",
+ "print \"\\n Part (a)\"\n",
+ "print \"\\n The first law efficiency n1 is \",n1*100\n",
+ "print \"\\n The second law efficiency n2 is \",n2*100\n",
+ "print \"\\n The work ratio is \",WR\n",
+ "# Part (b)\n",
+ "h1b = 3398.0 # Enthalpy at state 1 in kJ/kg\n",
+ "h2b = 2130.0 # Enthalpy at state 2 in kJ/kg\n",
+ "h3b = 192.0 # Enthalpy at state 3 in kJ/kg\n",
+ "h4b = 200.0# Enthalpy at state 4 in kJ/kg\n",
+ "Wtb = 1268.0 # turbine work in kJ/kg\n",
+ "Wpb = 8.0 # Pump work in kJ/kg\n",
+ "Q1b = 3198.0# Heat addition rate in kW\n",
+ "n1b = (Wtb-Wpb)/Q1b #first law efficiency\n",
+ "WRb = (Wtb-Wpb)/Wtb # WOrk ratio\n",
+ "EIRb = 59.3 # Exergy input rate in MW\n",
+ "Wnetb = Q1_*n1b # net work done\n",
+ "\n",
+ "n2b = Wnetb/EIRb # Second law efficiency\n",
+ "print \"\\n Part (b)\" \n",
+ "print \"\\n The first law efficiency n1 is \",n1b*100\n",
+ "print \"\\n The second law efficiency n2 is \",n2b*100\n",
+ "print \"\\n The work ration is \",WRb\n",
+ "\n",
+ "# Part (c)\n",
+ "h1c = 3398.0 # Enthalpy at state 1 in kJ/kg\n",
+ "h2c = 2761.0 # Enthalpy at state 2 in kJ/kg\n",
+ "h3c = 3482.0# Enthalpy at state 3 in kJ/kg\n",
+ "h4c = 2522.0 # Enthalpy at state 4 in kJ/kg\n",
+ "h5c = 192.0 # Enthalpy at state 5 in kJ/kg\n",
+ "h6c = 200.0# Enthalpy at state 6 in kJ/kg\n",
+ "Wt1 = 637.0 # Turbine work in kJ/kg\n",
+ "Wt2 = 960.0 # Turbine work in kJ/kg\n",
+ "Wtc = Wt1+Wt2 # Net turbine work in kJ/kg\n",
+ "Wp = 8.0 # Pump work in kJ/kg \n",
+ "Wnetc = Wtc-Wp # net work done \n",
+ "Q1c = 3198+721 # Heat addition\n",
+ "n1c = Wnetc/Q1c# First law efficiency\n",
+ "WRc = Wnetc/Wtc# Work ratio\n",
+ "POc = Q1_*n1c# Power output\n",
+ "EIRc = 59.3# Exergy input in MW\n",
+ "n2c = POc/EIRc # Second law efficiency\n",
+ "print \"\\n Part (c)\"\n",
+ "print \"\\n The first law efficiency n1 is \",n1c*100\n",
+ "print \"\\n The second law efficiency n2 is \",n2c*100\n",
+ "print \"\\n The work ration is \",WRc\n",
+ "\n",
+ "# Part (d)\n",
+ "T3 = 45.8 # saturation temperature at 0.1 bar in degree celsius \n",
+ "T1 = 295.0 # saturation temperature at 80 bar in degree celsius \n",
+ "n1d = 1.0-((T3+273)/(T1+273)) # First law efficiency\n",
+ "Q1d = 2758-1316 # Heat addition\n",
+ "Wnet = Q1d*n1d # Net work output\n",
+ "Wpd = 8.0 # Pump work in kJ/kg\n",
+ "Wtd = 641.0# Turbine work in kJ/kg\n",
+ "WRd = (Wt-Wp)/Wt # Work ratio\n",
+ "POd = Q1_*0.439# Power output\n",
+ "EIRd = (Q1_/(833-593))*cpg*((833-300)-300*(math.log(833/300)))/1000 #Exergy Input rate in MW\n",
+ "n2d = POd/EIRd # Second law efficiency\n",
+ "print \"\\n Part (d)\"\n",
+ "print \"\\n The first law efficiency n1 is \",n1d*100\n",
+ "print \"\\n The second law efficiency n2 is \",n2d*100\n",
+ "print \"\\n The work ration is \",WRd\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.9:pg-505"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.9\n",
+ "\n",
+ "\n",
+ " Temperature of the steam is 360.0 degree celcius\n",
+ "\n",
+ " Pressure of the steam is 22.5 bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "hfg = 2202.6 # Latent heat of fusion in kJ/kg\n",
+ "Qh = 5.83 # Heat addition in MJ/s\n",
+ "ws = Qh/hfg # steam flow rate\n",
+ "eg = 0.9 # efficiency of generator\n",
+ "P = 1000.0 # Power generation rate in kW\n",
+ "Wnet = 1000.0/eg # Net output\n",
+ "nbrake = 0.8 # brake thermal efficiency\n",
+ "h1_2s = Wnet/(ws*nbrake) # Ideal heat addition\n",
+ "n_internal = 0.85 # internal efficiency\n",
+ "h12 = n_internal*h1_2s # Actual heat addition\n",
+ "hg = 2706.3 # Enthalpy of gas in kJ/kg\n",
+ "h2 = hg #Isenthalpic process \n",
+ "h1 = h12+h2 # Total enthalpy \n",
+ "h2s = h1-h1_2s # Enthalpy change\n",
+ "hf = 503.71 # Enthalpy of fluid in kJ/kg \n",
+ "x2s = (h2s-hf)/hfg # Quality of steam\n",
+ "sf = 1.5276 # entropy of fluid in kJ/kgK\n",
+ "sfg = 5.6020 # Entropy change due to vaporization in kJ/kgK\n",
+ "s2s = sf+(x2s*sfg) # Entropy at state 2s\n",
+ "s1 = s2s # Isentropic process\n",
+ "P1 = 22.5 # Turbine inlet pressure in bar from Mollier chart\n",
+ "t1 = 360.0 # Temperature of the steam in degree Celsius from Mollier chart\n",
+ "\n",
+ "print \"\\n Example 12.9\\n\"\n",
+ "print \"\\n Temperature of the steam is \",t1 ,\" degree celcius\"\n",
+ "print \"\\n Pressure of the steam is \",P1 ,\" bar\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.10:pg-506"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.10\n",
+ "\n",
+ "\n",
+ " Fuel burning rate is 18.1592477786 tonnes/day\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h1 = 3037.3 # Enthalpy at state 1 in kJ/kg\n",
+ "x = 0.96 # Steam quality\n",
+ "h2 = 561+(x*2163.8) # Enthalpy at state 2 \n",
+ "s2 = 1.6718+(x*5.3201)# Entropy at state 2 \n",
+ "s3s = s2 # Isentropic process\n",
+ "x3s = (s3s-0.6493)/7.5009 # Quality at state 3s \n",
+ "h3s = 191.83+(x3s*2392.8) # Enthalpy at state 3s \n",
+ "h23 = 0.8*(h2-h3s) # Enthalpy change in process 23\n",
+ "h3 = h2-h23 # Enthalpy at state 3\n",
+ "h5 = 561.47 # Enthalpy at state 5\n",
+ "h4 = 191.83# Enthalpy at state 4\n",
+ "Qh = 3500 # Heat addition in kJ/s\n",
+ "w = Qh/(h2-h5) # mass flow rate\n",
+ "Wt = 1500 # Turbine work\n",
+ "ws = (Wt+w*(h2-h3))/(h1-h3) # Steam flow rate \n",
+ "ws_ = 3600*ws # Steam flow rate in kg/h\n",
+ "h6 = ((ws-w)*h4+w*h5)/ws #Enthalpy at state 6\n",
+ "h7 = h6# Enthalpy at state 7\n",
+ "n_boiler = 0.85 # Boiler efficiency\n",
+ "CV = 44000 # Calorific value of fuel in kJ/kg\n",
+ "wf = (1.1*ws_*(h1-h7))/(n_boiler*CV) # Fuel consumption rate\n",
+ "\n",
+ "print \"\\n Example 12.10\\n\"\n",
+ "print \"\\n Fuel burning rate is \",wf*24/1000 ,\" tonnes/day\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.11:pg-508"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.11\n",
+ "\n",
+ "\n",
+ " The minimum pressure at which bleeding is neccessary is 10 bar\n",
+ "\n",
+ " Steam flow at turbine inlet is 0.206237542099 kg/s\n",
+ "\n",
+ " Cycle efficiency is 35.9203808526 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h1 = 3285.0 # Enthalpy at state 1 in kJ/kg\n",
+ "h2s = 3010.0 # Enthalpy at state 2s in kJ/kg\n",
+ "h3 = 3280.0 # # Enthalpy at state 3 in kJ/kg\n",
+ "h4s = 3030.0 # # Enthalpy at state 4s in kJ/kg\n",
+ "# Saturation pressure at temperature 180 degree centigrade\n",
+ "psat = 10 # In bar\n",
+ "h4 = h3-0.83*(h3-h4s) # # Enthalpy at state 4 \n",
+ "h5s = 2225.0 # # Enthalpy at state 5s in kJ/kg\n",
+ "h5 = h4-0.83*(h4-h5s) # # Enthalpy at state 5\n",
+ "h6 = 162.7 # Enthalpy at state 6 in kJ/kg\n",
+ "h7 = h6 # # Enthalpy at state 7 \n",
+ "h8 = 762.81# Enthalpy at state 8 in kJ/kg\n",
+ "h2 = h1-0.785*(h1-h2s) #Enthalpy at state 2 \n",
+ "m = (h8-h7)/(h4-h7) # regenerative mass flow\n",
+ "n_cycle = ((h1-h2)+(h3-h4)+(1-m)*(h4-h5))/((h1-h8)+(h3-h2)) # Cycle efficiency\n",
+ "\n",
+ "print \"\\n Example 12.11\\n\"\n",
+ "print \"\\n The minimum pressure at which bleeding is neccessary is \",psat ,\" bar\"\n",
+ "print \"\\n Steam flow at turbine inlet is \",m ,\" kg/s\"\n",
+ "print \"\\n Cycle efficiency is \",n_cycle*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n",
+ "# Part A and Part B are theoretical problems\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.12:pg-510"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 12.12 \n",
+ "\n",
+ "\n",
+ " Overall efficiency of the cycle is 52.7981817715 percent\n",
+ "\n",
+ " Flow through the mercury turbine is math.exp kg/h 593428.190307\n",
+ "\n",
+ " Useful work done in binary vapor cycle is 28.3728027889 MW\n",
+ "\n",
+ " Overall efficiency is 46.1693685319 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# From table \n",
+ "h1 = 2792.2 # Enthalpy at state 1 in kJ/kg \n",
+ "h4 = 122.96# Enthalpy at state 4 in kJ/kg \n",
+ "hb = 254.88 # Enthalpy at state b in kJ/kg \n",
+ "hc = 29.98# Enthalpy at state c in kJ/kg \n",
+ "ha = 355.98 # Enthalpy at state a in kJ/kg \n",
+ "hd = hc # Isenthalpic process\n",
+ "h2 = 1949.27 # # Enthalpy at state 2 in kJ/kg \n",
+ "#\n",
+ "m = (h1-h4)/(hb-hc) # Amount of mercury circulating\n",
+ "Q1t = m*(ha-hd) # Heat addition\n",
+ "W1t = m*(ha-hb) + (h1-h2) # Turbine work\n",
+ "n = W1t/Q1t # first law efficiency\n",
+ "\n",
+ "print \"\\n Example 12.12 \\n\"\n",
+ "print \"\\n Overall efficiency of the cycle is \",n*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "S = 50000 # Stem flow rate through turbine in kg/h\n",
+ "wm = S*m # mercury flow rate\n",
+ "print \"\\n Flow through the mercury turbine is math.exp kg/h\",wm\n",
+ "\n",
+ "Wt = W1t*S/3600 # Turbine work\n",
+ "print \"\\n Useful work done in binary vapor cycle is \",Wt/1e3 ,\" MW\"\n",
+ "nm = 0.85 # Internal efficiency of mercury turbine\n",
+ "ns = 0.87 # Internal efficiency of steam turbine\n",
+ "WTm = nm*(ha-hb) # turbine work of mercury based cycle\n",
+ "hb_ = ha-WTm # Enthalpy at state b in kJ/kg\n",
+ "m_ = (h1-h4)/(hb_-hc) # mass flow rate of mercury\n",
+ "h1_ = 3037.3 # Enthalpy at state 1 in kJ/kg\n",
+ "Q1t = m_*(ha-hd)+(h1_-h1) # Heat addition\n",
+ "x2_ = (6.9160-0.4226)/(8.47-0.4226) # steam quality\n",
+ "h2_ = 121+(0.806*2432.9) # Enthalpy at state 2 in kJ/kg \n",
+ "WTst = ns*(h1_-h2_) # Turbine work\n",
+ "WTt = m_*(ha-hb_)+WTst # Total turbine work\n",
+ "N = WTt/Q1t #Overall efficiency \n",
+ "print \"\\n Overall efficiency is \",N*100 ,\" percent\"\n",
+ "# The answers vary due to round off error\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13_ZusP0LZ.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13_ZusP0LZ.ipynb
new file mode 100644
index 00000000..7d2de00a
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13_ZusP0LZ.ipynb
@@ -0,0 +1,641 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13: Gas power cycle"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.1:pg-554"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 13.1\n",
+ "\n",
+ "\n",
+ " Cycle efficiency is 56.4724718352 percent\n",
+ "\n",
+ " Maximum temperature in the cycle is 3632.38927303 K\n",
+ "\n",
+ " Maximum pressure in the cycle is 9.43477733254 MPa\n",
+ "\n",
+ " Mean effective pressure is 1.53325865881 MPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T1 = 35 # Air inlet temperature in degree Celsius\n",
+ "P1 = 0.1 # Air inlet pressure in MPa\n",
+ "Q1 = 2100 # Heat supply in kJ/kg\n",
+ "R = 0.287 # gas constant\n",
+ "rk = 8 # Compression ratio\n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "n_cycle = 1-(1/rk**(g-1)) # cycle efficiency \n",
+ "v1 = (R*(T1+273))/(P1*1e3) # Initial volume\n",
+ "v2 = v1/8 # Volume after compression\n",
+ "T2 = (T1+273)*(v1/v2)**(g-1) # Temperature after compression\n",
+ "cv = 0.718 # Constant volume heat capacity in kJ/kg\n",
+ "T3 = Q1/cv + T2 # Temperature at after heat addition\n",
+ "P21 = (v1/v2)**g # Pressure ratio\n",
+ "P2 = P21*P1 # Pressure after compression\n",
+ "P3 = P2*(T3/T2) # Pressure after heat addition\n",
+ "Wnet = Q1*n_cycle # Net work output\n",
+ "Pm = Wnet/(v1-v2) # Mean pressure\n",
+ "print \"\\n Example 13.1\\n\"\n",
+ "print \"\\n Cycle efficiency is \",n_cycle*100 ,\" percent\"\n",
+ "print \"\\n Maximum temperature in the cycle is \",T3 ,\" K\"\n",
+ "print \"\\n Maximum pressure in the cycle is \",P3 ,\" MPa\"\n",
+ "print \"\\n Mean effective pressure is \",Pm/1e3 ,\" MPa\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.2:pg-555"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 13.2\n",
+ "\n",
+ "\n",
+ " Air standard efficiency is 59.8676909231 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "rk = 14.0 # Compression ratio\n",
+ "k = 6.0 # cutoff percentage ratio\n",
+ "rc = k/100*(rk-1)+1\n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "n_diesel = 1.0-((1.0/g))*(1.0/rk**(g-1))*((rc**(g-1))/(rc-1)) # Cycle efficiency\n",
+ "print \"\\n Example 13.2\\n\"\n",
+ "print \"\\n Air standard efficiency is \",n_diesel*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.3:pg-556"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 13.3\n",
+ "\n",
+ "\n",
+ " Cut-off ratio is 2.00789702047\n",
+ "\n",
+ " Heat supplied per kg of air is 884.346993978 kJ/kg\n",
+ "\n",
+ " Cycle efficiency is 61.3340410825 percent\n",
+ "\n",
+ " Mean effective pressure is 699.968703831 kPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "rk = 16 # Compression ratio\n",
+ "T1 = 15 # Air inlet temperature in degree Celsius\n",
+ "P1 = 0.1 # Air inlet pressure in MPa\n",
+ "T3 = 1480 # Highest temperature in cycle in degree Celsius\n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "R = 0.287 # Gas constant\n",
+ "T2 = (T1+273)*(rk**(g-1)) # Temperature after compression\n",
+ "rc = (T3+273)/T2 # cut off ratio\n",
+ "cp = 1.005 # Constant pressure heat constant\n",
+ "cv = 0.718 # Constant volume heat constant\n",
+ "Q1 = cp*(T3+273-T2) # Heat addition\n",
+ "T4 = (T3+273)*((rc/rk)**(g-1)) # Temperature after heat addition\n",
+ "Q2 = cv*(T4-T1-273) # Heat rejection\n",
+ "n = 1-(Q2/Q1) # cycle efficiency\n",
+ "n_ = 1-((1/g))*(1/rk**(g-1))*((rc**(g-1))/(rc-1)) # cycle efficiency from another formula\n",
+ "Wnet = Q1*n # Net work \n",
+ "v1 = (R*(T1+273))/(P1*1e3) # Volume before compression\n",
+ "v2 = v1/rk # Volume after compression\n",
+ "Pm = Wnet/(v1-v2) # Mean pressure\n",
+ "print \"\\n Example 13.3\\n\"\n",
+ "print \"\\n Cut-off ratio is \",rc\n",
+ "print \"\\n Heat supplied per kg of air is \",Q1 ,\" kJ/kg\"\n",
+ "print \"\\n Cycle efficiency is \",n*100 ,\" percent\"\n",
+ "print \"\\n Mean effective pressure is \",Pm ,\" kPa\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.4:pg-558"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 13.4\n",
+ "\n",
+ "\n",
+ " Efficiency of the cycle is 66.3143793932 percent\n",
+ "\n",
+ " Mean effective pressure is 4.45799460092 bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T1 = 50.0 # Temperature before compression stroke in degree Celsius\n",
+ "rk = 16.0 # Compression ratio\n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "P3 = 70.0 # Maximum cycle pressure in bar\n",
+ "cv = 0.718 # Constant volume heat addition capacity\n",
+ "cp = 1.005 # Constant pressure heat addition capacity\n",
+ "R = 0.287 # Gas constant\n",
+ "T2 = (T1+273)*((rk**(g-1))) #Temperature after compression stroke \n",
+ "P1 = 1.0 # Pressure before compression in bar\n",
+ "P2 = P1*(rk)**g # Pressure after compression\n",
+ "T3 = T2*(P3/P2) # Temperature after constant volume heat addition\n",
+ "Q23 = cv*(T3-T2) # Constant volume heat added\n",
+ "T4 = (Q23/cp)+T3 # Temperature after constant pressure heat addition\n",
+ "v43 = T4/T3 # cut off ratio \n",
+ "v54 = rk/v43 # Expansion ratio\n",
+ "T5 = T4*(1/v54)**(g-1) # Temperature after expansion\n",
+ "P5 = P1*(T5/(T1+273)) # Pressure after expansion\n",
+ "Q1 = cv*(T3-T2)+cp*(T4-T3) # Total heat added\n",
+ "Q2 = cv*(T5-T1-273) # Heat rejected\n",
+ "n_cycle = 1-(Q2/Q1) # Cycle efficiency\n",
+ "v1 = (R*(T1+273))/(P1*1e2) # Volume before compression \n",
+ "v2 = (1/16)*v1 # Swept volume\n",
+ "Wnet = Q1*n_cycle # Net work done\n",
+ "Pm = Wnet/(v1-v2) # Mean pressure\n",
+ "print \"\\n Example 13.4\\n\"\n",
+ "print \"\\n Efficiency of the cycle is \",n_cycle*100 ,\" percent\"\n",
+ "print \"\\n Mean effective pressure is \",Pm/100 ,\" bar\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.5:pg-559"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 13.5\n",
+ "\n",
+ "\n",
+ " The percentage increase in cycle efficiency \n",
+ " due to regeneration is 41.4076056717 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P1 = 0.1 # Air pressure at turbine inlet in MPa\n",
+ "T1 = 30 # Air temperature at turbine inlet in degree Celsius\n",
+ "T3 = 900 # Maximum cycle temperature at turbine inlet in degree Celsius\n",
+ "rp = 6 # Pressure ratio\n",
+ "nt = 0.8 # Turbine efficiency\n",
+ "nc = 0.8# Compressor efficiency\n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "cv = 0.718 # Constant volume heat capacity\n",
+ "cp = 1.005 # Constant pressure heat capacity\n",
+ "R = 0.287 # Gas constant\n",
+ "T2s = (T1+273)*(rp)**((g-1)/g)\n",
+ "T4s = (T3+273)/((rp)**((g-1)/g))\n",
+ "T21 = (T2s-T1-273)/nc # Temperature raise due to compression\n",
+ "T34 = nt*(T3+273-T4s) # Temperature drop due to expansion\n",
+ "Wt = cp*T34 # Turbine work\n",
+ "Wc = cp*T21 # Compressor work\n",
+ "T2 = T21+T1+273 # Temperature after compression\n",
+ "Q1 = cp*(T3+273-T2) # Heat added\n",
+ "n = (Wt-Wc)/Q1 # First law efficiency\n",
+ "T4 = T3+273-T34 # Temperature after expansion\n",
+ "T6 = 0.75*(T4-T2) + T2 # Regeneration temperature \n",
+ "Q1_ = cp*(T3+273-T6)# Heat added\n",
+ "n_ = (Wt-Wc)/Q1_ #cycle efficiency\n",
+ "I = (n_-n)/n # Fractional increase in cycle efficiency\n",
+ "print \"\\n Example 13.5\\n\"\n",
+ "print \"\\n The percentage increase in cycle efficiency \\n due to regeneration is \",I*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.6:pg-560"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 13.6\n",
+ "\n",
+ "\n",
+ " Maximum work done per kg of air is 239.466740619 kJ/kg\n",
+ "\n",
+ " Cycle efficiency is 47.1237354986 percent\n",
+ "\n",
+ " Ratio of Brayton and Carnot efficiency is 0.654123779948\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "cp = 1.005 # Constant pressure heat capacity\n",
+ "Tmax = 1073.0 # Maximum cycle temperature in K\n",
+ "Tmin = 300.0# Minimum cycle temperature in K\n",
+ "Wnet_max = cp*(math.sqrt(Tmax)-math.sqrt(Tmin))**2 # maximum work\n",
+ "n_cycle = 1.0-math.sqrt(Tmin/Tmax) # cycle efficiency\n",
+ "n_carnot = 1.0-(Tmin/Tmax) # Carnot efficiency\n",
+ "r = n_cycle/n_carnot # Efficiency ratio\n",
+ "print \"\\n Example 13.6\\n\"\n",
+ "print \"\\n Maximum work done per kg of air is \",Wnet_max ,\" kJ/kg\"\n",
+ "print \"\\n Cycle efficiency is \",n_cycle*100 ,\" percent\"\n",
+ "print \"\\n Ratio of Brayton and Carnot efficiency is \",r\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.7:pg-561"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 13.7\n",
+ "\n",
+ "\n",
+ " The thermal efficiency of the cycle is 40.0663025288 percent\n",
+ "\n",
+ " Work ratio is 0.544951697902\n",
+ "\n",
+ " Power output is 40.0663025288 MW\n",
+ "\n",
+ " Energy flow rate of the exhaust gas stream is 20.5297861501 MW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "rp = 6 # pressure ratio\n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "cv = 0.718 # Constant volume heat capacity\n",
+ "cp = 1.005 #Constant pressure heat capacity\n",
+ "R = 0.287 # Gas constant\n",
+ "T1 = 300 # Minimum temperature in K\n",
+ "T3 = 1100 # Maximum cycle temperature in K\n",
+ "T0 = 300 # Atmospheric temperature in K\n",
+ "n_cycle = 1-(1/rp**((g-1)/g)) # cycle efficiency\n",
+ "T2 = (T1)*(rp**((g-1)/g)) # Temperature after compression\n",
+ "T4 = (T3)/(rp**((g-1)/g)) # Temperature after expansion\n",
+ "Wc = cp*(T2-T1) # Compressor work\n",
+ "Wt = cp*(T3-T4) # Turbine work\n",
+ "WR = (Wt-Wc)/Wt # Work ratio\n",
+ "Q1 = 100 # Heat addition in MW\n",
+ "PO = n_cycle*Q1 # Power output\n",
+ "m_dot = (Q1*1e06)/(cp*(T3-T2)) # Mass flow rate\n",
+ "R = m_dot*cp*T0*((T4/T0)-1-math.log(T4/T0)) # Exergy flow rate\n",
+ "print \"\\n Example 13.7\\n\"\n",
+ "print \"\\n The thermal efficiency of the cycle is \",n_cycle*100 ,\" percent\"\n",
+ "print \"\\n Work ratio is \",WR\n",
+ "print \"\\n Power output is \",PO ,\" MW\"\n",
+ "print \"\\n Energy flow rate of the exhaust gas stream is \",R/1e6 ,\" MW\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.8:pg-562"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 13.8\n",
+ "\n",
+ "\n",
+ " Percentage of air that may be taken from the compressor is 11.5044247788 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "nc = 0.87 # Compressor efficiency \n",
+ "nt = 0.9 # Turbine efficiency\n",
+ "T1 = 311 # Compressor inlet temperature in K\n",
+ "rp = 8 # compressor pressure ratio\n",
+ "P1 = 1 # Initial pressure in atm\n",
+ "T3 = 1367 # Turbine inlet temperature\n",
+ "P2 = P1*rp # Final pressure \n",
+ "P3 = 0.95*P2 # Actual pressure after compression\n",
+ "P4 = 1 # Atmospheric pressure\n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "cv = 0.718 # Constant volume heat capacity\n",
+ "cp = 1.005 # Constant pressure heat capacity\n",
+ "R = 0.287 # Gas constant\n",
+ "# With no cooling\n",
+ "T2s = T1*((P2/P1)**((g-1)/g)) # Ideal temperature after compression\n",
+ "T2 = T1 + (T2s-T1)/0.87 # Actual temperature after compression\n",
+ "T4s = T3*(P4/P3)**((g-1)/g) # Ideal temperature after expansion\n",
+ "n = (((T3-T4s)*nt)-((T2s-T1)/nc))/(T3-T2) # cycle efficiency\n",
+ "# With cooling\n",
+ "n_cycle = n-0.05\n",
+ "x = 0.13 # Fluid quality\n",
+ "r = x/(x+1) # \n",
+ "print \"\\n Example 13.8\\n\"\n",
+ "print \"\\n Percentage of air that may be taken from the compressor is \",r*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.9:pg-563"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 13.9 \n",
+ "\n",
+ "\n",
+ " Optimum specific output is 1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Given that\n",
+ "nc = 0.85 # Compressor efficiency\n",
+ "nt = 0.9 # Turbine efficiency\n",
+ "r = 3.5 # Ratio of max and min temperature \n",
+ "gama = 1.4 # Ratio of heat capacities for air\n",
+ "print \"\\n Example 13.9 \\n\"\n",
+ "x = (gama-1)/gama\n",
+ "r_opt = ((nc*nt*r)**(2/3))**(1/x)\n",
+ "print \"\\n Optimum specific output is \",r_opt\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.10:pg-566"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 13.10 \n",
+ "\n",
+ "\n",
+ " The temperature of the gases at the turbine exit is 1114.47439653 K,\n",
+ " The pressure of the gases at the turbine exit is 311.998817219 kN/m**2,\n",
+ " The velocity of gases at the nozzle exit is 1.0 m/sec,\n",
+ " The propulsive efficiency of the cycle is -10.6673736259 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Given that\n",
+ "v = 300.0 # Aircraft velocity in m/s\n",
+ "p1 = 0.35 # Pressure in bar\n",
+ "t1 = -40.0 # Temperature in degree centigrade\n",
+ "rp = 10.0 # The pressure ratio of compressor \n",
+ "t4 = 1100.0 # Temperature of gases at turbine intlet in degree centigrade\n",
+ "ma = 50.0 # Mass flow rate of air at the inlet of compressor in kg/s\n",
+ "cp = 1.005 # Heat capacity of air at constant pressure in kJ/kg-K\n",
+ "gama=1.4 # Ratio of heat capacities for air\n",
+ "print \"\\n Example 13.10 \\n\"\n",
+ "T1 = t1+273\n",
+ "T4 = t4+273\n",
+ "T2 = T1 + (v**2)/(2*cp)*(10**-3)\n",
+ "p2 = p1*(100)*((T2/T1)**(gama/(gama-1)))\n",
+ "p3 = rp*p2\n",
+ "p4 =p3\n",
+ "T3 = T2*((p3/p2)**((gama-1)/gama))\n",
+ "T5 = T4-T3+T2\n",
+ "p5 = ((T5/T4)**(gama/(gama-1)))*(p4)\n",
+ "p6 = p1*100\n",
+ "T6 = T5*((p6/p5)**((gama-1)/gama))\n",
+ "V6 = (2*cp*(T5-T6)*1000)**(1/2)\n",
+ "Wp = ma*(V6-v)*v*(10**-6)\n",
+ "Q1 = ma*cp*(T4-T3)*(10**-3)\n",
+ "np = Wp/Q1\n",
+ "print \"\\n The temperature of the gases at the turbine exit is \",T5 ,\" K,\\n The pressure of the gases at the turbine exit is \",p5 ,\" kN/m**2,\\n The velocity of gases at the nozzle exit is \",V6 ,\" m/sec,\\n The propulsive efficiency of the cycle is \",np*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.11:pg-567"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 13.11 \n",
+ "\n",
+ "\n",
+ " Air fuel ratio is 39.6515678976\n",
+ "\n",
+ " Overall efficiency of combined plant is 53.5993550102 percent \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Ta = 15 # Atmospheric temperature in degree Celsius \n",
+ "rp = 8 # pressure ratio\n",
+ "g = 1.33 # heat capacity ratio for gas\n",
+ "g1 = 1.40 # heat capacity ratio for air\n",
+ "cv = 0.718 # Constant volume heat capacity\n",
+ "cpa = 1.005 # Constant pressure heat capacity for air\n",
+ "cpg = 1.11 # Constant pressure heat capacity for gas\n",
+ "R = 0.287 # Gas constant\n",
+ "Tb = (Ta+273)*(rp)**((g1-1)/g1) # Temperature after compression\n",
+ "Tc = 800 # Temperature after heat addition in degree Celsius\n",
+ "Td = (Tc+273)/((rp)**((g-1)/g)) # Temperature after expansion\n",
+ "Wgt = cpg*(Tc+273-Td)-cpa*(Tb-Ta-273)\n",
+ "Q1 = cpg*(Tc+273-Tb)\n",
+ "Q1_ = cpg*(Tc+273-Td)\n",
+ "h1 = 3775 # Enthalpy at state 1 in kJ/kg\n",
+ "h2 = 2183 # Enthalpy at state2 in kJ/kg\n",
+ "h3 = 138 # Enthalpy at state3 in kJ/kg\n",
+ "h4 = h3 # Isenthalpic process\n",
+ "Q1_st = h1-h3 # Total heat addition\n",
+ "Q_fe = cpg*(Tc-100) # Heat transfer by steam\n",
+ "was = Q1_st/Q_fe # air steam mass ratio\n",
+ "Wst = h1-h2# work done by steam turbine\n",
+ "PO = 190e03 # Power output in kW\n",
+ "ws = PO/(was*Wgt+Wst)# steam flow rate\n",
+ "wa = was*ws # Air flow rate\n",
+ "CV = 43300 # Calorific volume of fuel in kJ/kg\n",
+ "waf = CV/(Q1+Q1_) # Air fuel ratio\n",
+ "FEI = (wa/waf)*CV # Fuel energy input\n",
+ "noA = PO/FEI # combined cycle efficiency\n",
+ "\n",
+ "print \"\\n Example 13.11 \\n\"\n",
+ "print \"\\n Air fuel ratio is \",waf\n",
+ "print \"\\n Overall efficiency of combined plant is \",noA*100,\" percent \"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter14_HgYvpWb.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter14_HgYvpWb.ipynb
new file mode 100644
index 00000000..eab55652
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter14_HgYvpWb.ipynb
@@ -0,0 +1,735 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: Refrigeration cycle"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.1:pg-602"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.1\n",
+ "\n",
+ "\n",
+ " Power required to drive the plane is 12.9850746269 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T2 = -5.0 # Cold storage temperature in degree Celsius\n",
+ "T1 = 35.0 # Surrounding temperature in degree Celsius\n",
+ "COP = (T2+273)/((T1+273)-(T2+273))\n",
+ "ACOP = COP/3 # Actual COP\n",
+ "Q2 = 29.0 # Heat leakage in kW\n",
+ "W = Q2/ACOP\n",
+ "print \"\\n Example 14.1\\n\"\n",
+ "print \"\\n Power required to drive the plane is \",W ,\" kW\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.2:pg-603"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.2\n",
+ "\n",
+ "\n",
+ " The rate of heat removal is 8.5572 kW\n",
+ "\n",
+ " Power input to the compressor is 2.1606 kW\n",
+ "\n",
+ " The heat rejection rate in the condenser is 10.7178 kW\n",
+ "\n",
+ " COP is 3.9605665093 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# At P = 0.14 MPa\n",
+ "h1 = 236.04 # Enthalpy at state 1 in kJ/kg\n",
+ "s1 = 0.9322 # Entropy at state 2 in kJ/kgK\n",
+ "s2 = s1 # Isenthalpic process\n",
+ "# At P = 0.8 MPa\n",
+ "h2 = 272.05 # Enthalpy at state 2 in kJ/kg\n",
+ "h3 = 93.42 # Enthalpy at state 3 in kJ/kg\n",
+ "h4 = h3 # Isenthalpic process\n",
+ "m = 0.06 # mass flow rate in kg/s\n",
+ "Q2 = m*(h1-h4) # Heat absorption\n",
+ "Wc = m*(h2-h1) # Compressor work\n",
+ "Q1 = m*(h2-h4) # Heat rejection in evaporator\n",
+ "COP = Q2/Wc # coefficient of performance\n",
+ "\n",
+ "print \"\\n Example 14.2\\n\"\n",
+ "print \"\\n The rate of heat removal is \",Q2 ,\" kW\"\n",
+ "print \"\\n Power input to the compressor is \",Wc ,\" kW\"\n",
+ "print \"\\n The heat rejection rate in the condenser is \",Q1 ,\" kW\"\n",
+ "print \"\\n COP is \",COP ,\" kW\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.3:pg-604"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.3\n",
+ "\n",
+ "\n",
+ " Refrigerant flow rate is 0.179046449765 kg/s\n",
+ "\n",
+ " Volume flow rate is 0.0137865766319 m**3/s\n",
+ "\n",
+ " Compressor discharge temperature is 48.0 degree Celsius \n",
+ "\n",
+ " Pressure ratio is 4.38417305586\n",
+ "\n",
+ " Heat rejected to the condenser is 24.1390423573 kW\n",
+ "\n",
+ " Flash gas percentage is 30.5290768345 percent\n",
+ "\n",
+ " COP is 4.14187643021 kW\n",
+ "\n",
+ " Power required to drive the compressor is 4.69459791283 kW\n",
+ "\n",
+ " Ratio of COP of cycle with Carnot refrigerator is 0.787428979127\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h1 = 183.19 # Enthalpy at state 1 in kJ/kg\n",
+ "h2 = 209.41 # Enthalpy at state 2 in kJ/kg\n",
+ "h3 = 74.59 # Enthalpy at state 3 in kJ/kg\n",
+ "h4 = h3 # Isenthalpic process\n",
+ "T1 = 40.0 # Evaporator temperature in degree Celsius \n",
+ "T2 = -10.0 # Condenser temperature in degree Celsius\n",
+ "W = 5.0 # Plant capacity in tonnes of refrigeration\n",
+ "w = (W*14000/3600)/(h1-h4) # Refrigerant flow rate\n",
+ "v1 = 0.077 # Specific volume of vapor in m**3/kg\n",
+ "VFR = w*v1 # volume flow rate\n",
+ "T = 48.0 # Compressor discharge temperature in degree Celsius\n",
+ "P2 = 9.6066 # Pressure after compression\n",
+ "P1 = 2.1912 # Pressure before compression\n",
+ "rp = P2/P1 # Pressure ratio\n",
+ "Q1 = w*(h2-h3) # Heat rejected in condenser\n",
+ "hf = 26.87 # Enthalpy of fluid in kJ/kg\n",
+ "hfg = 156.31# Latent heat of vaporization in kJ/kg\n",
+ "x4 = (h4-hf)/hfg # quality of refrigerant\n",
+ "COP_v = (h1-h4)/(h2-h1) # Actual coefficient of performance of cycle\n",
+ "PI = w*(h2-h1) # Power input\n",
+ "COP = (T2+273)/((T1+273)-(T2+273)) # Ideal coefficient of performance\n",
+ "r = COP_v/COP\n",
+ "print \"\\n Example 14.3\\n\"\n",
+ "print \"\\n Refrigerant flow rate is \",w ,\" kg/s\"\n",
+ "print \"\\n Volume flow rate is \",VFR ,\" m**3/s\"\n",
+ "print \"\\n Compressor discharge temperature is \",T ,\" degree Celsius \"\n",
+ "print \"\\n Pressure ratio is \",rp\n",
+ "print \"\\n Heat rejected to the condenser is \",Q1 ,\" kW\"\n",
+ "print \"\\n Flash gas percentage is \",x4*100 ,\" percent\"\n",
+ "print \"\\n COP is \",COP_v ,\" kW\"\n",
+ "print \"\\n Power required to drive the compressor is \",PI ,\" kW\"\n",
+ "print \"\\n Ratio of COP of cycle with Carnot refrigerator is \",r\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.4:pg-605"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.4\n",
+ "\n",
+ "\n",
+ " Refrigeration effect is 126 kJ/kg\n",
+ "\n",
+ " Refrigerant flow rate is 0 kg/s\n",
+ "\n",
+ " Diameter of cylinder is 100.0 cm\n",
+ "\n",
+ " Length of cylinder is 110.0 cm\n",
+ "\n",
+ " COP is 4\n",
+ "\n",
+ " Power required to drive the compressor is 0 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h3 = 882 # Enthalpy at state 3 in kJ/kg\n",
+ "h2 = 1034 # Enthalpy at state 2 in kJ/kg\n",
+ "h6 = 998 # Enthalpy at state 6 in kJ/kg\n",
+ "h1 = 1008 # Enthalpy at state 1 in kJ/kg\n",
+ "v1 = 0.084 # Specific volume at state 1 in m**3/kg\n",
+ "t4 = 25 # Temperature at state 4 in degree Celsius\n",
+ "m = 10 # mass flow rate in kg/s\n",
+ "h4 = h3-h1+h6 \n",
+ "h5 = h4 # isenthalpic process\n",
+ "w = (m*14000)/((h6-h5)*3600) # in kg/s\n",
+ "VFR = w*3600*v1 # Volume flow rate in m**3/h\n",
+ "ve = 0.8 # volumetric efficiency\n",
+ "CD = VFR/(ve*60) # Compressor displacement in m**3/min\n",
+ "N = 900 # Number of strokes per minute\n",
+ "n = 2 # number of cylinder\n",
+ "\n",
+ "D = ((CD*4)/(math.pi*1.1*N*n))**(1/3) # L = 1.1D L = length D = diameter\n",
+ "L = 1.1*D\n",
+ "COP = (h6-h5)/(h2-h1) # coefficient of performance\n",
+ "PI = w*(h2-h1) # Power input\n",
+ "\n",
+ "print \"\\n Example 14.4\\n\"\n",
+ "print \"\\n Refrigeration effect is \",h6-h5 ,\" kJ/kg\"\n",
+ "print \"\\n Refrigerant flow rate is \",w ,\" kg/s\"\n",
+ "print \"\\n Diameter of cylinder is \",D*100 ,\" cm\"\n",
+ "print \"\\n Length of cylinder is \",L*100 ,\" cm\"\n",
+ "print \"\\n COP is \",COP\n",
+ "print \"\\n Power required to drive the compressor is \",PI ,\" kW\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.5:pg-607"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.5\n",
+ "\n",
+ "\n",
+ " Increase in work of compression for single stage is 15.719846307 percent\n",
+ "\n",
+ " Increase in COP for 2 stage compression is 15.719846307 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P2 = 1554.3 # Pressure at state 2 in kPa\n",
+ "P1 = 119.5# Pressure at state 1 in kPa\n",
+ "Pi = math.sqrt(P1*P2)\n",
+ "h1 = 1404.6 # Enthalpy at state1 in kJ/kg\n",
+ "h2 = 1574.3 # Enthalpy at state2 in kJ/kg\n",
+ "h3 = 1443.5 # Enthalpy at state3 in kJ/kg\n",
+ "h4 = 1628.1# Enthalpy at state4 in kJ/kg\n",
+ "h5 = 371.7 # Enthalpy at state5 in kJ/kg\n",
+ "h6 = h5 # Isenthalpic process\n",
+ "h7 = 181.5# Enthalpy at state7 in kJ/kg\n",
+ "w = 30 # capacity of plant in tonnes of refrigeration\n",
+ "m2_dot = (3.89*w)/(h1-h7) # mass flow rate in upper cycle\n",
+ "m1_dot = m2_dot*((h2-h7)/(h3-h6))# mass flow rate in lower cycle\n",
+ "Wc_dot = m2_dot*(h2-h1)+m1_dot*(h4-h3) # Compressor work\n",
+ "COP = w*3.89/Wc_dot # Coefficient of performance of cycle\n",
+ "# single stage\n",
+ "h1_ = 1404.6 #Enthalpy at state1 in kJ/kg \n",
+ "h2_ = 1805.1 # Enthalpy at state2 in kJ/kg \n",
+ "h3_ = 371.1 # Enthalpy at state3 in kJ/kg \n",
+ "h4_ = h3_ # Isenthalpic process\n",
+ "m_dot = (3.89*30)/(h1_-h4_) # mass flow rate in cycle\n",
+ "Wc = m_dot*(h2_-h1_) # Compressor work\n",
+ "COP_ = w*3.89/Wc # Coefficient of performance of cycle\n",
+ "IW = (Wc-Wc_dot)/Wc_dot # Increase in compressor work\n",
+ "ICOP = (COP-COP_)/COP_ # Increase in COP for 2 stage compression\n",
+ "print \"\\n Example 14.5\\n\"\n",
+ "print \"\\n Increase in work of compression for single stage is \",IW*100 ,\" percent\"\n",
+ "print \"\\n Increase in COP for 2 stage compression is \",ICOP*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.6:pg-608"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.6\n",
+ "\n",
+ "\n",
+ " The COP of the plant is 5.93506047745 , \n",
+ " The mass flow rate of refrigerant in the evaporator is 3.38045251321 kg/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "te = -10 # Evaporator temperature in degree celsius\n",
+ "pc = 7.675 # Condenser pressure in bar\n",
+ "pf = 4.139 # Flash chamber pressure in bar\n",
+ "P = 100 # Power input to compressor in kW\n",
+ "print \"\\n Example 14.6\\n\"\n",
+ "# From the property table of R-134a,\n",
+ "h7 = 140.96 # In kJ/kg\n",
+ "hf = 113.29 # In kJ/kg\n",
+ "hfg = 300.5-113.29 # In kJ/kg\n",
+ "hg = 300.5 # In kJ/kg\n",
+ "h1 = 288.86 # In kJ/kg\n",
+ "s1 = 1.17189 # # In kJ/kgK\n",
+ "s2 =s1\n",
+ "#By interpolation \n",
+ "h2 = 303.468 # In kJ/kg\n",
+ "x8 = (h7-hf)/hfg\n",
+ "m1=x8\n",
+ "h5 = (1-m1)*h2 + m1*hg\n",
+ "# By interpolation\n",
+ "s5 = 1.7174 # In kJ/kgK\n",
+ "s6=s5\n",
+ "h6 = 315.79 # In kJ/kg\n",
+ "m = P/((h6-h5) + (1-m1)*(h2-h1))\n",
+ "m_e = (1-m1)*m\n",
+ "COP = m_e*(h1-hf)/P\n",
+ "print \"\\n The COP of the plant is \",COP ,\", \\n The mass flow rate of refrigerant in the evaporator is \",m_e ,\" kg/s\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.7:pg-609"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.7\n",
+ "\n",
+ "\n",
+ " Steam flow rate required is 0.0644023696678 kg/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "tsat = 120.2 # Saturation temperature in degree Celsius\n",
+ "hfg = 2201.9 # Latent heat of fusion in kJ/kg\n",
+ "T1 = 120.2 # Generator temperature in degree Celsius\n",
+ "T2 = 30 # Ambient temperature in degree Celsius\n",
+ "Tr = -10 # Operating temperature of refrigerator in degree Celsius\n",
+ "COP_max = (((T1+273)-(T2+273))*(Tr+273))/(((T2+273)-(Tr+273))*(T1+273)) # Ideal coefficient of performance \n",
+ "ACOP = 0.4*COP_max # Actual COP\n",
+ "L = 20 # Refrigeration load in tonnes\n",
+ "Qe = (L*14000)/3600 # Heat extraction in KW\n",
+ "Qg = Qe/ACOP # Heat transfer from generator \n",
+ "x = 0.9 # Quality of refrigerant\n",
+ "H = x*hfg # Heat extraction\n",
+ "SFR = Qg/H # Steam flow rate\n",
+ "print \"\\n Example 14.7\\n\"\n",
+ "print \"\\n Steam flow rate required is \",SFR ,\" kg/s\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.8:pg-611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.8\n",
+ "\n",
+ "\n",
+ "COP of the system is 5.50140730574\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "tf = 5 # Temperature of flash chamber in degree celsius\n",
+ "x = 0.98 # Quality of water vapour living the evaporator\n",
+ "t2 = 14 # Returning temperature of chilled water in degree celsius\n",
+ "t0 = 30 # Make up water temperature in degree celsius\n",
+ "m = 12 # Mass flow rate of chilled water in kg/s\n",
+ "nc = 0.8 # Compressor efficiecy \n",
+ "pc = 0.1 # Condenser pressure in bar\n",
+ "print \"\\n Example 14.8\\n\"\n",
+ "#From the steam table\n",
+ "hf = 58.62 # In kJ/kg at 14 degree celsius\n",
+ "hf_ = 20.93 # In kJ/kg at 5 degree celsius\n",
+ "hf__ = 125.73 # In kJ/kg at 30 degree celsius\n",
+ "hv = x*2510.7\n",
+ "Rc = m*(hf-hf_)/3.5\n",
+ "m_v = Rc*3.5/(hv-hf__)\n",
+ "# At 0.10 bar\n",
+ "hg = 2800 # In kJ/kg \n",
+ "Win = m_v*(hg-hv)/nc\n",
+ "COP = Rc*3.5/Win\n",
+ "print \"\\nCOP of the system is \",COP"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.9:pg-611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.9\n",
+ "\n",
+ "\n",
+ " COP of the refrigerator is 0.245731992881\n",
+ "\n",
+ " Driving power required is 47.4771987558 kW\n",
+ "\n",
+ " Mass flow rate is 0.64768311581 kg/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T1 = 4.0 # Compressor inlet temperature in degree Celsius\n",
+ "T3 = 55.0 # Cooling limit in heat exchanger in degree Celsius\n",
+ "rp = 3.0 # Pressure ratio\n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "cp = 1.005 # Constant volume heat capacity\n",
+ "L = 3.0 # Cooling load in tonnes of refrigeration\n",
+ "nc = 0.72 # compressor efficiency\n",
+ "T2s = (T1+273)*(rp**((g-1)/g)) # Ideal temperature after compression\n",
+ "T2 = (T1+273)+(T2s-T1-273)/nc # Actual temperature after compression\n",
+ "T4s = (T3+273)/(rp**((g-1)/g)) # Ideal temperature after expansion\n",
+ "T34 = 0.78*(T3+273-T4s) # Change in temperature during expansion process\n",
+ "T4 = T3+273-T34 # Actual temperature after expansion\n",
+ "COP = (T1+273-T4)/((T2-T1-273)-(T3+273-T4)) # Coefficient of performance of cycle\n",
+ "P = (L*14000)/(COP*3600) # Driving power required\n",
+ "m = (L*14000)/(cp*(T1+273-T4)) # Mass flow rate of air\n",
+ "print \"\\n Example 14.9\\n\"\n",
+ "print \"\\n COP of the refrigerator is \",COP\n",
+ "print \"\\n Driving power required is \",P ,\" kW\"\n",
+ "print \"\\n Mass flow rate is \",m/3600 ,\" kg/s\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.10:pg-611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.10\n",
+ "\n",
+ "\n",
+ " Power input is 4.33428165007 kW\n",
+ "\n",
+ " Heating capacity is 20.972972973 kW\n",
+ "\n",
+ " COP is 4.83885789301\n",
+ "\n",
+ " The isentropic compressor efficiency is 79.9803085002 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P1 = 2.4 #Compressor inlet pressure in bar\n",
+ "T1 = 0 # Compressor inlet temperature in degree Celsius\n",
+ "h1 = 188.9 # Enthalpy of refrigerant at state 1 in kJ/kg\n",
+ "s1 = 0.7177 # Entropy of refrigerant at state 1 in kJ/kgK\n",
+ "v1 = 0.0703 # Specific volume at state 1 in m**3/kg\n",
+ "P2 = 9 # Compressor outlet pressure in bar\n",
+ "T2 = 60 # Compressor outlet pressure in degree Celsius\n",
+ "h2 = 219.37 # Actual compressor outlet enthalpy in kJ/kgK\n",
+ "h2s = 213.27 # Ideal compressor outlet enthalpy in kJ/kgK\n",
+ "h3 = 71.93 # Enthalpy of refrigerant at state 3 in kJ/kg\n",
+ "h4 = h3 # Isenthalpic process\n",
+ "\n",
+ "A1V1 = 0.6/60 # volume flow rate in kg/s\n",
+ "m_dot = A1V1/v1 # mass flow rate\n",
+ "Wc_dot = m_dot*(h2-h1) # Compressor work\n",
+ "Q1_dot = m_dot*(h2-h3) # Heat extracted \n",
+ "COP = Q1_dot/Wc_dot # Coefficient of performance\n",
+ "nis = (h2s-h1)/(h2-h1) # Isentropic compressor efficiency\n",
+ "print \"\\n Example 14.10\\n\"\n",
+ "print \"\\n Power input is \",Wc_dot ,\" kW\"\n",
+ "print \"\\n Heating capacity is \",Q1_dot ,\" kW\"\n",
+ "print \"\\n COP is \",COP\n",
+ "print \"\\n The isentropic compressor efficiency is \",nis*100 ,\" percent\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.11:pg-611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.11\n",
+ "\n",
+ "\n",
+ " Pressure ratio for the turbine is 3.61111111111\n",
+ "\n",
+ " COP is 0.533011099882\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T1 = 275.0 # Temperature of air at entrance to compressor in K \n",
+ "T3 = 310.0 # Temperature of air at entrance to turbine in K \n",
+ "P1 = 1.0 # Inlet presure in bar\n",
+ "P2 = 4.0 # Outlet pressure in bar\n",
+ "nc = 0.8 # Compressor efficiency\n",
+ "T2s = T1*(P2/P1)**(.286) # Ideal temperature after compression\n",
+ "T2 = T1 + (T2s-T1)/nc # Actual temperature after compression\n",
+ "pr1 = 0.1 # Pressure loss in cooler in bar\n",
+ "pr2 = 0.08 #Pressure loss in condensor in bar \n",
+ "P3 = P2-0.1 # Actual pressure in condesor\n",
+ "P4 = P1+0.08 # Actual pressure in evaporator\n",
+ "PR = P3/P4 # Pressure ratio\n",
+ "T4s = T3*(1/PR)**(0.286) # Ideal temperature after expansion\n",
+ "nt = 0.85 # turbine efficiency\n",
+ "T4 = T3-(T3-T4s)*nt # Actual temperature after expansion\n",
+ "COP = (T1-T4)/((T2-T3)-(T1-T4)) # Coefficient of performance \n",
+ "print \"\\n Example 14.11\\n\"\n",
+ "print \"\\n Pressure ratio for the turbine is \",PR\n",
+ "print \"\\n COP is \",COP\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.12:pg-611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 14.12\n",
+ "\n",
+ "\n",
+ " Mass flow rate of air flowing through the cooling system is 1.16504854369\n",
+ "\n",
+ " COP is 0.255512245083\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "L = 60.0 # Cooling load in kW\n",
+ "p = 1.0 # Pressure in bar\n",
+ "t = 20.0 # Temperature in degree celsius\n",
+ "v = 900.0 # Speed of aircraft in km/h\n",
+ "p1 = 0.35 # Pressure in bar\n",
+ "T1 = 255 # Temperature in K\n",
+ "nd = .85 # Diffuser efficiency \n",
+ "rp = 6.0 # Pressure ratio of compressor\n",
+ "nc = .85 # Copressor efficiency \n",
+ "E = 0.9 # Effectiveness of air cooler\n",
+ "nt = 0.88 # Turbine efficiency \n",
+ "p_ = 0.08 # Pressure drop in air cooler in bar\n",
+ "p5 = 1.08 # Pressure in bar\n",
+ "cp = 1.005 # Heat capacity of air at constant pressure in kJ/kgK\n",
+ "gama = 1.4 # Ratio of heat capacities of air\n",
+ "print \"\\n Example 14.12\\n\"\n",
+ "V = v*(5/18)\n",
+ "T2_ = T1 + (V**2)/(2*cp*1000)\n",
+ "T2 = T2_\n",
+ "p2_ = p1*((T2_/T1)**((gama/(gama-1))))\n",
+ "p2 = p1 + nd*(p2_-p1)\n",
+ "p3 = rp*p2\n",
+ "T3_ = T2*((p3/p2)**((gama-1)/gama))\n",
+ "T3 = T2 + (T3_-T2)/nc\n",
+ "P = cp*(T3-T2)\n",
+ "p4 = p3 - p_\n",
+ "T4 = T3 - E*(T3-T2)\n",
+ "T5_ = T4/((p4/p5)**(.286))\n",
+ "T5 = T4 - (T4-T5_)/nt\n",
+ "RE = cp*(t+273 - T5)\n",
+ "m = L/51.5\n",
+ "Pr = m*P\n",
+ "COP = L/Pr\n",
+ "print \"\\n Mass flow rate of air flowing through the cooling system is \",m\n",
+ "print \"\\n COP is \",COP\n",
+ "#The answers vary due to round off error"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter15_o1Meb0U.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter15_o1Meb0U.ipynb
new file mode 100644
index 00000000..f64e81fc
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter15_o1Meb0U.ipynb
@@ -0,0 +1,760 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 15:Psychrometrics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.1:pg-631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.1\n",
+ "\n",
+ "\n",
+ " Specific humidity is 0.0186241999923 kg vap./kg dry air\n",
+ "\n",
+ " Partial pressure of water vapour is 0.0294557080928 bar\n",
+ "\n",
+ " Dew point temperature is 24.1 degree celcius\n",
+ "\n",
+ " Relative humidity is 61.3660585267 percent \n",
+ "\n",
+ " Degree of saturation is 0.602092639086\n",
+ "\n",
+ " Density of dry air is 1.12382965889 kg/m**3\n",
+ "\n",
+ " Density of water vapor is 0.0209304283244 kg/m**3\n",
+ "\n",
+ " Enthalpy of the mixture is 80.1126961785 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Ps = 0.033363 #Saturation pressure in bar\n",
+ "P = 1.0132 # Atmospheric pressure in bar\n",
+ "W2 = (0.622*Ps)/(P-Ps) # mass fraction of moisture\n",
+ "hfg2 = 2439.9 # Latent heat of vaporization in kJ/kg\n",
+ "hf2 = 109.1 # Enthalpy of liquid moisture in kJ/kg\n",
+ "cpa = 1.005 # Constant pressure heat capacity in kJ/kg\n",
+ "hg = 2559.9 # Enthalpy of gas moisture in kJ/kg\n",
+ "hw1 = hg # constant enthalpy\n",
+ "T2 = 26 # wbt in degree Celsius \n",
+ "T1 = 32 # dbt in degree Celsius \n",
+ "W1 = (cpa*(T2-T1)+(W2*hfg2))/(hw1-hf2)\n",
+ "Pw = ((W1/0.622)*P)/(1+(W1/0.622))\n",
+ "\n",
+ "Psat = 0.048 # Saturation pressure in bar at 32 degree\n",
+ "fi = Pw/Psat # Relative humidity\n",
+ "\n",
+ "mu = (Pw/Psat)*((P-Psat)/(P-Pw)) # Degree of Saturation\n",
+ "Pa = P-Pw # Air pressure\n",
+ "Ra = 0.287 # Gase constant\n",
+ "Tdb = T1+273 # dbt in K\n",
+ "rho_a = (Pa*100)/(Ra*Tdb) # Density of air \n",
+ "rho_w = W1*rho_a # Water vapor density\n",
+ "ta = 32 # air temperature in degree Celsius \n",
+ "tdb = 32 # dbt in degree Celsius \n",
+ "tdp = 24.1# Dew point temperature in degree Celsius \n",
+ "h = cpa*ta + W1*(hg+1.88*(tdb-tdp))\n",
+ "print \"\\n Example 15.1\\n\"\n",
+ "print \"\\n Specific humidity is \",W1 ,\" kg vap./kg dry air\"\n",
+ "print \"\\n Partial pressure of water vapour is \",Pw ,\" bar\"\n",
+ "print \"\\n Dew point temperature is \",tdp ,\" degree celcius\"\n",
+ "print \"\\n Relative humidity is \",fi*100 ,\" percent \"\n",
+ "print \"\\n Degree of saturation is \",mu\n",
+ "print \"\\n Density of dry air is \",rho_a ,\" kg/m**3\"\n",
+ "print \"\\n Density of water vapor is \",rho_w ,\" kg/m**3\"\n",
+ "print \"\\n Enthalpy of the mixture is \",h ,\" kJ/kg\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.2:pg-632"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.2\n",
+ "\n",
+ "\n",
+ " Humidity ratio of inlet mixture is 0.0107221417941 kg vap./kg dry air\n",
+ "\n",
+ " Relative humidity is 39.9106245278 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Ps = 2.339 # Satutation pressure in kPa\n",
+ "P = 100.0 # Atmospheric pressure in kPa\n",
+ "W2 = (0.622*Ps)/(P-Ps) # Specific humidity\n",
+ "hfg2 = 2454.1 # Latent heat of vaporization in kJ/kg\n",
+ "hf2 = 83.96 # Enthalpy of fluid in kJ/kg\n",
+ "cpa = 1.005 # COnstant pressure heat capacity of air\n",
+ "hw1 = 2556.3# ENthalpy of water\n",
+ "T2 = 20.0 # Exit tempeature of mixture in degree Celsius\n",
+ "T1 = 30.0 # Inlet tempeature of mixture in degree Celsius\n",
+ "W1 = (cpa*(T2-T1)+(W2*hfg2))/(hw1-hf2) # Specific humidity at inlet\n",
+ "Pw1 = ((W1/0.622)*P)/(1+(W1/0.622)) # pressure due to moisture\n",
+ "Ps1 = 4.246 # Saturation pressure in kPa\n",
+ "fi = (Pw1/Ps1) # Humidity ratio \n",
+ "\n",
+ "print \"\\n Example 15.2\\n\"\n",
+ "print \"\\n Humidity ratio of inlet mixture is \",W1 ,\" kg vap./kg dry air\"\n",
+ "print \"\\n Relative humidity is \",fi*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.3:pg-633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.3\n",
+ "\n",
+ "\n",
+ " Mass of spray water required is 0.00338125323083 kg moisture/m**3\n",
+ "\n",
+ " Temperature to which air must be heated is 27.0827212424 degree celcius\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Psat = 2.339 # Saturation pressure in kPa\n",
+ "fi3 = 0.50 # Humidity ratio\n",
+ "P = 101.3 # Atmospheric pressure in kPa\n",
+ "cp = 1.005 # Constant pressure heat addition in kJ/kg\n",
+ "Pw3 = fi3*Psat # Vapor pressure\n",
+ "Pa3 = P-Pw3 # Air pressure\n",
+ "W3 = 0.622*(Pw3/Pa3) # Specific humidity\n",
+ "Psa1_1 = 0.7156 # Saturation pressure in kPa\n",
+ "Pw1 = 0.7156 # moister pressure in kPa \n",
+ "Pa1 = P-Pw1 # Air pressure\n",
+ "W1 = 0.622*(Pw1/Pa1) # Specific humidity\n",
+ "W2 = W1 # Constant humidity process\n",
+ "T3 = 293.0 # Temperature at state 3 in K\n",
+ "Ra = 0.287 # Gas constant\n",
+ "Pa3 = 100.13 # Air pressure at state 3\n",
+ "va3 = (Ra*T3)/Pa3 # volume of air at state 3\n",
+ "SW = (W3-W1)/va3 # spray water \n",
+ "tsat = 9.65 # Saturation temperature in K\n",
+ "hg = 2518.0 # Enthalpy of gas in kJ/kg\n",
+ "h4 = 10.0 # Enthalpy at state 4 in kJ/kg\n",
+ "t3 = T3-273\n",
+ "t2 = ( W3*(hg+1.884*(t3-tsat))-W2*(hg-1.884*tsat) + cp*t3 - (W3-W2)*h4 )/ (cp+W2*1.884)\n",
+ "print \"\\n Example 15.3\\n\"\n",
+ "print \"\\n Mass of spray water required is \",SW ,\" kg moisture/m**3\"\n",
+ "print \"\\n Temperature to which air must be heated is \",t2 ,\" degree celcius\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.4:pg-635"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.4\n",
+ "\n",
+ "\n",
+ " Capacity of the cooling coil is 33.7880496054 tonnes\n",
+ "\n",
+ " Capacity of the heating coil is 18.7711386697 kW\n",
+ "\n",
+ " Rate of water vapor removal is 0.0319109357384 kg/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h1 = 82.0 # Enthalpy at state 1 in kJ/kg\n",
+ "h2 = 52.0 # Enthalpy at state 2 in kJ/kg\n",
+ "h3 = 47.0 # Enthalpy at state 3 in kJ/kg\n",
+ "h4 = 40.0# Enthalpy at state 4 in kJ/kg\n",
+ "W1 = 0.020 # Specific humidity at state 1\n",
+ "W2 = 0.0115# Specific humidity at state 2 \n",
+ "W3 = W2 # Constant humidity process\n",
+ "v1 = 0.887 # Specific volume at state 1\n",
+ "v = 3.33 # amount of free sir circulated\n",
+ "G = v/v1 # air flow rate\n",
+ "CC = (G*(h1-h3)*3600)/14000 # Capacity of the heating Cooling coil\n",
+ "R = G*(W1-W3) # Rate of water vapor removal\n",
+ "HC = G*(h2-h3) #Capacity of the heating coil\n",
+ "print \"\\n Example 15.4\\n\"\n",
+ "print \"\\n Capacity of the cooling coil is \",CC ,\" tonnes\"\n",
+ "print \"\\n Capacity of the heating coil is \",HC ,\" kW\"\n",
+ "print \"\\n Rate of water vapor removal is \",R ,\" kg/s\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.5:pg-636"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.5 \n",
+ "\n",
+ "\n",
+ " Final condition of air is given by\n",
+ "\n",
+ " W3 = 0.0144 kg vap./kg dry air\n",
+ "\n",
+ " h3 = 71.6666666667 kJ/kg dry air\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "W1 = 0.0058 # Humidity ratio for first stream\n",
+ "W2 = 0.0187 # Humidity ratio for second stream\n",
+ "h1 = 35.0 # Enthalpy of first stream in kJ/kg\n",
+ "h2 = 90.0# Enthalpy of second stream in kJ/kg\n",
+ "G12 = 1.0/2.0 #ratio\n",
+ "W3 = (W2+G12*W1)/(1+G12) # Final humidity ratio of mixture\n",
+ "h3 = (2.0/3.0)*h2 + (1.0/3.0)*h1# Final enthalpy of mixture\n",
+ "\n",
+ "print \"\\n Example 15.5 \\n\"\n",
+ "print \"\\n Final condition of air is given by\"\n",
+ "print \"\\n W3 = \",W3 ,\" kg vap./kg dry air\"\n",
+ "print \"\\n h3 = \",h3 ,\" kJ/kg dry air\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.6:pg-637"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.6 \n",
+ "\n",
+ "\n",
+ " The temperature of air at the end of the drying process is 38.5 degree celsius,\n",
+ " Heat rejected during the cooling process is 18.5 kJ/kg,\n",
+ " The relative humidity is 53.0 percent,\n",
+ " The dew point temperature at the end of drying process is 11.2 degree celsius,\n",
+ " The moisture removed during the drying process is 0.007 kg vap/kg dry air\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "t = 21.0 # Temperature in degreee celsius\n",
+ "w = 20.0 # Relative humidity in percentage\n",
+ "t_ = 21.0 # Final temperature of air in degree celsius\n",
+ "print \"\\n Example 15.6 \\n\"\n",
+ "# From the psychrometric chart \n",
+ "T2 = 38.5 # In degree celsius\n",
+ "h1_3 = 60.5-42 # In kJ/kg\n",
+ "fi3 = 53.0 # In percentage \n",
+ "t4 = 11.2 # In degree celsius\n",
+ "W1_2 = 0.0153-0.0083 # In kg vap /kg dry air\n",
+ "print \"\\n The temperature of air at the end of the drying process is \",T2 ,\" degree celsius,\\n Heat rejected during the cooling process is \",h1_3 ,\" kJ/kg,\\n The relative humidity is \",fi3 ,\" percent,\\n The dew point temperature at the end of drying process is \",t4 ,\" degree celsius,\\n The moisture removed during the drying process is \",W1_2 ,\" kg vap/kg dry air\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.7:pg-638"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.7 \n",
+ "\n",
+ "\n",
+ " Capacity of the cooling coil is 32.2863520408 tonnes\n",
+ "\n",
+ " Capacity of humidifier is 69.3080357143 kg/h\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h1 = 57.0 # Enthalpy at state 1 in kJ/kg \n",
+ "h2 = h1 # Isenthalpic process\n",
+ "h3 = 42.0 # Enthalpy at state 3 in kJ/kg\n",
+ "W1 = 0.0065 # Humidity ratio at sate 1\n",
+ "W2 = 0.0088 # Humidity ratio at sate 2\n",
+ "W3 = W2 # Constant humidity ratio process\n",
+ "t2 = 34.5 # Temperature at state 2\n",
+ "v1 = 0.896# Specific volume at state 1 in m**3/kg\n",
+ "n = 1500.0 # seating capacity of hall\n",
+ "a = 0.3 # amount of outdoor air supplied m**3 per person\n",
+ "G = (n*a)/0.896 # Amount of dry air supplied\n",
+ "CC = (G*(h2-h3)*60)/14000 # Cooling capacity \n",
+ "R = G*(W2-W1)*60 # Capacity of humidifier\n",
+ "\n",
+ "print \"\\n Example 15.7 \\n\"\n",
+ "print \"\\n Capacity of the cooling coil is \",CC ,\" tonnes\"\n",
+ "print \"\\n Capacity of humidifier is \",R ,\" kg/h\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.8:pg-639"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.8\n",
+ "\n",
+ "\n",
+ " Temperature of water leaving the tower is 21.8128048148 degree celcius\n",
+ "\n",
+ " Range of cooling water is 8.18719518522 degree Celsius\n",
+ "\n",
+ " Approach of cooling water is 6.61280481478 degree celcius\n",
+ "\n",
+ " Fraction of water evaporated is 0.0125 kg/kg dry air\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "twb1 = 15.2# Wbt in degree Celsius \n",
+ "twb2 = 26.7# Wbt in degree Celsius \n",
+ "tw3 = 30 # Temperature at state 3 in degree Celsius \n",
+ "h1 = 43 # Enthalpy at state 1 in kJ/kg\n",
+ "h2 = 83.5 # Enthalpy at state 2 in kJ/kg\n",
+ "hw = 84 # Enthalpy of water in kJ/kg\n",
+ "mw = 1.15 # mass flow rate of water in kg/s\n",
+ "W1 = 0.0088 # Humidity ratio of inlet stream \n",
+ "W2 = 0.0213 # Humidity ratio of exit stream \n",
+ "hw3 = 125.8 # Enthalpy of water entering tower in kJ/kg \n",
+ "hm = 84 # Enthalpy of make up water in kJ/kg \n",
+ "G = 1 # mass flow rate of dry air in kg/s\n",
+ "hw34 = (G/mw)*((h2-h1)-(W2-W1)*hw) # Enthalpy change\n",
+ "tw4 = tw3-(hw34/4.19) # Temperature of water leaving the tower\n",
+ "A = tw4-twb1 #Approach of cooling water\n",
+ "R = tw3-tw4 #Range of cooling water\n",
+ "x = G*(W2-W1) #Fraction of water evaporated \n",
+ "\n",
+ "print \"\\n Example 15.8\\n\"\n",
+ "print \"\\n Temperature of water leaving the tower is \",tw4 ,\" degree celcius\"\n",
+ "print \"\\n Range of cooling water is \",R ,\" degree Celsius\"\n",
+ "print \"\\n Approach of cooling water is \",A ,\" degree celcius\"\n",
+ "print \"\\n Fraction of water evaporated is \",x ,\" kg/kg dry air\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.9:pg-639"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.9 \n",
+ "\n",
+ "\n",
+ " Bypass factor of coolin coil is 0.415730337079\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "DBT = 40.0 # Dry bulb temperature in degree celsius\n",
+ "DBT_ = 25.0 # Dry bulb temperature after cooling and dehumidification in degree celsius\n",
+ "RH = 70.0 # Relative humidity in percentage\n",
+ "f = 30.0 # Air flow rate in cmm\n",
+ "print \"\\n Example 15.9 \\n\"\n",
+ "# From the psychrometric chart \n",
+ "v1 = 0.9125 # In m**3/kg\n",
+ "G = f/v1\n",
+ "h5 = 41.5 # In kJ/kg\n",
+ "W1 = 0.0182 # In kg vapor/kg dry air \n",
+ "h1 = 86.0 # In kJ/kg d.a.\n",
+ "W2 = 0.0136 # In kg vapor/kg dry air \n",
+ "h2 = 60.0 # In kJ/kg\n",
+ "L = G*(h1-h2)/3.5\n",
+ "Mo = G*(W1-W2)\n",
+ "x = (h2-h5)/(h1-h5)\n",
+ "print \"\\n Bypass factor of coolin coil is \",x\n",
+ "# Answer veries due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.10:pg-641"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.10 \n",
+ "\n",
+ "\n",
+ " Capacity of heating coil is 6.94444444444 kW,\n",
+ " Surface temperature of heating coil is 40.0 degree celsius,\n",
+ " Capacity of humidifier is 2.66666666667 kg/h \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "c = 75.0 # Capacity of classroom in no of perasons\n",
+ "DBT1 = 10.0 # Outdoor Dry bulb temperature in degree celsius\n",
+ "WBT1 = 8.0 # Outdoor Wet bulb temperature in degree celsius\n",
+ "DBT2 = 20.0 # Indoor Dry bulb temperature in degree celsius\n",
+ "RH2 = 50.0 # Relative humidity in percentage\n",
+ "x =0.5 # Bypass factor\n",
+ "f = 0.3 # Air flow rate per person in cmm\n",
+ "print \"\\n Example 15.10 \\n\"\n",
+ "# From the psychrometric chart \n",
+ "W1 = 0.0058 # In kg moisture/kg d.a.\n",
+ "h1 = 24.5 # In kJ/kg\n",
+ "h2 = 39.5 # In kJ/kg\n",
+ "h3 = h2\n",
+ "W3 = 0.0074 # In kg moisture/kg d.a.\n",
+ "t2 = 25.0 # In degree celsius\n",
+ "v1 = .81 # In m**3/kg d.a.\n",
+ "G = f*c/v1\n",
+ "C = G*(h2-h1)/60\n",
+ "t4 = (t2-x*DBT1)/(1-x)\n",
+ "ts = t4\n",
+ "C_H = G*(W3-W1)*60\n",
+ "print \"\\n Capacity of heating coil is \",C ,\" kW,\\n Surface temperature of heating coil is \",ts ,\" degree celsius,\\n Capacity of humidifier is \",C_H ,\" kg/h \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.11:pg-641"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.11 \n",
+ "\n",
+ "\n",
+ " DBT of air leaving the coil is 18.6 degree celsius,\n",
+ " WBT of air leaving the coil is 12.5 degree celsius,\n",
+ " Coil bypass factor is 0.525426680599\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "DBT = 31.0 # Dry bulb temperature in degree celsius\n",
+ "WBT = 18.5 # Wet bulb temperature in degree celsius\n",
+ "t = 4.4 # Effective surface temperature of coil in degree celsius\n",
+ "RE = 12.5 # Refrigeration effect by the coil in kW\n",
+ "f= 39.6 # Air flow rate in cmm\n",
+ "print \"\\n Example 15.11 \\n\"\n",
+ "# From the fig. given in the example\n",
+ "ws = 5.25 #In g/kg d.a.\n",
+ "hs = 17.7 #In kJ/kg d.a.\n",
+ "v1 = 0.872 # In m**3/kg d.a.\n",
+ "h1 = 52.5 # In kJ/kg d.a.\n",
+ "w1 = 8.2 # In g/kg d.a.\n",
+ "G = f/v1\n",
+ "h2 = h1-(RE*60)/G\n",
+ "w2 = w1-((h1-h2)/(h1-hs))*(w1-ws)\n",
+ "# From the psychrometric chart\n",
+ "t2 = 18.6 # In degree celsius\n",
+ "t_ = 12.5 # In degree celsius\n",
+ "x = (h2-hs)/(h1-hs)\n",
+ "print \"\\n DBT of air leaving the coil is \",t2 ,\" degree celsius,\\n WBT of air leaving the coil is \",t_ ,\" degree celsius,\\n Coil bypass factor is \",x \n",
+ "# Answer veries due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.12:pg-641"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.12 \n",
+ "\n",
+ "\n",
+ " Capacity of cooling coil is 100.803276106 tonnes,\n",
+ " Bypass factor of cooling coil is 0.0588235294118 ,\n",
+ " Capacity of heating coil is 22.6666666667 kW,\n",
+ " Surface temperature of heating coil is 44.1014332966 degree celsius,\n",
+ " Mass of water vapor removed is 5.22601984564 kg/min \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "c = 75.0 # Capacity of classroom in no of perasons\n",
+ "DBT1 = 35.0 # Outdoor Dry bulb temperature in degree celsius\n",
+ "RH1 = 70.0 # Outdoor relative humidity in percentage\n",
+ "DBT2 = 20.0 # Indoor Dry bulb temperature in degree celsius \n",
+ "RH1 = 60.0 # Indoor relative humidity in percentage\n",
+ "DPT = 10.0 # Cooling coil dew point temperature in degree celsius\n",
+ "x =0.25 # Bypass factor\n",
+ "f = 300.0 # Air flow rate in cmm\n",
+ "print \"\\n Example 15.12 \\n\"\n",
+ "# From the psychrometric chart \n",
+ "W1 = 0.0246 # In kg vap./kg d.a.\n",
+ "h1 = 98.0 # In kJ/kg\n",
+ "v1 = 0.907 # In m**3/kg d.a.\n",
+ "h3 = 42.0 # In kJ/kg\n",
+ "W3 = 0.0088 # In kg moisture/kg d.a.\n",
+ "h2 = 34.0 # In kJ/kg\n",
+ "hs = 30.0 # In kJ/kg\n",
+ "t2 = 12.0 # In degree celsius\n",
+ "G = f/v1\n",
+ "C = G*(h1-h2)/(60*3.5)\n",
+ "X = (h2-hs)/(h1-hs)\n",
+ "C_ = G*(h3-h2)/60\n",
+ "t4 = (DBT2-x*t2)/(1-x)\n",
+ "C_H = G*(W1-W3)\n",
+ "print \"\\n Capacity of cooling coil is \",C ,\" tonnes,\\n Bypass factor of cooling coil is \",X ,\",\\n Capacity of heating coil is \",t4 ,\" kW,\\n Surface temperature of heating coil is \",C_ ,\" degree celsius,\\n Mass of water vapor removed is \",C_H ,\" kg/min \"\n",
+ "#Answers veries due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.13:pg-641"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 15.13\n",
+ "\n",
+ "\n",
+ " Make up water flow rate is 0.127715382722 kg/s\n",
+ "\n",
+ " Volume flow rate of air is 3.39095173631 m**3/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# at 15 degree Celsius\n",
+ "Psat1 = 0.01705 # Saturation pressure in bar\n",
+ "hg1 = 2528.9 # Enthalpy in kJ/kg\n",
+ "# At 35 degree Celsius\n",
+ "Psat2 = 0.05628 # Saturation pressure in bar\n",
+ "hg2 = 2565.3 # Enthalpy in kJ/kg\n",
+ "fi1 = 0.55# Humidity ratio at state 1\n",
+ "Pw1 = fi1*Psat1 # water vapor pressure at state 1\n",
+ "fi2 = 1.0 # Humidity ratio at state 2\n",
+ "Pw2 = fi2*Psat2 # water vapor pressure at state 2 \n",
+ "P = 0.1 # Atmospheric pressure in MPa\n",
+ "W1 = (0.622*Pw1)/(P*10-Pw1)\n",
+ "W2 = (0.622*Pw2)/(P*10-Pw2)\n",
+ "MW = W2-W1 # unit mass flow rate of water\n",
+ "t2 = 35.0 # Air exit temperature in degree Celsius\n",
+ "t1 = 14.0 # make up water inlet temperature in degree Celsius \n",
+ "m_dot = 2.78 # water flow rate in kg/s\n",
+ "cpa = 1.005 # Constant pressure heat capacity ratio in kJ/kg\n",
+ "h43 = 35*4.187 # Enthalpy change\n",
+ "h5 = 14*4.187 # Enthalpy at state 5in kJ/kg\n",
+ "m_dot_w = (-(W2-W1)*h5 - W1*hg1 + W2*hg2 + cpa*(t2-t1))/(h43) \n",
+ "R = m_dot/m_dot_w \n",
+ "MW = (W2-W1)*R #Make up water flow rate\n",
+ "RWA = R*(1+W1)\n",
+ "R = 0.287 # Gas constant \n",
+ "V_dot = (RWA*R*(t1+273))/(P*1e03) # Volume flow rate of air\n",
+ "print \"\\n Example 15.13\\n\"\n",
+ "print \"\\n Make up water flow rate is \",MW ,\" kg/s\"\n",
+ "print \"\\n Volume flow rate of air is \",V_dot ,\" m**3/s\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter16_xq1IcPx.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter16_xq1IcPx.ipynb
new file mode 100644
index 00000000..c857acc0
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter16_xq1IcPx.ipynb
@@ -0,0 +1,555 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16:Reactive Systems"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.2:pg-675"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 16.2\n",
+ "\n",
+ "\n",
+ " K is 0.314529177004 atm\n",
+ "\n",
+ " Epsilon is 0.611607081035\n",
+ "\n",
+ " The heat of reaction is 60974.6120608 kJ/kg mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "eps_e = 0.27 # Constant\n",
+ "P = 1.0 # Atmospheric pressure in bar\n",
+ "K = (4*eps_e**2*P)/(1-eps_e**2) \n",
+ "P1 = 100.0/760.0 # Pressure in Pa\n",
+ "eps_e_1 = math.sqrt((K/P1)/(4.0+(K/P1)))\n",
+ "T1 = 318.0 # Temperature in K\n",
+ "T2 = 298.0# Temperature in K\n",
+ "R = 8.3143 # Gas constant\n",
+ "K1 = 0.664 # dissociation constant at 318K\n",
+ "K2 = 0.141# dissociation constant at 298K\n",
+ "dH = 2.30*R*((T1*T2)/(T1-T2))*(math.log10(K1/K2))\n",
+ "print \"\\n Example 16.2\\n\"\n",
+ "print \"\\n K is \",K ,\" atm\"\n",
+ "print \"\\n Epsilon is \",eps_e_1\n",
+ "print \"\\n The heat of reaction is \",dH ,\" kJ/kg mol\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.3:pg-675"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 16.3\n",
+ "\n",
+ "\n",
+ " Equilibrium constant is 1.61983471074\n",
+ "\n",
+ " Gibbs function change is -4812.22485358 J/gmol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "v1 = 1.0 # Assumed\n",
+ "v2 = v1# Assumed \n",
+ "v3 = v2 # Assumed\n",
+ "v4 = v2# Assumed\n",
+ "e = 0.56 # Degree of reaction\n",
+ "P = 1.0 # Dummy\n",
+ "T = 1200.0 # Reaction temperature in K\n",
+ "R = 8.3143 # Gas constant\n",
+ "x1 = (1-e)/2.0 # \n",
+ "x2 = (1-e)/2.0\n",
+ "x3 = e/2.0 \n",
+ "x4 = e/2.0\n",
+ "K = (((x3**v3)*(x4**v4))/((x1**v1)*(x2**v2)))*P**(v3+v4-v1-v2) # Equilibrium constant\n",
+ "dG = -R*T*math.log(K) #Gibbs function change\n",
+ "\n",
+ "print \"\\n Example 16.3\\n\"\n",
+ "print \"\\n Equilibrium constant is \",K\n",
+ "print \"\\n Gibbs function change is \",dG ,\"J/gmol\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.5:pg-678"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 16.5\n",
+ "\n",
+ "\n",
+ " The value of equillibrium constant is 0.755668681281 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Veo = 1.777 # Ve/Vo\n",
+ "e = 1.0-Veo # Degree of dissociation\n",
+ "P = 0.124 # in atm\n",
+ "K = (4*e**2*P)/(1.0-e**2)\n",
+ "\n",
+ "print \"\\n Example 16.5\\n\"\n",
+ "print \"\\n The value of equillibrium constant is \",K ,\" atm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.6:pg-680"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 16.6\n",
+ "\n",
+ "\n",
+ " Cp is 4.48364424966 J/g mol K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "v1 = 1.0 # Assumed\n",
+ "v2 = 0 # Assumed\n",
+ "v3 = 1.0 # Assumed\n",
+ "v4 = 1.0/2.0# Assumed\n",
+ "dH = 250560.0 # Enthalpy change in j/gmol\n",
+ "e = 3.2e-03 # Constant\n",
+ "R = 8.3143 # Gas constant\n",
+ "T = 1900.0 # Reaction temperature\n",
+ "Cp = ((dH**2)*(1+e/2)*e*(1+e))/(R*T**2*(v1+v2)*(v3+v4))\n",
+ "print \"\\n Example 16.6\\n\"\n",
+ "print \"\\n Cp is \",Cp ,\" J/g mol K\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.7:pg-681"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 16.7\n",
+ "\n",
+ "\n",
+ " The composition of fuel is 14.7645650439 percent Hydrogen and 85.2354349561 percent Carbon\n",
+ "\n",
+ " Air fuel ratio is 23.9829146049\n",
+ "\n",
+ " Percentage of excess air used is 67.2268907563 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "a = 21.89 # stochiometric coefficient\n",
+ "y = 18.5 # stochiometric coefficient\n",
+ "x = 8.9 # stochiometric coefficient\n",
+ "PC = 100*(x*12)/((x*12)+(y)) # Carbon percentage\n",
+ "PH = 100-PC # Hydrogen percentage\n",
+ "AFR = ((32*a)+(3.76*a*28))/((12*x)+y) #Air fuel ratio\n",
+ "EAU = (8.8*32)/((21.89*32)-(8.8*32)) # Excess air used\n",
+ "\n",
+ "print \"\\n Example 16.7\\n\"\n",
+ "print \"\\n The composition of fuel is \",PH ,\" percent Hydrogen and \",PC ,\" percent Carbon\"#The answer provided in the textbook is wrong\n",
+ "print \"\\n Air fuel ratio is \",AFR\n",
+ "print \"\\n Percentage of excess air used is \",EAU*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.8:pg-682"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 16.8\n",
+ "\n",
+ "\n",
+ " Heat transfer per kg mol of fuel is -965198.0 kJ\n",
+ "\n",
+ " Q_cv is -890324.0 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "hf_co2 = -393522.0 # Enthalpy of reaction in kJ/kg mol\n",
+ "hf_h20 = -285838.0# Enthalpy of reaction in kJ/kg mol\n",
+ "hf_ch4 = -74874.0# Enthalpy of reaction in kJ/kg mol\n",
+ "D = hf_co2 + (2*hf_h20) #Heat transfer \n",
+ "QCV = D-hf_ch4 # Q_cv\n",
+ "\n",
+ "print \"\\n Example 16.8\\n\"\n",
+ "print \"\\n Heat transfer per kg mol of fuel is \",D ,\" kJ\"\n",
+ "print \"\\n Q_cv is \",QCV ,\" kJ\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.9:pg-683"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 16.9 \n",
+ "\n",
+ "\n",
+ " Fuel consumption rate is 38.5131749981 kg/h\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Below values are taken from table\n",
+ "Hr = -249952+(18.7*560)+(70*540)\n",
+ "Hp = 8*(-393522+20288)+9*(-241827+16087)+6.25*14171+70*13491\n",
+ "Wcv = 150.0 # Energy out put from engine in kW\n",
+ "Qcv = -205.0 # Heat transfer from engine in kW\n",
+ "n = (Wcv-Qcv)*3600/(Hr-Hp)\n",
+ "print \"\\n Example 16.9 \\n\"\n",
+ "print \"\\n Fuel consumption rate is \",n*114 ,\" kg/h\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.11:pg-684"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 16.11 \n",
+ "\n",
+ "\n",
+ " Reversible work is 47139 kJ/kg\n",
+ "\n",
+ " Increase in entropy during combustion is 3699.6688 kJ/kg mol K\n",
+ "\n",
+ " Irreversibility of the process 25056.8559091 kJ/kg\n",
+ "\n",
+ " Availability of products of combustion is 22082.1440909 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Refer table 16.4 for values\n",
+ "T0 = 298.0 # Atmospheric temperature in K\n",
+ "Wrev = -23316-3*(-394374)-4*(-228583) # Reversible work in kJ/kg mol\n",
+ "Wrev_ = Wrev/44 # Reversible work in kJ/kg\n",
+ "Hr = -103847 # Enthalpy of reactants in kJ/kg\n",
+ "T = 980.0 # Through trial and error\n",
+ "Sr = 270.019+20*205.142+75.2*191.611 # Entropy of reactants\n",
+ "Sp = 3*268.194 + 4*231.849 + 15*242.855 + 75.2*227.485 # Entropy of products\n",
+ "IE = Sp-Sr # Increase in entropy\n",
+ "I = T0*3699.67/44 # Irreversibility\n",
+ "Si = Wrev_ - I# Availability of products of combustion \n",
+ "\n",
+ "print \"\\n Example 16.11 \\n\"\n",
+ "print \"\\n Reversible work is \",Wrev_ ,\" kJ/kg\"\n",
+ "print \"\\n Increase in entropy during combustion is \",Sp-Sr ,\" kJ/kg mol K\"\n",
+ "print \"\\n Irreversibility of the process \",I ,\" kJ/kg\"\n",
+ "print \"\\n Availability of products of combustion is \",Si ,\" kJ/kg\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.12:pg-685"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 6.12\n",
+ "\n",
+ "\n",
+ " The chemical energy of carbon is 410541.588354 kJ/k mol\n",
+ "\n",
+ " The chemical energy of hydrogen is 235211.889921 kJ/k mol\n",
+ "\n",
+ " The chemical energy of methane is 821580.156423 kJ/k mol\n",
+ "\n",
+ " The chemical energy of Carbon monoxide is 275364.910207 kJ/k mol\n",
+ "\n",
+ " The chemical energy of liquid methanol is 716698.69005 kJ/k mol\n",
+ "\n",
+ " The chemical energy of nitrogen is 691.0909601 kJ/k mol\n",
+ "\n",
+ " The chemical energy of Oxygen is 3946.64370597 kJ/k mol\n",
+ "\n",
+ " The chemical energy of Carbon dioxide is 20108.2320604 kJ/k mol\n",
+ "\n",
+ " The chemical energy of Water is 5.21177422707 kJ/k mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T0 = 298.15 # Environment temperature in K\n",
+ "P0 = 1 # Atmospheric pressure in bar\n",
+ "R = 8.3143# Gas constant\n",
+ "xn2 = 0.7567 # mole fraction of nitrogen\n",
+ "xo2 = 0.2035 # mole fraction of oxygen\n",
+ "xh2o = 0.0312 # mole fraction of water\n",
+ "xco2 = 0.0003# mole fraction of carbon dioxide\n",
+ "# Part (a)\n",
+ "g_o2 = 0 # Gibbs energy of oxygen\n",
+ "g_c = 0 # Gibbs energy of carbon\n",
+ "g_co2 = -394380 # Gibbs energy of carbon dioxide\n",
+ "A = -g_co2 + R*T0*math.log(xo2/xco2) # Chemical energy\n",
+ "\n",
+ "# Part (b)\n",
+ "g_h2 = 0 # Gibbs energy of hydrogen\n",
+ "g_h2o_g = -228590# # Gibbs energy of water\n",
+ "B = g_h2 + g_o2/2 - g_h2o_g + R*T0*math.log(xo2**0.5/xh2o)\n",
+ "# Chemical energy\n",
+ "# Part (c)\n",
+ "g_ch4 = -50790 # Gibbs energy of methane\n",
+ "C = g_ch4 + 2*g_o2 - g_co2 - 2*g_h2o_g + R*T0*math.log((xo2**2)/(xco2*xh2o))\n",
+ "# Chemical energy\n",
+ "# Part (d)\n",
+ "g_co = -137150# # Gibbs energy of carbon mono oxide\n",
+ "D = g_co + g_o2/2 - g_co2 + R*T0*math.log((xo2**0.5)/xco2)\n",
+ "# Chemcal energy\n",
+ "# Part (e)\n",
+ "g_ch3oh = -166240 # Gibbs energy of methanol\n",
+ "E = g_ch3oh + 1.5*g_o2 - g_co2 - 2*g_h2o_g + R*T0*math.log((xo2**1.5)/(xco2*(xh2o**2)))\n",
+ "# Chemical energy\n",
+ "# Part (f)\n",
+ "F = R*T0*math.log(1/xn2)\n",
+ "# Chemical energy\n",
+ "# Part (g)\n",
+ "G = R*T0*math.log(1/xo2)\n",
+ "# Chemical energy\n",
+ "# Part (h)\n",
+ "H = R*T0*math.log(1/xco2)\n",
+ "# Chemical energy\n",
+ "# Part (i)\n",
+ "g_h2o_l = -237180 # Gibbs energy of liquid water\n",
+ "I = g_h2o_l - g_h2o_g + R*T0*math.log(1/xh2o)\n",
+ "# Chemical energy\n",
+ "print \"\\n Example 6.12\\n\"\n",
+ "print \"\\n The chemical energy of carbon is \",A ,\" kJ/k mol\"\n",
+ "print \"\\n The chemical energy of hydrogen is \",B ,\" kJ/k mol\"\n",
+ "print \"\\n The chemical energy of methane is \",C ,\" kJ/k mol\"\n",
+ "print \"\\n The chemical energy of Carbon monoxide is \",D ,\" kJ/k mol\"\n",
+ "print \"\\n The chemical energy of liquid methanol is \",E ,\" kJ/k mol\"\n",
+ "print \"\\n The chemical energy of nitrogen is \",F ,\" kJ/k mol\"\n",
+ "print \"\\n The chemical energy of Oxygen is \",G ,\" kJ/k mol\"\n",
+ "print \"\\n The chemical energy of Carbon dioxide is \",H ,\" kJ/k mol\"\n",
+ "print \"\\n The chemical energy of Water is \",I ,\" kJ/k mol\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.13:pg-686"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 6.13\n",
+ "\n",
+ "\n",
+ " The rate of heat transfer from the engine = -4.33120060702 kW,\n",
+ " The second law of efficiency of the engine = 13.3396896634 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Environmet\n",
+ "T0 = 298.15 # Environment temperature in K\n",
+ "P0 = 1.0 # Atmospheric pressure in atm\n",
+ "R = 8.3143# Gas constant\n",
+ "xn2 = 0.7567 # mole fraction of nitrogen\n",
+ "xo2 = 0.2035 # mole fraction of oxygen\n",
+ "xh2o = 0.0312 # mole fraction of water\n",
+ "xco2 = 0.0003# mole fraction of carbon dioxide\n",
+ "xother = 0.0083 # Mole fraction of other gases\n",
+ "# Liquid octane\n",
+ "t1 = 25.0 # Temperature of liquid octane in degree centigrade\n",
+ "m = 0.57 # Mass flow rate in kg/h\n",
+ "T2 = 670 # Temperature of combustion product at exit in K\n",
+ "x1 = 0.114 # Mole fraction of CO2\n",
+ "x2 = .029 # Mole fraction of CO\n",
+ "x3 = .016 # Mole fraction of O2\n",
+ "x4 = .841 # Mole fraction of N2\n",
+ "Wcv = 1 # Power developed by the engine in kW\n",
+ "print \"\\n Example 6.13\\n\"\n",
+ "# By carbon balance \n",
+ "b = 55.9 \n",
+ "# By hydrogen balace\n",
+ "c=9\n",
+ "# By oxygen balance\n",
+ "a = 12.58\n",
+ "Qcv = Wcv- 3845872*(.57/(3600*114.22))\n",
+ "E = 5407843.0 # Chemical exergy of C8H18\n",
+ "nII = Wcv/(E*.57/(3600*114.22))\n",
+ "print \"\\n The rate of heat transfer from the engine = \",Qcv ,\" kW,\\n The second law of efficiency of the engine = \",nII*100 ,\" percent\""
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter17_JAzeWmK.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter17_JAzeWmK.ipynb
new file mode 100644
index 00000000..145463d3
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter17_JAzeWmK.ipynb
@@ -0,0 +1,323 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 17:Compressible Fluid Flow"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.2:pg-717"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 17.2 \n",
+ "\n",
+ "\n",
+ " Mass flow rate of air through diffuser is 59.4200292233 Kg/s\n",
+ "\n",
+ " Mach number of leaving air is 0.135\n",
+ "\n",
+ " Temperature of leaving air is 71.4290750078 degree celcius\n",
+ "\n",
+ " Pressure of leaving air is 0.260471799082 MPa \n",
+ "\n",
+ " Net thrust is 51.3284455434 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P1 = 0.18 # Diffuser static pressure in MPa\n",
+ "R = 0.287 # Gas constant\n",
+ "T1 = 37 # Static temperature \n",
+ "P0 = 0.1# Atmospheric pressure in MPa\n",
+ "A1 = 0.11 # intake area in m**2\n",
+ "V1 = 267 # Inlet velocity in m/s\n",
+ "w = (P1*1e3/(R*(T1+273)))*A1*V1 # mass flow rate\n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "c1 = math.sqrt(g*R*(T1+273)*1000) # velocity\n",
+ "M1 = V1/c1 # Mach number\n",
+ "A1A_ = 1.0570 # A1/A* A* = A_\n",
+ "P1P01 = 0.68207 # pressure ratio\n",
+ "T1T01 = 0.89644# Temperature ratio\n",
+ "F1F_ = 1.0284# Impulse function ratio\n",
+ "A2A1 = 0.44/0.11 # Area ratio\n",
+ "A2A_ = A2A1*A1A_# Area ratio\n",
+ "M2 = 0.135 # Mach number\n",
+ "P2P02 = 0.987 # Pressure ratio\n",
+ "T2T02 = 0.996 # Temperature ratio\n",
+ "F2F_ = 3.46# Impulse function ratio\n",
+ "P2P1 = P2P02/P1P01 # Pressure ratio\n",
+ "T2T1 = T2T02/T1T01# Temperature ratio\n",
+ "F2F1 = F2F_/F1F_ # Impulse function ratio\n",
+ "P2 = P2P1*P1 # Outlet pressure\n",
+ "T2 = T2T1*(T1+273) # Outlet temperature\n",
+ "A2 = A2A1*A1 # Exit area\n",
+ "F1 = P1*A1*(1+g*M1**2) # Impulse function\n",
+ "F2 = F2F1*F1 # Impulse function\n",
+ "Tint = F2-F1 # Internal thrust\n",
+ "Text = P0*(A2-A1) # External thrust\n",
+ "NT = Tint - Text # Net thrust\n",
+ "\n",
+ "print \"\\n Example 17.2 \\n\"\n",
+ "print \"\\n Mass flow rate of air through diffuser is \",w ,\" Kg/s\"\n",
+ "print \"\\n Mach number of leaving air is \",M2\n",
+ "print \"\\n Temperature of leaving air is \",T2-273 ,\" degree celcius\"\n",
+ "print \"\\n Pressure of leaving air is \",P2 ,\" MPa \"\n",
+ "print \"\\n Net thrust is \",NT*1e3 ,\" kN\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.3:pg-718"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 17.3\n",
+ "\n",
+ "\n",
+ " When divergent section act as a nozzle\n",
+ "\n",
+ " Maximum flow rate of air is 1.06476372092 kg/s\n",
+ "\n",
+ " Static temperature is 183.204 K\n",
+ "\n",
+ " Static Pressure is 93.9 kPa\n",
+ "\n",
+ " Velocity at the exit from the nozzle is 596.077184351 m/s\n",
+ "\n",
+ "\n",
+ " When divergent section act as a diffuser\n",
+ "\n",
+ " Maximum flow rate of air is 1.06476372092 kg/s\n",
+ "\n",
+ " Static temperature is 353.232 K\n",
+ "\n",
+ " Static Pressure is 936.0 kPa\n",
+ "\n",
+ " Velocity at the exit from the nozzle is 116.03411731 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "M2 = 2.197 # Mach number\n",
+ "P2P0 = 0.0939 # pressure ratio\n",
+ "T2T0 = 0.5089 # Temperature ratio\n",
+ "P0 = 1 # Stagnation pressure in MPa \n",
+ "T0 = 360 # Stagnation temperature in K\n",
+ "g = 1.4 # Heat capacity ratio\n",
+ "R = 0.287 # Gas constant\n",
+ "P2 = P2P0*P0*1e3 # Static Pressure\n",
+ "T2 = T2T0*T0 # Static temperature\n",
+ "c2 = math.sqrt(g*R*T2*1000)\n",
+ "V2 = c2*M2 #velocity at the exit from the nozzle\n",
+ "# for air\n",
+ "P_P0 = 0.528 # pressure ratio\n",
+ "T_T0 = 0.833 # Temperature ratio\n",
+ "P_ = P_P0*P0*1e3 # Static Pressure\n",
+ "T_ = T_T0*T0 #Static temperature\n",
+ "rho_ = P_/(R*T_) # density\n",
+ "V_ = math.sqrt(g*R*T_*1000) # Velocity at the exit from the nozzle \n",
+ "At = 500e-06 # throat area\n",
+ "w = At*V_*rho_# Maximum flow rate of air\n",
+ "\n",
+ "print \"\\n Example 17.3\\n\"\n",
+ "print \"\\n When divergent section act as a nozzle\"\n",
+ "print \"\\n Maximum flow rate of air is \",w ,\" kg/s\"\n",
+ "print \"\\n Static temperature is \",T2 ,\" K\"\n",
+ "print \"\\n Static Pressure is \",P2 ,\" kPa\"\n",
+ "print \"\\n Velocity at the exit from the nozzle is \",V2 ,\" m/s\"\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "# Part (b)\n",
+ "Mb = 0.308 # Mach number\n",
+ "P2P0b = 0.936 # Pressure ratio\n",
+ "T2T0b = 0.9812 # Temperature ratio\n",
+ "P2b = P2P0b*P0*1e3#Static Pressure \n",
+ "T2b = T2T0b*T0 # Static temperature\n",
+ "c2b = math.sqrt(g*R*T2b*1000) # Velocity \n",
+ "V2b = c2b*Mb #Velocity at the exit from the nozzle\n",
+ "print \"\\n\\n When divergent section act as a diffuser\"\n",
+ "print \"\\n Maximum flow rate of air is \",w ,\" kg/s\"\n",
+ "print \"\\n Static temperature is \",T2b ,\" K\"\n",
+ "print \"\\n Static Pressure is \",P2b ,\" kPa\"\n",
+ "print \"\\n Velocity at the exit from the nozzle is \",V2b ,\" m/s\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.4:pg-720"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 17.4\n",
+ "\n",
+ "\n",
+ " Mach number of the tunnel is 1.735\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Px = 16.0 # pressure in kPa\n",
+ "Poy = 70.0 #pressure in kPa \n",
+ "Mx = 1.735 # Mach number\n",
+ "Pyx = 3.34 # Pressure ratio\n",
+ "rho_yx = 2.25 # Density ratio\n",
+ "Tyx = 1.483 # Temperature ratio\n",
+ "Poyox = 0.84 # pressure ratio\n",
+ "My = 0.631 # Mach number\n",
+ "g = 1.4 # Ratio of heat capacities\n",
+ "Tox = 573.0 # stagnation temperature in K \n",
+ "Toy = Tox # temperature equivalence\n",
+ "Tx = Tox/(1+((g-1)/2.0)*Mx**2) # temperature at x\n",
+ "Ty = Tyx*Tx # temperature at y\n",
+ "Pox = Poy/Poyox # total pressure \n",
+ "# From table\n",
+ "Mx = 1.735\n",
+ "\n",
+ "print \"\\n Example 17.4\\n\"\n",
+ "print \"\\n Mach number of the tunnel is \",Mx\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.5:pg-721"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 17.5\n",
+ "\n",
+ "\n",
+ " Exit Mach number is 0.402\n",
+ "\n",
+ " Exit pressure is 147.9260475 kPa\n",
+ "\n",
+ " Exit Stagnation pressure is 44.7195 kPa\n",
+ "\n",
+ " Entropy increase is 0.068726024552 kJ/kg K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Ax = 18.75 # cross sectional area in divergent part in m**2\n",
+ "A_ = 12.50 # throat area in m**2\n",
+ "AA_ = 1.5 # Area ratio\n",
+ "Pxox = 0.159 # pressure ratio from table\n",
+ "R = 0.287 # Gas constant\n",
+ "Pox = 0.21e03 # pressure in kPa\n",
+ "Px = Pxox*Pox # pressure calculation\n",
+ "# from the gas table on normal shock\n",
+ "Mx = 1.86 \n",
+ "My = 0.604 \n",
+ "Pyx = 3.87 \n",
+ "Poyx = 4.95 \n",
+ "Poyox = 0.786\n",
+ "Py = Pyx*Px\n",
+ "Poy = Poyx*Px\n",
+ "My = 0.604\n",
+ "Ay_ = 1.183\n",
+ "A2 = 25 \n",
+ "Ay = 18.75\n",
+ "A2_ = (A2/Ay)*Ay_\n",
+ "# From isentropic table \n",
+ "M2 = 0.402\n",
+ "P2oy = 0.895\n",
+ "P2 = P2oy*Poy\n",
+ "syx = -R*math.log(Poy/Pox) # sy-sx\n",
+ "\n",
+ "print \"\\n Example 17.5\\n\"\n",
+ "print \"\\n Exit Mach number is \",M2\n",
+ "print \"\\n Exit pressure is \",P2 ,\" kPa\"\n",
+ "print \"\\n Exit Stagnation pressure is \",Pox-Poy ,\" kPa\"\n",
+ "print \"\\n Entropy increase is \",syx ,\" kJ/kg K\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter18_7Yy7cvJ.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter18_7Yy7cvJ.ipynb
new file mode 100644
index 00000000..3c4fe6ba
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter18_7Yy7cvJ.ipynb
@@ -0,0 +1,706 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 18:Elements of Heat Transfer"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.1:pg-757"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.1\n",
+ "\n",
+ "\n",
+ " The rate of heat removal is 486.40484238 W\n",
+ "\n",
+ " Temperature at inside surface of brick is 20.2812224957 degree celcius\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "ho = 12.0 # Outside convective heat transfer coefficient in W/m**2K \n",
+ "x1 = 0.23# Thickness of brick in m\n",
+ "k1 = 0.98 # Thermal conductivity of brick in W/mK\n",
+ "x2 = 0.08 # Thickness of foam in m\n",
+ "k2 = 0.02# Thermal conductivity of foam in W/mK\n",
+ "x3 = 1.5# Thickness of wood in cm\n",
+ "k3 = 0.17# Thermal conductivity of wood in W/cmK\n",
+ "hi = 29.0# Inside convective heat transfer coefficient in W/m**2K \n",
+ "A = 90.0 # Total wall area in m**2\n",
+ "to = 22.0# outside air temperature in degree Celsius\n",
+ "ti = -2.0 # Inside air temperature in degree Celsius\n",
+ "print \"\\n Example 18.1\\n\"\n",
+ "U = (1/((1/ho)+(x1/k1)+(x2/k2)+(x3*1e-2/k3)+(1/hi)))# Overall heat transfer coefficient\n",
+ "Q = U*A*(to-ti) # Rate of heat transfer\n",
+ "R = (1/ho)+(x1/k1)\n",
+ "t2 = to-Q*R/A # Temperature at inside surface of brick\n",
+ "\n",
+ "print \"\\n The rate of heat removal is \",Q ,\" W\"\n",
+ "\n",
+ "print \"\\n Temperature at inside surface of brick is \",t2 ,\" degree celcius\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.2:pg-758"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.2\n",
+ "\n",
+ "\n",
+ " Heat transfer rate is 2.33519645654 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "r1 = 5.0 # Inner radius of steel pipe in cm\n",
+ "r2 = 10.0 # Extreme radius of inner insulation in cm\n",
+ "r3 = 13.0# Extreme radius of outer insulation in cm\n",
+ "K1 = 0.23 # Thermal conductivity of inner insulation in W/mK\n",
+ "K2 = 0.37 # Thermal conductivity of outer insulation in W/mK\n",
+ "hi = 58.0 # Inner heat transfer coefficient in W/m**2K\n",
+ "h0 = 12.0 # Inner heat transfer coefficient in W/m**2K\n",
+ "ti = 60.0 # Inner temperature in degree Celsius\n",
+ "to = 25.0 # Outer temperature in degree Celsius\n",
+ "L = 50.0 # Length of pipe in m\n",
+ "\n",
+ "print \"\\n Example 18.2\\n\"\n",
+ "Q =((2*math.pi*L*(ti-to))/((1/(hi*r1*1e-2))+(math.log(r2/r1)/(K1))+(math.log(r3/r2)/(K2))+(1/(h0*r3*1e-2))))\n",
+ "# Rate of heat transfer\n",
+ "print \"\\n Heat transfer rate is \",Q/1e3 ,\" kW\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.3:pg-759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.3\n",
+ "\n",
+ "\n",
+ " Thermal conductivity of rod A is 57.4969670417 W/mK\n",
+ "\n",
+ " Thermal conductivity of rod B is 86.076212035 W/mK\n",
+ "\n",
+ " Thermal conductivity of rod C is 116.0 W/mK\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "to = 20 # Environment temperature in degree Celsius\n",
+ "t = 100# Temperature of steam path in degree Celsius\n",
+ "ta1 = 26.76 # Temperature at other end in degree Celsius for rod A \n",
+ "d = 10 # diameter of rod in mm\n",
+ "L = 0.25 # length of rod in m\n",
+ "h = 23 # heat transfer coefficient in W/m**2 K\n",
+ "tb1 = 32.00 # Temperature at other end in degree Celsius for rod B \n",
+ "tc1 = 36.93 # Temperature at other end in degree Celsius for rod C \n",
+ "\n",
+ "print \"\\n Example 18.3\\n\"\n",
+ "A = math.pi/4 * (d*1e-3)**2 #Area of rod\n",
+ "p = math.pi*d*1e-3 # perimeter of rod\n",
+ "# For rod A\n",
+ "a = (ta1-to)/(t-to) \n",
+ "ma = (math.acosh(1/a))/L\n",
+ "\n",
+ "Ka = (h*p)/(ma**2*A) # Thermal conductivity of rod A\n",
+ "print \"\\n Thermal conductivity of rod A is \",Ka ,\" W/mK\"\n",
+ "# For rod B\n",
+ "b = (tb1-to)/(t-to) \n",
+ "mb = (math.acosh(1/b))/L\n",
+ "\n",
+ "Kb = (h*p)/(mb**2*A) # Thermal conductivity of rod B\n",
+ "print \"\\n Thermal conductivity of rod B is \",Kb ,\" W/mK\"\n",
+ "c = (tc1-to)/(t-to) \n",
+ "mc = (math.acosh(1/c))/L\n",
+ "\n",
+ "Kc = (h*p)/(mc**2*A) # Thermal conductivity of rod A\n",
+ "print \"\\n Thermal conductivity of rod C is \",math. ceil(Kc) ,\" W/mK\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.4:pg-760"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.4\n",
+ "\n",
+ "\n",
+ " Midway temperature of rod is 88.7138777413 degree Celcius\n",
+ "\n",
+ " Heat loss rate is 88.0331604603 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h = 17.4 # Convective heat transfer coefficient in W/m**2K\n",
+ "K = 52.2 # Thermal conductivity in W/mK\n",
+ "t = 120 # Heat reservoir wall temperature in degree celcius\n",
+ "t0 = 35 # Ambient temperature in degree celcius\n",
+ "L = 0.4 # Lenght of rod in m\n",
+ "b = .050 # width of rod in mm\n",
+ "H = .050 # Heigth of rod in mm\n",
+ "\n",
+ "print \"\\n Example 18.4\\n\"\n",
+ "l= L/2\n",
+ "A = b*H\n",
+ "m = math.sqrt(4*h*b/(K*b*H))\n",
+ "t1 = (t-t0)/math.cosh(m*l) + t0 # Midway temperature of rod\n",
+ "Q1 = 2*5.12*K*A*(t-t0)*math.tanh(m*l) # Heat loss rate \n",
+ "print \"\\n Midway temperature of rod is \",t1 ,\" degree Celcius\"\n",
+ "print \"\\n Heat loss rate is \",Q1 ,\"W\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.5:pg-760"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.5\n",
+ "\n",
+ "\n",
+ " Time to cool down to 2 degree celcius is 30.5933342864 min\n",
+ "\n",
+ " Temperature of peas after 10 minutes is 13.1714792663 degree celcius\n",
+ "\n",
+ " Temperature of peas after 30 minutes is 1.0393274697 degree celcius\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d = 8.0 # Average diameter in mm\n",
+ "r = 750.0 # Density in Kg/m**3\n",
+ "t = 2.0 # Intermediate temperature in degree celcius\n",
+ "t_inf = 1.0 # Ambient temperature in degree celcius\n",
+ "t0 = 25.0 # Initial temperature in degree celcius\n",
+ "c = 3.35 # Specific heat in kJ/KgK\n",
+ "h = 5.8 # Heat transfer coeeficient in W/m**2K\n",
+ "T1 = 10.0 # time period in minutes\n",
+ "T2 = 30.0 # time period in minutes \n",
+ "t1 = 5.0 # Intermediate temperature in degree celcius\n",
+ "print \"\\n Example 18.5\\n\"\n",
+ "tau1 = c*1e3*math.log((t0-t_inf)/(t-t_inf))/(h*60) # Time to cool down to 2 degree celcius\n",
+ "tau2 = (t0-t_inf)*(math.exp(-(c*T1*60)/(c*1e3))) # Temperature of peas after 10 minutes\n",
+ "Y = math.exp(-1*(c*T2*60)/(c*1e3))\n",
+ "tau3 = (t0*Y-t1)/(Y-1)\n",
+ "\n",
+ "print \"\\n Time to cool down to 2 degree celcius is \",tau1 ,\" min\"\n",
+ "print \"\\n Temperature of peas after 10 minutes is \",tau2 ,\" degree celcius\"\n",
+ "print \"\\n Temperature of peas after 30 minutes is \",tau3 ,\" degree celcius\"\n",
+ "#The answers given in book are incorrect\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.6:pg-761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.6\n",
+ "\n",
+ "\n",
+ " Surface area of heat exchanger is 53.1155468795 m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "mh = 1000 # mass flow rate of hot fluid in Kg/h\n",
+ "mc = 1000 # mass flow rate of cold fluid in Kg/h\n",
+ "ch = 2.09 # Specific heat capacity of hot fluid in kJ/kgK\n",
+ "cc = 4.187 #Specific heat capacity of cold fluid in kJ/kgK \n",
+ "th1 = 80# Inlet temperature of hot fluid in degree celcius\n",
+ "th2 = 40 # Exit temperature of hot fluid in degree Celsius\n",
+ "tc1 = 30 # Inlet temperature of cold fluid in degree Celsius\n",
+ "U = 24 # heat transfer coefficient in W/m**2K\n",
+ "\n",
+ "print \"\\n Example 18.6\\n\"\n",
+ "Q = mh*ch*(th1-th2)\n",
+ "tc2 = Q/(mc*cc) + tc1# outlet temperature of cold fluid\n",
+ "te = th2-tc1 # Exit end temperature difference in degree Celsius\n",
+ "ti = th1 - tc2 # Inlet end temperature difference in degree Celsius\n",
+ "t_lm = (ti-te)/(math.log(ti/te))\n",
+ "A = Q / (U*t_lm*3.6) # Surface are of heat exchanger\n",
+ "\n",
+ "print \"\\n Surface area of heat exchanger is \",A ,\" m**2\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.7:pg-762"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.7\n",
+ "\n",
+ "\n",
+ " Surface area of heat exchanger is 3.52948841744 m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Hfg = 2257.0 # Latent heat at 100 degree Celsius\n",
+ "\n",
+ "ma = 500.0 # mass flow rate of air in Kg/h\n",
+ "ch = 1.005 # Specific heat capacity of hot air in kJ/kgK\n",
+ "ta1 = 260.0 # Inlet temperature of hot air in degree Celsius\n",
+ "ta2 = 150.0 # Inlet temperature of cold air in degree Celsius\n",
+ "tc1 = 100.0 # Inlet temperature of steam\n",
+ "tc2 = tc1 # Exit temperature of steam\n",
+ "U = 46.0 # heat transfer coefficient in W/m**2K\n",
+ "\n",
+ "print \"\\n Example 18.7\\n\"\n",
+ "Q = ma*ch*(ta1-ta2)\n",
+ "m = Q/Hfg # mass flow rate of steam\n",
+ "te = ta2-tc1 # Exit end temperature difference in degree Celsius\n",
+ "ti = ta1 - tc2 # Inlet end temperature difference in degree Celsius\n",
+ "t_lm = (ti-te)/(math.log(ti/te))\n",
+ "A = Q / (U*t_lm*3.6) # Surface are of heat exchanger\n",
+ "\n",
+ "print \"\\n Surface area of heat exchanger is \",A ,\" m**2\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.8:pg-763"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.8\n",
+ "\n",
+ "\n",
+ " Exit temperature of oil is 90.1251029717 degree celcius\n",
+ "\n",
+ " Rate of heat transfer is 1302.7384927 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "mh = 20.15 # mass flow rate of hot fluid in Kg/s\n",
+ "mc = 5.04 # mass flow rate of cold fluid in Kg/h\n",
+ "ch = 2.094 # Specific heat capacity of hot fluid in kJ/kgK\n",
+ "cc = 4.2 #Specific heat capacity of cold fluid in kJ/kgK \n",
+ "th1 = 121# Inlet temperature of hot fluid in degree Celsius\n",
+ "th2 = 40 # Exit temperature of hot fluid in degree Celsius\n",
+ "tc1 = 10 # Inlet temperature of cold fluid in degree Celsius\n",
+ "U = 0.34 # heat transfer coefficient in kW/m**2K\n",
+ "n = 200 # total number of tubes\n",
+ "l = 4.87 # length of tube in m\n",
+ "d = 1.97 # Outer diameter in cm\n",
+ "print \"\\n Example 18.8\\n\"\n",
+ "A = math.pi*n*d*1e-2*l # Total surface area\n",
+ "mc_oil = mh*ch\n",
+ "mc_water = mc*cc\n",
+ "c_min = mc_water\n",
+ "c_max =mc_oil\n",
+ " \n",
+ "if (mc_oil<mc_water):\n",
+ " c_min = mc_oil\n",
+ " c_max =mc_water\n",
+ "\n",
+ "R = c_min/c_max\n",
+ "NTU = U*A/c_min\n",
+ "e = (1-math.exp(-1*NTU*(1-R)))/(1-R*math.exp(-1*NTU*(1-R)))\n",
+ "t_larger = e*(th1-tc1)\n",
+ "t_water = t_larger \n",
+ "t_oil = t_water*mc_water/mc_oil\n",
+ "th2 = th1 - t_oil # Exit temperature of oil\n",
+ "Q = mh*ch*(th1-th2) # Rate of heat transfer\n",
+ "\n",
+ "print \"\\n Exit temperature of oil is \",th2 ,\" degree celcius\"\n",
+ "print \"\\n Rate of heat transfer is \",Q ,\" kW\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.9:pg-763"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.9\n",
+ "\n",
+ "\n",
+ " Heat transfer coefficient is 4074.68413756 W/m**2K\n",
+ "\n",
+ " Rate of heat transfer is 38.4029932568 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "u_m = 0.8 # mean velocity in m/s\n",
+ "D = 5 # Diameter in cm\n",
+ "v = 4.78e-7 # dynamic coefficient of viscosity\n",
+ "Pr = 2.98 # Prantl number\n",
+ "K = 0.66 # Thermal conductivity in W/mK\n",
+ "l = 3 # length of pipe in m\n",
+ "tw = 70 # Wall temperature\n",
+ "tf = 50 # mean water temperature\n",
+ "print \"\\n Example 18.9\\n\"\n",
+ "Re = u_m*D*1e-2/v # Reynold number\n",
+ "Nu = 0.023*(Re**0.8)*(Pr**0.4)\n",
+ "h = K*Nu/(D*1e-2) # Heat transfer coefficient\n",
+ "A = math.pi*D*1e-2*l # Surface area\n",
+ "Q = h*A*(tw-tf) # Rate of heat transfer\n",
+ "print \"\\n Heat transfer coefficient is \",h ,\" W/m**2K\"\n",
+ "print \"\\n Rate of heat transfer is \",Q/1e3 ,\" kW\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.10:pg-764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.10\n",
+ "\n",
+ "\n",
+ " Rate of heat dissipation is 31.392 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b = 10 # width of plate in cm\n",
+ "h = 15 # Height of plate in cm\n",
+ "hr = 8.72 # Radiative heat transfer coefficient in W/m**2K\n",
+ "tw = 140 # temperature of wall in degree Celsius\n",
+ "tf = 20 # Atmospheric temperature in degree Celsius\n",
+ "v = 2.109e-5 # Coefficient of dynamic viscosity in m**2/s\n",
+ "Pr = 0.692 # Prantl number\n",
+ "K = 0.0305 # Thermal conductivity in W/mK\n",
+ "L = 0.15 # characteristic length in m\n",
+ "g = 9.81 # Gravitational acceleration in m/s**2\n",
+ "\n",
+ "print \"\\n Example 18.10\\n\"\n",
+ "A = 2*b*1e-2*h*1e-2 # total area of plate\n",
+ "t_mean = (tw+tf)/2 +273\n",
+ "B = 1/t_mean\n",
+ "del_t = tw-tf\n",
+ "Gr = g*B*del_t*L**3/v**2 # Grashoff number\n",
+ "x = Gr*Pr\n",
+ "Nu = 0.59*(Gr*Pr)**0.25\n",
+ "hc = Nu*K/L\n",
+ "Q = (hc+hr)*A*del_t # Rate of heat dissipation\n",
+ "print \"\\n Rate of heat dissipation is \",Q ,\" W\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.11:pg-765"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.11\n",
+ "\n",
+ "\n",
+ " Time required for heating operation is 27.6219838873 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1 = 2.0 # Diameter of steel rod in cm\n",
+ "d2 = 16.0 # Diameter of cylindrical furnace in cm\n",
+ "e1 = 0.6 # emissivity of inner surface\n",
+ "e2 = 0.85 # emissivity of rod surface\n",
+ "T = 1093.0 # Inner surface temperature of furncae in degree celcius\n",
+ "Tr1 = 427.0 # Initial temperature of rod in degree celcius\n",
+ "Tr2 = 538.0 # Initial temperature of rod in degree celcius\n",
+ "sigma = 5.67e-8 # Constant\n",
+ "rho = 7845.0 # density in kg/ m**3\n",
+ "c = 0.67 # Specific heat capacity in kJ/kgK\n",
+ "print \"\\n Example 18.11\\n\"\n",
+ "A_ratio = d1/d2 # Surface area ratio of cylindrical bodies\n",
+ "F12 = (1/((1/e1)+(A_ratio*(1/e2 -1))))\n",
+ "A1 = math.pi*d1*1e-2*1 # Surface area of rod\n",
+ "T1 = Tr1+273\n",
+ "T2 = T +273\n",
+ "T3 = Tr2 +273\n",
+ "Qi = sigma*A1*F12*(T1**4-T2**4)\n",
+ "Qe = sigma*A1*F12*(T3**4-T2**4)\n",
+ "\n",
+ "Q_avg = abs((Qi+Qe)/2)\n",
+ "tau = rho*c*(1e-4)*math.pi*(Tr2-Tr1)/(Q_avg*(1e-3))\n",
+ "\n",
+ "# Time required for heating operation \n",
+ "print \"\\n Time required for heating operation is \",tau ,\" s\"\n",
+ "\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.12:pg-765"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 18.12\n",
+ "\n",
+ "\n",
+ " Net heat transfer between two cylinders is 7297.2729358 W/m length\n",
+ "\n",
+ " Example 18.12\n",
+ "\n",
+ "\n",
+ " Net heat transfer between two cylinders is 7297.2729358 W/m length\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d1 = 10.0 # Diameter of inner cylinder in cm\n",
+ "d2 = 20.0 # Diameter of outer cylinder in cm\n",
+ "e1 = 0.65 # emissivity of inner surface\n",
+ "e2 = 0.4 # emissivity of outer surface\n",
+ "T1 = 1000.0 # Inner surface temperature in K\n",
+ "T2 = 500.0 # outer suface temperature in K\n",
+ "sigma = 5.67e-8 # Constant\n",
+ "print \"\\n Example 18.12\\n\"\n",
+ "A1 = math.pi*d1*1e-2\n",
+ "A2 = math.pi*d2*1e-2\n",
+ "R =(((1-e1)/(e1*A1))+((1-e2)/(e2*A2))+(1/(A1*1)))\n",
+ "Eb1 = sigma*T1**4\n",
+ "Eb2 = sigma*T2**4\n",
+ "Q = (Eb1-Eb2)/R # Net heat transfer between two cylinders\n",
+ "print \"\\n Net heat transfer between two cylinders is \",Q ,\" W/m length\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "d1 = 10.0 # Diameter of inner cylinder in cm\n",
+ "d2 = 20.0 # Diameter of outer cylinder in cm\n",
+ "e1 = 0.65 # emissivity of inner surface\n",
+ "e2 = 0.4 # emissivity of outer surface\n",
+ "T1 = 1000.0 # Inner surface temperature in K\n",
+ "T2 = 500.0 # outer surface temperature in K\n",
+ "sigma = 5.67e-8 # Constant\n",
+ "print \"\\n Example 18.12\\n\"\n",
+ "A1 = math.pi*d1*1e-2\n",
+ "A2 = math.pi*d2*1e-2\n",
+ "R =(((1-e1)/(e1*A1))+((1-e2)/(e2*A2))+(1/(A1*1)))\n",
+ "Eb1 = sigma*T1**4\n",
+ "Eb2 = sigma*T2**4\n",
+ "Q = (Eb1-Eb2)/R # Net heat transfer between two cylinders\n",
+ "print \"\\n Net heat transfer between two cylinders is \",Q ,\" W/m length\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter19_GQTZX04.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter19_GQTZX04.ipynb
new file mode 100644
index 00000000..1f8e6f43
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter19_GQTZX04.ipynb
@@ -0,0 +1,1372 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 19: Gas Compressors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.1:pg-818"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.1\n",
+ "\n",
+ "\n",
+ " Pressure ratio is 8.4764775804\n",
+ "\n",
+ " Indicated power is 11.2490101513 kW\n",
+ "\n",
+ " Shaft power is 14.0612626891 kW\n",
+ "\n",
+ " Mass flow rate is 0.0723071537289 kg/s\n",
+ "\n",
+ " Pressure ratio when second stage is added is 71.8506721711\n",
+ "\n",
+ " Volume derived per cycle is V2 0.000327741753347 m**3\n",
+ "\n",
+ " Second stage bore would be 52.7442736748 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T2 = 488.0\n",
+ "T1 = 298.0 \n",
+ "n = 1.3 \n",
+ "R =8314.0/44.0\n",
+ "rp = (T2/T1)**(n/(n-1))\n",
+ "\n",
+ "b = 0.12 # Bore of compressor\n",
+ "L = 0.15 # Stroke of compressor\n",
+ "V1 = (math.pi/4)*(b)**2*L \n",
+ "P1 = 120e03 # in kPa\n",
+ "W = ((n*P1*V1)/(n-1))*(((rp)**((n-1)/n))-1)\n",
+ "P = (W*1200*0.001)/60 \n",
+ "\n",
+ "V1_dot = V1*(1200.0/60.0)\n",
+ "m_dot = (P1*V1_dot)/(R*T1)\n",
+ "\n",
+ "rp_1 = rp**2\n",
+ "V2 = (1/rp)**(1/n)*V1\n",
+ "d = math.sqrt((V2*4)/(L*math.pi))\n",
+ "print \"\\n Example 19.1\\n\"\n",
+ "print \"\\n Pressure ratio is \",rp\n",
+ "print \"\\n Indicated power is \",P ,\" kW\"\n",
+ "print \"\\n Shaft power is \",P/0.8 ,\" kW\"\n",
+ "print \"\\n Mass flow rate is \",m_dot ,\" kg/s\"\n",
+ "print \"\\n Pressure ratio when second stage is added is \",rp_1\n",
+ "print \"\\n Volume derived per cycle is V2 \",V2 ,\" m**3\"\n",
+ "print \"\\n Second stage bore would be \",d*1000 ,\" mm\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.2:pg-819"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.2 \n",
+ " \n",
+ "\n",
+ " Volumetric efficiency of system is 73.7793963433 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "c = 0.05 # Clearance volume\n",
+ "p1 = 96.0 # Inlet ressure in bar\n",
+ "p2 = 725.0 # Outlet pressure in bar\n",
+ "pa = 101.3 # Atmospheric pressure\n",
+ "Ta = 292.0 # Atmospheric temperature in kelvin\n",
+ "T1 = 305.0 # Inlet temperature in Kelvin\n",
+ "n = 1.3 # polytropic index\n",
+ "print \"\\n Example 19.2 \\n \"\n",
+ "n_v = (1+c-c*((p2/p1)**(1/n)))*(p1/pa)*(Ta/T1)\n",
+ "print \"\\n Volumetric efficiency of system is \",n_v*100 ,\" percent\"\n",
+ "# Answer is not mentioned in book\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.3:pg-819"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.3\n",
+ "\n",
+ "\n",
+ " Indicated poer is 5.47565638255 kW\n",
+ "\n",
+ " Volumetric efficiency is 78.6098417845 percent\n",
+ "\n",
+ " Mass flow rate is 1.54145895718 kg/min\n",
+ "\n",
+ " Free air delivery is 1.25775746855 m**3/min\n",
+ "\n",
+ " Isothermal efficiency is 80.6428056306 percent\n",
+ "\n",
+ " Input power is 6.44194868535 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P1 = 101.3e03 \n",
+ "P4 = P1 # in Pa\n",
+ "P2 = 8*P1 \n",
+ "P3 = P2\n",
+ "T1 = 288 \n",
+ "Vs = 2000\n",
+ "V3 = 100 \n",
+ "Vc = V3\n",
+ "V1 = Vs + Vc \n",
+ "n = 1.25 \n",
+ "R = 287\n",
+ "V4 = ((P3/P4)**(1/n))*V3\n",
+ "W = ((n*P1*(V1-V4)*1e-06)/(n-1))*(((P2/P1)**((n-1)/n))-1)\n",
+ "P = (W*800*0.001)/60 \n",
+ "\n",
+ "m = (P1*(V1-V4)*1e-06)/(R*T1)\n",
+ "m_dot = m*800\n",
+ "\n",
+ "FAD = (V1-V4)*1e-06*800\n",
+ "\n",
+ "Wt = P1*(V1-V4)*1e-06*math.log(P2/P1)\n",
+ "n_isothermal = (Wt*800*0.001)/(P*60)\n",
+ "\n",
+ "Pi = P/0.85\n",
+ "n_v =100*(V1-V4)/Vs\n",
+ "print \"\\n Example 19.3\\n\"\n",
+ "print \"\\n Indicated poer is \",P ,\" kW\"\n",
+ "print \"\\n Volumetric efficiency is \",n_v ,\" percent\"\n",
+ "print \"\\n Mass flow rate is \",m_dot ,\" kg/min\"\n",
+ "print \"\\n Free air delivery is \",FAD ,\" m**3/min\"\n",
+ "print \"\\n Isothermal efficiency is \",100*n_isothermal ,\" percent\"\n",
+ "print \"\\n Input power is \",Pi ,\" kW\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.4:pg-819"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.4\n",
+ "\n",
+ "\n",
+ " Power input is 9.55276123312 kW, \n",
+ " Volumetric efficiency is 55.4657309635 percent, \n",
+ " Bore of the cylinder is 0.184932327621 m, \n",
+ " Stroke of the cylinder is 0.277398491431 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "m = 3.0 # Mass flow rate in kg/min\n",
+ "p1 = 1.0 # Initial pressure in bar\n",
+ "T1 = 300.0 # Initial temperature in K\n",
+ "p3 = 6.0 # Pressure after compression in bar\n",
+ "p5 = 15.0 # Maximum pressure in bar\n",
+ "N = 300.0 # Rpm of compressure\n",
+ "n = 1.3 # Index of compression and expansion \n",
+ "r = 1.5 # Stroke to bore ratio\n",
+ "R = 287.0 # Gas constant of air\n",
+ "t = 15.0 # Temperature in degree centigrade\n",
+ "print \"\\n Example 19.4\\n\"\n",
+ "T = t+273\n",
+ "Wc = (n/(n-1))*(m/60)*(R*(1e-3)*T1)*(((p3/p1)**((n-1)/n))-1)\n",
+ "r1 = (p5/p1)**(1.0/n)# Where r1 = V1/Vc\n",
+ "r2 = r1-1 # Where r2 = Vs/Vc\n",
+ "r3 = (p3/p1)**(1.0/n)\n",
+ "n_vol = (r1-r3)*(T/T1)/r2\n",
+ "V = m*R*T/(2*(1e5)*N)\n",
+ "Vs = V/n_vol\n",
+ "d = (Vs*4/(math.pi*r))**(1.0/3.0)\n",
+ "l = r*d\n",
+ "print \"\\n Power input is \",Wc ,\" kW, \\n Volumetric efficiency is \",n_vol*100 ,\" percent, \\n Bore of the cylinder is \",d ,\" m, \\n Stroke of the cylinder is \",l ,\" m\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.5:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.5\n",
+ "\n",
+ "\n",
+ " Power required to drive the unit is 17.7326053799 kW,\n",
+ " Isothermal efficiency is 65.8690064051 percent,\n",
+ " Mechanical efficiency is 98.5144743328 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "d = 15.0 # Diameter in cm\n",
+ "l = 18.0 # Stroke in cm\n",
+ "C = 0.04 # Ratio of clearance volume and sweft volume\n",
+ "p1 = 1.0 # Pressure in bar\n",
+ "t1 = 25.0 # Temperature in degree centigrade\n",
+ "p2 = 8.0# Pressure in bar\n",
+ "N = 1200.0 # Rpm of compressure \n",
+ "W = 18.0 # Actual power input in kW\n",
+ "m = 4.0 # Mass flow rate in kg/min\n",
+ "R = 0.287\n",
+ "print \"\\n Example 19.5\\n\"\n",
+ "T1 = t1+273\n",
+ "v = R*T1/(p1*100)\n",
+ "V = m*v\n",
+ "Vs = (math.pi/4)*((d*(1e-2))**2)*(l*1e-2)*N\n",
+ "n_vol = V/Vs\n",
+ "n = (math.log(p2/p1))/(math.log((1+C-n_vol)/C))\n",
+ "# The value of n given in the example is wrong\n",
+ "n = 1.573\n",
+ "T2 = T1*(p2/p1)**((n-1)/n)\n",
+ "Wc = (n/(n-1))*(m*R/60)*(T2-T1)\n",
+ "n_mech = Wc/W\n",
+ "W_isothermal = m*R*T1*math.log(p2/p1)/60\n",
+ "n_iso = W_isothermal/W\n",
+ "print \"\\n Power required to drive the unit is \",Wc ,\" kW,\\n Isothermal efficiency is \",n_iso*100 ,\" percent,\\n Mechanical efficiency is \",n_mech*100 ,\" percent\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.6:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.6\n",
+ "\n",
+ "\n",
+ " Power required to drive the compressure is 181.333212391 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "d = 40.0 # Diameter in cm\n",
+ "l = 50.0 # Stroke in cm\n",
+ "D = 5.0 # Piston rod diameter in cm\n",
+ "C = 0.04 # Ratio of clearance volume and sweft volume\n",
+ "p1 = 1.0 # Pressure in bar\n",
+ "t1 = 15.0 # Temperature in degree centigrade\n",
+ "p2 = 7.5# Pressure in bar\n",
+ "N = 300.0 # Rpm of compressure \n",
+ "n_vol = 0.8 # Volumetric efficiency\n",
+ "n_mech = 0.95 # Mechanical efficiency\n",
+ "n_iso = .7 # Isothermal efficiency\n",
+ "R = 0.287\n",
+ "print \"\\n Example 19.6\\n\"\n",
+ "Vs = (math.pi/4)*((d*(1e-2))**2)*(l*(1e-2))\n",
+ "Vs_ = (math.pi/4)*(((d*(1e-2))**2)-(D*(1e-2))**2)*(l*1e-2)\n",
+ "Vs_min = (Vs+Vs_)*2*N\n",
+ "V1 = Vs_min*n_vol\n",
+ "W_iso = p1*V1*(math.log(p2/p1))\n",
+ "Win = W_iso/n_iso\n",
+ "Wc = Win/n_mech\n",
+ "print \"\\n Power required to drive the compressure is \",Wc ,\" kW\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.7:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.7\n",
+ "\n",
+ "\n",
+ " Minimum work done is 215.324046 kJ/kg,\n",
+ " Heat rejected to intercooler is 87.0010719231 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "p1 = 1.0 # Pressure in bar\n",
+ "t1 = 27.0 # Temperature in degree centigrade\n",
+ "n = 1.3 # Index of the compression process\n",
+ "p3 = 9.0# Pressure in bar\n",
+ "R = 0.287\n",
+ "print \"\\n Example 19.7\\n\"\n",
+ "T1 = t1+273\n",
+ "p2 = math.sqrt(p1*p3)\n",
+ "Wc = ((2*n*R*T1)/(n-1))*(((p2/p1)**((n-1)/n))-1)\n",
+ "T2 = T1*((p2/p1)**((n-1)/n))\n",
+ "H = 1.005*(T2-T1)\n",
+ "print \"\\n Minimum work done is \",Wc ,\" kJ/kg,\\n Heat rejected to intercooler is \",H ,\" kJ/kg\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.8:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.8\n",
+ "\n",
+ "\n",
+ " Minimum power required by the compressure is 49.3370051888 kW,\n",
+ " Bore of the compressure in low pressure side is 26.5961520268 cm,\n",
+ " Bore of the compressure in high pressure side is 8.92172168806 cm,\n",
+ " Stroke of the compressure is 36.0 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "V = 4.0 # Volume flow rate in m**3/min\n",
+ "p1 = 1.013 # Pressure in bar\n",
+ "t1 = 15.0 # Temperature in degree centigrade\n",
+ "N = 250.0 # Speed in RPM\n",
+ "p4 = 80.0# Delivery pressure in bar\n",
+ "v = 3.0 #Speed of piston in m/sec\n",
+ "n_mech = .75 # Mechanical efficiency \n",
+ "n_vol = .8 # Volumetric efficiency\n",
+ "n = 1.25 # Polytropic index\n",
+ "print \"\\n Example 19.8\\n\"\n",
+ "T1 = t1+273\n",
+ "p2 = math.sqrt(p1*p4)\n",
+ "W = (2*n/(n-1))*(p1*100/n_mech)*(V/60)*((p2/p1)**((n-1)/n) - 1)\n",
+ "L = v*60/(N*2)\n",
+ "Vs = V/N\n",
+ "D_LP = math.sqrt(Vs*V/(math.pi*L*n_vol))\n",
+ "D_HP = D_LP*math.sqrt(p1/p2)\n",
+ "print \"\\n Minimum power required by the compressure is \",W ,\" kW,\\n Bore of the compressure in low pressure side is \",D_LP*100 ,\" cm,\\n Bore of the compressure in high pressure side is \",D_HP*100 ,\" cm,\\n Stroke of the compressure is \",L*100 ,\" cm\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.9:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.9\n",
+ "\n",
+ "\n",
+ " Compressor work = 107.662023 kJ/kg,\n",
+ " Total heat transfer to the surrounding = 125.119949539 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "p1 = 1.0 # Pressure in bar\n",
+ "T1 = 300.0 # Temperature in K\n",
+ "p4 = 9.0# Compressed pressure in bar\n",
+ "n = 1.3 # Polytropic index\n",
+ "R = 0.287 # Gas constant in kJ/kgK\n",
+ "cp = 1.042 # Heat capapcity in kJ/kgK\n",
+ "print \"\\n Example 19.9\\n\"\n",
+ "p2 = math.sqrt(p1*p4)\n",
+ "T2 =T1*((p2/p1)**((n-1)/n))\n",
+ "Wc = (2*n/(n-1))*R*1*(T2-T1)\n",
+ "Wc_ = Wc/2\n",
+ "Q = 1*cp*(T2-T1)\n",
+ "Q_ = cp*(T1-T2)+Wc_\n",
+ "H = Q+2*Q_\n",
+ "print \"\\n Compressor work = \",Wc_ ,\" kJ/kg,\\n Total heat transfer to the surrounding = \",H ,\" kJ/kg\"\n",
+ "#The answers given in the book contain calculation error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.10:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.10\n",
+ "\n",
+ "\n",
+ " Diameter of cylinder = 18.484702902 24.5391705107 cm, \n",
+ " Storke of the cylinder = 24.5391705107 cm,\n",
+ " Isothermal efficiency = 83.4955018622 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "N = 300.0 # Speed in RPM\n",
+ "# Intake condition of compressor\n",
+ "p1 = 0.98 # Pressure in bar\n",
+ "T1 = 305.0 # Temperature in K\n",
+ "\n",
+ "p6 = 20.0# Delivery pressure in bar\n",
+ "p3 = 5.0 # Intermediate pressure in bar\n",
+ "C = .04 # Ratio of clearance volume to the stroke volume\n",
+ "v = 3.0 # Volume flow rate of compressure in m**3/min\n",
+ "p = 1.0 # pressure in bar\n",
+ "t = 25.0 # Temperautre in degree centigrade\n",
+ "n = 1.3 # Polytropic index\n",
+ "R = 0.287 # Gas constant in kJ/kgK\n",
+ "print \"\\n Example 19.10\\n\"\n",
+ "T = t+273\n",
+ "r0 = 1+C # Where r0 = v1/vs\n",
+ "r1 = C*(p3/p1)**(1/n)# Where r1 = v4/vs\n",
+ "r2=r0-r1#Where r2 is the ratio of volume of air taken at 0.98 bar,305 k and vs\n",
+ "r3 = r2*(T/T1)*p1/p # Where r3 is the ratio of volume of air taken at free air conditions and vs\n",
+ "n_vol = r3\n",
+ "m = p*(1e5)*(v/60)/(R*1000*T)\n",
+ "T2 = T1*((p3/p1)**((n-1)/n))\n",
+ "# For perfect intercooling\n",
+ "T5 = T1\n",
+ "p5 = p3\n",
+ "T6 = T5*((p6/p5)**((n-1)/n))\n",
+ "Wc = (n/(n-1))*m*R*((T2-T1)+(T6-T5))\n",
+ "m_a_s = m*60/N\n",
+ "v_fa_s = m_a_s *(R*1000)*T/(p*1e5)\n",
+ "d = ((v_fa_s/n_vol)*(4/math.pi))**(1.0/3.0)\n",
+ "l = d # As given in the question\n",
+ "P_iso = m*R*T1*(math.log(p6/p1))\n",
+ "n_iso = P_iso/Wc\n",
+ "print \"\\n Diameter of cylinder = \",Wc,d*100 ,\" cm, \\n Storke of the cylinder = \",l*100 ,\" cm,\\n Isothermal efficiency = \",n_iso*100 ,\" percent\"\n",
+ "#The answers given in the book contain calculation error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.11:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.11\n",
+ "\n",
+ "\n",
+ " No of stages for min power input = 1.0 ,\n",
+ " Power required = 476.74544125 kW/kg air,\n",
+ " The power required for a single stage compressor = 476.74544125 kW,\n",
+ " Maximum temperature in any stage = 681.338601917 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "p1 = 1 # Intake pressure of compressor in bar\n",
+ "T1 = 298 # Intake temperature in K\n",
+ "p_d = 36 # Delivery pressure in bar\n",
+ "T2 = 390 # Maximum temperature in any stage in K\n",
+ "n = 1.3 # Polytropic index\n",
+ "R = 0.287\n",
+ "print \"\\n Example 19.11\\n\"\n",
+ "r = (T2/T1)**(n/(n-1))\n",
+ "N = math. ceil(r)\n",
+ "p2 = (p_d/p1)**(1/N)\n",
+ "p3 = (p_d/p1)**(2/N)\n",
+ "p4 = (p_d/p1)**(3/N)\n",
+ "Wc = (N*n*R*T1/(n-1))*((p_d/p1)**((n-1)/(N*n))-1)\n",
+ "Wc_ = (n/(n-1))*(1*R*T1)*((p_d/p1)**((n-1)/n)- 1)\n",
+ "T = T1*((p2/p1)**((n-1)/n))\n",
+ "print \"\\n No of stages for min power input = \",N ,\",\\n Power required = \",Wc ,\" kW/kg air,\\n The power required for a single stage compressor = \",Wc_ ,\" kW,\\n Maximum temperature in any stage = \",T ,\" K\"\n",
+ "#The answers given in the book contain round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.12:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.12\n",
+ "\n",
+ "\n",
+ " Indicated output = 132.877965499 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "p1 = 700.0 # Intake pressure of compressor in kPa\n",
+ "t1 = 38.0 # Intake temperature in degree centigrade\n",
+ "c = 0.4 # Ratio of cutoff volume to stroke volume\n",
+ "p3 = 112.0 # Back pressure in kPa\n",
+ "r = 0.85 # Ratio of area of actual indicator diagram to the outlined in the question\n",
+ "n = 1.3 # Polytropic index\n",
+ "R = 0.287\n",
+ "m = 1.25 # Air mass in kg\n",
+ "print \"\\n Example 19.12\\n\"\n",
+ "T1 = t1+273\n",
+ "T2 = T1/((1/c)**(n-1))\n",
+ "p2 = p1*(c**n)\n",
+ "V2 = m*R*T2/p2\n",
+ "v2 = V2/m\n",
+ "A = R*T1 + R*(T1-T2)/(n-1) - p3*v2\n",
+ "Io = A*r*m\n",
+ "print \"\\n Indicated output = \",Io ,\" kJ\"\n",
+ "# The answer given in the book vary due to round off error\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.13:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.13\n",
+ "\n",
+ "\n",
+ " The intermediate pressure are - \n",
+ " p2 = 2.46621207433 bar,\n",
+ " p3 = 6.08220199557 bar,\n",
+ " The effective sweft volume = 0.0477129384264 m**3,\n",
+ " Temperature of air delivered per stroke at 15 bar = 85.3946742162 degree centigrade,\n",
+ " The work done per kg of air = 254.077921795 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "d = 450.0 # Bore of low pressure cylinder in mm\n",
+ "l = 300.0 # Stroke in mm\n",
+ "c = 0.05 # Ratio of clearance volume to sweft volume\n",
+ "p1 = 1.0 # Intake pressure in bar\n",
+ "t1 = 18.0 # Intake temperature in degree centigrade\n",
+ "p4 = 15.0 # Delivery pressure in bar\n",
+ "n = 1.3 # Compression and expansion index\n",
+ "R = 0.29 # Gas constant in kJ/kgK\n",
+ "print \"\\n Example 19.13\\n\"\n",
+ "T1 = t1+273\n",
+ "r = (p4/p1)**(1.0/3.0)\n",
+ "p2 = p1*r\n",
+ "p3 = p2*r\n",
+ "Vs = (math.pi/4)*((d*1e-3)**2)*(l*1e-3)\n",
+ "V11 = c*Vs\n",
+ "V1 = Vs +V11\n",
+ "V12 = V11*((r)**(1.0/n))\n",
+ "Vs_e = V1 - V12\n",
+ "T3 = T1\n",
+ "T5 = T3\n",
+ "T6 = T1*(r**((n-1)/n))\n",
+ "t6 = T6-273\n",
+ "V6_7 = (p1/p4)*(T6/T1)*(V1 - V12)\n",
+ "W = (3*n*R*T1/(n-1))*((p2/p1)**((n-1)/n)-1)\n",
+ "print \"\\n The intermediate pressure are - \\n p2 = \",p2 ,\" bar,\\n p3 = \",p3 ,\" bar,\\n The effective sweft volume = \",Vs ,\" m**3,\\n Temperature of air delivered per stroke at 15 bar = \",t6 ,\" degree centigrade,\\n The work done per kg of air = \",W ,\" kJ\"\n",
+ "# The answers given in the book vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.14:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.14\n",
+ "\n",
+ "\n",
+ " Work input = 1.5195 kJ/rev,\n",
+ " Work input for a vane-type compressor = 1.34802979062 kJ/rev\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "p1 = 1.013 # Inlet pressure in bar\n",
+ "r = 1.5 # Pressure ratio\n",
+ "Vs = 0.03 # Induce volume of air in m**3/rev\n",
+ "gama = 1.4 \n",
+ "print \"\\n Example 19.14\\n\"\n",
+ "p2 = p1*r\n",
+ "W = (p2-p1)*Vs*100\n",
+ "pi = (p1+p2)/2\n",
+ "A_A = (gama/(gama-1))*(p1*Vs)*((pi/p1)**((gama-1)/gama)-1)*100\n",
+ "Vb = Vs *((p1/pi)**(1/gama))\n",
+ "A_B = (p2-pi)*Vb*100\n",
+ "Wr = A_A + A_B\n",
+ "print \"\\n Work input = \",W ,\" kJ/rev,\\n Work input for a vane-type compressor = \",Wr ,\" kJ/rev\"\n",
+ "# The answers given in the book vary due to round off error\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.15:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.15\n",
+ "\n",
+ "\n",
+ " Power required to drive the blower = 99.47 kW,\n",
+ " Power required = 77.9220893777 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "m = 1.0 # Mass flow rate in kg/s\n",
+ "r = 2.0 # Prssure ratio of blower \n",
+ "t1 = 70.0 # Inlet temperature in degree centigrade\n",
+ "p1 = 1.0 # Inlet pressure in bar\n",
+ "R = 0.29 # Gas constant in kJ/kgK\n",
+ "x = 0.7 # Reduction in pressure ratio and intake volume \n",
+ "gama = 1.4\n",
+ "print \"\\n Example 19.15\\n\"\n",
+ "T1 = t1+273\n",
+ "V = m*R*T1/(p1*100)\n",
+ "P = V*(p1*r-p1)*100\n",
+ "p2 = p1*((1/x)**(gama))\n",
+ "V2 = x*V\n",
+ "P_ = (gama/(gama-1))*(p1*100*V)*((p2/p1)**((gama-1)/gama)-1) + V2*(p1*r-p2)*100\n",
+ "\n",
+ "print \"\\n Power required to drive the blower = \",P ,\" kW,\\n Power required = \",P_ ,\" kW\"\n",
+ "# The answers given in the book vary due to round off error\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.16:pg-820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.16\n",
+ "\n",
+ "\n",
+ " Actual temperature at the end of first stage = 382.63704941 K,\n",
+ " Actual temperature at the end of second stage = 425.041961043 K,\n",
+ " The total compressor power = 965.01085424 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "r1 = 2.5 # Pressure ratio of compressor for first stage\n",
+ "r2 = 2.1 # Pressure ratio of compressor for second stage\n",
+ "m = 5.0 # Mass flow rate of air in kg/s \n",
+ "t1 = 10.0 # Inlet temperature in degree centigrade\n",
+ "p1 = 1.013 # Inlet pressure in bar\n",
+ "td = 50.0 # Temperature drop in intercooler in degree centigreade\n",
+ "n_iso = .85 # Isentropic efficiency\n",
+ "cp = 1.005 # Heat capacity of air in kJ/kgK\n",
+ "x = 0.7 # Reduction in pressure ratio and intake volume \n",
+ "gama = 1.4 # Ratio of heat capacities for air\n",
+ "print \"\\n Example 19.16\\n\"\n",
+ "T1 = t1+273\n",
+ "T2s = T1*((r1)**((gama-1)/gama))\n",
+ "T2 = T1 + (T2s-T1)/n_iso\n",
+ "T3 = T2 - td\n",
+ "T4s = T3*((r2)**((gama-1)/gama))\n",
+ "T4 = T3 + (T4s-T3)/n_iso\n",
+ "P = m*cp*((T2-T1)+(T4-T3))\n",
+ "print \"\\n Actual temperature at the end of first stage = \",T2 ,\" K,\\n Actual temperature at the end of second stage = \",T4 ,\" K,\\n The total compressor power = \",P ,\" kW\"\n",
+ "# The answers given in the book vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.17:pg-821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.17\n",
+ "\n",
+ "\n",
+ " Power required to drive the compressor = 54.6039650117 kW,\n",
+ " Stagnatio temperature = 109.18614963 degree centigrade,\n",
+ " Stagnation pressure = 160.465577551 kPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "r = 2.5 # Static pressure ratio of supercharger \n",
+ "p1 = 0.6 # Static inlet pressure in bar\n",
+ "t1 = 5 # Static inlet temperature in degree centigrade\n",
+ "A_r = 13.0 # Air-fuel ratio\n",
+ "m = 0.04 # The rate of fuel consumed by the engine in kg/s\n",
+ "gama= 1.39 # For air-fuel mixture \n",
+ "cp = 1.005 # Heat capacity for air-fuel mixture in kJ/kgk\n",
+ "n_iso = .84 # Isentropic efficiency of compressor \n",
+ "v = 120.0 # Exit velocity from the compressor in m/s\n",
+ "print \"\\n Example 19.17\\n\"\n",
+ "T1 = t1+273\n",
+ "T2s = T1*((r)**((gama-1)/gama))\n",
+ "T2 = T1 +(T2s-T1)/n_iso\n",
+ "m_g = m*(A_r+1)\n",
+ "P = m_g*cp*(T2-T1)\n",
+ "T02 = T2 + (v**2)/(2*cp*1000)\n",
+ "t02 = T02-273\n",
+ "p02 = p1*r*((T02/T2)**(gama/(gama-1)))*100\n",
+ "print \"\\n Power required to drive the compressor = \",P ,\" kW,\\n Stagnatio temperature = \",t02 ,\" degree centigrade,\\n Stagnation pressure = \",p02 ,\" kPa\"\n",
+ "# The answers given in the book vary due to round off error\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.18:pg-821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.18\n",
+ "\n",
+ "\n",
+ " The temperature of air at outlet = 233.053979565 degree centigrade,\n",
+ " Power input = 300.644961473 kW,\n",
+ " Diameter of impeller = 0.916122726914 m, \n",
+ " Blade inlet angle = 0.245135262084 degree,\n",
+ " Diffuser inlet angle = 0.138096713577 degree \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "N = 10000 # Speed in RPM\n",
+ "V = 1.2 # Volume flow rate of free air in m**3/s\n",
+ "p1 = 1.0 # Inlet pressure in bar\n",
+ "t1 = 27.0 # Inlet temperature in degree centigrade\n",
+ "r = 5.0 # Pressure ratio\n",
+ "vf = 60.0 # Velocity flow rate in m/s\n",
+ "sigma = 0.9 # Slip factor\n",
+ "n_iso = 0.85 # Isentropic efficiency\n",
+ "gama = 1.4\n",
+ "R = 0.287\n",
+ "cp = 1.005\n",
+ "print \"\\n Example 19.18\\n\"\n",
+ "T1 = t1+273\n",
+ "T2s = T1*((r)**((gama-1)/gama))\n",
+ "T2 = T1 +(T2s-T1)/n_iso\n",
+ "m = p1*100*V/(R*288)\n",
+ "Wc = m*cp*(T2-T1)\n",
+ "Vb2 = (Wc*1000/(m*sigma))**(1.0/2.0)\n",
+ "D = Vb2*60/(math.pi*N)\n",
+ "Vb1 = Vb2/2\n",
+ "beta1 = math.atan(vf/Vb1)\n",
+ "alpha = math.atan(vf/(sigma*Vb2))\n",
+ "print \"\\n The temperature of air at outlet = \",T2-273 ,\" degree centigrade,\\n Power input = \",Wc ,\" kW,\\n Diameter of impeller = \",D ,\" m, \\n Blade inlet angle = \",beta1 ,\" degree,\\n Diffuser inlet angle = \",alpha ,\" degree \"\n",
+ "# The answers given in the book vary due to round off error\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.19:pg-821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " \n",
+ " Example 19.19\n",
+ "\n",
+ "\n",
+ " Total head pressure ratio = 1.00344817308 , \n",
+ " The required power at input shaft = 3.37798367776 kW,\n",
+ " Inlet angle at the root = 0.0 degree and 29.8821913183 minute,\n",
+ " Inlet angle at the tip = 0.0 degree and 49.6377044903 minute\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "N = 264 # Speed in RPS\n",
+ "sigma = 0.91 # Slip factor\n",
+ "d = 0.482 # Impeller diameter in m\n",
+ "D = 0.306 # Impeller eye diameter\n",
+ "D_ = 0.153 # Impeller root eye diameter in m\n",
+ "vf = 138 # Uniform axial inlet velocity in m/s\n",
+ "V = 1.2 # Volume flow rate of free air in m**3/s\n",
+ "m = 9.1 # Air mass flow rate in kg/s\n",
+ "T1 = 294 # Inlet air stagnation temperature in K\n",
+ "n_iso = 0.8 # Total head isentropic efficiency\n",
+ "n_mech = 0.98 # Mechanical efficiency\n",
+ "gama = 1.4 # Ratio of heat capacities\n",
+ "cp = 1.006 # Heat capacity in kJ/kgK\n",
+ "print \"\\n Example 19.19\\n\"\n",
+ "Wc = m*sigma*(2*math.pi*d*N/2)/1000\n",
+ "P_e = Wc/n_mech\n",
+ "delta_T = Wc/(m*cp)\n",
+ "delta_T_ideal = delta_T*n_iso\n",
+ "T2_i = delta_T_ideal + T1\n",
+ "r = (T2_i/T1)**(gama/(gama-1)) # Where r = p02/p01\n",
+ "Vb = 2*math.pi*N*D/2\n",
+ "V_er = (2*math.pi*N*D_/2)\n",
+ "beta1 = math.atan(vf/Vb)\n",
+ "beta2 = math.atan(vf/V_er)\n",
+ "beta1_ = (beta1 - math.floor(beta1))*60\n",
+ "beta2_ = (beta2 - math.floor(beta2))*60\n",
+ "print \"\\n Total head pressure ratio = \",r ,\", \\n The required power at input shaft = \",P_e ,\" kW,\\n Inlet angle at the root = \",math.floor(beta1) ,\" degree and \",beta1_ ,\" minute,\\n Inlet angle at the tip = \",math.floor(beta2) ,\" degree and \",beta2_ ,\" minute\"\n",
+ "# The answers given in the book for total head pressure ratio and required power at input shaft contain calculation error\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.20:pg-821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.20\n",
+ "\n",
+ "\n",
+ " Impeller tip diameter = 548.821948011 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "N = 16000.0 # Speed in RPM\n",
+ "t1 = 17.0 # Intake temperture of gas in degree centigrade\n",
+ "rp = 4.0 # Pressure ratio\n",
+ "sigma = 0.85# Slip factor\n",
+ "n_iso = 0.82 # Isentropic efficiency\n",
+ "alpha_wirl = 20.0 # Pre-wirl angle in degree\n",
+ "d1 = 200.0 # Mean diameter of impeller eye in mm\n",
+ "V1 = 120.0 #Absolute air velocity in m/s\n",
+ "gama = 1.4 # Ratio of heat capacities\n",
+ "cp = 1.005 # Heat capacity in kJ/kgK\n",
+ "print \"\\n Example 19.20\\n\"\n",
+ "T1 = t1 + 273\n",
+ "T2s = T1*((rp)**((gama-1)/gama))\n",
+ "delta_Ts = T2s-1\n",
+ "delta_T = delta_Ts/n_iso\n",
+ "Wc = 1 *cp*delta_T\n",
+ "Vb1 = (math.pi*d1*(1e-3)*N)/60\n",
+ "Vw1 = V1*math.sin(alpha_wirl)\n",
+ "Vb2 = 459.78 # By solving quadratic equation 172.81e3=0.85*Vb2**2-167.55*41.05\n",
+ "d2 = Vb2*60/(math.pi*N)\n",
+ "\n",
+ "print \"\\n Impeller tip diameter = \",d2*1000 ,\" mm\"\n",
+ "# The answer given in the book varies due to round off error\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.21:pg-821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.21\n",
+ "\n",
+ "\n",
+ " The delivery pressure = 6.07125291521 bar,\n",
+ " The no of stages = 9.0 ,\n",
+ " The internal efficiency = 0.84689822539 \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "m = 2.5 # Mass flow rate in kg/s\n",
+ "p1 = 1.0 # Inlet pressure in bar\n",
+ "T1 = 300.0 # Inlet temperature in bar\n",
+ "n_s = 0.88 # Stage efficiency\n",
+ "Wc = 600.0 # Power input in kW\n",
+ "delta_t = 21.0 # Temperature rise in first stage in degree centigrade\n",
+ "gama = 1.4 # Ratio of heat capacities \n",
+ "cp = 1.005 # Heat capacity in kJ/kgK\n",
+ "print \"\\n Example 19.21\\n\"\n",
+ "x = n_s*gama/(gama-1)# Where x = (n/(n-1))\n",
+ "T = Wc/(m*cp)+T1\n",
+ "p = p1*((T/T1)**(x))\n",
+ "T2 = T1 + n_s*delta_t\n",
+ "r = ((T2/T1)**(gama/(gama-1)))# Where r = p2/p1\n",
+ "N = math.log(p/p1)/math.log(r)\n",
+ "N_ = math. ceil(N)\n",
+ "Ts = T1*(p/p1)**((gama-1)/gama)\n",
+ "n_inter = (Ts-T1)/(T-T1)\n",
+ "print \"\\n The delivery pressure = \",p ,\" bar,\\n The no of stages = \",N_ ,\",\\n The internal efficiency = \",n_inter ,\" \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.22:pg-821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.22\n",
+ "\n",
+ "\n",
+ " Fluid deflection angle = 0.206163966177 degree,\n",
+ " Power input = 41.8928434516 kJ/kg,\n",
+ " The degree of reaction = 66.0453433333 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "D = 0.5 # Mean diameter of impeller in m\n",
+ "N = 15000.0 # Speed in RPM\n",
+ "Vf = 230.0 # Velocity of flow in m/s\n",
+ "p1 = 1.0 # Inlet pressure in bar\n",
+ "T1 = 300.0 # Inlet temperature in K\n",
+ "Vw1 = 80.0 # Velocity of whirl at inlet in m/s\n",
+ "n_s = 0.88 # Stage efficiency\n",
+ "rp = 1.5 # Pressure ratio\n",
+ "gama = 1.4 \n",
+ "cp = 1.0005\n",
+ "print \"\\n Example 19.22\\n\"\n",
+ "Vb = (math.pi*D*N/60)\n",
+ "Ts = T1*((rp)**((gama-1)/gama))\n",
+ "T = T1 + (Ts-T1)/n_s\n",
+ "Wc = cp*(T-T1)\n",
+ "Vw2 = Vw1 + (Wc*1000)/(Vb)\n",
+ "beta1 = math.atan(Vf/(Vb-Vw1))\n",
+ "beta2 = math.atan(Vf/(Vb-Vw2))\n",
+ "theta = beta2-beta1\n",
+ "R = 1-((Vw1+Vw2)/(2*Vb))\n",
+ "\n",
+ "print \"\\n Fluid deflection angle = \",theta ,\" degree,\\n Power input = \",Wc ,\" kJ/kg,\\n The degree of reaction = \",R*100 ,\" percent\"\n",
+ "# The answers given in the book vary because of round off error\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.23:pg-821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.23\n",
+ "\n",
+ "\n",
+ " Blade angle at the tip = 1.02107077046 degree,\n",
+ " Blade angle at the hub = 2.71029118833 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "v = 5.0 #olume flow rate in m**3/s\n",
+ "d = 1.0 #ean impeller diameter in m\n",
+ "D = 0.6 # Hub diameter in m\n",
+ "N = 600.0 #otational speed in RPM\n",
+ "h = 35.0 #heoratical head in mm\n",
+ "rho = 1.2 # Density of air in kg/m**3\n",
+ "rho_w = 1000.0 #ensity of water in kg/m**3\n",
+ "print \"\\n Example 19.23\\n\"\n",
+ "Vf = v*4/(math.pi*(d**2 - D**2))\n",
+ "Vb = (math.pi*d*N/60)\n",
+ "Vb_ = (math.pi*D*N/60)\n",
+ "H = h/rho\n",
+ "Vw2 = H*9.81/(Vb)\n",
+ "Vw2_ = H*9.81/(Vb_)\n",
+ "beta_tip = (Vf/(Vb_-Vw2))\n",
+ "beta_hub = (Vf/(Vb_-Vw2_))\n",
+ "print \"\\n Blade angle at the tip = \",beta_tip ,\" degree,\\n Blade angle at the hub = \",beta_hub ,\" degree\"\n",
+ "# The answers given in the book vary because of round off error\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.24:pg-821"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 19.24\n",
+ "\n",
+ "\n",
+ " Speed of impeller = 6456.85894335 RPM,\n",
+ " Impeller width at inlet = -73.5259022616 cm,\n",
+ " Impeller width at outlet = 1.87680083777 cm,\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "N0 = 9000.0 # Rotational speed in RPM\n",
+ "Q = 6.0 # Volume flow rate in m**3/s\n",
+ "p1 = 1.0 # Initial pressure in bar\n",
+ "t1 = 25.0 # Initial temperature in degree centigrade\n",
+ "p2 = 2.2 # Compressed pressure in bar\n",
+ "n = 1.33 # Compression index\n",
+ "Vf = 75.0 # Velocity of flow in m/s\n",
+ "beta1 = 30.0 # Blade angle at inlet in degree\n",
+ "beta2 = 55.0 # Blade angle at outlet in degree\n",
+ "d = 0.75 # Diameter of impeller in m\n",
+ "cp = 1.005 \n",
+ "print \"\\n Example 19.24\\n\"\n",
+ "T1 = t1+273\n",
+ "T2 = T1*(p2/p1)**((n-1)/n)\n",
+ "Wc = cp*(T2-T1)\n",
+ "x = Wc # Where x = Vw2*Vb2\n",
+ "y = Vf/math.tan(beta2)# Where y = Vb2-Vw2(Equation 1)\n",
+ "z = (y**2 +4*x*1000)**(0.5) # Where z = Vw2+Vb2(Equation 2)\n",
+ "# By solving Equation 1 and Equation 2\n",
+ "Vb2 = (y+z)/2\n",
+ "Vw2 = ((z-y)/2)\n",
+ "N = Vb2*60/(math.pi*d)\n",
+ "Vb1 = Vf/math.tan(beta1)\n",
+ "D1 = Vb1*60/(math.pi*N)\n",
+ "b1 = Q/(math.pi*D1*Vf)\n",
+ "Q_ = Q* (1/p2)*(T2/T1)\n",
+ "b2 = Q_/(math.pi*d*Vf)\n",
+ "print \"\\n Speed of impeller = \",N ,\" RPM,\\n Impeller width at inlet = \",b1*100 ,\" cm,\\n Impeller width at outlet = \",b2*100 ,\" cm,\"\n",
+ "# The answers given in the book vary because of round off error\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter1_seG0iD4.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter1_seG0iD4.ipynb
new file mode 100644
index 00000000..40629382
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter1_seG0iD4.ipynb
@@ -0,0 +1,121 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 01:Introduction"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.1:pg-20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 1.1\n",
+ "\n",
+ "\n",
+ " Gas Pressure is 1.74 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given Data\n",
+ "d_r = 13640 # Density of mercury in kg/m^3\n",
+ "g = 9.79 # Acceleration due to gravity in m/s^2\n",
+ "z = 562e-03 # Difference in height in m\n",
+ "z0 = 761e-03 # Reading of barometer in m\n",
+ "P = (d_r*g*(z+z0))*(0.987/1e05) # Gas Pressure in atm\n",
+ "\n",
+ "print \"\\n Example 1.1\\n\"\n",
+ "print \"\\n Gas Pressure is \",round(P,2),\" atm\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.2:pg-21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 1.2\n",
+ "\n",
+ "\n",
+ " Inlet steam pressure is 1.5 MPa\n",
+ "\n",
+ " Condenser pressure is 8.27 kPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Given Data\n",
+ "d_r = 13.6e03 # Density of mercury in kg/m^3\n",
+ "g = 9.81 # Acceleration due to gravity in m/s^2\n",
+ "z = 710e-03 # Steam flow pressure in m\n",
+ "z0 = 772e-03 # Reading of barometer in m\n",
+ "P = 1.4e06 # Gauge pressure of applied steam in Pa\n",
+ "P0 = d_r*g*z0 # Atmospheric pressure in Pa\n",
+ "Pi = P+P0 # Inlet steam pressure in Pa\n",
+ "Pc = d_r*g*(z0-z) # Condenser pressure in Pa\n",
+ "\n",
+ "print \"\\n Example 1.2\\n\"\n",
+ "print \"\\n Inlet steam pressure is\",round(Pi/1e6,2),\" MPa\"\n",
+ "print \"\\n Condenser pressure is\",round(Pc/1e3,2),\" kPa\"\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter20_7AIMdUg.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter20_7AIMdUg.ipynb
new file mode 100644
index 00000000..1d77e8e7
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter20_7AIMdUg.ipynb
@@ -0,0 +1,912 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 20:Internal Combustion Engines"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.2:pg-852"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.2\n",
+ "\n",
+ "\n",
+ " Diameter of cylinder = 6.20350490899 cm\n",
+ " Stroke of each cylinder = 9.30525736349 cm\n",
+ " Brake specific fuel consumption = 0.292207792208 kg/kWh\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "# Four cylinder engine\n",
+ "BP = 30.0 # Power developed by engine in kW\n",
+ "N = 2500.0 # Speed in rpm\n",
+ "P_m = 800.0 # Mean effective pressure for each cylinder in kN/m**2\n",
+ "n_m = 0.8 # Mechanical efficiency\n",
+ "r = 1.5 # Stroke to bore ratio\n",
+ "n_b = 0.28 # Brake thermal efficiency\n",
+ "c_v = 44.0 # Heating value of petrol in MJ/kg\n",
+ "print \"\\n Example 20.2\\n\"\n",
+ "IP = BP/n_m\n",
+ "d = ((IP*1000*60)/(P_m*1000*r*(math.pi/4)*N*4))**(1.0/3.0)\n",
+ "L = r*d\n",
+ "m_f = BP/(c_v*1000*n_b)\n",
+ "bsfc = m_f*3600/BP\n",
+ "print \"\\n Diameter of cylinder = \",d*10**2 ,\" cm\\n Stroke of each cylinder = \",L*100 ,\" cm\\n Brake specific fuel consumption = \",bsfc ,\" kg/kWh\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.1:pg-851"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.1\n",
+ "\n",
+ "\n",
+ " Fuel consumption of the engine = 6.73508593048 Kg/h\n",
+ " BMEP= 637.807536593 kN/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "d = 6.5# Diametre in cm\n",
+ "L = 9.5 # Stroke in cm\n",
+ "T = 64.0 # Torque in Nm\n",
+ "N = 3000.0 # Speed in rpm\n",
+ "V_c = 63.0 # Clearance volume in cm**3\n",
+ "r = 0.5 # Brake efficiency ratio\n",
+ "c_v = 42.0 # Calorific value of gasoline in MJ/kg\n",
+ "print \"\\n Example 20.1\\n\"\n",
+ "V_s = (math.pi/4)*(d**2)*(L)\n",
+ "r_k = (V_s+V_c)/V_c\n",
+ "n_as = 1- (1.0/(r_k**(0.4)))\n",
+ "n_b = r*n_as\n",
+ "BP = (2*math.pi*T*N)/60000\n",
+ "m_f = (BP*3600)/(n_b*c_v*1000)# in kg/h\n",
+ "BMEP = BP*60*2/((math.pi/4)*4*(d**2)*L*N*10**(-6))\n",
+ "print \"\\n Fuel consumption of the engine = \",m_f ,\" Kg/h\\n BMEP=\",BMEP ,\" kN/m**2\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.3:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.3\n",
+ "\n",
+ "\n",
+ " Indicated power = 7.59218224618 kW\n",
+ " Indicate mean effective pressure = 386.666666667 kN/m**2\n",
+ " Fuel consumption per kWh on brake power output = 0.255681818182 Kg/kWh\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "F = 680.0 # Net brake load in N\n",
+ "N = 360.0 # \n",
+ "d = 10.0# Bore in cm\n",
+ "L = 15.0 # Stroke in cm\n",
+ "T = 58.0 # Torque in Nm\n",
+ "v = 300.0 # Speed in m/min\n",
+ "n_m = 0.8 # Mechanical efficiency\n",
+ "n_th = 0.4 # Indicated thermal efficiency\n",
+ "c_v = 44.0 # Calorific value of gasoline in MJ/kg\n",
+ "print \"\\n Example 20.3\\n\"\n",
+ "N = v/(2*L*(10**(-2)))\n",
+ "BP = (2*math.pi*T*N)/60000\n",
+ "IP = BP/n_m\n",
+ "p_m = (IP*60)/(L*(math.pi/4)*(d**2)*N*10**(-6))\n",
+ "m_f = (IP*3600)/(n_th*c_v*1000)\n",
+ "bsfc = m_f/BP\n",
+ "print \"\\n Indicated power = \",IP ,\" kW\\n Indicate mean effective pressure = \",p_m ,\" kN/m**2\\n Fuel consumption per kWh on brake power output = \",bsfc ,\" Kg/kWh\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.4:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.4\n",
+ "\n",
+ "\n",
+ " Indicated power = 18.080022801 kW\n",
+ " Brake power = 12.8176980266 kW\n",
+ "\n",
+ " Energy release by combustion of fuel is 68640.0 kJ \n",
+ " 1. Energy equivalent of ip is 21696.0273613 kJ ( 31.6084314704 percent)\n",
+ " 2. Energy carried away by cooling water is 16748.0 kJ ( 24.3997668998 percent),\n",
+ " 3. Energy carried away by exhaust gases is 19333.323828 kJ ( 28.1662643182 percent),\n",
+ " 4. Unaccounted energy loss (by difference) is 10862.6488107 kJ ( 15.8255373117 percent)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "T = 20.0 # Time in minute\n",
+ "F = 680.0 # Net brake load in N\n",
+ "N = 360.0 # Speed in rpm\n",
+ "mep = 3.0 # Mean effective pressure in bar\n",
+ "f = 1.56 # Fuel consumption in kg\n",
+ "m_w = 160.0 # Cooling water in kg\n",
+ "t = 57.0 # Water inlet temperature in degree centigrade\n",
+ "r = 30.0 # Air used per kg of fuel\n",
+ "t_r = 27.0 # Room temperature in degree centigrade\n",
+ "t_e = 310.0 # Exhaust gas temperature in degree centigrade\n",
+ "d = 210.0 # Bore in mm\n",
+ "L = 290.0 # Stroke in mm\n",
+ "D = 1.0 # Brake diameter in m\n",
+ "cv = 44.0 # Calorific value in MJ/kg\n",
+ "m_s = 1.3 # Steam formed per kg fuel in the exhaust in kg\n",
+ "s = 2.093 # Specific heat of steam in the exhaust in kJ/kgK\n",
+ "s_d = 1.01 # Specific heat of dry exhaust gases in kJ/kgK\n",
+ "print \"\\n Example 20.4\\n\"\n",
+ "i_p = mep*100*L*(10**-3)*(math.pi/4)*((d*(10**-3))**2)*N/60\n",
+ "b_p = (2*math.pi*(F*(D/2))*N)/60000\n",
+ "n_m = b_p / i_p\n",
+ "h = f*cv*1000\n",
+ "i_pe = i_p*T*60\n",
+ "e_w = m_w * 4.187*(t-32)\n",
+ "m_t = f*r + f\n",
+ "m_s_ = m_s*f\n",
+ "m_d = m_t - m_s_\n",
+ "e_d = m_d * s_d * (t_e-t_r)\n",
+ "e_s = m_s_*(4.187*(100-t_r) + 2257.9 +s*(t_e-100))\n",
+ "e_t = e_s + e_d\n",
+ "e_Un = h - (i_pe + e_w + e_t)\n",
+ "print \"\\n Indicated power = \",i_p ,\" kW\\n Brake power = \",b_p ,\" kW\"\n",
+ "print \"\\n Energy release by combustion of fuel is \",h ,\" kJ \\n 1. Energy equivalent of ip is \",i_pe ,\" kJ (\",(i_pe/h)*100 ,\" percent)\\n 2. Energy carried away by cooling water is \",e_w ,\" kJ (\",(e_w/h)*100 ,\" percent),\\n 3. Energy carried away by exhaust gases is \",e_t ,\" kJ (\",(e_t/h)*100 ,\" percent),\\n 4. Unaccounted energy loss (by difference) is \",e_Un ,\" kJ (\",(e_Un/h)*100 ,\" percent)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.5:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.5\n",
+ "\n",
+ "\n",
+ " Indicated power = 15.1189146454 kW\n",
+ " Brake power = 11.178833859 kW\n",
+ " Mechanical efficiency = 73.9393939394 percent,\n",
+ " Indicated thermal efficiency = 29.1059319377 percent,\n",
+ " Brake thermal efficiency = 21.5207496751 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "F = 610.0 # Net brake load in N\n",
+ "N = 350.0 # Speed in rpm\n",
+ "d = 20.0 # Bore in cm\n",
+ "L = 30.0 # Stroke in cm\n",
+ "imep = 275.0 # Mean effective pressure in kN/m**2\n",
+ "D = 1.0 # Brake diameter in m\n",
+ "m_o = 4.25 # Oil consumption in kg/h\n",
+ "cv = 44.0 # Calorific value in MJ/kg\n",
+ "print \"\\n Example 20.5\\n\"\n",
+ "i_p = imep*1000*L*(10**-2)*(math.pi/4)*((d*(10**-2))**2)*N/60000\n",
+ "b_p = (2*math.pi*(F*(D/2))*N)/60000\n",
+ "n_m = b_p / i_p\n",
+ "n_th = i_p *3600/(m_o*cv*1000)\n",
+ "n_br = n_th*n_m\n",
+ "print \"\\n Indicated power = \",i_p ,\" kW\\n Brake power = \",b_p ,\" kW\\n Mechanical efficiency = \",n_m*100 ,\" percent,\\n Indicated thermal efficiency = \",n_th*100 ,\" percent,\\n Brake thermal efficiency = \",n_br*100 ,\" percent\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.6:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.6\n",
+ "\n",
+ "\n",
+ "Avg no of misfire = 3.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "no = 6.0 # No of cylinders\n",
+ "Vs = 1.75 # Stroke volume in litres\n",
+ "P = 26.25 # Power developed in kW\n",
+ "N = 506.0 # Speed in rpm\n",
+ "mep = 600.0 # Mean effectine pressure in kN/m**2\n",
+ "print \"\\n Example 20.6\\n\"\n",
+ "n = P*60000/(no*mep*1000*Vs*(10**-3))\n",
+ "n_e = N/2\n",
+ "n_m = n_e - n\n",
+ "print \"\\nAvg no of misfire = \",n_m\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.7:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.7\n",
+ "\n",
+ "\n",
+ "Saving in fuel = 1.81818181818 kg/h\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "Bp = 110 # Brake power in kW\n",
+ "n_m = 0.8 # Mechanical efficiency of the engine\n",
+ "m_f = 50 # Fuel required for engine in kg/h\n",
+ "r_f = 5 # Reduced engine friction in kW\n",
+ "print \"\\n Example 20.7\\n\"\n",
+ "Ip = Bp/n_m\n",
+ "Fp = Ip-Bp\n",
+ "Fp_n = Fp-r_f\n",
+ "Ip_new = Bp + Fp_n\n",
+ "m_f_new = Ip_new * m_f/ Ip\n",
+ "s_f = m_f- m_f_new\n",
+ "print \"\\nSaving in fuel = \",s_f ,\" kg/h\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.8:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.8\n",
+ "\n",
+ "\n",
+ " Mechanical efficiency = 82.6306913997 percent,\n",
+ " Relative efficiency on indicated power basis = 54.0966815927 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "Bp = 14.7 # Brake power when all cylinder operating in kW\n",
+ "Bp1 = 10.14 # Brake power with cylinder no. 1 cut out in kW\n",
+ "Bp2 = 10.3 # Brake power with cylinder no. 2 cut out in kW\n",
+ "Bp3 = 10.36 # Brake power with cylinder no. 3 cut out in kW\n",
+ "Bp4 = 10.21 # Brake power with cylinder no. 4 cut out in kW\n",
+ "m_f = 5.5 # Fuel consumption in kg/h\n",
+ "cv = 42 # Calorific value MJ/kg\n",
+ "d = 8 # Diameter of cylinder in cm\n",
+ "L = 10 # Stroke of cylinder in cm\n",
+ "Vc = 0.1 # Clearance volume in litre\n",
+ "print \"\\n Example 20.8\\n\"\n",
+ "Ip1 = Bp-Bp1\n",
+ "Ip2 = Bp-Bp2\n",
+ "Ip3 = Bp-Bp3\n",
+ "Ip4 = Bp-Bp4\n",
+ "Ip = Ip1+Ip2+Ip3+Ip4\n",
+ "n_m = Bp/Ip\n",
+ "Vs = (math.pi/4)*((d*(10**-2))**2)*(L*(10**-2))\n",
+ "r_k = (Vs+(Vc*(10**-3)))/(Vc*(10**-3))\n",
+ "n_ase = 1- (1/(r_k**(1.4-1)))\n",
+ "n_th = Ip*3600/(m_f*cv*1000)\n",
+ "R_e = n_th/n_ase\n",
+ "print \"\\n Mechanical efficiency = \",n_m*100,\" percent,\\n Relative efficiency on indicated power basis = \",R_e*100,\" percent\"\n",
+ "#The value of answer is different because of round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.9:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.9\n",
+ "\n",
+ "\n",
+ " Indicated thermal efficiency = 30.0275891939 percent,\n",
+ " Brake mean effective preassure = 825.889834193 kN/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "Bp = 28.35 # Brake power in kW\n",
+ "N = 1500.0 # Speed in rpm\n",
+ "x = 20.0 # Rich percent of mixture\n",
+ "t = 15.5 # Temperature in degree centrigrde\n",
+ "p = 760 # Pressure in mm of mercury\n",
+ "f = 0.7 # Fraction of volume of air in th cylinder relative to swept volume\n",
+ "R = 14.8 # Theoratical Air fuel ratio\n",
+ "d = 82.0 # Diameter of cylinder in mm\n",
+ "L = 130.0 # Stroke of cylinder in mm\n",
+ "cv = 44.0 # Heating value of petrol in MJ/kg\n",
+ "n_m = 0.9 # Mechanical efficiency of the engine\n",
+ "print \"\\n Example 20.9\\n\"\n",
+ "Ip = Bp/n_m\n",
+ "p_ = 101.325 # In kN/m**2 as p = 760 mm mercury\n",
+ "v_a = f*(math.pi/4)*((d*(10**-3))**2)*(L*(10**-3))*(N/2)*4\n",
+ "m = p_*(v_a)/(0.287*(t+273))\n",
+ "m_f = (m/R)*(1+x/100)\n",
+ "n_th = Ip*3600/(m_f*cv*1000*60)\n",
+ "bmep = Bp*60/((math.pi/4)*((d*(10**-3))**2)*(L*10**-3)*(N/2)*4)\n",
+ "print \"\\n Indicated thermal efficiency = \",n_th*100 ,\" percent,\\n Brake mean effective preassure = \",bmep ,\" kN/m**2\"\n",
+ "#The value of answer is different because of round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.10:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.10\n",
+ "\n",
+ "\n",
+ " Minimum velocity of air required to start the flow = 8.77674536488 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "d = 25.0 # Throat diameter in mm\n",
+ "D = 1.2 # Main jet diameter in mm\n",
+ "c_d = 0.85 # Cofficient of discharge for the venturi \n",
+ "C_d = 0.65 # Cofficient of discharge for fuel jet\n",
+ "h = 6.0 # Height of the throat from gasoline surface in mm\n",
+ "p_1 = 1.0 # Ambient pressure in bar\n",
+ "T = 300.0 # Ambient temperature in K\n",
+ "Ro_f = 760.0 # Density in kg/m**3\n",
+ "print \"\\n Example 20.10\\n\"\n",
+ "delta_p = h*(10**-3)*Ro_f*9.81\n",
+ "p_2 = p_1-delta_p*(10**-5)\n",
+ "Ro_air = p_1*(10**5)/(287*T)\n",
+ "v = (2*delta_p/Ro_air)**(1.0/2.0)\n",
+ "print \"\\n Minimum velocity of air required to start the flow = \",v ,\" m/s\"\n",
+ "#The value of answer is different because of round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.11:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.11\n",
+ "\n",
+ "\n",
+ " Mechanical efficiency = 86.0215053763 percent,\n",
+ " Brake mean effective pressure = 24.4461992589 bar\n",
+ " Air standard ratio = 58.4417930454 percent,\n",
+ " Brake thermal efficiency is 46.5 percent,\n",
+ " Relative efficiency = 79.5663472609 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "Bp = 40.0 # Brake power when all cylinder operating in kW\n",
+ "N = 2000.0 # Speed in rpm\n",
+ "Bp1 = 32.2 # Brake power with cylinder no. 1 cut out in kW\n",
+ "Bp2 = 32.0 # Brake power with cylinder no. 2 cut out in kW\n",
+ "Bp3 = 32.5 # Brake power with cylinder no. 3 cut out in kW\n",
+ "Bp4 = 32.4 # Brake power with cylinder no. 4 cut out in kW\n",
+ "Bp5 = 32.1 # Brake power with cylinder no. 5 cut out in kW\n",
+ "Bp6 = 32.3 # Brake power with cylinder no. 6 cut out in kW\n",
+ "d = 100.0 # Diameter of cylinder in mm\n",
+ "L = 125.0 # Stroke of cylinder in mm\n",
+ "Vc = 0.000123 # Clearance volume in m**3\n",
+ "m_f = 9.0 # Fuel consumption in kg/h\n",
+ "cv = 40.0 # Heating value in MJ/kg\n",
+ "print \"\\n Example 20.11\\n\"\n",
+ "Ip1 = Bp-Bp1\n",
+ "Ip2 = Bp-Bp2\n",
+ "Ip3 = Bp-Bp3\n",
+ "Ip4 = Bp-Bp4\n",
+ "Ip5 = Bp-Bp5\n",
+ "Ip6 = Bp-Bp6\n",
+ "Ip = Ip1+Ip2+Ip3+Ip4+Ip5+Ip6\n",
+ "n_m = Bp/Ip\n",
+ "bmep = Bp*2*60/(L*(10**-3)*((d*(10**-3))**2)*(math.pi/4)*N)\n",
+ "Vs = (math.pi/4)*((d*(10**-3))**2)*(L*(10**-3))\n",
+ "r_k = (Vs+Vc)/Vc\n",
+ "n_ase = 1- (1/(r_k**(1.4-1)))\n",
+ "n_th = Ip*3600/(m_f*cv*1000)\n",
+ "R_e = n_th/n_ase\n",
+ "print \"\\n Mechanical efficiency = \",n_m*100 ,\" percent,\\n Brake mean effective pressure = \",bmep*(10**-2) ,\" bar\\n Air standard ratio = \",n_ase*100 ,\" percent,\\n Brake thermal efficiency is \",n_th*100 ,\" percent,\\n Relative efficiency = \",R_e*100 ,\" percent\"\n",
+ "#The value of answer for air standard efficiency is different because of round off error\n",
+ "# Answer given in the book for bmep is 3.055 bar which is wrong.\n",
+ "# Answer given in the book for brake thermal efficiency is 40 percent which is wrong.\n",
+ "# Answer given in the book for relative efficiency is 68.6 percent which is wrong.\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.12:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.12\n",
+ "\n",
+ "\n",
+ " Power lost as a percentage of the power produced by the turbine = 23.5485226573 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "p1 = 0.95 # Pressure in bar\n",
+ "t1 = 25 # Temperature in degree centigrade\n",
+ "p2 = 2 # Delivery pressure in bar\n",
+ "r = 18 # Air fuel ratio\n",
+ "t3 = 600 # Temperature of gasses leaving the engine in degree centigrade\n",
+ "p3 = 1.8 # Pressure of gasses leaving the engine in bar\n",
+ "p4 = 1.04 # Pressure at the inlet of turbine in bar\n",
+ "n_c = 0.75 # Efficiency of compresor\n",
+ "n_t = 0.85 # Efficiency of turbine\n",
+ "Cp = 1.005 # Heat capacity of air in kJ/kgK\n",
+ "Cp_ = 1.15 # Heat capacity of gasses in kJ/kgK\n",
+ "gama = 1.4 # Adiabatic index for air\n",
+ "print \"\\n Example 20.12\\n\"\n",
+ "T2_s = (t1+273)*(p2/p1)**((gama-1)/gama)\n",
+ "T2 = (t1+273)+((T2_s-(t1+273))/n_c)\n",
+ "Wc = Cp*(T2-(t1+273))\n",
+ "T4_s = (t3+273)*((p4/p3)**((gama-1)/gama))\n",
+ "T4 = (t3+273)-((t3+273)-T4_s)*n_t\n",
+ "Wt = (1+(1/r))*Cp_*((t3+273)-T4)\n",
+ "n = (Wt-Wc)/Wt\n",
+ "print \"\\n Power lost as a percentage of the power produced by the turbine = \",n*100 ,\" percent\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.13:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.13\n",
+ "\n",
+ "\n",
+ " Total orifice area per injector = 0.521323450963 mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "Bp = 250.0 # Power developed by the engine in kW\n",
+ "n = 6.0 # No of cylinders \n",
+ "N = 2000.0 # Speed in rpm\n",
+ "bsfc = 0.2 # Specific fuel consumption in kg/kWh\n",
+ "P = 35.0 # Pressure at the begining of the injection in bar\n",
+ "p_max = 55.0 # Maximum cylinder pressure in bar\n",
+ "p = 180.0 # Expected pressure for injection in bar\n",
+ "P_max = 520.0 # Maximum pressure at the injection in bar\n",
+ "c_d = 0.78 # Cofficient of discharge\n",
+ "s = 0.85 # Specific gravity of fuel oil\n",
+ "p_atm = 1.0 # Atmospheric pressure in bar\n",
+ "theta = 18.0 # Crank angle in degree\n",
+ "print \"\\n Example 20.13\\n\"\n",
+ "Bp_cy = Bp/n\n",
+ "m_f = Bp_cy*bsfc/60 # in kg/min\n",
+ "f_c = m_f*(2/N)\n",
+ "T = theta/(360*(N/60))\n",
+ "delta_p = p-P\n",
+ "delta_p_ = P_max-p_max\n",
+ "avg_delta_p = (delta_p+delta_p_)/2\n",
+ "v = c_d*math.sqrt((2*(avg_delta_p)*(10**5))/(s*1000))\n",
+ "V = m_f*(10**-3)/(s*1000)\n",
+ "A = V/(v*T)\n",
+ "print \"\\n Total orifice area per injector = \",A*10**6 ,\" mm**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.14:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.14\n",
+ "\n",
+ "\n",
+ " Thermal efficiency = 19.8935818353 percemt,\n",
+ " Gas consumption per kWh on indicated power basis = 1.04109744938 m**3/kWh\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "n=1.3 # Polytropic index\n",
+ "p1 = 140.0 # Pressure at point one in kN/m**2\n",
+ "p2 = 360.0 # Pressure at point two in kN/m**2\n",
+ "r_e = 0.4 # Relative efficiency\n",
+ "cv = 18840 # Calorific value in kJ/m**2\n",
+ "print \"\\n Example 20.14\\n\"\n",
+ "r = (((p2/p1)**(1/n))-1)/((0.75-0.25*((p2/p1)**(1.0/n))))\n",
+ "r_k = r+1\n",
+ "n_ase = 1.0-(1.0/((r_k)**(0.4)))\n",
+ "n_th = r_e*n_ase\n",
+ "V_f = n_th*cv/3600\n",
+ "print \"\\n Thermal efficiency = \",n_th*100 ,\" percemt,\\n Gas consumption per kWh on indicated power basis = \",V_f ,\" m**3/kWh\"\n",
+ "#The value of answer is different because of round off error\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.15:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.15\n",
+ "\n",
+ "\n",
+ " Mechanical efficiency = 80.2324301595 percemt\n",
+ "\n",
+ " Energy Balance\n",
+ "\n",
+ " Input Output\n",
+ "\n",
+ " Heat supplied by fuel 816.666666667 kW -\n",
+ "\n",
+ " Useful work(BP) - 245.0 kW\n",
+ "\n",
+ " Heat carried by cooling water - 251.778266667 kW\n",
+ "\n",
+ " Heat carried by steam - 64.26 kW\n",
+ "\n",
+ " Heat carried by cooling oil - 42.0 kW\n",
+ "\n",
+ " Heat carried by dry exhaust gas - 166.946877778 kW\n",
+ "\n",
+ " Heat transferred to surroundings - 46.6815222222 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "d = 180.0 # Bore in mm\n",
+ "L = 200.0 # Stroke in mm\n",
+ "Bp = 245.0 # Brake power in kW\n",
+ "N = 1500.0 # Speed in rpm\n",
+ "mep = 8.0 # Mean effective pressure in bar\n",
+ "m_f = 70.0 # Fuel consumption in kg/h\n",
+ "cv = 42.0 # Heating value of fuel in MJ/kg\n",
+ "m_h = 0.12 # Fraction of hydrogen content by mass\n",
+ "m_a = 26.0 # Air consumption in kg/min\n",
+ "m_w = 82.0 # Mass of cooling water in kg/min\n",
+ "delta_t = 44 # Cooling water temperature rise in degree centigrade\n",
+ "m_o = 50.0 # Cooling oil circulated through the engine in kg/min\n",
+ "delta_T = 24 # Cooling oil temperature rise in degree centigrade\n",
+ "s_o = 2.1 # Specific heat of cooling oil in kJ/kgK\n",
+ "t = 30.0 # Room temperature in degree centigrade\n",
+ "t_e = 400.0 # Exhaust gas temperature on degree centigrade\n",
+ "c_p_de = 1.045 # Heat capacity of dry exhaust gas in kJ/kgK\n",
+ "p = 0.035 # Partial pressure of steam in exhaust gas in bar\n",
+ "print \"\\n Example 20.15\\n\"\n",
+ "h = m_f*cv*1000/3600\n",
+ "Ip = mep*(10**5)*L*(10**-3)*(math.pi/4)*((d*(10**-3))**2)*N*6/(2*60000)\n",
+ "n_m = Bp/Ip\n",
+ "h_w = (m_w/60)*(4.187*delta_t)\n",
+ "h_o = (m_o/60)*(s_o*delta_T)\n",
+ "m_e = m_f/60 + m_a\n",
+ "m_v = m_h*9*(m_f/60)\n",
+ "m_de = (m_e-m_v)/60\n",
+ "H = 3060 # From the steam table the enthalpy of steam at the exhaust contion(0.035 bar) in kJ/kg\n",
+ "h_s = (m_v/60)*H\n",
+ "h_de = (m_de)*(c_p_de)*(t_e-t)\n",
+ "h_su = h - (Bp+h_w+h_s+h_o+h_de)\n",
+ "print \"\\n Mechanical efficiency = \",n_m*100 ,\" percemt\"\n",
+ "print \"\\n Energy Balance\"\n",
+ "print \"\\n Input Output\"\n",
+ "print \"\\n Heat supplied by fuel \",h ,\" kW -\"\n",
+ "print \"\\n Useful work(BP) - \",Bp ,\" kW\"\n",
+ "print \"\\n Heat carried by cooling water - \",h_w ,\" kW\"\n",
+ "print \"\\n Heat carried by steam - \",h_s ,\" kW\"\n",
+ "print \"\\n Heat carried by cooling oil - \",h_o ,\" kW\"\n",
+ "print \"\\n Heat carried by dry exhaust gas - \",h_de ,\" kW\"\n",
+ "print \"\\n Heat transferred to surroundings - \",h_su ,\" kW\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex20.16:pg-853"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 20.16\n",
+ "\n",
+ "\n",
+ " Fuel consumption = 7.13500385939 kg/h,\n",
+ " Brake mean effective pressure = 29.5555555556 bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "N = 3000 # Speed in rpm\n",
+ "T = 66.5 # Torque in Nm\n",
+ "d = 60 # Bore in mm\n",
+ "L = 100 # Stroke in mm\n",
+ "Vc = 60 # Clearance volume in cc\n",
+ "r_e = 0.5 # Relative efficiency\n",
+ "cv = 42 # Calorific value in MJ/kg\n",
+ "print \"\\n Example 20.16\\n\"\n",
+ "Vs = (math.pi/4)*((60*(10**-3))**2)*(L*(10**-3))\n",
+ "r_k = (Vs+(Vc*(10**-6)))/(Vc*(10**-6))\n",
+ "n_ase = 1-(1/(r_k**(0.4)))\n",
+ "n_br = n_ase*r_e\n",
+ "Bp = (2*(math.pi)*T*N)/(60000)\n",
+ "m_f = Bp*3600/(cv*1000*n_br)\n",
+ "bmep = Bp*60000/(Vs*(N/2))\n",
+ "print \"\\n Fuel consumption = \",m_f ,\" kg/h,\\n Brake mean effective pressure = \",bmep*(10**-5) ,\" bar\"\n",
+ "#The answer given in the book for bmep has calculation error\n",
+ "# The answer has round off error for fuel consumption"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter21_ingIztX.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter21_ingIztX.ipynb
new file mode 100644
index 00000000..99e27030
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter21_ingIztX.ipynb
@@ -0,0 +1,528 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 21: Gas Turbines And Propulsion Systems"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex21.1:pg-885"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 21.1\n",
+ "\n",
+ "\n",
+ " Power output = 581.68934348 kJ/kg,\n",
+ " The overall efficiency = 25.8717426718 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "r_c = 3.5 # Compression ratio\n",
+ "n_c = 0.85 # Efficiency of compressor\n",
+ "p1 = 1 # Pressure in bar\n",
+ "t1 = 300 # Temperature in K\n",
+ "t3 = 310 # Temperature at the exit of the intercooler in K\n",
+ "r_c_ = 3.5 # Compression ratio for high pressure compressor\n",
+ "n_c_ = 0.85 # Efficiency of H.P. compressor\n",
+ "e = 0.8 # Effectiveness of regenerator\n",
+ "n_t = 0.88 # Efficiency of H.P. tubine\n",
+ "t6 = 1100 # Temperature in H.P. tubine in K\n",
+ "t8 = 1050 # Temperature at the entrance of L.P. turbine in K\n",
+ "n_t_ = 0.88 # Efficiency of L.P. turbine\n",
+ "Cp = 1.005 # Heat capacity of air in kJ/kgK\n",
+ "Cp_ = 1.15 # Heat capacity of gases in kJ/kgK\n",
+ "gama = 1.4 # Heat capacity ratio for air\n",
+ "gama_ = 1.33 # Heat capacity ratio for gases\n",
+ "print \"\\n Example 21.1\\n\"\n",
+ "p2 = r_c*p1\n",
+ "p4 = p2*r_c_\n",
+ "t2_s = t1*((r_c)**((gama-1)/gama))\n",
+ "t2 = t1+((t2_s-t1)/n_c)\n",
+ "t4_s = t3*((r_c_)**((gama-1)/gama))\n",
+ "t4 = t3+((t4_s-t3)/n_c_)\n",
+ "Wc = Cp*((t2-t1)+(t4-t3))\n",
+ "t7 = t6 - (Wc/Cp_)\n",
+ "t7_s = t6 - (t6-t7)/n_t\n",
+ "r_p = (t6/t7_s)**(gama_/(gama_-1))\n",
+ "p7 = p4/r_p\n",
+ "t9_s = t8/((p7/p1)**((gama_-1)/gama_))\n",
+ "t9 = t8-(t8-t9_s)*n_t_\n",
+ "Wt_LP = Cp_*(t8-t9)\n",
+ "W_T = Wt_LP+Wc\n",
+ "Rw = Wt_LP/W_T\n",
+ "Q1 = (Cp_*t6-Cp*t4)+Cp_*(t8-t7)\n",
+ "n_plant = Wt_LP/Q1\n",
+ "print \"\\n Power output = \",W_T ,\" kJ/kg,\\n The overall efficiency = \",n_plant*100 ,\" percent\"\n",
+ "#The answers given in the book have round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex21.2:pg-886"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 21.2\n",
+ "\n",
+ "\n",
+ " Flow velocity = -43.4235444397 m/s,\n",
+ " The blade angle at the root = -1.43579153344 degree,and at the tip = 1.21859133292 degree,\n",
+ " The degree of reaction at the root = 63.9551441794 percent, and at the tip = 26.0409057706 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "v_bm = 360 # Blade velocity at the mean diameter of a gas turbine stage in m/s\n",
+ "beta1 = 20 # Blade angle at inlet in degree\n",
+ "beta2 = 52 # Blade angle at exit in degree\n",
+ "r = 0.5 # Degree of reaction\n",
+ "Dm = 0.45 # Mean diameter of blade in m\n",
+ "h = 0.08 # Mean height of blade in m\n",
+ "print \"\\n Example 21.2\\n\"\n",
+ "v_f = v_bm/((math.tan(beta2))-math.tan(beta1))\n",
+ "r_r = (Dm/2)-h/2\n",
+ "r_t = Dm/2 +h/2\n",
+ "delta_v_wm = v_f*((math.tan(beta1))+(math.tan(beta2)))\n",
+ "v_br = v_bm*(r_r/(Dm/2))\n",
+ "delta_v_wr = delta_v_wm*v_bm/v_br\n",
+ "\n",
+ "v_bt = (r_t/(Dm/2))*v_bm\n",
+ "v_w_1m = v_f*(math.tan(beta2))\n",
+ "v_w_1t = v_w_1m*(Dm/2)/r_t\n",
+ "delta_v_wt = v_f*((math.tan(beta1))+(math.tan(beta2)))*v_bm/v_bt\n",
+ "v_w_1r = v_w_1m*((Dm/2)/r_r)\n",
+ "alpha_1r = math.atan(v_w_1r/v_f)\n",
+ "alpha_2r = math.atan((delta_v_wr-v_w_1r)/v_f)\n",
+ "beta_1r = math.atan((v_w_1r-v_br)/v_f)\n",
+ "beta_2r = math.atan((v_br+v_f*(math.tan(alpha_2r)))/v_f)\n",
+ "alpha_1t = math.atan(v_w_1t/v_f)\n",
+ "alpha_2t = math.atan((delta_v_wt-v_w_1t)/v_f)\n",
+ "beta_1t = math.atan((v_w_1t-v_bt)/v_f)\n",
+ "beta_2t = math.atan((v_bt+(v_f*math.tan(alpha_2t)))/v_f)\n",
+ "Rt = v_f*((math.tan(beta_2t))-(math.tan(beta_1t)))/(2*v_bt)\n",
+ "Rr = v_f*((math.tan(beta_2r))-(math.tan(beta_1r)))/(2*v_br)\n",
+ "print \"\\n Flow velocity = \",v_f ,\" m/s,\\n The blade angle at the root = \",alpha_1r ,\" degree,and at the tip = \",alpha_2r ,\" degree,\\n The degree of reaction at the root = \",Rt*100 ,\" percent, and at the tip = \",Rr*100 ,\" percent\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex21.3:pg-887"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 21.3\n",
+ "\n",
+ "\n",
+ " The blade angle at the inlet = 0.513725711568 degree,and at the exit = 1.1075454267 degree,\n",
+ " The overall efficiency of the turbine = 87.5152054946 percent\n",
+ " The stage efficiency = 85.2048267464 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "p1 = 8 # Pressure of entrance in bar\n",
+ "t1 = 1125 # Temperature of entrance in K\n",
+ "p2 = 1.5 # Pressure of exit in bar\n",
+ "n = 11 # No of stages\n",
+ "Vf = 110 # Axial velocity of flow in m/s\n",
+ "n_p = 0.85 # Polytropic efficiency \n",
+ "Vb = 140 # Mean velocity in m/s\n",
+ "gama = 1.33 # Heat capacity ratio for gases\n",
+ "Cp = 1.15 # Heat capacity of gases in kJ/kgK\n",
+ "r = 0.5 # Fraction of reaction\n",
+ "print \"\\n Example 21.3\\n\"\n",
+ "t2 = t1*((p2/p1)**((gama-1)*n_p/gama))\n",
+ "t2_s = t1*((p2/p1)**((gama-1)/gama))\n",
+ "n_s = (t1-t2)/(t1-t2_s)\n",
+ "Wt = Cp*(t1-t2)\n",
+ "Wt_s = Wt/n\n",
+ "V_w1 = (((Wt_s*1000)/Vb) + Vb)/2\n",
+ "alpha1 = math.atan(Vf/V_w1)\n",
+ "alpha2 = alpha1\n",
+ "beta1 = math.atan(Vf/(V_w1-Vb))\n",
+ "h_s = Wt_s\n",
+ "t_s = h_s/Cp\n",
+ "t1_ = t1-t_s\n",
+ "t1_s = t1*((t1_/t1)**(gama/((gama-1)*n_p)))**((gama-1)/gama)\n",
+ "n_st = (t1-t1_)/(t1-t1_s)\n",
+ "print \"\\n The blade angle at the inlet = \",alpha1 ,\" degree,and at the exit = \",beta1 ,\" degree,\\n The overall efficiency of the turbine = \",n_s*100 ,\" percent\\n The stage efficiency = \",n_st*100 ,\" percent\"\n",
+ "# The answers given in the book contain round off error."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex21.4:pg-889"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 21.4\n",
+ "\n",
+ "\n",
+ " Total thrust developed = 6675.46374954 N,\n",
+ " The specific fuel consumption = 0.0236198761133 kg/kNs\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "v = 800.0 # Speed of aircraft in km/h\n",
+ "h = 10700.0 # Height of aircraft in m\n",
+ "p0 = 0.24 # Pressure in bar\n",
+ "t0 = -50.0 # Temperature in degree centigrade\n",
+ "r_p = 10.0 # Compressor pressure ratio\n",
+ "t03 = 1093.0 # Max cycle temperature in K\n",
+ "n_ed = 0.9 # Entry duct efficiency\n",
+ "n_c = 0.9 # Isentropic efficiency of compressure\n",
+ "p_ = 0.14 # Stagnation pressure loss in combustion chamber in bar\n",
+ "cv = 43.3 # Calorific value of fuel in MJ/kg\n",
+ "n_C = 0.98 # Combustion efficiency\n",
+ "n_t = 0.92 # Isentropic efficiency of turbine\n",
+ "n_m = 0.98 # Mechanical efficiency of drive\n",
+ "n_j = 0.92 # Jet pipe efficiency\n",
+ "a = 0.08 # Nozzle outlet area in m**2\n",
+ "Cp = 1.005 # Heat capacity of air in kJ/kgK\n",
+ "gama = 1.4 # Ratio of heat capacities for air\n",
+ "Cp_ = 1.15 # Heat capacity for gases in kJ/kgK\n",
+ "gama_ = 1.333 # Ratio of heat capacities for gases\n",
+ "print \"\\n Example 21.4\\n\"\n",
+ "KE = (1/2)*(v*5/18)**2\n",
+ "tr = KE/(1000*Cp)\n",
+ "t01 = tr + (273+t0)\n",
+ "t01_s = (t0+273)+(n_ed*(t01-(t0+273)))\n",
+ "p01 = p0*((t01_s/(t0+273))**(gama/(gama-1)))\n",
+ "t02_s = t01*((r_p)**((gama-1)/gama))\n",
+ "t02 = (t01) + (t02_s-t01)/n_c\n",
+ "p02 = p01*r_p\n",
+ "p03 = p02-p_\n",
+ "t04 = t03 - (Cp*(t02-t01)/(Cp_*n_m))\n",
+ "t04_s = t03-(t03-t04)/n_t\n",
+ "p04 = p03/((t03/t04_s)**(gama_/(gama_-1)))\n",
+ "p_cr = p04*((2/(gama_+1))**(gama_/(gama_-1)))\n",
+ "t05 = t04*(2/(gama_+1))\n",
+ "t05_s = t04-((t04-t05)/n_j)\n",
+ "p05 = p04/((t04/t05_s)**(gama_/(gama_-1)))\n",
+ "R = Cp_*(gama_-1)/gama_\n",
+ "v5 = R*t05/(p05*100)\n",
+ "Vj = math.sqrt(gama_*R*1000*t05)\n",
+ "m = a*Vj/v5\n",
+ "Mt = m*(Vj-v*(5/18))\n",
+ "Pt = (p05-p0)*a*10**5\n",
+ "Tt = Mt+Pt\n",
+ "Q1 = m*(t03-t02)*Cp_\n",
+ "m_f = Q1/(cv*1000*n_C)\n",
+ "m_sf = m_f*1000/Tt\n",
+ "print \"\\n Total thrust developed = \",Tt ,\" N,\\n The specific fuel consumption = \",m_sf ,\" kg/kNs\"\n",
+ "# The answers given in the book contain round off error."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex21.5:pg-889"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 21.5\n",
+ "\n",
+ "\n",
+ " Propulsive power = 9.1580625 MW,\n",
+ " Thrust power = 4402.35949174 kW,\n",
+ " Propulsive efficiency = 48.070860968 percent\n",
+ " Thermal efficiency = 36.63225 percent,\n",
+ " Overall efficiency = 17.609437967 percent \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "v = 850.0 # Speed of turbojet in km/h\n",
+ "m = 50.0 # Air mass flow rate in kg/s\n",
+ "s = 200.0 # Entropy drop across the nozzle in kJ/kg\n",
+ "n_n = 0.9 # Nozzle efficiency\n",
+ "r = 80.0 # Air fuel ratio\n",
+ "cv = 40.0 # Heating value of fuel in MJ/kg\n",
+ "Cp = 1005.0 # Heat capacity of air in J/kgK\n",
+ "print \"\\n Example 21.5\\n\"\n",
+ "Vo = v*(5.0/18)\n",
+ "m_f = m/r\n",
+ "Ve = math.sqrt(2*Cp*s*n_n)\n",
+ "T = (m+m_f)*Ve-m*Vo\n",
+ "TP = T*Vo\n",
+ "PP = (1.0/2.0)*(m+m_f)*(Ve**2)-(1/2)*(m*Vo**2)\n",
+ "n_p = TP/PP\n",
+ "n_t = PP/(m_f*cv*1000000)\n",
+ "n = n_t*n_p\n",
+ "print \"\\n Propulsive power = \",PP*(10**-6) ,\" MW,\\n Thrust power = \",TP*(10**-3) ,\" kW,\\n Propulsive efficiency = \",n_p*100 ,\" percent\\n Thermal efficiency = \",n_t*100 ,\" percent,\\n Overall efficiency = \",n*100 ,\" percent \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex21.6:pg-890"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 21.6\n",
+ "\n",
+ "\n",
+ " Air-fuel ratio = 60.9221650764 ,\n",
+ " Thrust power of the propeller = 4144.33833875 kJ/s ,\n",
+ " Thrust by the propeller = 26.523765368 kN,\n",
+ " Mass flow rate of air flowing through the compressor = 27.4358227 kg/s,\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "p1 = 0.56 # Ambient pressure in bar\n",
+ "t1 = 260.0 # Ambient temperature in K\n",
+ "r_p = 6.0 # Pressure ratio of compressor\n",
+ "n_c = 0.85 # Efficiency of compressor\n",
+ "v = 360.0 # Speed of aircraft in km/h\n",
+ "d = 3.0 # Propeller diameter in m\n",
+ "n_p = 0.8 # Propeller efficiency\n",
+ "n_g = 0.95 # Gear reduction efficiency\n",
+ "r_e = 5.0 # Expansion ratio\n",
+ "n_t = 0.88 # Turbine efficiency\n",
+ "t3 = 1100.0 # Temperature at the entrance of turbine in K\n",
+ "n_n = 0.9 # Nozzle efficiency\n",
+ "cv = 40.0 # Calorific value in MJ/kg\n",
+ "print \"\\n Example 21.6\\n\"\n",
+ "gama = 1.4 # Heat capacities ratio for air\n",
+ "Vo = v*(5.0/18)\n",
+ "p2 = p1*r_p\n",
+ "t2_s = t1*((r_p)**(0.286))\n",
+ "t2 = t1+((t2_s-t1)/n_c)\n",
+ "Cp = 1.005 # The value of heat capacity of air as given in the book in kJ/kgK\n",
+ "Wc = Cp*(t2-t1)\n",
+ "m_f = (t3-t2)/((cv*1000/Cp)-t3)\n",
+ "m_a = 1.0/m_f\n",
+ "p3=p2\n",
+ "p4 = p3/r_e\n",
+ "t4_s = t3/((r_e)**(0.286))\n",
+ "t4 = t3-((t3-t4_s)*n_t)\n",
+ "Wt = (1+m_f)*(t3-t4)*Cp\n",
+ "Pp = Wt-Wc\n",
+ "p5 = p1\n",
+ "t5_s = t4/((p4/p5)**((gama-1)/gama))\n",
+ "Vj = math.sqrt(2*Cp*1000*(t4-t5_s)*n_n)\n",
+ "Ft = (1+m_f)*Vj-1*Vo\n",
+ "V = Vo/n_p\n",
+ "V4 = 2*V-Vo\n",
+ "Q = (math.pi/4)*(d**2)*V\n",
+ "Pt = (1/2.0)*(p1*(10**5)/(287*t1))*Q*((V4**2)-(Vo**2))/1000\n",
+ "PT = Pt/n_g\n",
+ "ma_c = PT/Pp\n",
+ "Fp = Pt*n_p/V\n",
+ "print \"\\n Air-fuel ratio = \",m_a ,\",\\n Thrust power of the propeller = \",Pt ,\" kJ/s ,\\n Thrust by the propeller = \",Fp ,\" kN,\\n Mass flow rate of air flowing through the compressor = \",ma_c ,\" kg/s,\"\n",
+ "# The answers are given in the book contain calculation error."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex21.7:pg-890"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 21.7\n",
+ "\n",
+ "\n",
+ " Velocity attain by the rocket in 70 seconds = 1064.23747471 m/s ,\n",
+ " The maximum height that the rocket will attain = 86.1455071297 km\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from scipy import integrate \n",
+ "# Given that\n",
+ "m = 15000.0 # Initial mass of rocket in kg\n",
+ "m_b = 125.0 # Burning rate of propellent in kg/s\n",
+ "v = 2000.0 # Relative velocity of gases with respect to the rocket in m/s\n",
+ "T = 70.0 # Time in second\n",
+ "print \"\\n Example 21.7\\n\"\n",
+ "V = (-v*math.log(1-(m_b*T/m)))-(9.81*T)\n",
+ "h1,err = integrate.quad(lambda t:-v*math.log(1-(m_b*t/m))-9.81*t,0,T)\n",
+ "h2 = (V**2)/(2*9.81)\n",
+ "hmax = h2 + h1\n",
+ "print \"\\n Velocity attain by the rocket in 70 seconds = \",V ,\" m/s ,\\n The maximum height that the rocket will attain = \",hmax*0.001 ,\" km\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex21.8:pg-890"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 21.8\n",
+ "\n",
+ "\n",
+ " Thrust produced = 218.178625017 kN,\n",
+ " Specific impulse = 3482.18007048 Ns/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "Pc = 2.4 # Pressure in combustion chamber in MPa\n",
+ "Tc = 3170 # Temperature in combustion chamber in K\n",
+ "Pj = 55 # Atomospheric pressure in kPa\n",
+ "Pe = 85 # Pressure at the exit of nozzle in kPa\n",
+ "At = 0.06 # Area at the nozzle throat in m**2\n",
+ "n_n = 0.91 # Nozzle efficiency\n",
+ "Cd = 0.98 # Cofficient of discharge\n",
+ "gama = 1.25 # Heat capacities ratio for gases\n",
+ "R = 0.693 # Value of gas constant in kJ/kgK\n",
+ "theta = 12 # Half angle of divergence in degree\n",
+ "print \"\\n Example 21.8\\n\"\n",
+ "Vj = math.sqrt((2*gama*R*1000*Tc/(gama-1))*(1-(Pj/(Pc*1000))**((gama-1)/gama)))\n",
+ "Vj_act = ((1+math.cos(12))/2)*Vj*math.sqrt(n_n)\n",
+ "m = At*Pc*(10**6)*((gama/(R*1000*Tc))*(2/(gama+1))**((gama+1)/(gama-1)))**(1.0/2)\n",
+ "m_act = Cd*m\n",
+ "Ae = m/(Pe*Vj)\n",
+ "Ft = m*Vj+Ae*(Pe-Pj)*1000\n",
+ "SIm = Ft/m_act\n",
+ "print \"\\n Thrust produced = \",Ft*0.001 ,\" kN,\\n Specific impulse = \",SIm ,\" Ns/kg\"\n",
+ "# The answers are given in the book contain claculation error.\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter22_yljf4OR.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter22_yljf4OR.ipynb
new file mode 100644
index 00000000..228b303a
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter22_yljf4OR.ipynb
@@ -0,0 +1,497 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 22: Transport Processes in Gas"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex22.1:pg-911"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 22.1 \n",
+ "\n",
+ "\n",
+ " Mean free path = math.exp m,\n",
+ " The fraction of molecules have free path longer than 2*lambda = 13.5335283237 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "p = 1.013e5 # Pressure in Pa\n",
+ "t = 300 # Temperature in K\n",
+ "d = 3.5 # Effective diameter of oxygen molecule in Angstrom \n",
+ "r = 2 # Ratio of free path of molecules with the lambda\n",
+ "print \"\\n Example 22.1 \\n\"\n",
+ "sigma = math.pi*(d*(10**-10))**2\n",
+ "n = p/(t*1.38*(10**-23))\n",
+ "R = math.exp(-r)\n",
+ "print \"\\n Mean free path = math.exp m,\\n The fraction of molecules have free path longer than 2*lambda = \",R*100, \" percent\"\n",
+ "# Answer given in the book contain round off error for mean free path."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex22.2:pg-912"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 22.2 \n",
+ "\n",
+ "\n",
+ " Pressure of the gas = 134.236067593 Pa,\n",
+ " No of collisions made by a molecule per meter of path = math.exp 38022.8136882\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "lambda1 = (2.63e-5) # Mean free path of the molecules of the gas in m\n",
+ "t = 25 # Temperature in degree centigrade\n",
+ "r = 2.56e-10 # Radius of the molecules in m\n",
+ "print \"\\n Example 22.2 \\n\"\n",
+ "sigma = 4*math.pi*r**2\n",
+ "n = 0.707/(sigma*lambda1)\n",
+ "p = n*(t+273)*(1.38*10**-23)\n",
+ "N = 1.0/lambda1\n",
+ "print \"\\n Pressure of the gas = \",p,\" Pa,\\n No of collisions made by a molecule per meter of path = math.exp\",N\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex22.3:pg-912"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 22.3 \n",
+ "\n",
+ "\n",
+ " The no of free paths which are longer than, \n",
+ " 10 cm = 3679.0 ,\n",
+ " 20 cm = 1354.0 ,\n",
+ " 50 cm = 68.0 ,\n",
+ "\n",
+ " The no of free paths which are between,\n",
+ " 5 cm and 10 cm = -2387.0 ,\n",
+ " 9.5 cm and 10.5 cm = -369.0 ,\n",
+ " 9.9 cm and 10.1 cm = -74.0 ,\n",
+ "\n",
+ " The no of free paths which are exactly 10 cm = -0.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Given that\n",
+ "import math\n",
+ "from scipy import integrate \n",
+ "lambda1 = 10.0 # Mean free path of the gas in cm\n",
+ "N0 = 10000.0 # No of free paths\n",
+ "x1 = 10.0 # In cm\n",
+ "x2 = 20.0 # In cm\n",
+ "x3 = 50.0 # In cm\n",
+ "x4 = 5.0 # In cm\n",
+ "x5 = 9.5 # In cm\n",
+ "x6 = 10.5 # In cm\n",
+ "x7 = 9.9 # In cm\n",
+ "x8 = 10.1 # In cm\n",
+ "print \"\\n Example 22.3 \\n\"\n",
+ "# For x>10 cm\n",
+ "N1 = N0*(math.exp(-1))\n",
+ "# For x>20 cm\n",
+ "N2 = N0*(math.exp(-2))\n",
+ "# For x>50 cm\n",
+ "N3 = N0*(math.exp(-5))\n",
+ "def f(x): \n",
+ " y = (-N0/lambda1)*(math.exp((-x)/lambda1)),\n",
+ " return y\n",
+ "# For 5>x>10 cm\n",
+ "N4,er = integrate.quad( lambda x: (-N0/lambda1)*(math.exp((-x)/lambda1)),x4,x1)\n",
+ "# For 9.5>x>10.5 cm\n",
+ "N5,e = integrate.quad( lambda x: (-N0/lambda1)*(math.exp((-x)/lambda1)),x5,x6)\n",
+ "# For 9.9>x>10.1 cm\n",
+ "N6,eor = integrate.quad( lambda x: (-N0/lambda1)*(math.exp((-x)/lambda1)),x7,x8)\n",
+ "# For x=10 cm\n",
+ "N7,eer = integrate.quad( lambda x: (-N0/lambda1)*(math.exp((-x)/lambda1)),x1,x1)\n",
+ "print \"\\n The no of free paths which are longer than, \\n 10 cm = \",math. ceil(N1) ,\",\\n 20 cm = \",math. ceil(N2) ,\",\\n 50 cm = \",math. ceil(N3) ,\",\\n\\n The no of free paths which are between,\\n 5 cm and 10 cm = \",math.floor(N4) ,\",\\n 9.5 cm and 10.5 cm = \",math.floor(N5) ,\",\\n 9.9 cm and 10.1 cm = \",math.floor(N6) ,\",\\n\\n The no of free paths which are exactly 10 cm = \",N7 \n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex22.4:pg-913"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 22.4 \n",
+ "\n",
+ "\n",
+ " Coefficient of viscosity = math.exp Ns/m**2 2.051171875e-05\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "p = 1.0 # Pressure in atm\n",
+ "t = 300.0 # Temperature in K\n",
+ "print \"\\n Example 22.4 \\n\"\n",
+ "# From previous example, we have\n",
+ "m = 5.31e-26 # In kg/molecule\n",
+ "v = 445.0 # In m/s\n",
+ "sigma = 3.84e-19 # In m**2\n",
+ "# Therefore\n",
+ "mu = (1.0/3.0)*(m*v/sigma)\n",
+ "print \"\\n Coefficient of viscosity = math.exp Ns/m**2\",mu"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex22.5:pg-913"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 22.5 \n",
+ "\n",
+ "\n",
+ " Thermal conductivity = 0.0 W/mK,\n",
+ " If the gas has Maxwellian velocity distribution,\n",
+ " Thermal conductivity = 5.98958333333e-05 W/mK\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "p = 1.0 # Pressure in atm\n",
+ "t = 300.0 # Temperature in K\n",
+ "F = 5.0 # For oxygen gas degree of freedom\n",
+ "print \"\\n Example 22.5 \\n\"\n",
+ "v = 445.0 # In m/s as given in the book\n",
+ "m = 5.31e-26 # Mass of oxygen molecule in kg\n",
+ "sigma = 3.84e-19 # As given in the book in m**2\n",
+ "k = (1/6)*(v*F*(1.38*10**-23))/sigma\n",
+ "# If the gas has Maxwellian velocity distribution,\n",
+ "k_ = (1.0/3.0)*(F*(1.38*10**-23)/sigma)*((1.38*10**-23)*t/(math.pi*m))**(1/2)\n",
+ "print \"\\n Thermal conductivity = \",k ,\" W/mK,\\n If the gas has Maxwellian velocity distribution,\\n Thermal conductivity = \",k_ ,\" W/mK\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex22.6:pg-914"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 22.6 \n",
+ "\n",
+ "\n",
+ " Pressure in the cathode ray tube = 0.142844028924 Pa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "F = .90 # Fraction of electrons leaving the cathode ray reach the anode without making a collision\n",
+ "x = 0.2 # Distance between cathode ray and anode in m\n",
+ "d = 3.6e-10 # Diameter of ion in m\n",
+ "t = 2000.0 # Temperature of electron in K\n",
+ "print \"\\n Example 22.6 \\n\"\n",
+ "lambda1 = x/(math.log(1/F))\n",
+ "sigma = math.pi*(d**2)\n",
+ "n = 4/(sigma*lambda1)\n",
+ "p = n*(1.38*10**-23)*(t)\n",
+ "print \"\\n Pressure in the cathode ray tube = \",p ,\" Pa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex22.7:pg-914"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 22.7 \n",
+ "\n",
+ "\n",
+ " No of collisions per sec are made by one molecule with the other molecule = 9962400.07749 \n",
+ "The no of molecules strike the flask per sq. cm = 6.11714975845e+20 \n",
+ " No of molecules in the flask = 2.44685990338e+22\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "V = 1.0 # Volume of the flask in litre\n",
+ "p = 1.0 # Pressure in atm\n",
+ "t = 300.0 # Temperature in K\n",
+ "r = 1.8e-10 # Radius of oxygen gas molecule in m\n",
+ "m = 5.31e-26 # Mass of oxygen molecule in kg\n",
+ "print \"\\n Example 22.7 \\n\"\n",
+ "n = (p*(1.013e5))/((1.38e-23)*(t)*1000)\n",
+ "sigma = 4*math.pi*(r**2)\n",
+ "v = ((8*(1.38e-23)*t)/(math.pi*m))**(1/2)\n",
+ "z = sigma*n*v*1000\n",
+ "N = (1.0/4.0)*(n*0.1*v)\n",
+ "print \"\\n No of collisions per sec are made by one molecule with the other molecule =\", z,\"\\nThe no of molecules strike the flask per sq. cm =\",N,\"\\n No of molecules in the flask =\",n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex22.8:pg-915"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 22.8 \n",
+ "\n",
+ "\n",
+ " Time = 1.00003111262 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "lambda1 = 2.0 # Mean free path in cm\n",
+ "T = 300.0 # Temperature in K\n",
+ "r = 0.5 # As half of the molecules did not make any collision\n",
+ "print \"\\n Example 22.8 \\n\"\n",
+ "x = lambda1*(math.log(1/r))\n",
+ "v = 445.58 # For oxygen at 300K in m/s\n",
+ "t = x/(v*100)\n",
+ "print \"\\n Time =\", math.exp(t), \"s\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex22.9:pg-915"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 22.9 \n",
+ "\n",
+ "\n",
+ " Pressure = 1.03636998072 N/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "f = 0.9 # Fraction of electrons leaving the cathode ray and reaching the anode without making any collision\n",
+ "x = 20.0 # Distance between cathode ray tube and anode in cm\n",
+ "sigma = 4.07e-19 # Collision cross section of molecules in m**2\n",
+ "T = 2000 # Temperature in K\n",
+ "print \"\\n Example 22.9 \\n\"\n",
+ "lambda1 = (x*0.01)/(math.log(1.0/f))\n",
+ "n = 1/(sigma*lambda1)\n",
+ "p = n*(1.38e-23)*T\n",
+ "print \"\\n Pressure =\", math.exp(p), \"N/m**2\"\n",
+ "# The answer given in the book contains round off error.\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex22.10:pg-916"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " \n",
+ " Example 22.10 \n",
+ "\n",
+ "\n",
+ " Initial concentration gradient of reactive molecules = 0.0 molecules/m**4, \n",
+ " The no of reactive molecules per sec cross a cross section at the mid point of the tube from left to right = 0.9 molecules/m**2,\n",
+ " The no of reactive molecules per sec cross a cross section at the mid point of the tube from right to left = 2.71828182846 molecule/m**2,\n",
+ " Initial net rate of diffusion = 0.0112863158384 g/m**2-s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "l = 2.0 # Length of tube in m\n",
+ "a = 1e-4 # Cross section of the tube in m**2\n",
+ "p = 1.0 # Pressure in atm\n",
+ "t = 0 # Temperature in degree centigrade\n",
+ "r = 0.5 # Fraction of the carbon atoms which are radioactive C14\n",
+ "sigma = 4e-19 # Collision cross section area in m**2\n",
+ "print \"\\n Example 22.10 \\n\"\n",
+ "n = (p*1.01325e+5)/((1.38e-23)*(t+273))\n",
+ "C_g = -n/l\n",
+ "m = (46/6.023)*10**-26 # In kg/molecule\n",
+ "v = (2.55*(1.38e-23)*(t+273)/m)**(1/2.0)\n",
+ "lambda1 = (1.0/(sigma*n))\n",
+ "gama = (1.0/4)*(v*n) - (1/6.0)*(v*lambda1*(C_g))\n",
+ "gama_ = (1/4.0)*(v*n) + (1.0/6.0)*(v*lambda1*(C_g))\n",
+ "x = (1.0/4)*(v*n)\n",
+ "y = (1.0/6)*(v*lambda1*(C_g))\n",
+ "d = (1.0/6)*(v*lambda1*(-1*C_g))*2*(m)\n",
+ "a=x+y\n",
+ "b=x-y\n",
+ "print \"\\n Initial concentration gradient of reactive molecules =\",math.exp (C_g),\" molecules/m**4, \\n The no of reactive molecules per sec cross a cross section at the mid point of the tube from left to right =\",f , \"molecules/m**2,\\n The no of reactive molecules per sec cross a cross section at the mid point of the tube from right to left =\",math.e ,\" molecule/m**2,\\n Initial net rate of diffusion = \",d*1000 ,\"g/m**2-s\"\n",
+ "# The answer for lambda given in the book conatains calculation error\n",
+ "# The answers contains calculation error\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter2_exrY10K.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter2_exrY10K.ipynb
new file mode 100644
index 00000000..175230ce
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter2_exrY10K.ipynb
@@ -0,0 +1,113 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 02:Temperature"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.1:pg-33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 2.1\n",
+ "\n",
+ " The straight bore thermometer reading will be 47.62 degree Celsius.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d = 1 # Assumption\n",
+ "l = 1 # Assumption\n",
+ "A_ACDB = (math.pi/4)*(1/3.0)*((1.05*d)**2)*10.5*l - (math.pi/4)*(1/3.0)*d**2*10*l # Area of ABCD\n",
+ "A_AEFB = (math.pi/4)*(1/3.0)*((1.1*d)**2)*11*l - (math.pi/4)*(1/3.0)*d**2*10*l # Area of AEFB\n",
+ "t = 100*(A_ACDB/A_AEFB)\n",
+ "print \"\\n Example 2.1\"\n",
+ "print \"\\n The straight bore thermometer reading will be \",round(t,2),\" degree Celsius.\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.2:pg-35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 2.2\n",
+ "\n",
+ " Reading of thermocouple at t = 50 degree Celsius will be 58.33 degree Celsius.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy.polynomial.polynomial\n",
+ "\n",
+ "#t = numpy.polynomial(0,'t')\n",
+ "def f1(t):\n",
+ " e=(0.2*t)-((5e-4)*t**2)\n",
+ " return e# e.m.f. as a function of temperature in mV\n",
+ "e0 = f1(0)#horner(e, 0) # e.m.f. at t = 0 degree\n",
+ "e100 = f1(100) # e.m.f. at t = 100 degree\n",
+ "e50 = f1(50) # e.m.f. at t = 50 degree\n",
+ "r = (100/e100)*e50 # Reading of thermocouple at t = 50degree\n",
+ "print \"\\n Example 2.2\"\n",
+ "print \"\\n Reading of thermocouple at t = 50 degree Celsius will be \",round(r,2),\" degree Celsius.\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter3_4zPOo0N.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter3_4zPOo0N.ipynb
new file mode 100644
index 00000000..dc342cb8
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter3_4zPOo0N.ipynb
@@ -0,0 +1,370 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 03:Work and Heat Transfer"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.1:pg-54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 3.1\n",
+ "\n",
+ " The amount of work done upon the atmosphere by the balloon is 50.6625 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "dV = 0.5 # Change in volume in m**3\n",
+ "P = 101.325e03 # Atmospheric pressure in N/m**2\n",
+ "Wd = P*dV # Work done in J\n",
+ "print \"\\n Example 3.1\"\n",
+ "print \"\\n The amount of work done upon the atmosphere by the balloon is \",Wd/1e3,\" kJ\",\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.2:pg-55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 3.2\n",
+ "\n",
+ " The displacement work done by the air is 60.795 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "dV = 0.6 # Volumetric change in m**3\n",
+ "\n",
+ "P = 101.325e03 # Atmospheric pressure in N/m**2\n",
+ "\n",
+ "Wd = P*dV # Work done in J\n",
+ "\n",
+ "print \"\\n Example 3.2\"\n",
+ "\n",
+ "print \"\\n The displacement work done by the air is \",Wd/1e3 ,\" kJ\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.3:pg-55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 3.3\n",
+ "\n",
+ " The net work transfer for the system is -57.19 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "\n",
+ "T = 1.275 # Torque acting against the fluid in mN\n",
+ "\n",
+ "N = 10000 # Number of revolutions\n",
+ "\n",
+ "W1 = 2*math.pi*T*1e-3*N # Work done by stirring device upon the system\n",
+ "\n",
+ "P = 101.325e03 # Atmospheric pressure in kN/m**2\n",
+ "\n",
+ "d = 0.6 # Piston diameter in m\n",
+ "\n",
+ "A = (math.pi/4)*(d)**2 # Piston area in m\n",
+ "\n",
+ "L = 0.80 # Displacement of diameter in m\n",
+ "\n",
+ "W2 = (P*A*L)/1000 # Work done by the system on the surroundings i KJ\n",
+ "\n",
+ "W = -W1+W2 # net work transfer for the system\n",
+ "print \"\\n Example 3.3\"\n",
+ "print \"\\n The net work transfer for the system is \",round(W,2) ,\" kJ\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.4:pg-56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 3.4\n",
+ "\n",
+ " The rate of work transfer from gas to the piston is 24383.7855401 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "\n",
+ "ad = 5.5e-04 # Area of indicator diagram in m**2\n",
+ "\n",
+ "ld = 0.06 # Length of diagram in m\n",
+ "\n",
+ "k = 147 # Spring value in MPa/m\n",
+ "\n",
+ "w = 150 # Speed of engine in revolution per minute\n",
+ "\n",
+ "L = 1.2 # Stroke of piston in m\n",
+ "\n",
+ "d = 0.8 # Diameter of the cylinder in m\n",
+ "\n",
+ "A = (math.pi/4)*(0.8**2) # Area of cylinder\n",
+ "\n",
+ "Pm = (ad/ld)*k # Effective pressure in MPa\n",
+ "\n",
+ "W1 = Pm*L*A*w # Work done in 1 minute MJ\n",
+ "\n",
+ "W = (12*W1)/60 # The rate of work transfer gas to the piston in MJ/s\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n Example 3.4\"\n",
+ "\n",
+ "print \"\\n The rate of work transfer from gas to the piston is \",W*1e3 ,\" kW\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.5:pg-57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 3.5\n",
+ "\n",
+ " Rating of furnace would be 2.17163371599 *1e3 kW\n",
+ "\n",
+ " Diameter of furnace is 1.0 m\n",
+ "\n",
+ " Length of furnace is 2.0 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Given that\n",
+ "\n",
+ "m = 5 # mass flow rate in tones/h\n",
+ "\n",
+ "Ti = 15 # Initial temperature in degree Celsius\n",
+ "\n",
+ "tp = 1535 # Phase change temperature in degree Celsius\n",
+ "\n",
+ "Tf = 1650 # Final temperature in degree Celsius\n",
+ "\n",
+ "Lh = 270 # Latent heat of iron in kJ/Kg\n",
+ "\n",
+ "ml = 29.93 # Specific heat of iron in liquid phase in kJ/Kg\n",
+ "\n",
+ "ma = 56 # Atomic weight of iron\n",
+ "\n",
+ "sh = 0.502 # Specific heat of iron in solid phase in kJ/Kg\n",
+ "\n",
+ "d = 6900 # Density of molten metal in kg/m**3\n",
+ "\n",
+ "n=0.7 # furnace efficiency\n",
+ "\n",
+ "l_d_ratio = 2 # length to diameter ratio\n",
+ "\n",
+ "print \"\\n Example 3.5\"\n",
+ "\n",
+ "h1 = sh*(tp-Ti) # Heat required to raise temperature\n",
+ "\n",
+ "h2 = Lh # Heat consumed in phase change\n",
+ "\n",
+ "h3 = ml*(Tf-tp)/ma # Heat consumed in raising temperature of molten mass\n",
+ "\n",
+ "h = h1+h2+h3 # Heat required per unit mass\n",
+ "\n",
+ "Hi = h*m*1e3 # Ideal heat requirement\n",
+ "\n",
+ "H = Hi/(n*3600) # Actual heat requirement\n",
+ "\n",
+ "V = (3*m)/d # Volume required in m**3\n",
+ "\n",
+ "d = (4*V/(math.pi*l_d_ratio))**(1/3) # Diameter of furnace \n",
+ "\n",
+ "l = d*l_d_ratio # Length of furnace\n",
+ "\n",
+ "print \"\\n Rating of furnace would be \",H/1e3 ,\" *1e3 kW\"\n",
+ "\n",
+ "print \"\\n Diameter of furnace is \",d ,\" m\"\n",
+ "\n",
+ "print \"\\n Length of furnace is \",l ,\" m\"\n",
+ "\n",
+ "#The answer provided in the textbook is wrong\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.6:pg-57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 3.6\n",
+ "\n",
+ " Rate at which aluminium can be melted is 5.39 tonnes/h\n",
+ "\n",
+ " Mass of aluminium that can be held in furnace is 5.232 tonnes\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "\n",
+ "SH = 0.9 # Specific heat of aluminium in solid state in kJ/kgK \n",
+ "\n",
+ "L = 390 # Latent heat in kJ/kg\n",
+ "\n",
+ "aw = 27 # Atomic weight\n",
+ "\n",
+ "D = 2400 # Density in molten state in kg/m**3\n",
+ "\n",
+ "Tf = 700 # Final temperature in degree Celsius\n",
+ "\n",
+ "Tm = 660 # Melting point of aluminium in degree Celsius\n",
+ "\n",
+ "Ti = 15 # Initial temperature in degree Celsius\n",
+ "\n",
+ "HR = SH*(Tm-Ti)+L+(29.93/27)*(Tf-Tm) # Heat requirement\n",
+ "\n",
+ "HS = HR/0.7 # Heat supplied\n",
+ "\n",
+ "RM = 2.17e3*3600/HS # From the data of problem 3.7\n",
+ "\n",
+ "V = 2.18 # Volume in m**3\n",
+ "\n",
+ "M = V*D\n",
+ "\n",
+ "print \"\\n Example 3.6\"\n",
+ "\n",
+ "print \"\\n Rate at which aluminium can be melted is \",round(RM/1e3,2) ,\" tonnes/h\"\n",
+ "\n",
+ "print \"\\n Mass of aluminium that can be held in furnace is \",M/1e3 ,\"tonnes\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter4_UHVlvXM.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter4_UHVlvXM.ipynb
new file mode 100644
index 00000000..e60349d2
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter4_UHVlvXM.ipynb
@@ -0,0 +1,343 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 04:First Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.1:pg-72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 4.1\n",
+ "\n",
+ " The internal energy of the gas decrease by 21.85 kJ in the process.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "V1 = 0.3 # Initial volume in m**3\n",
+ "V2 = 0.15 # Final volume in m**3\n",
+ "P = 0.105 # Initial Pressure in MPa\n",
+ "Q = -37.6 # Heat transferred in kJ\n",
+ "W = P*(V2-V1)*1e6 # Work done\n",
+ "U = Q*1e3-W # Internal energy change\n",
+ "print \"\\n Example 4.1\"\n",
+ "print \"\\n The internal energy of the gas decrease by \",abs(U)/1e3,\" kJ in the process.\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.2:pg-73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 4.2\n",
+ "\n",
+ " The heat flow into the system along the path adb is 62.5 kJ\n",
+ "\n",
+ " The heat liberated along the path b-a is -73 kJ\n",
+ "\n",
+ " The heat absorbed in the path ad and db are 52.5 kJ nd 10.0 kJ respectively.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Qacb = 84 # Heat transfer along the path acb in kJ \n",
+ "Wacb = 32 # Work done along the path acb in kJ\n",
+ "Uba = Qacb-Wacb # Ub-Ua\n",
+ "# Part (a)\n",
+ "Wadb = 10.5 # Work done along the path adb in kJ\n",
+ "Qadb = Uba+Wadb # Heat flow into the system along the path adb\n",
+ "print \"\\n Example 4.2\"\n",
+ "print \"\\n The heat flow into the system along the path adb is \",Qadb ,\" kJ\"\n",
+ "# Part (b)\n",
+ "Wb_a = -21 # work done along the path ba in kJ\n",
+ "Uab = - Uba # Change in internal energy along the path ab in kJ\n",
+ "Qb_a = Uab+Wb_a # Heat liberated along the path b-a\n",
+ "print \"\\n The heat liberated along the path b-a is \",Qb_a,\" kJ\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Part (c)\n",
+ "Wdb = 0 # Constant volume\n",
+ "Wad = 10.5 # work done along the path ad in kJ\n",
+ "Wadb = Wdb-Wad # work done along the path adb in kJ\n",
+ "Ud = 42\n",
+ "Ua = 0\n",
+ "Qad = Ud-Ua+Wad # Heat flow into the system along the path ad in kJ\n",
+ "Qdb = Qadb-Qad #Heat flow into the system along the path db in kJ\n",
+ "\n",
+ "print \"\\n The heat absorbed in the path ad and db are \",Qad ,\" kJ nd \",Qdb ,\" kJ respectively.\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.3:pg-73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 4.3\n",
+ "The completed table is: [[0, 2170, -2170], [21000, 0, 21000], [-2100, 34500, -36600], [-35900, -53670, 17770]]\n",
+ "\n",
+ " Net rate of work output is -284 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Process a-b\n",
+ "Qab = 0 # Heat transfer along the path ab in kJ/ min\n",
+ "Wab = 2170 # Work transfer along the path ab in kJ/min\n",
+ "Eab = Qab-Wab # Change in internal energy along the path ab in kJ/min\n",
+ "# Process b-c\n",
+ "\n",
+ "Qbc = 21000 # Heat transfer along the path bc in kJ/ min\n",
+ "Wbc = 0 # Work transfer along the path bc in kJ/min\n",
+ "Ebc = Qbc-Wbc # Change in internal energy along the path bc in kJ/min\n",
+ "\n",
+ "# Process c-d\n",
+ "\n",
+ "Qcd = -2100 # Heat transfer along the path cd in kJ/ min\n",
+ "Ecd = -36600 # Change in internal energy along the path cd in kJ/min\n",
+ "Wcd = Qcd-Ecd # Work transfer along the path cd in kJ/min\n",
+ "\n",
+ "# Process d-a\n",
+ "\n",
+ "Q = -17000 # Total heat transfer in kJ/min\n",
+ "Qda = Q-Qab-Qbc-Qcd # Heat transfer along the path da in kJ/ min \n",
+ "Eda = -Eab-Ebc-Ecd # Change in internal energy along the path da in kJ/min \n",
+ "Wda = Qda-Eda # Work transfer along the path da in kJ/min\n",
+ "\n",
+ "print \"\\n Example 4.3\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "M = [[Qab, Wab, Eab] , [Qbc, Wbc, Ebc], [Qcd, Wcd, Ecd], [Qda, Wda, Eda]]\n",
+ "print\"The completed table is:\",M \n",
+ "W = Qab+Qbc+Qcd+Qda \n",
+ "print \"\\n Net rate of work output is \",W/60 ,\" kW\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.4:pg-75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 4.4\n",
+ "\n",
+ " Part A:\n",
+ "\n",
+ " For the quasi static process is: \n",
+ " \n",
+ "Q: 37.2676405731 kJ\n",
+ "\n",
+ " dU: -92.1338891945 kJ\n",
+ "\n",
+ " W: 129.4 kJ \n",
+ "\n",
+ " Part B:\n",
+ "\n",
+ " Work transfer for the process is 122.13 kJ.\n",
+ "\n",
+ "\n",
+ " Part C:\n",
+ "\n",
+ " Wb is not equal to integral(p*dv) since the process is not quasi static.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Part (a)\n",
+ "\n",
+ "m = 3 # mass of substance in kg\n",
+ "V1 = 0.22 # Initial volume of system in m**3\n",
+ "P1 = 500 # Initial pressure of system in kPa\n",
+ "P2 = 100 # Final pressure of system in kPa \n",
+ "V2 = V1*(P1/P2)**(1/1.2) # Final volume of system\n",
+ "dU = 3.56*(P2*V2-P1*V1) # Change in internal energy of substance in kJ/kg\n",
+ "n = 1.2 # polytropic index\n",
+ "W = (P2*V2-P1*V1)/(1-n) # work done in process\n",
+ "Q = dU+W # Heat addition in process\n",
+ "\n",
+ "print \"\\n Example 4.4\"\n",
+ "print \"\\n Part A:\"\n",
+ "print \"\\n For the quasi static process is: \\n \"\n",
+ "print \"Q: \",Q ,\"kJ\"\n",
+ "print \"\\n dU: \",dU ,\"kJ\"\n",
+ "print \"\\n W: \",round(W,2) ,\"kJ\",\n",
+ "\n",
+ "#The provided in the textbook is wrong\n",
+ "\n",
+ "# Part (b)\n",
+ "\n",
+ "print \"\\n\\n Part B:\"\n",
+ "Qb = 30 # heat transfer in kJ\n",
+ "Wb = Qb-dU # Work done in kJ\n",
+ "print \"\\n Work transfer for the process is \",round(Wb,2) ,\"kJ.\" \n",
+ "#The answers vary due to round off error\n",
+ "# Part (c)\n",
+ "\n",
+ "print \"\\n\\n Part C:\"\n",
+ "print \"\\n Wb is not equal to integral(p*dv) since the process is not quasi static.\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.5:pg-76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 4.5\n",
+ "\n",
+ " The work done by the system is 8.55 kJ\n",
+ "\n",
+ " The heat flow into the system is 68.085 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "from scipy.integrate import quad\n",
+ "V1 = 0.03 # initial volume in m**3\n",
+ "\n",
+ "P1 = 170.0 # Initial pressure in kPa\n",
+ "\n",
+ "P2 = 400.0 # Final pressure in kPa\n",
+ "\n",
+ "V2 = 0.06 # Final volume in m**3\n",
+ "\n",
+ "U = 3.15*(P2*V2-P1*V1) # internal energy in kJ\n",
+ "\n",
+ "b = np.matrix([P1, P2])\n",
+ "\n",
+ "B=b.transpose()\n",
+ "\n",
+ "A = np.matrix([[1,V1],[1,V2]]) \n",
+ "\n",
+ "x = A.getI()*B \n",
+ "\n",
+ "a = x[0] ; b = x[1] \n",
+ "\n",
+ "def pressure(V): \n",
+ " P = a+b*V\n",
+ " return P\n",
+ "\n",
+ " endfunction \n",
+ "\n",
+ "W, err = quad(pressure, V1, V2)\n",
+ " \n",
+ "#W = integrate(pressure,V1,V2) \n",
+ " \n",
+ "Q = U+W # heat flow into the system in kJ\n",
+ " \n",
+ "print \"\\n Example 4.5\"\n",
+ " \n",
+ "print \"\\n The work done by the system is \",W ,\" kJ\"\n",
+ " \n",
+ "print \"\\n The heat flow into the system is \",Q ,\" kJ\"\n",
+ " \n",
+ " "
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter5_He9TCwH.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter5_He9TCwH.ipynb
new file mode 100644
index 00000000..ce4f45c9
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter5_He9TCwH.ipynb
@@ -0,0 +1,465 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 05:First law applied to Flow Processes"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.1:pg-97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 5.1\n",
+ "\n",
+ " The rate of work input is 116.0 kW\n",
+ "\n",
+ " The ratio of the inlet pipe diameter and outet pipe diameter is 0.0 \n"
+ ]
+ }
+ ],
+ "source": [
+ "# Part(a)\n",
+ "import math\n",
+ "V1 = 0.95 # Inlet volume flow rate in m**3/kg\n",
+ "\n",
+ "P1 = 100 # Pressure at inlet in kPa\n",
+ "\n",
+ "v1 = 7 # velocity of flow at inlet in m/s\n",
+ "\n",
+ "V2 = 0.19 # Exit volume flow rate in m**3/kg\n",
+ "\n",
+ "P2 = 700 # Pressure at exit in kPa \n",
+ "\n",
+ "v2 = 5 # velocity of flow at exit in m/s\n",
+ "\n",
+ "w = 0.5 # mass flow rate in kg/s\n",
+ "\n",
+ "u21 = 90 # change in internal energy in kJ/kg\n",
+ "\n",
+ "Q = -58 # Heat transfer in kW\n",
+ "\n",
+ "W = - w*( u21 + (P2*V2-P1*V1) + ((v2**2-v1**2)/2) ) + Q # W = dW/dt \n",
+ "\n",
+ "print \"\\n Example 5.1\"\n",
+ "\n",
+ "print \"\\n The rate of work input is \",abs(W) ,\" kW\"\n",
+ "\n",
+ "#The answers given in textbook is wrong\n",
+ "\n",
+ "# Part (b)\n",
+ "\n",
+ "A = (v2/v1)*(V1/V2) # A = A1/A2\n",
+ "\n",
+ "d_ratio = math.sqrt(A) # d = d1/d2\n",
+ "\n",
+ "print \"\\n The ratio of the inlet pipe diameter and outet pipe diameter is \",d_ratio ,\" \"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.2:pg-98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 5.2\n",
+ "\n",
+ " The internal energy decreases by 20.0 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "V1 = 0.37 # volume flow rate at inlet in m**3/kg\n",
+ "\n",
+ "P1 = 600# Inlet pressure in kPa\n",
+ "\n",
+ "v1 = 16 # Inlet velocity of flow in m/s\n",
+ "\n",
+ "V2 = 0.62 # volume flow rate at exit in m**3/kg \n",
+ "\n",
+ "P2 = 100# Exit pressure in kPa\n",
+ "\n",
+ "v2 = 270 # Exit velocity of flow in m/s\n",
+ "\n",
+ "Z1 = 32 # Height of inlet port from datum in m\n",
+ "\n",
+ "Z2 = 0 #Height of exit port from datum in m\n",
+ "\n",
+ "g = 9.81 # Acceleration due to gravity\n",
+ "\n",
+ "Q = -9 # Heat transfer in kJ/kg\n",
+ "\n",
+ "W = 135 # Work transfer in kJ/kg\n",
+ "\n",
+ "U12 = (P2*V2-P1*V1) + ((v2**2-v1**2)/2000) + (Z2-Z1)*g*1e-3 + W - Q # Change in internal energy in kJ\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n Example 5.2\"\n",
+ "\n",
+ "print \"\\n The internal energy decreases by \",round(U12) ,\" kJ\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.3:pg-99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 5.3\n",
+ "\n",
+ " The steam flow rate is 53.5854836932 Kg/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "P1 = 4 # Boiler pressure in MPa\n",
+ "\n",
+ "t1 = 400 # Exit temperature at boiler in degree Celsius\n",
+ "\n",
+ "h1 = 3213 # Enthalpy at boiler exit in kJ/kg\n",
+ "\n",
+ "V1 = 0.073 # specific volume at boiler exit in m**3/kg\n",
+ "\n",
+ "P2 = 3.5 # Pressure at turbine end in MPa\n",
+ "\n",
+ "t2 = 392 # Turbine exit temperature in degree Celsius\n",
+ "\n",
+ "h2 = 3202 # Enthalpy at turbine exit in kJ/kg\n",
+ "\n",
+ "V2 = 0.084 # specific volume at turbine exit in m**3/kg\n",
+ "\n",
+ "Q = -8.5 # Heat loss from pipeline in kJ/kg\n",
+ "\n",
+ "v1 = math.sqrt((2*(h1-h2+Q)*1e3)/(1.15**2-1)) # velocity of flow in m/s\n",
+ "\n",
+ "A1 = (math.pi/4)*0.2**2 # Area of pipe in m**2\n",
+ "\n",
+ "w = (A1*v1)/V1 # steam flow rate in Kg/s\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n Example 5.3\"\n",
+ "\n",
+ "print \"\\n The steam flow rate is \",w ,\" Kg/s\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.4:pg-100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 5.4\n",
+ "\n",
+ " The amount of heat that should be supplied is 703.880549402 Kg/h\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h1 = 313.93 # Enthalpy of water at heater inlet in kJ/kg\n",
+ "\n",
+ "h2 = 2676 # Enthalpy of hot water at temperature 100.2 degree Celsius\n",
+ "\n",
+ "h3 = 419 #Enthalpy of water at heater inlet in kJ/kg\n",
+ "\n",
+ "w1 = 4.2 # mass flow rate in kg/s\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n Example 5.4\"\n",
+ "\n",
+ "w2 = w1*(h3-h1)/(h2-h3)# Steam rate \n",
+ "\n",
+ "print \"\\n The amount of heat that should be supplied is \",w2*3600 ,\" Kg/h\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.5:pg-100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 5.5\n",
+ "\n",
+ " The rate of heat transfer to the air in the heat exchanger is 1577.85 kJ/s\n",
+ "\n",
+ " The power output from the turbine assuming no heat loss is 298 kW\n",
+ "\n",
+ " The velocity at the exit of the nozzle is 552.358579186 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "t1 = 15 # Heat exchanger inlet temperature in degree Celsius\n",
+ "\n",
+ "t2 = 800 # Heat exchanger exit temperature in degree Celsius\n",
+ "\n",
+ "t3 = 650 # Turbine exit temperature in degree Celsius\n",
+ "\n",
+ "t4 = 500 # Nozzle exit temperature in degree Celsius\n",
+ "\n",
+ "v1 = 30 # Velocity of steam at heat exchanger inlet in m/s\n",
+ "\n",
+ "v2 = 30# Velocity of steam at turbine inlet in m/s\n",
+ "\n",
+ "v3 = 60 # Velocity of steam at nozzle inlet in m/s\n",
+ "\n",
+ "w = 2 # mass flow rate in kg/s\n",
+ "\n",
+ "cp = 1005 # Specific heat capacity of air in kJ/kgK\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n Example 5.5\"\n",
+ "\n",
+ "Q1_2 = w*cp*(t2-t1) # rate of heat transfer\n",
+ "\n",
+ "print \"\\n The rate of heat transfer to the air in the heat exchanger is \",Q1_2/1e3 ,\" kJ/s\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "W_T = w*( ((v2**2-v3**2)/2) + cp*(t2-t3)) # power output from the turbine\n",
+ "\n",
+ "print \"\\n The power output from the turbine assuming no heat loss is \",W_T/1000 ,\" kW\"\n",
+ "\n",
+ "v4 = math.sqrt( (v3**2) + (2*cp*(t3-t4)) ) # velocity at the exit of the nozzle\n",
+ "\n",
+ "print \"\\n The velocity at the exit of the nozzle is \",v4 ,\" m/s\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.6:pg-102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 5.6\n",
+ "\n",
+ " Velocity of exhaust gas is 541.409855832 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "ha = 260 # Enthalpy of air in kJ/kg\n",
+ "\n",
+ "hg = 912 # Enthalpy of gas in kJ/kg\n",
+ "\n",
+ "Va = 270 # Velocity of air in m/s\n",
+ "\n",
+ "wf = 0.0190 # mass of fuel in Kg\n",
+ "\n",
+ "wa = 1 # mass of air in Kg\n",
+ "\n",
+ "Ef = 44500 # Chemical energy of fuel in kJ/kg\n",
+ "\n",
+ "Q = 21 # Heat loss from the engine in kJ/kg\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n Example 5.6\"\n",
+ "\n",
+ "Eg = 0.05*wf*Ef/(1+wf) # As 5% of chemical energy is not released in reaction\n",
+ "\n",
+ "wg = wa+wf # mass of flue gas\n",
+ "\n",
+ "Vg = math.sqrt(2000*(((ha+(Va**2*0.001)/2+(wf*Ef)-Q)/(1+wf))-hg-Eg)) \n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n Velocity of exhaust gas is \",Vg ,\" m/s\"\n",
+ "\n",
+ "#Answer given in textbook is wrong\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.8:pg-103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 5.8\n",
+ "\n",
+ " The rate at which air flows out of the tank is 0.85 kg/h\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "\n",
+ "V = 0.12 # Volume of tank in m**3\n",
+ "\n",
+ "p = 1 # Pressure in MPa\n",
+ "\n",
+ "T = 150 # Temperature in degree centigrade\n",
+ "\n",
+ "P = 0.1 # Power to peddle wheel in kW\n",
+ "\n",
+ "print \"\\n Example 5.8\"\n",
+ "\n",
+ "u0 = 0.718*273 # Internal energy at 0 degree Celsius\n",
+ "\n",
+ "# Function for internal energy of gas\n",
+ "\n",
+ "def f1(t):\n",
+ " u = u0+(0.718*t)\n",
+ " pv = 0.287*(273+t)\n",
+ " return (u,pv)\n",
+ " \n",
+ "U,PV=f1(T)\n",
+ " \n",
+ " \n",
+ "hp = U+PV # At 150 degree centigrade\n",
+ "m_a = P/hp\n",
+ " \n",
+ "print \"\\n The rate at which air flows out of the tank is \",round(m_a*3600,2) ,\" kg/h\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter6_569mm1H.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter6_569mm1H.ipynb
new file mode 100644
index 00000000..169d80e5
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter6_569mm1H.ipynb
@@ -0,0 +1,365 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 06:Second Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.1:pg-138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 6.1\n",
+ "\n",
+ " Least rate of heat rejection is 0 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T1 = 800 # Source temperature in degree Celsius\n",
+ "\n",
+ "T2 = 30 # Sink temperature in degree Celsius\n",
+ "\n",
+ "e_max = 1-((T2+273)/(T1+273)) # maximum possible efficiency \n",
+ "\n",
+ "Wnet = 1 # in kW\n",
+ "\n",
+ "Q1 = Wnet/e_max # Least rate of heat required in kJ/s\n",
+ "\n",
+ "Q2 = Q1-Wnet # Least rate of heat rejection kJ/s\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n Example 6.1\"\n",
+ "\n",
+ "print \"\\n Least rate of heat rejection is \",Q2,\" kW\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.2:pg-139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 6.2\n",
+ "\n",
+ " Least Power necessary to pump the heat out is 0.31 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T1 = -15 # Source temperature in degree Celsius\n",
+ "\n",
+ "T2 = 30 # Sink temperature in degree Celsius\n",
+ "\n",
+ "Q2 = 1.75 # in kJ/sec\n",
+ "\n",
+ "print \"\\n Example 6.2\"\n",
+ "\n",
+ "W= Q2*((T2+273)-(T1+273))/(T1+273) # Least Power necessary to pump the heat out\n",
+ "\n",
+ "print \"\\n Least Power necessary to pump the heat out is \",round(W,2),\"kW\"\n",
+ " \n",
+ " #The answers vary due to round off error\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.3:pg-140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 6.3\n",
+ "\n",
+ "\n",
+ " Part A:\n",
+ "\n",
+ " The heat transfer to refrigerant is 0.0 kJ\n",
+ "\n",
+ " The heat rejection to the 40 degree reservoir is 8200.0 kJ\n",
+ "\n",
+ "\n",
+ " Part B:\n",
+ "\n",
+ " The heat transfer to refrigerant is 1200.0 kJ\n",
+ "\n",
+ " The heat rejection to the 40 degree reservoir is 2344.0 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Given \n",
+ "\n",
+ "T1 = 600 # Source temperature of heat engine in degree Celsius\n",
+ "\n",
+ "T2 = 40 # Sink temperature of heat engine in degree Celsius \n",
+ "\n",
+ "T3 = -20 # Source temperature of refrigerator in degree Celsius\n",
+ "\n",
+ "Q1 = 2000 # Heat transfer to heat engine in kJ\n",
+ "\n",
+ "W = 360 # Net work output of plant in kJ\n",
+ "\n",
+ "# Part (a)\n",
+ "\n",
+ "e_max = 1.0-((T2+273)/(T1+273)) # maximum efficiency \n",
+ "\n",
+ "W1 = e_max*Q1 # maximum work output \n",
+ "\n",
+ "COP = (T3+273)/((T2-273)-(T3-273)) # coefficient of performance of refrigerator\n",
+ "\n",
+ "W2 = W1-W # work done to drive refrigerator \n",
+ "\n",
+ "Q4 = COP*W2 # Heat extracted by refrigerator\n",
+ "\n",
+ "Q3 = Q4+W2 # Heat rejected by refrigerator\n",
+ "\n",
+ "Q2 = Q1-W1 # Heat rejected by heat engine\n",
+ "\n",
+ "Qt = Q2+Q3 # combined heat rejection by heat engine and refrigerator \n",
+ "\n",
+ "print \"\\n Example 6.3\"\n",
+ "\n",
+ "print \"\\n\\n Part A:\"\n",
+ "\n",
+ "print \"\\n The heat transfer to refrigerant is \",round(Q2,3) ,\" kJ\"\n",
+ "\n",
+ "print \"\\n The heat rejection to the 40 degree reservoir is \",round(Qt,3) ,\" kJ\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Part (b)\n",
+ "\n",
+ "print \"\\n\\n Part B:\"\n",
+ "\n",
+ "e_max_ = 0.4*e_max # maximum efficiency\n",
+ "\n",
+ "W1_ = e_max_*Q1 # maximum work output \n",
+ "\n",
+ "W2_ = W1_-W # work done to drive refrigerator \n",
+ "\n",
+ "COP_ = 0.4*COP # coefficient of performance of refrigerator\n",
+ "\n",
+ "Q4_ = COP_*W2_ # Heat extracted by refrigerator\n",
+ "\n",
+ "Q3_ = Q4_+W2_ # Heat rejected by refrigerator\n",
+ "\n",
+ "Q2_ = Q1-W1_ # Heat rejected by heat engine\n",
+ "\n",
+ "QT = Q2_+Q3_# combined heat rejection by heat engine and refrigerator \n",
+ "\n",
+ "print \"\\n The heat transfer to refrigerant is \",round(Q2_,3) ,\" kJ\"\n",
+ "\n",
+ "print \"\\n The heat rejection to the 40 degree reservoir is \",round(QT,3) ,\" kJ\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.5:pg-142"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 6.5\n",
+ "\n",
+ " The multiplication factor is 6\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T1 = 473 # Boiler temperature in K\n",
+ "\n",
+ "T2 = 293 # Home temperature in K\n",
+ "\n",
+ "T3 = 273 # Outside temperature in K\n",
+ "\n",
+ "print \"\\n Example 6.5\"\n",
+ "\n",
+ "MF = (T2*(T1-T3))/(T1*(T2-T3)) \n",
+ "\n",
+ "print \"\\n The multiplication factor is \",MF \n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.6:pg-144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 6.6\n",
+ "\n",
+ " Minimum area required for the collector plate is 10.0 m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T1 = 90.0 # Operating temperature of power plant in degree Celsius \n",
+ "\n",
+ "T2 = 20.0 # Atmospheric temperature in degree Celsius\n",
+ "\n",
+ "W = 1.0 # Power production from power plant in kW\n",
+ "\n",
+ "E = 1880 # Capability of energy collection in kJ/m**2 h\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n Example 6.6\"\n",
+ "\n",
+ "e_max = 1.0-((T2+273.0)/(T1+273.0)) # maximum efficiency\n",
+ "\n",
+ "Qmin = W/e_max # Minimum heat requirement per second\n",
+ "\n",
+ "Qmin_ = Qmin*3600.0 # Minimum heat requirement per hour\n",
+ "\n",
+ "Amin = Qmin_/E # Minimum area requirement\n",
+ "\n",
+ "print \"\\n Minimum area required for the collector plate is \",math. ceil(Amin) ,\" m**2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.7:pg-144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 6.7\n",
+ "\n",
+ " Area of the panel 0.167221895617 m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T1 = 1000 # Temperature of hot reservoir in K\n",
+ "\n",
+ "W = 1000 # Power requirement in kW\n",
+ "\n",
+ "K = 5.67e-08 # constant \n",
+ "\n",
+ "print \"\\n Example 6.7\"\n",
+ "\n",
+ "Amin = (256*W)/(27*K*T1**4) # minimum area required\n",
+ "\n",
+ "print \"\\n Area of the panel \",Amin ,\" m**2\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter7_uRawaHX.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter7_uRawaHX.ipynb
new file mode 100644
index 00000000..a84c6d65
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter7_uRawaHX.ipynb
@@ -0,0 +1,453 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 07: Entropy"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.1:pg-191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 7.1\n",
+ "\n",
+ " Change in entropy of the water is 0.0271 kJ/K\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "import math\n",
+ "T1 = 37.0 # Final water temperature in degree Celsius \n",
+ "T2 = 35.0 # Initial water temperature in degree Celsius \n",
+ "m = 1.0 # Mass of water in kg\n",
+ "cv = 4.187 # Specific heat capacity of water in kJ/kgK\n",
+ "print \"\\n Example 7.1\"\n",
+ "S = m*cv*math.log((T1+273)/(T2+273)) # Change in entropy of the water\n",
+ "print \"\\n Change in entropy of the water is \",round(S,4) ,\" kJ/K\"\n",
+ "#The answer provided in the textbook is wrong\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.2:pg-192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 7.2\n",
+ "\n",
+ " The entropy change of the universe is -1.12252010724 kJ/K\n",
+ "\n",
+ " The entropy change of the universe is -1.20940246848 kJ/K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Part (a)\n",
+ "T1 = 273 # Initial temperature of water in Kelvin\n",
+ "T2 = 373 # Temperature of heat reservoir in Kelvin\n",
+ "m = 1 # Mass of water in kg\n",
+ "cv = 4.187 # Specific heat capacity of water\n",
+ "\n",
+ "print \"\\n Example 7.2\"\n",
+ "Ss = m*cv*math.log(T2/T1) # entropy change of water\n",
+ "Q = m*cv*(T2-T1) # Heat transfer \n",
+ "Sr = -(Q/T2) # Entropy change of universe\n",
+ "S = Ss+Sr # Total entropy change\n",
+ "\n",
+ "print \"\\n The entropy change of the universe is \",S ,\" kJ/K\"\n",
+ "\n",
+ "# Part (b)\n",
+ "T3 = 323 # Temperature of intermediate reservoir in K\n",
+ "Sw = m*cv*(math.log(T3/T1)+math.log(T2/T3)) # entropy change of water\n",
+ "Sr1 = -m*cv*(T3-T1)/T3 # Entropy change of universe\n",
+ "Sr2 = -m*cv*(T2-T3)/T2 # Entropy change of universe\n",
+ "Su = Sw+Sr1+Sr2 # Total entropy change\n",
+ "print \"\\n The entropy change of the universe is \",Su ,\" kJ/K\"\n",
+ "#The answers vary due to round off error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.3:pg-193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 7.3\n",
+ "\n",
+ " The entropy change of the universe is -0.238182312568 kJ/K\n",
+ "\n",
+ " The minimum work required is -69.7874175824 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "m = 1 # Mass of ice in kg\n",
+ "\n",
+ "T1 = -5 # Initial temperature of ice in degree Celsius\n",
+ "\n",
+ "T2 = 20# Atmospheric temperature in degree Celsius\n",
+ "\n",
+ "T0 = 0# Phase change temperature of ice in degree Celsius\n",
+ "\n",
+ "cp = 2.093 # Specific heat capacity of ice in kJ/kgK\n",
+ "\n",
+ "cv = 4.187 # Specific heat capacity of water in kJ/kgK\n",
+ "\n",
+ "lf = 333.3 # Latent heat of fusion in kJ/kgK\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n Example 7.3\"\n",
+ "\n",
+ "Q = m*cp*(T0-T1)+1*333.3+m*cv*(T2-T0) # Net heat transfer\n",
+ "\n",
+ "Sa = -Q/(T2+273) # Entropy change of surrounding\n",
+ "\n",
+ "Ss1 = m*cp*math.log((T0+273)/(T1+273)) # entropy change during \n",
+ "\n",
+ "Ss2 = lf/(T0+273) # Entropy change during phase change\n",
+ "\n",
+ "Ss3 = m*cv*math.log((T2+273)/(T0+273)) # entropy change of water\n",
+ "\n",
+ "St = Ss1+Ss2+Ss3 # total entropy change of ice to convert into water at atmospheric temperature\n",
+ "\n",
+ "Su = St+Sa # Net entropy change of universe\n",
+ "\n",
+ "print \"\\n The entropy change of the universe is \",Su ,\" kJ/K\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "#The answer provided in the textbook is wrong\n",
+ "\n",
+ "# Part (b)\n",
+ "\n",
+ "S = St # Entropy change of system\n",
+ "\n",
+ "Wmin = (T2+273)*(S)-Q # minimum work required\n",
+ "\n",
+ "print \"\\n The minimum work required is \",Wmin ,\" kJ\"\n",
+ "\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.7:pg-200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 7.7\n",
+ "\n",
+ " Change in enthalpy is 223.48 kJ\n",
+ "\n",
+ " Change in internal energy is 171.91 kJ\n",
+ "\n",
+ " The change in entropy and heat transfer are is 0 kJ\n",
+ "\n",
+ " The work transfer during the process is -171.91 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P1 = 0.5 # Initial pressure in MPa\n",
+ "\n",
+ "V1 = 0.2 # Initial volume in m**3\n",
+ "\n",
+ "V2 = 0.05 # Final volume in m**3\n",
+ "\n",
+ "n = 1.3 # Polytropic index\n",
+ "\n",
+ "\n",
+ "\n",
+ "from scipy import integrate \n",
+ "\n",
+ "print \"\\n Example 7.7\"\n",
+ "\n",
+ "P2 = P1*(V1/V2)**n \n",
+ "\n",
+ "def f(p):\n",
+ " y = ((P1*V1**n)/p)**(1/n) \n",
+ " return y\n",
+ " \n",
+ "\n",
+ " \n",
+ "H, err = integrate.quad(f,P1,P2) # H = H2-H1\n",
+ "\n",
+ "U = H-(P2*V2-P1*V1) \n",
+ " \n",
+ "W12 = -U \n",
+ " \n",
+ "print \"\\n Change in enthalpy is \",round(H*1e3,2),\" kJ\"\n",
+ " \n",
+ "print \"\\n Change in internal energy is \",round(U*1000,2),\" kJ\"\n",
+ " \n",
+ "print \"\\n The change in entropy and heat transfer are is \",0 ,\" kJ\"\n",
+ " \n",
+ "print \"\\n The work transfer during the process is \",round(W12*1000,2) ,\" kJ\"\n",
+ " \n",
+ " #The answers vary due to round off error\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.8:pg-201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 7.8\n",
+ "\n",
+ " Change in the entropy of the universe is -1.2785104723 kJ/Kg K\n",
+ "\n",
+ " As the change in entropy of the universe in the process A-B is negative \n",
+ " so the flow must be from B-A\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "import math\n",
+ "from scipy import integrate \n",
+ "\n",
+ "\n",
+ "Pa = 130.0 # Pressure at station A in kPa\n",
+ "\n",
+ "Pb = 100.0# Pressure at station B in kPa\n",
+ "\n",
+ "Ta = 50.0 # Temperature at station A in degree Celsius\n",
+ "\n",
+ "Tb = 13.0# Temperature at station B in degree Celsius\n",
+ "\n",
+ "cp = 1.005 # Specific heat capacity of air in kJ/kgK\n",
+ "\n",
+ "x= lambda t:cp/t\n",
+ "y= lambda p:0.287/p\n",
+ "\n",
+ "print \"\\n Example 7.8\"\n",
+ "\n",
+ "Sb,error = integrate.quad(x,Ta,Tb)#-\n",
+ "Sa,eror=integrate.quad(y,Pa,Pb) \n",
+ "\n",
+ "Ss=Sb-Sa\n",
+ "Ssur=0 \n",
+ "Su = Ss+Ssur\n",
+ "\n",
+ "print \"\\n Change in the entropy of the universe is \",Su ,\" kJ/Kg K\"\n",
+ "\n",
+ "#The answers given in the book is wrong\n",
+ "\n",
+ "print \"\\n As the change in entropy of the universe in the process A-B is negative \\n so the flow must be from B-A\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.9:pg-202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 7.9\n",
+ "\n",
+ " The entropy generated during the process is 0.785677602261 kW/K\n",
+ "\n",
+ " As the entropy generated is positive so such device is possible\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T1 = 300.0 # Inlet temperature of air in K\n",
+ "\n",
+ "T2 = 330.0 # Exit temperature of first air stream in K\n",
+ "\n",
+ "T3 = 270.0 # Exit temperature of second air stream in K\n",
+ "\n",
+ "P1 = 4.0 # Pressure of inlet air stream in bar\n",
+ "\n",
+ "P2 =1.0 # Pressure of first exit air stream in bar\n",
+ "\n",
+ "P3 =1.0 # Pressure of second exit air stream in bar\n",
+ "\n",
+ "cp = 1.0005 # Specific heat capacity of air in kJ/kgK\n",
+ "\n",
+ "R = 0.287 # Gas constant\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n Example 7.9\"\n",
+ "\n",
+ "S21 = cp*math.log(T2/T1)-R*math.log(P2/P1) # Entropy generation\n",
+ "\n",
+ "S31 = cp*math.log(T3/T1)-R*math.log(P3/P1) # Entropy generation\n",
+ "\n",
+ "Sgen = (1.0*S21) + (1.0*S31) # Total entropy generation\n",
+ "\n",
+ "print \"\\n The entropy generated during the process is \",Sgen ,\" kW/K\"\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"\\n As the entropy generated is positive so such device is possible\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.10:pg-203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 7.10\n",
+ "\n",
+ " The rate of heat transfer through the wall is 1164.84375 W\n",
+ "\n",
+ " The rate of entropy through the wall is 0.213013632873 W/K\n",
+ "\n",
+ " The rate of total entropy generation with this heat transfer process is 0.352982954545 W/K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "A = 5*7 # Area of wall in m**2\n",
+ "k = 0.71# Thermal conductivity in W/mK \n",
+ "L = 0.32 # Thickness of wall in m\n",
+ "Ti = 21 # Room temperature in degree Celsius \n",
+ "To = 6 # Surrounding temperature in degree Celsius\n",
+ "print \"\\n Example 7.10\"\n",
+ "Q = k*A*(Ti-To)/L # Heat transfer\n",
+ "Sgen_wall = Q/(To+273) - Q/(Ti+273) # Entropy generation in wall\n",
+ "print \"\\n The rate of heat transfer through the wall is \",Q ,\" W\"\n",
+ "print \"\\n The rate of entropy through the wall is \",Sgen_wall ,\" W/K\"\n",
+ "Tr = 27 # Inner surface temperature of wall in degree Celsius \n",
+ "Ts = 2 # Outer surface temperature of wall in degree Celsius \n",
+ "Sgen_total = Q/(Ts+273)-Q/(Tr+273) # Total entropy generation in process \n",
+ "print \"\\n The rate of total entropy generation with this heat transfer process is \",Sgen_total ,\" W/K\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter8_KEcrcQP.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter8_KEcrcQP.ipynb
new file mode 100644
index 00000000..b0366774
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter8_KEcrcQP.ipynb
@@ -0,0 +1,1023 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 08: Available energy Availability and irreversibility"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.1:pg-249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.1\n",
+ "\n",
+ " The fraction of energy that becomes unavailable due to irreversible heat transfer is 0.260038240918\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T0 = 35.0 # Heat rejection temperature in degree Celsius \n",
+ "T1 = 420 # Vapor condensation temperature in degree Celsius \n",
+ "T1_ = 250 # water vapor temperature in degree Celsius \n",
+ "print \"\\n Example 8.1\"\n",
+ "f = ((T0+273)*((T1+273)-(T1_+273)))/((T1_+273)*((T1+273)-(T0+273)))# fraction of energy lost\n",
+ "print \"\\n The fraction of energy that becomes unavailable due to irreversible heat transfer is \",f \n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.2:pg-250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.2\n",
+ "\n",
+ " Total change in entropy is 2.03990232306 kJ/K\n",
+ "\n",
+ " Increase in unavailable energy is 618.090403887 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy import integrate\n",
+ "import math\n",
+ "\n",
+ "lhw = 1858.5 # Latent heat of water in kJ/kg\n",
+ "Tew = 220 # Water evaporation temperature in degree Celsius\n",
+ " \n",
+ "Tig = 1100 # Initial temperature of the gas in degree Celsius\n",
+ "Tfg = 550 # Final temperature of the gas in degree Celsius\n",
+ "T0 = 303 # Atmospheric temperature in degree Celsius\n",
+ "Tg2 = 823 \n",
+ "Tg1 = 1373\n",
+ "print \"\\n Example 8.2\"\n",
+ "Sw = lhw/(Tew+273) # Entropy generation in water\n",
+ "Sg,error = integrate.quad(lambda T:3.38/T,Tg1,Tg2)\n",
+ "St = Sg+Sw \n",
+ "print \"\\n Total change in entropy is \",St ,\" kJ/K\"\n",
+ "\n",
+ "print \"\\n Increase in unavailable energy is \",T0*St ,\" kJ\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.4:pg-253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.4\n",
+ "\n",
+ " The decrease in the available energy is 281.816890623 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from scipy import integrate\n",
+ "Ts_ = 15 # Ambient temperature in degree Celsius\n",
+ "Tw1_ = 95 # Temperature of water sample 1 in degree Celsius\n",
+ "Tw2_ = 35# Temperature of water sample 2 in degree Celsius\n",
+ "m1 = 25 # Mass of water sample 1 in kg\n",
+ "m2 = 35 # Mass of water sample 2 in kg\n",
+ "cp = 4.2 # Specific heat capacity of water in kJ/kgK\n",
+ "print \"\\n Example 8.4\"\n",
+ "Ts = Ts_+273# Ambient temperature in K\n",
+ "Tw1 = Tw1_+273 # Temperature of water sample 1 in K\n",
+ "Tw2 = Tw2_+273# Temperature of water sample 2 in K\n",
+ "AE25,er = integrate.quad(lambda T:m1*cp*(1-(Ts/T)),Ts,Tw1)\n",
+ "AE35,er2 = integrate.quad(lambda T:m2*cp*(1-(Ts/T)),Ts,Tw2)\n",
+ "AEt = AE25 + AE35\n",
+ "Tm = (m1*Tw1+m2*Tw2)/(m1+m2) # Temperature after mixing\n",
+ "AE60,er3 = integrate.quad(lambda T:(m1+m2)*cp*(1-(Ts/T)),Ts,Tm)\n",
+ "AE = AEt - AE60\n",
+ "print \"\\n The decrease in the available energy is \",AE ,\" kJ\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.5:pg-254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.5\n",
+ "\n",
+ " The final RPM of the flywheel would be 222.168786807 RPM\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from scipy import integrate\n",
+ "N1 = 3000 # Speed of rotation of flywheel in RPM\n",
+ "I = 0.54 # Moment of inertia of flywheel in kgm**2\n",
+ "ti_ = 15 # Temperature of insulated system in degree Celsius \n",
+ "m = 2 # Water equivalent of shaft \n",
+ "print \"\\n Example 8.5\"\n",
+ "w1 = (2*math.pi*N1)/60 # Angular velocity of rotation in rad/s\n",
+ "Ei = 0.5*I*w1**2 # rotational kinetic energy\n",
+ "dt = Ei/(1000*2*4.187) # temperature change\n",
+ "ti = ti_+273# Temperature of insulated system in Kelvin\n",
+ "tf = ti+dt # final temperature\n",
+ "AE,er = integrate.quad(lambda T: m*4.187*(1-(ti/T)),ti,tf)\n",
+ "UE = Ei/1000 - AE # Unavailable enrgy\n",
+ "w2 = math.sqrt(AE*1000*2/I) # Angular speed in rad/s \n",
+ "N2 = (w2*60)/(2*math.pi) # Speed of rotation in RPM\n",
+ "print \"\\n The final RPM of the flywheel would be \",N2 ,\" RPM\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.6:pg-255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.6\n",
+ "\n",
+ " The maximum work is 122.957271378 kJ\n",
+ "\n",
+ " Change in availability is 82.4328713783 kJ\n",
+ "\n",
+ " Irreversibility is 15.2572713783 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from scipy import integrate\n",
+ "T1_ = 80.0 # Initial temperature of air in degree Celsius \n",
+ "T2_ = 5.0 # Final temperature of air in degree Celsius \n",
+ "V2 = 2.0 # Assumed final volume\n",
+ "V1 = 1.0 # Assumed initial volume\n",
+ "P0 = 100.0 # Final pressure of air in kPa\n",
+ "P1 = 500.0 # Initial pressure of air in kPa\n",
+ "R = 0.287 # Gas constant\n",
+ "cv = 0.718 # Specific heat capacity at constant volume for gas in kJ/kg K\n",
+ "m = 2.0 # Mass of gas in kg\n",
+ "print \"\\n Example 8.6\"\n",
+ "T1= T1_+273 # Initial temperature of air in K \n",
+ "T2 = T2_+273 # Final temperature of air in K \n",
+ "S= integrate.quad(lambda T:(m*cv)/T,T1,T2)[0] + integrate.quad(lambda V: (m*R)/V,V1,V2)[0] # Entropy change\n",
+ "U = m*cv*(T1-T2)# Change in internal energy\n",
+ "Wmax = U-(T2*(-S)) # Maximum possible work\n",
+ "V1_ = (m*R*T1)/P1 # volume calculation\n",
+ "CA = Wmax-P0*(V1_) # Change in availability\n",
+ "I = T2*S # Irreversibility\n",
+ "print \"\\n The maximum work is \",Wmax ,\" kJ\"\n",
+ "print \"\\n Change in availability is \",CA ,\" kJ\"\n",
+ "print \"\\n Irreversibility is \",I ,\" kJ\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.7:pg-256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.7\n",
+ "\n",
+ " The decrease in availability is 260.756521108 kJ/kg\n",
+ "\n",
+ " The maximum work is 260.756521108 kJ/kg\n",
+ "\n",
+ " The irreversibility is 49.6565211082 kJ/kg\n",
+ "\n",
+ " Alternatively, The irreversibility is 49.6565211082 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P1 = 500.0 # Initial pressure of steam in kPa\n",
+ "P2 = 100.0# Final pressure of steam in kPa\n",
+ "T1_ = 520.0 #Initial temperature of steam in degree Celsius\n",
+ "T2_ = 300.0 #Final temperature of steam in degree Celsius\n",
+ "cp = 1.005 # Specific heat capacity of steam in kJ/kgK\n",
+ "t0 = 20.0 # Atmospheric temperature in degree Celsius \n",
+ "R = 0.287 # Gas constant\n",
+ "Q = -10.0 # Heat loss to surrounding in kJ/kg\n",
+ "print \"\\n Example 8.7\"\n",
+ "T1 = T1_+273 #Initial temperature of steam in degree Celsius\n",
+ "T2 = T2_+273 #Final temperature of steam in degree Celsius\n",
+ "S21 = (R*math.log(P2/P1))-(cp*math.log(T2/T1))\n",
+ "T0 = t0+273\n",
+ "CA = cp*(T1-T2)-T0*S21 # Change in availability\n",
+ "Wmax = CA # Maximum possible work\n",
+ "W = cp*(T1-T2)+Q # net work\n",
+ "I = Wmax-W # Irreversibility\n",
+ "# Altenatively\n",
+ "Ssystem = -Q/T0\n",
+ "Ssurr = -S21\n",
+ "I1 = T0*(Ssystem+Ssurr)\n",
+ "print \"\\n The decrease in availability is \",CA ,\" kJ/kg\"\n",
+ "print \"\\n The maximum work is \",Wmax ,\" kJ/kg\"\n",
+ "print \"\\n The irreversibility is \",I ,\" kJ/kg\"\n",
+ "print \"\\n Alternatively, The irreversibility is \",I1 ,\" kJ/kg\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.8:pg-258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.8\n",
+ "\n",
+ " The initial and final availbility of the products are 85.9672398469 kJ/Kg and 39.6826771757 kJ/Kg respectively\n",
+ "\n",
+ " The irreversibility of the process is 319.369801955 kW\n",
+ "\n",
+ " Total power generated by the heat engine is 472.671938045 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T0 = 300.0 # Atmospheric temperature in K\n",
+ "Tg1_ = 300.0 # Higher temperature of combustion product in degree Celcius\n",
+ "Tg2_ = 200.0 # Lower temperature of combustion product in degree Celcius\n",
+ "Ta1 = 40.0 # Initial air temperature in K\n",
+ "cpg = 1.09 # Specific heat capacity of combustion gas in kJ/kgK\n",
+ "cpa = 1.005# Specific heat capacity of air in kJ/kgK\n",
+ "mg = 12.5 # mass flow rate of product in kg/s\n",
+ "ma = 11.15# mass flow rate of air in kg/s\n",
+ "\n",
+ "print \"\\n Example 8.8\"\n",
+ "Tg1 = Tg1_+273 # Higher temperature of combustion product in K\n",
+ "Tg2 = Tg2_+273 # Lower temperature of combustion product in K\n",
+ "f1 = cpg*(Tg1-T0)-T0*cpg*(math.log(Tg1/T0)) # Initial availability of product\n",
+ "f2 = cpg*(Tg2-T0)-T0*cpg*(math.log(Tg2/T0)) # Final availabilty of product\n",
+ "print \"\\n The initial and final availbility of the products are \",f1 ,\" kJ/Kg and \",f2 ,\" kJ/Kg respectively\"\n",
+ "#The answer provided in the textbook is wrong\n",
+ "\n",
+ "# Part (b)\n",
+ "Dfg = f1-f2 # Decrease in availability of products\n",
+ "Ta2 = (Ta1+273) + (mg/ma)*(cpg/cpa)*(Tg1-Tg2) # Exit temperature of air\n",
+ "Ifa = cpa*(Ta2-(Ta1+273))-T0*cpa*(math.log(Ta2/(Ta1+273))) # Increase in availability of air\n",
+ "I = mg*Dfg-ma*Ifa # Irreversibility \n",
+ "print \"\\n The irreversibility of the process is \",I ,\" kW\"\n",
+ "##The answer provided in the textbook contains round off error\n",
+ "\n",
+ "# Part (c)\n",
+ "Ta2_ = (Ta1+273)*(Tg1/Tg2)**((12.5*1.09)/(11.5*1.005))\n",
+ "Q1 = mg*cpg*(Tg1-Tg2) # Heat supply rate from gas to working fluid\n",
+ "Q2 = ma*cpa*(Ta2_-(Ta1+273))# Heat rejection rate from the working fluid in heat engine\n",
+ "W = Q1-Q2 # Power developed by heat engine\n",
+ "print \"\\n Total power generated by the heat engine is \",W ,\" kW\"\n",
+ "#The answer provided in the textbook contains round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.9:pg-260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.9\n",
+ "\n",
+ " The irreversibility rate is 15.8201795694 kW\n",
+ "\n",
+ " The irreversibility rate at lower temperature is 3.03317755354 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T2 = 790.0 # Final temperature of gas in degree Celsius\n",
+ "T1 = 800.0 # Initial temperature of gas in degree Celsius\n",
+ "m = 2.0 # Mass flow rate in kg/s\n",
+ "cp = 1.1 # Specific heat capacity in kJ/KgK\n",
+ "T0 = 300.0 # Ambient temperature in K\n",
+ "\n",
+ "print \"\\n Example 8.9\"\n",
+ "I = m*cp*(((T1+273)-(T2+273))-T0*(math.log((T1+273)/(T2+273)))) # irreversibility rate\n",
+ "print \"\\n The irreversibility rate is \",I ,\" kW\"\n",
+ "\n",
+ "# At lower temperature\n",
+ "T1_ = 80.0 # Initial temperature of gas in degree Celsius\n",
+ "T2_ = 70.0 # Initial temperature of gas in degree Celsius\n",
+ "I_ = m*cp*(((T1_+273)-(T2_+273))-T0*(math.log((T1_+273)/(T2_+273)))) # irreversibility rate\n",
+ "print \"\\n The irreversibility rate at lower temperature is \",I_ ,\" kW\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.10:pg-261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.10\n",
+ "\n",
+ " The rate of energy loss because of the pressure drop due to friction 25.83 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "m = 3 # Mass flow rate in kg/s\n",
+ "R = 0.287 # Gas constant\n",
+ "T0 = 300 # Ambient temperature in K\n",
+ "k = 0.10 # Fractional pressure drop\n",
+ "print \"\\n Example 8.10\"\n",
+ "Sgen = m*R*k # Entropy generation\n",
+ "I = Sgen*T0 # Irreversibility Calculation\n",
+ "print \"\\n The rate of energy loss because of the pressure drop due to friction \",I ,\" kW\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.11:pg-261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.11\n",
+ "\n",
+ " The rate of entropy generation is 0.0446035560498 kW/K\n",
+ "\n",
+ " The rate of energy loss due to mixing is 13.3810668149 kW\n",
+ "\n",
+ " The rate of energy loss due to mixing is 13.3810668149 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "m1 = 2.0 # Flow rate of water in kg/s\n",
+ "m2 = 1.0 # Flow rate of another stream in kg/s\n",
+ "T1 = 90.0 # Temperature of water in degree Celsius\n",
+ "T2 = 30.0# Temperature of another stream in degree Celsius\n",
+ "T0 =300.0 # Ambient temperature in K\n",
+ "cp = 4.187 # Specific heat capacity of water in kJ/kgK\n",
+ "\n",
+ "print \"\\n Example 8.11\"\n",
+ "m = m1+m2 # Net mass flow rate\n",
+ "x = m1/m # mass fraction\n",
+ "t = (T2+273)/(T1+273) # Temperature ratio\n",
+ "Sgen = m*cp*math.log((x+t*(1-x))/(t**(1-x))) # Entropy generation\n",
+ "I = T0*Sgen # Irreversibility production\n",
+ "# Alternatively\n",
+ "T = (m1*T1+m2*T2)/(m1+m2) # equilibrium temperature\n",
+ "Sgen1 = m1*cp*math.log((T+273)/(T1+273))+m2*cp*math.log((T+273)/(T2+273))# Entropy generation\n",
+ "I1 = T0*Sgen1 # Irreversibility production\n",
+ "print \"\\n The rate of entropy generation is \",Sgen ,\" kW/K\"\n",
+ "print \"\\n The rate of energy loss due to mixing is \",I ,\" kW\"\n",
+ "print \"\\n The rate of energy loss due to mixing is \",I1 ,\" kW\" # Calculation from alternative way\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.12:pg-262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.12\n",
+ " \n",
+ "\n",
+ " PART (A)\n",
+ "\n",
+ " The first law efficiency is 96.0 percent\n",
+ "\n",
+ " The second law efficiency is 79.0588235294 percent\n",
+ " \n",
+ "\n",
+ " PART (B)\n",
+ "\n",
+ " The first law efficiency is 90.0 percent\n",
+ "\n",
+ " The second law efficiency is 42.3529411765 percent\n",
+ " \n",
+ "\n",
+ " PART (C)\n",
+ "\n",
+ " The first law efficiency is 60.0 percent\n",
+ "\n",
+ " The second law efficiency is 4.41176470588 percent\n",
+ " \n",
+ "\n",
+ " PART (D)\n",
+ "\n",
+ " The First law efficiency for all the three cases would remain same and here is 90.0 percent\n",
+ "\n",
+ " The Second law efficiency of part (a) is 74.1176470588 percent\n",
+ "\n",
+ " The Second law efficiency of part (b) is 42.3529411765 percent\n",
+ "\n",
+ " The Second law efficiency of part (c) is 6.61764705882 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Qr = 500.0 # Heat release in kW\n",
+ "Tr = 2000.0 # Fuel burning temperature in K \n",
+ "T0 = 300.0 # Ambient temperature in K\n",
+ "# Part (a)\n",
+ "print \"\\n Example 8.12\"\n",
+ "Qa = 480.0 # Energy absorption by furnace in kW\n",
+ "Ta = 1000.0 # Furnace temperature in K \n",
+ "n1a = (Qa/Qr) # first law efficiency\n",
+ "n2a = n1a*(1.0-(T0/Ta))/(1.0-(T0/Tr)) #second law efficiency\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "print \" \\n\\n PART (A)\"\n",
+ "print \"\\n The first law efficiency is \",n1a*100 ,\" percent\" \n",
+ "print \"\\n The second law efficiency is \",n2a*100 ,\" percent\"\n",
+ "\n",
+ "# Part (b)\n",
+ "Qb = 450.0 # Energy absorption in steam generation in kW\n",
+ "Tb = 500.0# steam generation temperature in K \n",
+ "n1b = (Qb/Qr)# first law efficiency\n",
+ "n2b = n1b*(1.0-(T0/Tb))/(1.0-(T0/Tr))#second law efficiency\n",
+ "print \" \\n\\n PART (B)\"\n",
+ "print \"\\n The first law efficiency is \",n1b*100 ,\" percent\" \n",
+ "print \"\\n The second law efficiency is \",n2b*100 ,\" percent\"\n",
+ "# Part (c)\n",
+ "Qc = 300.0 # Energy absorption in chemical process in kW\n",
+ "Tc = 320.0 # chemical process temperature in K \n",
+ "n1c = (Qc/Qr) # first law efficiency\n",
+ "n2c = n1c*(1.0-(T0/Tc))/(1.0-(T0/Tr))#second law efficiency\n",
+ "print \" \\n\\n PART (C)\"\n",
+ "print \"\\n The first law efficiency is \",n1c*100 ,\" percent\"\n",
+ "print \"\\n The second law efficiency is \",n2c*100 ,\" percent\" \n",
+ "# Part (d)\n",
+ "Qd = 450.0 \n",
+ "n1d = (Qd/Qr)\n",
+ "n2a_= n1d*(1.0-(T0/Ta))/(1.0-(T0/Tr))\n",
+ "n2b_= n1d*(1.0-(T0/Tb))/(1.0-(T0/Tr))\n",
+ "n2c_= n1d*(1.0-(T0/Tc))/(1.0-(T0/Tr))\n",
+ "print \" \\n\\n PART (D)\"\n",
+ "print \"\\n The First law efficiency for all the three cases would remain same and here is \",n1d*100 ,\" percent\" #The answer provided in the textbook is wrong\n",
+ "\n",
+ "print \"\\n The Second law efficiency of part (a) is \",n2a_*100 ,\" percent\"\n",
+ "\n",
+ "print \"\\n The Second law efficiency of part (b) is \",n2b_*100 ,\" percent\"\n",
+ "\n",
+ "print \"\\n The Second law efficiency of part (c) is \",n2c_*100 ,\" percent\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.14:pg-265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.14\n",
+ "\n",
+ " The power input is -235.675 kW\n",
+ " \n",
+ " The second law efficiency of the compressor is 85.5494233193 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "cp = 1.005 # Specific heat capacity of air in kJ/kgK \n",
+ "T2 = 160.0 # Compressed air temperature in degree Celsius\n",
+ "T1 = 25.0 # Ambient temperature\n",
+ "T0 = 25.0 # Ambient temperature\n",
+ "R = 0.287 # Gas constant\n",
+ "P2 = 8.0 # Pressure ratio\n",
+ "P1 = 1.0 # Initial pressure of gas in bar\n",
+ "Q = -100.0 # Heat loss to surrounding in kW\n",
+ "m = 1.0 # Mass flow rate in kg/s\n",
+ "\n",
+ "print \"\\n Example 8.14\"\n",
+ "W = Q + m*cp*((T1+273)-(T2+273)) # power input\n",
+ "AF = cp*((T2+273)- (T1+273))-(T0+273)*((cp*math.log((T2+273)/(T1+273))-(R*math.log(P2/P1)))) # Availability\n",
+ "e = AF/-W # efficiency \n",
+ "print \"\\n The power input is \",W ,\" kW\"\n",
+ "print \" \\n The second law efficiency of the compressor is \",e*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.15:pg-265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.15\n",
+ "\n",
+ " The exergy of the complete vacuum is 100.0 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Since vacuum has zero mass\n",
+ "U = 0 # Initial internal energy in kJ/kg\n",
+ "H0 = 0 # Initial enthalpy in kJ/kg\n",
+ "S = 0 # Initial entropy in kJ/kgK\n",
+ "# If the vacuum has reduced to dead state\n",
+ "U0 = 0 # Final internal energy in kJ/kg\n",
+ "H0 = 0 # Final enthalpy in kJ/kg\n",
+ "S0 = 0 # Final entropy in kJ/kgK\n",
+ "V0 = 0 # Final volume in m**3\n",
+ "P0 = 1.0 # Pressure in bar\n",
+ "V = 1.0 # Volume of space in m**3\n",
+ "fi = P0*1e5*V\n",
+ "\n",
+ "print \"\\n Example 8.15\"\n",
+ "print \"\\n The exergy of the complete vacuum is \",fi/1e3 ,\" kJ\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.16:pg-266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.16\n",
+ "\n",
+ " Exergy produced is 34.6210270729 MJ or 9.61695196469 kWh\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "m = 1000.0 # Mass of fish in kg \n",
+ "T0 = 300.0 # Ambient temperature in K\n",
+ "P0 = 1.0 # Ambient pressure in bar\n",
+ "T1 = 300.0 # Initial temperature of fish in K\n",
+ "T2_ = -20.0 # Final temperature of fish in degree Celsius\n",
+ "Tf_ = -2.2 # Freezing point temperature of fish in degree Celsius\n",
+ "Cb = 1.7 # Specific heat of fish below freezing point in kJ/kg\n",
+ "Ca = 3.2 # Specific heat of fish above freezing point in kJ/kg\n",
+ "Lh = 235.0 # Latent heat of fusion of fish in kJ/kg \n",
+ "\n",
+ "print \"\\n Example 8.16\"\n",
+ "T2 = T2_+273 # Final temperature of fish in K\n",
+ "Tf = Tf_+273 # Freezing point temperature of fish in K\n",
+ "H12 = m*((Cb*(Tf-T2))+Lh+(Ca*(T1-Tf))) # Enthalpy change \n",
+ "H21 = -H12 # Enthalpy change \n",
+ "S12 = m*((Cb*math.log(Tf/T2))+(Lh/Tf)+(Ca*math.log(T1/Tf))) # Entropy change\n",
+ "S21 = -S12 # Entropy change\n",
+ "E = H21-T0*S21 #Exergy produced\n",
+ "print \"\\n Exergy produced is \",E/1e3 ,\" MJ or \",E/3600 ,\" kWh\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.17:pg-267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.17\n",
+ "\n",
+ " The irreversibility in case a is 110.031839359 kJ/kg\n",
+ "\n",
+ " The irreversibility in case b is 38.2318393592 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "cv = 0.718 # Specific heat capacity of air in kJ/kg\n",
+ "T2 = 500.0 # Final temperature of air in K\n",
+ "T1 = 300.0# Initial temperature of air in K\n",
+ "m = 1.0 # Mass of air in kg\n",
+ "T0 = 300.0 # Ambient temperature\n",
+ "# Case (a)\n",
+ "print \"\\n Example 8.17\"\n",
+ "Sua = cv*math.log(T2/T1) # Entropy change of universe\n",
+ "Ia = T0*Sua # irreversibility\n",
+ "print \"\\n The irreversibility in case a is \",Ia ,\" kJ/kg\"\n",
+ "\n",
+ "# Case (b)\n",
+ "Q = m*cv*(T2-T1) # Heat transfer\n",
+ "T = 600 # Temperature of thermal reservoir in K\n",
+ "Sub = Sua-(Q/T) # Entropy change of universe\n",
+ "Ib = T0*Sub # irreversibility\n",
+ "print \"\\n The irreversibility in case b is \",Ib ,\" kJ/kg\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.18:pg-268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.18\n",
+ "\n",
+ " Irreversibility per unit mass is 142.7096 kJ/kg\n",
+ "\n",
+ " The second law efficiency of the turbine is 78.0527289547 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h1 = 3230.9 # Enthalpy of steam at turbine inlet in kJ/kg\n",
+ "s1 = 6.69212# Entropy of steam at turbine inlet in kJ/kgK \n",
+ "V1 = 160.0 # Velocity of steam at turbine inlet in m/s\n",
+ "T1 = 400.0 # Temperature of steam at turbine inlet in degree Celsius\n",
+ "h2 = 2676.1 # Enthalpy of steam at turbine exit in kJ/kg\n",
+ "s2 = 7.3549 # Entropy of steam at turbine exit in kJ/kgK \n",
+ "V2 = 100.0 # Velocity of steam at turbine exit in m/s\n",
+ "T2 = 100.0 # Temperature of steam at turbine exit in degree Celsius\n",
+ "T0 = 298.0 # Ambient temperature in K\n",
+ "W = 540.0 # Work developed by turbine in kW\n",
+ "Tb = 500.0 # Average outer surface temperature of turbine in K\n",
+ "\n",
+ "print \"\\n Example 8.18\"\n",
+ "Q = (h1-h2)+((V1**2-V2**2)/2)*1e-03-W # Heat loss\n",
+ "I = 151.84-Q*(0.404) # Irreversibility \n",
+ "AF = W + Q*(1.0-(T0/Tb)) + I # Exergy transfer\n",
+ "n2 = W/AF # second law efficiency\n",
+ "\n",
+ "print \"\\n Irreversibility per unit mass is \",I ,\" kJ/kg\"\n",
+ "print \"\\n The second law efficiency of the turbine is \",n2*100 ,\" percent\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.19:pg-269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.19\n",
+ "\n",
+ " Case A:\n",
+ "\n",
+ " Rate of availability transfer with heat and the irreversibility rate are \n",
+ " 1.7 kW and -6.8 kW respectively.\n",
+ "\n",
+ " Case B:\n",
+ "\n",
+ " Rate of availability in case b is 3.4 kW \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T0 = 300.0 # Ambient temperature in K\n",
+ "T = 1500.0 # Resistor temperature in K\n",
+ "Q = -8.5 # Power supply in kW\n",
+ " \n",
+ "# Case (a)\n",
+ "W = -Q # work transfer\n",
+ "I = Q*(1.0-T0/T) + W # Irreversibility\n",
+ "R = Q*(1.0-T0/T) # availability\n",
+ "\n",
+ "print \"\\n Example 8.19\"\n",
+ "print \"\\n Case A:\"\n",
+ "print \"\\n Rate of availability transfer with heat and the irreversibility rate are \\n \",I ,\" kW and \",R ,\" kW respectively.\"\n",
+ "# Case (b)\n",
+ "T1 = 500.0 # Furnace wall temperature\n",
+ "Ib = - Q*(1.0-T0/T) + Q*(1.0-T0/T1) # Irreversibility\n",
+ "print \"\\n Case B:\"\n",
+ "print \"\\n Rate of availability in case b is \",Ib ,\" kW \"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.20:pg-270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 8.20\n",
+ "\n",
+ "\n",
+ " Part A:\n",
+ "\n",
+ " There is heat loss to surrounding.\n",
+ "\n",
+ "\n",
+ " Part B:\n",
+ "\n",
+ " The polytropic index is 1.0\n",
+ "\n",
+ "\n",
+ " Part C:\n",
+ "\n",
+ " Isothermal efficiency is 97.8793558312 percent \n",
+ "\n",
+ "\n",
+ " Part D:\n",
+ "\n",
+ " The minimum work input is -6.44697949667 kJ/kg, and irreversibility is 108.941520503 kJ/kg\n",
+ "\n",
+ "\n",
+ " Part E:\n",
+ "\n",
+ " Second law efficiency is 6.0 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "p1 = 1 # Air pressure at compressure inlet in bar\n",
+ "t1 = 30 # Air temperature at compressure inlet in degree Celsius\n",
+ "p2 = 3.5 # Air pressure at compressure exit in bar\n",
+ "t2 = 141 # Air temperature at compressure exit in degree Celsius\n",
+ "v = 90 # Air velocity at compressure exit in m/s\n",
+ "cp = 1.0035 # Specific heat capacity of air in kJ/kg\n",
+ "y = 1.4 # Heat capacity ratio\n",
+ "R = 0.287 # Gas constant\n",
+ "print \"\\n Example 8.20\\n\"\n",
+ "T2s = (t1+273)*(p2/p1)**((y-1)/y)\n",
+ "if T2s>(t2+273): \n",
+ " print \"\\n Part A:\"\n",
+ " print \"\\n There is heat loss to surrounding.\"\n",
+ "n =(1/(1-((math.log((t2+273)/(t1+273)))/(math.log(p2/p1)))))\n",
+ "print \"\\n\\n Part B:\"\n",
+ "print \"\\n The polytropic index is \",n\n",
+ "Wa = cp*(t1-t2)-(v**2)/2000 # Actual work \n",
+ "Wt = -R*(t1+273)*math.log(p2/p1) - (v**2)/2000 # Isothermal work\n",
+ "nt =Wt/Wa # Isothermal efficency\n",
+ "print \"\\n\\n Part C:\"\n",
+ "print \"\\n Isothermal efficiency is \",nt*100 ,\" percent \"\n",
+ "df = cp*(t1-t2) + (t1+273)*(R*math.log(p2/p1) - cp*math.log((t2+273)/(t1+273))) -(v**2)/2000\n",
+ "Wm = df # Minimum work input\n",
+ "I = Wm-Wa # Irreversibility\n",
+ "\n",
+ "print \"\\n\\n Part D:\"\n",
+ "print \"\\n The minimum work input is \",Wm,\" kJ/kg, and irreversibility is \",I ,\" kJ/kg\"\n",
+ "# The answers given in the book contain round off error\n",
+ "\n",
+ "neta = Wm/Wa\n",
+ "print \"\\n\\n Part E:\"\n",
+ "print \"\\n Second law efficiency is \",math. ceil(neta*100) ,\" percent\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter9_2XNkqrL.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter9_2XNkqrL.ipynb
new file mode 100644
index 00000000..ceef1a80
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter9_2XNkqrL.ipynb
@@ -0,0 +1,925 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 09:Properties of pure substances"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.1:pg-302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.1\n",
+ "\n",
+ " At 1 MPa, \n",
+ " saturation temperature is 179.91 degree celcius\n",
+ "\n",
+ " Changes in specific volume is 0.193313 m**3/kg\n",
+ "\n",
+ " Change in entropy during evaporation is 4.4478 kJ/kg K\n",
+ "\n",
+ " The latent heat of vaporization is 2015.3 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# At 1 MPa\n",
+ "tsat = 179.91 # Saturation temperature in degree Celsius\n",
+ "vf = 0.001127 # Specific volume of fluid in m**3/kg\n",
+ "vg = 0.19444 # Specific volume of gas in m**3/kg \n",
+ "sf = 2.1387 # Specific entropy of fluid in kJ/kgK\n",
+ "sg = 6.5865# Specific entropy of gas in kJ/kgK\n",
+ "print \"\\n Example 9.1\"\n",
+ "vfg = vg-vf # Change in specific volume due to evaporation\n",
+ "sfg = sg-sf# Change in specific entropy due to evaporation\n",
+ "hfg = 2015.3\n",
+ "print \"\\n At 1 MPa, \\n saturation temperature is \",tsat ,\" degree celcius\"\n",
+ "print \"\\n Changes in specific volume is \",vfg ,\" m**3/kg\"\n",
+ "print \"\\n Change in entropy during evaporation is \",sfg ,\" kJ/kg K\"\n",
+ "print \"\\n The latent heat of vaporization is \",hfg ,\" kJ/kg\"\n",
+ "# Data is given in the table A.1(b) in Appendix in the book\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.2:pg-302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.2\n",
+ "\n",
+ " pressure = 0.6 Mpa\n",
+ " Temperature = 158.85 degree centigrade\n",
+ " Specific volume = 0.3156 m**3/kg\n",
+ " enthalpy = 2756.8 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given that\n",
+ "s = 6.76 # Entropy of saturated steam in kJ/kgK\n",
+ "print \"\\n Example 9.2\"\n",
+ "# From the table A.1(b) given in the book at s= 6.76 kJ/kgK\n",
+ "p = 0.6\n",
+ "t=158.85\n",
+ "v_g=0.3156\n",
+ "h_g=2756.8\n",
+ "print \"\\n pressure = \",p ,\" Mpa\\n Temperature = \",t ,\" degree centigrade\\n Specific volume = \",v_g ,\" m**3/kg\\n enthalpy = \",h_g ,\" kJ/kg\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.3:pg-302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.3\n",
+ "\n",
+ " The enthalpy and entropy of the system are\n",
+ " 2614.55463998 kW and 5.96006442363 kJ/kg and kJ/kg K respectively.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "v = 0.09 # Specific volume of substance at a point in m**3/kg\n",
+ "vf = 0.001177 # Specific volume of fluid in m**3/kg\n",
+ "vg = 0.09963 # Specific volume of gas in m**3/kg\n",
+ "hf = 908.79 # Specific enthalpy of fluid in kJ/kg\n",
+ "hfg = 1890.7 # Latent heat of substance in kJ/kg\n",
+ "sf = 2.4474 # Specific entropy of fluid in kJ/kgK\n",
+ "sfg = 3.8935 # Entropy change due to vaporization\n",
+ "\n",
+ "print \"\\n Example 9.3\"\n",
+ "x = (v-vf)/(vg-vf) # steam quality\n",
+ "h = hf+(x*hfg) # Specific enthalpy of substance at a point in kJ/kg\n",
+ "s = sf+(x*sfg) # Specific entropy of substance at a point in kJ/kgK\n",
+ "\n",
+ "print \"\\n The enthalpy and entropy of the system are\\n \",h ,\" kW and \",s ,\" kJ/kg and kJ/kg K respectively.\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.5:pg-303"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.5\n",
+ "\n",
+ " The pressure is 3.973 MPa\n",
+ "\n",
+ " The total mass of mixture is 9.57329343706 kg\n",
+ "\n",
+ " Specific volume is 0.00417829039327 m3/kg\n",
+ "\n",
+ " Enthalpy is is 1188.13405609 kJ/kg\n",
+ "\n",
+ " The entropy is 2.9891336667 kJ/kg K\n",
+ "\n",
+ " The internal energy is 1171.53370836 kJ/kg\n",
+ "\n",
+ " At 250 degree Celsius, internal energy is 1171.53445483 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Psat = 3.973 # Saturation pressure in MPa\n",
+ "vf = 0.0012512 # specific volume of fluid in m**3/kg\n",
+ "vg = 0.05013 # Specific volume of gas in m**3/kg\n",
+ "hf = 1085.36 # Specific enthalpy of fluid in kJ/kg\n",
+ "hfg = 1716.2 # Latent heat of vaporization in kJ/kg\n",
+ "sf = 2.7927 # Specific entropy of fluid in kJ/kgK\n",
+ "sfg = 3.2802 # Entropy change due to vaporization in kJ/kgK\n",
+ "mf = 9.0 # Mass of liquid in kg\n",
+ "V = 0.04 # Volume of vessel in m**3\n",
+ "# at T = 250\n",
+ "uf = 1080.39 #Specific internal energy in kJ/kg \n",
+ "ufg = 1522.0# Change in internal energy due to vaporization in kJ/kg\n",
+ "\n",
+ "print \"\\n Example 9.5\"\n",
+ "Vf = mf*vf # volume of fluid\n",
+ "Vg = V-Vf # volume of gas\n",
+ "mg = Vg/vg # mass of gas\n",
+ "m = mf+mg # mass if mixture\n",
+ "x = mg/m # quality of steam\n",
+ "v = vf+x*(vg-vf) # specific volume of mixture\n",
+ "h = hf+x*hfg # enthalpy of mixture\n",
+ "s = sf+(x*sfg) # entropy of mixture\n",
+ "u = h-Psat*1e6*v*1e-03 # Internal energy of mixture\n",
+ "u_ = uf+x*ufg # Internal energy at 250 degree Celsius\n",
+ "print \"\\n The pressure is \",Psat ,\" MPa\"\n",
+ "print \"\\n The total mass of mixture is \",m ,\" kg\"\n",
+ "print \"\\n Specific volume is \",v ,\" m3/kg\"\n",
+ "print \"\\n Enthalpy is is \",h ,\" kJ/kg\"\n",
+ "print \"\\n The entropy is \",s ,\" kJ/kg K\"\n",
+ "print \"\\n The internal energy is \",u ,\" kJ/kg\"\n",
+ "print \"\\n At 250 degree Celsius, internal energy is \",u_ ,\"kJ/kg\" #The answer provided in the textbook is wrong\n",
+ "\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.7:pg-305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.7\n",
+ "\n",
+ " The ideal work output of the turbine is 882.40804932 kJ/Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# At T = 40 degree\n",
+ "Psat = 7.384 # Saturation pressure in kPa\n",
+ "sf = 0.5725 # Entropy of fluid in kJ/kgK\n",
+ "sfg = 7.6845 # Entropy change due to vaporization in kJ/kgK\n",
+ "hf = 167.57 # Enthalpy of fluid in kJ/kg\n",
+ "hfg = 2406.7 # Latent heat of vaporization in kJ/kg\n",
+ "s1 = 6.9189 # Entropy at turbine inlet in kJ/kgK\n",
+ "h1 = 3037.6 # Enthalpy at turbine inlet in kJ/kg\n",
+ "print \"\\n Example 9.7\"\n",
+ "x2 = (s1-sf)/sfg # Steam quality\n",
+ "h2 = hf+(x2*hfg) # Enthalpy at turbine exit\n",
+ "W = h1-h2 # Net work done\n",
+ "print \"\\n The ideal work output of the turbine is \",W ,\" kJ/Kg\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.9:pg-308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.9\n",
+ "\n",
+ " The quality of steam in pipe line is 0.96097673702\n",
+ "\n",
+ " Maximum moisture content that can be determined is 5.47886817645 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "h2 = 2716.2 # Enthalpy at turbine inlet in kJ/kg\n",
+ "hf = 844.89 # Enthalpy of fluid in kJ/kg\n",
+ "hfg = 1947.3 # Latent heat of vaporization in kJ/kg\n",
+ "h3 = 2685.5 # Enthalpy at turbine exit in kJ/kg\n",
+ "print \"\\n Example 9.9\"\n",
+ "x1 = (h2-hf)/hfg\n",
+ "x4 = (h3-hf)/hfg\n",
+ "print \"\\n The quality of steam in pipe line is \",x1 #The answers vary due to round off error\n",
+ "print \"\\n Maximum moisture content that can be determined is \",100-(x4*100) ,\" percent\"#The answer provided in the textbook is wrong\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.10:pg-309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.10\n",
+ "\n",
+ " The quality of the steam in the pipe line is 0.909544295341\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# At 0.1Mpa, 110 degree\n",
+ "h2 = 2696.2 # Enthalpy at turbine inlet in kJ/kg\n",
+ "hf = 844.89 # Enthalpy of fluid in kJ/kg\n",
+ "hfg = 1947.3 # Latent heat of vaporization in kJ/kg\n",
+ "vf = 0.001023 # at T = 70 degree\n",
+ "V = 0.000150 # In m3\n",
+ "m2 = 3.24 # mass of condensed steam in kg\n",
+ "\n",
+ "print \"\\n Example 9.10\"\n",
+ "x2 = (h2-hf)/hfg # Quality of steam at turbine inlet\n",
+ "m1 = V/vf # mass of moisture collected in separator\n",
+ "x1 = (x2*m2)/(m1+m2) # quality of the steam\n",
+ "print \"\\n The quality of the steam in the pipe line is \",x1 \n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.11:pg-310"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.11\n",
+ "\n",
+ " The heat transfer during the process is 1788.19203218 MJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# P = 1MPa\n",
+ "vf = 0.001127 # specific volume of fluid in m**3/kg\n",
+ "vg = 0.1944# specific volume of gas in m**3/kg\n",
+ "hg = 2778.1 # specific enthalpy of gas in kJ/kg\n",
+ "uf = 761.68 # Specific internal energy of fluid in kJ/kg\n",
+ "ug = 2583.6 # Specific internal energy of gas in kJ/kg\n",
+ "ufg = 1822 # Change in specific internal energy due to phase change in kJ/kg \n",
+ "# Initial anf final mass\n",
+ "Vif = 5 # Initial volume of water in m**3 \n",
+ "Viw = 5# Initial volume of gas in m**3 \n",
+ "Vff = 6 # Final volume of gas in m**3 \n",
+ "Vfw = 4 # Final volume of water in m**3 \n",
+ "\n",
+ "\n",
+ "print \"\\n Example 9.11\"\n",
+ "ms = ((Viw/vf)+(Vif/vg)) - ((Vfw/vf)+(Vff/vg)) \n",
+ "U1 = ((Viw*uf/vf)+(Vif*ug/vg))\n",
+ "Uf = ((Vfw*uf/vf)+(Vff*ug/vg))\n",
+ "Q = Uf-U1+(ms*hg)\n",
+ "print \"\\n The heat transfer during the process is \",Q/1e3 ,\" MJ\"\n",
+ "#The answer provided in the textbook is wrong\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.12:pg-311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.12\n",
+ "\n",
+ " The value of n is 1.23844995978\n",
+ "\n",
+ " The work done by the steam is 4.72026539673 kJ \n",
+ "\n",
+ " The heat transfer is -1.80091923775 kJ \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "m = 0.02 # Mass of steam in Kg\n",
+ "d = 280 # diameter of piston in mm\n",
+ "l = 305 # Stroke length in mm\n",
+ "P1 = 0.6 # Initial pressure in MPa\n",
+ "P2 = 0.12 # Final pressure in MPa\n",
+ "# At 0.6MPa, t = 200 degree\n",
+ "v1 = 0.352 # Specific volume in m**3/kg\n",
+ "h1 = 2850.1 # Specific enthalpy in kJ/kg\n",
+ "vf = 0.0010476 # specific volume of fluid in m**3/kg\n",
+ "vfg = 1.4271 # Specific volume change due to vaporization in m**3/kg\n",
+ "uf = 439.3 # specific enthalpy of fluid\n",
+ "ug = 2512.0 # Specific enthalpy of gas\n",
+ "print \"\\n Example 9.12\"\n",
+ "V1 = m*v1 # total volume at point 1\n",
+ "Vd = (math.pi/4)*(d*1e-3)**2*l*1e-3 # displaced volume\n",
+ "V2 = V1+Vd # Total volume at point 2\n",
+ "n = math.log(P1/P2)/math.log(V2/V1) # polytropic index\n",
+ "W12 = ((P1*V1)-(P2*V2))*1e6/(n-1) # work done\n",
+ "print \"\\n The value of n is \",n\n",
+ "print \"\\n The work done by the steam is \",W12/1e3 ,\"kJ \"\n",
+ "#The answers vary due to round off error\n",
+ "v2 = V2/m # specific volume\n",
+ "x2 = (v2-vf)/vfg # Steam quality\n",
+ "# At 0.12MPa\n",
+ "u2 = uf + (x2*(ug-uf)) # Internal energy \n",
+ "u1 = h1-(P1*1e6*v1*1e-03) # Internal energy\n",
+ "Q12 = m*(u2-u1)+ (W12/1e3) # Heat transfer\n",
+ "print \"\\n The heat transfer is \",Q12 ,\"kJ \"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.13:pg-312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.13\n",
+ "\n",
+ " Final pressure is 3.5 bar\n",
+ "\n",
+ " Steam quality is 0.87 \n",
+ " Entropy change during the process is 0.4227 kJ/K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "x1 = 1 # Steam quality in first vessel\n",
+ "x2 = 0.8 # Steam quality in second vessel\n",
+ "# at 0.2MPa\n",
+ "vg = 0.8857 # Specific volume of gas in m**3/kg\n",
+ "h1 = 2706.7 # Enthalpy in first vessel in kJ/kg\n",
+ "v1 = vg # Specific volume of gas in first vessel in m**3/kg\n",
+ "hg = h1 # Enthalpy in first vessel 1 in kJ/kg\n",
+ "m1 = 5 # mass in first vessel in kg\n",
+ "V1 = m1*v1 # Volume of first vessel in m**3\n",
+ "# at 0.5MPa\n",
+ "m2 = 10 # mass in second vessel in kg\n",
+ "hf = 640.23 # Enthalpy in second vessel in kJ/kg\n",
+ "hfg = 2108.5 # Latent heat of vaporization in kJ/kg\n",
+ "vf = 0.001093 # Specific volume of fluid in second vessel in m**3/kg\n",
+ "vfg = 0.3749 # Change in specific volume in second vessel due to evaporation of gas in m**3/kg\n",
+ "v2 = vf+(x2*vfg) # Specific volume of gas in second vessel\n",
+ "V2 = m2*v2 # Volume of second vessel in m**3\n",
+ "#\n",
+ "Vm = V1+V2 # Total volume \n",
+ "m = m1+m2 # Total mass\n",
+ "vm = Vm/m # net specific volume\n",
+ "u1 = h1 # Internal energy\n",
+ "h2 = hf+(x2*hfg) # Enthalpy calculation\n",
+ "u2 = h2 # Internal energy calculation\n",
+ "m3 = m # Net mass calculation\n",
+ "h3 = ((m1*u1)+(m2*u2))/m3 # Resultant enthalpy calculation\n",
+ "u3 = h3 # Resultant internal energy calculation\n",
+ "v3 = vm # resultant specific volume calculation\n",
+ "# From Mollier diagram\n",
+ "x3 = 0.870 # Steam quality \n",
+ "p3 = 3.5 # Pressure in MPa\n",
+ "s3 = 6.29 # Entropy at state 3 in kJ/kgK\n",
+ "s1 = 7.1271 # Entropy at state 1 in kJ/kgK\n",
+ "sf = 1.8607 # Entropy in liquid state in kJ/kgK\n",
+ "sfg = 4.9606 # Entropy change due to vaporization in kJ/kgK\n",
+ "s2 = sf+(x2*sfg) # Entropy calculation\n",
+ "E = m3*s3-((m1*s1)+(m2*s2)) # Entropy change during process\n",
+ "\n",
+ "print \"\\n Example 9.13\"\n",
+ "print \"\\n Final pressure is \",p3 ,\" bar\"\n",
+ "print \"\\n Steam quality is \",x3 ,\n",
+ "print \"\\n Entropy change during the process is \",E ,\" kJ/K\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.14:pg-314"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.14\n",
+ "\n",
+ " The availability of the steam before the throttle valve 1263.6894 kJ/kg\n",
+ "\n",
+ " The availability of the steam after the throttle valve 1237.5538 kJ/kg\n",
+ "\n",
+ " The availability of the steam at the turbine exhaust 601.851036792 kJ/kg\n",
+ "\n",
+ " The specific work output from the turbine is 546.253422512 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# At 6 MPa, 400 degree\n",
+ "h1 = 3177.2 # Enthalpy in kJ/kg\n",
+ "s1 = 6.5408 #Entropy in kJ/kgK\n",
+ "# At 20 degree\n",
+ "h0= 83.96 # Enthalpy in kJ/kg \n",
+ "s0 = 0.2966#Entropy in kJ/kgK\n",
+ "T0 = 20 # Surrounding temperature in degree Celsius \n",
+ "f1 = (h1-h0)-(T0+273)*(s1-s0) # Availability before throttling\n",
+ "# By interpolation at P= 5MPa, h= 3177.2\n",
+ "s2 = 6.63 #Entropy in kJ/kgK\n",
+ "h2 = h1 # Throttling\n",
+ "f2 = (h2-h0)-(T0+273)*(s2-s0) # Availability after throttling\n",
+ "df = f1-f2 # Change in availability\n",
+ "x3s = (s2-1.5301)/(7.1271-1.5301) #Entropy at state 3 in kJ/kgK\n",
+ "h3s = 504.7+(x3s*2201.9) #Enthalpy at state 3 in kJ/kg\n",
+ "eis = 0.82 # isentropic efficiency\n",
+ "h3 = h2-eis*(h1-h3s) # Enthalpy at state 3 in kJ/kgK\n",
+ "x3 = (h3-504.7)/2201.7 # Steam quality at state 3\n",
+ "s3 = 1.5301+(x3*5.597) # Entropy at state 3\n",
+ "f3 = (h3-h0)-(T0+273)*(s3-s0) # Availability at state 3\n",
+ "\n",
+ "print \"\\n Example 9.14\"\n",
+ "print \"\\n The availability of the steam before the throttle valve \",f1 ,\" kJ/kg\"\n",
+ "print \"\\n The availability of the steam after the throttle valve \",f2 ,\" kJ/kg\"\n",
+ "print \"\\n The availability of the steam at the turbine exhaust \",f3 ,\" kJ/kg\"\n",
+ "print \"\\n The specific work output from the turbine is \",h2-h3 ,\" kJ/kg\"\n",
+ "#The answers vary due to round off error\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.15:pg-316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.15\n",
+ "\n",
+ " Availability of steam entering is 1057.4864 kJ/kg\n",
+ "\n",
+ " Availability of steam leaving the turbine is 656.7062 kJ/kg\n",
+ "\n",
+ " Maximum work is 741.14568 kJ/kg\n",
+ "\n",
+ " Irreversibility is 21.36505104 kJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# At 25 bar, 350 degree\n",
+ "h1 = 3125.87 # Enthalpy in kJ/kg\n",
+ "s1 = 6.8481# Entropy in kJ/kgK\n",
+ "# 30 degree\n",
+ "h0 = 125.79 # Enthalpy in kJ/kg\n",
+ "s0 = 0.4369# Entropy in kJ/kgK\n",
+ "# At 3 bar, 200 degree\n",
+ "h2 = 2865.5 # Enthalpy in kJ/kg\n",
+ "s2 = 7.3115 #Entropy in kJ/kgK\n",
+ "# At 0.2 bar 0.95 dry\n",
+ "hf = 251.4 # Enthalpy of liquid in kJ/kg\n",
+ "hfg = 2358.3 # Latent heat of vaporization in kJ/kg\n",
+ "sf = 0.8320 # Entropy of liquid in kJ/kgK\n",
+ "sg = 7.0765# Entropy of liquid in kJ/kgK\n",
+ "h3 = hf+0.92*hfg # Enthalpy at state 3 in kJ/kg\n",
+ "s3 = sf+(0.92*sg) # Entropy at state 3 in kJ/kgK\n",
+ "# Part (a)\n",
+ "T0 = 30 # Atmospheric temperature in degree Celsius\n",
+ "f1 = (h1-h0)-((T0+273)*(s1-s0)) # Availability at steam entering turbine\n",
+ "f2 = (h2-h0)-((T0+273)*(s2-s0)) # Availability at state 2\n",
+ "f3 = (h3-h0)-((T0+273)*(s3-s0))# Availability at state 3\n",
+ "\n",
+ "print \"\\n Example 9.15\"\n",
+ "print \"\\n Availability of steam entering is \",f1 ,\" kJ/kg\"\n",
+ "print \"\\n Availability of steam leaving the turbine is \",f2 ,\" kJ/kg\"\n",
+ "\n",
+ "# Part (b)\n",
+ "m2m1 = 0.25 # mass ratio\n",
+ "m3m1 = 0.75 # mass ratio\n",
+ "Wrev = f1-(m2m1*f2)-(m3m1*f3) # Maximum work\n",
+ "print \"\\n Maximum work is \",Wrev ,\" kJ/kg\"\n",
+ "\n",
+ "# Part (c)\n",
+ "w1 = 600 # mass flow at inlet of turbine in kg/h\n",
+ "w2 = 150 # mass flow at state 2 in turbine in kg/h\n",
+ "w3 = 450# mass flow at state 2 in turbine in kg/h\n",
+ "Q = -10 # Heat loss rate kJ/s\n",
+ "I = ((T0+273)*(w2*s2+w3*s3-w1*s1)-Q*3600)*103/600\n",
+ "print \"\\n Irreversibility is \",I/1e3 ,\" kJ/kg\"\n",
+ "#The answer provided in the textbook is wrong\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.16:pg-317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.16\n",
+ "\n",
+ " Energy of system in Part (a) is 73.2 kJ\n",
+ "\n",
+ " Energy of system in Part (b) is 197.3474 kJ\n",
+ "\n",
+ " Energy of system in Part (c) is 498.2624 kJ\n",
+ "\n",
+ " Energy of system in Part (d) is 121.8 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# At dead state of 1 bar, 300K\n",
+ "u0 = 113.1 # Internal energy in kJ/kg\n",
+ "h0 = 113.2 # Enthalpy in kJ/kg\n",
+ "v0 = 0.001005 # Specific volume in m**3/kg\n",
+ "s0 = 0.395 # Entropy in kJ/kg\n",
+ "T0 = 300 # Atmospheric temperature in K\n",
+ "P0 = 1 # Atmospheric pressure in bar \n",
+ "K = h0-T0*s0\n",
+ "# Part (a)\n",
+ "# At 1bar and 90 degree Celsius \n",
+ "u = 376.9 # Internal energy in kJ/kg\n",
+ "h = 377 # Enthalpy in kJ/kg\n",
+ "v = 0.001035 # specific volume in m**3/kg\n",
+ "s = 1.193 # Entropy in kJ/kgK\n",
+ "m = 3 # Mass of water in kg\n",
+ "fi = m*(h-(T0*s)-K) #Energy of system\n",
+ "\n",
+ "print \"\\n Example 9.16\"\n",
+ "print \"\\n Energy of system in Part (a) is \",fi ,\" kJ\"\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "# Part (b)\n",
+ "# At P = 4 Mpa, t = 500 degree\n",
+ "u = 3099.8# Internal energy in kJ/kg \n",
+ "h = 3446.3 # Enthalpy in kJ/kg \n",
+ "v = 0.08637 # specific volume in m**3/kg \n",
+ "s = 7.090 # Entropy in kJ/kgK\n",
+ "m = 0.2 # Mass of steam in kg \n",
+ "fib = m*(u+P0*100*v-T0*s-K) # Energy of system\n",
+ "print \"\\n Energy of system in Part (b) is \",fib ,\" kJ\"\n",
+ "\n",
+ "# Part (c) # P = 0.1 bar\n",
+ "m = 0.4 # Mass of wet steam in kg \n",
+ "x = 0.85 # Quality\n",
+ "u = 192+x*2245 # Internal energy \n",
+ "h = 192+x*2392# Enthalpy\n",
+ "s = 0.649+x*7.499 # Entropy\n",
+ "v = 0.001010+x*14.67 # specific volume\n",
+ "fic = m*(u+P0*100*v-T0*s-K) # Energy of system\n",
+ "print \"\\n Energy of system in Part (c) is \",fic ,\" kJ\"\n",
+ "\n",
+ "# Part (d) \n",
+ "# P = 1 Bar, t = -10 degree Celsius\n",
+ "m = 3 # Mass of ice in kg \n",
+ "h = -354.1 # Enthalpy in kJ/kg \n",
+ "s = -1.298 # at 1000kPa, -10 degree\n",
+ "fid = m*((h-h0)-T0*(s-s0)) # Energy of system\n",
+ "\n",
+ "print \"\\n Energy of system in Part (d) is \",fid ,\" kJ\" #The answer provided in the textbook is wrong\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.17:pg-318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.17\n",
+ "\n",
+ " In parallel flow\n",
+ "\n",
+ " The rate of irreversibility is 10.98 kW\n",
+ "\n",
+ " The Second law efficiency is 24.275862069 percent\n",
+ "\n",
+ "\n",
+ " In counter flow\n",
+ "\n",
+ " The rate of irreversibility is 10.9454545455 kW\n",
+ "\n",
+ " The Second law efficiency is 32.1594684385 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "# Given\n",
+ "th1 = 90.0 # Inlet temperature of hot water in degree Celsius\n",
+ "tc1 = 25.0# Inlet temperature of cold water in degree Celsius\n",
+ "tc2 = 50.0# Exit temperature of cold water in degree Celsius\n",
+ "mc = 1.0 # mass flow rate of cold water in kg/s\n",
+ "T0 = 300.0 # Atmospheric temperature in K\n",
+ "th2p = 60.0 # Temperature limit in degree Celsius for parallel flow\n",
+ "th2c = 35.0 # Temperature limit in degree Celsius for counter flow\n",
+ "mhp = (tc2-tc1)/(th1-th2p) # mass flow rate of hot water in kg/s for parallel flow\n",
+ "mhc = (tc2-tc1)/(th1-th2c) # mass flow rate of hot water in kg/s for counter flow\n",
+ "# At 300 K\n",
+ "h0 = 113.2 # ENthalpy in kJ/kg\n",
+ "s0 = 0.395 # ENtropy in kJ/kgK\n",
+ "T0 = 300.0 # temperature in K\n",
+ "# At 90 degree celsius\n",
+ "h1 = 376.92 # Enthalpy in kJ/kg \n",
+ "s1 = 1.1925 # Entropy in kJ/kgK\n",
+ "af1 = mhp*((h1-h0)-T0*(s1-s0)) # Availability\n",
+ "# Parallel Flow\n",
+ "# At 60 degree\n",
+ "h2 = 251.13 # Enthalpy in kJ/kg \n",
+ "s2 =0.8312 # Entropy in kJ/kgK\n",
+ " # At 25 degree\n",
+ "h3 = 104.89 # Enthalpy in kJ/kg \n",
+ "s3 = 0.3674 # Entropy in kJ/kgK\n",
+ "# At 50 degree\n",
+ "h4 = 209.33 # Enthalpy in kJ/kg \n",
+ "s4 = 0.7038 # Entropy in kJ/kgK\n",
+ "REG = mc*((h4-h3)-T0*(s4-s3)) # Rate of energy gain\n",
+ "REL = mhp*((h1-h2)-T0*(s1-s2)) # Rate of energy loss\n",
+ "Ia = REL-REG # Energy destruction\n",
+ "n2a = REG/REL # Second law efficiency\n",
+ "\n",
+ "print \"\\n Example 9.17\"\n",
+ "print \"\\n In parallel flow\"\n",
+ "print \"\\n The rate of irreversibility is \",Ia ,\" kW\"\n",
+ "print \"\\n The Second law efficiency is \",n2a*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n",
+ "\n",
+ "\n",
+ "# Counter flow\n",
+ "h2_ = 146.68 \n",
+ "sp = 0.5053 # At 35 degree\n",
+ "REG_b = REG # Rate of energy gain by hot water is same in both flows\n",
+ "REL_b = mhc*((h1-h2_)-T0*(s1-sp))\n",
+ "Ib = mhc*((h1-h2_)-(T0*(s1-sp))) # Energy destruction\n",
+ "n2b = REG_b/Ib # Second law efficiency\n",
+ "print \"\\n\\n In counter flow\"\n",
+ "print \"\\n The rate of irreversibility is \",Ib ,\" kW\"\n",
+ "print \"\\n The Second law efficiency is \",n2b*100 ,\" percent\"\n",
+ "#The answers vary due to round off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.18:pg-320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Example 9.18\n",
+ "\n",
+ " The maximum cooling rate is 106.207042424 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "m = 50.0# mass flow rate in kg/h\n",
+ "Th = 23.0 # Home temperature in degree Celsius\n",
+ "# State 1\n",
+ "T1 = 150.0 # Saturated vapor temperature in degree Celsius\n",
+ "h1 = 2746.4 # Saturated vapor enthalpy in kJ/kg\n",
+ "s1 = 6.8387 #Saturated vapor entropy in kJ/kgK\n",
+ "# State 2\n",
+ "h2 = 419.0 # Saturated liquid enthalpy in kJ/kg\n",
+ "s2 = 1.3071 #Saturated liquid entropy in kJ/kg \n",
+ "T0 = 45.0 # Atmospheric temperature in degree Celsius\n",
+ "#\n",
+ "b1 = h1-((T0+273)*s1) # Availability at point 1\n",
+ "b2 = h2-((T0+273)*s2) # Availability at point 2\n",
+ "Q_max = m*(b1-b2)/((T0+273)/(Th+273)-1) # maximum cooling rate\n",
+ "\n",
+ "print \"\\n Example 9.18\"\n",
+ "print \"\\n The maximum cooling rate is \",Q_max/3600 ,\" kW\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/16.11_EVddapc.png b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/16.11_EVddapc.png
new file mode 100644
index 00000000..b39edce8
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/16.11_EVddapc.png
Binary files differ
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/3.3_hWZB9rU.png b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/3.3_hWZB9rU.png
new file mode 100644
index 00000000..d085b2d3
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/3.3_hWZB9rU.png
Binary files differ
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/7.10_IDdNUer.png b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/7.10_IDdNUer.png
new file mode 100644
index 00000000..070bbe5c
--- /dev/null
+++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/screenshots/7.10_IDdNUer.png
Binary files differ
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter11_0YOsUSl.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter11_0YOsUSl.ipynb
new file mode 100644
index 00000000..3d00cee8
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter11_0YOsUSl.ipynb
@@ -0,0 +1,259 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: Measurement of Voltages and Currents"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.1, Page 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "t=0.02 #time period in seconds from diagram\n",
+ "v1=7 #peak voltage from diagram\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "f=1*t**-1 #frequency in Hz\n",
+ "v2=2*v1 # Peak to Peak Voltage\n",
+ "\n",
+ "#Result\n",
+ "print'Frequency = %d Hz\\n'%f\n",
+ "print'Peak to Peak Voltage = %d V\\n'%v2\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.2, Page 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "t=0.05 #time period in seconds from diagram\n",
+ "v1=10 #peak voltage from diagram\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "f1=1*t**-1 #frequency in Hz\n",
+ "w1=2*math.pi*f1 #Angular velocity\n",
+ "\n",
+ "#Result\n",
+ "print'%d sin %.1ft Hz\\n'%(v1,w1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.3, Page 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "phi = -90 degree\n",
+ "10 sin 63t-90 Hz\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "t=0.1 #time period in seconds from diagram\n",
+ "v1=10 #peak voltage from diagram\n",
+ "t1=25*10**-3\n",
+ "\n",
+ "#Calculation\n",
+ "f1=1*t**-1 #frequency in Hz\n",
+ "w1=2*math.pi*f1 #Angular velocity\n",
+ "phi=-(t1*t**-1)*360 #phase angle\n",
+ "\n",
+ "#Result\n",
+ "print'phi = %d degree'%phi\n",
+ "print'%d sin %dt%d Hz\\n'%(v1,round(w1),phi)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.4, Page 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(1) P = 2.5 W\n",
+ "\n",
+ "(2) Pav = 2.5 W\n",
+ "\n",
+ "(3) Pav = 1.25 W\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "v1=5 #constant 5V\n",
+ "r=10 #resistance in Ohm\n",
+ "vrms=5 #sine wave of 5 V r.m.s\n",
+ "vp=5 #5 V peak\n",
+ "\n",
+ "#Calculation\n",
+ "p=(v1**2)*r**-1 #Power in watts\n",
+ "p2=(vrms**2)*r**-1 #Power avarage in watts\n",
+ "a=(vp*math.sqrt(2)**-1)**2\n",
+ "p3=a*r**-1 #Power avarage in watts \n",
+ "\n",
+ "#Result\n",
+ "print'(1) P = %.1f W\\n'%p\n",
+ "print'(2) Pav = %.1f W\\n'%p2\n",
+ "print'(3) Pav = %.2f W\\n'%p3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.5, Page 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Therefore, Resistor = 510 mOhm\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "fsd1=50*10**-3 #full scale defelction of ammeter in Ampere\n",
+ "fsd2=1*10**-3 #full scale defelction of moving coil meter in Ampere\n",
+ "Rm=25 #resistance of moving coil meter in Ohms\n",
+ "\n",
+ "#Calculation\n",
+ "Rsm=fsd1*fsd2**-1 #sensitivity factor\n",
+ "Rsh=Rm*49**-1 #shunt resistor\n",
+ "\n",
+ "#Result\n",
+ "print'Therefore, Resistor = %d mOhm\\n'%round(Rsh*10**3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.6, Page 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rse = 49.975 KOhm\n",
+ "\n",
+ "Therefore, Resistor ~ 50 KOhm\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "fsd1=50 #full scale defelction of voltmeter in Volts\n",
+ "fsd2=1*10**-3 #full scale defelction of moving coil meter in Ampere\n",
+ "Rm=25 #resistance of moving coil meter in Ohms\n",
+ "\n",
+ "#Calculation\n",
+ "Rsm=fsd1*fsd2**-1\n",
+ "Rse=Rsm-Rm\n",
+ "\n",
+ "#Result\n",
+ "print'Rse = %.3f KOhm\\n'%(Rse*10**-3)\n",
+ "print'Therefore, Resistor ~ %d KOhm\\n'%round(Rse*10**-3)"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter12_hzQe7ah.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter12_hzQe7ah.ipynb
new file mode 100644
index 00000000..f7a25ebf
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter12_hzQe7ah.ipynb
@@ -0,0 +1,312 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12: Resistance and DC Circuits"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.1, Page 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Magnitude, I4 = -3 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "i1=8 #current in Amp\n",
+ "i2=1 #current in Amp\n",
+ "i3=4 #current in Amp\n",
+ "\n",
+ "#Calculation\n",
+ "i4=i2+i3-i1 #current in Amp\n",
+ "\n",
+ "#Results\n",
+ "print'Magnitude, I4 = %d A'%i4"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.2, Page 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "e=12 #EMF source in volt\n",
+ "v1=3 #node voltage\n",
+ "v3=3 #node voltage\n",
+ "\n",
+ "#Calculation\n",
+ "v2=v1+v3-e #node voltage\n",
+ "\n",
+ "#Results\n",
+ "print'V2 = %d V'%v2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.4, Page 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voc = 10 V\n",
+ "R = 100 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#We have used method II for solving our problem by using simultaneous equations\n",
+ "\n",
+ "a = np.array([[25,-2],[400,-8]]) \n",
+ "b = np.array([[50],[3200]])\n",
+ "c=np.linalg.solve(a,b)\n",
+ "\n",
+ "print'Voc = %d V'%c[0]\n",
+ "print'R = %d ohm'%c[1]\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.5, Page 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voltage, V = 7.14\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "r1=100 #Resistance in Ohm\n",
+ "r2=200 #Resistance in Ohm\n",
+ "r3=50 #Resistance in Ohm\n",
+ "v1=15 #voltage source\n",
+ "v2=20 #voltage source\n",
+ "\n",
+ "#Calculation\n",
+ "#Considering 15 V as a source & replace the other voltage source by its internal resistance,\n",
+ "r11=(r2*r3)*(r2+r3)**-1 #resistance in parallel\n",
+ "v11=v1*(r11/(r1+r11)) #voltage\n",
+ "#Considering 20 V as a source & replace the other voltage source by its internal resistance,\n",
+ "r22=(r1*r3)*(r1+r3)**-1 #resistance in parallel\n",
+ "v22=v2*(r22/(r2+r22)) #voltage\n",
+ "\n",
+ "#output of the original circuit\n",
+ "v33=v11+v22\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print'Voltage, V = %.2f'%v33"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.6, Page 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output Current, I = 1.67 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "r1=10 #Resistance in Ohm\n",
+ "r2=5 #Resistance in Ohm\n",
+ "v2=5 #voltage source\n",
+ "i=2 #current in Amp\n",
+ "\n",
+ "#Calculation\n",
+ "#Considering 5 V as a source & replace the current source by its internal resistance,\n",
+ "i1=v2*(r1+r2)**-1 #current using Ohms law\n",
+ "#Considering current source & replace the voltage source by its internal resistance,\n",
+ "r3=(r1*r2)*(r1+r2)**-1 #resistance in parallel\n",
+ "v3=i*r3 #voltage using Ohms law\n",
+ "i2=v3*r2**-1 #current using Ohms law\n",
+ "i3=i1+i2 #total current\n",
+ "\n",
+ "#Results\n",
+ "print'Output Current, I = %.2f A'%i3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.8, Page 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "V2 = 33.04 V\n",
+ "V3 = 43.15 V\n",
+ "Current, I1 = 1.73 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "r=25 #resistance in ohm\n",
+ "\n",
+ "#We have used for solving our problem by using simultaneous equations\n",
+ "\n",
+ "a = np.array([[(-13*60**-1),(1*20**-1)],[(1*60**-1),(-9*100**-1)]]) \n",
+ "b = np.array([[-5],[-100*30**-1]])\n",
+ "c=np.linalg.solve(a,b)\n",
+ "i1=c[1]/r #required current\n",
+ "\n",
+ "print'V2 = %.2f V'%c[0] #wrong answer in textbook\n",
+ "print'V3 = %.2f V'%c[1] #wrong answer in textbook\n",
+ "print'Current, I1 = %.2f A'%i1\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.9, Page 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I1 = 326 mA\n",
+ "I2 = 33 mA\n",
+ "I3 = 53 mA\n",
+ "Voltage, Ve = 0.197 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "re=10 #resistance in ohm\n",
+ "\n",
+ "#We have used for solving our problem by using simultaneous equations\n",
+ "\n",
+ "a = np.array([[(-160),(20), (30)],[(20),(-210), (10)], [(30),(10), (-190)]]) \n",
+ "b = np.array([[-50],[0],[0]])\n",
+ "c=np.linalg.solve(a,b)\n",
+ "ve=re*(c[2]-c[1])\n",
+ "\n",
+ "print'I1 = %d mA'%(c[0]*10**3) #current I1\n",
+ "print'I2 = %d mA'%(c[1]*10**3) #current I2\n",
+ "print'I3 = %d mA'%(c[2]*10**3) #current I3\n",
+ "print'Voltage, Ve = %.3f V'%ve\n",
+ " "
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter13_DuT5TXy.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter13_DuT5TXy.ipynb
new file mode 100644
index 00000000..3a22e611
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter13_DuT5TXy.ipynb
@@ -0,0 +1,281 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13: Capacitance and Electric Fields"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.1, Page 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Charge, q = 100.0 uC\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "c=10*10**-6 #capacitance in Farad\n",
+ "v=10 #voltage\n",
+ "\n",
+ "#Calculation\n",
+ "q=c*v #charge in coulomb\n",
+ "\n",
+ "#Results\n",
+ "print'Charge, q = %.1f uC'%(q*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.2, Page 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Capacitance, C = 31.6 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialization\n",
+ "l=25*10**-3 #length in meter\n",
+ "b=10*10**-3 #breadth in meter\n",
+ "d=7*10**-6 #distance between plates in meter\n",
+ "e=100 #dielectric constant of material\n",
+ "e0=8.85*10**-12 #dielectric constant of air \n",
+ "\n",
+ "#Calculation\n",
+ "c=(e0*e*l*b)*d**-1 #Capacitance\n",
+ "#Results\n",
+ "print'Capacitance, C = %.1f nF'%(c*10**9)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.3, Page 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Electric Field Strength, E = 10 ^7 V/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "v=100 #voltage\n",
+ "d=10**-5 #distance in meter\n",
+ "\n",
+ "#Calculation\n",
+ "e=v*d**-1 #Electric Field Strength\n",
+ "\n",
+ "#Results\n",
+ "print'Electric Field Strength, E = %d ^7 V/m'%round(e*10**-6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.4, Page 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "D = 75 mC/m^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "q=15*10**-6 #charge in coulomb\n",
+ "a=200*10**-6 #area\n",
+ "\n",
+ "#Calculation\n",
+ "d=q/a #electric flux density\n",
+ "\n",
+ "#Results\n",
+ "print'D = %d mC/m^2'%(d*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.5, Page 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "C = 35 uF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "C1=10*10**-6 #capacitance in Farad\n",
+ "C2=25*10**-6 #capacitance in Farad\n",
+ "\n",
+ "#Calculation\n",
+ "C=C1+C2 #capacitance in Farad\n",
+ "\n",
+ "#Results\n",
+ "print'C = %d uF'%(C*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.6, Page 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "C = 7.14 uF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "C1=10*10**-6 #capacitance in Farad\n",
+ "C2=25*10**-6 #capacitance in Farad\n",
+ "\n",
+ "#Calculation\n",
+ "C=(C1*C2)/(C1+C2) #capacitance in Farad\n",
+ "\n",
+ "#Results\n",
+ "print'C = %.2f uF'%(C*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.7, Page 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "E = 50.0 mJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "C1=10*10**-6 #capacitance in Farad\n",
+ "V=100 #voltage\n",
+ "\n",
+ "#Calculation\n",
+ "E=(0.5)*(C1*V**2) #Energy stored\n",
+ "\n",
+ "#Results\n",
+ "print'E = %.1f mJ'%(E*10**3)"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter14_3UXi8E3.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter14_3UXi8E3.ipynb
new file mode 100644
index 00000000..d2cdeaa9
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter14_3UXi8E3.ipynb
@@ -0,0 +1,261 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: Inductance and Magnetic Fields"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.1, Page 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Magnetic Field Strength, H = 7.96 A/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "i=5 #current in ampere\n",
+ "l=0.628 #circumference\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "h=i/l #magnetic field strength\n",
+ "\n",
+ "#Results\n",
+ "print'Magnetic Field Strength, H = %.2f A/m'%h"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.2, Page 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) Magnetomotive Force, H = 3000.00 ampere-turns\n",
+ "(b) Magnetic Field Strength, H = 7500.00 A/m\n",
+ "(c) B = 9.42 mT\n",
+ "(d) Toal Flux, phi = 2.83 uWb\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "i=6 #current in ampere\n",
+ "n=500 #turns\n",
+ "l=0.4 #circumference\n",
+ "uo=4*math.pi*10**-7 #epsilon zero constant\n",
+ "a=300*10**-6 #area\n",
+ "\n",
+ "#Calculation\n",
+ "f=n*i #Magnetomotive Force\n",
+ "h=f/l #magnetic field strength\n",
+ "b=uo*h #magnetic induction\n",
+ "phi=b*a #flux\n",
+ "\n",
+ "#Results\n",
+ "print'(a) Magnetomotive Force, H = %.2f ampere-turns'%f\n",
+ "print'(b) Magnetic Field Strength, H = %.2f A/m'%h\n",
+ "print'(c) B = %.2f mT'%(b*10**3)\n",
+ "print'(d) Toal Flux, phi = %.2f uWb'%(phi*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.3, Page 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voltage, V = 30 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "l=10*10**-3 #inductance in henry\n",
+ "di=3\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "v=l*di #voltage \n",
+ "\n",
+ "#Results\n",
+ "print'Voltage, V = %d mV'%(v*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.4, Page 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Inductance,L = 30 uH\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "n=400 #turns\n",
+ "l=200*10**-3 #circumference\n",
+ "uo=4*math.pi*10**-7 #epsilon zero constant\n",
+ "a=30*10**-6 #area\n",
+ "\n",
+ "#Calculation\n",
+ "L=(uo*a*n**2)/l #Inductance in henry \n",
+ "\n",
+ "#Results\n",
+ "print'Inductance,L = %d uH'%(L*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.5, Page 289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) Inductance in series,L = 30 uH\n",
+ "(b) Inductance in parallel,L = 6.67 uH\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "l1=10 #Inductance in henry \n",
+ "l2=20 #Inductance in henry \n",
+ "\n",
+ "#Calculation\n",
+ "ls=l1+l2 #Inductance in henry \n",
+ "lp=((l1*l2)*(l1+l2)**-1) #Inductance in henry \n",
+ "#Results\n",
+ "print'(a) Inductance in series,L = %d uH'%ls\n",
+ "print'(b) Inductance in parallel,L = %.2f uH'%lp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.6, Page 293"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stored Energy = 125 mJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "l=10**-2 #Inductance in henry \n",
+ "i=5 #current in ampere \n",
+ "\n",
+ "#Calculation\n",
+ "s=0.5*l*i**2 #stored energy\n",
+ "\n",
+ "#Results\n",
+ "print'Stored Energy = %d mJ'%(s*10**3)\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter15_YmFtkbT.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter15_YmFtkbT.ipynb
new file mode 100644
index 00000000..c2fedc94
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter15_YmFtkbT.ipynb
@@ -0,0 +1,371 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 15: Alternating Voltages and Currents"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.1, Page 305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Reactance, Xl = 1 Ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "w=1000 #Angular Frequency \n",
+ "L=10**-3 #Inductance\n",
+ "\n",
+ "#Calculation\n",
+ "Xl=w*L #Reactance\n",
+ "\n",
+ "#Result\n",
+ "print'Reactance, Xl = %d Ohm'%Xl"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.2, Page 305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Reactance, Xl = 1.59 KOhm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "f=50 #frequency\n",
+ "C=2*10**-6 #Capacitance\n",
+ "\n",
+ "#Calculation\n",
+ "w=2*math.pi*f #Angular Frequency \n",
+ "Xc=1/(w*C) #Reactance\n",
+ "\n",
+ "#Result\n",
+ "print'Reactance, Xl = %.2f KOhm'%(Xc/1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.3, Page 306"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Peak Current, IL = 318 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "f=100 #frequency\n",
+ "l=25*10**-3 #Inductance\n",
+ "Vl=5 #AC Voltage (Sine)\n",
+ "\n",
+ "#Calculation\n",
+ "w=2*math.pi*f #Angular Frequency \n",
+ "Xl=w*l #Reactance\n",
+ "Il=Vl*Xl**-1\n",
+ "\n",
+ "#Result\n",
+ "print'Peak Current, IL = %d mA'%(Il*10**3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.4, Page 306"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voltage appear across the capacitor, V = 8 V r.m.s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "Ic=2 #sinusoidal Current\n",
+ "C=10*10**-3 #Capacitance\n",
+ "w=25 #Angular Frequency \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation \n",
+ "Xc=1/(w*C) #Reactance\n",
+ "Vc= Ic*Xc #Voltage\n",
+ "\n",
+ "#Result\n",
+ "print'Voltage appear across the capacitor, V = %d V r.m.s'%(Vc)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.5, Page 309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) V = 63.6 V\n",
+ "(b) V = 38.15 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "I=5 #sinusoidal Current\n",
+ "R=10 #Resistance in Ohm\n",
+ "f=50 #Frequency in Hertz\n",
+ "L=0.025 #Inductancec in Henry\n",
+ " \n",
+ "\n",
+ "#Calculation \n",
+ "Vr=I*R #Voltage across resistor\n",
+ "Xl=2*math.pi*f*L #Reactance\n",
+ "VL= I*Xl #Voltage across inductor\n",
+ "V=math.sqrt((Vr**2)+(VL**2)) #total voltage\n",
+ "phi=math.atan(VL*Vr**-1) #Phase Angle in radians\n",
+ "\n",
+ "#Result\n",
+ "print'(a) V = %.1f V'%(V)\n",
+ "print'(b) V = %.2f V'%(phi*180/math.pi) #phase angle in degree"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.6, Page 311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) Current, I = 884 uA\n",
+ "(b) V = -27.95 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "R=10**4 #Resistance in Ohm\n",
+ "f=10**3 #Frequency in Hertz\n",
+ "C=3*10**-8 #Capacitance in Farad\n",
+ "V=10 #Voltage\n",
+ "\n",
+ "#Calculation \n",
+ "Xc=1/(2*math.pi*f*C) #Reactance\n",
+ "a=((10**4)**2)+(5.3*10**3)**2\n",
+ "I=math.sqrt((V**2)/a) #Current in Amp\n",
+ "Vr=I*R #Voltage\n",
+ "Vc=Xc*I #Voltage\n",
+ "phi=math.atan(Vc/Vr) #Phase Angle in radians\n",
+ "\n",
+ "#Result\n",
+ "print'(a) Current, I = %d uA'%round(I*10**6)\n",
+ "print'(b) V = %.2f V'%(-phi*180/math.pi) #phase angle in degree"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.7, Page 317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Z = 200 + j 62 Ohms\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "I=5 #sinusoidal Current\n",
+ "R=200 #Resistance in Ohm\n",
+ "f=50 #Frequency in Hertz\n",
+ "L=400*10**-3 #Inductancec in Henry\n",
+ "C=50*10**-6 #Capacitance in Henry \n",
+ "\n",
+ "#Calculation \n",
+ "Vr=I*R #Voltage across resistor\n",
+ "Xl=2*math.pi*f*L #Reactance\n",
+ "Xc=1/(2*math.pi*f*C) #Reactance\n",
+ "i=Xl-Xc\n",
+ "\n",
+ "#Result\n",
+ "print'Z = %d + j %d Ohms'%(R,i)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.8, Page 320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "vo = 12.4 < 29.7\n",
+ "Therefore\n",
+ "vo = 12.4 sin(500 t + 29.7)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from numpy import ones\n",
+ "\n",
+ "#Initialisation\n",
+ "R1=5 #Resistance in Ohm\n",
+ "R2=50 #Resistance in Ohm\n",
+ "w=500 #rad/s\n",
+ "L=50*10**-3 #Inductancec in Henry\n",
+ "C=200*10**-6 #Capacitance in Henry \n",
+ "v=10\n",
+ "\n",
+ "#Calculation\n",
+ "Xc=1/(w*C) #Reactance\n",
+ "Z1=complex(R1,-Xc) #taking in complex form\n",
+ "a=(R2*w**2*L**2)/(R2**2+(w**2*L**2))\n",
+ "b=(R2**2*w*L)/(R2**2+(w**2*L**2))\n",
+ "Z2=complex(a,b) #taking in complex form\n",
+ "Z3=(Z1+Z2)\n",
+ "Z=Z2/Z3\n",
+ "r=math.sqrt((Z.real)**2 + (Z.imag)**2) #converting in polar (absolute)\n",
+ "r1=v*r \n",
+ "phi=math.atan(Z.imag/Z.real) #converting in polar (phase)\n",
+ "\n",
+ "#Result\n",
+ "print'vo = %.1f < %.1f'%(r1,(phi*180/math.pi))\n",
+ "print'Therefore'\n",
+ "print'vo = %.1f sin(%d t + %.1f)'%(r1,w,(phi*180/math.pi))"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter16_NzhdF5v.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter16_NzhdF5v.ipynb
new file mode 100644
index 00000000..add268a5
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter16_NzhdF5v.ipynb
@@ -0,0 +1,207 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16: Power in AC Circuits"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.1, Page 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) Apparent power, S = 250 VA\n",
+ "(b) Power Factor = 0.866\n",
+ "(c) Active Power, P = 216.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "V=50 #Voltage\n",
+ "I=5 #Current in Ampere r.m.s\n",
+ "phase=30 #in degrees\n",
+ "\n",
+ "#Calculation \n",
+ "S=V*I #apparent power\n",
+ "pf=math.cos(phase*math.pi/180) #power factor\n",
+ "apf=S*pf #active power\n",
+ "\n",
+ "#Result\n",
+ "print'(a) Apparent power, S = %d VA'%S\n",
+ "print'(b) Power Factor = %.3f'%pf\n",
+ "print'(c) Active Power, P = %.1f'%apf"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.2, Page 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Apparent Power, P = 2000 W\n",
+ " Active Power, P = 1500 W\n",
+ " Reactive Power, Q = 1322 var\n",
+ " Current I = 8.33 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "pf=0.75 #power factor\n",
+ "S=2000 #apparent power in VA\n",
+ "V=240 #Voltage in volts\n",
+ "\n",
+ "#Calculation \n",
+ "apf=S*pf #active power\n",
+ "sin=math.sqrt(1-(pf**2)) \n",
+ "Q=S*sin #Reactive Power\n",
+ "I=S*V**-1 #Current\n",
+ "#Result\n",
+ "print' Apparent Power, P = %d W'%S\n",
+ "print' Active Power, P = %d W'%apf\n",
+ "print' Reactive Power, Q = %d var'%Q\n",
+ "print' Current I = %.2f A'%I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.3, Page 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Apparent Power, S = 1500 W\n",
+ " Active Power, P = 1500 W\n",
+ " Reactive Power, Q = 1322 var\n",
+ " Current I = 6.25 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "pf=0.75 #power factor\n",
+ "S=1500 #apparent power in W\n",
+ "V=240 #Voltage in volts\n",
+ "P1 = 2000 #apparent power\n",
+ "P2 = 1500 #active power\n",
+ "Q = 1322 #reactive power\n",
+ "I = 8.33 #current in amp\n",
+ "f=50 #frequency in hertz\n",
+ "\n",
+ "#Calculation \n",
+ "Xc=V**2/Q #reactive capacitance\n",
+ "C=1/(Xc*2*math.pi*f) #capacitance\n",
+ "I=S*V**-1 #current\n",
+ "\n",
+ "#Result\n",
+ "print' Apparent Power, S = %d W'%S\n",
+ "print' Active Power, P = %d W'%apf\n",
+ "print' Reactive Power, Q = %d var'%Q\n",
+ "print' Current I = %.2f A'%I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.4, Page 335"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Zl = (50+20j)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Initialisation\n",
+ "Zo=complex(50,-20) #complex form of output impedance\n",
+ "\n",
+ "#Calculation \n",
+ "Zl=np.conjugate(Zo) #complex form of Load impedance\n",
+ "\n",
+ "#Result\n",
+ "print'Zl = %s'%Zl"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter18_gAN9M3I.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter18_gAN9M3I.ipynb
new file mode 100644
index 00000000..dd2859cb
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter18_gAN9M3I.ipynb
@@ -0,0 +1,151 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 18: Transient Behaviour"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.1, Page 376"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "v = 18.36 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "c=100*10**-6 #capacitance in farad\n",
+ "r=100*10**3 #resistance in ohm\n",
+ "v=20 #volt\n",
+ "t=25 #time in seconds\n",
+ "e=2.71828 #mathematical constant\n",
+ "\n",
+ "#Calculation\n",
+ "T=c*r #time in seconds\n",
+ "v1=v*(1-e**(-t*T**-1)) #volt\n",
+ "\n",
+ "#Result\n",
+ "print'v = %.2f V'%v1\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.2, Page 378"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "t = 10.2 mSec\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "l=400*10**-3 #inductance in henry\n",
+ "i1=300 #current in milliamp\n",
+ "r=20 #resistance in ohm\n",
+ "v=15 #volt\n",
+ "t=25 #time in seconds\n",
+ "e=2.71828 #mathematical constant\n",
+ "\n",
+ "#Calculation\n",
+ "T=l/r #time in seconds\n",
+ "i=(v*r**-1)*10**3 #current in amp\n",
+ "t=((math.log(i/(i-i1)))/(math.log(e)))*0.02 #expression to find time t\n",
+ "\n",
+ "#Result\n",
+ "print't = %.1f mSec'%(t*10**3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.3, Page 382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "v = 10 - 5 e^( -t/0.2 ) V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "c=20*10**-6 #capacitance in farad\n",
+ "r=10*10**3 #resistance in ohm\n",
+ "v=5 #volt\n",
+ "v2=10 #volt\n",
+ "\n",
+ "#Calculation\n",
+ "T=c*r #time in seconds\n",
+ "\n",
+ "#Result\n",
+ "print'v = %d - %d e^( -t/%.1f ) V'%(v2,v,T)"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter19_d2Dk0b0.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter19_d2Dk0b0.ipynb
new file mode 100644
index 00000000..9da9c4ac
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter19_d2Dk0b0.ipynb
@@ -0,0 +1,107 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 19: Semiconductor Diodes"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19.1, Page 392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Peak Ripple Voltage = 0.4 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Introduction\n",
+ "i=0.2 #current in amp\n",
+ "C=0.01 #Capacitance in farad\n",
+ "t=20*10**-3 #time in sec\n",
+ "\n",
+ "#Calculation\n",
+ "dv=i/C #change in voltage w.r.t time\n",
+ "v=dv*t #peak ripple voltage\n",
+ "\n",
+ "#Result\n",
+ "print'Peak Ripple Voltage = %.1f V'%v\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19.2, Page 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Peak Ripple Voltage = 0.2 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Introduction\n",
+ "i=0.2 #current in amp\n",
+ "C=0.01 #Capacitance in farad\n",
+ "t=10*10**-3 #time in sec\n",
+ "\n",
+ "#Calculation\n",
+ "dv=i/C #change in voltage w.r.t time\n",
+ "v=dv*t #peak ripple voltage\n",
+ "\n",
+ "#Result\n",
+ "print'Peak Ripple Voltage = %.1f V'%v\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter20_oPoeIwV.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter20_oPoeIwV.ipynb
new file mode 100644
index 00000000..3578e65d
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter20_oPoeIwV.ipynb
@@ -0,0 +1,112 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 20: Field-effect Transistors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 20.1, Page"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Small signal voltage gain = -4 \n",
+ "Low frequency cut off = 0.16 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Introduction\n",
+ "gm=2*10**-3\n",
+ "rd=2*10**3 #resistance in ohm\n",
+ "C=10**-6 #capacitance in farad\n",
+ "R=10**6 #resistance in ohm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "G=-gm*rd #Small signal voltage gain\n",
+ "fc=1/(2*math.pi*C*R) #frequency in Hz\n",
+ "\n",
+ "#Result\n",
+ "print'Small signal voltage gain = %d '%G\n",
+ "print'Low frequency cut off = %.2f Hz'%fc"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 20.2, Page"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rd = 0.67 kOhm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Introduction\n",
+ "idd=4*10**-3 #current in ampere\n",
+ "vo=8 #voltage\n",
+ "vdd=12 #voltage\n",
+ "\n",
+ "#Calculation\n",
+ "Rd=vo*(vdd-idd)**-1\n",
+ "\n",
+ "#Result\n",
+ "print'Rd = %.2f kOhm'%Rd #wrong answer in textbook"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter21_g3i9pmI.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter21_g3i9pmI.ipynb
new file mode 100644
index 00000000..88157a22
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter21_g3i9pmI.ipynb
@@ -0,0 +1,232 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 21: Bipolar Transistors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.1, Page 445"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output Current, I = 2.04 mA\n",
+ "Output Voltage, V = 4.5 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "vcc=10 #voltage\n",
+ "vbe=0.7 #voltage, base-to-emitter junction\n",
+ "rb=910*10**3 #resistance in ohm\n",
+ "hfe=200\n",
+ "rc=2.7*10**3 #resistance in ohm\n",
+ "\n",
+ "#Calculation\n",
+ "ib=(vcc-vbe)/rb #base current in ampere\n",
+ "ic=hfe*ib #collector in current in ampere\n",
+ "vo=vcc-(ic*rc) #output voltage\n",
+ "\n",
+ "#Result\n",
+ "print'Output Current, I = %.2f mA'%(ic*10**3)\n",
+ "print'Output Voltage, V = %.1f V'%vo"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.2, Page 445"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Quiescent Output Voltage, V = 5.6 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "vcc=10 #voltage\n",
+ "r2=10*10**3 #resistance in ohm\n",
+ "r1=27*10**3 #resistance in ohm\n",
+ "vbe=0.7 #voltage, base-to-emitter junction\n",
+ "re=10**3 #resistance in ohm\n",
+ "rc=2.2*10**3 #resistance in ohm\n",
+ "\n",
+ "#Calculation\n",
+ "vb=vcc*(r2*(r1+r2)**-1) # base voltage\n",
+ "ve=vb-vbe #emitter voltage\n",
+ "ie=ve/re #emitter current\n",
+ "ic=ie #collector current\n",
+ "vo=vcc-(ic*rc) #output voltage\n",
+ "\n",
+ "#Result\n",
+ "print'Quiescent Output Voltage, V = %.1f V'%vo\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.3, Page 448"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voltage Gain = -2.2 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "re=10**3 #resistance in ohm\n",
+ "rc=2.2*10**3 #resistance in ohm\n",
+ "\n",
+ "#Calculation\n",
+ "gain=-rc/re #voltage gain\n",
+ "\n",
+ "#Result\n",
+ "print'Voltage Gain = %.1f mA'%gain\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.4, Page 451"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voltage Gain = 64 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "r1=15*10**3 #resistance in ohm\n",
+ "r2=47*10**3 #resistance in ohm\n",
+ "C=220*10**-9 #capacitance in farad\n",
+ "\n",
+ "#Calculation\n",
+ "ri=(r1*r2)/(r1+r2) #resistance in paraller\n",
+ "fco=1/(2*math.pi*C*ri) #frequency in Hz\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print'Voltage Gain = %d Hz'%round(fco)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.5, Page 453"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Quiescent Output Voltage, V = 2.0 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "vcc=10 #voltage\n",
+ "r2=10*10**3 #resistance in ohm\n",
+ "r1=27*10**3 #resistance in ohm\n",
+ "vbe=0.7 #voltage, base-to-emitter junction\n",
+ "re=10**3 #resistance in ohm\n",
+ "rc=2.2*10**3 #resistance in ohm\n",
+ "\n",
+ "#Calculation\n",
+ "vb=vcc*(r2*(r1+r2)**-1) # base voltage\n",
+ "ve=vb-vbe #emitter voltage\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print'Quiescent Output Voltage, V = %.1f V'%ve\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "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.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter22_kZ51MuY.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter22_kZ51MuY.ipynb
new file mode 100644
index 00000000..af329a31
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter22_kZ51MuY.ipynb
@@ -0,0 +1,114 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 22: Power Electronics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22.1, Page 475"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Output Voltage, V = 12.0 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "vz=4.7 #voltage\n",
+ "r3=1.222*10**3 #resistance in ohm\n",
+ "r4=10**3 #resistance in ohm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "Vo=(vz+0.7)*((r3+r4)*r4**-1) #output voltage\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print' Output Voltage, V = %.1f V'%Vo\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22.2, Page 476"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Power delivered to the load, P = 5 W\n",
+ "Power dissipated in the output transistor, P = 10 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "vo=10 #voltage\n",
+ "rl=5 #resistance in ohm\n",
+ "vi=15 #voltage\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "io=vo*rl**-1 #current in ampere\n",
+ "po=vo*io**-1 #power delivered to the load in watt\n",
+ "pt=(vi-vo)*io #power dissipated in the output transistor in watt\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print'Power delivered to the load, P = %d W'%po\n",
+ "print'Power dissipated in the output transistor, P = %d W'%pt\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter23_MeQwZwE.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter23_MeQwZwE.ipynb
new file mode 100644
index 00000000..ca174b87
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter23_MeQwZwE.ipynb
@@ -0,0 +1,145 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 23: Electric Motors and Generators"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.1, Page 483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Sinusoidal Voltage with Peak value = 8.4 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#initialization\n",
+ "n=100 #no of turns\n",
+ "b=400*10**-3 #magnetic field\n",
+ "a=20*10**-4 #area in cm^2\n",
+ "w=105 #angular frequency\n",
+ "\n",
+ "#calculation\n",
+ "v=n*b*a*w #voltage\n",
+ "\n",
+ "#result\n",
+ "print'Sinusoidal Voltage with Peak value = %.1f V'%v"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.2, Page 488"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rotation Speed = 1800 rpm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#initialization\n",
+ "f=60 #frequency in Hz\n",
+ "a=60 #seconds\n",
+ "\n",
+ "#calculation\n",
+ "f1=f/2 #required rotation speed\n",
+ "f2=f1*a #equivalent rotation speed\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'Rotation Speed = %d rpm'%f2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.3, Page 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rotation Speed = 12000 rpm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#initialization\n",
+ "f=50 #frequency in Hz\n",
+ "p=4 #four times magnetic field for 8 pole motor\n",
+ "a=60 #seconds\n",
+ "\n",
+ "#calculation\n",
+ "f1=f*p #required rotation speed\n",
+ "f2=f1*a #equivalent rotation speed\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'Rotation Speed = %d rpm'%f2"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter2_9eBOyNb.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter2_9eBOyNb.ipynb
new file mode 100644
index 00000000..42cc79a2
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter2_9eBOyNb.ipynb
@@ -0,0 +1,363 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Basic Electric Circuits and Components"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1, Page 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Current, I = 15.9 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "v1=15.8 #voltage across r1\n",
+ "v2=12.3 #voltage across r2\n",
+ "r2=220 #resistance R2 in ohm\n",
+ "\n",
+ "#Calculation\n",
+ "v=v1-v2 #voltage difference across the resistor\n",
+ "i=v/r2 #current in ampere\n",
+ "\n",
+ "#Result\n",
+ "print'Current, I = %.1f mA'%(i*1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2, Page 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I2 = 7 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "i1=10; #current in amp\n",
+ "i3=3; #current in amp\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "i2=i1-i3 #current in amp\n",
+ "\n",
+ "#Result\n",
+ "print'I2 = %d A'%i2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3, Page 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "V1 = 5 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "E=12 #EMF in volt\n",
+ "v2=7 #volt\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "v1=E-v2 #volt\n",
+ "\n",
+ "#Result\n",
+ "print'V1 = %d V'%v1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4, Page 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P = 450 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "i=3 #current in amp\n",
+ "r=50 #resistance in ohm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "p=(i**2)*r #power in watt\n",
+ "\n",
+ "#Result\n",
+ "print'P = %d W'%p\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5, Page 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R = 70 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "r1=10 #resistance in ohm\n",
+ "r2=20 #resistance in ohm\n",
+ "r3=15 #resistance in ohm\n",
+ "r4=25 #resistance in ohm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "r=r1+r2+r3+r4 #series resistance in ohm\n",
+ "\n",
+ "#Result\n",
+ "print'R = %d ohm'%r\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6, Page 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R = 6.67 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "r1=10 #resistance in ohm\n",
+ "r2=20 #resistance in ohm\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "r=(r1*r2)*(r1+r2)**-1 #parallel resistance in ohm\n",
+ "\n",
+ "#Result\n",
+ "print'R = %.2f ohm'%r\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7, Page 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "V = 6 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "r1=200 #resistance in ohm\n",
+ "r2=300 #resistance in ohm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "v=(10*r2)/(r1+r2) #resistance in ohm\n",
+ "\n",
+ "#Result\n",
+ "print'V = %d V'%v"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.8, Page 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "V = 7 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "r1=1*10**3 #resistance in ohm\n",
+ "r2=500 #resistance in ohm\n",
+ "v1=15 #voltage\n",
+ "v2=3 #voltage\n",
+ "\n",
+ "#Calculation\n",
+ "v=v2+((v1-v2)*((r2)*(r1+r2)**-1)) #resistance in ohm\n",
+ "\n",
+ "#Result\n",
+ "print'V = %d V'%v\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.9, Page 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T = 20 ms\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "f=50 #frequency in herts\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "t=(1*f**-1) #time period\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print'T = %d ms'%(t*10**3)\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter5_0stc93N.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter5_0stc93N.ipynb
new file mode 100644
index 00000000..c69b7e3b
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter5_0stc93N.ipynb
@@ -0,0 +1,258 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Signals and Data Transmission"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1, Page 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "An 8-bit word can take 2^8 = 256 values\n",
+ "\n",
+ "An 16-bit word can take 2^16 = 65536 values\n",
+ "\n",
+ "An 32-bit word can take 2^32 = 4.000000 x 10^9 values\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "n=8 #8 bit\n",
+ "n2=16 #16 bit\n",
+ "n3=32 #32 bit\n",
+ "\n",
+ "#Calculation\n",
+ "c=2**n #value for 8 bit\n",
+ "c2=2**n2 #value for 16 bit\n",
+ "c3=2**n3 #value for 32 bit\n",
+ "\n",
+ "#Result\n",
+ "print'An 8-bit word can take 2^8 = %d values\\n'%c\n",
+ "print'An 16-bit word can take 2^16 = %d values\\n'%c2\n",
+ "print'An 32-bit word can take 2^32 = %f x 10^9 values\\n'%(c3/10**9)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2, Page 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "An 8-bit word resolution = 0.39 percent\n",
+ "\n",
+ "An 16-bit word resolution = 0.0015 percent\n",
+ "\n",
+ "An 32-bit word resolution = 0.000000023 percent\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "n=8 #8 bit\n",
+ "n2=16 #16 bit\n",
+ "n3=32 #32 bit\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "c=2**n #value for 8 bit\n",
+ "p=(1*c**-1)*100 #percent\n",
+ "c2=2**n2 #value for 16 bit\n",
+ "p2=(1*c2**-1)*100 #percent\n",
+ "c3=2**n3 #value for 32 bit\n",
+ "p3=(1*c3**-1)*100 #percent\n",
+ "\n",
+ "#Result\n",
+ "print'An 8-bit word resolution = %.2f percent\\n'%p\n",
+ "print'An 16-bit word resolution = %.4f percent\\n'%p2\n",
+ "print'An 32-bit word resolution = %.9f percent\\n'%p3"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3, Page 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEZCAYAAACNebLAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG4pJREFUeJzt3X2UXXV97/H3J4RHUxhFGyGQzDINZqHQATSEgs1YCybI\ng7flQaqFgduWpahUdClFbS7qur3Lem2gQBEEQlAKiEpQoMUKU5CHoAlzSZHwUAiEKPEBQoBQGuB7\n/9h7wuZkn5kzk73n/GbO57XWWZy99+/s8z0/fjnfs3/fvfcoIjAzM2s0qd0BmJlZmpwgzMyslBOE\nmZmVcoIwM7NSThBmZlbKCcLMzEo5QZiZWSknCKuUpNWSNkraIOm5/L9v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ApSbOA7SPiddNADe8L8HayW0/sAjwo\n6YKyoyNJv0t2T52zIuIWSTOAmXk/kffVVOBrEfHLvK+Q9DHgPRGxpnGfZs04QVjKNjaZYvpRRDyb\nPz8MOLSQSN4AzAJ2Br4fES8BL0lqvOljmcOAfSQdmy/vnO9rE3BP/oWLpAGgG9gA/CIiVsDmP9SC\npGuBL0r6DHAKsLiF974hIl4GfitpHdmX/C8a2mxHdtR0WkTcXlj/SLGfikdR+fLBwF+Q/RU3s5Y5\nQdh49ELhuYC/i4iLiw0knT7E61/mtenVHRr29YmI+FHDvuYBLxVWvcJr/3a2mN6JiBcl/Qj4IHAs\ncMAQsQwq7v9Vyv9tvkxWt5gP3F6yfQuSdgMuBo4cvH22Watcg7CUtfInJ/8VOEXSGwAk7S7pLcBt\nwAclbS/pd4AjC69ZDbwrf35sw74+lt9XH0mzJO00xHs/CLxV0gF5+ymSBv9NXQKcS3bk8WyzHYxQ\nkB2RzJb02cL6ZjWIycA1wOci4j8risE6iI8gLGXDnp0TET+SNBu4KytB8BzwkYi4V9I1wH3AOuCe\nwsu+BlyTF6FvKKz/JtnU0Yq8nvErsqOA0rgiYpOk44HzJO1IVvf4Y7KpsRWSNgCXjeQDF/df/nEj\nJJ0ALM33f9MQ7f+A7OjlbElfytsdHhFPjSIm60C+3bd1hHxe/rmI+PoYvd/uwC0RMXss3s+sDp5i\nMquYpD8H7iL7gy1m45aPIMzMrJSPIMzMrJQThJmZlXKCMDOzUk4QZmZWygnCzMxKOUGYmVmp/w9Q\n8qp7rMXCBAAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x8ee1f60>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "#data\n",
+ "x = np.linspace(0, 3, 1)\n",
+ "y=2\n",
+ "\n",
+ "#plotting\n",
+ "\n",
+ "plt.bar(1, y, 0.001*max(x))\n",
+ "\n",
+ "\n",
+ "xlabel(\"Frequency in kHz\")\n",
+ "ylabel(\"Voltage\")\n",
+ "title(\"Frequency Spectrum\")\n",
+ "plt.axis([0, 2, 0, 3])\n",
+ "plt.grid()\n",
+ "plt.show()\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4, Page 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEZCAYAAACNebLAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG21JREFUeJzt3Xu0ZGV55/HvD9oLymB7G0SQ7hWCslBJK4oYdLqNUcGo\nOImIjgZbJwnL+0RdalDT42UlaxnHIFFjULSBSLwrKJJolBPwBgr0QBRQglxVvCByaYZweeaP2t0U\nxT7n1Dm965zd53w/a9Wi9t5v7XrqZXc99b7P3vukqpAkadQOix2AJKmfTBCSpFYmCElSKxOEJKmV\nCUKS1MoEIUlqZYKQJLUyQahTSS5LsjnJ9UluaP77kMWOazEkOTTJeUmuS/LzJP+aZNWE3/OOJL81\nyffQ8rFisQPQklPAH1TV6TM1SrJjVd2+QDEtuCR7AccDz62qqST3BZ4OTPozz3jl61Lvd3XLEYQm\nIXdbkaxqft2+LMnlwNea9Qcm+WaSXze/ttcOvWZ1kqkkv0nyL0n+LsmJzba1Sa4ceY8fJ/m95nmS\nvDnJJUl+keQTSVaOxHJEksubX/dHDe1nhyRHNa+9Psl3k+ye5P1J3jPynicneW1LH6wBLq2qKYCq\nuqmqPl9VVzWv25Dk001c1yf5XpL9hva7W5LPNLH9R5JXzxLfHkn+ren785v1h23ppyRvTPJT4KNJ\nXpLkzJHPsXXkkeRjST6Q5MvNKPDMJLsm+dsk1yb5QZLfmfb/vpYME4QW2n8D9gGekeShw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w3tfDDwkyf5N+52TbPk3dRxwDIORx2+m28EcFYMRyT5J3ji0froaxArgU8Cbquo/OopBy4gj\nCPXZrGfnVNVXk+wDfHtQguAG4MVVdV6STwHnA9cAZw+97D3Ap5oi9KlD6z/CYOro3Kae8XMGo4DW\nuKrq1iSHA+9PshODusfvM5gaOzfJ9cDH5vKBh/ff/nGrkrwQOLnZ/2kztP9dBqOXtyd5R9PumVX1\ns3nEpGXI231rWWjm5W+oqvcu0Ps9FPh6Ve2zEO8nTYJTTFLHkvwx8G0Gf7BF2m45gpAktXIEIUlq\nZYKQJLUyQUiSWpkgJEmtTBCSpFYmCElSq/8PK/+gYIz8oXAAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x8b6bd30>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "#data\n",
+ "x = np.linspace(0, 3, 1)\n",
+ "y=2\n",
+ "y1=1\n",
+ "\n",
+ "#plotting\n",
+ "plt.bar(1, y, 0.001*max(x))\n",
+ "plt.bar(1.5, y1, 0.001*max(x))\n",
+ "\n",
+ "\n",
+ "xlabel(\"Frequency in kHz\")\n",
+ "ylabel(\"Voltage\")\n",
+ "title(\"Frequency Spectrum\")\n",
+ "plt.axis([0, 2, 0, 3])\n",
+ "plt.grid()\n",
+ "plt.show()\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5, Page 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Bandwidth = 7.0 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "f1=7000 #Human Speech Frequency Upper limit in HZ\n",
+ "f2=50 #Human Speech Frequency Lower limit in Hz\n",
+ "\n",
+ "#Calculation\n",
+ "B=f1-f2 #Bandwidth in Hz\n",
+ "\n",
+ "#Result\n",
+ "print'Bandwidth = %.1f kHz'%(B*1000**-1)"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter6_Qjw2zj2.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter6_Qjw2zj2.ipynb
new file mode 100644
index 00000000..3c14f35c
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter6_Qjw2zj2.ipynb
@@ -0,0 +1,257 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Amplification"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1, Page 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ouput voltage of and amplifier = 15.2 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "Ri=1000 #Input Resistance of amplifier in Ohm\n",
+ "Rs=100 #Output Resistance of sensor in Ohm\n",
+ "Rl=50 #Load Resistance\n",
+ "Ro=10 #Output Resistance of amplifier in Ohm\n",
+ "Av=10 #Voltage gain\n",
+ "Vs=2 #Sensor voltage\n",
+ "\n",
+ "#Calculation\n",
+ "Vi=Ri*Vs*(Rs+Ri)**-1 #Input Voltage of Amplifier\n",
+ "Vo=Av*Vi*Rl*(Ro+Rl)**-1 #Output Voltage of Amplifier\n",
+ "\n",
+ "#Result\n",
+ "print'Ouput voltage of and amplifier = %.1f V'%Vo\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2, Page 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voltage Gain, Av = 8.35\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "Vo=15.2 #Output Voltage of Amplifier\n",
+ "Vi=1.82 #Input Voltage of Amplifier\n",
+ "\n",
+ "#Calculation\n",
+ "Av=Vo/Vi #Voltage gain\n",
+ "\n",
+ "#Result\n",
+ "print'Voltage Gain, Av = %.2f'%Av\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3, Page 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ouput voltage of and amplifier = 20.0 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "Av=10 #Voltage gain\n",
+ "Vi=2 #Input Voltage of Amplifier\n",
+ "Rl=50 #Load Resistance\n",
+ "Ro=0 #Output Resistance of amplifier in Ohm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "Vo=Av*Vi*Rl/(Ro+Rl) #Output Voltage of Amplifier\n",
+ "\n",
+ "#Result\n",
+ "print'Ouput voltage of and amplifier = %.1f V'%Vo\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4, Page 96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output Power, Po = 4.6 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "Vo=15.2 #Output Voltage\n",
+ "Rl=50 #Load Resistance\n",
+ "\n",
+ "#Calculation \n",
+ "Po=(Vo**2)/Rl #Output Power\n",
+ "\n",
+ "#Result\n",
+ "print'Output Power, Po = %.1f W'%Po"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5, Page 98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Power Gain, Ap = 1395\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "Vi=1.82 #Input Voltage of Amplifier\n",
+ "Ri=1000 #Input Resistance of amplifier in Ohm\n",
+ "Vo=15.2 #Output Voltage of Amplifier\n",
+ "Rl=50 #Load Resistance\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "Pi=(Vi**2)*Ri**-1 #Input Power in Watt\n",
+ "Po=(Vo**2)*Rl**-1 #Output Power in Watt\n",
+ "Ap=Po/Pi #Power Gain\n",
+ " \n",
+ "\n",
+ "#Result\n",
+ "print'Power Gain, Ap = %d'%Ap #wrong answer in textbook \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6, Page 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Power Gain (dB) = 31.5 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "P=1400 #Power gain\n",
+ "\n",
+ "#Calculation\n",
+ "pdb=10*math.log10(P) #Power Gain in dB\n",
+ "\n",
+ "#Result\n",
+ "print'Power Gain (dB) = %.1f dB'%pdb\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter8_1dOnAi7.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter8_1dOnAi7.ipynb
new file mode 100644
index 00000000..b05aaf78
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter8_1dOnAi7.ipynb
@@ -0,0 +1,197 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: Operational Amplifier"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3, Page 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Gain = 50\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "f=20*10**3 #bandwidth frequency in KHz\n",
+ "\n",
+ "#Calculation\n",
+ "gain=(10**6)/(f) #gain\n",
+ "\n",
+ "#Result\n",
+ "print'Gain = %d'%gain"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.4, Page 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output Resistance = 7.5 mOhm\n",
+ "\n",
+ "Input Resistance = 20 GOhm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Initialisation\n",
+ "og=2*10**5 #Open Loop Gain\n",
+ "cg=20 #Closed Loop Gain\n",
+ "or1=75 #Output Resistance\n",
+ "ir1=2*10**6 #Input Resistance\n",
+ "\n",
+ "#Calculation\n",
+ "ab=og*cg**-1 #factor (1+AB)\n",
+ "or2=or1/ab #Output Resistance\n",
+ "ir2=ir1*ab #Input Resistance\n",
+ "\n",
+ "#Result\n",
+ "print'Output Resistance = %.1f mOhm\\n'%(or2*1000)\n",
+ "print'Input Resistance = %d GOhm'%(ir2*10**-9)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.5, Page 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output Resistance = 7.5 mOhm\n",
+ "\n",
+ "Input Resistance = 1 KOhm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "og=2*10**5 #Open Loop Gain\n",
+ "cg=20 #Closed Loop Gain\n",
+ "or1=75 #Output Resistance\n",
+ "ir1=2*10**6 #Input Resistance\n",
+ "r1=20*10**3 #Resistnce in Ohm\n",
+ "r2=10**3 #Resistnce in Ohm\n",
+ "\n",
+ "#Calculation\n",
+ "ab=og*cg**-1 #factor (1+AB)\n",
+ "or2=or1*ab**-1 #Output Resistance\n",
+ "#the input is connected to a virtual earth point by the resistance R2, \n",
+ "#so the input resistance is equal to R 2 ,\n",
+ "ir2=r2 #Input Resistance\n",
+ "\n",
+ "#Result\n",
+ "print'Output Resistance = %.1f mOhm\\n'%(or2*1000)\n",
+ "print'Input Resistance = %d KOhm'%(ir2*10**-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.6, Page 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output Resistance = 375 uOhm\n",
+ "\n",
+ "Input Resistance = 400 GOhm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "og=2*10**5 #Open Loop Gain\n",
+ "cg=1 #Closed Loop Gain\n",
+ "or1=75 #Output Resistance\n",
+ "ir1=2*10**6 #Input Resistance\n",
+ "\n",
+ "#Calculation\n",
+ "ab=og*cg**-1 #factor (1+AB)\n",
+ "or2=or1*ab**-1 #Output Resistance\n",
+ "ir2=ir1*ab #Input Resistance\n",
+ "\n",
+ "#Result\n",
+ "print'Output Resistance = %d uOhm\\n'%(or2*10**6) #wrong answer in the textbook\n",
+ "print'Input Resistance = %d GOhm'%(ir2*10**-9)"
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter9_12ISo6t.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter9_12ISo6t.ipynb
new file mode 100644
index 00000000..4ac9ad91
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter9_12ISo6t.ipynb
@@ -0,0 +1,417 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: Digital Electronics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.8, Page 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Decimal Equivalent = 26.000000\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "ni1=11010 #binary number\n",
+ "\n",
+ "#Calculation\n",
+ "def binary_decimal(ni): # Function to convert binary to decimal\n",
+ " deci = 0;\n",
+ " i = 0;\n",
+ " while (ni != 0):\n",
+ " rem = ni-int(ni/10.)*10\n",
+ " ni = int(ni/10.);\n",
+ " deci = deci + rem*2**i;\n",
+ " i = i + 1;\n",
+ " return deci\n",
+ "\n",
+ "w=binary_decimal(ni1) #calling the function\n",
+ "\n",
+ "#Declaration\n",
+ "print'Decimal Equivalent = %f'%w"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.9, Page 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Binary Equivalent = 11010\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialization\n",
+ "ni1=26 #Decimal number\n",
+ "\n",
+ "#Calculation\n",
+ "def decimal_binary(ni): # Function to convert decimal to binary\n",
+ " bini = 0;\n",
+ " i = 1;\n",
+ " while (ni != 0):\n",
+ " rem = ni-int(ni/2)*2; \n",
+ " ni = int(ni/2);\n",
+ " bini = bini + rem*i;\n",
+ " i = i * 10;\n",
+ " return bini\n",
+ "\n",
+ "w=decimal_binary(ni1) #calling the function\n",
+ "\n",
+ "#Declaration\n",
+ "print'Binary Equivalent = %d'%w"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.10, Page 177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Decimal equivalent of 34.6875 = 100010.1011\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initializaton\n",
+ "\n",
+ "no=34.6875 #decimal number\n",
+ "n_int = int(no); # Extract the integral part\n",
+ "n_frac = no-n_int; # Extract the fractional part\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def decimal_binary(ni): # Function to convert decimal to binary\n",
+ " bini = 0;\n",
+ " i = 1;\n",
+ " while (ni != 0):\n",
+ " rem = ni-int(ni/2)*2; \n",
+ " ni = int(ni/2);\n",
+ " bini = bini + rem*i;\n",
+ " i = i * 10;\n",
+ " return bini\n",
+ "\n",
+ "def decifrac_binfrac(nf): # Function to convert binary fraction to decimal fraction\n",
+ " binf = 0; i = 0.1;\n",
+ " while (nf != 0):\n",
+ " nf = nf*2;\n",
+ " rem = int(nf); \n",
+ " nf = nf-rem;\n",
+ " binf = binf + rem*i;\n",
+ " i = i/10;\n",
+ " return binf\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"Decimal equivalent of 34.6875 = %.4f\"%(decimal_binary(n_int)+decifrac_binfrac(n_frac))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.11, Page 177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W = 40979\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#initialization\n",
+ "n='A013' #Hex number \n",
+ "\n",
+ "#Calculation\n",
+ "w=int(n, 16) #Hex to Decimal Coversion\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print'W = %d'%w"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.12, Page 178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The hexadecimal equivalent of 7046 is 0x1b86\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable declaration\n",
+ "n=7046 #Hex number \n",
+ "\n",
+ "#Calculations\n",
+ "h = hex(n) #decimal to hex conversion\n",
+ "\n",
+ "#Result\n",
+ "print \"The hexadecimal equivalent of 7046 is\",h"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.13, Page 178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Decimal equivalent of 34.6875 = 1111100001010001\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initializaton\n",
+ "\n",
+ "n='f851' #Hex Number\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "w=int(n, 16) #Hex to Decimal Coversion\n",
+ "\n",
+ "def decimal_binary(ni): # Function to convert decimal to binary\n",
+ " bini = 0;\n",
+ " i = 1;\n",
+ " while (ni != 0):\n",
+ " rem = ni-int(ni/2)*2; \n",
+ " ni = int(ni/2);\n",
+ " bini = bini + rem*i;\n",
+ " i = i * 10;\n",
+ " return bini\n",
+ "\n",
+ "\n",
+ "w1=decimal_binary(w) #calling the function\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print \"Decimal equivalent of 34.6875 = %.d\"%(w1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.14, Page 179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The hexadecimal equivalent of 111011011000100 is 0x76c4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialiation\n",
+ "ni1=111011011000100 #binary number\n",
+ "\n",
+ "#Calculation\n",
+ "def binary_decimal(ni): # Function to convert binary to decimal\n",
+ " deci = 0;\n",
+ " i = 0;\n",
+ " while (ni != 0):\n",
+ " rem = ni-int(ni/10.)*10\n",
+ " ni = int(ni/10.);\n",
+ " deci = deci + rem*2**i;\n",
+ " i = i + 1;\n",
+ " return deci\n",
+ "\n",
+ "w=binary_decimal(ni1) #calling the function\n",
+ "h = hex(w) #decimal to hex conversion\n",
+ "\n",
+ "#Result\n",
+ "print \"The hexadecimal equivalent of 111011011000100 is\",h"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": false
+ },
+ "source": [
+ "## Example 9.15, Page 182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Eqivalent BCD of 72 = 1001010001010000\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#initialisation\n",
+ "x='9450' #decimal number to be convert\n",
+ "\n",
+ "#calculation\n",
+ "digits = [int(c) for c in x]\n",
+ "zero_padded_BCD_digits = [format(d, '04b') for d in digits]\n",
+ "\n",
+ "#results\n",
+ "print \"Eqivalent BCD of 72 = \",\n",
+ "print ''.join(zero_padded_BCD_digits)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.16, Page 182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The equivalent decimal =3876.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Initialisation\n",
+ "BCD=\"0011 1000 0111 0110\" #Given BCD string\n",
+ "BCD_split=BCD.split(\" \"); #Splitting th binary string into individual BCD \n",
+ "d=0;\n",
+ "for i in range(len(BCD_split),0,-1):\n",
+ " d+=int(BCD_split[len(BCD_split)-i],2)*10**(i-1);\n",
+ "\n",
+ "#Result\n",
+ "print(\"The equivalent decimal = %d.\"%d);\n",
+ " "
+ ]
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic1_SdzvQJK.png b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic1_SdzvQJK.png
new file mode 100644
index 00000000..1e4ff4d3
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic1_SdzvQJK.png
Binary files differ
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic2_6vjSxZe.png b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic2_6vjSxZe.png
new file mode 100644
index 00000000..8cdd1ca3
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic2_6vjSxZe.png
Binary files differ
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic3_vqn3sAt.png b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic3_vqn3sAt.png
new file mode 100644
index 00000000..30eb3a12
--- /dev/null
+++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic3_vqn3sAt.png
Binary files differ
diff --git a/Problems_in_Electrical_Engineering_by_Parker_Smith/README.txt b/Problems_in_Electrical_Engineering_by_Parker_Smith/README.txt
new file mode 100644
index 00000000..893d0adb
--- /dev/null
+++ b/Problems_in_Electrical_Engineering_by_Parker_Smith/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Mohd Rizwan
+Course: mtech
+College/Institute/Organization: Techwords Institute Roorkee
+Department/Designation: Electronics
+Book Title: Problems in Electrical Engineering
+Author: Parker Smith
+Publisher: CBS Publishers(2003),
+Year of publication: 1981
+Isbn: 9788123908588
+Edition: 9 \ No newline at end of file
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter10_QlnhZhy.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter10_QlnhZhy.ipynb
new file mode 100644
index 00000000..b6dbe200
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter10_QlnhZhy.ipynb
@@ -0,0 +1,309 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10:Staircase"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.1:pg-517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Thickness of steps= 4 mm\n",
+ "Cover from top=15 mm\n",
+ "Main steel = 8 mm dia, 4 in each step with development length of 470 mm\n",
+ "Distribution steel = 6 mm dia @ 415 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=1 #span, in m\n",
+ "t=0.27 #tread in m\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "MF=1.6\n",
+ "a=MF*7\n",
+ "D=l*10**3/a #in mm\n",
+ "D=100 #assume, in mm\n",
+ "W1=D/10**3*t*25 #in kN/m\n",
+ "M1=W1*l/2 #in kN-m\n",
+ "M2=t*3*l/2 #in kN-m\n",
+ "M3=1.3*l #in kN-m\n",
+ "M=M1+max(M2,M3) #in kN-m\n",
+ "d=math.sqrt(M*10**6/0.87/t/10**3) #in mm\n",
+ "d=83 #in mm\n",
+ " #assume 8 mm dia bars\n",
+ "dia=8 #in mm\n",
+ "D=d+dia/2+15 #this is slightly more than assumed value, hence OK\n",
+ "D=100 #in mm\n",
+ "z=0.87*d #in mm\n",
+ "Ast=M*10**6/sigma_st/z #in sq mm\n",
+ "n=Ast/0.785/8**2\n",
+ "n=4 #assume\n",
+ "Ads=0.15/100*D*t*10**3 #distribution steel, in sq mm\n",
+ " #provide 6 mm dia bars\n",
+ "s=1000*0.785*6**2/Ads #>5d=415 mm\n",
+ "s=415 #in mm\n",
+ "Tbd=0.6 #in MPa\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "Ld=470 #assume, in mm\n",
+ "print \"Summary of design\\nThickness of steps=\",(n),\" mm\\nCover from top=15 mm\\nMain steel = 8 mm dia, \",(n),\" in each step with development length of \",(Ld),\" mm\\nDistribution steel = 6 mm dia @ \",(s),\" mm c/c\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.2:pg-518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Slab thickness= 200 mm\n",
+ "Cover = 25 mm\n",
+ "Main steel = 10 mm dia bars @ 150 mm c/c\n",
+ "Distribution steel = 8 mm dia @ 210 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=2.7+1 #span, in m\n",
+ "R=0.15 #rise, in m\n",
+ "t=0.27 #tread, in m\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ " #assuming 50 mm per 1 m of span\n",
+ "D=50*l #in mm\n",
+ "D=200 #assume, in mm\n",
+ "W1=D/10**3*25*math.sqrt(R**2+t**2)/t #slab load on plan, in kN/m\n",
+ "W2=1/2.0*R*t*25/t #load of step per metre, in kN/m\n",
+ "W3=3 #live load, in kN/m\n",
+ "W=W1+W2+W3 #in kN/m\n",
+ "M=W*l**2/8 #in kN-m\n",
+ "d=math.sqrt(M*10**6/0.65/10**3) #in mm\n",
+ "d=170 #in mm\n",
+ " #assume 10 mm dia bars\n",
+ "dia=10 #in mm\n",
+ "D=d+dia/2+25 #which is equal to assumed value, hence OK\n",
+ "z=0.9*d #in mm\n",
+ "Ast=M*10**6/sigma_st/z #in mm\n",
+ "s1=1000*0.785*dia**2/Ast #spacing of 10 mm dia bars\n",
+ "s1=150 #assume, in mm\n",
+ "Ads=0.12/100*D*10**3 #distribution steel, in sq mm\n",
+ " #provide 8 mm dia bars\n",
+ "s2=1000*0.785*8**2/Ads #in mm\n",
+ "s2=210 #in mm\n",
+ " #let span-to-depth ratio be 'a'\n",
+ "a=l*10**3/D\n",
+ " #for Fe415 grade steel and pt=.32\n",
+ "MF=1.2\n",
+ "b=20*MF #permissible span-to-depth ratio\n",
+ " #as a<b, hence OK\n",
+ "print \"Summary of design\\nSlab thickness=\",(D),\" mm\\nCover = 25 mm\\nMain steel = 10 mm dia bars @ \",(s1),\" mm c/c\\nDistribution steel = 8 mm dia @ \",(s2),\" mm c/c\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.3:pg-519"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Slab thickness= 200 mm\n",
+ "Cover = 25 mm\n",
+ "Main steel = 10 mm dia bars @ 130 mm c/c\n",
+ "Distribution steel = 8 mm dia @ 140 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=2.5+1.5 #span, in m\n",
+ "R=0.15 #rise, in m\n",
+ "t=0.25 #tread in m\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=275 #in MPa\n",
+ " #assuming 50 mm per 1 m of span\n",
+ "D=50*l #in mm\n",
+ "W1=D/10**3*25*1.5*math.sqrt(R**2+t**2)/t #slab load on plan, in kN/m\n",
+ "W2=1/2*R*t*1.5*25/t #load of step per metre, in kN/m\n",
+ "W3=1.5*5 #live load, in kN/m\n",
+ "W=W1+W2+W3 #in kN/m\n",
+ "M=W*l**2/8 #in kN-m\n",
+ "d=math.sqrt(M*10**6/0.81/1.5/10**3) #in mm\n",
+ "d=177 #in mm\n",
+ " #assume 10 mm dia bars\n",
+ "dia=10 #in mm\n",
+ "D=d+dia/2+25 #which is slightly more than assumed value, hence OK\n",
+ "D=200 #in mm\n",
+ "d=D-dia/2-25 #in mm\n",
+ "z=0.92*d #in mm\n",
+ "Ast=M*10**6/sigma_st/z #in sq mm\n",
+ "s1=1500*0.785*dia**2/Ast #spacing of 10 mm dia bars, in mm\n",
+ "s1=130 #assume, in mm\n",
+ "Ads=0.12/100*D*1.5*10**3 #distribution steel, in sq mm\n",
+ " #provide 8 mm dia bars\n",
+ "s2=1000*0.785*8**2/Ads #in mm\n",
+ "s2=140 #in mm\n",
+ " #let span-to-depth ratio be 'a'\n",
+ "a=l*10**3/D\n",
+ "pt=Ast/1500/D*100 #pt=0.3\n",
+ " #for Fe500 grade steel and pt=.3\n",
+ "MF=1.2\n",
+ "b=20*MF #permissible span-to-depth ratio\n",
+ " #as a<b, hence OK\n",
+ "print \"Summary of design\\nSlab thickness=\",D,\" mm\\nCover = 25 mm\\nMain steel = 10 mm dia bars @ \",s1,\" mm c/c\\nDistribution steel = 8 mm dia @ \",s2,\" mm c/c\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.4:pg-520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Slab thickness= 210 mm\n",
+ "Cover = 25 mm\n",
+ "(a)Flight AB and CD\n",
+ "Main steel = 10 mm dia bars @ 210 mm c/c\n",
+ "Distribution steel = 6 mm dia @ 70 mm c/c\n",
+ "(b)Flight BC\n",
+ "Main steel = 10 mm dia bars @ 130 mm c/c\n",
+ "Distribution steel = 6 mm dia @ 70 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "R=0.15 #rise, in m\n",
+ "t=0.3 #tread, in m\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "l1=1.8+1.5 #span for flight AB, in m\n",
+ "l2=1.2+1.5+1.5 #span for flight BC, in m\n",
+ "l3=1.8+1.5 #span for flight CD, in m\n",
+ "#assuming 50 mm slab thickness per 1 m of span\n",
+ "D=50*l2 #slab thickness, in mm\n",
+ "W1=D/10**3*25*1.5*math.sqrt(R**2+t**2)/t #slab load on plan, in kN/m\n",
+ "W2=1/2*R*t*1.5*25/t #load of step per metre, in kN/m\n",
+ "W3=1.5*5 #live load, in kN/m\n",
+ "W=W1+W2+W3 #in kN/m\n",
+ "#bending moment\n",
+ "#(a) flight AB and CD, refer Fig. 10.9\n",
+ "Rb=(W/2*1.5*(1.8+1.5/2)+W*1.8**2/2)/(1.5+1.8) #in kN\n",
+ "Ra=W/2*1.5+W*1.8-Rb #in kN\n",
+ "x=Ra/Rb #point of zero shear force from Ra, in m\n",
+ "M1=Ra*x-W*x**2/2 #maximum bending moment, in kN-m\n",
+ " #(b) flight BC, refer Fig. 10.10\n",
+ "Rb=(W/2*1.5**2/2+W*1.2*(1.2/2+1.5)+W/2*1.5*(1.5+1.2+1.5/2))/(1.5+1.2+1.5) #in kN\n",
+ "Rc=Rb #in kN\n",
+ " #maximum bending moment will be at centre\n",
+ "M2=Rb*(1.5+1.2/2)-W/2*1.5*(1.5/2+1.2/2)-W*(1.2/2)**2/2 #maximum bending moment, in kN-m\n",
+ "M=max(M1,M2) #in kN/m\n",
+ "d=math.sqrt(M*10**6/0.65/1.5/10**3) #in mm\n",
+ " #assume 10 mm dia bars\n",
+ "dia=10 #in mm\n",
+ "D=d+dia/2+25 #< 210 mm (assumed value)\n",
+ "D=210 #in mm\n",
+ "d=D-dia/2-25 #in mm\n",
+ "#steel\n",
+ "#flight AB and CD\n",
+ "z=0.9*d #in mm\n",
+ "Ast=M1*10**6/sigma_st/z #in sq mm\n",
+ "s1=1500*0.785*dia**2/Ast #spacing of 10 mm dia bars, in mm\n",
+ "s1=210 #round-off, in mm\n",
+ "Ads=0.12/100*D*1.5*10**3 #distribution steel, in sq mm\n",
+ " #provide 6 mm dia bars\n",
+ "s2=1000*0.785*6**2/Ads #in mm\n",
+ "s2=70 #round-off, in mm\n",
+ " #flight BC\n",
+ "Ast=M2*10**6/sigma_st/z #in sq mm\n",
+ "s3=1500*0.785*dia**2/Ast #spacing of 10 mm dia bars, in mm\n",
+ "s3=130 #round-off, in mm\n",
+ "#distribution steel is same as flights AB and CD\n",
+ "#let span-to-depth ratio be 'a'\n",
+ "a=l2*10**3/D\n",
+ "#for Fe415 grade steel and pt=.32\n",
+ "MF=1.2 #modification factor\n",
+ "b=20*MF #permissible span-to-depth ratio\n",
+ "#as a < b, hence OK\n",
+ "print \"Summary of design\\nSlab thickness=\",D,\" mm\\nCover = 25 mm\\n(a)Flight AB and CD\\nMain steel = 10 mm dia bars @ \",s1,\" mm c/c\\nDistribution steel = 6 mm dia @ \",s2,\" mm c/c\\n(b)Flight BC\\nMain steel = 10 mm dia bars @ \",s3,\" mm c/c\\nDistribution steel = 6 mm dia @ \",s2,\" mm c/c\"\n",
+ " #answer in textbook is incorrect\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter11_0iM0C4n.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter11_0iM0C4n.ipynb
new file mode 100644
index 00000000..0acd4c7c
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter11_0iM0C4n.ipynb
@@ -0,0 +1,363 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11:Column Footing Design"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.1:pg-591"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Overall depth of footing= 468.0 mm\n",
+ "Cover=100 mm bottom; 50 mm side\n",
+ "Steel- 16 bars of 12 mm dia both ways\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=0.2 #column width in m\n",
+ "D=0.3 #column depth in m\n",
+ "fck=15 #in MPa\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "P1=600 #load on column in kN\n",
+ "P2=0.05*P1 #weight of footing, in kN\n",
+ "P=P1+P2 #in kN\n",
+ "q=150 #bearing capacity of soil in kN/sq m\n",
+ "A=P/q #in sq m\n",
+ "L=math.sqrt(A) #assuming footing to be square\n",
+ "L=2.1 #assume, in m\n",
+ "p=P1/L**2 #soil pressure, in kN/sq m\n",
+ "p=136 #assume, in sq m\n",
+ "bc=b/D\n",
+ "ks=0.5+bc #>1\n",
+ "ks=1\n",
+ "Tc=0.16*math.sqrt(fck)*10**3 #in kN/sq m\n",
+ "Tv=Tc\n",
+ "#let d be the depth of footing in metres\n",
+ "#case I: consider greater width of shaded portion in Fig. 11.3 of textbook\n",
+ "d1=L*(L-b)/2*p/(Tc*L+L*p) #in m\n",
+ " #case II: refer Fig. 11.4 of textbook; we get a quadratic equation of the form e d**2 + f d + g = 0\n",
+ "e=p+4*Tc\n",
+ "f=b*p+D*p+2*(b+D)*Tc\n",
+ "g=-(L**2-b*D)*p\n",
+ "d2=(-f+math.sqrt(f**2-4*e*g))/2/e #in m\n",
+ "d2=0.362 #assume, in m\n",
+ " #bending moment consideration, refer Fig. 11.5 of textbook\n",
+ "Mx=1*((L-b)/2)**2/2*p #in kN-m\n",
+ "My=1*((L-D)/2)**2/2*p #in kN-m\n",
+ "d3=math.sqrt(Mx*10**6/0.65/10**3) #<362 mm, hence OK\n",
+ "z=0.9*d2*10**3 #lever arm, in mm\n",
+ "Ast1=(Mx*10**6/sigma_st/z) #in sq mm\n",
+ "Ast=L*Ast1 #steel required for full width of 2.1 m, in sq mm\n",
+ " #provide 12 mm dia bars\n",
+ "dia=12 #in mm\n",
+ "n=Ast/0.785/dia**2 #no. of 12 mm dia bars\n",
+ "n=16 #assume\n",
+ "Tbd=0.84 #in MPa\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "Ld=825 #assume, in mm\n",
+ "c=50 #side cover, in mm\n",
+ "La=(L-D)/2*10**3-c #>Ld, hence OK\n",
+ "D=d2*10**3+dia/2+100 #in mm\n",
+ "print \"Summary of design:\\nOverall depth of footing=\",(D),\" mm\\nCover=100 mm bottom; 50 mm side\\nSteel-\",(n),\" bars of 12 mm dia both ways\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.2:pg-592"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Overall depth of footing= 534.0 mm\n",
+ "Cover=100 mm bottom; 50 mm side\n",
+ "Steel- 15 bars of 18 mm dia both ways\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=0.4 #column width, in m\n",
+ "D=0.4 #column depth, in m\n",
+ "fck=15 #in MPa\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "P1=1000 #load on column, in kN\n",
+ "P2=0.05*P1 #weight of footing, in kN\n",
+ "P=P1+P2 #in kN\n",
+ "q=200 #bearing capacity of soil, in kN/sq m\n",
+ "A=P/q #in sq m\n",
+ "L=math.sqrt(A) #assuming footing to be square\n",
+ "L=2.3 #assume, in m\n",
+ "p=P1/L**2 #soil pressure, in kN/sq m\n",
+ "p=189 #assume, in kN/sq m\n",
+ "bc=b/D\n",
+ "ks=0.5+bc #>1\n",
+ "ks=1\n",
+ "Tc=0.16*math.sqrt(fck)*10**3 #in kN/sq m\n",
+ "Tv=Tc\n",
+ "#let d be the depth of footing in metres\n",
+ "#case I: consider greater width of shaded portion in Fig. 11.7 of textbook\n",
+ "d1=L*(L-b)/2*p/(Tc*L+L*p) #in m\n",
+ "#case II: refer Fig. 11.8 of textbook; we get a quadratic equation of the form e d**2 + f d + g = 0\n",
+ "e=p+4*Tc\n",
+ "f=b*p+D*p+2*(b+D)*Tc\n",
+ "g=-(L**2-b*D)*p\n",
+ "d2=(-f+math.sqrt(f**2-4*e*g))/2/e #in m\n",
+ "d2=0.425 #assume, in m\n",
+ "d=max(d1,d2) #in m\n",
+ "#bending moment consideration, refer Fig. 11.9 of textbook\n",
+ "Mx=1*((L-b)/2)**2/2*p #in kN-m\n",
+ "d3=math.sqrt(Mx*10**6/0.87/10**3) #<425 mm, hence OK\n",
+ "z=0.87*d*10**3 #lever arm, in mm\n",
+ "Ast1=(Mx*10**6/sigma_st/z) #in sq mm\n",
+ "Ast=L*Ast1 #steel required for full width of 2.3 m, in sq mm\n",
+ "#provide 18 mm dia bars\n",
+ "dia=18 #in mm\n",
+ "n=Ast/0.785/dia**2 #no. of 18 mm dia bars\n",
+ "n=15 #assume\n",
+ "Tbd=0.6 #in MPa\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "c=50 #side cover, in mm\n",
+ "La=(L-D)/2*10**3-c #in mm\n",
+ " #providing hook at ends\n",
+ "La=La+16*dia #>Ld, hence OK\n",
+ "D=d2*10**3+dia/2+100 #in mm\n",
+ "print \"Summary of design:\\nOverall depth of footing=\",(D),\" mm\\nCover=100 mm bottom; 50 mm side\\nSteel-\",(n),\" bars of 18 mm dia both ways\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 11.3:pg-593"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Overall depth of footing= 680.0 mm\n",
+ "Cover:100 mm bottom; 50 mm side\n",
+ "Steel: 9 -20 mm dia bars both ways\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "B=0.5 #column diameter, in m\n",
+ "fck=20 #in MPa\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "P1=1600 #load on column, in kN\n",
+ "P2=0.05*P1 #weight of footing, in kN\n",
+ "P=P1+P2 #in kN\n",
+ "q=300 #bearing capacity of soil, in kN/sq m\n",
+ "A=P/q #in sq m\n",
+ "L=math.sqrt(A) #assuming footing to be square\n",
+ "L=2.4 #assume, in m\n",
+ "p=P1/L**2 #soil pressure, in kN/sq m\n",
+ "p=278 #assume, in kN/sq m\n",
+ "bc=1\n",
+ "ks=0.5+bc #>1\n",
+ "ks=1\n",
+ "Tc=0.16*math.sqrt(fck)*10**3 #in kN/sq m\n",
+ "Tv=Tc\n",
+ "#let d be the depth of footing in metres\n",
+ "#case I: refer Fig. 11.11 of textbook\n",
+ "d1=L*(L-B)/2*p/(Tc*L+L*p) #in m\n",
+ "#case II: refer Fig. 11.12 of textbook; we get a quadratic equation of the form e d**2 + f d + g = 0\n",
+ "e=math.pi/4*p+math.pi*Tc\n",
+ "f=2*math.pi/4*B*p+math.pi*B*Tc\n",
+ "g=-(L**2-math.pi/4*B**2)*p\n",
+ "d2=(-f+math.sqrt(f**2-4*e*g))/2/e #in m\n",
+ "d2=0.57 #assume, in m\n",
+ "d=max(d1,d2) #in m\n",
+ " #bending moment consideration, refer Fig. 11.13 of textbook\n",
+ "M=1*((L-B)/2)**2/2*p #in kN-m\n",
+ "d3=math.sqrt(M*10**6/0.88/10**3) #<570 mm, hence OK\n",
+ "z=0.9*d*10**3 #lever arm, in mm\n",
+ "Ast1=(M*10**6/sigma_st/z) #in sq mm\n",
+ "Ast=L*Ast1 #steel required for full width of 2.4 m\n",
+ " #provide 20 mm dia bars\n",
+ "dia=20 #in mm\n",
+ "n=Ast/0.785/dia**2 #no. of 20 mm dia bars\n",
+ "n=9 #assume\n",
+ "Tbd=1.12 #in MPa\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "Ld=1030 #assume, in mm\n",
+ "c=50 #side cover, in mm\n",
+ "La=(L-B)/2*10**3-c #in mm\n",
+ "#bend bar at right angle and provide length, l\n",
+ "l=Ld-La #in mm\n",
+ "D=d*10**3+dia/2+100 #in mm\n",
+ "print \"Summary of design:\\nOverall depth of footing=\",(D),\" mm\\nCover:100 mm bottom; 50 mm side\\nSteel:\",(n),\"-20 mm dia bars both ways\"\n",
+ " #answer in textbook is incorrect\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.4:pg-595"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Overall depth of footing= 590 mm\n",
+ "Cover=100 mm bottom; 50 mm side\n",
+ "Steel-long direction\n",
+ "12 bars of 18 mm dia in 2 m width equally spaced\n",
+ "Short direction\n",
+ "Central band 2 m: 13 -12 mm dia bars equally spaced\n",
+ "Remaining sides: 2 -12 mm dia bars on each side\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=0.3 #column width in m\n",
+ "c1=0.4 #column depth in m\n",
+ "fck=20 #in MPa\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=275 #in MPa\n",
+ "P1=1200 #load on column, in kN\n",
+ "P2=0.05*P1 #weight of footing, in kN\n",
+ "P=P1+P2 #in kN\n",
+ "q=200 #bearing capacity of soil, in kN/sq m\n",
+ "A=P/q #in sq m\n",
+ "L1=2 #in m\n",
+ "L2=A/L1 #assuming footing to be square\n",
+ "L2=3.2 #assume, in m\n",
+ "p=P1/L1/L2 #soil pressure, in kN/sq m\n",
+ "bc=b/c1\n",
+ "ks=0.5+bc #>1\n",
+ "ks=1\n",
+ "Tc=0.16*math.sqrt(fck)*10**3 #in kN/sq m\n",
+ "Tv=Tc\n",
+ "#let d be the depth of footing in metres\n",
+ "#case I, refer Fig. 11.15 of textbook\n",
+ "#short direction\n",
+ "d1=L1*(L2-c1)/2*p/(Tc*L1+L1*p) #in m\n",
+ " #long direction\n",
+ "d2=L2*(L1-b)/2*p/(Tc*L2+L2*p) #in m\n",
+ " #case II: refer Fig. 11.16 of textbook; we get a quadratic equation of the form e d**2 + f d + g = 0\n",
+ "e=p+4*Tc\n",
+ "f=b*p+c1*p+2*(b+c1)*Tc\n",
+ "g=-(L1*L2-b*c1)*p\n",
+ "d3=(-f+math.sqrt(f**2-4*e*g))/2/e #in m\n",
+ "d3=0.47 #assume, in m\n",
+ "d=max(d1,d2,d3) #in m\n",
+ " #bending moment consideration, refer Fig. 11.17 of textbook\n",
+ "Mx=1*((L1-b)/2)**2/2*p #in kN-m\n",
+ "My=1*((L2-c1)/2)**2/2*p #in kN-m\n",
+ "d4=math.sqrt(My*10**6/0.8/10**3) #in mm\n",
+ "d4=480 #>470 mm (provided for shear)\n",
+ "d=d4 #in mm\n",
+ "z=0.92*d #lever arm, in mm\n",
+ " #short direction\n",
+ "Ast1=(Mx*10**6/sigma_st/z) #in sq mm\n",
+ "Ast=L2*Ast1 #steel required for full width of 3.2 m, in sq mm\n",
+ "b1=L1 #central band width, in m\n",
+ "beta=L2/L1\n",
+ "Astc=L1/(beta+1)*Ast #in sq mm\n",
+ " #provide 12 mm dia bars\n",
+ "dia=12 #in mm\n",
+ "n1=Astc/0.785/dia**2 #no. of 12 mm dia bars\n",
+ "n1=13 #assume\n",
+ "Astr=Ast-Astc #steel in remaining width, in sq mm\n",
+ "n2=Astr/0.785/dia**2\n",
+ "n2=4 #assume\n",
+ "n2=n2/2 #on each side\n",
+ "Tbd=1.12 #in MPa\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "c=50 #side cover, in mm\n",
+ "La=(L1-b)/2*10**3-c #>Ld, hence OK\n",
+ " #long direction\n",
+ "Ast1=(My*10**6/sigma_st/z) #in sq mm\n",
+ "Ast=L1*Ast1 #steel required for full width of 2 m, in sq mm\n",
+ " #provide 18 mm dia bars\n",
+ "dia=18 #in mm\n",
+ "n=Ast/0.785/dia**2 #no. of 18 mm dia bars\n",
+ "n=12 #assume\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "c=50 #side cover, in mm\n",
+ "La=(L2-c1)/2*10**3-c #>Ld, hence OK\n",
+ "D=d+dia/2+100 #in mm\n",
+ "D=590 #assume, in mm\n",
+ "print \"Summary of design:\\nOverall depth of footing=\",(D),\" mm\\nCover=100 mm bottom; 50 mm side\\nSteel-long direction\\n\",(n),\" bars of 18 mm dia in \",(L1),\" m width equally spaced\\nShort direction\\nCentral band \",(L1),\" m:\",(n1),\"-12 mm dia bars equally spaced\\nRemaining sides:\",(n2),\"-12 mm dia bars on each side\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter12_KLDtsnD.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter12_KLDtsnD.ipynb
new file mode 100644
index 00000000..00ba8990
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter12_KLDtsnD.ipynb
@@ -0,0 +1,336 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12:Retaining Walls"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.1:pg-649"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Thickness of stem (at base) = 450 mm\n",
+ "Thickness of stem at top = 200 mm\n",
+ "Refer Fig. 12.4 of textbook for reinforcement details\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "phi=30 #angle of repose, in degrees\n",
+ "H=5 #height of wall, in m\n",
+ "B=0.6*H #assume, in m\n",
+ "T=B/4 #assume toe to base ratio as 1:4\n",
+ "W=16 #density of retained earth, in kN/cu m\n",
+ "P=W*H**2/2*(1-math.sin(phi))/(1+math.sin(phi)) #in kN\n",
+ "P=67 #assume, in kN\n",
+ "M1=P*H/3 #in kN-m\n",
+ "M1=112 #assume, in kN-m\n",
+ " #bending moment at 2.5 m below the top\n",
+ "h=2.5 #in m\n",
+ "M2=W*h**2/2*(1-math.sin(phi))/(1+math.sin(phi))*h/3 #in kN-m\n",
+ "M2=14 #in kN-m\n",
+ " #thickness of stem (at the base)\n",
+ "d=math.sqrt(M1*10**6/0.65/1000) #in mm\n",
+ "d=415 #in mm\n",
+ "dia=20 #assume 20 mm dia bars\n",
+ "D1=d+dia/2+25 #in mm\n",
+ "D2=200 #thickness at top, in mm\n",
+ "D3=D2+(D1-D2)*h/H #in mm\n",
+ "d3=math.sqrt(M2*10**6/0.65/1000) #in mm\n",
+ "D3=d3+dia/2+25 #< 325 mm (provided), hence OK\n",
+ "D3=325 #in mm\n",
+ "d3=D3-dia/2-25 #in mm\n",
+ "#main steel\n",
+ "#(a) 5 m below the top\n",
+ "Ast=M1*10**6/sigma_st/0.9/d #in sq mm\n",
+ " #provide 20 mm dia bars\n",
+ "s1=1000*0.785*20**2/Ast #in mm\n",
+ "s1=240 #assume, in mm\n",
+ " #(b) 2.5 m below the top\n",
+ "Ast=M2*10**6/sigma_st/0.9/d3 #in sq mm\n",
+ "Astmin=0.12/100*10**3*D3 #in sq mm\n",
+ "Ast=max(Ast,Astmin) #in sq mm\n",
+ " #provide 12 mm dia bars\n",
+ "s2=1000*0.785*12**2/Ast #in mm\n",
+ "s2=290 #assume, in mm\n",
+ " #distribution steel\n",
+ "Ads=0.12/100*10**3*D3 #in sq mm\n",
+ " #provide 8 mm dia bars\n",
+ "s3=1000*0.785*8**2/Ads #in mm\n",
+ "s3=125 #assume, in mm\n",
+ " #check for shear\n",
+ "V=P #in kN\n",
+ "Tv=V*10**3.0/10**3/d #in MPa\n",
+ " #for M15 grade concrete and pt=0.31\n",
+ "Tc=0.22 #in MPa\n",
+ "#as Tc > Tv, no shear reinforcement required\n",
+ "#development length\n",
+ "#(a) At the base of stem\n",
+ "dia=20 #in mm\n",
+ "Tbd=0.84 #in MPa\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "Ld=1370 #assume, in mm\n",
+ " #(b) At 2.5 m below the top\n",
+ "dia=12 #in mm\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "Ld=825 #assume, in mm\n",
+ " #check for stability\n",
+ "D4=500 #thickness of base, in mm (assume)\n",
+ "V1=1/2.0*(D1-D2)/10**3*H*25 #in kN\n",
+ "V2=(D2/10**3)*H*25 #in kN\n",
+ "V3=(D4/10**3)*B*25 #weight of base, in kN\n",
+ "V4=(B-T-D1/10**3)*H*W #weight of soil, in kN\n",
+ "V=V1+V2+V3+V4 #in kN\n",
+ "M=V1*(T+2/3*(D1-D2)/10**3)+V2*(T+(D1-D2)/10**3+D2/10**3.0/2)+V3*B/2+V4*(B-(B-T-D1/10**3)/2) #in kN-m\n",
+ "x=M/V #in m\n",
+ "x=1.8 #assume, in m\n",
+ "#factor of safety\n",
+ "#for overturning\n",
+ "F1=V*x/P/(H/3) #> 1.5, hence OK\n",
+ "mu=0.5\n",
+ " #for sliding\n",
+ "F2=mu*V/P #> 1.5, hence OK\n",
+ "print \"Summary of design:\\nThickness of stem (at base) = \",(D1),\" mm\\nThickness of stem at top = \",(D2),\" mm\\nRefer Fig. 12.4 of textbook for reinforcement details\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.2:pg-650"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Thickness of stem (at base) = 485 mm\n",
+ "Thickness of stem at top = 200 mm\n",
+ "Refer Fig. 12.7 of textbook for reinforcement details\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "phi=35 #angle of repose, in degrees\n",
+ "H=6 #height of wall, in m\n",
+ "B=0.4*H #assume, in m\n",
+ "T=B/4 #assume toe to base ratio as 1:4\n",
+ "W=18 #density of retained earth, in kN/cu m\n",
+ "P=W*H**2/2*(1-math.sin(phi))/(1+math.sin(phi)) #in kN\n",
+ "P=88 #assume, in kN\n",
+ "M1=P*H/3 #in kN-m\n",
+ " #bending moment at 3 m below the top\n",
+ "h=3 #in m\n",
+ "M2=W*h**2/2*(1-math.sin(phi))/(1+math.sin(phi))*h/3 #in kN-m\n",
+ "M2=22 #in kN-m\n",
+ " #thickness of stem (at the base)\n",
+ "d=math.sqrt(M1*10**6/0.87/1000) #in mm\n",
+ "d=450 #in mm\n",
+ "dia=20 #assume 20 mm dia bars\n",
+ "D1=d+dia/2+25 #in mm\n",
+ "D2=200 #thickness at top, in mm\n",
+ "D3=D2+(D1-D2)*h/H #in mm\n",
+ "d3=math.sqrt(M2*10**6/0.87/1000) #in mm\n",
+ "D3=d3+dia/2+25 #< 342.5 mm (provided), hence OK\n",
+ "D3=342.5 #in mm\n",
+ "d3=D3-dia/2-25 #in mm\n",
+ "#main steel\n",
+ "#(a) 6 m below the top\n",
+ "Ast=M1*10**6/sigma_st/0.87/d #in sq mm\n",
+ " #provide 20 mm dia bars\n",
+ "s1=1000*0.785*20**2/Ast #in mm\n",
+ "s1=95 #assume, in mm\n",
+ " #(b) 3 m below the top\n",
+ "Ast=M2*10**6/sigma_st/0.87/d3 #in sq mm\n",
+ " #provide 10 mm dia bars\n",
+ "s2=1000*0.785*10**2/Ast #in mm\n",
+ "s2=130 #assume, in mm\n",
+ " #distribution steel\n",
+ "Ads=0.15/100*10**3*D3 #in sq mm\n",
+ " #provide 10 mm dia bars\n",
+ "s3=1000*0.785*10**2/Ads #in mm\n",
+ "s3=150 #assume, in mm\n",
+ " #check for shear\n",
+ "V=P #in kN\n",
+ "Tv=V*10**3.0/10**3/d #in MPa\n",
+ " #for M15 grade concrete and pt=0.71\n",
+ "Tc=0.34 #in MPa\n",
+ "#as Tc > Tv, no shear reinforcement required\n",
+ "#development length\n",
+ " #(a) At the base of stem\n",
+ "dia=20 #in mm\n",
+ "Tbd=0.6 #in MPa\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "Ld=1170 #assume, in mm\n",
+ " #(b) At 3 m below the top\n",
+ "dia=10 #in mm\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "Ld=590 #assume, in mm\n",
+ " #check for stability\n",
+ "D4=500 #thickness of base, in mm (assume)\n",
+ "V1=1.0/2*(D1-D2)/10**3*H*25 #in kN\n",
+ "V2=(D2/10**3)*H*25 #in kN\n",
+ "V3=(D4/10**3)*B*25 #weight of base, in kN\n",
+ "V4=(B-T-D1/10**3)*H*W #in kN\n",
+ "V=V1+V2+V3+V4 #in kN\n",
+ "M=V1*(T+2/3*(D1-D2)/10**3)+V2*(T+(D1-D2)/10**3+D2/10**3/2)+V3*B/2+V4*(B-(B-T-D1/10**3)/2) #in kN-m\n",
+ "x=M/V #in m\n",
+ "#factor of safety\n",
+ "#for overturning\n",
+ "F1=V*x/P/(H/3) #> 1.5, hence OK\n",
+ "mu=0.5\n",
+ "#for sliding\n",
+ "F2=mu*V/P #< 1.5, hence it is not safe against sliding\n",
+ "print \"Summary of design:\\nThickness of stem (at base) = \",(D1),\" mm\\nThickness of stem at top = \",(D2),\" mm\\nRefer Fig. 12.7 of textbook for reinforcement details\"\n",
+ " #answers in textbook for factor of safety against overturning and sliding are incorrect\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex.3:pg-652"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Thickness of base slab= 500 mm. Refer to Fig. 12.11 of textbook for reinforcement details.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "phi=30 #angle of repose, in degrees\n",
+ "H=5 #height of wall, in m\n",
+ "B=0.6*H #assume, in m\n",
+ "T=B/4 #assume toe to base ratio as 1:4\n",
+ "t=450 #thickness of wall, in mm\n",
+ "W=16 #density of retained earth, in kN/cu m\n",
+ "P=W*H**2/2*(1-math.sin(phi))/(1+math.sin(phi)) #in kN\n",
+ "P=67 #assume, in kN\n",
+ "y=1.8 #in m\n",
+ "P=67 #in kN\n",
+ "Wt=223 #in kN\n",
+ "D=0.5 #thickness of base, in m\n",
+ "x=1.8-P*(H/3+D/10**3)/Wt #in m\n",
+ "x=1.15 #in m\n",
+ "e=B/2-x #in m\n",
+ "q1=Wt/B+Wt*e/(1*B**2.0/6) #maximum pressure, in kN/sq m\n",
+ "q2=Wt/B-Wt*e/(1*B**2.0/6) #minimum pressure, in kN/sq m\n",
+ "Pa=q1-(q1-q2)/B*T #pressure at A, in kN/sq m\n",
+ "Pa=100 #assume, in kN/sq m\n",
+ "Pb=q1-(q1-q2)/B*(T+t/10**3) #pressure at B, in kN/sq m\n",
+ "Pb=85 #assume, in kN/sq m\n",
+ "Ma=Pa*T**2/2+1/2*(q1-Pa)*T*2/3*T-T*D*25*T/2 #bending moment at A, in kN-m\n",
+ "Ma=30 #round-off, in kN-m\n",
+ "Mb=(B-T-t/10**3)**2*H*W/2+(B-T-t/10**3)**2*D*25/2-q2*(B-T-t/10**3)**2/2-(Pb-q2)*1/3*(B-T-t/10**3)**2/2 #bending moment at B, in kN-m\n",
+ "Mb=80 #in kN-m\n",
+ " #design of toe\n",
+ "d=math.sqrt(Ma*10**6/0.65/10**3) #in mm\n",
+ "D=d+10/2+70 #<500 mm (provided), hence OK\n",
+ "D=500 #in mm\n",
+ "d=D-70 #in mm\n",
+ "Ast=Ma*10**6/sigma_st/0.9/d #in sq mm\n",
+ "Astmin=0.12/100*10**3*D #in sq mm\n",
+ "Ast=max(Ast,Astmin) #in sq mm\n",
+ "s1=1000*0.785*10**2/Ast #in mm\n",
+ "s1=130 #assume, in mm\n",
+ "#distribution steel is same as above\n",
+ "#check for shear\n",
+ "V=(q1+Pa)/2*T #in kN\n",
+ "Tv=V*10**3/10**3/d #in MPa\n",
+ "#for M15 grade concrete and pt=0.32\n",
+ "Tc=0.2368 #in MPa\n",
+ "#as Tc > Tv, no shear reinforcement required\n",
+ "#development length\n",
+ "dia=10 #in mm\n",
+ "Tbd=0.84 #in MPa\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "Ld=685 #assume, in mm\n",
+ " #design of heel\n",
+ "d=math.sqrt(Mb*10**6/0.65/10**3) #< 430 mm (provided), hence OK\n",
+ "d=430 #in mm\n",
+ "Ast=Mb*10**6/sigma_st/0.9/d #in sq mm\n",
+ "s2=1000*0.785*10**2/Ast #in mm\n",
+ "s2=85 #assume, in mm\n",
+ "#distribution steel: 0.12% of Ag, hence provide 10 mm dia bars @ 130 mm c/c \n",
+ "V=(B-T-t/10**3)*H*W-(Pb+q2)/2*(B-T-t/10**3) #in kN\n",
+ "Tv=V*10**3.0/10**3/d #in MPa\n",
+ "#for M15 grade concrete and pt=0.32\n",
+ "Tc=0.2368 #in MPa\n",
+ "#as Tc > Tv, no shear reinforcement required\n",
+ "#development length\n",
+ "dia=10 #in mm\n",
+ "Tbd=0.84 #in MPa\n",
+ "Ld=dia*sigma_st/4/Tbd #in mm\n",
+ "Ld=685 #assume, in mm\n",
+ "print \"Summary of design:\\nThickness of base slab=\",(D),\" mm. Refer to Fig. 12.11 of textbook for reinforcement details.\"\n",
+ " #answer in textbook for spacing of 10 mm dia bars for main steel in toe and distribution steel is incorrect\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter13_PUt6mPw.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter13_PUt6mPw.ipynb
new file mode 100644
index 00000000..4f93fd39
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter13_PUt6mPw.ipynb
@@ -0,0 +1,168 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13:Water Tanks"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.1:pg-702"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Diameter of tank= 10.1 m\n",
+ "Depth of tank= 3.0 m\n",
+ "Tank wall thickness= 110 mm\n",
+ "Steel-hoop steel; 3 m to 1.5 m below top=16 mm dia @ 130 mm c/c\n",
+ "1.5 m to 0 m below top=16 mm dia @ 260 mm c/c\n",
+ "vertical steel=10 mm dia @ 235 mm c/c\n",
+ "Tank floor: Thickness 150 mm\n",
+ "Steel=10 mm dia @ 170 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_ct=1.2 #in MPa\n",
+ "sigma_st=100 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "V=200000 #capacity, in L\n",
+ "V=V/10**3 #in cu m\n",
+ "h=2.5 #assumed depth of water in tank, in m\n",
+ "A=V/h #area of tank, in sq m\n",
+ "B=math.sqrt(4/math.pi*A) #diameter, in m\n",
+ "B=10.1 #assume, in m\n",
+ "H=h+0.5 #including freeboard, in m\n",
+ "w=10 #unit weight of water, in kN/cu m\n",
+ "T=w*H*B/2 #hoop tension, in kN\n",
+ "Ast=T*10**3/sigma_st #in sq mm\n",
+ "s1=10**3*0.785*16**2/Ast #in mm\n",
+ "s1=130 #assume, in mm\n",
+ "t=(T*10**3/sigma_ct-(m-1)*Ast)/1000 #in mm\n",
+ "t=110 #assume, in mm\n",
+ " #hoop tension steel at 1.5 m below top of wall\n",
+ "h=1.5 #in m\n",
+ "T=w*h*B/2 #in kN\n",
+ "Ast=T*10**3/sigma_st #in sq mm\n",
+ "s2=10**3*0.785*16**2/Ast #in mm\n",
+ "s2=260 #assume, in mm\n",
+ "Ads=0.3/100*t*10**3 #vertical steel as distribution steel, in sq mm\n",
+ "s3=1000*0.785*10**2/Ads #in mm\n",
+ "s3=235 #in mm\n",
+ " #design of tank floor\n",
+ "D=150 #in mm\n",
+ "Ast=0.3/100*D*1000 #in sq mm\n",
+ "s4=1000*0.785*10**2/Ast #in mm\n",
+ "s4=170 #in mm\n",
+ "print \"Summary of design\\nDiameter of tank=\",B,\" m\\nDepth of tank=\",H,\" m\\nTank wall thickness=\",t,\" mm\\nSteel-hoop steel; 3 m to 1.5 m below top=16 mm dia @ \",s1,\" mm c/c\\n1.5 m to 0 m below top=16 mm dia @ \",s2,\" mm c/c\\nvertical steel=10 mm dia @ \",s3,\" mm c/c\\nTank floor: Thickness \",D,\" mm\\nSteel=10 mm dia @ \",s4,\" mm c/c\"\n",
+ " #answer in textbook for spacing of 16 mm dia bars from 1.5 m to 0 m below top is incorrect \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.2:pg-703"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Diameter of tank= 13 m\n",
+ "Depth of tank= 3.5 m\n",
+ "Tank wall thickness= 175 mm\n",
+ "Steel-hoop steel; 4 m to 2 m below top=12 mm dia @ 80 mm c/c\n",
+ "2 m to 0 m below top=12 mm dia @ 145 mm c/c\n",
+ "vertical steel=10 mm dia @ 150 mm c/c\n",
+ "Tank floor: Thickness 190 mm\n",
+ "Steel=10 mm dia @ 135 mm c/c both ways\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_ct=1.2 #in MPa\n",
+ "sigma_st=170 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "V=400000 #capacity, in L\n",
+ "V=V/10**3 #in cu m\n",
+ "h=3 #assumed depth of water in tank, in m\n",
+ "A=V/h #area of tank, in sq m\n",
+ "B=math.sqrt(4/math.pi*A) #diameter, in m\n",
+ "B=13 #assume, in m\n",
+ "H=h+0.5 #including freeboard, in m\n",
+ "w=10 #unit weight of water, in kN/cu m\n",
+ "T=w*H*B/2 #hoop tension, in kN\n",
+ "Ast=T*10**3/sigma_st #in sq mm\n",
+ "s1=10**3*0.785*12**2/Ast #in mm\n",
+ "s1=80 #assume, in mm\n",
+ "t=(T*10**3/sigma_ct-(m-1)*Ast)/1000 #in mm\n",
+ "t=175 #assume, in mm\n",
+ " #steel at 2 m below top of wall\n",
+ "h=2 #in m\n",
+ "T=w*h*B/2 #in kN\n",
+ "Ast=T*10**3/sigma_st #in sq mm\n",
+ "s2=10**3*0.785*12**2/Ast #in mm\n",
+ "s2=145 #assume, in mm\n",
+ "Ads=0.3/100*t*10**3 #vertical steel as distribution steel, in sq mm\n",
+ "s3=1000*0.785*10**2/Ads #in mm\n",
+ "s3=150 #assume, in mm\n",
+ " #design of tank floor\n",
+ "D=190 #in mm\n",
+ "Ast=0.3/100*D*1000 #in sq mm\n",
+ "s4=1000*0.785*10**2/Ast #in mm\n",
+ "s4=135 #assume, in mm\n",
+ "print \"Summary of design\\nDiameter of tank=\",B,\" m\\nDepth of tank=\",H,\" m\\nTank wall thickness=\",t,\" mm\\nSteel-hoop steel; 4 m to 2 m below top=12 mm dia @ \",s1,\" mm c/c\\n2 m to 0 m below top=12 mm dia @ \",s2,\" mm c/c\\nvertical steel=10 mm dia @ \",s3,\" mm c/c\\nTank floor: Thickness \",D,\" mm\\nSteel=10 mm dia @ \",s4,\" mm c/c both ways\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter14_1MNPptQ.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter14_1MNPptQ.ipynb
new file mode 100644
index 00000000..ee39f719
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter14_1MNPptQ.ipynb
@@ -0,0 +1,301 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14:Limit State Met"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.1:pg-761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 113.63413824 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=250 #width, in mm\n",
+ "d=500 #effective depth, in mm\n",
+ "Ast=4*0.785*20**2 #four 20 mm dia bars, in sq mm\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "Xu=round(0.87*fy*Ast/0.36/fck/b) #in mm\n",
+ "Xc=0.531*d #in mm\n",
+ " #as Xu<Xc, it is under-reinforced section, hence OK\n",
+ "Mu=0.87*fy*Ast*(d-0.416*Xu)/10**6 #in kN-m\n",
+ "print \"Moment of resistance of the beam=\",Mu,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.2:pg-761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 215.491597517 kN-m\n",
+ "Steel required= 1019.0 sq mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300 #width, in mm\n",
+ "d=600 #effective depth, in mm\n",
+ "fck=15 #in MPa\n",
+ "fy=500 #in MPa\n",
+ "Xc=0.456*d #in mm\n",
+ "Mu=0.36*fck*b*Xc*(d-0.416*Xc)/10**6 #in kN-m\n",
+ "Ast=round(0.36*fck*b*Xc/0.87/fy) #in sq mm\n",
+ "print \"Moment of resistance of the beam=\",Mu,\" kN-m\\nSteel required=\",Ast,\" sq mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.3:pg-762"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 298.250458214 kN-m\n",
+ "Steel required= 1719.0 sq mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300 #width, in mm\n",
+ "d=600 #effective depth, in mm\n",
+ "fck=20 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "Xc=0.479*d #in mm\n",
+ "Mu=0.36*fck*b*Xc*(d-0.416*Xc)/10**6 #in kN-m\n",
+ "Ast=round(0.36*fck*b*Xc/0.87/fy) #in sq mm\n",
+ "print \"Moment of resistance of the beam=\",Mu,\" kN-m\\nSteel required=\",(Ast),\" sq mm\"\n",
+ " #answer does not match with textbook because of round-off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.3:pg-763"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Safe load on the beam= 24.6170681259 kN/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300 #width, in mm\n",
+ "d=650 #effective depth, in mm\n",
+ "Ast=942 #in sq mm\n",
+ "lef=6 #in m\n",
+ "fck=20 #in MPa\n",
+ "fy=340 #in MPa\n",
+ "Xu=round(0.87*fy*Ast/0.36/fck/b) #in mm\n",
+ "Xc=0.5*d #in mm\n",
+ " #as Xu<Xc, it is under-reinforced beam, hence OK\n",
+ "Mu=0.87*fy*Ast*(d-0.416*Xu)/10**6 #in kN-m\n",
+ "Wu=Mu*8/lef**2 #in kN/m\n",
+ "self_weight=25*(b/1000)*(d/1000) #in kN/m\n",
+ "W=Wu/1.5-self_weight #in kN/m\n",
+ "print \"Safe load on the beam=\",W,\" kN/m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.4:pg-764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Safe load on the slab= 16.3561454229 kN/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=1000 #width, in mm\n",
+ "d=120 #effective depth, in mm\n",
+ "Ast=1412 #in sq mm\n",
+ "lef=3.2 #in m\n",
+ "fck=20 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "Xu=0.87*fy*Ast/0.36/fck/b #in mm\n",
+ "Xc=0.531*d #in mm\n",
+ " #as Xu<Xc, it is under-reinforced section, hence OK\n",
+ "Mu=0.87*fy*Ast*(d-0.416*Xu)/10**6 #in kN-m\n",
+ "Wu=Mu*8/lef**2 #in kN/m\n",
+ "self_weight=25*(b/1000)*(d/1000) #in kN/m\n",
+ "W=Wu/1.5-self_weight #in kN/m\n",
+ "print \"Safe load on the slab=\",W,\" kN/m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.5:pg-765"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b= 222 mm\n",
+ "d= 445 mm\n",
+ "Ast= 1302.0 sq mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ " #b=d/2\n",
+ "M=65 #in kN-m\n",
+ "Mu=1.5*M #factored moment, in kN-m\n",
+ "d=(Mu*10**6/(0.149*fck*0.5))**(1/3) #in mm\n",
+ "d=445 #approximately, in mm\n",
+ "b=d/2 #in mm\n",
+ "Xc=0.531*d #in mm\n",
+ "Ast=round(0.36*fck*b*Xc/0.87/fy) #in sq mm\n",
+ "print \"b=\",b,\" mm\\nd=\",d,\" mm\\nAst=\",Ast,\" sq mm\"\n",
+ " #answer does not match with textbook because of round-off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.6:pg-766"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Area of steel required= 959.0 sq mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300 #width, in mm\n",
+ "d=500 #effective depth, in mm\n",
+ "fck=20 #in MPa\n",
+ "fy=500 #in MPa\n",
+ "Mu=175 #in kN-m\n",
+ "Mulim=0.133*fck*b*d**2/10**6 #in kN-m\n",
+ "#as Mu<Mulim, beam is under-reinforced\n",
+ "#using Cu=Tu, Xu=0.87 fy Ast/(0.36 fck b); let Xu= a Ast\n",
+ "a=0.87*fy/(0.36*fck*b)\n",
+ " #Mu=0.87 fy Ast (d-0.416 Xu), putting Xu = a Ast, we get p Ast**2 + q Ast + r =0\n",
+ "p=0.87*0.416*fy*a\n",
+ "q=-0.87*fy*d\n",
+ "r=Mu*10**6\n",
+ " #solving the quadratic equation\n",
+ "Ast=round((-q-math.sqrt(q**2-4*p*r))/2/p) #in sq mm\n",
+ "print \"Area of steel required=\",(Ast),\" sq mm\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter15_xVW7XGn.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter15_xVW7XGn.ipynb
new file mode 100644
index 00000000..4f33f0e8
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter15_xVW7XGn.ipynb
@@ -0,0 +1,314 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 15:Doubly Reinforced Sections"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.1:pg-792"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam = 556.299941443 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300 #width, in mm\n",
+ "d=800 #effective depth, in mm\n",
+ "Ast=3940 #in sq mm\n",
+ "Asc=795 #in sq mm\n",
+ "top_cover=40 #in mm\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "Xc=0.531*d #in mm\n",
+ "fcc=0.446*fck #in MPa\n",
+ "fsc=0.87*fy #in MPa\n",
+ "Mu=(0.36*fck*b*Xc*(d-0.416*Xc)+(fsc-fcc)*Asc*(d-top_cover))/10**6 #in kN-m\n",
+ "print \"Moment of resistance of the beam = \",Mu,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.2:pg-793"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam = 281.483345273 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=230 #width, in mm\n",
+ "d=600 #effective depth, in mm\n",
+ "Asc=554 #in sq mm\n",
+ "Ast=1524 #in sq mm\n",
+ "top_cover=30 #in mm\n",
+ "fck=15 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "Xc=0.479*d #in mm\n",
+ "fcc=0.446*fck #in MPa\n",
+ " #for d'/d=30/600=0.05 and Fe415 grade steel,\n",
+ "fsc=355 #in MPa\n",
+ "Mu=(0.36*fck*b*Xc*(d-0.416*Xc)+(fsc-fcc)*Asc*(d-top_cover))/10**6 #in kN-m\n",
+ "print \"Moment of resistance of the beam = \",Mu,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.3:pg-794"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "As factored moment is less than limiting moment, no steel is required on compression side (as per LSM)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=250 #width, in mm\n",
+ "d=550 #effective depth, in mm\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "M=95 #in kN-m\n",
+ "Mu=1.5*M #factored moment, in kN-m\n",
+ "Mulim=0.149*fck*b*d**2/10**6 #in kN-m\n",
+ " #as Mu<Mulim, no steel required on compression side\n",
+ "print \"As factored moment is less than limiting moment, no steel is required on compression side (as per LSM)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.4:pg-794"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam = 135.03389454 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=225 #width, in mm\n",
+ "d=500 #effective depth, in mm\n",
+ "Asc=125 #in sq mm\n",
+ "Ast=754 #in sq mm\n",
+ "top_cover=50 #in mm\n",
+ "fck=15 #in MPa\n",
+ "fy=500 #in MPa\n",
+ "Xc=0.456*d #in mm\n",
+ "fcc=0.446*fck #in MPa\n",
+ " #for d'/d=50/500=0.1 and Fe500 grade steel,\n",
+ "fsc=412 #in MPa\n",
+ "Mu=(0.36*fck*b*Xc*(d-0.416*Xc)+(fsc-fcc)*Asc*(d-top_cover))/10**6 #in kN-m\n",
+ "print \"Moment of resistance of the beam = \",Mu,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.5:pg-795"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Compression steel = 267.0 sq mm\n",
+ "Tension steel = 1907.0 sq mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=250 #width, in mm\n",
+ "d=500 #effective depth, in mm\n",
+ "Mu=165 #in kN-m\n",
+ "top_cover=50 #in mm\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "Xc=0.531*d #in mm\n",
+ "Mulim=0.149*fck*b*d**2/10**6 #in kN-m\n",
+ "Ast1=round(0.36*fck*b*Xc/0.87/fy) #in sq mm\n",
+ "M1=Mu-Mulim #in kN-m\n",
+ "fcc=0.446*fck #in MPa\n",
+ "fsc=0.87*fy #in MPa\n",
+ "Asc=round(M1*10**6/(fsc-fcc)/(d-top_cover)) #in sq mm\n",
+ "Ast2=round((fsc-fcc)*Asc/0.87/fy) #in sq mm\n",
+ "Ast=Ast1+Ast2 #in sq mm\n",
+ "print \"Compression steel = \",Asc,\" sq mm\\nTension steel = \",Ast,\" sq mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.6:pg-796"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Compression steel = 262.0 sq mm\n",
+ "Tension steel = 823.0 sq mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=200 #width, in mm\n",
+ "d=300 #effective depth, in mm\n",
+ "Mu=74 #in kN-m\n",
+ "top_cover=30 #in mm\n",
+ "fck=20 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "Xc=0.479*d #in mm\n",
+ "Mulim=0.138*fck*b*d**2/10**6 #in kN-m\n",
+ "Ast1=round(0.36*fck*b*Xc/0.87/fy) #in sq mm\n",
+ "M1=Mu-Mulim #in kN-m\n",
+ "fcc=0.446*fck #in MPa\n",
+ " #for d'/d=30/300=0.1 and Fe415 grade steel,\n",
+ "fsc=353 #in MPa\n",
+ "Asc=round(M1*10**6/(fsc-fcc)/(d-top_cover)) #in sq mm\n",
+ "Ast2=round((fsc-fcc)*Asc/0.87/fy) #in sq mm\n",
+ "Ast=Ast1+Ast2 #in sq mm\n",
+ "print \"Compression steel = \",Asc,\" sq mm\\nTension steel = \",Ast,\" sq mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.7:pg-797"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Compression steel = 163.0 sq mm\n",
+ "Tension steel = 447.0 sq mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=200 #width, in mm\n",
+ "d=200 #effective depth, in mm\n",
+ "Mu=32 #in kN-m\n",
+ "top_cover=30 #in mm\n",
+ "fck=20 #in MPa\n",
+ "fy=500 #in MPa\n",
+ "Xc=0.456*d #in mm\n",
+ "Mulim=0.133*fck*b*d**2/10**6 #in kN-m\n",
+ "Ast1=round(0.36*fck*b*Xc/0.87/fy) #in sq mm\n",
+ "M1=Mu-Mulim #in kN-m\n",
+ "fcc=0.446*fck #in MPa\n",
+ " #for d'/d=30/200=0.15 and Fe500 grade steel,\n",
+ "fsc=395 #in MPa\n",
+ "Asc=round(M1*10**6/(fsc-fcc)/(d-top_cover)) #in sq mm\n",
+ "Ast2=round((fsc-fcc)*Asc/0.87/fy) #in sq mm\n",
+ "Ast=Ast1+Ast2 #in sq mm\n",
+ "print \"Compression steel = \",Asc,\" sq mm\\nTension steel = \",Ast,\" sq mm\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter16_au5Aji1.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter16_au5Aji1.ipynb
new file mode 100644
index 00000000..862a551d
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter16_au5Aji1.ipynb
@@ -0,0 +1,279 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16:T Beams"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.1:pg-867"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of T-beam= 470.560221818 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Df=120 #in mm\n",
+ "bf=1100 #in mm\n",
+ "bw=275 #in mm\n",
+ "d=450 #in mm\n",
+ "Ast=2700 #in sq mm\n",
+ "fy=500 #in MPa\n",
+ "fck=25 #in MPa\n",
+ "Asf=round(0.36*fck*bf*Df/0.87/fy) #area of steel required for flange, in sq mm\n",
+ " #as Ast<Asf, Xu<Df\n",
+ "Xu=0.87*fy*Ast/0.36/fck/bf #in mm\n",
+ "Mu=0.36*fck*bf*Xu*(d-0.416*Xu)/10**6 #in kN-m\n",
+ "print \"Moment of resistance of T-beam=\",Mu,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.2:pg-868"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of T-beam= 862.135878917 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Df=100 #in mm\n",
+ "bf=1500 #in mm\n",
+ "bw=300 #in mm\n",
+ "d=600 #in mm\n",
+ "Ast=4500 #in sq mm\n",
+ "fy=415 #in MPa\n",
+ "fck=20 #in MPa\n",
+ "Asf=round(0.36*fck*bf*Df/0.87/fy) #area of steel required for flange, in sq mm\n",
+ " #as Ast>Asf, Xu>Df\n",
+ "Xu=(0.87*fy*Ast-0.446*fck*(bf-bw)*Df)/0.36/fck/bw #in mm\n",
+ "Xc=0.479*d #Xc>Xu; hence OK\n",
+ "a=0.43*Xu #as Df<0.43 Xu, stress in flange is uniform\n",
+ "Mu=(0.36*fck*bw*Xu*(d-0.416*Xu)+0.446*fck*(bf-bw)*Df*(d-Df/2))/10**6 #in kN-m\n",
+ "print \"Moment of resistance of T-beam=\",Mu,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.3:pg-869"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of T-beam= 547.9209765 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Df=100 #in mm\n",
+ "bf=1500 #in mm\n",
+ "bw=300 #in mm\n",
+ "d=700 #in mm\n",
+ "Ast=4510 #in sq mm\n",
+ "fy=250 #in MPa\n",
+ "fck=15 #in MPa\n",
+ "Asf=round(0.36*fck*bf*Df/0.87/fy) #area of steel required for flange, in sq mm\n",
+ " #as Ast>Asf, Xu>Df\n",
+ "Xu=round((0.87*fy*Ast-0.446*fck*(bf-bw)*Df)/0.36/fck/bw) #in mm\n",
+ "Xc=0.531*d #Xc>Xu; hence OK\n",
+ "a=0.43*Xu #as Df>0.43 Xu, stress in flange is not uniform\n",
+ "yf=0.15*Xu+0.65*Df #in mm\n",
+ "Mu=(0.36*fck*bw*Xu*(d-0.416*Xu)+0.446*fck*(bf-bw)*yf*(d-yf/2))/10**6 #in kN-m\n",
+ "print \"Moment of resistance of T-beam=\",Mu,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.4:pg-870"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of T-beam= 610.289086931 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Df=100 #in mm\n",
+ "bf=1250 #in mm\n",
+ "bw=250 #in mm\n",
+ "d=650 #in mm\n",
+ "Ast=2800 #in sq mm\n",
+ "fy=415 #in MPa\n",
+ "fck=20 #in MPa\n",
+ "Asf=round(0.36*fck*bf*Df/0.87/fy) #area of steel required for flange, in sq mm\n",
+ " #as Ast>Asf, Xu>Df\n",
+ "Xu=round((0.87*fy*Ast-0.446*fck*(bf-bw)*Df)/0.36/fck/bw) #in mm\n",
+ " #but Xu<Df; this indicates that stress in the flange is not uniform, hence replace Df by yf\n",
+ "Xu=(0.87*fy*Ast-0.446*fck*(bf-bw)*0.65*Df)/(0.36*fck*bw+0.446*fck*(bf-bw)*0.15) #in mm\n",
+ "Xc=0.479*d #Xc>Xu; hence OK\n",
+ "a=0.43*Xu #as Df>0.43 Xu, stress in flange is not uniform\n",
+ "yf=0.15*Xu+0.65*Df #in mm\n",
+ "Mu=(0.36*fck*bw*Xu*(d-0.416*Xu)+0.446*fck*(bf-bw)*yf*(d-yf/2))/10**6 #in kN-m\n",
+ "print \"Moment of resistance of T-beam=\",Mu,\" kN-m\"\n",
+ " #answer in textbook is incorrect\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.5:pg-871"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of T-beam= 651.372905965 kN-m\n",
+ "Area of steel required= 5251.13103448 sq mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Df=100 #in mm\n",
+ "bf=1250 #in mm\n",
+ "bw=250 #in mm\n",
+ "d=660 #in mm\n",
+ "fy=250 #in MPa\n",
+ "fck=15 #in MPa\n",
+ "Xc=0.531*d #in mm\n",
+ "a=0.43*Xc #Df<0.43 Xu, stress in entire flange is uniform\n",
+ "Mu=(0.36*fck*bw*Xc*(d-0.416*Xc)+0.446*fck*(bf-bw)*Df*(d-Df/2))/10**6 #in kN-m\n",
+ "Ast=(0.36*fck*bw*Xc+0.446*fck*(bf-bw)*Df)/0.87/fy #in sq mm\n",
+ "print \"Moment of resistance of T-beam=\",Mu,\" kN-m\\nArea of steel required=\",Ast,\" sq mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.6:pg-872"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Area of steel required= 2208.32488139 sq mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Df=100 #in mm\n",
+ "bf=1250 #in mm\n",
+ "bw=250 #in mm\n",
+ "d=550 #in mm\n",
+ "Mu=400 #in kN-m\n",
+ "fy=415 #in MPa\n",
+ "fck=15 #in MPa\n",
+ "Asf=0.446*fck*(bf-bw)*Df/0.87/fy #in sq mm\n",
+ "Muf=0.446*fck*(bf-bw)*Df*(d-Df/2)/10**6 #in kN-m\n",
+ "Muw=Mu-Muf #in kN-m\n",
+ " #using Cu=Tu, 0.36 fck bw Xu = 0.87 fy Ast, Xu = a Asw\n",
+ "a=0.87*fy/0.36/fck/bw\n",
+ " #Muw=0.87 fy Asw (d-0.416 Xu)\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d\n",
+ "r=Muw*10**6\n",
+ "Asw=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ "Ast=Asw+Asf #in sq mm\n",
+ "print \"Area of steel required=\",Ast,\" sq mm\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter17_0ixqhLJ.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter17_0ixqhLJ.ipynb
new file mode 100644
index 00000000..9cca9ebe
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter17_0ixqhLJ.ipynb
@@ -0,0 +1,124 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 17:Shear and Development Length"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.1:pg-905"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Nominal shear stress= 0.704347826087 MPa\n",
+ "Shear strength of concrete= 0.64 MPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=230 #width, in mm\n",
+ "d=500 #effective depth, in mm\n",
+ "l=4.5 #span, in m\n",
+ "Ast=4*0.785*20**2 #four 20 mm dia bars, in sq mm\n",
+ "fck=20 #in MPa\n",
+ "W=24 #in kN/m\n",
+ "Wu=1.5*W #factored load, in kN/m\n",
+ "Vu=Wu*l/2 #in kN\n",
+ "Tv=Vu*10**3/b/d #in MPa\n",
+ "Tcmax=2.8 #for M20, in MPa\n",
+ " #Tv<Tcmax, hence OK\n",
+ "p=Ast/b/d*100 #p=1.1, approximately\n",
+ " #for p=1.1 and M20 grade concrete\n",
+ "Tc=0.64 #in MPa\n",
+ " #Tv>Tc, hence shear reinforcement required\n",
+ "print \"Nominal shear stress=\",Tv,\" MPa\\nShear strength of concrete=\",Tc,\" MPa\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.2:pg-906"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Provide 6 mm dia stirrups at 118 mm c/c as shear reinforcement\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300 #width, in mm\n",
+ "d=1010 #effective depth, in mm\n",
+ "l=7 #span, in m\n",
+ "Ast=round(6*0.785*22**2) #six 22 mm dia bars, in sq mm\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "W=45 #in kN/m\n",
+ "Wu=1.5*W #factored load, in kN/m\n",
+ "Vu=Wu*l/2 #in kN\n",
+ "Tv=Vu*10**3/b/d #in MPa\n",
+ " #Tv<Tcmax, hence OK\n",
+ "p=Ast/b/d*100 #p=0.75, approximately\n",
+ " #for p=0.75 and M15 grade concrete\n",
+ "Tc=0.54 #in MPa\n",
+ " #Tv>Tc, hence shear reinforcement required\n",
+ "Vus=Vu-Tc*b*d/10**3 #in kN\n",
+ " #provide 6 mm dia stirrups\n",
+ "Sv=0.87*fy*2*0.785*6**2*d/Vus/10**3 #in mm\n",
+ "Sv=171 #approximately, in mm\n",
+ "Svmin=2*0.785*6**2*fy/b/0.4 #in mm\n",
+ "Svmin=118 #approximately, in mm\n",
+ "Sv=min(Sv,Svmin) #in mm\n",
+ "print \"Provide 6 mm dia stirrups at \",(Sv),\" mm c/c as shear reinforcement\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter18_jjgTIC5.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter18_jjgTIC5.ipynb
new file mode 100644
index 00000000..42fdbe26
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter18_jjgTIC5.ipynb
@@ -0,0 +1,361 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 18:Columns"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.1:pg-977"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Column size - 530 x 530 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Pu=3000 #in kN\n",
+ "fck=20 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "l=3 #unsupported length, in m\n",
+ " #assume 1% steel\n",
+ "Ag=Pu*10**3/(0.4*fck*0.99+0.67*fy*0.01) #in sq mm\n",
+ "L=math.sqrt(Ag) #assuming a square column\n",
+ "L=530 #in mm\n",
+ "Asc=0.01*L**2 #in sq mm\n",
+ "emin=l*10**3/500+L/30 #in mm\n",
+ "ep=0.05*L #>emin, hence OK\n",
+ "print \"Column size - \",L,\" x \",L,\" mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.2:pg-978"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The column is safe on long dimension side but not on short dimension side. As such, the column be checked for eccentricity in short direction.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Pu=1500 #in kN\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "l=2.75 #unsupported length, in m\n",
+ " #assume 1% steel\n",
+ "Ag=Pu*10**3/(0.4*fck*0.99+0.67*fy*0.01) #in sq mm\n",
+ "L1=225 #assuming a square column\n",
+ "L2=Ag/L1 #in mm\n",
+ "L2=880 #in mm\n",
+ "Asc=0.01*L1*L2 #in sq mm\n",
+ "e1=l*10**3/500+L1/30 #in mm\n",
+ "e2=l*10**3/500+L2/30 #in mm\n",
+ "ep1=0.05*L1 #<e1\n",
+ "ep2=0.05*L2 #>e2, hence Ok\n",
+ "print \"The column is safe on long dimension side but not on short dimension side. As such, the column be checked for eccentricity in short direction.\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.3:pg-978"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) For xu = 1.1 D\n",
+ "P= 1446.61010463 kN\n",
+ "Mu= 67.6351908515 kN-m\n",
+ "\n",
+ "(ii) For xu = 330 mm\n",
+ "P= 384.47253 kN\n",
+ "Mu= 261.45522765 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=225 #in mm\n",
+ "D=500 #in mm\n",
+ "c=45 #cover, in mm\n",
+ "Asc=2463 #in sq mm\n",
+ "Ast=Asc\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "fcc=0.446*fck #in MPa\n",
+ " #(i)\n",
+ "xu=1.1*D #in mm\n",
+ "m=0.43*D #in mm\n",
+ "esc1=0.002*(xu-c)/(xu-m)\n",
+ "esc2=0.002*(xu-D+c)/(xu-m)\n",
+ " #by interpolation\n",
+ "fsc1=217.5 #in MPa\n",
+ "fsc2=217.5*esc2/0.0010875 #in MPa\n",
+ " #stress block parameters for xu / D = 1.1\n",
+ "n=0.384\n",
+ "l=0.443\n",
+ "A=n*fck*D #area of stress block\n",
+ "r=l*D #distance of c.g., in mm\n",
+ "Pu=(A*b+Asc*(fsc1-fcc)+Ast*fsc2)/10**3\n",
+ "Mu=(A*b*(D/2-r)+Asc*(fsc1-fcc)*(D/2-c)-Ast*fsc2*(D/2-c))/10**6\n",
+ "print \"(i) For xu = 1.1 D\\nP=\",Pu,\" kN\\nMu=\",Mu,\" kN-m\\n\"\n",
+ "#answer in textbook is incorrect\n",
+ "#(ii)\n",
+ "xu=330 #in mm\n",
+ "esc=0.0035*(xu-c)/xu\n",
+ "est=0.0035*(D-c-xu)/xu\n",
+ "#by interpolation\n",
+ "fsc=217.5 #in MPa\n",
+ "fst=217.5 #in MPa\n",
+ "Pu=(0.36*fck*b*xu+Asc*(fsc-fcc)-Ast*fst)/10**3 #in kN\n",
+ "Mu=(0.36*fck*b*xu*(D/2-0.416*xu)+Asc*(fsc-fcc)*(D/2-c)+Ast*fst*(D/2-c))/10**6 #in kN-m\n",
+ "print \"(ii) For xu = 330 mm\\nP=\",Pu,\" kN\\nMu=\",Mu,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.4:pg-979"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) For xu = 1.4 D\n",
+ "P= 1016.73308 kN\n",
+ "Mu= 16.0682812 kN-m\n",
+ "\n",
+ "(ii) For xu = 370 mm\n",
+ "P= 757.19772 kN\n",
+ "Mu= 54.4459644 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300 #in mm\n",
+ "D=400 #in mm\n",
+ "c=30 #cover, in mm\n",
+ "Asc=452 #in sq mm\n",
+ "Ast=Asc\n",
+ "fck=15 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "fcc=0.446*fck #in MPa\n",
+ " #(i)\n",
+ "xu=1.4*D #in mm\n",
+ "m=0.43*D #in mm\n",
+ "esc1=0.002*(xu-c)/(xu-m)\n",
+ "esc2=0.002*(xu-D+c)/(xu-m)\n",
+ " #by interpolation\n",
+ "fsc1=356.8 #in MPa\n",
+ "fsc2=238.68 #in MPa\n",
+ " #stress block parameters for xu / D = 1.4\n",
+ "n=0.417\n",
+ "l=0.475\n",
+ "A=n*fck*D #area of stress block\n",
+ "r=l*D #distance of c.g., in mm\n",
+ "Pu=(A*b+Asc*(fsc1-fcc)+Ast*fsc2)/10**3 #in kN\n",
+ "Mu=(A*b*(D/2-r)+Asc*(fsc1-fcc)*(D/2-c)-Ast*fsc2*(D/2-c))/10**6 #in kN-m\n",
+ "print \"(i) For xu = 1.4 D\\nP=\",Pu,\" kN\\nMu=\",Mu,\" kN-m\\n\"\n",
+ " #(ii)\n",
+ "xu=370 #in mm\n",
+ "esc=0.0035*(xu-c)/xu\n",
+ "est=0.0035*(D-c-xu)/xu\n",
+ " #by interpolation\n",
+ "fsc=355.8 #in MPa\n",
+ "Pu=(0.36*fck*b*xu+Asc*(fsc-fcc))/10**3 #in kN\n",
+ "Mu=(0.36*fck*b*xu*(D/2-0.416*xu)+Asc*(fsc-fcc)*(D/2-c))/10**6 #in kN-m\n",
+ "print \"(ii) For xu = 370 mm\\nP=\",Pu,\" kN\\nMu=\",Mu,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.5:pg-980"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) For xu = 1.3 D\n",
+ "P= 1813.08128 kN\n",
+ "Mu= 81.543504 kN-m\n",
+ "\n",
+ "(ii) For xu = 400 mm\n",
+ "P= 1143.1248 kN\n",
+ "Mu= 206.36736 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=225 #in mm\n",
+ "D=500 #in mm\n",
+ "c=50 #cover, in mm\n",
+ "Asc=1520 #in sq mm\n",
+ "Ast=Asc\n",
+ "fck=20 #in MPa\n",
+ "fy=500 #in MPa\n",
+ "fcc=0.446*fck #in MPa\n",
+ " #(i)\n",
+ "xu=1.3*D #in mm\n",
+ "m=0.43*D #in mm\n",
+ "esc1=0.002*(xu-c)/(xu-m)\n",
+ "esc2=0.002*(xu-D+c)/(xu-m)\n",
+ " #by interpolation\n",
+ "fsc1=412.515 #in MPa\n",
+ "fsc2=183.794 #in MPa\n",
+ " #stress block parameters for xu / D = 1.3\n",
+ "n=0.409\n",
+ "l=0.468\n",
+ "A=n*fck*D #area of stress block\n",
+ "r=l*D #distance of c.g., in mm\n",
+ "Pu=(A*b+Asc*(fsc1-fcc)+Ast*fsc2)/10**3 #in kN\n",
+ "Mu=(A*b*(D/2-r)+Asc*(fsc1-fcc)*(D/2-c)-Ast*fsc2*(D/2-c))/10**6 #in kN-m\n",
+ "print \"(i) For xu = 1.3 D\\nP=\",Pu,\" kN\\nMu=\",Mu,\" kN-m\\n\"\n",
+ " #(ii)\n",
+ "xu=400 #in mm\n",
+ "esc=0.0035*(xu-c)/xu\n",
+ "est=0.0035*(D-c-xu)/xu\n",
+ " #by interpolation\n",
+ "fsc=422.11 #in MPa\n",
+ "fst=87.45 #in MPa\n",
+ "Pu=(0.36*fck*b*xu+Asc*(fsc-fcc)-Ast*fst)/10**3 #in kN\n",
+ "Mu=(0.36*fck*b*xu*(D/2-0.416*xu)+Asc*(fsc-fcc)*(D/2-c)+Ast*fst*(D/2-c))/10**6 #in kN-m\n",
+ "print \"(ii) For xu = 400 mm\\nP=\",Pu,\" kN\\nMu=\",Mu,\" kN-m\"\n",
+ " #answer in textbook for Mu in (ii) is incorrect\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.6:pg-981"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Additional Moments are:\n",
+ "Max= 4.8 kN/m\n",
+ "May= 9.6 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=250.0 #column width, in mm\n",
+ "D=500.0 #column depth, in mm\n",
+ "lex=4.0 #in m\n",
+ "ley=4.0 #in m\n",
+ "Pu=300.0 #in kN\n",
+ "Asc=1472.0 #in sq mm\n",
+ "Ast=1472.0 #in sq mm\n",
+ "fck=15.0 #in MPa\n",
+ "fy=250.0 #in MPa\n",
+ "c=50 #cover, in mm\n",
+ "Max=Pu*10**3*D/2000*(lex/(D/10**3))**2.0/10**6 #in kN-m\n",
+ "May=Pu*10.0**3*b/2000*(ley/(b/10**3))**2.0/10**6 #in kN-m\n",
+ "Puz=(0.45*fck*(b*D-(Asc+Ast))+0.75*fy*(Asc+Ast))/10**3 #in kN\n",
+ " #to find Pb\n",
+ "xu=(D-c)/(1+0.002/0.0035) #in mm\n",
+ "fsc=217.5 #in MPa\n",
+ "fst=217.5 #in MPa\n",
+ "Pb=(0.36*fck*b*xu+fsc*Asc-fst*Ast)/10**3 #in kN\n",
+ "k=(Puz-Pu)/(Puz-Pb) #>1\n",
+ "k=1\n",
+ "Max=k*Max #in kN-m\n",
+ "May=k*May #in kN-m\n",
+ "print \"Additional Moments are:\\nMax=\",Max,\" kN/m\\nMay=\",May,\" kN-m\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter19_Z3Jn476.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter19_Z3Jn476.ipynb
new file mode 100644
index 00000000..cdd3dc10
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter19_Z3Jn476.ipynb
@@ -0,0 +1,1367 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 19:Designs by Limit State Method"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.1:pg-1012"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Slab thickness= 125.0 mm\n",
+ "Cover = 15 mm\n",
+ "Main steel = 12 mm dia @ 105.0 mm c/c\n",
+ "Distribution steel = 8 mm dia @ 265.0 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "fck=15 #in MPa\n",
+ "fy=250.0 #in MPa\n",
+ "l=4 #span, in m\n",
+ "MF=1.6\n",
+ "a=MF*20\n",
+ "D=l*10.0**3/a #in mm\n",
+ "W1=(D/10.0**3)*25 #self-weight, in kN/m\n",
+ "W2=1 #floor finish, in kN/m\n",
+ "W3=2 #live load, in kN/m\n",
+ "W=W1+W2+W3 #in kN/m\n",
+ "Wu=1.5*W #in kN/m\n",
+ "lef=4.125 #in m\n",
+ "Mu=Wu*lef**2/8 #in kN-m\n",
+ "d=math.sqrt(Mu*10**6/0.149/fck/10**3) #in mm\n",
+ "dia=12 #assume 12 mm dia bars\n",
+ "D=d+dia/2+15 #<125 mm (assumed value), hence OK\n",
+ "D=125 #in mm\n",
+ "d=D-dia/2-15 #in mm\n",
+ "#steel\n",
+ "#Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/10**3\n",
+ "#using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d\n",
+ "r=Mu*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2.0/p #in sq mm\n",
+ "s1=1000*0.785*dia**2/Ast #in mm\n",
+ "s1=105 #in mm\n",
+ "pt=1000*0.785*dia**2/s1/10**3/d*100.0 #in %\n",
+ "Ads=0.15/100*10**3*D #in sq mm\n",
+ " #provide 8 mm dia bars\n",
+ "s2=1000*0.785*8**2/Ads #in mm\n",
+ "s2=265 #in mm\n",
+ "Vu=Wu*lef/2 #in kN\n",
+ "Tv=Vu*10**3/10**3/d #in MPa\n",
+ " #for M15 and pt=1\n",
+ "Tc=0.6 #in MPa\n",
+ " #for solid slabs\n",
+ "Tc=1.3*Tc #in MPa\n",
+ " #as Tc>Tv, no shear reinforcement required\n",
+ "print \"Summary of design:\\nSlab thickness= \",round(D,2),\" mm\\nCover = 15 mm\\nMain steel = 12 mm dia @ \",round(s1,2),\" mm c/c\\nDistribution steel = 8 mm dia @ \",round(s2,2),\" mm c/c\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.2:pg-1013"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Slab thickness= 160 mm\n",
+ "Cover = 15 mm\n",
+ "Main steel = 12 mm dia @ 112 mm c/c\n",
+ "Distribution steel = 8 mm dia @ 260.0 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "fck=15 #in MPa\n",
+ "fy=415.0 #in MPa\n",
+ "l=4.5 #span, in m\n",
+ "MF=1.4\n",
+ "a=MF*20.0\n",
+ "D=l*10**3.0/a #in mm\n",
+ "D=160.0 #in mm\n",
+ "W1=(D/10.0**3)*25 #self-weight, in kN/m\n",
+ "W2=1 #floor finish, in kN/m\n",
+ "W3=1 #partitions, in kN/m\n",
+ "W4=4 #live load, in kN/m\n",
+ "W=W1+W2+W3+W4 #in kN/m\n",
+ "Wu=1.5*W #in kN/m\n",
+ "lef=l+0.16 #in m\n",
+ "Mu=Wu*lef**2.0/8 #in kN-m\n",
+ "d=math.sqrt(Mu*10.0**6/0.138/fck/10.0**3) #in mm\n",
+ "dia=12 #assume 12 mm dia bars\n",
+ "D=d+dia/2.0+15 #=160 mm(assumed value), approximately\n",
+ "D=160 #in mm\n",
+ "d=140 #in mm\n",
+ "#steel\n",
+ "#Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/10**3\n",
+ "#using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d\n",
+ "r=Mu*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ "s1=1000*0.785*dia**2/Ast #in mm\n",
+ "s1=112 #in mm\n",
+ "pt=Ast/10**3/d*100 #in %\n",
+ "Ads=0.12/100*10**3*D #in sq mm\n",
+ "#provide 8 mm dia bars\n",
+ "s2=1000*0.785*8**2/Ads #in mm\n",
+ "s2=260 #in mm\n",
+ "Vu=Wu*lef/2 #in kN\n",
+ "Tv=Vu*10**3.0/10**3/d #in MPa\n",
+ "#for M15 and pt=0.718\n",
+ "Tc=0.53 #in MPa\n",
+ "#for solid slabs\n",
+ "Tc=1.25*Tc #in MPa\n",
+ "#as Tc>Tv, no shear reinforcement required\n",
+ "print \"Summary of design:\\nSlab thickness= \",(D),\" mm\\nCover = 15 mm\\nMain steel = 12 mm dia @ \",(s1),\" mm c/c\\nDistribution steel = 8 mm dia @ \",round(s2,2),\" mm c/c\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.3:pg-1013"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Thickness of slab = 100 mm\n",
+ "Cover = 15 mm\n",
+ "Main steel = 8 mm dia @ 235 mm c/c\n",
+ "Development length = 452 mm\n",
+ "Distribution steel = 6 mm dia @ 235 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "fck=15 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "MF=1.4 #modification factor\n",
+ " #let a be span to depth ratio\n",
+ "l=1 #span, in m\n",
+ "a=MF*7\n",
+ "D=l*1000/a #in mm\n",
+ "D=105 #assume, in mm\n",
+ " #to calculate loading\n",
+ "W1=25*(D/10**3)*1.5 #self-weight, in kN/m\n",
+ "W2=0.5*1.5 #finish, in kN/m\n",
+ "W3=0.75*1.5 #live load, in kN/m\n",
+ "W=W1+W2+W3 #in kN/m\n",
+ "Wu=1.5*W #in kN/m\n",
+ "lef=l+0.23/2 #effective span, in m\n",
+ "Mu=Wu*lef/2 #in kN-m\n",
+ " #check for depth\n",
+ "d=math.sqrt(Mu*10**6/(0.138*fck*1500)) #in mm\n",
+ "dia=12 #assume 12 mm dia bars\n",
+ "D=d+12/2+15 #<105, hence OK\n",
+ "D=100 #assume, in mm\n",
+ "d=D-dia/2-15 #in mm\n",
+ "#steel\n",
+ "#Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/1.5/10**3\n",
+ " #using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d\n",
+ "r=Mu*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ " #provide 8 mm dia bars\n",
+ "dia=8 #in mm\n",
+ "s1=1500*0.785*dia**2/Ast #>3d=3x79=237 mm\n",
+ "s1=235 #in mm\n",
+ "Ads=0.12/100*1000*D #distribution steel, in sq mm\n",
+ " #assume 6 mm dia bars\n",
+ "s2=1000*0.785*6**2/Ads #in mm\n",
+ "s2=235 #round-off, in mm\n",
+ "Tbd=1.6 #in MPa\n",
+ "Ld=dia*0.87*fy/4/Tbd #in mm\n",
+ "Ld=452 #in mm\n",
+ "Tv=Wu*10**3/1500/d #in MPa\n",
+ "Ast=1500*0.785*8**2/235 #in sq mm\n",
+ "pt=Ast/1500/d*100 #in %\n",
+ " #for M15 and pt=0.26\n",
+ "Tc=0.35 #in MPa\n",
+ " #as Tc>Tv, no shear reinforcement required\n",
+ "print \"Summary of design\\nThickness of slab = \",(D),\" mm\\nCover = 15 mm\\nMain steel = 8 mm dia @ \",(s1),\" mm c/c\\nDevelopment length = \",(Ld),\"mm\\nDistribution steel = 6 mm dia @ \",(s2),\" mm c/c\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.4:pg-1015"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Slab thickness= 100 mm\n",
+ "Cover=15 mm\n",
+ "Steel-\n",
+ "(i)Short span = 10 mm dia @ 220 mm c/c\n",
+ "(ii)Long span = 10 mm dia @ 250 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "lx=3.5 #in m\n",
+ "ly=4 #in m\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "D=lx*10**3.0/35 #in mm\n",
+ "W1=(D/10**3)*25 #self-weight, in kN/m\n",
+ "W2=1.5 #live load, in kN/m\n",
+ "W=W1+W2 #in kN/m\n",
+ "Wu=1.5*W #in kN/m\n",
+ "a=ly/lx\n",
+ "Ax=0.078\n",
+ "Ay=0.0602\n",
+ "Mx=Ax*Wu*lx**2 #in kN-m\n",
+ "My=Ay*Wu*lx**2 #in kN-m\n",
+ "d=math.sqrt(Mx*10**6/0.149/fck/10**3) #in mm\n",
+ "d=51 #round-off, in mm\n",
+ " #assume 10 mm dia bars\n",
+ "dia=10 #in mm\n",
+ "D=d+dia/2+15 #<100 mm assumed value\n",
+ "D=100 #in mm\n",
+ "d=D-dia/2-15 #in mm\n",
+ "#steel - short span\n",
+ "#Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/10**3\n",
+ " #using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d\n",
+ "r=Mx*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ "s1=1000*0.785*dia**2/Ast #in mm\n",
+ "s1=220 #round-off, in mm\n",
+ " #long span\n",
+ "d=d-dia/2-dia/2 #in mm\n",
+ " #Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/10**3\n",
+ " #using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d\n",
+ "r=My*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ "s2=1000*0.785*dia**2/Ast #in mm\n",
+ "s2=250 #round-off, in mm\n",
+ "print \"Summary of design\\nSlab thickness=\",(D),\" mm\\nCover=15 mm\\nSteel-\\n(i)Short span = 10 mm dia @ \",(s1),\" mm c/c\\n(ii)Long span = 10 mm dia @ \",(s2),\" mm c/c\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.5:pg-1016"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Beam size - 225 x 300 mm\n",
+ "Cover - 25 mm\n",
+ "Steel - 3 -12 mm dia bars\n",
+ "Stirrups - 6 mm dia @ 200 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=225 #width in mm\n",
+ "D=300 #depth in mm\n",
+ "fck=15 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "l=4.2 #span, in m\n",
+ "W1=(b/10**3)*(D/10.0**3)*25 #self-weight, in kN/m\n",
+ "W2=6 #live load, in kN/m\n",
+ "W=W1+W2 #in kN/m\n",
+ "Wu=1.5*W #in kN/m\n",
+ "Mu=Wu*l**2.0/8 #in kN-m\n",
+ "d=270 #assume, in mm\n",
+ "Mulim=0.138*fck*b*d**2.0/10**6 #in kN-m\n",
+ "#as Mulim > Mu, it will be a singly reinforced beam\n",
+ "#Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/b\n",
+ "#using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d\n",
+ "r=Mu*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ "#provide 12 mm dia bars\n",
+ "n=Ast/0.785/12**2\n",
+ "n=3 #assume\n",
+ "Ast=n*0.785*12**2 #in sq mm\n",
+ "Vu=Wu*l/2 #in kN\n",
+ "Tv=Vu*10**3/b/d #in MPa\n",
+ "pt=Ast/b/d*100 #pt=0.56\n",
+ "#for M15 and pt=0.56\n",
+ "Tc=0.46 #in MPa\n",
+ "#as Tc>Tv, no shear reinforcement required\n",
+ "#provide nominal stirrups and provide 6 mm stirrups\n",
+ "Asv=2*0.785*6**2 #in sq mm\n",
+ "Sv=Asv*fy/0.4/b #in mm\n",
+ "Sv=260 #assume, in mm\n",
+ "Svmax=0.75*d #in mm\n",
+ "Svmax=200 #round-off, in mm\n",
+ "Sv=min(Sv,Svmax) #in mm\n",
+ "print \"Summary of design:\\nBeam size - \",(b),\" x \",(D),\" mm\\nCover - 25 mm\\nSteel - \",(n),\"-12 mm dia bars\\nStirrups - 6 mm dia @ \",(Sv),\" mm c/c\"\n",
+ "#deflection check\n",
+ "Ec=5700*math.sqrt(fck) #in MPa\n",
+ "Es=2*10.0**5 #in MPa\n",
+ "m=Es/Ec\n",
+ "fcr=0.7*math.sqrt(fck) #in MPa\n",
+ "#using b x x/2 = m Ast (d-x), we get a quadratic equation\n",
+ "#solving the quadratic equation\n",
+ "p=b/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/2/p #in mm\n",
+ "z=d-x/3 #in mm\n",
+ "Ir=b*x**3.0/12+b*x*(x/2)**2+m*Ast*(d-x)**2 #in mm**4\n",
+ "Igr=b*D**3.0/12 #in mm**4\n",
+ "yt=D/2 #in mm\n",
+ "Mr=fcr*Igr/yt #in N-mm\n",
+ "M=W*l**2.0/8*10**6 #in N-mm\n",
+ "Ieff=Ir/(1.2-Mr/M*z/d*(1-x/d)*b/b) #in mm**4\n",
+ "#Ir<Ieff<Igr, hence OK\n",
+ "W1=W*l #in kN\n",
+ "u1=5/384.0*(W1*10**3)*(l*10**3)**3/Ec/Ieff #short-term deflection, in mm\n",
+ "#long-term deflection\n",
+ "#(i) deflection due to shrinkage\n",
+ "k3=0.125 #for simply supported beam\n",
+ "pt=0.56 #in %\n",
+ "pc=0 #in %\n",
+ "k4=0.72*(pt-pc)/math.sqrt(pt)\n",
+ "phi=k4*0.0003/D\n",
+ "u2=k3*phi*(l*10**3)**2 #in mm\n",
+ "#(ii) deflection due to creep\n",
+ "Ecc=Ec/(1+1.6) #in MPa\n",
+ "#assuming a permanent load of 60%\n",
+ "W2=0.6*W*l #in kN\n",
+ "u3=5/384.0*(W2*10**3)*(l*10**3)**3/Ecc/Ieff #in mm\n",
+ "u4=5/384.0*(W2*10**3)*(l*10**3)**3/Ec/Ieff #in mm\n",
+ "u5=u3-u4 #in mm\n",
+ "u=u1+u2+u5 #total deflection, in mm\n",
+ "v1=l*10**3.0/250 #permissible deflection, in mm\n",
+ "v2=l*10**3.0/350 #in mm\n",
+ "#assuming half the shrinkage strain occurs within the first 28 days, the deflection occurring after this time\n",
+ "v3=u2/2+u5 #< permissible value, hence OK\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.6:pg-1018"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Beam size - 300 x 800 mm\n",
+ "Cover - 50 mm\n",
+ "Steel - 8-20 mm + 2-18 mm dia bars\n",
+ "Stirrups - 6 mm dia @ 115 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=7 #span, in m\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "b=300 #assume, in mm\n",
+ "W=35 #live load, in kN/m\n",
+ "Wu=1.5*W #in kN/m\n",
+ "Mu=Wu*l**2/8.0 #in kN-m\n",
+ "d=(Mu*10**6/0.149/fck/b)**0.5 #in mm\n",
+ "d=1.1*d #increase depth by 10% for self-weight\n",
+ "d=750 #assume, in mm\n",
+ "c=50 #cover, in mm\n",
+ "D=d+c #in mm\n",
+ "W1=(b/10.0**3)*(D/10**3)*25 #self-weight, in kN/m\n",
+ "W2=35 #live load, in kN/m\n",
+ "W=W1+W2 #in kN/m\n",
+ "Wu=1.5*W #in kN/m\n",
+ "Mu=Wu*l**2/8 #in kN-m\n",
+ "d=(Mu*10**6/0.149/fck/b)**0.5 #<750 mm, hence OK\n",
+ "d=750 #in mm\n",
+ "#steel\n",
+ "#Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/b\n",
+ "#using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d\n",
+ "r=Mu*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ "#provide 20 mm dia bars\n",
+ "n=Ast/0.785/20**2\n",
+ "#provide 8-20 mm + 2-18 mm dia bars\n",
+ "Ast=8*0.785*20**2+2*0.785*18**2 #in sq mm\n",
+ "pt=Ast/b/d*100 #pt=1.34\n",
+ "Vu=Wu*l/2 #in kN\n",
+ "Tv=Vu*10**3/b/d #in MPa\n",
+ "#for M15 and pt=1.34\n",
+ "Tc=0.65 #in MPa\n",
+ "#as Tv>Tc, shear reinforcement required\n",
+ "#provide 6 mm stirrups\n",
+ "Vus=Vu-Tc*b*d/10.0**3 #in kN\n",
+ "Asv=2*0.785*6**2 #in sq mm\n",
+ "Sv=Asv*0.87*fy*d/Vus/10.0**3 #in mm\n",
+ "Sv=130 #assume, in mm\n",
+ "Svmin=Asv*fy/0.4/b #in mm\n",
+ "Svmin=115 #assume, in mm\n",
+ "Sv=min(Sv,Svmin) #in mm\n",
+ "print \"Summary of design:\\nBeam size - \",(b),\" x \",(D),\" mm\\nCover - 50 mm\\nSteel - 8-20 mm + 2-18 mm dia bars\\nStirrups - 6 mm dia @ \",(Sv),\" mm c/c\"\n",
+ "#deflection check\n",
+ "Ec=5700*math.sqrt(fck) #in MPa\n",
+ "Es=2*10**5 #in MPa\n",
+ "m=Es/Ec\n",
+ "fcr=0.7*math.sqrt(fck) #in MPa\n",
+ "#using b x x/2 = m Ast (d-x), we get a quadratic equation\n",
+ "#solving the quadratic equation\n",
+ "p=b/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/2/p #in mm\n",
+ "x=290 #assume, in mm\n",
+ "z=d-x/3 #in mm\n",
+ "Ir=b*x**3/12+b*x*(x/2)**2+m*Ast*(d-x)**2 #in mm**4\n",
+ "Igr=b*D**3/12 #in mm**4\n",
+ "yt=D/2 #in mm\n",
+ "Mr=fcr*Igr/yt #in N-mm\n",
+ "M=W*l**2/8*10**6 #in N-mm\n",
+ "Ieff=Ir/(1.2-Mr/M*z/d*(1-x/d)*b/b) #in mm**4\n",
+ " #Ir>Ieff\n",
+ "Ieff=Ir #in mm**4\n",
+ "W1=W*l #in kN\n",
+ "u1=5.0/384*(W1*10**3)*(l*10**3)**3/Ec/Ieff #short-term deflection, in mm\n",
+ "#long-term deflection\n",
+ "#(i) deflection due to shrinkage\n",
+ "k3=0.125 #for simply supported beam\n",
+ "pt=1.34 #in %\n",
+ "pc=0 #in %\n",
+ "k4=0.65*(pt-pc)/math.sqrt(pt)\n",
+ "phi=k4*0.0003/D\n",
+ "u2=k3*phi*(l*10**3)**2 #in mm\n",
+ "#(ii) deflection due to creep\n",
+ "Ecc=Ec/(1+1.6) #in MPa\n",
+ "#assuming a permanent load of 60%\n",
+ "W2=0.6*W*l #in kN\n",
+ "u3=5/384*(W2*10**3)*(l*10**3)**3/Ecc/Ieff #in mm\n",
+ "u4=5/384*(W2*10**3)*(l*10**3)**3/Ec/Ieff #in mm\n",
+ "u5=u3-u4 #in mm\n",
+ "u=u1+u2+u5 #total deflection, in mm\n",
+ "v1=l*10**3/250 #permissible deflection, in mm\n",
+ "v2=l*10**3/350 #in mm\n",
+ " #assuming half the shrinkage strain occurs within the first 28 days, the deflection occurring after this time\n",
+ "v3=u2/2+u5 #< permissible value, hence OK\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.7:pg-1019"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T beam:bf= 2500 mm\n",
+ "Df= 100 mm\n",
+ "d= 550 mm\n",
+ "D= 600 mm\n",
+ "Cover = 50 mm\n",
+ "Steel= 5-25 mm dia + 3-22 mm dia bars\n",
+ "Stirrups = 6 mm dia @ 90 mm c/c throughout\n",
+ "V3= 2.03125 \n",
+ "Thus the value of V3 is permissible\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=10 #span, in m\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "Df=100 #slab thickness, in mm \n",
+ "D=l*10**3.0/15 #depth of beam, in mm\n",
+ "D=600 #assume, in mm\n",
+ "d=D-50 #cover=50 mm\n",
+ "bw=300 #beam width, in mm\n",
+ "bf=l*10**3/6+bw+6*Df #>2500 mm c/c distance of beams\n",
+ "bf=2500 #in mm\n",
+ "W1=(bw/10**3)*(D-Df)/10**3*25 #web, in kN/m\n",
+ "W2=(Df/10**3)*(bf/10**3)*25 #slab, in kN/m\n",
+ "W3=(bf/10**3)*5 #imposed load, in kN/m\n",
+ "W=W1+W2+W3 #in kN/m\n",
+ "Wu=1.5*W #in kN/m\n",
+ "Mu=Wu*l**2.0/8 #in kN-m\n",
+ "Vu=Wu*l/2 #in kN\n",
+ "Asf=0.36*fck*bf*Df/0.87/fy #steel required only for flange, in sq mm\n",
+ "Asf=6210 #round-off, in sq mm\n",
+ "#verification of trial section\n",
+ "xu=100 #assume, in mm\n",
+ "Ast=Asf #in sq mm\n",
+ "Mulim=0.87*fy*Ast*(d-0.416*xu)/10**6 #in kN-m\n",
+ "#Mulim > Mu, hence OK\n",
+ "#keeping the assumed trial section, work out the steel required\n",
+ "#Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/bf\n",
+ " #using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d\n",
+ "r=Mu*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ " #provide 5-25 mm dia + 3-22 mm dia bars\n",
+ "pt=Ast*100/(bw*d+(bf-bw)*Df) #pt=1%, approximately\n",
+ " #check for shear\n",
+ "Tv=Vu*10**3/bw/d #in MPa\n",
+ " #for M15 grade concrete and pt=1%\n",
+ "Tc=0.6 #in MPa\n",
+ " #as Tv > Tc, shear reinforcement required\n",
+ "Vus=Vu-Tc*bw*d/10**3 #in kN\n",
+ " #provide 6 mm dia stirrups\n",
+ "Asv=2*0.785*6**2 #in sq mm\n",
+ "Sv=Asv*0.87*fy*d/Vus/10**3 #in mm\n",
+ "Sv=90 #round-off, in mm\n",
+ "print \"T beam:bf=\",bf,\" mm\\nDf=\",Df,\" mm\\nd=\",d,\" mm\\nD=\",D,\" mm\\nCover = 50 mm\\nSteel= 5-25 mm dia + 3-22 mm dia bars\\nStirrups = 6 mm dia @ \",Sv,\" mm c/c throughout\"\n",
+ "#answer in textbook for spacing of stirrups is incorrect\n",
+ "#deflection check\n",
+ "Ec=5700*math.sqrt(fck) #in MPa\n",
+ "Es=2*10**5 #in MPa\n",
+ "m=Es/Ec #modular ratio\n",
+ "fcr=0.7*math.sqrt(fck) #in MPa\n",
+ "#using bf Df (x-Df/2) = m Ast (d-x), we get a quadratic equation\n",
+ "x=(m*Ast*d+bf*Df**2/2)/(bf*Df+m*Ast) #in mm\n",
+ "z=0.87*d #assume, in mm\n",
+ "#refer Fig. 19.5 of textbook\n",
+ "Ir=bf*x**3.0/12+bf*Df*(x/2)**2+m*Ast*(d-x)**2 #in mm**4\n",
+ "y=(bf*Df*Df/2+(D-Df)*bw*((D-Df)/2+Df))/(bf*Df+(D-Df)*bw) #c.g. from top, in mm (neglecting steel)\n",
+ "Igr=bf*Df**3.0/12+bf*Df*(Df/2-y)**2+bw*(D-Df)**3/12+bw*(D-Df)*((D-Df)/2+Df-y)**2 #in mm**4\n",
+ "yt=d/2 #in mm\n",
+ "Mr=fcr*Igr/yt #in N-mm\n",
+ "M=W*l**2/8*10**6 #in N-mm\n",
+ "Ieff=Ir/(1.2-Mr/M*z/d*(1-x/d)*bw/bf) #in mm**4\n",
+ " #Ir > Ieff\n",
+ "Ieff=Ir #in mm**4\n",
+ "W1=W*l #in kN\n",
+ "u1=5.0/384*(W1*10**3)*(l*10**3)**3/Ec/Ieff #short term deflection, in mm\n",
+ " #deflection due to shrinkage\n",
+ "k3=0.125 #for simply supported beam\n",
+ "pt=1 #in %\n",
+ "pc=0 #in %\n",
+ "k4=0.65*(pt-pc)/math.sqrt(pt)\n",
+ "phi=k4*0.0003/D\n",
+ "u2=k3*phi*(l*10**3)**2 #in mm\n",
+ " #deflection due to creep\n",
+ "Ecc=Ec/(1+1.6) #in MPa\n",
+ " #assuming a permanent load of 60%\n",
+ "W2=0.6*W*l #in kN\n",
+ "u3=5/384*(W2*10**3)*(l*10**3)**3/Ecc/Ieff #in mm\n",
+ "u4=5/384*(W2*10**3)*(l*10**3)**3/Ec/Ieff #in mm\n",
+ "u5=u3-u4 #in mm\n",
+ "u=u1+u2+u5 #total deflection, in mm\n",
+ "v1=l*10**3.0/250 #permissible deflection, in mm\n",
+ "v2=l*10**3.0/350 #>20 mm\n",
+ "v2=20 #in mm\n",
+ " #assuming half the shrinkage strain occurs within the first 28 days, the deflection occurring after this time\n",
+ "v3=u2/2+u5 #< permissible value, hence OK\n",
+ "print \"V3=\",v3,\"\\nThus the value of V3 is permissible\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.8:pg-1021"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Slab thickness= 155 mm\n",
+ "Cover = 25 mm\n",
+ "Main steel = 10 mm dia bars @ 110 mm c/c\n",
+ "Distribution steel = 8 mm dia @ 270 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=2.7+1 #span, in m\n",
+ "R=0.15 #rise, in m\n",
+ "t=0.27 #tread, in m\n",
+ "fck=15 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "D=200 #assume, in mm\n",
+ "W1=D/10**3*25*math.sqrt(R**2+t**2)/t #slab load on plan, in kN/m\n",
+ "W2=1/2*R*t*25/t #load of step per metre, in kN/m\n",
+ "W3=3 #live load, in kN/m\n",
+ "W=W1+W2+W3 #in kN/m\n",
+ "Wu=1.5*W #in kN/m\n",
+ "Mu=Wu*l**2/8 #in kN-m\n",
+ "d=math.sqrt(Mu*10**6/0.138/fck/10**3) #in mm\n",
+ "d=115 #round-off, in mm\n",
+ " #assume 10 mm dia bars\n",
+ "dia=10 #in mm\n",
+ "D=d+dia/2+25 #< 200 mm, hence OK\n",
+ "D=l*10**3/24 #depth required for deflection, in mm\n",
+ "D=155 #round-off, in mm\n",
+ "d=D-dia/2-25 #in mm\n",
+ "#steel\n",
+ "#Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/10**3\n",
+ "#using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d\n",
+ "r=Mu*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ "s1=1000*0.785*dia**2/Ast #spacing of 10 mm dia bars\n",
+ "s1=110 #round-off, in mm\n",
+ "Ads=0.12/100*D*10**3 #distribution steel, in sq mm\n",
+ "#provide 8 mm dia bars\n",
+ "s2=1000*0.785*8**2/Ads #in mm\n",
+ "s2=270 #round-off, in mm\n",
+ "print \"Summary of design\\nSlab thickness=\",D,\" mm\\nCover = 25 mm\\nMain steel = 10 mm dia bars @ \",s1,\" mm c/c\\nDistribution steel = 8 mm dia @ \",s2,\" mm c/c\"\n",
+ " #answer in textbook for spacing of 10 mm dia bars is incorrect\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.9:pg-1022"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Overall depth of footing= 456.0 mm\n",
+ "Cover=100 mm\n",
+ "Steel- 12 bars of 12 mm dia both ways\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=0.2 #column width, in m\n",
+ "D=0.3 #column depth, in m\n",
+ "fck=15 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "P1=600 #load on column, in kN\n",
+ "P2=0.05*P1 #weight of footing, in kN\n",
+ "P=P1+P2 #in kN\n",
+ "Pu=1.5*P #in kN\n",
+ "q=150 #bearing capacity of soil, in kN/sq m\n",
+ "qu=2*q #ultimate bearing capacity of soil, in kN/sq m\n",
+ "A=Pu/qu #in sq m\n",
+ "L=math.sqrt(A) #assuming footing to be square, in m\n",
+ "L=1.8 #round-off, in m\n",
+ "p=P1*1.5/L**2 #soil pressure, in kN/sq m\n",
+ "p=277.8 #round-off, in kN/sq m\n",
+ "bc=b/D\n",
+ "ks=0.5+bc #>1\n",
+ "ks=1\n",
+ "Tc=0.25*math.sqrt(fck)*10**3 #in kN/sq m\n",
+ "Tv=Tc\n",
+ "#let d be the depth of footing in metres\n",
+ "#case I: consider greater width of shaded portion in Fig. 19.6 of textbook\n",
+ "d1=L*(L-b)/2*p/(Tc*L+L*p) #in m\n",
+ "#case II: refer Fig. 19.7 of textbook; we get a quadratic equation of the form e d**2 + f d + g = 0\n",
+ "e=p+4*Tc\n",
+ "f=b*p+D*p+2*(b+D)*Tc\n",
+ "g=-(L**2-b*D)*p\n",
+ "d2=(-f+math.sqrt(f**2-4*e*g))/2/e #in m\n",
+ "d2=0.35 #round-off, in m\n",
+ " #bending moment consideration, refer Fig. 19.8 of textbook\n",
+ "Mx=1*((L-b)/2)**2/2*p #in kN-m\n",
+ "My=1*((L-D)/2)**2/2*p #in kN-m\n",
+ "d3=math.sqrt(Mx*10**6/0.138/fck/10**3) #<350 mm, hence OK\n",
+ "#steel\n",
+ "#Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/10**3\n",
+ "#using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d2*10**3\n",
+ "r=Mx*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ "Ast=L*Ast #steel required for full width of 1.8 m\n",
+ " #provide 12 mm dia bars\n",
+ "dia=12 #in mm\n",
+ "n=Ast/0.785/dia**2 #no. of 12 mm dia bars\n",
+ "n=12 #round-off\n",
+ "Tbd=1.6 #in MPa\n",
+ "Ld=dia*0.87*fy/4/Tbd #in mm\n",
+ "Ld=677 #assume, in mm\n",
+ " #this length is available from the face of the column in both directions\n",
+ "D=d2*10**3+dia/2+100 #in mm\n",
+ "print \"Summary of design:\\nOverall depth of footing=\",D,\" mm\\nCover=100 mm\\nSteel-\",n,\" bars of 12 mm dia both ways\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.10:pg-1023"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Thickness of stem (at base) = 320 mm\n",
+ "Thickness of stem at top = 200 mm\n",
+ "Refer Fig. 19.10 of textbook for reinforcement details\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "fck=15 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "phi=30 #angle of repose, in degrees\n",
+ "H=5 #height of wall, in m\n",
+ "B=0.6*H #assume, in m\n",
+ "T=B/4 #assume toe to base ratio as 1:4, in m\n",
+ "W=16 #density of retained earth, in kN/cu m\n",
+ "Wu=1.5*W #factored load, in kN/cu m\n",
+ "P=Wu*H**2/2*(1-math.sin(phi))/(1+math.sin(phi)) #in kN\n",
+ "M1=P*H/3 #in kN-m\n",
+ "M1=167 #round-off, in kN-m\n",
+ " #bending moment at 2.5 m below the top\n",
+ "h=2.5 #in m\n",
+ "M2=Wu*h**2/2*(1-math.sin(phi))/(1+math.sin(phi))*h/3 #in kN-m\n",
+ "M2=21 #round-off, in kN-m\n",
+ " #thickness of stem (at the base)\n",
+ "d=math.sqrt(M1*10**6/0.138/fck/1000) #in mm\n",
+ "d=285 #round-off, in mm\n",
+ "dia=20 #assume 20 mm dia bars\n",
+ "D1=d+dia/2+25 #in mm\n",
+ "D2=200 #thickness at top, in mm\n",
+ "D3=D2+(D1-D2)*h/H #thickness at 2.5 m below top, in mm \n",
+ "d3=math.sqrt(M2*10**6/0.138/fck/1000) #in mm\n",
+ "D3=d3+dia/2+25 #< 260 mm (provided), hence OK\n",
+ "D3=260 #in mm\n",
+ "d3=D3-dia/2-25 #in mm\n",
+ "#main steel\n",
+ "#(a) 5 m below the top\n",
+ "#Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/10**3\n",
+ "#using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d\n",
+ "r=M1*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ "pt=Ast/1000/d*100 #in %\n",
+ " #provide 20 mm dia bars\n",
+ "s1=1000*0.785*20**2/Ast #in mm\n",
+ "s1=155 #round-off, in mm\n",
+ "#(b) 2.5 m below the top\n",
+ "#Xu=0.87*fy*Ast/0.36/fck/b = a*Ast\n",
+ "a=0.87*fy/0.36/fck/10**3\n",
+ "#using Mu=0.87 fy Ast (d-0.416 Xu), we get a quadratic equation\n",
+ "p=0.87*fy*0.416*a\n",
+ "q=-0.87*fy*d3\n",
+ "r=M2*10**6\n",
+ "Ast=(-q-math.sqrt(q**2-4*p*r))/2/p #in sq mm\n",
+ "Astmin=0.12/100*10**3*D3 #in sq mm\n",
+ "Ast=max(Ast,Astmin) #in sq mm\n",
+ "#provide 12 mm dia bars\n",
+ "s2=1000*0.785*12**2/Ast #in mm\n",
+ "s2=360 #round-off, in mm\n",
+ "#distribution steel\n",
+ "Ads=0.12/100*10**3*D3 #in sq mm\n",
+ "#provide 8 mm dia bars\n",
+ "s3=1000*0.785*8**2/Ads #in mm\n",
+ "s3=160 #round-off, in mm\n",
+ "#check for shear\n",
+ "Vu=P #in kN\n",
+ "Tv=Vu*10**3.0/10**3/d #in MPa\n",
+ "#for M15 grade concrete and pt=0.71\n",
+ "Tc=0.54 #in MPa\n",
+ "#as Tc > Tv, no shear reinforcement required\n",
+ "#development length\n",
+ " #(a) At the base of stem\n",
+ "dia=20 #in mm\n",
+ "Tbd=1.6 #in MPa\n",
+ "Ld=dia*0.87*fy/4/Tbd #in mm\n",
+ "Ld=1130 #round-off, in mm\n",
+ " #(b) At 2.5 m below the top\n",
+ "dia=12 #in mm\n",
+ "Ld=dia*0.87*fy/4/Tbd #in mm\n",
+ "Ld=680 #round-off, in mm\n",
+ "print \"Summary of design:\\nThickness of stem (at base) = \",D1,\" mm\\nThickness of stem at top = \",D2,\" mm\\nRefer Fig. 19.10 of textbook for reinforcement details\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.11:pg-1024"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Column size - 420 x 420 mm\n",
+ "Steel-main = 6-20 mm dia bars\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P=1000 #in kN\n",
+ "Pu=1.5*P #in kN\n",
+ "fck=15 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "l=3.5 #unsupported length, in m\n",
+ " #assume 1% steel\n",
+ "Ag=Pu*10**3/(0.4*fck*0.99+0.67*fy*0.01) #in sq mm\n",
+ "L=math.sqrt(Ag) #assuming a square column\n",
+ "L=420 #in mm\n",
+ "emin=l*10**3/500+L/30 #in mm\n",
+ "ep=0.05*L #=emin, hence OK\n",
+ "Asc=0.01*L**2 #in sq mm\n",
+ " #provide 6-20 mm dia bars\n",
+ "Asc=6*0.785*20**2 #in sq mm\n",
+ "print \"Summary of design:\\nColumn size - \",L,\" x \",L,\" mm\\nSteel-main = 6-20 mm dia bars\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.12:pg-1025"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Column size - 315 x 315 mm\n",
+ "Steel-main = 4-20 mm dia bars\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P=500 #in kN\n",
+ "Pu=1.5*P #in kN\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "l=3 #unsupported length, in m\n",
+ " #assume 1% steel\n",
+ "Ag=Pu*10**3/(0.4*fck*0.99+0.67*fy*0.01) #in sq mm\n",
+ "L=math.sqrt(Ag) #assuming a square column\n",
+ "L=315 #in mm\n",
+ "emin=l*10**3.0/500+L/30 #<20\n",
+ "emin=20 #in mm\n",
+ "ep=0.05*L #<emin, hence the column is to be checked for bending\n",
+ "Mu=Pu*10**3*emin #in N-mm\n",
+ "a=Pu*10**3/fck/L/L\n",
+ "b=Mu/fck/L/L**2 #b=0.032\n",
+ "d1=40 #cover(assume), in mm\n",
+ "c=d1/L #c=d'/D\n",
+ " #for d'/D = 0.15\n",
+ "p=0.07*fck #in %\n",
+ "Asc=p/100*L**2 #in sq mm\n",
+ " #provide 4-20 mm dia bars\n",
+ "Asc=4*0.785*20**2 #in sq mm\n",
+ "print \"Summary of design:\\nColumn size - \",L,\" x \",L,\" mm\\nSteel-main = 4-20 mm dia bars\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.13:pg-1026"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Column size - 250 x 400 mm\n",
+ "Steel-main = 6-16 mm dia bars\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P=500 #in kN\n",
+ "Pu=1.5*P #in kN\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "l=3 #unsupported length, in m\n",
+ " #assume 1% steel\n",
+ "Ag=Pu*10**3/(0.4*fck*0.99+0.67*fy*0.01) #in sq mm\n",
+ "b=250 #in mm\n",
+ "D=Ag/b #in mm\n",
+ "D=400 #round-off, in mm\n",
+ "emin1=l*10**3/500+D/30 #in direction of Y axis, in mm, < 20 mm\n",
+ "emin1=20 #in mm\n",
+ "ep1=0.05*D #=emin, hence no moment is required to be considered in this direction\n",
+ "emin2=l*10**3/500+b/30 #in direction of X axis, in mm, < 20 mm\n",
+ "emin2=20 #in mm\n",
+ "ep2=0.05*b #<emin, hence moment in this direction needs to be considered\n",
+ " #interaction diagram\n",
+ "b=400 #in mm\n",
+ "D=250 #in mm\n",
+ "Mu=Pu*10**3*emin2 #in N-mm\n",
+ "m=Pu*10**3/fck/b/D\n",
+ "n=Mu/fck/b/D**2 #b=0.032\n",
+ "d1=40 #cover(assume), in mm\n",
+ "c=d1/D #c=d'/D\n",
+ " #referring to Fig. 19.12\n",
+ "p=0.08*fck #in %\n",
+ "Asc=p/100*b*D #in sq mm\n",
+ " #provide 6-16 dia bars\n",
+ "Asc=6*0.785*16**2 #in sq mm\n",
+ "print \"Summary of design:\\nColumn size - \",D,\" x \",b,\" mm\\nSteel-main = 6-16 mm dia bars\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.14:pg-1027"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Column size - 315.0 x 315.0 mm\n",
+ "Steel-main = 4-18 mm + 4-12 mm dia bars\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P=500.0 #in kN\n",
+ "Pu=1.5*P #in kN\n",
+ "fck=15.0 #in MPa\n",
+ "fy=250.0 #in MPa\n",
+ "l=5.0 #effective length, in m\n",
+ "lex=5.0 #in m\n",
+ "ley=5.0 #in m\n",
+ "L=315.0 #column dimension in mm (square column)\n",
+ "Asc=1256.0 #in sq mm\n",
+ "m=lex*10**3/L #>12\n",
+ "n=ley*10**3/L #>12\n",
+ " #hence the column is slender on both the axes\n",
+ "Max=Pu*10**3*L/2000*(lex/(L/10**3))**2.0/10**6 #in kN-m\n",
+ "May=Max\n",
+ "Puz=(0.45*fck*(L**2-Asc)+0.75*fy*Asc)/10**3 #in kN\n",
+ "c=40 #cover, in mm\n",
+ " #to find Pb\n",
+ "xu=(L-c)/(1+0.002/0.0035) #in mm\n",
+ "Pb=0.36*fck*L*xu/10**3 #in kN\n",
+ "k=(Puz-Pu)/(Puz-Pb) #>1\n",
+ "Max=k*Max #in kN-m\n",
+ "Mu=15 #in kN-m\n",
+ "Mu=Mu+Max #in kN-m\n",
+ "a=Pu*10**3/fck/L/L\n",
+ "b=Mu*10**6/fck/L/L**2 #b=0.047\n",
+ "d1=c/L #d1=d'/D\n",
+ " #for d'/D = 0.1\n",
+ "p=0.095*fck #in %\n",
+ "Asc=p/100*L**2 #in sq mm\n",
+ " #provide 4-18 mm + 4-12 mm dia bars\n",
+ "Asc=4*0.785*18**2+4*0.785*12**2 #in sq mm\n",
+ "print \"Summary of design:\\nColumn size - \",L,\" x \",L,\" mm\\nSteel-main = 4-18 mm + 4-12 mm dia bars\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.15:pg-1028"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Column size - 400 x 400 mm\n",
+ "Steel-main = 12-22 mm dia bars placed equally on four faces of the column\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Pu=2000.0 #in kN\n",
+ "Mux=50.0 #in kN-m\n",
+ "Muy=Mux\n",
+ "fck=20.0 #in MPa\n",
+ "fy=415.0 #in MPa\n",
+ " #assume 2% steel\n",
+ "p=2 #in %\n",
+ "Ag=Pu*10**3/(0.4*fck*(1-p/100)+0.67*fy*p/100) #in sq mm\n",
+ "L=math.sqrt(Ag) #assuming a square column\n",
+ "L=400 #in mm\n",
+ "m=Pu*10**3/fck/L/L\n",
+ "n=p/fck\n",
+ "c=50 #cover (assume), in mm\n",
+ "d1=c/L #d1=d'/D\n",
+ " #from Fig. 19.21, for d'/D = 0.15 and Pu / fck b D = 0.625\n",
+ "f=0.046\n",
+ "Mux1=f*fck*L*L**2.0/10**6 #in kN-m\n",
+ "Muy1=Mux1\n",
+ "Puz=(0.45*fck*(1-p/100)*L**2+0.75*fy*p/100*L**2)/10**3 #in kN\n",
+ "a=Pu/Puz #>0.8\n",
+ "an=2\n",
+ "b=(Mux/Mux1)**an+(Muy/Muy1)**an #>1\n",
+ " #assume 2.5% steel\n",
+ "p=2.5 #in %\n",
+ "n=p/fck\n",
+ " #from Fig. 19.21, for d'/D = 0.15 and Pu / fck b D = 0.625\n",
+ "f=0.08\n",
+ "Mux1=f*fck*L*L**2/10**6 #in kN-m\n",
+ "Muy1=Mux1\n",
+ "Puz=(0.45*fck*(1-p/100)*L**2+0.75*fy*p/100*L**2)/10**3 #in kN\n",
+ "a=Pu/Puz #<0.8\n",
+ "an=1+1/0.6*(a-0.2)\n",
+ "b=(Mux/Mux1)**an+(Muy/Muy1)**an #<1, hence OK\n",
+ "Asc=p/100*L**2 #in sq mm\n",
+ " #provide 12-22 mm dia bars\n",
+ "Asc=12*0.785*22**2 #in sq mm\n",
+ "print \"Summary of design:\\nColumn size - \",L,\" x \",L,\" mm\\nSteel-main = 12-22 mm dia bars placed equally on four faces of the column\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.16:pg-1029"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Column size - 400 x 500 mm\n",
+ "Steel-main = 6-16 mm + 6-20 mm dia bars\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=400 #in mm\n",
+ "D=500 #in mm\n",
+ "Pu=1600 #in kN\n",
+ "Mux=90 #in kN-m\n",
+ "Muy=50 #in kN-m\n",
+ "fck=15 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "p=1.5 #assume 1.5% steel, placed on four sides\n",
+ "m=p/fck\n",
+ "c=50 #cover (assume), in mm\n",
+ " #to find Mux1\n",
+ "n=c/D #n=d'/D\n",
+ "l=Pu*10**3/fck/b/D\n",
+ " #referring to Fig.19.20, for Pu/ fck/ b/ D = 0.53 and p/ fck = 0.1\n",
+ "f=0.09\n",
+ "Mux1=f*fck*b*D**2/10**6 #in kN-m\n",
+ " #to find Muy1\n",
+ "b=500 #in mm\n",
+ "D=400 #in mm\n",
+ "n=c/D #n=d'/D\n",
+ "l=Pu*10**3/fck/b/D\n",
+ " #referring to Fig.19.21, for Pu/ fck/ b/ D = 0.53 and p/ fck = 0.1\n",
+ "f=0.08\n",
+ "Muy1=f*fck*b*D**2/10**6 #in kN-m\n",
+ "Puz=(0.45*fck*(1-p/100)*b*D+0.75*fy*p/100*b*D)/10**3 #in kN\n",
+ "a=Pu/Puz #<0.8\n",
+ "an=1+1/0.6*(a-0.2)\n",
+ "r=(Mux/Mux1)**an+(Muy/Muy1)**an #<1\n",
+ "Asc=p/100*b*D #in sq mm\n",
+ " #provide 6-16 mm + 6-20 mm dia bars\n",
+ "Asc=6*0.785*16**2+6*0.785*20**2 #in sq mm\n",
+ "print \"Summary of design:\\nColumn size - \",D,\" x \",b,\" mm\\nSteel-main = 6-16 mm + 6-20 mm dia bars\"\n",
+ " #answer in textbook is incorrect\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.17:pg-1030"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design:\n",
+ "Column size - 3.0 x 600 mm\n",
+ "Steel-main = 12-25 mm dia bars\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300 #in mm\n",
+ "Pu=1500 #in kN\n",
+ "Mux=100 #in kN-m\n",
+ "Muy=70 #in kN-m\n",
+ "fck=15 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "p=1.5 #assume 1.5% steel, placed on four sides\n",
+ "Ag=Pu*10**3/(0.4*fck*(1-p/100)+0.67*fy*p/100) #in sq mm\n",
+ "D=Ag/b #in mm\n",
+ "D=600 #assume, in mm\n",
+ "m=p/fck\n",
+ "c=60 #cover (assume), in mm\n",
+ " #to find Mux1\n",
+ "n=c/D #n=d'/D\n",
+ "l=Pu*10**3/fck/b/D\n",
+ " #referring to Fig.19.17, for Pu/ fck/ b/ D = 0.56 and p/ fck = 0.1\n",
+ "f=0.038\n",
+ "Mux1=f*fck*b*D**2/10**6 #in kN-m\n",
+ " #to find Muy1\n",
+ "b=600 #in mm\n",
+ "D=300 #in mm\n",
+ "n=c/D #n=d'/D\n",
+ "l=Pu*10**3/fck/b/D\n",
+ " #referring to Fig.19.19, for Pu/ fck/ b/ D = 0.56 and p/ fck = 0.1\n",
+ "f=0.038\n",
+ "Muy1=f*fck*b*D**2.0/10**6 #in kN-m\n",
+ "Puz=(0.45*fck*(1-p/100)*b*D+0.75*fy*p/100*b*D)/10**3 #in kN\n",
+ "a=Pu/Puz #>0.8\n",
+ "an=2\n",
+ "r=(Mux/Mux1)**an+(Muy/Muy1)**an #>1\n",
+ "p=4 #assume 4% steel, second trial\n",
+ "m=p/fck\n",
+ " #to find Mux1\n",
+ "b=300 #in mm\n",
+ "D=600 #in mm\n",
+ " #referring to Fig.19.17, for Pu/ fck/ b/ D = 0.56 and p/ fck = 0.26\n",
+ "f=0.15\n",
+ "Mux1=f*fck*b*D**2/10**6 #in kN-m\n",
+ " #to find Muy1\n",
+ "b=600 #in mm\n",
+ "D=300 #in mm\n",
+ "n=c/D #n=d'/D\n",
+ " #referring to Fig.19.19, for Pu/ fck/ b/ D = 0.56 and p/ fck = 0.26\n",
+ "f=0.15\n",
+ "Muy1=f*fck*b*D**2.0/10**6 #in kN-m\n",
+ "Puz=(0.45*fck*(1-p/100)*b*D+0.75*fy*p/100*b*D)/10**3 #in kN\n",
+ "a=Pu/Puz #<0.8\n",
+ "an=1+1/0.6*(a-0.2)\n",
+ "r=(Mux/Mux1)**an+(Muy/Muy1)**an #<1, hence OK\n",
+ " #but steel can be reduced\n",
+ "p=3 #assume 3% steel, second trial\n",
+ "m=p/fck\n",
+ " #to find Mux1\n",
+ "b=300 #in mm\n",
+ "D=600 #in mm\n",
+ " #referring to Fig.19.17, for Pu/ fck/ b/ D = 0.56 and p/ fck = 0.2\n",
+ "f=0.12\n",
+ "Mux1=f*fck*b*D**2.0/10**6 #in kN-m\n",
+ " #to find Muy1\n",
+ "b=600 #in mm\n",
+ "D=300 #in mm\n",
+ "n=c/D #n=d'/D\n",
+ " #referring to Fig.19.19, for Pu/ fck/ b/ D = 0.56 and p/ fck = 0.2\n",
+ "f=0.12\n",
+ "Muy1=f*fck*b*D**2.0/10**6 #in kN-m\n",
+ "Puz=(0.45*fck*(1-p/100)*b*D+0.75*fy*p/100*b*D)/10**3 #in kN\n",
+ "a=Pu/Puz #<0.8\n",
+ "an=1+1/0.6*(a-0.2)\n",
+ "r=(Mux/Mux1)**an+(Muy/Muy1)**an #<1, hence OK\n",
+ "Asc=p/100*b*D #in sq mm\n",
+ " #provide 12-25 dia bars\n",
+ "Asc=12*0.785*25**2 #in sq mm\n",
+ "print \"Summary of design:\\nColumn size - \",B,\" x \",b,\" mm\\nSteel-main = 12-25 mm dia bars\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter1_nKyAwVf.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter1_nKyAwVf.ipynb
new file mode 100644
index 00000000..dc168263
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter1_nKyAwVf.ipynb
@@ -0,0 +1,600 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1:Singly Reinforced Sections"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.1:pg-27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The depth of neutral axis = 139.969995714 mm\n",
+ "Area of steel = 499.892841835 mm**2\n",
+ "\n",
+ "Percentage of steel = 0.714132631192 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ " #let the depth of neutral axis be x\n",
+ "import math\n",
+ "b=200 #width, in mm\n",
+ "d=350 #effective depth, in mm\n",
+ "m=18.66 #modular ratio\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "x=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ "print \"The depth of neutral axis = \",(x),\" mm\\n\",\n",
+ " #to find area of steel\n",
+ "Ast=b*x*sigma_cbc/(2*sigma_st) #in sq mm\n",
+ "print \"Area of steel = \",(Ast),\" mm**2\\n\"\n",
+ " #to find percentage steel\n",
+ "pst=Ast*100/(b*d) #in %\n",
+ "print \"Percentage of steel = \",(pst),\" percent\\n\", \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.2:pg-27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The depth of neutral axis = 200.011732416 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ " #let the depth of neutral axis be x\n",
+ "import math\n",
+ "b=150.0 #width, in mm\n",
+ "d=400 #effective depth, in mm\n",
+ "Ast=804 #area of steel, in sq mm\n",
+ "m=18.66 #modular ratio\n",
+ " #b(x**2)/2=mAst(d-x)-->this becomes a quadratic equation of form px**2+qx+r=0\n",
+ "p=b/2.0\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ " #solving the quadratic equation\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ "print \"The depth of neutral axis = \",(x),\" mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.3:pg-28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "When d is assumed as 400 mm and b as 200 mm\n",
+ "(a) Position of neutral axis= 159.965709387 mm\n",
+ "(b) Lever arm= 346.678096871 mm\n",
+ "(c) Moment of resistance= 27.7283038475 kN-m\n",
+ "(d) Percentage of steel= 0.714132631192 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#assume d = 400 mm and b = 200 mm\n",
+ "b=200 #in mm\n",
+ "d=400 #in mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "Xc=d/(1+sigma_st/m/sigma_cbc) #in mm\n",
+ "z=d-Xc/3 #in mm\n",
+ "Mr=b*Xc*sigma_cbc/2*z #in N-mm\n",
+ "Ast=b*Xc*sigma_cbc/2/sigma_st #in sq mm\n",
+ "pt=Ast*100/b/d #in %\n",
+ "print \"When d is assumed as 400 mm and b as 200 mm\\n(a) Position of neutral axis=\",(Xc),\" mm\\n(b) Lever arm=\",(z),\" mm\\n(c) Moment of resistance=\",(Mr/10**6),\" kN-m\\n(d) Percentage of steel=\",(pt),\" percent\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.4:pg-28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam = 54.1568434521 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=250.0 #width, in mm\n",
+ "d=500.0 #effective depth, in mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "#to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ "z=d-Xc/3 #lever arm, in mm\n",
+ "Mr=b*Xc*sigma_cbc*z/2 #in N-mm\n",
+ "print \"Moment of resistance of the beam = \",(Mr/10**6),\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.5:pg-29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 87.5318457534 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=250 #width, in mm\n",
+ "D=550.0 #overall depth, in mm\n",
+ "Ast=1521 #area of steel, in sq mm\n",
+ "cover=25 #in mm\n",
+ "d=D-cover #effective depth, in mm\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #to find actual depth of neutral axis using b(x**2)/2=mAst(d-x)--> this will become of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #x>Xc; hence beam is over-reinforced\n",
+ "Mr=b*x*sigma_cbc/2*(d-x/3) #in N-mm\n",
+ "print \"Moment of resistance of the beam=\",(Mr/10**6),\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.6:pg-30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam = 33.0389810897 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=200 #width, in mm\n",
+ "d=450 #effective depth, in mm\n",
+ "Ast=3*.785*16**2 #three 16 dia bars, in sq mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #to find actual depth of neutral axis using b(x**2)/2=mAst(d-x), which becomes of form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #as x<Xc, beam is under-reinforced\n",
+ "Mr=Ast*sigma_st*(d-x/3) #in N-mm\n",
+ "print \"Moment of resistance of the beam = \",(Mr/10**6),\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.7:pg-31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance= 104.695224175 kN-m\n",
+ "Safe uniformly distributed load that the beam can carry= 18.0156053722 kN/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300 #width, in mm\n",
+ "D=700.0 #overall depth, in mm\n",
+ "Ast=3*.785*20**2 #3-20mm dia bars, in sq mm\n",
+ "cover=50 #in mm\n",
+ "d=D-cover #effective depth, in mm\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=190 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "l=6 #span, in m\n",
+ "w=25 #unit weight of concrete, in kN/m**3\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #to find actual depth of neutral axis using b(x**2)/2=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ " #solving quadratic equation\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #x<Xc, hence beam is under-reinforced\n",
+ "Mr=sigma_st*Ast*(d-x/3) #in N-mm\n",
+ "UDL=(Mr/10.0**6)*8/l**2 #in kN/m\n",
+ "self_weight=w*b*D/10**6 #in kN/m\n",
+ "net_weight=UDL-self_weight #in kN/m\n",
+ "print \"Moment of resistance=\",(Mr/10**6),\" kN-m\\nSafe uniformly distributed load that the beam can carry=\",(net_weight),\" kN/m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.8:pg-32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The concentrated load the beam can support at centre= 46.4305432264 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "b=250.0 #width, in mm\n",
+ "D=500 #overall depth, in mm\n",
+ "Ast=4*.785*22**2 #four 22 mm dia bars, in sq mm\n",
+ "cover=25 #in mm\n",
+ "d=D-cover #effective depth, in mm\n",
+ "l=5 #effective span, in m\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=190 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #to find actual depth of neutral axis using b(x**2)/2=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #as x>Xc, beam is over-reinforced\n",
+ "Mr=b*sigma_cbc*x/2*(d-x/3) #in N-mm\n",
+ "self_weight=25*(b/10**3)*(D/10**3) #in kN/m\n",
+ "M=Mr/10**6-self_weight*l**2/8 #moment of resistance available for external load, in kN-m\n",
+ "W=4*M/l #in kN\n",
+ "print \"The concentrated load the beam can support at centre=\",(W),\" kN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.9:pg-33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The safe load for slab= 11.3607587975 kN/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "d=120.0 #effective depth of slab, in mm\n",
+ " #consider 1 m strip of slab\n",
+ "b=1000.0 #in mm\n",
+ "s=80.0 #spacing of 12mm dia bars centre-to-centre, in mm\n",
+ "Ast=1000*.785*12**2/s #in sq mm\n",
+ "l=3.2 #span, in m\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #to find actual depth of neutral axis using b(x**2)/2=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #as x>Xc, the beam is over-reinforced\n",
+ "Mr=b*sigma_cbc*x/2*(d-x/3)/10**6 #in kN-m\n",
+ "UDL=Mr*8/l**2 #in kN/m\n",
+ "self_weight=25*(d/10.0**3)*(b/10**3) #in kN/m\n",
+ "W=UDL-self_weight #in kN/m\n",
+ "print \"The safe load for slab=\",(W),\" kN/m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.10:pg-34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stress in steel= 116 N/mm**2\n",
+ "Stress in concrete= 5 N/mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300.0 #width, in mm\n",
+ "D=700 #overall depth, in mm\n",
+ "Ast=4*.785*25**2 #four 25mm dia bars, in sq mm\n",
+ "cover=30 #in mm\n",
+ "d=D-cover #effective depth, in mm\n",
+ "M=130*10**6 #bending moment, in N-mm\n",
+ "m=18.66 #modular ratio\n",
+ " #to find actual depth of neutral axis using b(x**2)/2=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2.0\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ "z=d-x/3 #lever arm, in mm\n",
+ " #assuming under-reinforced section, Mr=Ast*sigma_st(d-x/3) and equating Mr to M\n",
+ "sigma_st=M/(Ast*z) #in MPa\n",
+ "sigma_st=116 #round-off, in MPa\n",
+ "sigma_cbc=(sigma_st/m)*x/(d-x) #in MPa\n",
+ "sigma_cbc=5 #round-off, in MPa\n",
+ "print \"Stress in steel=\",(sigma_st),\" N/mm**2\\nStress in concrete=\",(sigma_cbc),\" N/mm**2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.11:pg-35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stress in steel= 145.869819292 N/mm**2\n",
+ "Stress in concrete= 5.83077431505 N/mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "b=350.0 #width, in mm\n",
+ "D=650 #overall depth, in mm\n",
+ "Ast=4*.785*22**2 #four 22mm dia bars, in sq mm\n",
+ "cover=25 #in mm\n",
+ "d=D-cover #effective depth, in mm\n",
+ "W=20 #UDL, in kN/m\n",
+ "l=7 #span, in m\n",
+ "M=W*l**2/8.0*10**6 #bending moment, in N-mm \n",
+ "m=13.33 #modular ratio\n",
+ " #to find actual depth of neutral axis using b(x**2)/2=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ "z=d-x/3 #lever arm, in mm\n",
+ " #assuming under-reinforced section, Mr=Ast*sigma_st(d-x/3) and equating Mr to M\n",
+ "sigma_st=M/(Ast*z) #in MPa\n",
+ "sigma_cbc=(sigma_st/m)*x/(d-x) #in MPa\n",
+ "print \"Stress in steel=\",(sigma_st),\" N/mm**2\\nStress in concrete=\",(sigma_cbc),\" N/mm**2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.12:pg-35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Effective depth= 640.0 mm\n",
+ "Area of steel= 693.498452012 mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "b=250.0 #width, in mm\n",
+ "sigma_cbc=5.0 #in MPa\n",
+ "sigma_st=190.0 #in MPa\n",
+ "m=280.0/(3*sigma_cbc) #modular ratio\n",
+ "M=75*10.0**6 #bending moment, in N-mm\n",
+ " #critical depth of neutral axis, Xc=d/(1+sigma_st/(m*sigma_cbc))=a*d\n",
+ "a=1/(1+sigma_st/(m*sigma_cbc))\n",
+ "d=(M/(b*sigma_cbc*a*(1-a/3.0)/2.0))**0.5 #in mm\n",
+ "d=640 #round-off, in mm\n",
+ "Xc=a*d #in mm\n",
+ "Ast=b*Xc*sigma_cbc/(2*sigma_st) #in sq mm\n",
+ "print \"Effective depth=\",round(d),\" mm\\nArea of steel=\",(Ast),\" mm**2\",\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.13:pg-36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Dimensions of section= 265.0 x 530.0 mm\n",
+ "Area of steel= 1007.0 mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#b=d/2 (given)\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140.0 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "M=65*10.0**6 #bending moment, in N-mm\n",
+ " #critical depth of neutral axis, Xc=d/(1+sigma_st/(m*sigma_cbc))=a*d\n",
+ "a=1/(1+sigma_st/(m*sigma_cbc))\n",
+ "d=(M/(sigma_cbc*a*(1-a/3.0)/4))**(1/3.0) #in mm\n",
+ "d=530.0 #round-off, in mm\n",
+ "Xc=a*d #in mm\n",
+ "b=d/2.0 #in mm\n",
+ "Ast=M/sigma_st/0.87/d #in sq mm\n",
+ "Ast=1007.0 #round-off, in sq mm\n",
+ "print \"Dimensions of section=\",(b),\" x \",(d),\" mm\\nArea of steel=\",(Ast),\" mm**2\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter2_jki9geU.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter2_jki9geU.ipynb
new file mode 100644
index 00000000..3b926f9d
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter2_jki9geU.ipynb
@@ -0,0 +1,469 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2:Doubly Reinforced Sections"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.1:pg-47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Depth of neutral axis= 159.56861799 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=200.0 #width, in mm\n",
+ "D=400 #overall depth, in mm\n",
+ "m=18.66 #modular ratio\n",
+ "Ast=4*0.785*22**2 #four 22 mm dia bars at bottom, in sq mm\n",
+ "Asc=3*0.785*20**2 #three 20 mm dia bars at top, in sq mm\n",
+ "bottom_cover=30 #in mm\n",
+ "top_cover=25 #in mm\n",
+ "d=D-bottom_cover #effective depth, in mm\n",
+ " #to find x using b(x**2)/2 + (1.5m-1)Asc(x-d')=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=(1.5*m-1)*Asc+m*Ast\n",
+ "r=-(1.5*m-1)*Asc*top_cover-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ "print \"Depth of neutral axis=\",x,\"mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.2:pg-48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 120.506005456 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=280.0 #width, in mm\n",
+ "D=540.0 #overall depth, in mm\n",
+ "Ast=5*0.785*22**2 #five 22 mm dia bars on tension side, in sq mm\n",
+ "Asc=4*0.785*20**2 #four 20 mm dia bars on compression side, in sq mm\n",
+ "bottom_cover=40 #in mm\n",
+ "top_cover=30.0 #in mm\n",
+ "sigma_cbc=5.0#in MPa\n",
+ "sigma_st=140.0 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "d=D-bottom_cover #effective depth, in mm\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #to find x using b(x**2)/2 + (1.5m-1)Asc(x-d')=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=(1.5*m-1)*Asc+m*Ast\n",
+ "r=-(1.5*m-1)*Asc*top_cover-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #as x<Xc, beam is under-reinforced\n",
+ "sigma_cbc=(sigma_st/m)*x/(d-x) #in MPa\n",
+ "sigma_cbc_dash=sigma_cbc*(x-top_cover)/x #in MPa\n",
+ "sigma_sc=1.5*m*sigma_cbc_dash #in MPa\n",
+ " #stress in compression steel is found to be less than its permissible limit of 130 N/mm**2\n",
+ "Mr=b*x*sigma_cbc*(d-x/3)/2+(1.5*m-1)*Asc*sigma_cbc_dash*(d-top_cover) #in N-mm\n",
+ "print \"Moment of resistance of the beam=\",Mr/10**6,\"kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.3:pg-48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam using elastic theory method 132.70169173 kN-m\n",
+ "Moment of resistance of the beam using elastic theory method= 136.0248 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300.0 #width, in mm\n",
+ "d=600.0 #effective depth, in mm\n",
+ "Ast=1256 #in sq mm\n",
+ "Asc=1256.0 #in sq mm\n",
+ "top_cover=30.0 #in mm\n",
+ "sigma_cbc=7.0 #in MPa\n",
+ "sigma_st=190.0 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "#using elastic theory method\n",
+ "#to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #to find x using b(x**2)/2 + (1.5m-1)Asc(x-d')=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=(1.5*m-1)*Asc+m*Ast\n",
+ "r=-(1.5*m-1)*Asc*top_cover-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2.0*p) #in mm\n",
+ " #as x<Xc, beam is under-reinforced\n",
+ "sigma_cbc=(sigma_st/m)*x/(d-x) #in MPa\n",
+ "sigma_cbc_dash=sigma_cbc*(x-top_cover)/x #in MPa\n",
+ "sigma_sc=1.5*m*sigma_cbc_dash #in MPa\n",
+ " #stress in compression steel is found to be less than its permissible limit of 130 N/mm**2\n",
+ "Mr1=b*x*sigma_cbc*(d-x/3)/2+(1.5*m-1)*Asc*sigma_cbc_dash*(d-top_cover) #in N-mm\n",
+ " #using steel beam theory method\n",
+ "Mr2=Ast*sigma_st*(d-top_cover) #in N-mm\n",
+ "print \"Moment of resistance of the beam using elastic theory method\",Mr1/10**6,\"kN-m\\nMoment of resistance of the beam using elastic theory method=\",Mr2/10**6,\"kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.4:pg-49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 117.411305827 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=250.0 #width, in mm\n",
+ "D=550.0 #overall depth, in mm\n",
+ "Ast=4*0.785*25**2 #four 25 mm dia bars on tension side, in sq mm\n",
+ "Asc=3*0.785*22**2 #three 22 mm dia bars on compression side, in sq mm\n",
+ "bottom_cover=50.0 #in mm\n",
+ "top_cover=30 #in mm\n",
+ "d=D-bottom_cover #effective depth, in mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140.0 #in MPa\n",
+ "sigma_sc=130 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #to find x using b(x**2)/2 + (1.5m-1)Asc(x-d')=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=(1.5*m-1)*Asc+m*Ast\n",
+ "r=-(1.5*m-1)*Asc*top_cover-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #as x>Xc, beam is over-reinforced\n",
+ "sigma_cbc_dash=sigma_cbc*(x-top_cover)/x #in MPa\n",
+ "sigma_sc=1.5*m*sigma_cbc_dash #< 130 MPa, hence OK\n",
+ " #stress in compression steel is found to be less than its permissible limit of 130 N/mm**2\n",
+ "Mr=b*x*sigma_cbc*(d-x/3)/2+(1.5*m-1)*Asc*sigma_cbc_dash*(d-top_cover) #in N-mm\n",
+ "print \"Moment of resistance of the beam=\",Mr/10**6,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.5:pg-50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Uniformly distributed load the beam can carry (including self-weight)= 21.5549707684 kN/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=250.0 #width, in mm\n",
+ "d=450 #effective depth, in mm\n",
+ "Ast=4*0.785*22**2 #four 22 mm dia bars on tension side, in sq mm\n",
+ "Asc=Ast\n",
+ "top_cover=30 #in mm\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=140.0 #in MPa\n",
+ "sigma_sc=130 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "l=5.7 #effective span, in m\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #to find x using b(x**2)/2 + (1.5m-1)Asc(x-d')=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=(1.5*m-1)*Asc+m*Ast\n",
+ "r=-(1.5*m-1)*Asc*top_cover-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #as x<Xc, beam is under-reinforced\n",
+ "sigma_cbc=(sigma_st/m)*x/(d-x) #in MPa\n",
+ "sigma_cbc_dash=sigma_cbc*(x-top_cover)/x #in MPa\n",
+ "sigma_sc=1.5*m*sigma_cbc_dash #in MPa\n",
+ " #stress in compression steel is found to be less than its permissible limit of 130 N/mm**2\n",
+ "Mr=b*x*sigma_cbc*(d-x/3)/2+(1.5*m-1)*Asc*sigma_cbc_dash*(d-top_cover) #in N-mm\n",
+ "W=(Mr/10.0**6)*8.0/l**2 #in kN/m\n",
+ "print \"Uniformly distributed load the beam can carry (including self-weight)=\",W,\" kN/m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.6:pg-51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stress in concrete= 5.37043483737 N/mm**2\n",
+ "Stress in tension steel= 126.05367156 N/mm**2\n",
+ "Stress in compression steel= 127.691872535 N/mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=200.0 #width, in mm\n",
+ "D=480.0 #overall depth, in mm\n",
+ "Ast=4*0.785*25**2 #four 25 mm dia bars on tension side, in sq mm\n",
+ "Asc=3*0.785*22**2 #three 22 mm dia bars on compression side, in sq mm\n",
+ "bottom_cover=30 #in mm\n",
+ "top_cover=30 #in mm\n",
+ "d=D-bottom_cover #effective depth, in mm\n",
+ "m=18.66 #modular ratio\n",
+ "M=100*10**6 #in N-mm\n",
+ " #to find x using b(x**2)/2 + (1.5m-1)Asc(x-d')=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=(1.5*m-1)*Asc+m*Ast\n",
+ "r=-(1.5*m-1)*Asc*top_cover-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #sigma_cbc_dash=sigma_cbc*(x-d')/x=a*sigma_cbc\n",
+ "a=(x-top_cover)/x\n",
+ "sigma_cbc=M/(b*x*(d-x/3.0)/2+(1.5*m-1)*Asc*a*(d-top_cover)) #in MPa\n",
+ "sigma_st=m*sigma_cbc*(d-x)/x #in MPa\n",
+ "sigma_cbc_dash=a*sigma_cbc #in MPa\n",
+ "sigma_sc=1.5*m*sigma_cbc_dash #in MPa\n",
+ "print \"Stress in concrete=\",sigma_cbc,\" N/mm**2\\nStress in tension steel=\",sigma_st,\" N/mm**2\\nStress in compression steel=\",sigma_sc,\" N/mm**2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.7:pg-52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stress in concrete= 6.27031395641 N/mm**2\n",
+ "Stress in tension steel= 206.375703553 N/mm**2\n",
+ "Stress in compression steel= 103.628003414 N/mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300.0 #width, in mm\n",
+ "d=500.0 #effective depth, in mm\n",
+ "Ast=4*0.785*20**2 #four 20 mm dia bars on tension and compression side, in sq mm\n",
+ "Asc=Ast\n",
+ "top_cover=25.0 #in mm\n",
+ "m=13.33 #modular ratio\n",
+ "M=120*10.0**6 #in N-mm\n",
+ " #to find x using b(x**2)/2 + (1.5m-1)Asc(x-d')=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=b/2\n",
+ "q=(1.5*m-1)*Asc+m*Ast\n",
+ "r=-(1.5*m-1)*Asc*top_cover-m*Ast*d\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #sigma_cbc_dash=sigma_cbc*(x-d')/x=a*sigma_cbc\n",
+ "a=(x-top_cover)/x\n",
+ "sigma_cbc=M/(b*x*(d-x/3)/2+(1.5*m-1)*Asc*a*(d-top_cover)) #in MPa\n",
+ "sigma_st=m*sigma_cbc*(d-x)/x #in MPa\n",
+ "sigma_cbc_dash=a*sigma_cbc #in MPa\n",
+ "sigma_sc=1.5*m*sigma_cbc_dash #in MPa\n",
+ "print \"Stress in concrete=\",sigma_cbc,\" N/mm**2\\nStress in tension steel=\",sigma_st,\" N/mm**2\\nStress in compression steel=\",sigma_sc,\" N/mm**2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.8:pg-53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Tensile steel required= 1403 mm**2\n",
+ "Compression steel required= 565 mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=250 #width, in mm\n",
+ "D=600 #overall depth, in mm\n",
+ "bottom_cover=50 #in mm\n",
+ "top_cover=50 #in mm\n",
+ "d=D-bottom_cover #effective depth, in mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "M=95*10**6 #in N-mm\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #to find Ast1\n",
+ "Ast1=b*Xc*sigma_cbc/(2*sigma_st) #in sq mm\n",
+ "Ast1=982 #round-off, in sq mm\n",
+ "Mr=b*Xc*sigma_cbc/2*(d-Xc/3) #moment of resistance of singly reinforced beam, in N-mm\n",
+ "M1=M-Mr #remaining bending moment, in N-mm\n",
+ " #to find Ast2\n",
+ "Ast2=M1/(sigma_st*(d-top_cover)) #in sq mm\n",
+ "Ast2=421 #round-off, in sq mm\n",
+ "Ast=Ast1+Ast2 #in sq mm\n",
+ " #to find Asc\n",
+ "Asc=m*Ast2*(d-Xc)/((1.5*m-1)*(Xc-top_cover)) #in sq mm\n",
+ "Asc=565 #round-off, in sq mm\n",
+ "print \"Tensile steel required=\",Ast,\" mm**2\\nCompression steel required=\",Asc,\" mm**2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.9:pg-54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Tensile steel required= 2331.20260317 mm**2\n",
+ "Compression steel required= 1241.93655457 mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=360 #width, in mm\n",
+ "d=750.0 #effective depth, in mm\n",
+ "top_cover=50 #in mm\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=190 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "M=300.0*10**6 #in N-mm\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #to find Ast1\n",
+ "Ast1=b*Xc*sigma_cbc/(2*sigma_st) #in sq mm\n",
+ "Ast1=1638.0 #round-off, in sq mm\n",
+ "Mr=b*Xc*sigma_cbc/2*(d-Xc/3) #moment of resistance of singly reinforced beam, in N-mm\n",
+ "M1=M-Mr #remaining bending moment, in N-mm\n",
+ " #to find Ast2\n",
+ "Ast2=M1/(sigma_st*(d-top_cover)) #in sq mm\n",
+ "Ast=Ast1+Ast2 #in sq mm\n",
+ " #to find Asc\n",
+ "Asc=m*Ast2*(d-Xc)/((1.5*m-1)*(Xc-top_cover)) #in sq mm\n",
+ "print \"Tensile steel required=\",Ast,\" mm**2\\nCompression steel required=\",Asc,\" mm**2\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter3_9BtkYo4.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter3_9BtkYo4.ipynb
new file mode 100644
index 00000000..776d6bac
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter3_9BtkYo4.ipynb
@@ -0,0 +1,728 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3:T and L Beams"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.1:pg-72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Neutral axis depth= 240 mm\n",
+ "Area of steel= 4334.41693757 mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1300 #width of flange, in mm\n",
+ "Df=80.0 #thickness of flange, in mm\n",
+ "d=600 #effective depth, in mm\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ "Xc=240 #round-off, in mm\n",
+ " #to find Ast\n",
+ "Ast=Bf*Df*(Xc-Df/2)/(m*(d-Xc)) #in sq mm\n",
+ "print \"Neutral axis depth=\",(Xc),\" mm\\nArea of steel=\",Ast,\" mm**2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.2:pg-72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Neutral axis depth= 263 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1500 #width of flange, in mm\n",
+ "Bw=300 #breadth of web, in mm\n",
+ "Df=100 #thickness of flange, in mm\n",
+ "d=700 #effective depth, in mm\n",
+ "m=18.66 #modular ratio\n",
+ "Ast=8*0.785*25**2 #eight 25 mm dia bars, in sq mm\n",
+ " #assume depth of neutral axis is less than or equal to thickness of flange; find x using Bf(x**2)/2=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=Bf/2.0\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ " #solving quadratic equation\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #x>Df; hence our assumption is incorrect; equating moments of area on compression and tension sides about N.A.\n",
+ "x=(m*Ast*d+Bf*Df**2/2)/(m*Ast+Bf*Df) #in mm\n",
+ "x=263 #round-off, in mm\n",
+ "print \"Neutral axis depth=\",(x),\" mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.3:pg-73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Neutral axis depth= 84.45 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1200 #width of flange, in mm\n",
+ "Bw=200 #breadth of web, in mm\n",
+ "Df=100 #thickness of flange, in mm\n",
+ "d=400 #effective depth, in mm\n",
+ "m=13.33 #modular ratio\n",
+ "Ast=4*0.785*18**2 #four 18mm dia bars, in sq mm\n",
+ " #assume x > Df; ; equating moments of area on compression and tension sides about N.A.\n",
+ "x=(m*Ast*d+Bf*Df**2/2.0)/(m*Ast+Bf*Df) #in mm\n",
+ " #as x < Df; our assumption was incorrect\n",
+ "#x < Df; find x using Bf(x**2)/2=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=Bf/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ " #solving quadratic equation\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #x<Df; hence our assumption is correct\n",
+ "print \"Neutral axis depth=\",round(x,2),\" mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.4:pg-74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 359.322310166 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1500 #width of flange, in mm\n",
+ "Bw=300 #breadth of web, in mm\n",
+ "Df=100 #thickness of flange, in mm\n",
+ "d=700 #effective depth, in mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "Ast=8*0.785*25**2 #eight 25 mm dia bars, in sq mm\n",
+ " #assume x < Df; find x using Bf(x**2)/2=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=Bf/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ " #solving quadratic equation\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ " #x > Df; hence our assumption is incorrect; equating moments of area on compression and tension sides about N.A.\n",
+ "x=(m*Ast*d+Bf*Df**2/2)/(m*Ast+Bf*Df) #in mm\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #as x < Xc, beam is under-reinforced\n",
+ "sigma_cbc=sigma_st/m*x/(d-x) #in MPa\n",
+ "sigma_cbc_dash=sigma_cbc*(x-Df)/x #in MPa\n",
+ " #to find lever arm\n",
+ "z=d-(sigma_cbc+2*sigma_cbc_dash)/(sigma_cbc+sigma_cbc_dash)*Df/3 #in mm\n",
+ "Mr=Bf*Df*(sigma_cbc+sigma_cbc_dash)*z/2 #in N-mm\n",
+ "print \"Moment of resistance of the beam=\",Mr/10**6,\"kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.5:pg-76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 71.8778860857 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1200 #width of flange, in mm\n",
+ "Bw=200 #breadth of web, in mm\n",
+ "Df=100 #thickness of flange, in mm\n",
+ "d=400 #effective depth, in mm\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=190 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "Ast=4*0.785*18**2 #four 18 mm dia bars, in sq mm\n",
+ "#assume x < Df; find x using Bf(x**2)/2=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=Bf/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ "#solving quadratic equation\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ "#x < Df; hence our assumption is correct\n",
+ "#to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ "#as x < Xc, beam is under-reinforced\n",
+ "sigma_cbc=sigma_st/m*x/(d-x) #in MPa\n",
+ "#taking moments about tensile steel\n",
+ "Mr=Bf*x*sigma_cbc*(d-x/3)/2 #in N-mm\n",
+ "print \"Moment of resistance of the beam=\",Mr/10**6,\"kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.7:pg-77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 110.719528403 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1500 #width of flange, in mm\n",
+ "Bw=200 #breadth of web, in mm\n",
+ "Df=100 #thickness of flange, in mm\n",
+ "d=400 #effective depth, in mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "Ast=2190 #in sq mm\n",
+ " #assume x>Df\n",
+ "x=(m*Ast*d+Bf*Df**2/2)/(m*Ast+Bf*Df) #in mm\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #as x<Xc, beam is under-reinforced\n",
+ "sigma_cbc=sigma_st/m*x/(d-x) #in MPa\n",
+ "sigma_cbc_dash=sigma_cbc*(x-Df)/x #in MPa\n",
+ " #to find lever arm\n",
+ "z=d-(sigma_cbc+2*sigma_cbc_dash)/(sigma_cbc+sigma_cbc_dash)*Df/3 #in mm\n",
+ " #taking moments about tensile steel\n",
+ "Mr=Bf*Df*(sigma_cbc+sigma_cbc_dash)*z/2 #in N-mm\n",
+ "print \"Moment of resistance of the beam=\",Mr/10**6,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.8:pg-78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 137.638859204 kN-m\n",
+ "Capacity to take uniformly distributed load(including self-weight)= 30.5864131564 kN/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1200 #width of flange, in mm\n",
+ "Bw=300 #breadth of web, in mm\n",
+ "Df=120 #thickness of flange, in mm\n",
+ "d=500 #effective depth, in mm\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=190 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "Ast=5*0.785*20**2 #five 20 mm dia bars, in sq mm\n",
+ "l=6 #span, in m\n",
+ "#assume depth of neutral axis is less than or equal to thickness of flange; find x using Bf(x**2)/2=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=Bf/2\n",
+ "q=m*Ast\n",
+ "r=-m*Ast*d\n",
+ "#solving quadratic equation\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ "#x < Df; hence our assumption is correct\n",
+ "#to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ "#as x<Xc, beam is under-reinforced\n",
+ "sigma_cbc=sigma_st/m*x/(d-x) #in MPa\n",
+ "#taking moments about tensile steel\n",
+ "Mr=Bf*x*sigma_cbc*(d-x/3)/2 #in N-mm\n",
+ "W=(Mr/10**6)*8.0/l**2 #in kN/m\n",
+ "print \"Moment of resistance of the beam=\", Mr/10**6,\" kN-m\\nCapacity to take uniformly distributed load(including self-weight)=\",W,\" kN/m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.9:pg-79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stress in concrete= 2.36901404247 N/mm**2\n",
+ "Stress in tension steel= 73.0962080852 N/mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1400 #width of flange, in mm\n",
+ "Df=120 #thickness of flange, in mm\n",
+ "d=600.0 #effective depth, in mm\n",
+ "m=18.66 #modular ratio\n",
+ "Ast=4000 #in sq mm\n",
+ "M=160*10**6 #in N-mm\n",
+ " #Assume x>Df; equating moments of area on compression and tension sides about N.A.\n",
+ "x=(m*Ast*d+Bf*Df**2/2)/(m*Ast+Bf*Df) #in mm\n",
+ " #let sigma_cbc_dash=a*sigma_cbc\n",
+ "a=(x-Df)/x\n",
+ " #to find lever arm\n",
+ "z=d-(1+2*a)/(1+a)*Df/3 #in mm\n",
+ "sigma_cbc=2*M/(Bf*Df*(1+a)*z) #in MPa\n",
+ "sigma_st=m*sigma_cbc*(d-x)/x #in MPa\n",
+ "print \"Stress in concrete=\",sigma_cbc,\" N/mm**2\\nStress in tension steel=\",sigma_st,\" N/mm**2\"\n",
+ " #answer given in textbook is incorrect\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.10:pg-80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stress in concrete= 6.37094400445 N/mm**2\n",
+ "Stress in tension steel= 135.157527269 N/mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1250 #width of flange, in mm\n",
+ "Df=120 #thickness of flange, in mm\n",
+ "d=700 #effective depth, in mm\n",
+ "m=13.33 #modular ratio\n",
+ "Ast=5500 #in sq mm\n",
+ "W=60 #UDL including self-weight, in kN/m\n",
+ "l=8 #span, in m\n",
+ "M=W*l**2/8.0*10**6 #in N-mm\n",
+ " #Assume x>Df. Equating moments of area on compressiona and tension sides about N.A.\n",
+ "x=(m*Ast*d+Bf*Df**2.0/2)/(m*Ast+Bf*Df) #in mm\n",
+ " #let sigma_cbc_dash=a*sigma_cbc\n",
+ "a=(x-Df)/x\n",
+ " #to find lever arm\n",
+ "z=d-(1+2*a)/(1+a)*Df/3 #in mm\n",
+ "sigma_cbc=2*M/(Bf*Df*(1+a)*z) #in MPa\n",
+ "sigma_st=m*sigma_cbc*(d-x)/x #in MPa\n",
+ "print \"Stress in concrete=\",sigma_cbc,\" N/mm**2\\nStress in tension steel=\",sigma_st,\" N/mm**2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.11:pg-81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 200.669336976 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1300 #width of flange, in mm\n",
+ "Df=100 #thickness of flange, in mm\n",
+ "d=500 #effective depth, in mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=275 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "Ast=1570 #in sq mm\n",
+ "Asc=1256 #in sq mm\n",
+ "top_cover=30 #in mm\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #assume x>Df; equating moments of area on compression and tension sides about N.A.\n",
+ "x=(m*Ast*d+Bf*Df**2/2+(1.5*m-1)*Asc*top_cover)/(m*Ast+Bf*Df+(1.5*m-1)*Asc) #in mm\n",
+ " #as x<Xc, beam is under-reinforced\n",
+ "sigma_cbc=sigma_st/m*x/(d-x) #in MPa\n",
+ "sigma_cbc_dash=sigma_cbc*(x-top_cover)/x #stress in concrete at level of compression steel, in MPa\n",
+ "sigma_cbc_double_dash=sigma_cbc*(x-Df)/x #stress in concrete at the underside of the slab, in MPa\n",
+ " #to find lever arm\n",
+ "z=round(d-(sigma_cbc+2*sigma_cbc_double_dash)/(sigma_cbc+sigma_cbc_double_dash)*Df/3) #in mm\n",
+ " #taking moments about tensile steel\n",
+ "Mr=Bf*Df*(sigma_cbc+sigma_cbc_double_dash)*z/2+(1.5*m-1)*Asc*sigma_cbc_dash*(d-top_cover) #in N-mm\n",
+ "print \"Moment of resistance of the beam=\",Mr/10**6,\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.12:pg-82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 252.263730672 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1500 #width of flange, in mm\n",
+ "Df=150 #thickness of flange, in mm\n",
+ "d=600 #effective depth, in mm\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "Ast=1964 #in sq mm\n",
+ "Asc=1140 #in sq mm\n",
+ "top_cover=50 #in mm\n",
+ "#to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ "#assume x>Df; equating moments of area on compression and tension sides about N.A.\n",
+ "x=(m*Ast*d+Bf*Df**2/2+(1.5*m-1)*Asc*top_cover)/(m*Ast+Bf*Df+(1.5*m-1)*Asc) # in mm\n",
+ "#we find that x<Df, hence our assumption that x>Df is wrong\n",
+ "#to find x using Bf(x**2)/2 + (1.5m-1)Asc(x-d')=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=Bf/2\n",
+ "q=m*Ast+(1.5*m-1)*Asc\n",
+ "r=-(m*Ast*d+(1.5*m-1)*Asc*top_cover)\n",
+ "#solving quadratic equation\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ "#as x<Xc, beam is under-reinforced\n",
+ "sigma_cbc=sigma_st/m*x/(d-x) #in MPa\n",
+ "sigma_cbc_dash=sigma_cbc*(x-top_cover)/x #stress in concrete at level of compression steel, in MPa\n",
+ "#taking moments about tensile steel\n",
+ "Mr=Bf*x*sigma_cbc*(d-x/3)/2+(1.5*m-1)*Asc*sigma_cbc_dash*(d-top_cover) #in N-mm\n",
+ "print \"Moment of resistance of the beam=\",Mr/10**6,\" kN-m\"\n",
+ " #answer given in textbook is incorrect\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.13:pg-83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stress in concrete= 7.17910912778 N/mm**2\n",
+ "Stress in tension steel= 301.875837251 N/mm**2\n",
+ "Stress in compression steel= 98.8192837935 N/mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1450 #width of flange, in mm\n",
+ "Df=120 #thickness of flange, in mm\n",
+ "d=400 #effective depth, in mm\n",
+ "m=13.33 #modular ratio\n",
+ "Ast=1800 #in sq mm\n",
+ "Asc=450 #in sq mm\n",
+ "top_cover=30 #in mm\n",
+ "M=200*10**6 #in N-mm\n",
+ "#assume x>Df; equating moments of area on compression and tension sides about N.A.\n",
+ "x=(m*Ast*d+Bf*Df**2/2+(1.5*m-1)*Asc*top_cover)/(m*Ast+Bf*Df+(1.5*m-1)*Asc) #in mm\n",
+ "#we find that x<Df, hence our assumption that x>Df is wrong\n",
+ "#to find x using Bf(x**2)/2 + (1.5m-1)Asc(x-d')=mAst(d-x), which becomes of the form px**2+qx+r=0\n",
+ "p=Bf/2\n",
+ "q=m*Ast+(1.5*m-1)*Asc\n",
+ "r=-(m*Ast*d+(1.5*m-1)*Asc*top_cover)\n",
+ "#solving quadratic equation\n",
+ "x=(-q+math.sqrt(q**2-4*p*r))/(2*p) #in mm\n",
+ "#as x<Xc, beam is under-reinforced; let stress in concrete at level of steel be equal to 'a' times the stress in concrete at top\n",
+ "a=(x-top_cover)/x\n",
+ "#taking moments about tensile steel\n",
+ "sigma_cbc=M/(Bf*x*(d-x/3)/2+(1.5*m-1)*Asc*a*(d-top_cover)) #in MPa\n",
+ "sigma_st=m*sigma_cbc*(d-x)/x #in MPa\n",
+ "sigma_sc=1.5*m*a*sigma_cbc #in MPa\n",
+ "print \"Stress in concrete=\",sigma_cbc,\" N/mm**2\\nStress in tension steel=\",sigma_st,\" N/mm**2\\nStress in compression steel=\",sigma_sc,\" N/mm**2\"\n",
+ " #answer in textbook is incorrect\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.14:pg-84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moment of resistance of the beam= 90.15 kN-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=500 #width of flange, in mm\n",
+ "Bw=250 #breadth of web, in mm\n",
+ "Df=100 #thickness of flange, in mm\n",
+ "d=500 #effective depth, in mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "Ast=2000.0 #in sq mm\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ " #assume x>Df\n",
+ "x=(m*Ast*d+Bf*Df**2/2.0)/(m*Ast+Bf*Df) #in mm\n",
+ " #as x>Xc, beam is over-reinforced\n",
+ "sigma_cbc_dash=sigma_cbc*(x-Df)/x #in MPa\n",
+ " #to find lever arm\n",
+ "z=d-(sigma_cbc+2*sigma_cbc_dash)/(sigma_cbc+sigma_cbc_dash)*Df/3 #in mm\n",
+ " #taking moments about tensile steel\n",
+ "Mr=Bf*Df*(sigma_cbc+sigma_cbc_dash)*z/2 #in N-mm\n",
+ "print \"Moment of resistance of the beam=\",round(Mr/10.0**6,2),\" kN-m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.15:pg-85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Area of steel required= 3699 mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=750 #width of flange, in mm\n",
+ "Bw=250 #breadth of web, in mm\n",
+ "Df=100 #thickness of flange, in mm\n",
+ "d=700 #effective depth, in mm\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=190 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "M=460*10**6 #in N-mm\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ "sigma_cbc_dash=sigma_cbc*(Xc-Df)/Xc #in MPa\n",
+ " #to find lever arm\n",
+ "z=d-(sigma_cbc+2*sigma_cbc_dash)/(sigma_cbc+sigma_cbc_dash)*Df/3 #in mm\n",
+ " #taking moments about tensile steel\n",
+ "Ast=M/(sigma_st*z) #in sq mm\n",
+ "Ast=3699 #round-off, in sq mm\n",
+ "print \"Area of steel required=\",(Ast),\"mm**2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.16:pg-86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stress in concrete= 4.44406201666 N/mm**2\n",
+ "Stress in tension steel= 118.75 N/mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Df=120 #thickness of flange, in mm\n",
+ "Bw=200 #breadth of web, in mm\n",
+ "d=550 #effective depth, in mm\n",
+ "l=6 #span, in m\n",
+ "Bf=l*1000.0/12+Bw+3*Df #in mm\n",
+ "m=13.33 #modular ratio\n",
+ "Ast=3200 #in sq mm\n",
+ "M=190*10**6 #in N-mm\n",
+ "#assume x>Df; equating moments of area on compression and tension sides about N.A.\n",
+ "x=(m*Ast*d+Bf*Df**2/2)/(m*Ast+Bf*Df) #in mm\n",
+ "#we find that x>Df, hence our assumption that x>Df is correct\n",
+ "#as x<Xc, beam is under-reinforced; let stress in concrete at underside of slab be equal to 'a' times the stress in concrete at top\n",
+ "a=(x-Df)/x\n",
+ "#to find lever arm\n",
+ "z=d-(1+2*a)/(1+a)*Df/3 #in mm\n",
+ "z=500 #round-off, in mm\n",
+ " #taking moments about tensile steel\n",
+ "sigma_cbc=M/(Bf*Df*(1+a)*z/2) #in MPa\n",
+ "sigma_st=m*sigma_cbc*(d-x)/x #in MPa\n",
+ "print \"Stress in concrete=\",sigma_cbc,\" N/mm**2\\nStress in tension steel=\",sigma_st,\" N/mm**2\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter4_KaWbXff.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter4_KaWbXff.ipynb
new file mode 100644
index 00000000..baea0397
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter4_KaWbXff.ipynb
@@ -0,0 +1,464 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4:Shear and Development Length"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.1:pg-134"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Nominal shear stress in beam= 0.48 MPa\n",
+ "Shear strength of concrete= 0.37 MPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=250 #width, in mm\n",
+ "d=500.0 #effective depth, in mm\n",
+ "W=20 #UDL including self-weight, in kN/m\n",
+ "Pt=1 #percentage tensile steel\n",
+ "l=6 #span, in m\n",
+ "V=W*l/2.0 #in kN\n",
+ "Tv=(V*10**3)/(b*d) #in MPa\n",
+ " #for Pt=1% and for M15 grade concrete\n",
+ "Tc=0.37 #in MPa\n",
+ " #as Tv>Tc, shear reinforcement is required\n",
+ "print \"Nominal shear stress in beam=\",Tv,\" MPa\\nShear strength of concrete=\",Tc,\" MPa\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.2:pg-135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Nominal shear stress in beam= 0.469565217391 MPa\n",
+ "Shear strength of concrete= 0.4 MPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=230 #width, in mm\n",
+ "d=500 #effective depth, in mm\n",
+ "W=24 #UDL including self-weight, in kN/m\n",
+ "Ast=4*0.785*20**2 #four 20 mm dia bars, in sq mm\n",
+ "Pt=Ast/(b*d)*100 #percentage tensile steel\n",
+ "l=4.5 #span, in m\n",
+ "V=W*l/2.0 #in kN\n",
+ "Tv=(V*10**3)/(b*d) #in MPa\n",
+ " #for Pt=1.1% and for M20 grade concrete\n",
+ "Tc=0.40 #in MPa\n",
+ " #as Tv>Tc, shear reinforcement is required\n",
+ "print \"Nominal shear stress in beam=\",Tv,\" MPa\\nShear strength of concrete=\",Tc,\" MPa\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.3:pg-135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Nominal shear stress in beam= 2.0 MPa\n",
+ "For given grade of concrete, Tcmax=1.8 MPa and as Tv > Tcmax, section is to be redesigned so that Tv becomes less than Tcmax\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300 #width, in mm\n",
+ "d=600 #effective depth, in mm\n",
+ "W=100 #UDL including self-weight, in kN/m\n",
+ "Pt=2 #percentage tensile steel\n",
+ "l=7.2 #span, in m\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=190 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "V=W*l/2.0 #in kN\n",
+ "Tv=(V*10**3)/(b*d) #in MPa\n",
+ "Tcmax=1.8 #in MPa\n",
+ " #as Tv>Tcmax, section is to be redesigned so that Tv becomes less than Tcmax\n",
+ "print \"Nominal shear stress in beam=\",Tv,\" MPa\\nFor given grade of concrete, Tcmax=1.8 MPa and as Tv > Tcmax, section is to be redesigned so that Tv becomes less than Tcmax\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.4:pg-136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Nominal shear stress in slab, Tv= 0.175 MPa\n",
+ "Shear strength of slab, Tc= 0.481 MPa. As Tc > Tv, no shear reinforcement is required\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=1000 #consider 1 m width of slab\n",
+ "D=100 #depth of slab, in mm\n",
+ "cover=20 #in mm\n",
+ "d=D-cover #effective depth, in mm\n",
+ "W=7 #uniformly distributed load, in kN/m**2\n",
+ "dia=10 #in mm\n",
+ "s=100 #spacing of 10 mm dia bars, in mm\n",
+ "l=4 #span, in m\n",
+ "V=W*l/2.0 #in kN\n",
+ "Pt=1000*.785*dia**2/(s*b*d)*100 #in %\n",
+ "Tv=(V*10**3)/(b*d) #in MPa\n",
+ " #for given Pt and M15 grade concrete\n",
+ "Tc=0.37 #in MPa\n",
+ " #and for solid slabs\n",
+ "k=1.3\n",
+ "Tc=k*Tc #in MPa\n",
+ "print \"Nominal shear stress in slab, Tv=\",Tv,\" MPa\\nShear strength of slab, Tc=\",Tc,\" MPa. As Tc > Tv, no shear reinforcement is required\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.5:pg-136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Provide 6 mm dia bars at 118 mm c/c throughout the length of the beam, as shear reinforcement\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=300 #width, in mm\n",
+ "d=1010 #effective depth, in mm\n",
+ "W=45 #UDL including self-weight, in kN/m\n",
+ "Ast=6*0.785*22**2 #six 22 mm dia bars, in sq mm\n",
+ "l=7 #span, in m\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_sv=140 #in MPa\n",
+ "Fy=250 #in MPa\n",
+ "V=W*l/2.0 #in kN\n",
+ "Tv=(V*10**3)/(b*d) #in MPa\n",
+ "Tcmax=1.6 #in MPa\n",
+ " #Tv<Tcmax; OK\n",
+ "Pt=Ast/(b*d)*100 #percentage tensile steel\n",
+ " #for given Pt and for M15 grade concrete\n",
+ "Tc=0.34 #in MPa\n",
+ "Vs=V-Tc*b*d/10**3 #in kN\n",
+ " #providing 6 mm dia stirrups\n",
+ "dia=6 #in mm\n",
+ "Asv=2*0.785*dia**2 #in sq mm\n",
+ "Sv1=Asv*sigma_sv*d/(Vs*10**3) #in mm\n",
+ "Sv1=145 #round-off, in mm\n",
+ "#Sv<0.75d or 450 mm, whichever is less; hence OK\n",
+ "#calculating minimum spacing of shear reinforcement\n",
+ "Sv2=Asv*Fy/(b*0.4) #in mm\n",
+ "Sv2=118 #round-off, in mm\n",
+ "Sv=min(Sv1,Sv2)\n",
+ "print \"Provide 6 mm dia bars at \",Sv,\" mm c/c throughout the length of the beam, as shear reinforcement\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.6:pg-137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Provide 6 mm dia stirrups at 105 mm c/c upto 3.28 m from both ends\n",
+ "For the remaining portion, provide 6 mm dia stirrups at 260 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Bf=1600 #width, in mm\n",
+ "Df=100 #thickness of slab, in mm\n",
+ "d=400 #effective depth, in mm\n",
+ "Bw=225 #breadth of web, in mm\n",
+ "b=Bw\n",
+ "W=30 #UDL including self-weight, in kN/m\n",
+ "Ast=5*0.785*22**2 #five 22 mm dia bars, in sq mm\n",
+ "l=9.2 #span, in m\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_sv=230 #in MPa\n",
+ "Fy=415 #in MPa\n",
+ "V=W*l/2.0 #in kN\n",
+ "Tv=(V*10**3)/(b*d) #in MPa\n",
+ "Tcmax=1.6 #in MPa\n",
+ " #Tv<Tcmax; OK\n",
+ "Pt=Ast/(b*d)*100 #percentage tensile steel\n",
+ " #for given Pt and for M15 grade concrete\n",
+ "Tc=0.44 #in MPa\n",
+ "Vs=V-Tc*b*d/10**3 #in kN\n",
+ " #providing bent-up bars\n",
+ "Asv=0.785*22**2 #in sq mm\n",
+ "Vs1=Asv*sigma_sv*math.sin(45.0)/10**3 #in kN\n",
+ " #but shear taken up by bent-up bar is limited to Vs/2\n",
+ "Vs1=Vs/2 #in kN\n",
+ " #providing 6 mm dia stirrups, which will take up remaining shear force\n",
+ "Vs2=Vs-Vs1 #in kN\n",
+ "dia=6 #in mm\n",
+ "Asv=2*0.785*dia**2 #in sq mm\n",
+ "Sv=Asv*sigma_sv*d/(Vs2*10**3) #in mm\n",
+ "Sv1=105 #round-off, in mm\n",
+ "#Sv<0.75d or 450 mm, whichever is less; hence OK\n",
+ "#calculating minimum spacing of shear reinforcement\n",
+ "Sv2=Asv*Fy/(b*0.4) #in mm\n",
+ "Sv2=260 #round-off, in mm\n",
+ "#to calculate distance 'x' from support where shear stress in concrete is equal to Tc\n",
+ "x=Tc/Tv*l/2.0 #in m\n",
+ "print \"Provide 6 mm dia stirrups at \",(Sv1),\" mm c/c upto \",(l/2.0-x),\" m from both ends\\nFor the remaining portion, provide 6 mm dia stirrups at \",(Sv2),\" mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.7:pg-138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Development length required from the face of the support = 177 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "D=100 #thickness of slab, in mm\n",
+ "l=3 #span of slab, in m\n",
+ "s=0.23 #thickness of support, in m\n",
+ "Lef=l+s #effective span, in m\n",
+ "W=5 #UDL, in kN/m\n",
+ "cover=15 #in mm\n",
+ "R=W*Lef/2 #in kN\n",
+ "M=(R*s/2-W*s**2/2)*10**6 #bending moment at face of wall, in N-mm\n",
+ " #10 mm dia bars at 145 mm c/c as main steel\n",
+ "dia=10 #in mm\n",
+ "c=145 #spacing of reinforcement, in mm\n",
+ "Ast=1000*0.785*dia**2/c #in sq mm\n",
+ " #as alternate bars are bent up\n",
+ "Ast=Ast/2 #available steel reinforcement at face of wall, in sq mm\n",
+ "d=D-10/2.0-cover #in mm\n",
+ " #assuming balanced section\n",
+ "z=0.87*d #in mm\n",
+ "sigma_st=M/(Ast*z) #in MPa\n",
+ "Tbd=0.6 #bond stress, in MPa\n",
+ "Ld=dia*sigma_st/(4*Tbd) #in mm\n",
+ "Ld=177 #round-off, in mm\n",
+ "print \"Development length required from the face of the support = \",(Ld),\" mm\"\n",
+ " #answer given in textbook is incorrect\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.8:pg-139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Development length required from the face of the support for tension steel = 176.492736343 mm\n",
+ "Development length required from the face of the support for compression steel = 53.542740239 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=230 #width, in mm\n",
+ "d=500 #effective depth, in mm\n",
+ "l=6 #span, in m\n",
+ "s=0.3 #thickness of support, in m\n",
+ "Lef=l+s #effective span, in m\n",
+ "W=60 #UDL, in kN/m\n",
+ "Ast=6*0.785*20**2 #six 20 mm dia bars at bottom, in sq mm\n",
+ "Asc=2*0.785*20**2 #two 20 mm dia bars at top, in sq mm\n",
+ "dia=20 #in mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "R=W*l/2.0 #in kN\n",
+ "M=(R*s/2-W*s**2/2.0)*10**6 #bending moment at face of wall, in N-mm\n",
+ " #assuming balanced section\n",
+ "z=0.87*d #in mm\n",
+ "sigma_st1=M/(Ast*z) #in MPa\n",
+ "Tbd=0.6*1.4 #bond stress in MPa for deformed steel and M15\n",
+ "Ld1=dia*sigma_st1/(4*Tbd) #in mm\n",
+ " #to find critical depth of neutral axis\n",
+ "Xc=d/(1+sigma_st/(m*sigma_cbc)) #in mm\n",
+ "Xc=144 #round-off, in mm\n",
+ " #at face of support\n",
+ "sigma_cbc=sigma_st1/m*Xc/(d-Xc) #in MPa\n",
+ "sigma_sc=1.5*m*sigma_cbc #in MPa\n",
+ "Tbd=1.68 #bond stress in MPa for M15 and deformed steel in compression\n",
+ "Ld2=dia*sigma_sc/(4*Tbd) #in mm\n",
+ "print \"Development length required from the face of the support for tension steel = \",(Ld1),\" mm\\nDevelopment length required from the face of the support for compression steel = \",(Ld2),\" mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.9:pg-139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Development length required from the face of the support = 412 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "D=120 #thickness of slab, in mm\n",
+ "l=1.5 #span of slab, in m\n",
+ "s=0.23 #thickness of support, in m\n",
+ "Lef=l+s #effective span, in m\n",
+ "W1=3 #UDL, in kN/m**2\n",
+ "cover=15 #in mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "W2=(D/10**3)*1*25 #self load, in kN/m\n",
+ "W=W1+W2 #in kN/m\n",
+ "M=W*l**2/2*10**6 #bending moment at face of wall, in N-mm\n",
+ " #10 mm dia bars at 145 mm c/c as main steel\n",
+ "dia=10 #in mm\n",
+ "d=D-dia/2-cover\n",
+ "c=100 #spacing of reinforcement, in mm\n",
+ "Ast=1000*0.785*dia**2/c #in sq mm\n",
+ " #assuming balanced section\n",
+ "z=0.87*d #in mm\n",
+ "sigma_st=M/(Ast*z) #in MPa\n",
+ "Tbd=0.6 #bond stress in MPa\n",
+ "Ld=dia*sigma_st/(4*Tbd) #in mm\n",
+ "Ld=412 #round-off,in mm\n",
+ "print \"Development length required from the face of the support = \",(Ld),\" mm\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter5_NTVaiVF.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter5_NTVaiVF.ipynb
new file mode 100644
index 00000000..e51c7989
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter5_NTVaiVF.ipynb
@@ -0,0 +1,570 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5:Columns"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.1:pg-171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Permissible load on the column = 607.275 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cc=4 #in MPa\n",
+ "sigma_sc=130 #in MPa\n",
+ "Asc=4*0.785*25**2 #four 25 mm dia bars, in sq mm\n",
+ "b=300 #width, in mm\n",
+ "D=300 #depth, in mm\n",
+ "Ag=b*D #in sq mm\n",
+ "Ac=Ag-Asc #in sq mm\n",
+ "P=sigma_cc*Ac+sigma_sc*Asc #in N\n",
+ "print \"Permissible load on the column = \",P/10**3,\"kN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.2:pg-172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Permissible load on the column = 848.54 kN\n",
+ "\n",
+ "Provide 6 mm dia links at spacing equal to least of (i)Least lateral dimension = 250 mm, (ii) 16 times longitudinal bar dia = 320 mm, (iii) 48 times link bar dia = 288 mm, i.e., 250 mm\n",
+ "Hence, spacing or pitch = 250 mm\n",
+ "\n",
+ "Percentage of steel is in between 0.8 to 4 as prescribed by IS code\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cc=5 #in MPa\n",
+ "sigma_sc=190 #in MPa\n",
+ "Asc=6*0.785*20**2 #six 20 mm dia bars, in sq mm\n",
+ "b=250 #width, in mm\n",
+ "D=400 #depth, in mm\n",
+ "Ag=b*D #in sq mm\n",
+ "Ac=Ag-Asc #in sq mm\n",
+ "P=sigma_cc*Ac+sigma_sc*Asc #in N\n",
+ "print \"Permissible load on the column =\",P/10**3,\" kN\\n\"\n",
+ " #design of links\n",
+ "dia=20.0/4 #in mm\n",
+ " #as this is less than 6\n",
+ "dia=6 #in mm\n",
+ " #spacing of links\n",
+ "s1=b #in mm\n",
+ "s2=16*20 #in mm\n",
+ "s3=48*dia #in mm\n",
+ "s=min(s1,s2,s3)\n",
+ "print \"Provide \",(dia),\" mm dia links at spacing equal to least of (i)Least lateral dimension = \",(b),\" mm, (ii) 16 times longitudinal bar dia = \",(16*20),\" mm, (iii) 48 times link bar dia = \",(48*dia),\" mm, i.e., 250 mm\\nHence, spacing or pitch = \",(s),\" mm\\n\"\n",
+ "Pc=Asc*100/(b*D) #percentage steel\n",
+ "print \"Percentage of steel is in between 0.8 to 4 as prescribed by IS code\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.3:pg-173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Provide 7.0 no. 25 mm dia bars\n",
+ "\n",
+ "Provide 8 mm dia links at spacing equal to least of (i)Least lateral dimension = 300 mm, (ii) 16 times longitudinal bar dia = 400 mm, (iii) 48 times link bar dia = 384 mm, i.e., 300 mm\n",
+ "Hence, spacing or pitch = 300 mm\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cc=5 #in MPa\n",
+ "sigma_sc=130 #in MPa\n",
+ "b=300 #width, in mm\n",
+ "D=400.0 #depth, in mm\n",
+ "P=1000 #axial load, in kN\n",
+ "Ag=b*D #in sq mm\n",
+ "Asc=(P*10.0**3-sigma_cc*Ag)/(sigma_sc-sigma_cc) #in sq mm\n",
+ " #provide 25 mm dia bars\n",
+ "n=round(Asc/(0.785*25**2))\n",
+ "print \"Provide \",(n),\" no. 25 mm dia bars\\n\"\n",
+ " #design of links\n",
+ "dia=20.0/4 #in mm\n",
+ " #provide 8 mm dia links (available as per market size)\n",
+ "dia=8 #in mm\n",
+ " #spacing of links\n",
+ "s1=b #in mm\n",
+ "s2=16*25 #in mm\n",
+ "s3=48*dia #in mm\n",
+ "s=min(s1,s2,s3)\n",
+ "print \"Provide \",(dia),\" mm dia links at spacing equal to least of (i)Least lateral dimension = \",(b),\" mm, (ii) 16 times longitudinal bar dia = \",(16*25),\" mm, (iii) 48 times link bar dia = \",(48*dia),\" mm, i.e., 300 mm\\nHence, spacing or pitch = \",(s),\" mm\\n\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.4:pg-173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Permissible load on the column = 211.05824 kN\n",
+ "Provide 6 mm dia links at spacing equal to least of (i)Least lateral dimension = 200 mm, (ii) 16 times longitudinal bar dia = 192 mm, (iii) 48 times link bar dia = 288 mm, i.e., 192.0 mm\n",
+ "Hence, spacing or pitch = 192.0 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cc=4.0 #in MPa\n",
+ "sigma_sc=130.0 #in MPa\n",
+ "Asc=6*0.785*12**2 #six 12 mm dia bars, in sq mm\n",
+ "D=200 #dia of column, in mm\n",
+ "Ag=0.785*D**2 #in sq mm\n",
+ "Ac=Ag-Asc #in sq mm\n",
+ "P=sigma_cc*Ac+sigma_sc*Asc #in N\n",
+ "dia=6 #dia of links used, in mm\n",
+ " #spacing of links\n",
+ "s1=D #in mm\n",
+ "s2=16*12.0 #in mm\n",
+ "s3=48*dia #in mm\n",
+ "s=min(s1,s2,s3)\n",
+ "print \"Permissible load on the column = \",P/10**3,\" kN\\nProvide \",(dia),\" mm dia links at spacing equal to least of (i)Least lateral dimension = \",(D),\" mm, (ii) 16 times longitudinal bar dia = \",(16*12),\" mm, (iii) 48 times link bar dia = \",(48*dia),\" mm, i.e., \",(s),\" mm\\nHence, spacing or pitch = \",(s),\" mm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.5:pg-174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Safe load= 700.6125 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "dia=300 #in mm\n",
+ "Asc=8*0.785*20**2 #8-20 mm dia bars, in sq mm\n",
+ "helical_dia=8 #in mm\n",
+ "pitch=25 #in mm\n",
+ "cover=40 #in mm\n",
+ "sigma_cc=5 #in MPa\n",
+ "sigma_sc=130 #in MPa\n",
+ "fck=25 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "Ag=0.785*dia**2 #in sq mm\n",
+ "Ac=Ag-Asc #in sq mm\n",
+ "P=sigma_cc*Ac + sigma_sc*Asc #in N\n",
+ " #to find volume of helical reinforcement\n",
+ "core_dia=dia-2*cover+2*helical_dia #in mm\n",
+ "l=math.pi*core_dia #length of helical steel for one revolution, in mm\n",
+ "Ab=l*0.785*helical_dia**2/pitch #volume of helical reinforcement per mm height of column, in mm**3\n",
+ "Ak=0.785*core_dia**2-Asc #in sq mm\n",
+ "Ac=0.785*core_dia**2 #in sq mm\n",
+ "m=Ab/Ak\n",
+ "n=0.36*(Ag/Ac-1)*fck/fy\n",
+ " #as m > n\n",
+ "P=1.05*P #in N\n",
+ "print \"Safe load=\",P/10**3,\" kN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.6:pg-175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The safe load on the column= 676.8622 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "b=250 #width, in mm\n",
+ "D=350 #depth, in mm\n",
+ "Asc=4*0.785*22**2 #four 22 mm dia bars, in sq mm\n",
+ "Lef=5 #effective length of column, in m\n",
+ "sigma_cc=4 #in MPa\n",
+ "sigma_sc=130 #in MPa\n",
+ "a=Lef*10**3/b\n",
+ " #as Lef/b > 12, it is a long column\n",
+ "Cr=1.25-Lef*1000/(48*b) #reduction coefficient\n",
+ "sigma_cc=Cr*sigma_cc #in MPa\n",
+ "sigma_sc=Cr*sigma_sc #in MPa\n",
+ "Ag=b*D #in sq mm\n",
+ "Ac=Ag-Asc #in sq mm\n",
+ "P=sigma_cc*Ac+sigma_sc*Asc #in N\n",
+ "print \"The safe load on the column=\",P/10**3,\" kN\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.7:pg-176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The safe load on the column= 1399.3995401 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "dia=500 #in mm\n",
+ "Asc=6*math.pi/4*25**2 #six 25 mm dia bars, in sq mm\n",
+ "Lef=8 #effective length of column, in m\n",
+ "sigma_cc=5 #in MPa\n",
+ "sigma_sc=190 #in MPa\n",
+ "a=Lef*10**3/dia\n",
+ " #as Lef/b >12, it is a long column\n",
+ "Cr=1.25-Lef*1000.0/(48*dia) #reduction coefficient\n",
+ "sigma_cc=Cr*sigma_cc #in MPa\n",
+ "sigma_sc=Cr*sigma_sc #in MPa\n",
+ "Ag=math.pi/4*dia**2 #in sq mm\n",
+ "Ac=Ag-Asc #in sq mm\n",
+ "P=sigma_cc*Ac+sigma_sc*Asc #in N\n",
+ "print \"The safe load on the column=\",P/10**3,\"kN\"\n",
+ " #the answer doesn't match with that given in textbook due to round-off error\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.8:pg-177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Method I\n",
+ "Column size 420 x 420 mm\n",
+ "Main steel = 5 -20 mm dia bars\n",
+ "Links=6 mm dia links @ 288 mm c/c\n",
+ "\n",
+ "Method II\n",
+ "Column size 400 x 400 mm\n",
+ "Main steel = 6.0 -20 mm dia bars\n",
+ "Links=6 mm dia links @ 288 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P=850 #in kN\n",
+ "sigma_cc=4 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "sigma_sc=130 #in MPa\n",
+ "Lef=5*1.001 #effective length, in m\n",
+ " #assume 1% steel\n",
+ "Ag=P*10**3/(sigma_cc*0.99+sigma_sc*0.01) #in sq mm\n",
+ "l=math.sqrt(Ag) #in mm\n",
+ "l=400 #approximately, in mm\n",
+ "a=Lef*1000/l\n",
+ "#as a>12, it is a long column\n",
+ "#Method I-section to be changed\n",
+ "b=Lef*1000/12 #in mm\n",
+ "b=420 #approximately, in mm\n",
+ "Ag=b**2 #in sq mm\n",
+ "Asc=(P*1000-sigma_cc*Ag)/(sigma_sc-sigma_cc) #in sq mm\n",
+ "minimum_steel=0.8/100*b**2 #in sq mm\n",
+ " #as Asc < minimum steel\n",
+ "Asc=minimum_steel #in sq mm\n",
+ " #assume 20 mm dia bars\n",
+ "n=Asc/(math.pi/4*20**2) #no. of bars\n",
+ "n=5 #round-off\n",
+ " #design of links\n",
+ "dia=1/4.0*20 #in mm\n",
+ " #as dia < 6 mm, provide 6 mm diameter links\n",
+ "dia=6 #in mm\n",
+ "spacing=min(b,16*20,48*dia,300) #in mm\n",
+ "print \"Method I\\nColumn size \",(b),\" x \",(b),\" mm\\nMain steel =\",(n),\"-20 mm dia bars\\nLinks=6 mm dia links @ \",(spacing),\" mm c/c\\n\"\n",
+ " #Method II-same section\n",
+ "b=400 #in mm\n",
+ "Ag=b**2 #in sq mm\n",
+ "Cr=1.25-Lef*1000/(48*b) #reduction coefficient\n",
+ "sigma_cc=Cr*sigma_cc #in MPa\n",
+ "sigma_sc=Cr*sigma_sc #in MPa\n",
+ "Asc=(P*1000-sigma_cc*Ag)/(sigma_sc-sigma_cc) #in MPa\n",
+ "n=round(Asc/(math.pi/4*20.0**2)) #no. of bars\n",
+ " #design of links\n",
+ "dia=1/4*20 #in mm\n",
+ " #as dia < 6 mm, provide 6 mm diameter links\n",
+ "dia=6 #in mm\n",
+ "spacing=min(b,16*20,48*dia,300) #in mm\n",
+ "print \"Method II\\nColumn size \",(b),\" x \",(b),\" mm\\nMain steel =\",(n),\"-20 mm dia bars\\nLinks=6 mm dia links @ \",(spacing),\" mm c/c\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.9:pg-179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Column size 200 x 340 mm\n",
+ "Main steel = 4 -18 mm dia bars\n",
+ "Links=6 mm dia links @ 200 mm c/c\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P=400 #in kN\n",
+ "b=200 #width, in mm\n",
+ "sigma_cc=4 #in MPa\n",
+ "sigma_sc=190 #in MPa\n",
+ "Lef=3.5 #effective length, in m\n",
+ " #assume 1% steel\n",
+ "Ag=P*10**3/(sigma_cc*0.99+sigma_sc*0.01) #in sq mm\n",
+ "D=Ag/b #in mm\n",
+ "D=340 #round-off, in mm\n",
+ "a=Lef*1000/b\n",
+ " #as a > 12, it is a long column\n",
+ "Cr=1.25-Lef*1000/(48*b) #reduction coefficient\n",
+ "sigma_cc=Cr*sigma_cc #in MPa\n",
+ "sigma_sc=Cr*sigma_sc #in MPa\n",
+ "Asc=(P*1000-sigma_cc*Ag)/(sigma_sc-sigma_cc) #in sq mm\n",
+ " #assume 18 mm dia bars\n",
+ "n=Asc/(math.pi/4*18**2) #no. of bars\n",
+ "n=4 #round-off\n",
+ " #design of links\n",
+ "dia=1/4*20 #in mm\n",
+ " #as dia < 6 mm, provide 6 mm diameter links\n",
+ "dia=6 #in mm\n",
+ "spacing=min(b,16*20,48*dia,300) #in mm\n",
+ "print \"Column size \",(b),\" x \",(D),\" mm\\nMain steel =\",(n),\"-18 mm dia bars\\nLinks=6 mm dia links @ \",(spacing),\" mm c/c\\n\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.10:pg-180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum stress = 4.60153138615 MPa (compressive)\n",
+ "Minimum stress = -0.0817369463968 MPa (tensile)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P=280 #in kN\n",
+ "e=50 #eccentricity, in mm\n",
+ "b=300 #width, in mm\n",
+ "D=300 #depth, in mm\n",
+ "sigma_cc=4 #in MPa\n",
+ "sigma_cbc=5 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "cover=50 #in mm\n",
+ "Asc=4*0.785*20**2 #four 20 mm dia bars, in sq mm\n",
+ "Ag=b*D #in sq mm\n",
+ "Ac=Ag-Asc #in sq mm\n",
+ "sigma_cc_cal=P*10**3/(Ac+1.5*m*Asc) #in MPa\n",
+ "I=b*D**3.0/12 + (m-1)*Asc*(D/2-cover)**2 #in mm**4\n",
+ "z=I/(D/2) #in mm**3\n",
+ "sigma_cbc_cal=P*10**3*e/z #in MPa\n",
+ "sigma_max=sigma_cc_cal + sigma_cbc_cal #in MPa\n",
+ "sigma_min=sigma_cc_cal - sigma_cbc_cal #in MPa\n",
+ "print \"Maximum stress = \",sigma_max,\"MPa (compressive)\\nMinimum stress = \",sigma_min,\" MPa (tensile)\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.11:pg-181"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum stress = 4.21961845282 MPa (compressive)\n",
+ "Minimum stress = -0.490977303652 MPa (tensile)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "P=200 #in kN\n",
+ "b=200 #width, in mm\n",
+ "D=350 #depth, in mm\n",
+ "sigma_cc=5 #in MPa\n",
+ "sigma_cbc=7 #in MPa\n",
+ "m=13.33 #modular ratio\n",
+ "Mxx=6 #in kN-m\n",
+ "Myy=4 #in kN-m\n",
+ "cover=40 #in mm\n",
+ "eff_cover=cover+25/2 #in mm\n",
+ "Asc=4*0.785*25**2 #four 25 mm dia bars, in sq mm\n",
+ "Ag=b*D #in sq mm\n",
+ "Ac=Ag-Asc #in sq mm\n",
+ "sigma_cc_cal=P*10**3/(Ac+1.5*m*Asc) #in MPa\n",
+ " #to find bending stress on XX axis\n",
+ "Ixx=b*D**3.0/12 + (m-1)*Asc*(D/2-eff_cover)**2 #in mm**4\n",
+ "Zxx=Ixx/(D/2) #in mm**3\n",
+ "sigma_cbc_xx=Mxx*10**6/Zxx #in MPa\n",
+ " #to find bending stress on YY axis\n",
+ "Iyy=D*b**3.0/12 + (m-1)*Asc*(b/2-eff_cover)**2 #in mm**4\n",
+ "Zyy=Iyy/(b/2) #in mm**3\n",
+ "sigma_cbc_yy=Myy*10**6/Zyy #in MPa\n",
+ "sigma_cbc_cal=sigma_cbc_xx + sigma_cbc_yy #in MPa\n",
+ "sigma_max=sigma_cc_cal + sigma_cbc_cal #in MPa\n",
+ "sigma_min=sigma_cc_cal - sigma_cbc_cal #in MPa\n",
+ "print \"Maximum stress = \",sigma_max,\" MPa (compressive)\\nMinimum stress = \",sigma_min,\" MPa (tensile)\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter7_fElJXKG.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter7_fElJXKG.ipynb
new file mode 100644
index 00000000..f90ccffb
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter7_fElJXKG.ipynb
@@ -0,0 +1,350 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7:Slab Design One Way"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.1:pg-298"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Slab thickness= 104.0 mm\n",
+ "Cover=15 mm\n",
+ "Main steel = 12 mm dia @ 120 mm c/c\n",
+ "Alternate bars are bent up @ 45-degree at support at a distance l/7 from support face\n",
+ "Distribution steel=8 mm dia @ 220 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "MF=1.6 #modification factor\n",
+ " #let a be span to depth ratio\n",
+ "l=4 #span, in m\n",
+ "a=MF*20\n",
+ "D=l*1000/a #in mm\n",
+ " #to calculate loading\n",
+ "self_weight=25*(D/10**3) #in kN/m\n",
+ "finish=1 #in kN/m\n",
+ "live_load=2 #in kN/m\n",
+ "W=self_weight+finish+live_load #total load, in kN/m\n",
+ "lef=l+D/1000 #in m\n",
+ "M=W*lef**2/8.0 #in kN-m\n",
+ " #check for depth\n",
+ "d=round((M*10**6/(0.87*1000))**0.5) #in mm\n",
+ " #assume 12 mm dia bars\n",
+ "D=d+12/2+15 #in mm\n",
+ " #the calculated value of D is more than its assumed value\n",
+ "D=150 #revised value of depth, in mm\n",
+ "self_weight=25*(D/10**3) #in kN/m\n",
+ "finish=1 #in kN/m\n",
+ "live_load=2 #in kN/m\n",
+ "W=self_weight+finish+live_load #total load, in kN/m\n",
+ "lef=l+D/1000 #in m\n",
+ "M=W*lef**2/8.0 #in kN-m\n",
+ " #check for depth\n",
+ "d=round((M*10**6/(0.87*1000))**0.5) #in mm\n",
+ "D=d+12/2+15 #in mm\n",
+ "Ast=round(M*10**6/(sigma_st*0.87*d)) #in sq mm\n",
+ "s1=1000*0.785*12**2/Ast #which is less than 3d= 387 mm\n",
+ "s1=120 #approximately, in mm\n",
+ "Ads=0.15/100*1000*D #distribution steel, in sq mm\n",
+ " #assume 8 mm dia bars\n",
+ "s2=1000*0.785*8**2/Ads #which is less than 5d= 645 mm\n",
+ "s2=220 #approximately, in mm\n",
+ " #to calculate development length\n",
+ "w=0.345 #support width, in m\n",
+ "lef=l+w #in m\n",
+ "R=W*lef/2 #reaction at support, in kN\n",
+ "M1=R*w/2-W*w**2/2 #bending moment at the face of wall, in kN-m\n",
+ "sigma_st=M1*10**6/(Ast/2*0.87*d) #in MPa\n",
+ "Tbd=0.6 #in MPa\n",
+ "Ld=12*sigma_st/(4*Tbd) #in mm\n",
+ "La=w*1000-25 #available length for bar over wall, which is greater than development length\n",
+ " #check for shear\n",
+ "V=W*4.15/2 #in kN\n",
+ "Tv=V*10**3/(1000*d) #in MPa\n",
+ "Tc=0.33 #permissible shear in concrete for p=0.71 and M15, in MPa\n",
+ "Tc=1.3*Tc #permissible shear for slabs, in MPa\n",
+ " #Tc>Tv; hence no shear reinforcement is required\n",
+ "print \"Summary of design\\nSlab thickness=\",(D),\" mm\\nCover=15 mm\\nMain steel = 12 mm dia @ \",(s1),\" mm c/c\\nAlternate bars are bent up @ 45-degree at support at a distance l/7 from support face\\nDistribution steel=8 mm dia @ \",(s2),\" mm c/c\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.2:pg-299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Slab thickness= 250 mm\n",
+ "Cover=15 mm\n",
+ "Main steel = 12 dia @ 155 mm c/c\n",
+ "Alternate bars are bent up at 45-degree at support at a distance of l/7 from support face\n",
+ "Distribution steel=8 dia @ 165 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "MF=1.4 #modification factor\n",
+ " #let a be span to depth ratio\n",
+ "l=4.5 #span, in m\n",
+ "a=MF*20\n",
+ "D=l*1000.0/a #in mm\n",
+ "D=160 #approximately, in mm\n",
+ " #to calculate loading\n",
+ "self_weight=25*(D/10**3) #in kN/m\n",
+ "finish=1 #in kN/m\n",
+ "partitions=1 #in kN/m\n",
+ "live_load=4 #in kN/m\n",
+ "W=self_weight+finish+partitions+live_load #total load, in kN/m\n",
+ "lef=l+D/1000 #in m\n",
+ "M=W*lef**2.0/8 #in kN-m\n",
+ " #check for depth\n",
+ "d=(M*10**6/(0.9*sigma_cbc/2*0.29*1000))**0.5 #in mm\n",
+ " #assume 12 mm dia bars\n",
+ "D=d+12/2+15 #in mm\n",
+ " #the calculated value of D is more than its assumed value\n",
+ "D=1.1*D #revised value of depth, in mm\n",
+ "D=250 #assume, in mm\n",
+ "self_weight=25*(D/10**3) #in kN/m\n",
+ "finish=1 #in kN/m\n",
+ "partitions=1 #in kN/m\n",
+ "live_load=4 #in kN/m\n",
+ "W=self_weight+finish+partitions+live_load #total load, in kN/m\n",
+ "lef=l+D/1000 #in m\n",
+ "M=W*lef**2/8 #in kN-m\n",
+ " #check for depth\n",
+ "d=round((M*10**6/(0.9*sigma_cbc/2*0.29*1000))**0.5) #in mm\n",
+ "D=d+12/2+15 #in mm\n",
+ "D=250 #approximately, in mm\n",
+ "Ast=round(M*10**6/(sigma_st*0.9*d)) #in sq mm\n",
+ "s1=1000*0.785*12**2/Ast #which is less than 3d= 690 mm\n",
+ "s1=155 #approximately, in mm\n",
+ "pt=Ast/1000/d*100 #in %\n",
+ "Ads=0.12/100*1000*D #distribution steel, in sq mm\n",
+ " #assume 8 mm dia bars\n",
+ "s2=1000*0.785*8**2/Ads #which is less than 5d= 1150 mm\n",
+ "s2=165 #approximately, in mm\n",
+ " #to calculate development length\n",
+ "w=0.23 #support width, in m\n",
+ "l=l+w #in m\n",
+ "R=W*l/2.0 #reaction at support, in kN\n",
+ "M1=R*w/2-W*w**2/2 #bending moment at the face of wall, in kN-m\n",
+ "sigma_st=M1*10**6/(Ast/2*0.9*d) #in MPa\n",
+ "Tbd=0.6 #in MPa\n",
+ "Ld=12*sigma_st/(4*Tbd) #in mm\n",
+ "La=w*1000-25 #available length for bar over wall, which is greater than development length\n",
+ " #check for shear\n",
+ "V=W*lef/2 #in kN\n",
+ "Tv=V*10**3/(1000*d) #in MPa\n",
+ "Tc=0.2212 #permissible shear in concrete for p=0.315 and M15, in MPa\n",
+ "Tc=1.15*Tc #permissible shear for slabs, in MPa\n",
+ " #Tc>Tv; hence no shear reinforcement is required\n",
+ "print \"Summary of design\\nSlab thickness=\",D,\" mm\\nCover=15 mm\\nMain steel = 12 dia @ \",s1,\" mm c/c\\nAlternate bars are bent up at 45-degree at support at a distance of l/7 from support face\\nDistribution steel=8 dia @ \",s2,\" mm c/c\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.3:pg-300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Slab thickness= 200 mm\n",
+ "Main steel = 12 mm dia @ 175 mm c/c\n",
+ "Alternate bars are bent up at support\n",
+ "Distribution steel=8 mm dia @ 200 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "MF=1.22 #modification factor\n",
+ " #let a be span to depth ratio\n",
+ "l=5 #span, in m\n",
+ "a=MF*26\n",
+ "D=l*1000/a #in mm\n",
+ "D=160 #assume, in mm\n",
+ " #to calculate loading\n",
+ "self_weight=25*(D/10**3) #in kN/m\n",
+ "finish=0.75 #in kN/m\n",
+ "partitions=1 #in kN/m\n",
+ "live_load=3 #in kN/m\n",
+ "Wd=self_weight #dead load, in kN/m\n",
+ "Wl=finish+partitions+live_load #live load, in kN/m\n",
+ "lef=5.15 #effective span, in m\n",
+ "M1=Wd*lef**2/12+Wl*lef**2/10 #bending moment at mid-span, in kN-m\n",
+ "M2=Wd*lef**2/10+Wl*lef**2/9 #bending moment at support next to end support, in kN-m\n",
+ " #check for depth\n",
+ "d=(M2*10**6/(0.89*1000))**0.5 #in mm\n",
+ "dia=12 #assume 12 mm dia bars\n",
+ "D=d+12/2+15 #>160, hence depth not suitable\n",
+ "D=1.1*D #in mm\n",
+ "D=210 #assume, in mm\n",
+ "self_weight=25*(D/10**3) #in kN/m\n",
+ "Wd=self_weight #in kN/m\n",
+ "M1=Wd*lef**2/12+Wl*lef**2/10 #bending moment at mid-span, in kN-m\n",
+ "M2=Wd*lef**2/10+Wl*lef**2/9 #bending moment at support next to end support, in kN-m\n",
+ " #check for depth\n",
+ "d=round((M2*10**6/(0.9*sigma_cbc/2*0.29*1000))**0.5) #in mm\n",
+ "D=d+12/2+15 #<210, hence OK\n",
+ "D=200 #assume, in mm\n",
+ "d=D-dia/2-15 #in mm\n",
+ " #main steel at mid-span\n",
+ "Ast1=round(M1*10**6/(sigma_st*0.91*d)) #in sq mm\n",
+ "s1=1000*0.785*12**2/Ast1 #in mm\n",
+ "s1=175 #approximately, in mm\n",
+ " #main steel at support\n",
+ "Ast2=round(M2*10**6/(sigma_st*0.91*d)) #in sq mm\n",
+ " #alternate bars from mid-span are available at the central support as bent up bars; assuming same amount of steel is available from another adjoining mid-span steel\n",
+ "Ast2=Ast2-Ast1 #which is nominal, hence no separate steel is required\n",
+ "Ads=0.12/100*1000*D #distribution steel, in sq mm\n",
+ " #assume 8 mm dia bars\n",
+ "s2=1000*0.785*8**2/Ads #in mm\n",
+ "s2=200 #approximately, in mm\n",
+ "print \"Summary of design\\nSlab thickness=\",D,\" mm\\nMain steel = 12 mm dia @ \",s1,\" mm c/c\\nAlternate bars are bent up at support\\nDistribution steel=8 mm dia @ \",s2,\" mm c/c\"\n",
+ " #answer given in textbook is incorrect\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.4:pg-301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Thickness of slab = 100 mm\n",
+ "Cover = 15mm\n",
+ "Main steel = 12 mm dia @ 235 mm c/c\n",
+ "Provide development length of 821 mm in the beam from face of beam\n",
+ "Distribution steel = 6 mm dia @ 235 mm c/c\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=230.0 #in MPa\n",
+ "MF=1.4 #modification factor\n",
+ " #let a be span to depth ratio\n",
+ "l=1 #span, in m\n",
+ "a=MF*7\n",
+ "D=l*1000/a #in mm\n",
+ "D=105 #assume, in mm\n",
+ " #to calculate loading\n",
+ "self_weight=25*(D/10**3)*1.5 #in kN/m\n",
+ "finish=0.5*1.5 #in kN/m\n",
+ "live_load=0.75*1.5 #in kN/m\n",
+ "W=self_weight+finish+live_load #in kN/m\n",
+ "lef=l+0.23/2 #effective span, in m\n",
+ "M=W*lef/2 #in kN-m\n",
+ " #check for depth\n",
+ "d=(M*10**6/(0.65*1500))**0.5 #in mm\n",
+ "dia=12 #assume 12 mm dia bars\n",
+ "D=d+12/2+15 #<105, hence OK\n",
+ "D=100 #assume, in mm\n",
+ "d=D-dia/2-15 #in mm\n",
+ " #main steel at mid-span\n",
+ "Ast=M*10**6/(sigma_st*0.9*d) #in sq mm\n",
+ "s1=1500*0.785*12**2/Ast #>3d = 237 mm\n",
+ "s1=235 #assume, in mm\n",
+ "Ads=0.12/100*1000*D #distribution steel, in sq mm\n",
+ " #assume 6 mm dia bars\n",
+ "s2=1000*0.785*6**2/Ads #in mm\n",
+ "s2=235 #assume, in mm\n",
+ "Tbd=0.84 #in MPa\n",
+ "Ld=dia*sigma_st/4/Tbd # in mm\n",
+ "Ld=821 #round-off, in mm\n",
+ "Tv=W*10**3/1500/d #in MPa\n",
+ "As=1500*0.785*12**2/235 #in sq mm\n",
+ "pt=As/1500/d*100 #in %\n",
+ "Tc=0.316 #in MPa\n",
+ " #as Tc>Tv, no shear reinforcement required\n",
+ "print \"Summary of design\\nThickness of slab = \",D,\" mm\\nCover = 15mm\\nMain steel = 12 mm dia @ \",s1,\" mm c/c\\nProvide development length of \",Ld,\" mm in the beam from face of beam\\nDistribution steel = 6 mm dia @ \",s2,\" mm c/c\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter8_P6SjSkH.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter8_P6SjSkH.ipynb
new file mode 100644
index 00000000..716ce21b
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter8_P6SjSkH.ipynb
@@ -0,0 +1,331 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8:Slab Design Two Way Reinforced"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.1:pg-363"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Slab thickness= 100 mm\n",
+ "Cover=15 mm\n",
+ "Steel-\n",
+ "(i)Short span = 10 mm dia @ 200 mm c/c\n",
+ "(ii)Long span = 10 mm dia @ 210 mm c/c\n",
+ "Alternate bars are bent up at l/7 from support in both directions\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "lx=3.5 #in m\n",
+ "ly=4 #in m\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "D=lx*10**3.0/35 #in mm\n",
+ "W1=(D/10**3)*25 #self-weight, in kN/m\n",
+ "W2=1.5 #live load, in kN/m\n",
+ "W=W1+W2 #in kN/m\n",
+ "a=ly/lx\n",
+ "Ax=0.078\n",
+ "Ay=0.0602\n",
+ "Mx=Ax*W*lx**2 #in kN-m\n",
+ "My=Ay*W*lx**2 #in kN-m\n",
+ "d=math.sqrt(Mx*10**6/0.87/10**3) #in mm\n",
+ "d=70 #assume, in mm\n",
+ " #assume 10 mm dia bars\n",
+ "dia=10 #in mm\n",
+ "D=d+dia/2+15 #<100 mm assumed value\n",
+ "D=100 #in mm\n",
+ "d=D-dia/2-15 #in mm\n",
+ " #steel - short span\n",
+ "z=0.87*d #in mm\n",
+ "Ast=Mx*10**6/sigma_st/z #in sq mm\n",
+ "s1=1000*0.785*dia**2/Ast #in mm\n",
+ "s1=200 #assume, in mm\n",
+ " #long span\n",
+ "d=d-dia/2-dia/2 #in mm\n",
+ "Ast=My*10**6/sigma_st/0.87/d #in sq mm\n",
+ "s2=1000*0.785*dia**2/Ast #>3d = 210 mm\n",
+ "s2=210 #assume, in mm\n",
+ "print \"Summary of design\\nSlab thickness=\",D,\" mm\\nCover=15 mm\\nSteel-\\n(i)Short span = 10 mm dia @ \",s1,\" mm c/c\\n(ii)Long span = 10 mm dia @ \",s2,\" mm c/c\\nAlternate bars are bent up at l/7 from support in both directions\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.2:pg-364"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Slab thickness= 100 mm\n",
+ "Cover=15 mm\n",
+ "Steel for both panels I and II-\n",
+ "Main steel= 10 mm dia bars @ 765.561904762 mm c/c both ways. Alternate bars are bent up at supports.\n",
+ "Torsion steel=(i) At corners, 6 mm dia bars @ 85 mm c/c both ways\n",
+ "(ii) At continuous support, 6 mm dia bars @ 170 mm c/c both ways\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "lx=3.75 #in m\n",
+ "ly=4 #in m\n",
+ "D=lx*10**3.0/40 #in mm\n",
+ "D=100 #assume, in mm\n",
+ "W1=(D/10**3)*25 #self-weight, in kN/m\n",
+ "W2=0.5 #floor finish, in kN/m\n",
+ "W3=2 #live load, in kN/m\n",
+ "W=W1+W2+W3 #in kN/m\n",
+ "a=ly/lx\n",
+ "#panels I and III belong to case 8 and panel II belong to case 6\n",
+ "#for panels I and III\n",
+ "#at mid-span\n",
+ "Ax=0.0483\n",
+ "Ay=0.043\n",
+ "Mx1=Ax*W*lx**2 #in kN-m\n",
+ "My1=Ay*W*lx**2 #in kN-m\n",
+ "#at support\n",
+ "Ay=0.057\n",
+ "Ms=Ay*W*lx**2 #in kN-m\n",
+ "#for panel II\n",
+ "#at mid-span\n",
+ "Ax=0.0403\n",
+ "Ay=0.035\n",
+ "Mx2=Ax*W*lx**2 #in kN-m\n",
+ "My2=Ay*W*lx**2 #in kN-m\n",
+ " #at support\n",
+ "Ay=0.045 #<0.057, hence not considered\n",
+ "d=math.sqrt(Ms*10**6/0.65/10**3) #in mm\n",
+ "d=80 #assume, in mm\n",
+ "#assume 10 mm dia bars\n",
+ "dia=10 #in mm\n",
+ "D=d+dia/2+15\n",
+ "#steel at centre\n",
+ "#for panels I and III\n",
+ "#short span\n",
+ "z=0.9*d #in mm\n",
+ "Ast=Mx1*10**6/sigma_st/z #in sq mm\n",
+ "s1=1000*0.785*dia**2/Ast #>3d\n",
+ "#long span\n",
+ "Ast=My1*10**6/sigma_st/z #in sq mm\n",
+ "s2=1000*0.785*dia**2/Ast #>3d\n",
+ "#for panel II\n",
+ "#short span\n",
+ "Ast=Mx2*10**6/sigma_st/z #in sq mm\n",
+ "s3=1000*0.785*dia**2/Ast #>3d\n",
+ "#long span\n",
+ "Ast=My2*10**6/sigma_st/z #in sq mm\n",
+ "s3=1000*0.785*dia**2/Ast #>3d\n",
+ "#steel at support\n",
+ "Ast=Ms*10**6/sigma_st/z #in sq mm\n",
+ "s4=1000*0.785*dia**2/Ast #>3d\n",
+ "s=3*d #maximum spacing of bars in both directions as per IS 456, in mm\n",
+ "Ast=1000*0.785*dia**2/s #in sq mm\n",
+ "pt=Ast/10**3/d*100 #in %\n",
+ "#steel for torsion, provide 6 mm dia bars\n",
+ "#(i)at outer corner of slab\n",
+ "At1=3.0/4*Ast #in sq mm\n",
+ "l=lx/5 #in m\n",
+ "s5=750*0.785*6**2/At1 #in mm\n",
+ "s5=85 #assume, in mm\n",
+ "#(ii)at continuous support\n",
+ "At2=At1/2 #in sq mm\n",
+ "s6=750*0.785*6**2/At2 #in mm\n",
+ "s6=170 #assume, in mm\n",
+ "print \"Summary of design\\nSlab thickness=\",D,\" mm\\nCover=15 mm\\nSteel for both panels I and II-\\nMain steel= 10 mm dia bars @ \",s1,\" mm c/c both ways. Alternate bars are bent up at supports.\\nTorsion steel=(i) At corners, 6 mm dia bars @ \",s5,\" mm c/c both ways\\n(ii) At continuous support, 6 mm dia bars @ \",s6,\" mm c/c both ways\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.3:pg-365"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Slab thickness= 190 mm\n",
+ "Cover=15 mm\n",
+ "Steel:(A)Panels I, II, V and VI-\n",
+ "1. Short span (lx=6 m)\n",
+ "Mid-span - 10 mm dia bars @ 195 mm c/c. Alternate bars are bent up at supports at a distance lx/4 from centre of support\n",
+ "Support - 10 mm dia @ 565 mm c/c\n",
+ "2. Long span (ly=7 m)\n",
+ "Mid-span - 10 mm dia bars @ 240 mm c/c. Alternate bars are bent up at supports at a distance ly/4 from centre of support\n",
+ "Support - 10 mm dia @ 550 mm c/c\n",
+ "(B)Panels III and IV-\n",
+ "1. Short span (lx=6 m)\n",
+ "Mid-span - 10 mm dia bars @ 235 mm c/c. Alternate bars are bent up at supports at a distance lx/4 from centre of support\n",
+ "Support - 10 mm dia @ 775 mm c/c\n",
+ "2. Long span (ly=7 m)\n",
+ "Mid-span - 10 mm dia bars @ 300 mm c/c. Alternate bars are bent up at supports at a distance ly/4 from centre of support\n",
+ "Support - 10 mm dia @ 550 mm c/c\n",
+ "Torsion steel\n",
+ "Outside corners- 6 mm dia bars @ 110 mm \n",
+ "Continuous support- 6 mm dia bars @ 1 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "sigma_cbc=7 #in MPa\n",
+ "sigma_st=275 #in MPa\n",
+ "lx=6 #in m\n",
+ "ly=7 #in m\n",
+ "D=lx*10**3.0/35 #in mm\n",
+ "D=180 #assume, in mm\n",
+ "W1=(D/10**3)*25 #self-weight, in kN/m\n",
+ "W2=0.5 #floor finish, in kN/m\n",
+ "W3=1 #partitions, in kN/m\n",
+ "W4=5 #live load, in kN/m\n",
+ "W=W1+W2+W3+W4 #in kN/m\n",
+ "a=ly/lx\n",
+ "#panels I, II, V and VI belong to case 4 and panels III and IV belong to case 3\n",
+ "#for panels I, II, V and VI\n",
+ "#at mid-span\n",
+ "Ax=0.043\n",
+ "Ay=0.035\n",
+ "Mxm1=Ax*W*lx**2 #in kN-m\n",
+ "Mym1=Ay*W*lx**2 #in kN-m\n",
+ "#at support\n",
+ "Ax=0.058\n",
+ "Ay=0.047\n",
+ "Mxs1=Ax*W*lx**2 #in kN-m\n",
+ "Mys1=Ay*W*lx**2 #in kN-m\n",
+ "#for panels III and IV\n",
+ "#at mid-span\n",
+ "Ax=0.036\n",
+ "Ay=0.028\n",
+ "Mxm2=Ax*W*lx**2 #in kN-m\n",
+ "Mym2=Ay*W*lx**2 #in kN-m\n",
+ " #at support\n",
+ "Ax=0.047\n",
+ "Ay=0.037 #<0.047, hence will not be consdered\n",
+ "Mxs2=Ax*W*lx**2 #in kN-m\n",
+ "#check for depth\n",
+ "M=max(Mxm1,Mym1,Mxs1,Mys1,Mxm2,Mym2,Mxs2) #in kN-m\n",
+ "d=math.sqrt(M*10**6/0.81/10**3) #in mm\n",
+ "d=170 #assume, in mm\n",
+ "#assume 10 mm dia bars\n",
+ "dia=10 #in mm\n",
+ "D=d+dia/2+15 #>180 mm assumed value\n",
+ "D=190 #in mm\n",
+ "d=D-dia/2-15 #in mm\n",
+ "#main steel-short span\n",
+ "#for panels I, II, V and VI-at mid-span\n",
+ "z=0.92*d #in mm\n",
+ "Astm=Mxm1*10**6/sigma_st/z #in sq mm\n",
+ "s1=1000*0.785*dia**2/Astm #in mm\n",
+ "s1=195 #assume, in mm\n",
+ "#at support\n",
+ "Ast=Mxs1*10**6/sigma_st/z #in sq mm\n",
+ "Astr=Ast-Astm #balance steel required at support, in sq mm\n",
+ "s2=1000*0.785*dia**2/Astr #in mm\n",
+ "s2=565 #assume, in mm\n",
+ "#for panels III and IV-at mid-span\n",
+ "Astm=Mxm2*10**6/sigma_st/z #in sq mm\n",
+ "s3=1000*0.785*dia**2/Astm #in mm\n",
+ "s3=235 #assume, in mm\n",
+ "#at support\n",
+ "Ast=Mxs2*10**6/sigma_st/z #in sq mm\n",
+ "Astr=Ast-Astm #balance steel required at support, in sq mm\n",
+ "s4=1000*0.785*dia**2/Astr #in mm\n",
+ "s4=775 #assume, in mm\n",
+ "#long span\n",
+ "#at mid-span\n",
+ "#for panels I, II, V and VI\n",
+ "Astm1=Mym1*10**6/sigma_st/z #in sq mm\n",
+ "s5=1000*0.785*dia**2/Astm1 #in mm\n",
+ "s5=240 #assume, in mm\n",
+ "#for panels III and IV\n",
+ "Astm2=Mym2*10**6/sigma_st/z #in sq mm\n",
+ "s6=1000*0.785*dia**2/Astm2 #in mm\n",
+ "s6=300 #assume, in mm\n",
+ "#at support\n",
+ "#for panels I, II, V and VI\n",
+ "Ast=Mys1*10**6/sigma_st/z #in sq mm\n",
+ "Astr=Ast-Astm1/2-Astm2/2 #balance steel required at support, in sq mm\n",
+ "s7=1000*0.785*dia**2/Astr #in mm\n",
+ "s7=550 #assume, in mm\n",
+ "#steel for torsion, provide 6 mm dia bars\n",
+ "#(i)at outside corners of slab\n",
+ "Ast=Mxm1*10**6/sigma_st/z #in sq mm\n",
+ "At1=3/4.0*Ast #in sq mm\n",
+ "l=lx/5 #in m\n",
+ "s8=l*10**3*0.785*6**2/At1 #in mm\n",
+ "s8=110 #assume, in mm\n",
+ "#(ii)at continuous support\n",
+ "At2=At1/2 #in sq mm\n",
+ "s9=l*10**3*0.785*6**2/At2 #in mm\n",
+ "s9=225 #assume, in mm\n",
+ "print \"Summary of design\\nSlab thickness=\",D,\" mm\\nCover=15 mm\\nSteel:(A)Panels I, II, V and VI-\\n1. Short span (lx=6 m)\\nMid-span - 10 mm dia bars @ \",s1,\" mm c/c. Alternate bars are bent up at supports at a distance lx/4 from centre of support\\nSupport - 10 mm dia @ \",s2,\" mm c/c\\n2. Long span (ly=7 m)\\nMid-span - 10 mm dia bars @ \",s5,\" mm c/c. Alternate bars are bent up at supports at a distance ly/4 from centre of support\\nSupport - 10 mm dia @ \",s7,\" mm c/c\\n(B)Panels III and IV-\\n1. Short span (lx=6 m)\\nMid-span - 10 mm dia bars @ \",s3,\" mm c/c. Alternate bars are bent up at supports at a distance lx/4 from centre of support\\nSupport - 10 mm dia @ \",s4,\" mm c/c\\n2. Long span (ly=7 m)\\nMid-span - 10 mm dia bars @ \",s6,\" mm c/c. Alternate bars are bent up at supports at a distance ly/4 from centre of support\\nSupport - 10 mm dia @ \",s7,\" mm c/c\\nTorsion steel\\nOutside corners- 6 mm dia bars @ \",s8,\"mm \\nContinuous support- 6 mm dia bars @ \",l,\"mm\"\n",
+ " #answer in textbook is incorrect\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter9_5BJhRQ7.ipynb b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter9_5BJhRQ7.ipynb
new file mode 100644
index 00000000..e6ff9686
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/Chapter9_5BJhRQ7.ipynb
@@ -0,0 +1,326 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9:Beam Design"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.1:pg-446"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Size of lintel beam= 225 x 300 mm\n",
+ "cover = 35 mm\n",
+ "steel = 2-10 mm dia bars + 1-8 mm dia bar\n",
+ "stirrups = 6 mm dia @ 200 mm c/c throughout\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=3 #span, in m\n",
+ "b=225 #wall thickness, in mm\n",
+ "Dm=19.2 #weight of masonry, in kN/cu m\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "fy=415 #in MPa\n",
+ " #area of triangle of brick masonry\n",
+ "A=math.sqrt(3)/4.0*l**2 #in sq m\n",
+ "V=A*(b/10**3) #volume of triangle of masonry, in cu m\n",
+ "W=V*Dm #weight of masonry, in kN\n",
+ "M1=W*l/6 #in kN-m\n",
+ "D=l*10**3.0/12 #in mm\n",
+ "D=300 #approximately, in mm\n",
+ "self_weight=25*(D/10**3)*(b/10**3) #in kN/m\n",
+ "M2=self_weight*l**2/8 #in kN-m\n",
+ "M=M1+M2 #in kN-m\n",
+ " #check for depth\n",
+ "d=math.sqrt(M*10**6/0.65/b) #in mm\n",
+ "d=265 #approximately, in mm\n",
+ "dia=10.0 #in mm\n",
+ "D=d+dia/2+25 #<300 mm, hence OK\n",
+ "D=300 #in mm\n",
+ "Ast=M*10**6/sigma_st/0.9/d #in sq mm\n",
+ "n=Ast/0.785/10**2 #no. of 10 mm dia bars required\n",
+ " #provide 2-10 mm dia + 1-8 mm dia bars\n",
+ "Ast=2*0.785*10**2+0.785*8**2 #in sq mm\n",
+ "pt=Ast/b/d*100 #pt=0.35, approximately\n",
+ "W=W+self_weight*l #in kN\n",
+ "V=W/2 #in kN\n",
+ "Tv=V*10**3/b/d #in MPa\n",
+ "#for M15 grade concrete and pt=0.35\n",
+ "Tc=0.248 #in MPa\n",
+ "#as Tc>Tv, no shear reinforcement required; provide nominal stirrups\n",
+ "#provide 6 mm dia bars\n",
+ "Asv=2*0.785*6**2 #in sq mm\n",
+ "Sv=Asv*fy/0.4/b #in mm\n",
+ "Sv=260 #approximately, in mm\n",
+ "Svmax=0.75*d #in mm\n",
+ "Svmax=200 #approximately, in mm\n",
+ "Sv=min(Sv,Svmax) #in mm\n",
+ "print \"Summary of design\\nSize of lintel beam=\",(b),\" x \",(D),\" mm\\ncover = 35 mm\\nsteel = 2-10 mm dia bars + 1-8 mm dia bar\\nstirrups = 6 mm dia @ \",(Sv),\" mm c/c throughout\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.2:pg-447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Size of beam = 225 x 300 mm\n",
+ "Cover, bottom = 25 mm\n",
+ "Top = 25 mm\n",
+ "Steel, bottom = 3 -12 mm dia bars\n",
+ "Top = 3 -12 mm dia bars\n",
+ "Stirrups = 6 mm dia @ 200 mm c/c throughout\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=4.2 #span, in m\n",
+ "b=225 #width, in mm\n",
+ "D=300 #depth, in mm\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=230 #in MPa\n",
+ "fy=415 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "W1=25*(D/10**3)*(b/10**3) #self-weight, in kN/m\n",
+ "W2=6 #load on beam, in kN/m\n",
+ "W=W1+W2 #in kN/m\n",
+ "M=W*l**2.0/8 #in kN-m\n",
+ "dia=12 #in mm\n",
+ "d=D-dia/2-25 #in mm\n",
+ "Xc=0.29*d #in mm\n",
+ "Mr=0.65*b*d**2/10**6 #M>Mr, hence doubly reinforced beam\n",
+ "Ast1=round(Mr*10**6/sigma_st/0.9/d) #steel required for singly reinforced beam, in sq mm\n",
+ "M1=M-Mr #balance of moment, in kN-m\n",
+ "d1=25 #top cover, in mm\n",
+ "Ast2=round(M1*10**6/sigma_st/(d-d1)) #in sq mm\n",
+ "Ast=Ast1+Ast2 #in sq mm\n",
+ "n1=Ast/0.785/12**2 #no. of 12 mm dia bars on tension side\n",
+ "n1=3 #assume\n",
+ "Asc=m*Ast2*(d-Xc)/(1.5*m-1)/(Xc-d1) #in sq mm\n",
+ "n2=Asc/0.785/12**2 #no. of 12 mm dia bars on compression side\n",
+ "n2=3 #assume\n",
+ "V=W*l/2.0 #in kN\n",
+ "Tv=V*10**3/b/d #in MPa\n",
+ "pt=n1*0.785*12**2/b/d*100 #pt=0.56, approximately\n",
+ "#for M15 grade concrete and pt=0.56\n",
+ "Tc=0.302 #in MPa\n",
+ "#as Tc>Tv, no shear reinforcement required; provide nominal stirrups\n",
+ "#provide 6 mm dia bars\n",
+ "Asv=2*0.785*6**2 #in sq mm\n",
+ "Sv=Asv*fy/0.4/b #in mm\n",
+ "Sv=260 #approximately, in mm\n",
+ "Svmax=0.75*d #in mm\n",
+ "Svmax=200 #approximately, in mm\n",
+ "Sv=min(Sv,Svmax) #in mm\n",
+ "print \"Summary of design\\nSize of beam = \",(b),\" x \",(D),\" mm\\nCover, bottom = 25 mm\\nTop = 25 mm\\nSteel, bottom = \",(n1),\"-12 mm dia bars\\nTop = \",(n2),\"-12 mm dia bars\\nStirrups = 6 mm dia @ \",Sv,\" mm c/c throughout\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.3:pg-448"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Summary of design\n",
+ "Size of beam = 1045 x 7 mm\n",
+ "Cover = 35 mm\n",
+ "Steel= 117 -20 mm dia bars\n",
+ "Stirrups = 6 mm dia @ 188 mm c/c throughout\n",
+ "Side faced steel-6 mm dia @ 188 mm c/c on both vertical faces of beam\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=7 #span, in m\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "b=300 #assume, in mm\n",
+ "W1=35 #imposed load on beam, in kN/m\n",
+ "M=W1*l**2.0/8 #in kN-m\n",
+ "d=(M*10**6/0.87/b)**0.5 #in mm\n",
+ "d=910 #approximately, in mm\n",
+ "D=1.1*d+50 #increase d by 10% for self-weight and cover is 50 mm\n",
+ "D=1050 #approximately, in mm\n",
+ "W2=25*(b/10**3)*(D/10**3) #self-weight, in kN/m\n",
+ "W=W1+W2 #in kN/m\n",
+ "M=W*l**2.0/8 #in kN-m\n",
+ "d=(M*10**6/0.87/b)**0.5 #in mm\n",
+ "d=1000 #approximately, in mm\n",
+ "dia=20 #in mm\n",
+ "D=d+dia/2+35 #in mm\n",
+ "Ast=round(M*10**6/sigma_st/0.87/d) #in sq mm\n",
+ "n=Ast/0.785/20**2 #no. of 20 mm dia bars\n",
+ "n=7 #assume\n",
+ "Ast=n*0.785*20**2 #in sq mm\n",
+ "pt=Ast/b/D*100 #pt=0.7, approximately\n",
+ "As=round(0.85/fy*b*d) #minimum steel, As<Ast, hence OK\n",
+ "Asf=0.1/100*b*d/2 #side faced steel on each face, in sq mm\n",
+ " #provide 6 mm dia bars\n",
+ "s=1000*0.785*6**2/Asf #in mm\n",
+ "s=188 #assume, in mm\n",
+ "V=W*l/2.0 #in kN\n",
+ "Tv=V*10**3/b/d #<Tcmax=1.6 MPa, hence OK\n",
+ " #for M15 grade concrete and pt=0.7\n",
+ "Tc=0.33 #in MPa\n",
+ " #as Tv>Tc, shear reinforcement required\n",
+ "Vs=V-Tc*b*d/10**3 #in kN\n",
+ " #provide 6 mm dia bars\n",
+ "Asv=2*0.785*6**2 #in sq mm\n",
+ "sigma_sv=140 #in MPa\n",
+ "Sv=Asv*sigma_sv*d/Vs/10**3 #in mm\n",
+ "Sv=155 #approximately, in mm\n",
+ "Svmin=Asv*fy/0.4/b #in mm\n",
+ "Svmin=117 #approximately, in mm\n",
+ "Sv=min(Sv,Svmin) #in mm\n",
+ "print \"Summary of design\\nSize of beam = \",(D),\" x \",(n),\" mm\\nCover = 35 mm\\nSteel= \",(Sv),\"-20 mm dia bars\\nStirrups = 6 mm dia @ \",(s),\" mm c/c throughout\\nSide faced steel-6 mm dia @ \",(s),\" mm c/c on both vertical faces of beam\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.4:pg-449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T beam:bf= 2500 mm\n",
+ "Df= 100 mm\n",
+ "d= 750 mm\n",
+ "bw= 300 mm\n",
+ "Cover = 50 mm\n",
+ "Steel= 4-25 mm dia + 4-20 mm dia bars\n",
+ "Stirrups = 6 mm dia @ 117 mm c/c throughout\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "l=10 #span, in m\n",
+ "sigma_cbc=5 #in MPa\n",
+ "sigma_st=140 #in MPa\n",
+ "fy=250 #in MPa\n",
+ "m=18.66 #modular ratio\n",
+ "Df=100 #slab thickness, in mm \n",
+ "D=l*10**3.0/12 #in mm\n",
+ "D=850 #approximately, in mm\n",
+ "d=D-100 #cover=100 mm\n",
+ "bw=300 #in mm\n",
+ "bf=l*10**3/6+bw+6*Df #>2500 mm c/c distance of beams\n",
+ "bf=2500 #in mm\n",
+ "W1=(bw/10**3)*(d-Df)/10**3*25 #in kN/m\n",
+ "W2=(Df/10**3)*(bf/10**3)*25 #in kN/m\n",
+ "W3=(bf/10**3)*5 #imposed load, in kN/m\n",
+ "W=W1+W2+W3 #in kN/m\n",
+ "W=24 #approximately, in kN/m\n",
+ "M=W*l**2.0/8 #in kN-m\n",
+ "V=W*l/2.0 #in kN\n",
+ "Ast=round(M*10**6/sigma_st/0.87/d) #in sq mm\n",
+ "#provide 4-25 mm dia bars + 4-20 mm dia bars\n",
+ "Ast=4*0.785*25**2+4*0.785*20**2 #in sq mm\n",
+ "#verification of trial section\n",
+ "#assume x>Df\n",
+ "x=(m*Ast*d+bf*Df**2/2)/(bf*Df+m*Ast) #in mm\n",
+ "#sigma_cbc'=sigma_cbc (x-Df)/x\n",
+ "a=(x-Df)/x\n",
+ "z=d-(1+2*a)/(1+a)*Df/3 #in mm\n",
+ "sigma_st=M*10**6/Ast/z #<140 MPa, hence OK\n",
+ "sigma_cbc=sigma_st/m*x/(d-x) #<5 MPa, hence OK\n",
+ "Tv=V*10**3/bw/d #in MPa\n",
+ "pt=Ast*100/(bw*d+(2500-300)*100) #pt=0.72, approximately\n",
+ "#for M15 grade concrete and pt=0.72\n",
+ "Tc=0.33 #in MPa\n",
+ "#as Tv>Tc, shear reinforcement required\n",
+ "Vs=V-Tc*bw*d/10**3 #in kN\n",
+ "#provide 6 mm dia bars\n",
+ "Asv=2*0.785*6**2 #in sq mm\n",
+ "sigma_sv=140 #in MPa\n",
+ "Sv=Asv*sigma_sv*d/Vs/10**3 #in mm\n",
+ "Sv=130 #approximately, in mm\n",
+ "Svmin=Asv*fy/0.4/bw #in mm\n",
+ "Svmin=117 #approximately, in mm\n",
+ "Sv=min(Sv,Svmin) #in mm\n",
+ "print \"T beam:bf=\",(bf),\" mm\\nDf=\",(Df),\" mm\\nd=\",(d),\" mm\\nbw=\",(bw),\" mm\\nCover = 50 mm\\nSteel= 4-25 mm dia + 4-20 mm dia bars\\nStirrups = 6 mm dia @ \",(Sv),\" mm c/c throughout\"\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/11.4_upwwc7G.png b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/11.4_upwwc7G.png
new file mode 100644
index 00000000..af382958
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/11.4_upwwc7G.png
Binary files differ
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/13.1_fg5oW41.png b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/13.1_fg5oW41.png
new file mode 100644
index 00000000..1de4a14e
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/13.1_fg5oW41.png
Binary files differ
diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/15.4_yoOlH2F.png b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/15.4_yoOlH2F.png
new file mode 100644
index 00000000..5e1ca893
--- /dev/null
+++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/screenshots/15.4_yoOlH2F.png
Binary files differ
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter01.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter01.ipynb
new file mode 100644
index 00000000..11d6d6a2
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter01.ipynb
@@ -0,0 +1,171 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1. Fundamimport math al Concepts of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.1:pg-9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Final Tyre pressure is 3.61e+05 Pa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "Pi = 3.21e5 #Recommended tyre pressure, Pa\n",
+ "Ti = -5.00 #Initial Tyre temperature, °C\n",
+ "Tf = 28.00 #Final Tyre temperature, °C\n",
+ "\n",
+ "#Calculations\n",
+ "Ti = 273.16 + Ti\n",
+ "Tf = 273.16 + Tf\n",
+ "pf = Pi*Tf/Ti #Final tyre pressure, Pa\n",
+ "\n",
+ "#Results\n",
+ "print 'Final Tyre pressure is %6.2e Pa'%pf"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.2:pg-9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Moles of He=0.121, Ne=0.303 and, Xe=0.040 in mol\n",
+ "Mole fraction of xHe=0.261, xNe=0.652 and, xXe=0.087\n",
+ "Final pressure is 1.917 bar\n",
+ "Partial pressure of pHe=0.500, pNe=1.250 and, pXe=0.167 in bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "phe = 1.5 #Pressure in Helium chamber, bar\n",
+ "vhe = 2.0 #Volume of Helium chamber, L\n",
+ "pne = 2.5 #Pressure in Neon chamber, bar\n",
+ "vne = 3.0 #Volume of Neon chamber, L\n",
+ "pxe = 1.0 #Pressure in Xenon chamber, bar\n",
+ "vxe = 1.0 #Volume of Xenon chamber, L\n",
+ "R = 8.314e-2 #Ideal Gas Constant, L.bar/(mol.K)\n",
+ "T = 298 #Temperature of Gas, K\n",
+ "#Calculations\n",
+ "\n",
+ "nhe = phe*vhe/(R*T) #Number of moles of Helium, mol\n",
+ "nne = pne*vne/(R*T) #Number of moles of Neon, mol\n",
+ "nxe = pxe*vxe/(R*T) #Number of moles of Xenon, mol\n",
+ "n = nhe + nne + nxe #Total number of moles, mol\n",
+ "V = vhe + vne + vxe #Total volume of system, L\n",
+ "xhe = nhe/n\n",
+ "xne = nne/n\n",
+ "xxe = nxe/n\n",
+ "P = n*R*T/(V)\n",
+ "phe = P*xhe #Partial pressure of Helium, bar\n",
+ "pne = P*xne #Partial pressure of Neon, bar\n",
+ "pxe = P*xxe #Partial pressure of Xenon, bar\n",
+ "\n",
+ "#Results\n",
+ "print 'Moles of He=%4.3f, Ne=%4.3f and, Xe=%4.3f in mol'%(nhe,nne,nxe) \n",
+ "print 'Mole fraction of xHe=%4.3f, xNe=%4.3f and, xXe=%4.3f'%(xhe,xne,xxe)\n",
+ "print 'Final pressure is %4.3f bar'%P\n",
+ "print 'Partial pressure of pHe=%4.3f, pNe=%4.3f and, pXe=%4.3f in bar'%(phe,pne,pxe)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex1.4:pg-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure from ideal gas law = 9.98e-02 bar nad from Van der Waals equation = 9.98e-02 bar \n",
+ "Pressure from ideal gas law = 249.4 bar nad from Van der Waals equation = 269.9 bar \n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "import math \n",
+ "T = 300.0 #Nitrogen temperature, K\n",
+ "v1 = 250.00 #Molar volume, L\n",
+ "v2 = 0.1 #Molar volume, L\n",
+ "a = 1.37 #Van der Waals parameter a, bar.dm6/mol2 \n",
+ "b = 0.0387 #Van der Waals parameter b, dm3/mol\n",
+ "R = 8.314e-2 #Ideal Gas Constant, L.bar/(mol.K)\n",
+ "n = 1.\n",
+ "#Calculations\n",
+ "\n",
+ "p1 = n*R*T/v1 \n",
+ "p2 = n*R*T/v2\n",
+ "pv1 = n*R*T/(v1-n*b)- n**2*a/v1**2\n",
+ "pv2 = n*R*T/(v2-n*b)- n**2*a/v2**2\n",
+ "\n",
+ "#Results\n",
+ "print 'Pressure from ideal gas law = %4.2e bar nad from Van der Waals equation = %4.2e bar '%(p1, pv1)\n",
+ "print 'Pressure from ideal gas law = %4.1f bar nad from Van der Waals equation = %4.1f bar '%(p2, pv2)"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter02.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter02.ipynb
new file mode 100644
index 00000000..04d54ef7
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter02.ipynb
@@ -0,0 +1,418 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 02: Heat, Work, Internal Energy, Enthalpy, and The First Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.1:pg-20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Part a: Work done in expansion is -16.2 kJ\n",
+ "Part b: Work done in expansion of bubble is -1.73 J\n",
+ "Part c: Work done in paasing the cuurent through coil is 1.39 kJ\n",
+ "Part d: Work done stretching th fiber is -1.12 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math #Part a\n",
+ "vi = 20.0 #Initial volume of ideal gas, L\n",
+ "vf = 85.0 #final volume of ideal gas, L\n",
+ "Pext = 2.5 #External Pressure against which work is done, bar\n",
+ "\n",
+ "#Calculations\n",
+ "w = -Pext*1e5*(vf-vi)*1e-3\n",
+ "\n",
+ "#Results\n",
+ "print 'Part a: Work done in expansion is %6.1f kJ'%(w/1000)\n",
+ "\n",
+ "import math #Part b\n",
+ "ri = 1.00 #Initial diameter of bubble, cm\n",
+ "rf = 3.25 #final diameter of bubble, cm\n",
+ "sigm = 71.99 #Surface tension, N/m\n",
+ "\n",
+ "#Calculations\n",
+ "w = -2*sigm*4*math.pi*(rf**2-ri**2)*1e-4\n",
+ "\n",
+ "#Results\n",
+ "print 'Part b: Work done in expansion of bubble is %4.2f J'%w\n",
+ "\n",
+ "import math #Part c\n",
+ "i = 3.20 #Current through heating coil, A \n",
+ "v = 14.5 #fVoltage applied across coil, volts\n",
+ "t = 30.0 #time for which current is applied,s\n",
+ "\n",
+ "#Calculations\n",
+ "w = v*i*t\n",
+ "\n",
+ "#Results\n",
+ "print 'Part c: Work done in pasing the cuurent through coil is %4.2f kJ'%(w/1000)\n",
+ "\n",
+ "import math #Part d\n",
+ "k = 100.0 #Constant in F = -kx, N/cm \n",
+ "dl = -0.15 #stretch , cm\n",
+ "\n",
+ "#Calculations\n",
+ "w = -k*(dl**2-0)/2\n",
+ "\n",
+ "#Results\n",
+ "print 'Part d: Work done stretching th fiber is %4.2f J'%w"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.2:pg-22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat added to the water 24.00 kJ\n",
+ "Work done in vaporizing liquid is -1703.84 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "m = 100.0 #Mass of water, g \n",
+ "T = 100.0 #Temperature of water, °C\n",
+ "Pext = 1.0 #External Pressure on assembly, bar\n",
+ "x = 10.0 #percent of water vaporised at 1 bar,-\n",
+ "i = 2.00 #current through heating coil, A\n",
+ "v = 12.0 #Voltage applied, v\n",
+ "t = 1.0e3 #time for which current applied, s \n",
+ "rhol = 997 #Density of liquid, kg/m3\n",
+ "rhog = 0.59 #Density of vapor, kg/m3\n",
+ "\n",
+ "#Calculations\n",
+ "q = i*v*t\n",
+ "vi = m/(rhol*100)*1e-3\n",
+ "vf = m*(100-x)*1e-3/(rhol*100) + m*x*1e-3/(rhog*100)\n",
+ "w = -Pext*(vf-vi)*1e5\n",
+ "#Results\n",
+ "print 'Heat added to the water %4.2f kJ'%(q/1000)\n",
+ "print 'Work done in vaporizing liquid is %4.2f J'%w"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.3:pg-27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat removed by water at constant pressure 89.03 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math #Part d\n",
+ "m = 1.5 #mass of water in surrounding, kg \n",
+ "dT = 14.2 #Change in temperature of water, °C or K\n",
+ "cp = 4.18 #Specific heat of water at constant pressure, J/(g.K)\n",
+ "\n",
+ "#Calculations\n",
+ "qp = m*cp*dT\n",
+ "\n",
+ "#Results\n",
+ "print 'Heat removed by water at constant pressure %4.2f kJ'%qp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.4:pg-32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "For reverssible Isothermal expansion\n",
+ "Work done = -1.93e+02 J\n",
+ "For Single step reverssible expansion\n",
+ "Work done = -9.22e+03 J\n",
+ "For Two step reverssible expansion\n",
+ "Work done = -1.29e+04 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "import math \n",
+ "n = 2.0 #moles of ideal gas\n",
+ "R = 8.314 #Ideal gas constant, bar.L/(mol.K)\n",
+ "#For reverssible Isothermal expansion \n",
+ "Pi1 = 25.0 #Initial Pressure of ideal gas, bar\n",
+ "Vi1 = 4.50 #Initial volume of ideal gas, L\n",
+ "Pf1 = 4.50 #Fianl Pressure of ideal gas, bar\n",
+ "Pext = 4.50 #External pressure, bar \n",
+ "Pint = 11.0 #Intermediate pressure, bar\n",
+ "\n",
+ "#Calcualtions reverssible Isothermal expansion \n",
+ "T1 = Pi1*Vi1/(n*R)\n",
+ "Vf1 = n*R*T1/Pf1\n",
+ "w = -n*R*T1*log(Vf1/Vi1)\n",
+ "\n",
+ "#Results\n",
+ "print 'For reverssible Isothermal expansion'\n",
+ "print 'Work done = %4.2e J'%w\n",
+ "\n",
+ "#Calcualtions Single step irreverssible expansion \n",
+ "\n",
+ "w = -Pext*1e5*(Vf1-Vi1)*1e-3\n",
+ "\n",
+ "#Results\n",
+ "print 'For Single step reverssible expansion'\n",
+ "print 'Work done = %4.2e J'%w\n",
+ "\n",
+ "#Calcualtions Two step irreverssible expansion \n",
+ "Vint = n*R*T1/(Pint)\n",
+ "w = -Pint*1e5*(Vint-Vi1)*1e-3 - Pf1*1e5*(Vf1-Vint)*1e-3\n",
+ "\n",
+ "#Results\n",
+ "print 'For Two step reverssible expansion'\n",
+ "print 'Work done = %4.2e J'%w\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.5:pg-37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "For Path q w DU DH \n",
+ "1-2 139463.96 -39840.00 99623.96 139463.96\n",
+ "2-3 -99623.96 0.00 -99623.96 -139463.96\n",
+ "3-1 -5343.33 5343.33 0.00 0.00\n",
+ "Overall 34496.67 -34496.67 0.00 0.00\n",
+ "all values are in J\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "n = 2.5 #moles of ideal gas\n",
+ "R = 0.08314 #Ideal gas constant, bar.L/(mol.K)\n",
+ "cvm = 20.79 #Heat Capacity at constant volume, J/(mol.K)\n",
+ "\n",
+ "p1 = 16.6 #Pressure at point 1, bar\n",
+ "v1 = 1.00 #Volume at point 1, L\n",
+ "p2 = 16.6 #Pressure at point 2, bar\n",
+ "v2 = 25.0 #Volume at point 2, L \n",
+ "v3 = 25.0 #Volume at point 3, L\n",
+ "\n",
+ "#Calculations\n",
+ "T1 = p1*v1/(n*R)\n",
+ "T2 = p2*v2/(n*R)\n",
+ "T3 = T1 #from problem statement\n",
+ " #for path 1-2\n",
+ "DU12 = n*cvm*(T2-T1)\n",
+ "w12 = -p1*1e5*(v2-v1)*1e-3\n",
+ "q12 = DU12 - w12\n",
+ "DH12 = DU12 + n*R*(T2-T1)*1e2\n",
+ "\n",
+ " #for path 2-3\n",
+ "w23 = 0.0\n",
+ "DU23 = q23 = n*cvm*(T3-T2)\n",
+ "DH23 = -DH12\n",
+ "\n",
+ "\n",
+ " #for path 3-1\n",
+ "DU31 = 0.0 #Isothemal process\n",
+ "DH31 = 0.0\n",
+ "w31 = -n*R*1e2*T1*log(v1/v3)\n",
+ "q31 = -w31\n",
+ "\n",
+ "DU = DU12+DU23+DU31\n",
+ "w = w12+w23+w31\n",
+ "q = q12+q23+q31\n",
+ "DH = DH12+DH23+DH31\n",
+ "\n",
+ "#Results\n",
+ "print 'For Path q w DU DH '\n",
+ "print '1-2 %7.2f %7.2f %7.2f %7.2f'%(q12,w12,DU12,DH12)\n",
+ "print '2-3 %7.2f %7.2f %7.2f %7.2f'%(q23,w23,DU23,DH23)\n",
+ "print '3-1 %7.2f %7.2f %7.2f %7.2f'%(q31,w31,DU31,DH31)\n",
+ "print 'Overall %7.2f %7.2f %7.2f %7.2f'%(q,w,DU,DH)\n",
+ "print 'all values are in J'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.6:pg-38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The final temperature at end of adiabatic procees is 268.5 K\n",
+ "The enthalpy change of adiabatic procees is -2937.0 J\n",
+ "The Internal energy change of adiabatic procees is -1762.2 J\n",
+ "The work done in expansion of adiabatic procees is -1762.2 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "import math #Part d\n",
+ "n = 2.5 #moles of ideal gas\n",
+ "R = 8.314 #Ideal gas constant, J/(mol.K)\n",
+ "cvm = 12.47 #Heat Capacity at constant volume, J/(mol.K)\n",
+ "\n",
+ "pext = 1.00 #External Pressure, bar\n",
+ "Ti = 325. #Initial Temeprature, K\n",
+ "pi = 2.50 #Initial Pressure, bar\n",
+ "pf = 1.25 #Final pressure, bar \n",
+ "\n",
+ "#Calculations Adiabatic process q = 0; DU = w\n",
+ "q = 0.0 \n",
+ "Tf = Ti*(cvm + R*pext/pi)/(cvm + R*pext/pf )\n",
+ "DU = w = n*cvm*(Tf-Ti)\n",
+ "DH = DU + n*R*(Tf-Ti)\n",
+ "\n",
+ "#Results\n",
+ "print 'The final temperature at end of adiabatic procees is %4.1f K'%Tf\n",
+ "print 'The enthalpy change of adiabatic procees is %4.1f J'%DH\n",
+ "print 'The Internal energy change of adiabatic procees is %4.1f J'%DU\n",
+ "print 'The work done in expansion of adiabatic procees is %4.1f J'%w\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex2.7:pg-40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Final temperature of cloud 265.2 K\n",
+ "You can expect cloud\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log, exp\n",
+ " #Part d\n",
+ "h1 = 1000.0 #initial Altitude of cloud, m \n",
+ "hf = 3500.0 #Final Altitude of cloud, m \n",
+ "p1 = 0.802 #Pressure at h1, atm \n",
+ "pf = 0.602 #Pressure at hf, atm\n",
+ "T1 = 288.0 #Initial temperature of cloud, K\n",
+ "cp = 28.86 #Specific heat of air, J/mol.K\n",
+ "R = 8.314 #Gas constant, J/mol.K\n",
+ "\n",
+ "#Calculations\n",
+ "Tf = exp(-(cp/(cp-R)-1)/(cp/(cp-R))*log(p1/pf))*T1\n",
+ "#Results\n",
+ "print 'Final temperature of cloud %4.1f K'%Tf\n",
+ "if Tf < 273:\n",
+ " print 'You can expect cloud'\n",
+ "else:\n",
+ " print 'You can not expect cloud'"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter03.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter03.ipynb
new file mode 100644
index 00000000..dd54ed61
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter03.ipynb
@@ -0,0 +1,252 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Importance of State Functions: Internal Energy and Enthalpy"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.2:pg-49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure increase in capillary 100.0 bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "betaOH = 11.2e-4 #Thermal exapnasion coefficient of ethanol, °C\n",
+ "betagl = 2.00e-5 #Thermal exapnasion coefficient of glass, °C\n",
+ "kOH = 11.0e-5 #Isothermal compressibility of ethanol, /bar\n",
+ "dT = 10.0 #Increase in Temperature, °C\n",
+ "\n",
+ "#Calcualtions\n",
+ "vfbyvi = (1+ betagl*dT)\n",
+ "dP = betaOH*dT/kOH-(1./kOH)*log(vfbyvi)\n",
+ "\n",
+ "#Results\n",
+ "print 'Pressure increase in capillary %4.1f bar'%dP"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.4:pg-53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Minimum detectable temperature change of gas +- 6.0 °C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "cpsubysy = 1000 #Specific heat ration of surrounding and system\n",
+ "Tpreci = 0.006 #Precision in Temperature measurement, °C\n",
+ "\n",
+ "#Calcualtions\n",
+ "dtgas = -cpsubysy*(-Tpreci)\n",
+ "\n",
+ "#Results\n",
+ "print 'Minimum detectable temperature change of gas +-%4.1f °C'%dtgas"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.6:pg-54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "dUT = 24.4 J: This is wrongly reported in book\n",
+ "dUV = 4174.1 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import symbols, integrate\n",
+ "\n",
+ "\n",
+ "n = 1.0 #number of mole of N2, mol \n",
+ "Ti = 200.0 #Intial Temperature, K\n",
+ "Pi = 5.00 #Initial pressure, bar\n",
+ "Tf = 400.0 #Intial Temperature, K\n",
+ "Pf = 20.0 #Initial pressure, bar\n",
+ "a = 0.137 #van der Waals constant a, Pa.m3/(mol2)\n",
+ "b = 3.87e-5 #van der Waals constant b, m3/(mol)\n",
+ "A, B, C, D = 22.5, -1.187e-2,2.3968e-5, -1.0176e-8\n",
+ " #Constants in Cvm equation J, K and mol\n",
+ "vi = 3.28e-3 #initial volume, m3/mol\n",
+ "vf = 7.88e-3 #Final volume, m3/mol\n",
+ "\n",
+ "#Calculations\n",
+ "T = symbols('T')\n",
+ "dUT = n**2*a*(1./vi-1./vf)\n",
+ "dUV = integrate( A + B*T + C*T**2 + D*T**3, (T,Ti,Tf))\n",
+ "\n",
+ "#Results\n",
+ "print 'dUT = %4.1f J: This is wrongly reported in book'%dUT\n",
+ "print 'dUV = %4.1f J'%dUV"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.7:pg-57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "dH = 46.8 kJ\n",
+ "qp = 30.8 kJ\n",
+ "Error in calculations 34.3\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import symbols, integrate\n",
+ "\n",
+ "import math\n",
+ "m = 143.0 #Mass of graphite, g \n",
+ "Ti = 300.0 #Intial Temperature, K\n",
+ "Tf = 600.0 #Intial Temperature, K\n",
+ "A, B, C, D, E = -12.19,0.1126,-1.947e-4,1.919e-7,-7.8e-11\n",
+ " #Constants in Cvm equation J, K and mol\n",
+ "M = 12.01\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T = symbols('T')\n",
+ "dH = (m/M)*integrate( A + B*T + C*T**2 + D*T**3 + E*T**4, (T,Ti,Tf))\n",
+ "expr = A + B*T + C*T**2 + D*T**3 + E*T**4\n",
+ "cpm = expr.subs(T,300.)\n",
+ "qp = (m/M)*cpm*(Tf-Ti)\n",
+ "err = abs(dH-qp)/dH\n",
+ "#Results\n",
+ "print 'dH = %6.1f kJ'%(dH/1000)\n",
+ "print 'qp = %6.1f kJ'%(qp/1000)\n",
+ "print 'Error in calculations %4.1f'%(err*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex3.9:pg-59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Enthalpy change for change in state of methanol is 39.9 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "m = 124.0 #Mass of liquid methanol, g\n",
+ "Pi = 1.0 #Initial Pressure, bar\n",
+ "Ti = 298.0 #Intial Temperature, K\n",
+ "Pf = 2.5 #Final Pressure, bar\n",
+ "Tf = 425.0 #Intial Temperature, K\n",
+ "rho = 0.791 #Density, g/cc\n",
+ "Cpm = 81.1 #Specifi heat, J/(K.mol)\n",
+ "M = 32.04\n",
+ "\n",
+ "#Calculations\n",
+ "n = m/M\n",
+ "DH = n*Cpm*(Tf-Ti)+ m*(Pf-Pi)*1e-6/rho\n",
+ "\n",
+ "#Results\n",
+ "print 'Enthalpy change for change in state of methanol is %4.1f kJ'%(DH/1000)"
+ ]
+ },
+ {
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter04.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter04.ipynb
new file mode 100644
index 00000000..7d42ed97
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter04.ipynb
@@ -0,0 +1,211 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 04: Thermochemistry"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.1:pg-72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Avergae Enthalpy change required for breaking both OH bonds 927.0 kJ/mol\n",
+ "Average bond energy required for breaking both OH bonds 461.0 kJ/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "DH0_H2O = 241.8 #Std Enthalpy of reaxtion of Water Fomation backward rxn, kJ/mol\n",
+ "DH0_2H = 2*218.0 #Std Enthalpy of formation of Hydrogen atom, kJ/mol\n",
+ "DH0_O = 249.2 #Std Enthalpy of formation of Oxygen atom, kJ/mol\n",
+ "R = 8.314 #Ideal gas constant, J/(mol.K)\n",
+ "Dn = 2.0\n",
+ "T = 298.15 #Std. Temperature, K\n",
+ "#Calculation\n",
+ "DH0_2HO = DH0_H2O + DH0_2H + DH0_O\n",
+ "DU0 = (DH0_2HO - Dn*R*T*1e-3)/2\n",
+ "\n",
+ "#Results\n",
+ "print 'Avergae Enthalpy change required for breaking both OH bonds %4.1f kJ/mol'%DH0_2HO\n",
+ "print 'Average bond energy required for breaking both OH bonds %4.1f kJ/mol'%DU0"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.2:pg-74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat of reaction for HCl formation is -95.1 kJ/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "from sympy import symbols, integrate\n",
+ "\n",
+ "#Variable Declaration\n",
+ "a = ([29.064, 31.695, 28.165]) #Constant 'a' in Heat capacity equation, J/(mol.K)\n",
+ "b = ([-0.8363e-3, 10.143e-3, 1.809e-3]) #Constant 'b' in Heat capacity equation, J/(mol.K)\n",
+ "c = ([20.111e-7, -40.373e-7, 15.464e-7]) #Constant 'a' in Heat capacity equation, J/(mol.K)\n",
+ "delHf0HCl = -92.3 #Std. Heat of formation of HCl, kJ/mol\n",
+ "T1, T2 = 298.15, 1450 #Std and final temperature, K\n",
+ "\n",
+ "#Calculations\n",
+ "T = symbols('T')\n",
+ "DA = a[2]-(a[0]+a[1])/2\n",
+ "DB = b[2]-(b[0]+b[1])/2\n",
+ "DC = c[2]-(c[0]+c[1])/2\n",
+ "\n",
+ "expr = integrate( DA + DB*T + DC*T**2, (T,T1,T2))\n",
+ "DHR1450= expr/1000 + delHf0HCl\n",
+ "\n",
+ "#Results\n",
+ "print 'Heat of reaction for HCl formation is %4.1f kJ/mol'%DHR1450"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.3:pg-75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Calorimeter constant 7.59e+03 J/°C\n",
+ "Enthalpy of rection for benzene -3.26e+06 J/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "import math\n",
+ "ms1 = 0.972 #Mass of cyclohexane, g\n",
+ "DT1 = 2.98 #Change in temperature for bath, °C\n",
+ "DUR1 = -3913e3 #Std Internal energy change, J/mol\n",
+ "mw = 1.812e3 #Mass of water, g\n",
+ "ms2 = 0.857 #Mass of benzene, g\n",
+ "Ms1 = 84.16\n",
+ "Ms2 = 78.12\n",
+ "DT2 = 2.36 #Change in temperature for bath, °C\n",
+ "Mw = 18.02\n",
+ "Cpw = 75.3 \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Ccal = ((-ms1/Ms1)*DUR1-(mw/Mw)*Cpw*DT1)/DT1\n",
+ "DUR2 = (-Ms2/ms2)*((mw/Mw)*Cpw*DT2+Ccal*DT2)\n",
+ "\n",
+ "#Results\n",
+ "print 'Calorimeter constant %4.2e J/°C'%Ccal\n",
+ "print 'Enthalpy of rection for benzene %4.2e J/mol'%DUR2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex4.4:pg-77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Enthalpy of solution for Na2SO4 -2.81e+03 J/mol\n",
+ "Enthalpy of solution for Na2SO4 from Data -2.40e+00 J/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "import math\n",
+ "ms = 1.423 #Mass of Na2SO4, g\n",
+ "mw = 100.34 #Mass of Na2SO4, g\n",
+ "DT = 0.037 #Change in temperature for solution, K\n",
+ "Mw = 18.02 #Molecular wt of Water\n",
+ "Ms = 142.04 #Molecular wt of ms Na2SO4\n",
+ "Ccal = 342.5 #Calorimeter constant, J/K\n",
+ "#Data\n",
+ "DHfNa = -240.1\n",
+ "DHfSO4 = -909.3\n",
+ "DHfNa2SO4 = -1387.1\n",
+ "\n",
+ "#Calculation\n",
+ "DHs = (-Ms/ms)*((mw/Mw)*Cpw*DT+Ccal*DT)\n",
+ "DHsolD = 2*DHfNa + DHfSO4 - DHfNa2SO4\n",
+ "\n",
+ "#Results\n",
+ "print 'Enthalpy of solution for Na2SO4 %4.2e J/mol'%DHs\n",
+ "print 'Enthalpy of solution for Na2SO4 from Data %4.2e J/mol'%DHsolD"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter05.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter05.ipynb
new file mode 100644
index 00000000..29d2cd41
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter05.ipynb
@@ -0,0 +1,421 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Enthalpy and the Second and Third Laws of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.1:pg-90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency of heat engine is 0.600\n",
+ "Work done by heat engine is 600.0 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "Th, Tc = 500.,200. #Temeperatures IN Which reversible heat engine works, K\n",
+ "q = 1000. #Heat absorbed by heat engine, J\n",
+ "\n",
+ "#Calcualtions\n",
+ "eps = 1.-Tc/Th\n",
+ "w = eps*q\n",
+ "\n",
+ "#Results\n",
+ "print 'Efficiency of heat engine is %4.3f'%eps\n",
+ "print 'Work done by heat engine is %4.1f J'%w"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.4:pg-94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Entropy change of process is 24.43 J/(mol.K)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import integrate, symbols\n",
+ "from math import log\n",
+ "\n",
+ "n = 1.0 #Number of moles of CO2\n",
+ "Ti, Tf = 320.,650. #Initial and final state Temeperatures of CO2, K\n",
+ "vi, vf = 80.,120. #Initial and final state volume of CO2, K\n",
+ "A, B, C, D = 31.08,-0.01452,3.1415e-5,-1.4973e-8\n",
+ " #Constants in constant volume Heat capacity equation in J, mol, K units\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n",
+ "#Calcualtions\n",
+ "T = symbols('T')\n",
+ "dS1 = n*integrate( (A + B*T + C*T**2 + D*T**3)/T, (T,Ti,Tf)) \n",
+ "dS2 = n*R*log(vf/vi)\n",
+ "dS = dS1 + dS2\n",
+ "#Results\n",
+ "print 'Entropy change of process is %4.2f J/(mol.K)'%dS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.5:pg-94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Entropy change of process is 48.55 J/(mol.K)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import integrate, symbols\n",
+ "from math import log\n",
+ "\n",
+ "n = 2.5 #Number of moles of CO2\n",
+ "Ti, Tf = 450.,800. #Initial and final state Temeperatures of CO2, K\n",
+ "pi, pf = 1.35,3.45 #Initial and final state pressure of CO2, K\n",
+ "A, B, C, D = 18.86,7.937e-2,-6.7834e-5,2.4426e-8\n",
+ " #Constants in constant pressure Heat capacity equation in J, mol, K units\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n",
+ "#Calcualtions\n",
+ "T = symbols('T')\n",
+ "dS1 = n*integrate( (A + B*T + C*T**2 + D*T**3)/T, (T,Ti,Tf)) \n",
+ "dS2 = n*R*log(pf/pi)\n",
+ "dS = dS1 - dS2\n",
+ "#Results\n",
+ "print 'Entropy change of process is %4.2f J/(mol.K)'%dS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.6:pg-95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Entropy change of process is 58.2 J/(mol.K)\n",
+ "Ratio of pressure to temperature dependent term 2.8e-05\n",
+ "hence effect of pressure dependent term isvery less\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "\n",
+ "n = 3.0 #Number of moles of CO2\n",
+ "Ti, Tf = 300.,600. #Initial and final state Temeperatures of CO2, K\n",
+ "pi, pf = 1.00,3.00 #Initial and final state pressure of CO2, K\n",
+ "cpm = 27.98 #Specific heat of mercury, J/(mol.K)\n",
+ "M = 200.59 #Molecualr wt of mercury, g/(mol)\n",
+ "beta = 1.81e-4 #per K\n",
+ "rho = 13.54 #Density of mercury, g/cm3\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n",
+ "\n",
+ "#Calcualtions\n",
+ "dS1 = n*cpm*log(Tf/Ti)\n",
+ "dS2 = n*(M/(rho*1e6))*beta*(pf-pi)*1e5\n",
+ "dS = dS1 - dS2\n",
+ "\n",
+ "#Results\n",
+ "print 'Entropy change of process is %4.1f J/(mol.K)'%dS\n",
+ "print 'Ratio of pressure to temperature dependent term %3.1e\\nhence effect of pressure dependent term isvery less'%(dS2/dS1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.7:pg-99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Entropy change of surrounding is 7.6 J/(mol.K)\n",
+ "Entropy change of system is -7.6 J/(mol.K)\n",
+ "Total Entropy changeis 0.0 J/(mol.K)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "n = 1.0 #Number of moles of CO2\n",
+ "T = 300.0 #Temeperatures of Water bath, K\n",
+ "vi, vf = 25.0,10.0 #Initial and final state Volume of Ideal Gas, L\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n",
+ "\n",
+ "#Calcualtions\n",
+ "qrev = n*R*T*log(vf/vi)\n",
+ "w = -qrev\n",
+ "dSsys = qrev/T\n",
+ "dSsur = -dSsys\n",
+ "dS = dSsys + dSsur\n",
+ "\n",
+ "#Results\n",
+ "print 'Entropy change of surrounding is %4.1f J/(mol.K)'%dSsur\n",
+ "print 'Entropy change of system is %4.1f J/(mol.K)'%dSsys\n",
+ "print 'Total Entropy changeis %4.1f J/(mol.K)'%dS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.8:pg-100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Constant external pressure and initial pressure are 2.494e+05 J,and 9.977e+04 J respectively\n",
+ "Heat in reverssible and irreversible processes are -2285.4 J,and -3741.3 J respectively\n",
+ "Entropy change of system is -7.6 J/(mol.K)\n",
+ "Entropy change of surrounding is 12.47 J/(mol.K)\n",
+ "Total Entropy changeis 4.85 J/(mol.K)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "\n",
+ "n = 1.0 #Number of moles of CO2\n",
+ "T = 300.0 #Temeperatures of Water bath, K\n",
+ "vi, vf = 25.0,10.0 #Initial and final state Volume of Ideal Gas, L\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n",
+ "\n",
+ "#Calcualtions\n",
+ "pext = n*R*T/(vf/1e3)\n",
+ "pi = n*R*T/(vi/1e3)\n",
+ "q = pext*(vf-vi)/1e3\n",
+ "qrev = n*R*T*log(vf/vi)\n",
+ "w = -q\n",
+ "dSsur = -q/T\n",
+ "dSsys = qrev/T\n",
+ "dS = dSsys + dSsur\n",
+ "\n",
+ "#Results\n",
+ "print 'Constant external pressure and initial pressure are %4.3e J,and %4.3e J respectively'%(pext,pi)\n",
+ "print 'Heat in reverssible and irreversible processes are %4.1f J,and %4.1f J respectively'%(qrev,q)\n",
+ "print 'Entropy change of system is %4.1f J/(mol.K)'%dSsys\n",
+ "print 'Entropy change of surrounding is %4.2f J/(mol.K)'%dSsur\n",
+ "print 'Total Entropy changeis %4.2f J/(mol.K)'%dS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.9:pg-103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Entropy change Sm0 for O2 is 204.8 J/(mol.K)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import integrate, symbols\n",
+ "from math import log\n",
+ "\n",
+ "n = 1.0 #Number of moles of CO2\n",
+ "pi, pf = 1.35,3.45 #Initial and final state pressure of CO2, K\n",
+ "D1 = 2.11e-3 #Constants in constant pressure Heat capacity equation for K<T<12.97K, in J, mol, K units\n",
+ "A2, B2, C2, D2 = -5.666,0.6927,-5.191e-3,9.943e-4\n",
+ " #Constants in constant pressure Heat capacity equation for 12.97<T<23.66, J, mol, K units\n",
+ "A3, B3, C3, D3 = 31.70,-2.038,0.08384,-6.685e-4\n",
+ " #Constants in constant pressure Heat capacity equation for 23.66<T<43.76, J, mol, K units\n",
+ "A4 = 46.094 #Constants in constant pressure Heat capacity equation for 43.76<T<54.39, J/(mol.K)\n",
+ "A5, B5, C5, D5 = 81.268,-1.1467,0.01516,-6.407e-5\n",
+ " #Constants in constant pressure Heat capacity equation for 54.39<T<90.20K, J, mol, K units\n",
+ "A6, B6, C6, D6 = 32.71,-0.04093,1.545e-4,-1.819e-7\n",
+ " #Constants in constant pressure Heat capacity equation for 90.20<T<298.15 KJ, mol, K units\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K) \n",
+ "Ltrans1 = 93.80 #Entalpy of transition at 23.66K, J/mol\n",
+ "Ltrans2 = 743.0 #Entalpy of transition at 43.76K, J/mol\n",
+ "Ltrans3 = 445.0 #Entalpy of transition at 54.39K, J/mol\n",
+ "Ltrans4 = 6815. #Entalpy of transition at 90.20K, J/mol\n",
+ "T1 = 12.97 #Maximum applicabliltiy temeprature for first heat capacity equation, K\n",
+ "T12 = 23.66 #Phase Change temperature from Solid III--II, K\n",
+ "T23 = 43.76 #Phase Change temperature from Solid II--I, K\n",
+ "T34 = 54.39 #Phase Change temperature from Solid I--liquid, K\n",
+ "T45 = 90.20 #Phase Change temperature from liquid--gas, K\n",
+ "Ts = 298.15 #Std. Temeprature, K\n",
+ "#Calcualtions\n",
+ "T = symbols('T')\n",
+ "dS1 = n*integrate( (D1*T**3)/T, (T,0,T1)) \n",
+ "dS2 = n*integrate( (A2 + B2*T + C2*T**2 + D2*T**3)/T, (T,T1,T12)) \n",
+ "dS21 = Ltrans1/T12\n",
+ "dS3 = n*integrate( (A3 + B3*T + C3*T**2 + D3*T**3)/T, (T,T12,T23)) \n",
+ "dS31 = Ltrans2/T23\n",
+ "dS4 = n*integrate( (A4)/T, (T,T23,T34)) \n",
+ "dS41 = Ltrans3/T34\n",
+ "dS5 = n*integrate( (A5 + B5*T + C5*T**2 + D5*T**3)/T, (T,T34,T45)) \n",
+ "dS51 = Ltrans4/T45\n",
+ "dS6 = n*integrate( (A6 + B6*T + C6*T**2 + D6*T**3)/T, (T,T45,Ts))\n",
+ "#print dS1+dS2,dS21\n",
+ "#print dS3, dS31\n",
+ "#print dS4, dS41\n",
+ "#print dS5, dS51\n",
+ "#print dS6\n",
+ "dS = dS1+dS2+dS21+dS3+dS31+dS4+dS41+dS5+dS51+dS6\n",
+ "\n",
+ "#Results\n",
+ "print 'Entropy change Sm0 for O2 is %4.1f J/(mol.K)'%dS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex5.10:pg-105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Entropy change for reaction at 475 K is -88.26 J/(mol.K)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import integrate, symbols\n",
+ "from math import log\n",
+ "n = 1.0 #Number of moles of CO2 formed, mol\n",
+ "p = 1. #Pressure of CO2, K\n",
+ "\n",
+ "A1, B1, C1, D1 = 18.86,7.937e-2,-6.7834e-5,2.4426e-8\n",
+ " #Constants in constant pressure Heat capacity equation for CO2, J/(mol.K)\n",
+ "A2, B2, C2, D2 = 30.81,-1.187e-2,2.3968e-5, 0.0\n",
+ " #Constants in constant pressure Heat capacity equation for O2, J/(mol.K)\n",
+ "A3, B3, C3, D3 = 31.08,-1.452e-2,3.1415e-5 ,-1.4793e-8 \n",
+ " #Constants in constant pressure Heat capacity equation for CO, J/(mol.K)\n",
+ "DSr298CO = 197.67 #Std. Entropy change for CO, J/(mol.K)\n",
+ "DSr298CO2 = 213.74 #Std. Entropy change for CO, J/(mol.K)\n",
+ "DSr298O2 = 205.138 #Std. Entropy change for CO, J/(mol.K)\n",
+ "Tr = 475. #Reaction temperature, K\n",
+ "Ts = 298.15 #Std. temperature, K\n",
+ "#Calcualtions\n",
+ "T = symbols('T')\n",
+ "v1,v2,v3 = 1.,1./2,1.\n",
+ "DSr = DSr298CO2*v1 - DSr298CO*v1 - DSr298O2*v2\n",
+ "DA = v1*A1-v2*A2-v3*A3\n",
+ "DB = v1*B1-v2*B2-v3*B3\n",
+ "DC = v1*C1-v2*C2-v3*C3\n",
+ "DD = v1*D1-v2*D2-v3*D3\n",
+ "dS = DSr + n*integrate( (DA + DB*T + DC*T**2 + DD*T**3)/T, (T,Ts,Tr)) \n",
+ "\n",
+ "#Results\n",
+ "print 'Entropy change for reaction at %4d K is %4.2f J/(mol.K)'%(Tr,dS)"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter06.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter06.ipynb
new file mode 100644
index 00000000..076c1413
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter06.ipynb
@@ -0,0 +1,700 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 06: Chemical Equilibrium"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.1:pg-126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum Available work through combustion of CH4 -813.6 kJ/mol\n",
+ "Maximum Available work through combustion of C8H18 -5320.9 kJ/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "dHcCH4 = -891.0 #Std. heat of combustion for CH4, kJ/mol\n",
+ "dHcC8H18 = -5471.0 #Std. heat of combustion for C8H18, kJ/mol\n",
+ "\n",
+ "T = 298.15\n",
+ "SmCO2, SmCH4, SmH2O, SmO2, SmC8H18 = 213.8,186.3,70.0,205.2, 316.1\n",
+ "dnCH4 = -2.\n",
+ "dnC8H18 = 4.5\n",
+ "R = 8.314\n",
+ "#Calculations\n",
+ "dACH4 = dHcCH4*1e3 - dnCH4*R*T - T*(SmCO2 + 2*SmH2O - SmCH4 - 2*SmO2)\n",
+ "dAC8H18 = dHcC8H18*1e3 - dnC8H18*R*T - T*(8*SmCO2 + 9*SmH2O - SmC8H18 - 25.*SmO2/2) \n",
+ "#Results \n",
+ "print 'Maximum Available work through combustion of CH4 %4.1f kJ/mol'%(dACH4/1000)\n",
+ "print 'Maximum Available work through combustion of C8H18 %4.1f kJ/mol'%(dAC8H18/1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.2:pg-128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum nonexapnasion work through combustion of CH4 -818.6 kJ/mol\n",
+ "Maximum nonexapnasion work through combustion of C8H18 -5309.8 kJ/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "dHcCH4 = -891.0 #Std. heat of combustion for CH4, kJ/mol\n",
+ "dHcC8H18 = -5471.0 #Std. heat of combustion for C8H18, kJ/mol\n",
+ "\n",
+ "T = 298.15\n",
+ "SmCO2, SmCH4, SmH2O, SmO2, SmC8H18 = 213.8,186.3,70.0,205.2, 316.1\n",
+ "dnCH4 = -2.\n",
+ "dnC8H18 = 4.5\n",
+ "R = 8.314\n",
+ "#Calculations\n",
+ "dGCH4 = dHcCH4*1e3 - T*(SmCO2 + 2*SmH2O - SmCH4 - 2*SmO2)\n",
+ "dGC8H18 = dHcC8H18*1e3 - T*(8*SmCO2 + 9*SmH2O - SmC8H18 - 25.*SmO2/2) \n",
+ "#Results \n",
+ "print 'Maximum nonexapnasion work through combustion of CH4 %4.1f kJ/mol'%(dGCH4/1000)\n",
+ "print 'Maximum nonexapnasion work through combustion of C8H18 %4.1f kJ/mol'%(dGC8H18/1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.4:pg-133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Std. free energy of formation for Fe(g) at 400 K is 355.1 kJ/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "dGf298 = 370.7 #Std. free energy of formation for Fe (g), kJ/mol\n",
+ "dHf298 = 416.3 #Std. Enthalpy of formation for Fe (g), kJ/mol\n",
+ "T0 = 298.15 #Temperature in K\n",
+ "T = 400. #Temperature in K\n",
+ "R = 8.314\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "dGf = T*(dGf298*1e3/T0 + dHf298*1e3*(1./T - 1./T0))\n",
+ "\n",
+ "#Results \n",
+ "print 'Std. free energy of formation for Fe(g) at 400 K is %4.1f kJ/mol'%(dGf/1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.5:pg-137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Std. free energy Change on mixing is -2.8e+04 J\n",
+ "Std. entropy Change on mixing is -93.3 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "nHe = 1.0 #Number of moles of He\n",
+ "nNe = 3.0 #Number of moles of Ne\n",
+ "nAr = 2.0 #Number of moles of Ar\n",
+ "nXe = 2.5 #Number of moles of Xe\n",
+ "T = 298.15 #Temperature in K\n",
+ "P = 1.0 #Pressure, bar\n",
+ "R = 8.314\n",
+ "\n",
+ "#Calculations\n",
+ "n = nHe + nNe + nAr + nXe\n",
+ "dGmix = n*R*T*((nHe/n)*log(nHe/n) + (nNe/n)*log(nNe/n) +(nAr/n)*log(nAr/n) + (nXe/n)*log(nXe/n))\n",
+ "dSmix = n*R*((nHe/n)*log(nHe/n) + (nNe/n)*log(nNe/n) +(nAr/n)*log(nAr/n) + (nXe/n)*log(nXe/n))\n",
+ "\n",
+ "#Results \n",
+ "print 'Std. free energy Change on mixing is %3.1e J'%(dGmix)\n",
+ "print 'Std. entropy Change on mixing is %4.1f J'%(dSmix)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.6:pg-138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Std. Gibbs energy change for reaction is 67.00 kJ/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "dGfFe = 0.0 #Std. Gibbs energy of formation for Fe (S), kJ/mol\n",
+ "dGfH2O = -237.1 #Std. Gibbs energy of formation for Water (g), kJ/mol\n",
+ "dGfFe2O3 = -1015.4 #Std. Gibbs energy of formation for Fe2O3 (s), kJ/mol\n",
+ "dGfH2 = 0.0 #Std. Gibbs energy of formation for Hydrogen (g), kJ/mol\n",
+ "T0 = 298.15 #Temperature in K\n",
+ "R = 8.314\n",
+ "nFe, nH2, nFe2O3, nH2O = 3,-4,-1,4\n",
+ "\n",
+ "#Calculations\n",
+ "dGR = nFe*dGfFe + nH2O*dGfH2O + nFe2O3*dGfFe2O3 + nH2*dGfH2 \n",
+ "\n",
+ "#Results \n",
+ "print 'Std. Gibbs energy change for reaction is %4.2f kJ/mol'%(dGR)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.7:pg-139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Std. Enthalpy change for reactionat 525.0 is -24.80 kJ/mol\n",
+ "Std. Gibbs energy change for reactionat 525.0 is 137 kJ/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "dGR = 67.0 #Std. Gibbs energy of formation for reaction, kJ, from previous problem\n",
+ "dHfFe = 0.0 #Enthalpy of formation for Fe (S), kJ/mol\n",
+ "dHfH2O = -285.8 #Enthalpy of formation for Water (g), kJ/mol\n",
+ "dHfFe2O3 = -1118.4 #Enthalpy of formation for Fe2O3 (s), kJ/mol\n",
+ "dHfH2 = 0.0 #Enthalpy of formation for Hydrogen (g), kJ/mol\n",
+ "T0 = 298.15 #Temperature in K\n",
+ "T = 525. #Temperature in K\n",
+ "R = 8.314\n",
+ "nFe, nH2, nFe2O3, nH2O = 3,-4,-1,4\n",
+ "\n",
+ "#Calculations\n",
+ "dHR = nFe*dHfFe + nH2O*dHfH2O + nFe2O3*dHfFe2O3 + nH2*dHfH2 \n",
+ "dGR2 = T*(dGR*1e3/T0 + dHR*1e3*(1./T - 1./T0))\n",
+ "\n",
+ "#Results \n",
+ "print 'Std. Enthalpy change for reactionat %4.1f is %4.2f kJ/mol'%(T, dHR)\n",
+ "print 'Std. Gibbs energy change for reactionat %4.1f is %4.0f kJ/mol'%(T, dGR2/1e3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.8:pg-140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Std. Gibbs energy change for reaction is 1.337 kJ/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "dGfNO2 = 51.3 #Std. Gibbs energy of formation for NO2 (g), kJ/mol\n",
+ "dGfN2O4 = 99.8 #Std. Gibbs energy of formation for N2O4 (g), kJ/mol\n",
+ "T0 = 298.15 #Temperature in K\n",
+ "pNO2 = 0.350 #Partial pressure of NO2, bar\n",
+ "pN2O4 = 0.650 #Partial pressure of N2O4, bar\n",
+ "R = 8.314\n",
+ "nNO2, nN2O4 = -2, 1 #Stoichiomentric coeff of NO2 and N2O4 respectively in reaction\n",
+ "\n",
+ "#Calculations\n",
+ "dGR = nN2O4*dGfN2O4*1e3 + nNO2*dGfNO2*1e3 + R*T0*log(pN2O4/(pNO2)**2)\n",
+ "\n",
+ "#Results \n",
+ "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR/1e3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.9:pg-141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Std. Gibbs energy change for reaction is -0.020 kJ/mol\n",
+ "Equilibrium constant for reaction is 3323.254 \n",
+ "Kp >> 1. hence, mixture will consists of product CO2 and H2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "dGfCO2 = -394.4 #Std. Gibbs energy of formation for CO2 (g), kJ/mol\n",
+ "dGfH2 = 0.0 #Std. Gibbs energy of formation for H2 (g), kJ/mol\n",
+ "dGfCO = 237.1 #Std. Gibbs energy of formation for CO (g), kJ/mol\n",
+ "dGfH2O = 137.2 #Std. Gibbs energy of formation for H24 (l), kJ/mol\n",
+ "T0 = 298.15 #Temperature in K\n",
+ "R = 8.314\n",
+ "nCO2, nH2, nCO, nH2O = 1,1,1,1 #Stoichiomentric coeff of CO2,H2,CO,H2O respectively in reaction\n",
+ "\n",
+ "#Calculations\n",
+ "dGR = nCO2*dGfCO2 + nH2*dGfH2 + nCO*dGfCO + nH2O*dGfH2O\n",
+ "Kp = exp(-dGR*1e3/(R*T0))\n",
+ "\n",
+ "#Results \n",
+ "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR/1e3)\n",
+ "print 'Equilibrium constant for reaction is %5.3f '%(Kp)\n",
+ "if Kp > 1: print 'Kp >> 1. hence, mixture will consists of product CO2 and H2'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.11:pg-144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Part A\n",
+ "Std. Gibbs energy change for reaction is 211.400 kJ/mol\n",
+ "Std. Enthalpy change for reaction is 242.600 kJ/mol\n",
+ "Equilibrium constants at 800, 1500, and 2000 K are 4.223e-11, 1.042e-03, and 1.349e-01\n",
+ "Part B\n",
+ "Degree of dissociation at 800, 1500, and 2000 K are 3.249e-05, 1.593e-01, and 8.782e-01\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp, sqrt\n",
+ "\n",
+ "dGfCl2 = 0.0 #Std. Gibbs energy of formation for CO2 (g), kJ/mol\n",
+ "dGfCl = 105.7 #Std. Gibbs energy of formation for H2 (g), kJ/mol\n",
+ "dHfCl2 = 0.0 #Std. Gibbs energy of formation for CO (g), kJ/mol\n",
+ "dHfCl = 121.3 #Std. Gibbs energy of formation for H24 (l), kJ/mol\n",
+ "T0 = 298.15 #Temperature in K\n",
+ "R = 8.314\n",
+ "nCl2, nCl= -1,2 #Stoichiomentric coeff of Cl2,Cl respectively in reaction\n",
+ "PbyP0 = 0.01\n",
+ "#Calculations\n",
+ "dGR = nCl*dGfCl + nCl2*dGfCl2 \n",
+ "dHR = nCl*dHfCl + nCl2*dHfCl2 \n",
+ "func = lambda T: exp(-dGR*1e3/(R*T0) - dHR*1e3*(1./T - 1./T0)/R)\n",
+ "Kp8 = func(800)\n",
+ "Kp15 = func(1500)\n",
+ "Kp20 = func(2000)\n",
+ "DDiss = lambda K: sqrt(K/(K+4*PbyP0))\n",
+ "alp8 = DDiss(Kp8)\n",
+ "alp15 = DDiss(Kp15)\n",
+ "alp20 = DDiss(Kp20)\n",
+ "\n",
+ "#Results \n",
+ "print 'Part A'\n",
+ "print 'Std. Gibbs energy change for reaction is %5.3f kJ/mol'%(dGR)\n",
+ "print 'Std. Enthalpy change for reaction is %5.3f kJ/mol'%(dHR)\n",
+ "print 'Equilibrium constants at 800, 1500, and 2000 K are %4.3e, %4.3e, and %4.3e'%(Kp8,Kp15,Kp20)\n",
+ "\n",
+ "print 'Part B'\n",
+ "print 'Degree of dissociation at 800, 1500, and 2000 K are %4.3e, %4.3e, and %4.3e'%(alp8,alp15,alp20)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.12:pg-145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Std. Gibbs energy change for reaction is 131.1 kJ/mol\n",
+ "Std. Enthalpy change for reaction is 178.5 kJ/mol\n",
+ "Equilibrium constants at 1000, 1100, and 1200 K are 0.0956, 0.673e, and 3.423\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "dGfCaCO3 = -1128.8 #Std. Gibbs energy of formation for CaCO3 (s), kJ/mol\n",
+ "dGfCaO = -603.3 #Std. Gibbs energy of formation for CaO (s), kJ/mol\n",
+ "dGfCO2 = -394.4 #Std. Gibbs energy of formation for O2 (g), kJ/mol\n",
+ "dHfCaCO3 = -1206.9 #Std. Enthalpy Change of formation for CaCO3 (s), kJ/mol\n",
+ "dHfCaO = -634.9 #Std. Enthalpy Change of formation for CaO (s), kJ/mol\n",
+ "dHfCO2 = -393.5 #Std. Enthalpy Change of formation for O2 (g), kJ/mol\n",
+ "T0 = 298.15 #Temperature in K\n",
+ "R = 8.314\n",
+ "nCaCO3, nCaO, nO2 = -1,1,1 #Stoichiomentric coeff of CaCO3, CaO, O2 respectively in reaction\n",
+ "\n",
+ "#Calculations\n",
+ "dGR = nCaO*dGfCaO + nO2*dGfCO2 + nCaCO3*dGfCaCO3\n",
+ "dHR = nCaO*dHfCaO + nO2*dHfCO2 + nCaCO3*dHfCaCO3\n",
+ "\n",
+ "func = lambda T: exp(-dGR*1e3/(R*T0) - dHR*1e3*(1./T - 1./T0)/R)\n",
+ "\n",
+ "Kp10 = func(1000)\n",
+ "Kp11 = func(1100)\n",
+ "Kp12 = func(1200)\n",
+ "\n",
+ "#Results \n",
+ "print 'Std. Gibbs energy change for reaction is %4.1f kJ/mol'%(dGR)\n",
+ "print 'Std. Enthalpy change for reaction is %4.1f kJ/mol'%(dHR)\n",
+ "print 'Equilibrium constants at 1000, 1100, and 1200 K are %4.4f, %4.3fe, and %4.3f'%(Kp10,Kp11,Kp12)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.13:pg-146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure at which graphite and dimond will be in equilibrium is 1.51e+04 bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "dGfCG = 0.0 #Std. Gibbs energy of formation for CaCO3 (s), kJ/mol\n",
+ "dGfCD = 2.90 #Std. Gibbs energy of formation for CaO (s), kJ/mol\n",
+ "rhoG = 2.25e3 #Density of Graphite, kg/m3\n",
+ "rhoD = 3.52e3 #Density of dimond, kg/m3\n",
+ "T0 = 298.15 #Std. Temperature, K\n",
+ "R = 8.314 #Ideal gas constant, J/(mol.K) \n",
+ "P0 = 1.0 #Pressure, bar\n",
+ "M = 12.01 #Molceular wt of Carbon\n",
+ "#Calculations\n",
+ "P = P0*1e5 + dGfCD*1e3/((1./rhoG-1./rhoD)*M*1e-3)\n",
+ "\n",
+ "#Results \n",
+ "print 'Pressure at which graphite and dimond will be in equilibrium is %4.2e bar'%(P/1e5)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.14:pg-154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "dUbydV = 1.42e+03 bar\n",
+ "dVbyV = 6.519 percent\n",
+ "dUbydVm = 9e+02 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "\n",
+ "beta = 2.04e-4 #Thermal exapansion coefficient, /K\n",
+ "kapa = 45.9e-6 #Isothermal compressibility, /bar\n",
+ "T = 298.15 #Std. Temperature, K\n",
+ "R = 8.206e-2 #Ideal gas constant, atm.L/(mol.K) \n",
+ "T1 = 320.0 #Temperature, K\n",
+ "Pi = 1.0 #Initial Pressure, bar\n",
+ "V = 1.00 #Volume, m3\n",
+ "a = 1.35 #van der Waals constant a for nitrogen, atm.L2/mol2\n",
+ "\n",
+ "#Calculations\n",
+ "dUbydV = Pf = (beta*T1-kapa*P0)/kapa\n",
+ "dVT = V*kapa*(Pf-Pi)\n",
+ "dVbyV = dVT*100/V\n",
+ "Vm = Pi/(R*T1)\n",
+ "dUbydVm = a/(Vm**2)\n",
+ "\n",
+ "#Results \n",
+ "print 'dUbydV = %4.2e bar'%(dUbydV)\n",
+ "print 'dVbyV = %4.3f percent'%(dVbyV)\n",
+ "print 'dUbydVm = %4.0e atm'%(dUbydVm)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.15:pg-155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Internal energy change is 4.06e+04 J/mol in which \n",
+ "contribution of temeprature dependent term 99.9999 percent\n",
+ "Enthalpy change is 4.185e+04 J/mol in which \n",
+ "contribution of temeprature dependent term 100.0 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp, log\n",
+ "\n",
+ "m = 1000.0 #mass of mercury, g\n",
+ "Pi, Ti = 1.00, 300.0 #Intial pressure and temperature, bar, K\n",
+ "Pf, Tf = 300., 600.0 #Final pressure and temperature, bar, K\n",
+ "rho = 13534. #Density of mercury, kg/m3\n",
+ "beta = 18.1e-4 #Thermal exapansion coefficient for Hg, /K \n",
+ "kapa = 3.91e-6 #Isothermal compressibility for Hg, /Pa\n",
+ "Cpm = 27.98 #Molar Specific heat at constant pressure, J/(mol.K) \n",
+ "M = 200.59 #Molecular wt of Hg, g/mol\n",
+ "\n",
+ "#Calculations\n",
+ "Vi = m*1e-3/rho\n",
+ "Vf = Vi*exp(-kapa*(Pf-Pi))\n",
+ "Ut = m*Cpm*(Tf-Ti)/M \n",
+ "Up = (beta*Ti/kapa-Pi)*1e5*(Vf-Vi) + (Vi-Vf+Vf*log(Vf/Vi))*1e5/kapa\n",
+ "dU = Ut + Up\n",
+ "Ht = m*Cpm*(Tf-Ti)/M\n",
+ "Hp = ((1 + beta*(Tf-Ti))*Vi*exp(-kapa*Pi)/kapa)*(exp(-kapa*Pi)-exp(-kapa*Pf))\n",
+ "dH = Ht + Hp\n",
+ "#Results\n",
+ "print 'Internal energy change is %6.2e J/mol in which \\ncontribution of temeprature dependent term %6.4f percent'%(dU,Ut*100/dH)\n",
+ "print 'Enthalpy change is %4.3e J/mol in which \\ncontribution of temeprature dependent term %4.1f percent'%(dH,Ht*100/dH)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.16:pg-156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Difference in molar specific heats \n",
+ "at constant volume and constant pressure 3.73e-03 J/(mol.K)\n",
+ "Molar Specific heat of Hg at const. volume is 27.98 J/(mol.K)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T = 300.0 #Temperature of Hg, K \n",
+ "beta = 18.1e-4 #Thermal exapansion coefficient for Hg, /K \n",
+ "kapa = 3.91e-6 #Isothermal compressibility for Hg, /Pa\n",
+ "M = 0.20059 #Molecular wt of Hg, kg/mol \n",
+ "rho = 13534 #Density of mercury, kg/m3\n",
+ "Cpm = 27.98 #Experimental Molar specif heat at const pressure for mercury, J/(mol.K)\n",
+ "\n",
+ "#Calculations\n",
+ "Vm = M/rho\n",
+ "DCpmCv = T*Vm*beta**2/kapa\n",
+ "Cvm = Cpm - DCpmCv\n",
+ "#Results\n",
+ "print 'Difference in molar specific heats \\nat constant volume and constant pressure %4.2e J/(mol.K)'%DCpmCv\n",
+ "print 'Molar Specific heat of Hg at const. volume is %4.2f J/(mol.K)'%Cvm"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex6.17:pg-158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Molar Gibbs energy of Ar -46.154 kJ/mol\n",
+ "Molar Gibbs energy of Water -306.658 kJ/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "T = 298.15 #Std. Temperature, K \n",
+ "P = 1.0 #Initial Pressure, bar\n",
+ "Hm0, Sm0 = 0.0,154.8 #Std. molar enthalpy and entropy of Ar(g), kJ, mol, K units\n",
+ "Sm0H2, Sm0O2 = 130.7,205.2 #Std. molar entropy of O2 and H2 (g), kJ/(mol.K)\n",
+ "dGfH2O = -237.1 #Gibbs energy of formation for H2O(l), kJ/mol \n",
+ "nH2, nO2 = 1, 1./2 #Stoichiomentric coefficients for H2 and O2 in water formation reaction \n",
+ "\n",
+ "#Calculations\n",
+ "Gm0 = Hm0 - T*Sm0\n",
+ "dGmH2O = dGfH2O*1000 - T*(nH2*Sm0H2 + nO2*Sm0O2)\n",
+ "#Results\n",
+ "print 'Molar Gibbs energy of Ar %4.3f kJ/mol'%(Gm0/1e3)\n",
+ "print 'Molar Gibbs energy of Water %4.3f kJ/mol'%(dGmH2O/1e3)"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter07.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter07.ipynb
new file mode 100644
index 00000000..bb478dec
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter07.ipynb
@@ -0,0 +1,80 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 07: Properties of Real Gases"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex7.3:pg-175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(V-Videal) -6.49 L\n",
+ "Percentage error -58.73\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "import math\n",
+ "m = 1.0 #Mass of Methane, kg\n",
+ "T = 230 #Temeprature of Methane, K\n",
+ "P = 68.0 #Pressure, bar \n",
+ "Tc = 190.56 #Critical Temeprature of Methane\n",
+ "Pc = 45.99 #Critical Pressure of Methane\n",
+ "R = 0.08314 #Ideal Gas Constant, L.bar/(mol.K)\n",
+ "M = 16.04 #Molecular wt of Methane\n",
+ "\n",
+ "#Calcualtions\n",
+ "Tr = T/Tc\n",
+ "Pr = P/Pc\n",
+ "z = 0.63 #Methane compressibility factor\n",
+ "n = m*1e3/M\n",
+ "V = z*n*R*T/P\n",
+ "Vig = n*R*T/P\n",
+ "DV = (V - Vig)/V\n",
+ "\n",
+ "#Results\n",
+ "print '(V-Videal) %4.2f L'%(V-Vig)\n",
+ "print 'Percentage error %5.2f'%(DV*100)\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter08.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter08.ipynb
new file mode 100644
index 00000000..860afddf
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter08.ipynb
@@ -0,0 +1,172 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 08: Phase Diagrams and the Relative Stability of Solids, Liquids, and Gases"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.2:Pg.No-195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Latent heat of vaporization of benzene at 20°C 30.7 kJ/mol\n",
+ "Entropy Change of vaporization of benzene at 20°C 86.9 J/mol\n",
+ "Triple point temperature = 267.3 K for benzene\n",
+ "Triple point pressure = 3.53e+03 Pa for benzene\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log, exp\n",
+ "\n",
+ "import math\n",
+ "Tn = 353.24 #normal boiling point of Benzene, K\n",
+ "pi = 1.19e4 #Vapor pressure of benzene at 20°C, Pa\n",
+ "DHf = 9.95 #Latent heat of fusion, kJ/mol\n",
+ "pv443 = 137. #Vapor pressure of benzene at -44.3°C, Pa\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n",
+ "Pf = 101325 #Std. atmospheric pressure, Pa\n",
+ "T20 = 293.15 #Temperature in K\n",
+ "P0 = 1.\n",
+ "Pl = 10000.\n",
+ "Ts = -44.3 #Temperature of solid benzene, °C\n",
+ "\n",
+ "#Calculations\n",
+ "Ts = Ts + 273.15\n",
+ "#Part a\n",
+ "\n",
+ "DHv = -(R*math.log(Pf/pi))/(1./Tn-1./T20)\n",
+ "#Part b\n",
+ "\n",
+ "DSv = DHv/Tn\n",
+ "DHf = DHf*1e3\n",
+ "#Part c\n",
+ "\n",
+ "Ttp = -DHf/(R*(math.log(Pl/P0)-math.log(pv443/P0)-(DHv+DHf)/(R*Ts)+DHv/(R*T20)))\n",
+ "Ptp = exp(-DHv/R*(1./Ttp-1./Tn))*101325\n",
+ "\n",
+ "#Results\n",
+ "print 'Latent heat of vaporization of benzene at 20°C %4.1f kJ/mol'%(DHv/1000)\n",
+ "print 'Entropy Change of vaporization of benzene at 20°C %3.1f J/mol'%DSv\n",
+ "print 'Triple point temperature = %4.1f K for benzene'%Ttp\n",
+ "print 'Triple point pressure = %4.2e Pa for benzene'%Ptp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.3:Pg.No-200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force exerted by one leg 5.428e-05 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos, pi\n",
+ "\n",
+ "gama = 71.99e-3 #Surface tension of water, N/m\n",
+ "r = 1.2e-4 #Radius of hemisphere, m\n",
+ "theta = 0.0 #Contact angle, rad\n",
+ "\n",
+ "#Calculations\n",
+ "DP = 2*gama*cos(theta)/r\n",
+ "F = DP*pi*r**2\n",
+ "\n",
+ "#Results\n",
+ "print 'Force exerted by one leg %5.3e N'%F"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex8.4:Pg.No-200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Height to which water can rise by capillary action is 0.74 m\n",
+ "This is very less than 100.0 n, hence water can not reach top of tree\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import cos\n",
+ "\n",
+ "\n",
+ "gama = 71.99e-3 #Surface tension of water, N/m\n",
+ "r = 2e-5 #Radius of xylem, m\n",
+ "theta = 0.0 #Contact angle, rad\n",
+ "rho = 997.0 #Density of water, kg/m3\n",
+ "g = 9.81 #gravitational acceleration, m/s2\n",
+ "H = 100 #Height at top of redwood tree, m\n",
+ "\n",
+ "#Calculations\n",
+ "h = 2*gama/(rho*g*r*cos(theta))\n",
+ "\n",
+ "#Results\n",
+ "print 'Height to which water can rise by capillary action is %3.2f m'%h\n",
+ "print 'This is very less than %4.1f n, hence water can not reach top of tree'%H"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter09.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter09.ipynb
new file mode 100644
index 00000000..504b170b
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter09.ipynb
@@ -0,0 +1,468 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 09: Ideal and Real Solutions"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.2:pg-212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Gibbs energy change of mixing is -1.371e+04 J\n",
+ "Gibbs energy change of mixing is < 0, hence the mixing is spontaneous\n",
+ "Entropy change of mixing is 45.99 J/K\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration\n",
+ "nb = 5.00 #Number of moles of Benzene, mol\n",
+ "nt = 3.25 #Number of moles of Toluene, mol\n",
+ "T = 298.15 #Temperature, K\n",
+ "P = 1.0 #Pressure, bar\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n",
+ "\n",
+ "#Calculations\n",
+ "n = nb + nt\n",
+ "xb = nb/n\n",
+ "xt = 1. - xb\n",
+ "dGmix = n*R*T*(xb*log(xb)+xt*log(xt))\n",
+ "dSmix = -n*R*(xb*log(xb)+xt*log(xt))\n",
+ "\n",
+ "#Results\n",
+ "print 'Gibbs energy change of mixing is %4.3e J'%dGmix\n",
+ "print 'Gibbs energy change of mixing is < 0, hence the mixing is spontaneous'\n",
+ "print 'Entropy change of mixing is %4.2f J/K'%dSmix"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.3:pg-214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total pressure of the vapor is 69.8 torr\n",
+ "Benzene fraction in vapor is 0.837 \n",
+ "Toulene fraction in vapor is 0.163 \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "nb = 5.00 #Number of moles of Benzene, mol\n",
+ "nt = 3.25 #Number of moles of Toluene, mol\n",
+ "T = 298.15 #Temperature, K\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n",
+ "P0b = 96.4 #Vapor pressure of Benzene, torr\n",
+ "P0t = 28.9 #Vapor pressure of Toluene, torr\n",
+ "\n",
+ "#Calculations\n",
+ "n = nb + nt\n",
+ "xb = nb/n\n",
+ "xt = 1. - xb\n",
+ "P = xb*P0b + xt*P0t\n",
+ "y = (P0b*P - P0t*P0b)/(P*(P0b-P0t))\n",
+ "yt = 1.-y\n",
+ "\n",
+ "#Results\n",
+ "print 'Total pressure of the vapor is %4.1f torr'%P\n",
+ "print 'Benzene fraction in vapor is %4.3f '%y\n",
+ "print 'Toulene fraction in vapor is %4.3f '%yt"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.4:pg-215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mass Balance: 6.75*x + 1.5*y - 5.0\n",
+ "Pressure and x: P - 67.5*x - 28.9\n",
+ "Pressure and y: y - 0.0148148148148148*(96.4*P - 2785.96)/P\n",
+ "Pressure is 66.8 torr\n",
+ "Mole fraction of benzene in liquid phase 0.561\n",
+ "Mole fraction of benzene in vapor phase 0.810\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import symbols, solve\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "nb = 5.00 #Number of moles of Benzene, mol\n",
+ "nt = 3.25 #Number of moles of Toluene, mol\n",
+ "T = 298.15 #Temperature, K\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n",
+ "P0b = 96.4 #Vapor pressure of Benzene, torr\n",
+ "P0t = 28.9 #Vapor pressure of Toluene, torr\n",
+ "nv = 1.5 #moles vaporized, mol\n",
+ "\n",
+ "#Calculations\n",
+ "n = nb + nt\n",
+ "nl = n - nv\n",
+ "zb = nb/n\n",
+ "\n",
+ "x,y, P = symbols('x y P')\n",
+ "e1 = nv*(y-zb)-nl*(zb-x)\n",
+ "print 'Mass Balance:', e1\n",
+ "e2 = P - (x*P0b + (1-x)*P0t)\n",
+ "print 'Pressure and x:',e2\n",
+ "e3 = y - (P0b*P - P0t*P0b)/(P*(P0b-P0t))\n",
+ "print 'Pressure and y:', e3\n",
+ "equations = [e1,e2,e3]\n",
+ "sol = solve(equations)\n",
+ "\n",
+ "#Results\n",
+ "for i in sol:\n",
+ " if ((i[x] > 0.0 and i[x] <1.0) and (i[P] > 0.0) and (i[y]>zb and i[y]<1.0)):\n",
+ " print 'Pressure is %4.1f torr' %i[P]\n",
+ " print 'Mole fraction of benzene in liquid phase %4.3f' %i[x]\n",
+ " print 'Mole fraction of benzene in vapor phase %4.3f' %i[y]\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.6:pg-222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Freezing point depression -3.94 K\n",
+ "Molecualr wt of solute 274.2 g/mol\n",
+ "Vapor pressure of solvent is reduced by a factor of 0.980\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "import math\n",
+ "m = 4.50 #Mass of substance dissolved, g\n",
+ "ms = 125.0 #Mass of slovent (CCl4), g\n",
+ "TbE = 0.65 #Boiling point elevation, °C\n",
+ "Kf, Kb = 30.0, 4.95 #Constants for freezing point elevation \n",
+ " # and boiling point depression for CCl4, K kg/mol\n",
+ "Msolvent = 153.8 #Molecualr wt of solvent, g/mol\n",
+ "#Calculations\n",
+ "DTf = -Kf*TbE/Kb\n",
+ "Msolute = Kb*m/(ms*1e-3*TbE)\n",
+ "nsolute = m/Msolute\n",
+ "nsolvent = ms/Msolvent \n",
+ "x = 1.0 - nsolute/(nsolute + nsolvent)\n",
+ "\n",
+ "#Results\n",
+ "print 'Freezing point depression %5.2f K'%DTf\n",
+ "print 'Molecualr wt of solute %4.1f g/mol'%Msolute\n",
+ "print 'Vapor pressure of solvent is reduced by a factor of %4.3f'%x"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.7:pg-223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Osmotic pressure 12.23 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "import math\n",
+ "csolute = 0.500 #Concentration of solute, g/L\n",
+ "R = 8.206e-2 #Gas constant L.atm/(mol.K)\n",
+ "T = 298.15 #Temperature of the solution, K\n",
+ "\n",
+ "#Calculations\n",
+ "pii = csolute*R*T\n",
+ "\n",
+ "#Results\n",
+ "print 'Osmotic pressure %4.2f atm'%pii\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.8:pg-230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Activity of CS2 0.6994 atm\n",
+ "Activity coefficinet of CS2 1.9971 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "import math\n",
+ "xCS2 = 0.3502 #Mol fraction of CS2, g/L\n",
+ "pCS2 = 358.3 #Partial pressure of CS2, torr\n",
+ "p0CS2 = 512.3 #Total pressure, torr\n",
+ "\n",
+ "#Calculations\n",
+ "alpha = pCS2/p0CS2\n",
+ "gama = alpha/xCS2\n",
+ "\n",
+ "#Results\n",
+ "print 'Activity of CS2 %5.4f atm'%alpha\n",
+ "print 'Activity coefficinet of CS2 %5.4f atm'%gama"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.9:pg-230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Activity of CS2 0.1783 atm\n",
+ "Activity coefficinet of CS2 0.5090 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "import math\n",
+ "xCS2 = 0.3502 #Mol fraction of CS2, g/L\n",
+ "pCS2 = 358.3 #Partial pressure of CS2, torr\n",
+ "kHCS2 = 2010. #Total pressure, torr\n",
+ "\n",
+ "#Calculations\n",
+ "alpha = pCS2/kHCS2\n",
+ "gama = alpha/xCS2\n",
+ "\n",
+ "#Results\n",
+ "print 'Activity of CS2 %5.4f atm'%alpha\n",
+ "print 'Activity coefficinet of CS2 %5.4f atm'%gama"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.10:pg-231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Henrys constant = 143.38 torr\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "import math\n",
+ "rho = 789.9 #Density of acetone, g/L\n",
+ "n = 1.0 #moles of acetone, mol\n",
+ "M = 58.08 #Molecular wt of acetone, g/mol\n",
+ "kHacetone = 1950 #Henrys law constant, torr\n",
+ "#Calculations\n",
+ "H = n*M*kHacetone/rho\n",
+ "\n",
+ "#Results\n",
+ "print 'Henrys constant = %5.2f torr'%H"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.11:pg-232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Activity coefficient = 0.969\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "import math\n",
+ "m = 0.5 #Mass of water, kg\n",
+ "ms = 24.0 #Mass of solute, g\n",
+ "Ms = 241.0 #Molecular wt of solute, g/mol\n",
+ "Tfd = 0.359 #Freezinf point depression, °C or K\n",
+ "kf = 1.86 #Constants for freezing point depression for water, K kg/mol\n",
+ "\n",
+ "#Calculations\n",
+ "msolute = ms/(Ms*m)\n",
+ "gama = Tfd/(kf*msolute)\n",
+ "\n",
+ "#Results\n",
+ "print 'Activity coefficient = %4.3f'%gama"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex9.12:pg-233"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Number of moles of nitrogen in blood at 1 and 50 bar are 2.46e-03,0.123 mol\n",
+ "Volume of nitrogen released from blood at reduced pressure 2.981 L\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "import math\n",
+ "m = 70.0 #Mass of human body, kg\n",
+ "V = 5.00 #Volume of blood, L\n",
+ "HN2 = 9.04e4 #Henry law constant for N2 solubility in blood, bar\n",
+ "T = 298.0 #Temperature, K\n",
+ "rho = 1.00 #density of blood, kg/L\n",
+ "Mw = 18.02 #Molecualr wt of water, g/mol\n",
+ "X = 80 #Percent of N2 at sea level\n",
+ "p1, p2 = 1.0, 50.0 #Pressures, bar\n",
+ "R = 8.314e-2 #Ideal Gas constant, L.bar/(mol.K)\n",
+ "#Calculations\n",
+ "nN21 = (V*rho*1e3/Mw)*(p1*X/100)/HN2\n",
+ "nN22 = (V*rho*1e3/Mw)*(p2*X/100)/HN2\n",
+ "V = (nN22-nN21)*R*T/p1\n",
+ "#Results\n",
+ "print 'Number of moles of nitrogen in blood at 1 and 50 bar are %3.2e,%3.3f mol'%(nN21,nN22)\n",
+ "print 'Volume of nitrogen released from blood at reduced pressure %4.3f L'%V"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter10.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter10.ipynb
new file mode 100644
index 00000000..2b5ef632
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter10.ipynb
@@ -0,0 +1,71 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Electrolyte Solutions"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex10.2:Pg-252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ionic streangth for NaCl solution is 0.050 and for Na2SO4 solution is 0.150, mol/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "import math\n",
+ "M = 0.050 #Molarity for NaCl and Na2SO4 solution, mol/kg\n",
+ "npa, zpa = 1, 1\n",
+ "nma, zma = 1, 1\n",
+ "npb, zpb = 2, 1\n",
+ "nmb, zmb = 1, 2\n",
+ "\n",
+ "#Calculations\n",
+ "Ia = M*(npa*zpa**2 + nma*zma**2)/2\n",
+ "Ib = M*(npb*zpb**2 + nmb*zmb**2)/2\n",
+ "\n",
+ "#Results\n",
+ "print 'Ionic streangth for NaCl solution is %4.3f and for Na2SO4 solution is %4.3f, mol/kg'%(Ia,Ib)"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter11.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter11.ipynb
new file mode 100644
index 00000000..7f1b328b
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter11.ipynb
@@ -0,0 +1,314 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: Electrochemical Cells, Batteries, and Fuel Cells"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.1:pg-265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The potential of H+/H2 half cell 0.0083 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log, sqrt\n",
+ "\n",
+ "#Variable Declaration\n",
+ "aH = 0.770 #Activity of \n",
+ "fH2 = 1.13 #Fugacity of Hydrogen gas\n",
+ "E0 = 0.0 #Std. electrode potential, V\n",
+ "n = 1.0 #Number of electrons transfered\n",
+ "\n",
+ "#Calculations\n",
+ "E = E0 - (0.05916/n)*log(aH/sqrt(fH2),10)\n",
+ "\n",
+ "#Results\n",
+ "print 'The potential of H+/H2 half cell %5.4f V'%E"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.2:pg-266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.689 1.019\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "E0r1 = -0.877 #Std Electrod potential for Rx2 : Al3+ + 3e- ------> Al (s) \n",
+ "E0r2 = -1.660 #Std Electrod potential for Rx2 : Al3+ + 3e- ------> Al (s)\n",
+ "E0r3 = +0.071 #Std Electrod potential for Rx3 : AgBr (s) + e- ------> Ag(s) +Br- (aq.)\n",
+ "\n",
+ "#Calculations\n",
+ "#3Fe(OH)2 (s)+ 2Al (s) <---------> 3Fe (s) + 6(OH-) + 2Al3+\n",
+ "E0a = 3*E0r1 + (-2)*E0r2\n",
+ "#Fe (s) + 2OH- + 2AgBr (s) -------> Fe(OH)2 (s) + 2Ag(s) + 2Br- (aq.)\n",
+ "E0b = -E0r1 + (2)*E0r3\n",
+ "\n",
+ "#Results\n",
+ "print '%5.3f %5.3f'%(E0a,E0b)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.3:pg-267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "E0 for overall reaction is -0.041 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "E01 = 0.771 #Rx1 : Fe3+ + e- -----> Fe2+\n",
+ "E02 = -0.447 #Rx2 : Fe2+ + 2e- -----> Fe\n",
+ "F = 96485 #Faraday constant, C/mol\n",
+ "n1,n2,n3 = 1.,2.,3.\n",
+ "\n",
+ "#Calculations\n",
+ "dG01 = -n1*F*E01\n",
+ "dG02 = -n2*F*E02\n",
+ " #For overall reaction\n",
+ "dG0 = dG01 + dG02\n",
+ "E0Fe3byFe = -dG0/(n3*F)\n",
+ "\n",
+ "#Results\n",
+ "print 'E0 for overall reaction is %5.3f V'%(E0Fe3byFe)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.4:pg-268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Std. entropy change of reaction from dE0bydT is -2.32e+02 and\n",
+ "Std entropy values is -2.41e+02 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "E01 = +1.36 #Std. electrode potential for Cl2/Cl\n",
+ "dE0bydT = -1.20e-3 #V/K\n",
+ "F = 96485 #Faraday constant, C/mol\n",
+ "n = 2.\n",
+ "S0H = 0.0 #Std. entropy J/(K.mol) for H+ ,Cl-,H2, Cl2 \n",
+ "S0Cl = 56.5\n",
+ "S0H2 = 130.7\n",
+ "S0Cl2 = 223.1\n",
+ "nH, nCl, nH2, nCl2 = 2, 2, -1,-1\n",
+ "#Calculations\n",
+ "dS01 = n*F*dE0bydT\n",
+ "dS02 =nH*S0H + nCl*S0Cl + nH2*S0H2 + nCl2*S0Cl2\n",
+ "\n",
+ "#Results\n",
+ "print 'Std. entropy change of reaction from dE0bydT is %4.2e and\\nStd entropy values is %4.2e V'%(dS01,dS02)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.5:pg-269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Equilibrium constant for reaction is 1.55e+37\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "#Variable Declaration\n",
+ "E0 = +1.10 #Std. electrode potential for Danniel cell, V\n",
+ " #Zn(s) + Cu++ -----> Zn2+ + Cu\n",
+ "T = 298.15 #V/K\n",
+ "F = 96485 #Faraday constant, C/mol\n",
+ "n = 2.\n",
+ "R = 8.314 #Gas constant, J/(mol.K)\n",
+ "\n",
+ "#Calculations\n",
+ "K = exp(n*F*E0/(R*T))\n",
+ "\n",
+ "#Results\n",
+ "print 'Equilibrium constant for reaction is %4.2e'%(K)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.6:pg-269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Equilibrium constant for reaction is 1.57e-10\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "E = +0.29 #Cell emf, V\n",
+ "n = 2.\n",
+ "\n",
+ "#Calculations\n",
+ "Ksp = 10**(-n*E/0.05916)\n",
+ "\n",
+ "#Results\n",
+ "print 'Equilibrium constant for reaction is %4.2e'%(Ksp)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex11.8:pg-272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cell potentials for Zn, Ag, Au are 2.27 V, 0.71 V, and -0.18 V\n",
+ "Zn has positive cell potential of 2.272 V and Can be oxidized bypermangnate ion\n",
+ "Ag has positive cell potential of 0.710 V and Can be oxidized bypermangnate ion\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "E = +1.51 #EMF for reduction of permangnet, V\n",
+ "E01 = -0.7618 #Zn2+ + 2e- --------> Zn (s)\n",
+ "E02 = +0.7996 #Ag+ + e- --------> Ag (s)\n",
+ "E03 = +1.6920 #Au+ + e- --------> Au (s) \n",
+ "\n",
+ "#Calculations\n",
+ "EZn = E - E01\n",
+ "EAg = E - E02\n",
+ "EAu = E - E03\n",
+ "animals = {\"parrot\": 2, \"fish\": 6}\n",
+ "Er = {\"Zn\":EZn,\"Ag\":EAg,\"Au\":EAu}\n",
+ "#Results\n",
+ "print 'Cell potentials for Zn, Ag, Au are %4.2f V, %4.2f V, and %4.2f V'%(EZn, EAg,EAu)\n",
+ "for i in Er:\n",
+ " if Er[i] >0.0:\n",
+ " print '%s has positive cell potential of %4.3f V and Can be oxidized bypermangnate ion' %(i,Er[i])\n",
+ " "
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter12.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter12.ipynb
new file mode 100644
index 00000000..430c21a8
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter12.ipynb
@@ -0,0 +1,484 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12: Probability"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.1:pg-295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of picking up any one ball is 1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Varible declaration\n",
+ "n = range(1,51,1)\n",
+ "Prob = 0\n",
+ "for x in n:\n",
+ " Prob = 1./len(n) + Prob\n",
+ "\n",
+ "#Results\n",
+ "print 'Probability of picking up any one ball is %3.1f'%Prob"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.2:pg-296"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of one (heart)card picked from a std. stack of 52 cards is 1/4\n"
+ ]
+ }
+ ],
+ "source": [
+ "from fractions import Fraction\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "n = 52 #Total cards\n",
+ "nheart = 13 #Number of cards with hearts\n",
+ "\n",
+ "#Calculations\n",
+ "Pe = Fraction(nheart,n)\n",
+ "\n",
+ "#Results\n",
+ "print 'Probability of one (heart)card picked from a std. stack of %d cards is'%n,Pe"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.3:pg-297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total number of Five card arrangment from a deck of 52 cards is 311875200\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "n = 52 #Total cards\n",
+ "import math\n",
+ "#Calculations\n",
+ "TotalM = n*(n-1)*(n-2)*(n-3)*(n-4)\n",
+ "#Results\n",
+ "print 'Total number of Five card arrangment from a deck of 52 cards is %d'%TotalM"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.4:pg-297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Possible spin states for excited state are 4\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "n1 = 2 #Two spin states for 1st electron in orbit 1\n",
+ "n2 = 2 #Two spin states for 2nd electron in orbit 2\n",
+ "\n",
+ "#Calculation\n",
+ "M = n1*n1\n",
+ "\n",
+ "#Results\n",
+ "print 'Possible spin states for excited state are %2d'%M"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.5:pg-298"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum Possible permutations for 5 player to play are 95040\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import factorial\n",
+ "\n",
+ "#Variable Declaration\n",
+ "n = 12 #Total Number of players \n",
+ "j = 5 #Number player those can play match\n",
+ "\n",
+ "#Calculation\n",
+ "P = factorial(n)/factorial(n-j)\n",
+ "\n",
+ "#Results\n",
+ "print 'Maximum Possible permutations for 5 player to play are %8d'%P"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.6:pg-299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum Possible 5-card combinations are 2598960\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import factorial\n",
+ "\n",
+ "#Variable Declaration\n",
+ "n = 52 #Number of cards in std . pack\n",
+ "j = 5 #Number of cards in subset\n",
+ "\n",
+ "#Calculation\n",
+ "C = factorial(n)/(factorial(j)*factorial(n-j))\n",
+ "\n",
+ "#Results\n",
+ "print 'Maximum Possible 5-card combinations are %8d'%C"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.7:pg-300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total number of quantum states are 15\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import factorial\n",
+ "\n",
+ "#Variable Declaration\n",
+ "x = 6 #Number of electrons\n",
+ "n = 2 #Number of states\n",
+ "\n",
+ "#Calculation\n",
+ "P = factorial(x)/(factorial(n)*factorial(x-n))\n",
+ "\n",
+ "#Results\n",
+ "print 'Total number of quantum states are %3d'%P"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.8:pg-301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of getting 25 head out of 50 tossing is 0.112\n",
+ "Probability of getting 10 head out of 50 tossing is 9.124e-06\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import factorial\n",
+ "from fractions import Fraction\n",
+ "\n",
+ "#Variable Declaration\n",
+ "n = 50 #Number of separate experiments\n",
+ "j1 = 25 #Number of sucessful expt with heads up\n",
+ "j2 = 10 #Number of sucessful expt with heads up\n",
+ "\n",
+ "#Calculation\n",
+ "C25 = factorial(n)/(factorial(j1)*factorial(n-j1))\n",
+ "PE25 = Fraction(1,2)**j1\n",
+ "PEC25 = (1-Fraction(1,2))**(n-j1)\n",
+ "P25 = C25*PE25*PEC25\n",
+ "\n",
+ "C10 = factorial(n)/(factorial(j2)*factorial(n-j2))\n",
+ "PE10 = Fraction(1,2)**j2\n",
+ "PEC10 = (1-Fraction(1,2))**(n-j2)\n",
+ "P10 = C10*PE10*PEC10\n",
+ "\n",
+ "#Results\n",
+ "print 'Probability of getting 25 head out of 50 tossing is %4.3f'%(float(P25))\n",
+ "print 'Probability of getting 10 head out of 50 tossing is %4.3e'%(float(P10))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.9:pg-302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " N ln(N!) ln(N!)sterling Error\n",
+ " 10 15.10 13.03 2.08\n",
+ " 50 148.48 145.60 2.88\n",
+ "100 363.74 360.52 3.22\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import factorial, log\n",
+ "#Variable Declaration\n",
+ "N = [10,50,100] #Valures for N\n",
+ "\n",
+ "#Calculations\n",
+ "print ' N ln(N!) ln(N!)sterling Error'\n",
+ "for i in N:\n",
+ " lnN = log(factorial(i))\n",
+ " lnNs = i*log(i)-i\n",
+ " err = abs(lnN-lnNs)\n",
+ " print '%3d %5.2f %5.2f %4.2f'%(i,lnN,lnNs, err)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.10:pg-305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of receiving any card 1/52\n"
+ ]
+ }
+ ],
+ "source": [
+ "from fractions import Fraction\n",
+ "\n",
+ "#Variable Declaration\n",
+ "fi = 1 #Probability of receiving any card\n",
+ "n = 52 #Number od Cards\n",
+ "\n",
+ "#Calculations\n",
+ "sum = 0\n",
+ "for i in range(52):\n",
+ " sum = sum + fi\n",
+ "\n",
+ "Pxi = Fraction(fi,sum)\n",
+ "\n",
+ "#Results\n",
+ "print 'Probability of receiving any card', Pxi"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.11:pg-307"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Sum of Px considering it as discrete function 20.4\n",
+ "Sum of Px considering it as contineous function 19.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "from scipy import integrate\n",
+ "#Variable Declaration\n",
+ "\n",
+ "#Calculations\n",
+ "fun = lambda x: exp(-0.05*x)\n",
+ "Pt = 0\n",
+ "for i in range(0,101):\n",
+ " Pt = Pt + fun(i)\n",
+ " \n",
+ "Ptot = integrate.quad(fun, 0.0, 100.)\n",
+ "\n",
+ "#Results\n",
+ "print 'Sum of Px considering it as discrete function %4.1f'%Pt\n",
+ "print 'Sum of Px considering it as contineous function %4.1f'%Ptot[0]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex12.12:pg-308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "from sympy import Symbol\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "r = Symbol('r') #Radius of inner circle\n",
+ "C = [5,2,0]\n",
+ "#Calculations\n",
+ "A1 = pi*r**2\n",
+ "A2 = pi*(2*r)**2 - A1\n",
+ "A3 = pi*(3*r)**2 - (A1 + A2)\n",
+ "At = A1 + A2 + A3\n",
+ "f1 = A1/At\n",
+ "f2 = A2/At\n",
+ "f3 = A3/At\n",
+ "sf = f1 + f2 + f3\n",
+ "\n",
+ "ns = (f1*C[0]+f2*C[1]+f3*C[2])/sf\n",
+ "\n",
+ "#Results\n",
+ "print 'A1, A2, A3: ', A1,', ', A2,', ', A3\n",
+ "print 'f1, f2, f3: ', f1,f2,f3\n",
+ "print 'Average payout $', round(float(ns),2)"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter13.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter13.ipynb
new file mode 100644
index 00000000..058c9da8
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter13.ipynb
@@ -0,0 +1,286 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13: Boltzmann Distribution"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.1:pg-321"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The observed weight 1.37e+28 compared to 1.01e+29\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import factorial\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "aH = 40 #Number of heads\n",
+ "N = 100 #Total events\n",
+ "\n",
+ "#Calculations\n",
+ "aT = 100 - aH\n",
+ "We = factorial(N)/(factorial(aT)*factorial(aH))\n",
+ "Wexpected = factorial(N)/(factorial(N/2)*factorial(N/2))\n",
+ "\n",
+ "#Results\n",
+ "print 'The observed weight %5.2e compared to %5.2e'%(We,Wexpected)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.2:pg-322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "At maximum value of ln(W)\n",
+ "Values of N1 : 6162, N2: 2676 and N3: 1162 \n",
+ "Maximum value of ln(W)= 9012\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import symbols, diff, log\n",
+ "\n",
+ "#Varialbe declaration\n",
+ "n = 10000 #Total number of particles\n",
+ "\n",
+ "\n",
+ "#Calcualtions\n",
+ "def ster(i):\n",
+ " return i*log(i)-i\n",
+ "\n",
+ "n1, n2, n3, W = symbols('n1 n2 n3 W',positive=True)\n",
+ "\n",
+ "n2 = 5000 - 2*n3\n",
+ "n1 = 10000 - n2 -n3\n",
+ "logW = ster(n) - ster(n1) - ster(n2) - ster(n3) \n",
+ "fun = diff(logW, n3)\n",
+ "dfun = diff(fun, n3)\n",
+ "x0 = 10.0\n",
+ "err = 1.0\n",
+ "while err>0.001:\n",
+ " f = fun.subs(n3,x0)\n",
+ " df = dfun.subs(n3,x0)\n",
+ " xnew = x0 - f/df\n",
+ " err = abs(x0-xnew)/x0\n",
+ " x0 = xnew\n",
+ "\n",
+ "x0 = int(x0)\n",
+ "N2 = n2.subs(n3,x0)\n",
+ "N3 = x0\n",
+ "n1 = n1.subs(n3,x0)\n",
+ "N1 = n1.subs(n2,N2)\n",
+ "lnW = logW.subs(n3,N3)\n",
+ "\n",
+ "#Results\n",
+ "print 'At maximum value of ln(W)'\n",
+ "print 'Values of N1 : %4d, N2: %4d and N3: %4d '%(N1, N2,N3)\n",
+ "print 'Maximum value of ln(W)= %6d'%lnW"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.3:pg-326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of finding an oscillator at energy level of n>3 is 0.048 i.e. 4.8 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "p0 = 0.633 #Probabilities of Energy level 1,2,3 \n",
+ "p1 = 0.233\n",
+ "p2 = 0.086\n",
+ "\n",
+ "#Calculation\n",
+ "p4 = 1. -(p0+p1+p2)\n",
+ "\n",
+ "#Results\n",
+ "print 'Probability of finding an oscillator at energy level of n>3 is %4.3f i.e.%4.1f percent'%(p4,p4*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.4:pg-327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Probability of finding an oscillator at energy level of n>3 is 0.222\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "p0 = 0.394 #Probabilities of Energy level 1,2,3 \n",
+ "p1by2 = 0.239\n",
+ "p2 = 0.145\n",
+ "\n",
+ "#Calculation\n",
+ "p4 = 1. -(p0+p1by2+p2)\n",
+ "\n",
+ "#Results\n",
+ "print 'Probability of finding an oscillator at energy level of n>3 is %4.3f'%(p4)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.5:pg-333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Partition function is 1.577\n",
+ "Probability of occupying the second vibrational state n=2 is 0.085\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "#Variable Declaration\n",
+ "I2 = 208 #Vibrational frequency, cm-1 \n",
+ "T = 298 #Molecular Temperature, K\n",
+ "c = 3.00e10 #speed of light, cm/s\n",
+ "h = 6.626e-34 #Planks constant, J/K\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "#Calculation\n",
+ "q = 1./(1.-exp(-h*c*I2/(k*T)))\n",
+ "p2 = exp(-2*h*c*I2/(k*T))/q\n",
+ "\n",
+ "#Results\n",
+ "print 'Partition function is %4.3f'%(q)\n",
+ "print 'Probability of occupying the second vibrational state n=2 is %4.3f'%(p2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex13.6:pg-334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Occupation Number is 0.999990\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "B = 1.45 #Magnetic field streangth, Teslas \n",
+ "T = 298 #Molecular Temperature, K\n",
+ "c = 3.00e10 #speed of light, cm/s\n",
+ "h = 6.626e-34 #Planks constant, J/K\n",
+ "k = 1.38e-23 #Boltzman constant, J/K \n",
+ "gnbn = 2.82e-26 #J/T\n",
+ "#Calculation\n",
+ "ahpbyahm = math.exp(-gnbn*B/(k*T))\n",
+ "\n",
+ "#Results\n",
+ "print 'Occupation Number is %7.6f'%(ahpbyahm)\n"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter14.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter14.ipynb
new file mode 100644
index 00000000..382b0ea4
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter14.ipynb
@@ -0,0 +1,508 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: Ensemble and Molecular Partition Function"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.1:pg-344"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Difference in energy levels is 3.10e-38 J or 1.56e-15 1/cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declarations\n",
+ "h = 6.626e-34 #Planks constant, J.s\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "c = 3.0e8 #speed of light, m/s\n",
+ "l = 0.01 #Box length, m \n",
+ "n1,n2 = 2,1 #Energy levels states\n",
+ "m = 5.31e-26 #mass of oxygen molecule, kg\n",
+ "\n",
+ "#Calculations \n",
+ "dE = (n1+n2)*h**2/(8*m*l**2)\n",
+ "dEcm = dE/(h*c*1e2)\n",
+ "#Results\n",
+ "print 'Difference in energy levels is %3.2e J or %3.2e 1/cm'%(dE,dEcm)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.2:pg-345"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Thermal wave length is 1.60e-11 m and\n",
+ "Translational partition function is 2.44e+29\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi, sqrt\n",
+ "\n",
+ "#Variable Declarations\n",
+ "h = 6.626e-34 #Planks constant, J.s\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "c = 3.0e8 #speed of light, m/s\n",
+ "v = 1.0 #Volume, L\n",
+ "T = 298.0 #Temeprature of Ar, K\n",
+ "m = 6.63e-26 #Mass of Argon molecule, kg \n",
+ "\n",
+ "#Calculations \n",
+ "GAMA = h/sqrt(2*pi*m*k*T)\n",
+ "v = v*1e-3\n",
+ "qT3D = v/GAMA**3\n",
+ "\n",
+ "#Results\n",
+ "print 'Thermal wave length is %3.2e m and\\nTranslational partition function is %3.2e'%(GAMA,qT3D)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.4:pg-350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Spectrum will be observed at 494 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declarations\n",
+ "import math\n",
+ "h = 6.626e-34 #Planks constant, J.s\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "c = 3.0e8 #speed of light, m/s\n",
+ "\n",
+ "J = 4 #Rotational energy level\n",
+ "B = 8.46 #Spectrum, 1/cm\n",
+ "\n",
+ "#Calculations \n",
+ "T = (2*J+1)**2*h*c*100*B/(2*k)\n",
+ "#Results\n",
+ "print 'Spectrum will be observed at %4.0f K'%(T)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.5:pg-352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rotation partition function of H2 at 1000 is 5.729\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "#Variable Declarations\n",
+ "h = 6.626e-34 #Planks constant, J.s\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "c = 3.0e8 #speed of light, m/s\n",
+ "\n",
+ "B = 60.589 #Spectrum for H2, 1/cm\n",
+ "T = 1000 #Temperture of Hydrogen, K\n",
+ "#Calculations \n",
+ "qR = k*T/(2*h*c*100*B)\n",
+ "qRs = 0.0\n",
+ "#for J in range(101):\n",
+ "# print J\n",
+ "# if (J%2 == 0):\n",
+ "# qRs = qRs + (2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T)\n",
+ "# else:\n",
+ "# qRs = qRs + 3*(2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T))\n",
+ "#print qRs/4\n",
+ "\n",
+ "#Results\n",
+ "print 'Rotation partition function of H2 at %4.0f is %4.3f'%(T,qR)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.6:pg-353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rotation partition function of H2 at 100 K is 928.121\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declarations\n",
+ "import math\n",
+ "\n",
+ "h = 6.626e-34 #Planks constant, J.s\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "c = 3.0e8 #speed of light, m/s\n",
+ "B = 0.0374 #Spectrum for H2, 1/cm\n",
+ "T = 100.0 #Temperture of Hydrogen, K\n",
+ "sigma = 2.\n",
+ "\n",
+ "#Calculations\n",
+ "ThetaR = h*c*100*B/k\n",
+ "qR = T/(sigma*ThetaR)\n",
+ "\n",
+ "#Results\n",
+ "print 'Rotation partition function of H2 at %4.0f K is %4.3f'%(T,qR)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.7:pg-354"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rotation partition function for OCS, ONCI, CH2O at 298 K are 140, 16926, and 712 respectively\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi, sqrt\n",
+ "\n",
+ "\n",
+ "#Variable Declarations\n",
+ "h = 6.626e-34 #Planks constant, J.s\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "c = 3.0e8 #speed of light, m/s\n",
+ "Ba = 1.48 #Spectrum for OCS, 1/cm\n",
+ "Bb = [2.84,0.191,0.179] #Spectrum for ONCI, 1/cm\n",
+ "Bc = [9.40,1.29,1.13] #Spectrum for CH2O, 1/cm\n",
+ "T = 298.0 #Temperture of Hydrogen, K\n",
+ "sigmab = 1\n",
+ "sigmac = 2\n",
+ "\n",
+ "#Calculations\n",
+ "qRa = k*T/(h*c*100*Ba)\n",
+ "qRb = (sqrt(pi)/sigmab)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bb[0])*sqrt(1/Bb[1])*sqrt(1/Bb[2])\n",
+ "qRc = (sqrt(pi)/sigmac)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bc[0])*sqrt(1/Bc[1])*sqrt(1/Bc[2])\n",
+ "\n",
+ "#Results\n",
+ "print 'Rotation partition function for OCS, ONCI, CH2O at %4.0f K are %4.0f, %4.0f, and %4.0f respectively'%(T,qRa,qRb,qRc)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.8:pg-356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vibrational partition function for I2 at 298 and 1000 are 1.58 K and 3.86 respectively\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi, exp\n",
+ "\n",
+ "#Variable Declarations\n",
+ "h = 6.626e-34 #Planks constant, J.s\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "c = 3.0e8 #speed of light, m/s\n",
+ "\n",
+ "Ba = 1.48 #Frequency for OCS, 1/cm\n",
+ "Bb = [2.84,0.191,0.179] #Frequency for ONCI, 1/cm\n",
+ "Bc = [9.40,1.29,1.13] #Frequency for CH2O, 1/cm\n",
+ "T298 = 298.0 #Temperture of Hydrogen, K\n",
+ "T1000 = 1000 #Temperture of Hydrogen, K\n",
+ "nubar = 208\n",
+ "\n",
+ "#Calculations\n",
+ "qv298 = 1./(1.-exp(-h*c*100*nubar/(k*T298)))\n",
+ "qv1000 = 1./(1.-exp(-h*c*100*nubar/(k*T1000)))\n",
+ "\n",
+ "#Results\n",
+ "print 'Vibrational partition function for I2 at %4d and %4d are %4.2f K and %4.2f respectively'%(T298, T1000,qv298, qv1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.9:pg-357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "At 450 1/cm the q = 1.128\n",
+ "At 945 1/cm the q = 1.010\n",
+ "At 1100 1/cm the q = 1.005\n",
+ "Total Vibrational partition function for OClO at 298.0 K is 1.146 respectively\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "#Variable Declarations\n",
+ "h = 6.626e-34 #Planks constant, J.s\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "c = 3.0e8 #speed of light, m/s\n",
+ "\n",
+ "T = 298 #Temeprature, K\n",
+ "nubar = [450, 945, 1100] #Vibrational mode frequencies for OClO, 1/cm\n",
+ "\n",
+ "#Calculations\n",
+ "Qv = 1.\n",
+ "for i in nubar:\n",
+ " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n",
+ " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n",
+ " Qv = Qv*qv\n",
+ "#Results\n",
+ "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.10:pg-359"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vibrational partition function for F2 at 298.0 K is 10.508\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "#Variable Declarations\n",
+ "h = 6.626e-34 #Planks constant, J.s\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "c = 3.0e8 #speed of light, m/s\n",
+ "T = 298 #Temeprature, K\n",
+ "nubar = 917 #Vibrational mode frequencies for F2, 1/cm\n",
+ "\n",
+ "#Calculations\n",
+ "ThetaV = h*c*100*nubar/k\n",
+ "Th = 10*ThetaV\n",
+ "qv = 1/(1.-exp(-ThetaV/Th))\n",
+ "\n",
+ "#Results\n",
+ "print 'Vibrational partition function for F2 at %4.1f K is %4.3f'%(T, qv)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.11:pg-360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "At 1388 1/cm the q = 1.157\n",
+ "At 667 1/cm the q = 1.619\n",
+ "At 667 1/cm the q = 1.619\n",
+ "At 2349 1/cm the q = 1.035\n",
+ "Total Vibrational partition function for OClO at 1000.0 K is 3.139\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "#Variable Declarations\n",
+ "h = 6.626e-34 #Planks constant, J.s\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "c = 3.0e8 #speed of light, m/s\n",
+ "T = 1000 #Temeprature, K\n",
+ "nubar = [1388, 667.4,667.4,2349] #Vibrational mode frequencies for CO2, 1/cm\n",
+ "\n",
+ "#Calculations\n",
+ "Qv = 1.\n",
+ "for i in nubar:\n",
+ " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n",
+ " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n",
+ " Qv = Qv*qv\n",
+ "#Results\n",
+ "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex14.12:pg-363"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Electronic partition function for F2 at 298.0 K is 9.45\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "#Variable Declarations\n",
+ "h = 6.626e-34 #Planks constant, J.s\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "c = 3.0e8 #speed of light, m/s\n",
+ "T = 298. #Temeprature, K\n",
+ "n = [0,1,2,3,4,5,6,7,8] #Energy levels\n",
+ "E0 = [0,137.38,323.46,552.96,2112.28,2153.21,2220.11,2311.36,2424.78] #Energies, 1/cm\n",
+ "g0 = [4,6,8,10,2,4,6,8,10]\n",
+ "\n",
+ "#Calculations\n",
+ "qE = 0.0\n",
+ "for i in range(9):\n",
+ " a =g0[i]*exp(-h*c*100*E0[i]/(k*T))\n",
+ " qE = qE + a\n",
+ "\n",
+ "#Results\n",
+ "print 'Electronic partition function for F2 at %4.1f K is %4.2f'%(T, qE)"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter15.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter15.ipynb
new file mode 100644
index 00000000..bfc29594
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter15.ipynb
@@ -0,0 +1,221 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 15: Statistical Thermodyanamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.2:pg-374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "For Internal energy to be 1000.0 J temperature will be 449.0 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration\n",
+ "U = 1.00e3 #Total internal energy, J\n",
+ "hnu = 1.00e-20 #Energy level separation, J\n",
+ "NA = 6.022e23 #Avagadro's Number, 1/mol\n",
+ "k = 1.38e-23 #Boltzmann constant, J/K\n",
+ "n = 1 #Number of moles, mol\n",
+ "\n",
+ "#Calcualtions\n",
+ "T = hnu/(k*log(n*NA*hnu/U-1.))\n",
+ "\n",
+ "#Results\n",
+ "print 'For Internal energy to be %4.1f J temperature will be %4.1f K'%(U,T)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.3:pg-378"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Energy of excited state is 1.57e-19 J\n",
+ "Electronic partition function qE is 3.000e+00\n",
+ "Electronic contribution to internal enrgy is 3.921e-06 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "#Variable Declaration\n",
+ "g0 = 3.0 #Ground State partition function\n",
+ "labda = 1263e-9 #Wave length in nm\n",
+ "T = 500. #Temperature, K\n",
+ "c = 3.00e8 #Speed of light, m/s\n",
+ "NA = 6.022e23 #Avagadro's Number, 1/mol\n",
+ "k = 1.38e-23 #Boltzmann constant, J/K\n",
+ "n = 1.0 #Number of moles, mol\n",
+ "h = 6.626e-34 #Planks's Constant, J.s\n",
+ "\n",
+ "#Calcualtions\n",
+ "beta = 1./(k*T)\n",
+ "eps = h*c/labda\n",
+ "qE = g0 + exp(-beta*eps)\n",
+ "UE = n*NA*eps*exp(-beta*eps)/qE\n",
+ "\n",
+ "#Results\n",
+ "print 'Energy of excited state is %4.2e J'%eps\n",
+ "print 'Electronic partition function qE is %4.3e'%qE\n",
+ "print 'Electronic contribution to internal enrgy is %4.3e J'%UE"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.5:pg-387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Thermal wave lengths for Ne is 2.25e-11 m3\n",
+ "Std. Molar entropy for Ne is 145.46 J/(mol.K)\n",
+ "Thermal wave lengths for Kr is 1.11e-11 m3\n",
+ "Std. Molar entropy for Kr is 163.18 J/(mol.K)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log, pi, sqrt\n",
+ "\n",
+ "#Variable Declaration\n",
+ "Mne = 0.0201797 #Molecular wt of ne, kg/mol \n",
+ "Mkr = 0.0837980 #Molecular wt of kr, kg/mol\n",
+ "Vmne = 0.0224 #Std. state molar volume of ne, m3\n",
+ "Vmkr = 0.0223 #Std. state molar volume of kr, m3\n",
+ "h = 6.626e-34 #Planks's Constant, J.s\n",
+ "NA = 6.022e23 #Avagadro's Number, 1/mol\n",
+ "k = 1.38e-23 #Boltzmann constant, J/K\n",
+ "T = 298 #Std. state temeprature,K \n",
+ "R = 8.314 #Ideal gas constant, J/(mol.K)\n",
+ "n = 1.0 #Number of mole, mol\n",
+ "\n",
+ "#Calcualtions\n",
+ "mne = Mne/NA\n",
+ "mkr = Mkr/NA\n",
+ "Labdane = sqrt(h**2/(2*pi*mne*k*T))\n",
+ "Labdakr = sqrt(h**2/(2*pi*mkr*k*T))\n",
+ "Sne = 5.*R/2 + R*log(Vmne/Labdane**3)-R*log(NA)\n",
+ "Skr = 5.*R/2 + R*log(Vmkr/Labdakr**3)-R*log(NA)\n",
+ "\n",
+ "#Results\n",
+ "print 'Thermal wave lengths for Ne is %4.2e m3'%Labdane\n",
+ "print 'Std. Molar entropy for Ne is %4.2f J/(mol.K)'%Sne\n",
+ "print 'Thermal wave lengths for Kr is %4.2e m3'%Labdakr\n",
+ "print 'Std. Molar entropy for Kr is %4.2f J/(mol.K)'%Skr"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex15.8:pg-392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Thermal wave lengths for Ne is 4.09e-33 m3\n",
+ "The Gibbs energy for 1 mol of Ar is -39.97 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log, pi\n",
+ "\n",
+ "#Variable Declaration\n",
+ "M = 0.040 #Moleculat wt of Ar, kg/mol\n",
+ "h = 6.626e-34 #Planks's Constant, J.s\n",
+ "NA = 6.022e23 #Avagadro's Number, 1/mol\n",
+ "k = 1.38e-23 #Boltzmann constant, J/K\n",
+ "T = 298.15 #Std. state temeprature,K \n",
+ "P = 1e5 #Std. state pressure, Pa\n",
+ "R = 8.314 #Ideal gas constant, J/(mol.K)\n",
+ "n = 1.0 #Number of mole, mol\n",
+ "\n",
+ "#Calcualtions\n",
+ "m = M/NA\n",
+ "Labda3 = (h**2/(2*pi*m*k*T))**(3./2)\n",
+ "G0 = -n*R*T*log(k*T/(P*Labda3))\n",
+ "\n",
+ "#Results\n",
+ "print 'Thermal wave lengths for Ne is %4.2e m3'%Labda3\n",
+ "print 'The Gibbs energy for 1 mol of Ar is %6.2f kJ'%(G0/1000)"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter16.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter16.ipynb
new file mode 100644
index 00000000..cfc07351
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter16.ipynb
@@ -0,0 +1,287 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16: Kinetic Theory of Gases"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.1:pg-407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Most probable speed of Ne and Krypton at 298 K are 498, 244 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n",
+ "T = 298 #Temperatureof Gas, K\n",
+ "MNe = 0.020 #Molecular wt of Ne, kg/mol\n",
+ "MKr = 0.083 #Molecular wt of Kr, kg/mol\n",
+ "\n",
+ "#Calculations\n",
+ "vmpNe = sqrt(2*R*T/MNe)\n",
+ "vmpKr = sqrt(2*R*T/MKr)\n",
+ "\n",
+ "#Results\n",
+ "print 'Most probable speed of Ne and Krypton at 298 K are %4.0f, %4.0f m/s'%(vmpNe,vmpKr)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.2:pg-411"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum, average, root mean square speed of Ar\n",
+ "at 298 K are 352, 397, 431 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n",
+ "T = 298 #Temperatureof Gas, K\n",
+ "M = 0.040 #Molecular wt of Ar, kg/mol\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "vmp = sqrt(2*R*T/M)\n",
+ "vave = sqrt(8*R*T/(M*pi))\n",
+ "vrms = sqrt(3*R*T/M)\n",
+ "\n",
+ "#Results\n",
+ "print 'Maximum, average, root mean square speed of Ar\\nat 298 K are %4.0f, %4.0f, %4.0f m/s'%(vmp,vave,vrms)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.4, Page Numbe 413"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Number of Collisions 2.45e+27 per s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n",
+ "T = 298 #Temperature of Gas, K\n",
+ "M = 0.040 #Molecular wt of Ar, kg/mol\n",
+ "P = 101325 #Pressure, N/m2\n",
+ "NA = 6.022e23 #Number of particles per mol\n",
+ "V = 1.0 #Volume of Container, L\n",
+ "\n",
+ "#Calculations\n",
+ "Zc = P*NA/sqrt(2*pi*R*T*M)\n",
+ "Nc = Zc*V \n",
+ "#Results\n",
+ "print 'Number of Collisions %4.2e per s'%(Nc)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.5:pg-414"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure after 1 hr of effusion is 9.996e-03 Pa\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt, pi,exp\n",
+ "\n",
+ "#Variable Declaration\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n",
+ "T = 298 #Temperature of Gas, K\n",
+ "M = 0.040 #Molecular wt of Ar, kg/mol\n",
+ "P0 = 1013.25 #Pressure, N/m2\n",
+ "NA = 6.022e23 #Number of particles per mol\n",
+ "V = 1.0 #Volume of Container, L\n",
+ "k = 1.38e-23 #Boltzmann constant, J/K\n",
+ "t = 3600 #time of effusion, s\n",
+ "A = 0.01 #Area, um2\n",
+ "\n",
+ "#Calculations\n",
+ "A = A*1e-12\n",
+ "V = V*1e-3\n",
+ "expo = (A*t/V)*(k*T/(2*pi*M/NA))\n",
+ "P = P0*exp(-expo)\n",
+ "#Results\n",
+ "print 'Pressure after 1 hr of effusion is %4.3e Pa'%(P/101325)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.6:pg-417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Single particle collisional frequency is 6.9e+09 per s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt, pi\n",
+ "\n",
+ "#Variable Declaration\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n",
+ "T = 298 #Temperature of Gas, K\n",
+ "M = 0.044 #Molecular wt of CO2, kg/mol\n",
+ "P = 101325 #Pressure, N/m2\n",
+ "NA = 6.022e23 #Number of particles per mol\n",
+ "sigm = 5.2e-19 #m2\n",
+ "\n",
+ "#Calculations\n",
+ "zCO2 = (P*NA/(R*T))*sigm*sqrt(2)*sqrt(8*R*T/(pi*M)) \n",
+ "#Results\n",
+ "print 'Single particle collisional frequency is %4.1e per s'%(zCO2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex16.7:pg-417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Collisional frequency is 3.14e+34 m-3s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt, pi\n",
+ "\n",
+ "#Variable Declaration\n",
+ "R = 8.314 #Ideal Gas Constant, J/(mol.K)\n",
+ "T = 298 #Temperature of Gas, K\n",
+ "MAr = 0.04 #Molecular wt of Ar, kg/mol\n",
+ "MKr = 0.084 #Molecular wt of Kr, kg/mol\n",
+ "pAr = 360 #Partial Pressure Ar, torr\n",
+ "pKr = 400 #Partial Pressure Kr, torr\n",
+ "rAr = 0.17e-9 #Hard sphere radius of Ar, m\n",
+ "rKr = 0.20e-9 #Hard sphere radius of Kr, m\n",
+ "NA = 6.022e23 #Number of particles per mol\n",
+ "k = 1.38e-23 #Boltzmann constant, J/K\n",
+ "\n",
+ "#Calculations\n",
+ "pAr = pAr*101325/760\n",
+ "pKr = pKr*101325/760\n",
+ "p1 = pAr*NA/(R*T)\n",
+ "p2 = pKr*NA/(R*T)\n",
+ "sigm = pi*(rAr+rKr)**2\n",
+ "mu = MAr*MKr/((MAr+MKr)*NA)\n",
+ "p3 = sqrt(8*k*T/(pi*mu)) \n",
+ "zArKr = p1*p2*sigm*p3\n",
+ "\n",
+ "#Results\n",
+ "print 'Collisional frequency is %4.2e m-3s-1'%(zArKr)"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter17.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter17.ipynb
new file mode 100644
index 00000000..6d251294
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter17.ipynb
@@ -0,0 +1,508 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 17: Transport Phenomena"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.1:pg-427"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Diffusion coefficient of Argon 1.1e-05 m2/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy import constants\n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration\n",
+ "M = 0.040 #Molecualar wt of Argon, kh/mol\n",
+ "P, T = 101325.0, 298.0 #Pressure and Temperature, Pa, K\n",
+ "sigm = 3.6e-19 #\n",
+ "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n",
+ "N_A = 6.02214129e+23 #mol^-1\n",
+ "#Calculations\n",
+ "DAr = (1./3)*sqrt(8*R*T/(pi*M))*(R*T/(P*N_A*sqrt(2)*sigm))\n",
+ "\n",
+ "#Results\n",
+ "print 'Diffusion coefficient of Argon %3.1e m2/s'%DAr"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.2:pg-428"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ratio of collision cross sections of Helium to Argon 0.790\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration\n",
+ "DHebyAr = 4.0 \n",
+ "MAr, MHe = 39.9, 4.0 #Molecualar wt of Argon and Neon, kg/mol\n",
+ "P, T = 101325.0, 298.0 #Pressure and Temperature, Pa, K\n",
+ "sigm = 3.6e-19 #\n",
+ "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n",
+ "N_A = 6.02214129e+23 #mol^-1\n",
+ "#Calculations\n",
+ "sigHebyAr = (1./DHebyAr)*sqrt(MAr/MHe)\n",
+ "\n",
+ "#Results\n",
+ "print 'Ratio of collision cross sections of Helium to Argon %4.3f'%sigHebyAr"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.3:pg-430"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "rms displacement at 1000 and 10000 is 0.141 and 0.447 m respectively\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration\n",
+ "D = 1.0e-5 #Diffusion coefficient, m2/s \n",
+ "t1 = 1000 #Time, s\n",
+ "t10 = 10000 #Time, s\n",
+ "\n",
+ "#Calculations\n",
+ "xrms1 = sqrt(2*D*t1)\n",
+ "xrms10 = sqrt(2*D*t10)\n",
+ "\n",
+ "#Results\n",
+ "print 'rms displacement at %4d and %4d is %4.3f and %4.3f m respectively'%(t1,t10,xrms1,xrms10)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.4:pg-432"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Time per random walk is 2.045e-11 s or 20.45 ps\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "import math\n",
+ "D = 2.2e-5 #Diffusion coefficient of benzene, cm2/s \n",
+ "x0 = 0.3 #molecular diameter of benzene, nm\n",
+ "\n",
+ "#Calculations\n",
+ "t = (x0*1e-9)**2/(2*D*1e-4)\n",
+ "\n",
+ "#Results\n",
+ "print 'Time per random walk is %4.3e s or %4.2f ps'%(t,t/1e-12)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.5:pg-434"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mean free path 2.627e-07 m and collisional cross section 1.10e-19 m2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration\n",
+ "P = 101325 #Pressure, Pa\n",
+ "kt = 0.0177 #Thermal conductivity, J/(K.m.s)\n",
+ "T = 300.0 #Temperature, K\n",
+ "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n",
+ "sigm = 3.6e-19 #\n",
+ "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n",
+ "NA = 6.02214129e+23 #mol^-1\n",
+ "M = 39.9 #Molecualar wt of Argon and Neon, kg/mol\n",
+ "\n",
+ "#Calculations\n",
+ "CvmbyNA = 3.*k/2\n",
+ "nuavg = sqrt(8*R*T/(pi*M*1e-3))\n",
+ "N = NA*P/(R*T)\n",
+ "labda = 3*kt/(CvmbyNA*nuavg*N)\n",
+ "sigm = 1/(sqrt(2)*N*labda)\n",
+ "\n",
+ "#Results\n",
+ "print 'Mean free path %4.3e m and collisional cross section %4.2e m2'%(labda, sigm)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.6:pg-437"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Collisional cross section 2.74e-19 m2\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration\n",
+ "eta = 227. #Viscosity of Ar, muP\n",
+ "P = 101325 #Pressure, Pa\n",
+ "kt = 0.0177 #Thermal conductivity, J/(K.m.s)\n",
+ "T = 300.0 #Temperature, K\n",
+ "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n",
+ "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n",
+ "NA = 6.02214129e+23 #mol^-1\n",
+ "M = 39.9 #Molecualar wt of Argon and Neon, kg/mol\n",
+ "\n",
+ "#Calculations\n",
+ "nuavg = sqrt(8*R*T/(pi*M*1e-3))\n",
+ "N = NA*P/(R*T)\n",
+ "m = M*1e-3/NA\n",
+ "labda = 3.*eta*1e-7/(nuavg*N*m) #viscosity in kg m s units\n",
+ "sigm = 1./(sqrt(2)*N*labda)\n",
+ "\n",
+ "#Results\n",
+ "print 'Collisional cross section %4.2e m2'%(sigm)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.7:pg-439"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Flow rate is 2.762e-06 m3/s\n",
+ "Cylinder can be used for 4.381e+06 s nearly 50.7 days\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration\n",
+ "m = 22.7 #Mass of CO2, kg\n",
+ "T = 293.0 #Temperature, K\n",
+ "L = 1.0 #length of the tube, m\n",
+ "d = 0.75 #Diameter of the tube, mm\n",
+ "eta = 146 #Viscosity of CO2, muP\n",
+ "p1 = 1.05 #Inlet pressure, atm\n",
+ "p2 = 1.00 #Outlet pressure, atm\n",
+ "atm2pa = 101325 #Conversion for pressure from atm to Pa \n",
+ "M = 0.044 #Molecular wt of CO2, kg/mol\n",
+ "R = 8.314 #Molar Gas constant, J mol^-1 K^-1\n",
+ "\n",
+ "#Calculations\n",
+ "p1 = p1*atm2pa\n",
+ "p2 = p2*atm2pa\n",
+ "F = pi*(d*1e-3/2)**4*(p1**2-p2**2)/(16.*eta/1.e7*L*p2)\n",
+ "nCO2 = m/M\n",
+ "v = nCO2*R*T/((p1+p2)/2)\n",
+ "t = v/F\n",
+ "\n",
+ "#Results\n",
+ "print 'Flow rate is %4.3e m3/s'%(F)\n",
+ "print 'Cylinder can be used for %4.3e s nearly %3.1f days'%(t, t/(24*3600))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.8:pg-441"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Radius of protein is 3.550 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration\n",
+ "eta = 0.891 #Viscosity of hemoglobin in water, cP\n",
+ "T = 298.0 #Temperature, K\n",
+ "k = 1.3806488e-23 #Boltzmanconstant,J K^-1\n",
+ "R = 8.314 #Molar Gas constant, mol^-1 K^-1\n",
+ "D = 6.9e-11 #Diffusion coefficient, m2/s \n",
+ "\n",
+ "#Calculations\n",
+ "r = k*T/(6*pi*eta*1e-3*D)\n",
+ "\n",
+ "#Results\n",
+ "print 'Radius of protein is %4.3f nm'%(r/1e-9)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.9:pg-442"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Radius of Lysozyme particle is 1.937 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration\n",
+ "s = 1.91e-13 #Sedimentation constant, s\n",
+ "NA = 6.02214129e+23 #mol^-1\n",
+ "M = 14100.0 #Molecualr wt of lysozyme, g/mol\n",
+ "rho = 0.998 #Density of water, kg/m3\n",
+ "eta = 1.002 #Viscosity lysozyme in water, cP\n",
+ "T = 293.15 #Temperature, K\n",
+ "vbar = 0.703 #Specific volume of cm3/g\n",
+ "\n",
+ "#Calculations\n",
+ "m = M/NA\n",
+ "f = m*(1.-vbar*rho)/s\n",
+ "r = f/(6*pi*eta)\n",
+ "\n",
+ "#Results\n",
+ "print 'Radius of Lysozyme particle is %4.3f nm'%(r/1e-9)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.10:pg-443"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAETCAYAAAAVhSD9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4lOW9//H3F2lcqlCXU5SAEINbUVBQREGJCwrYymnP\nUq22im3FBVFxrb3yKz2prfZYXIqniFKXqgWXKlTREsW4YNkKAWQRiIFCIigqm1YCyff3x/0g0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7XqPi+7v\nA/wjGncSYW8YgPOBN8yse/T4RHd/CXjLzA41s86Jb9CA1+mW+N5J4wcBk83stJR9YpEmUGERqYeZ\ndTezmwhfS33HzP6NMC+5hh1fhR0HvBndPh54Pbq9AuhP2NzraaCbmQ0i7MrZirCZVqLdvc6CpPdO\nHL+ZsH1sdVM+r0iqaKMvkRiYWT93fyPuHCLNQR2LSDySJ/9FsoY6FhERSSl1LCIiklIqLCIiklIq\nLCIiklIqLCIiklIqLCIiklIqLCIiklIqLCIiklIqLCIiklL/H8qUwV6V+bCZAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x9adf8d0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Slope is 3.78e-04 1/min or 6.299e-06 1/s \n",
+ "Sedimentation factor is 1.899e-13 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange,array,ones,linalg,log, exp, size\n",
+ "from matplotlib.pylab import plot,show,xlabel,ylabel\n",
+ "import math\n",
+ "%matplotlib inline\n",
+ "\n",
+ "#Variable Declaration\n",
+ "t = array([0.0,30.0,60.0,90.0,120.0,150.0]) #Time, min\n",
+ "xb = array([6.00,6.07,6.14,6.21,6.28,6.35]) #Location of boundary layer, cm\n",
+ "rpm = 55000. #RPM of centrifuge \n",
+ "\n",
+ "#Calculations\n",
+ "nx = xb/xb[0]\n",
+ "lnx = log(nx)\n",
+ "A = array([ t, ones(size(t))])\n",
+ "# linearly generated sequence\n",
+ "[slope, intercept] = linalg.lstsq(A.T,lnx)[0] # obtaining the parameters\n",
+ "# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook\n",
+ "# plotting the line\n",
+ "line = slope*t+intercept # regression line\n",
+ "\n",
+ "#Results\n",
+ "plot(t,line,'-',t,lnx,'o')\n",
+ "xlabel('$ Time, min $')\n",
+ "ylabel('$ \\log(x_b/x_{b0}) $')\n",
+ "show()\n",
+ "sbar = (slope/60)/(rpm*2*pi/60)**2\n",
+ "print 'Slope is %6.2e 1/min or %4.3e 1/s '%(slope, slope/60)\n",
+ "print 'Sedimentation factor is %4.3e s'%(sbar)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex17.11:pg-449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Molar conductivity of MgCl2 on infinite dilution is 0.0258 S.m2/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "LMg = 0.0106 #Ionic conductance for Mg, S.m2/mol\n",
+ "LCl = 0.0076 #Ionic conductance for Cl, S.m2/mol\n",
+ "nMg, nCl = 1, 2 #Coefficients of Mg and Cl \n",
+ "\n",
+ "#Calculations\n",
+ "LMgCl2 = nMg*LMg + nCl*LCl\n",
+ "\n",
+ "#Results\n",
+ "print 'Molar conductivity of MgCl2 on infinite dilution is %5.4f S.m2/mol'%(LMgCl2)"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter18.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter18.ipynb
new file mode 100644
index 00000000..887d09f2
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter18.ipynb
@@ -0,0 +1,419 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 18: Elementary Chemical Kinetics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.2:pg-461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Order of reaction with respect to reactant A: 2.00\n",
+ "Order of reaction with respect to reactant A: 1.00\n",
+ "Rate constant of the reaction: 3.201e+08 1./(M.s)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration\n",
+ "Ca0 = [2.3e-4,4.6e-4,9.2e-4] #Initial Concentration of A, M\n",
+ "Cb0 = [3.1e-5,6.2e-5,6.2e-5] #Initial Concentration of B, M\n",
+ "Ri = [5.25e-4,4.2e-3,1.68e-2] #Initial rate of reaction, M\n",
+ "\n",
+ "#Calculations\n",
+ "alp = log(Ri[1]/Ri[2])/log(Ca0[1]/Ca0[2])\n",
+ "beta = (log(Ri[0]/Ri[1]) - 2*log((Ca0[0]/Ca0[1])))/(log(Cb0[0]/Cb0[1]))\n",
+ "k = Ri[2]/(Ca0[2]**2*Cb0[2]**beta)\n",
+ "\n",
+ "#REsults\n",
+ "print 'Order of reaction with respect to reactant A: %3.2f'%alp\n",
+ "print 'Order of reaction with respect to reactant A: %3.2f'%beta\n",
+ "print 'Rate constant of the reaction: %4.3e 1./(M.s)'%k"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.3:pg-466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rate constant of the reaction: 3.381e-05 1/s\n",
+ "Timerequire for 60 percent decay of N2O5: 1.511e+04 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration\n",
+ "t1by2 = 2.05e4 #Half life for first order decomposition of N2O5, s\n",
+ "x = 60. #percentage decay of N2O5\n",
+ "\n",
+ "#Calculations\n",
+ "k = log(2)/t1by2\n",
+ "t = -log(x/100)/k\n",
+ "\n",
+ "#REsults\n",
+ "print 'Rate constant of the reaction: %4.3e 1/s'%k\n",
+ "print 'Timerequire for 60 percent decay of N2O5: %4.3e s'%t"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.4:pg-467 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rate constant of the reaction: 1.203e-04 1/s\n",
+ "Timerequire for 60 percent decay of N2O5: 4.245e+03 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration\n",
+ "t1by2 = 5760 #Half life for C14, years\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "k = log(2)/t1by2\n",
+ "t = -log(x/100)/k\n",
+ "\n",
+ "#REsults\n",
+ "print 'Rate constant of the reaction: %4.3e 1/s'%k\n",
+ "print 'Timerequire for 60 percent decay of N2O5: %4.3e s'%t"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.5:pg-472"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Time required for maximum concentration of A: 13.86 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration\n",
+ "kAbykI = 2.0 #Ratio of rate constants\n",
+ "kA = 0.1 #First order rate constant for rxn 1, 1/s \n",
+ "kI = 0.05 #First order rate constant for rxn 2, 1/s \n",
+ "#Calculations\n",
+ "tmax = 1/(kA-kI)*log(kA/kI)\n",
+ "\n",
+ "#Results\n",
+ "print 'Time required for maximum concentration of A: %4.2f s'%tmax"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.7:pg-476"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Percentage of Benzyl Penicillin that under acid catalyzed reaction by path 1: 6.67 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration\n",
+ "T = 22.0 #Temperature of the reaction,°C\n",
+ "k1 = 7.0e-4 #Rate constants for rxn 1, 1/s\n",
+ "k2 = 4.1e-3 #Rate constant for rxn 2, 1/s \n",
+ "k3 = 5.7e-3 #Rate constant for rxn 3, 1/s \n",
+ "#Calculations\n",
+ "phiP1 = k1/(k1+k2+k3)\n",
+ "\n",
+ "#Results\n",
+ "print 'Percentage of Benzyl Penicillin that under acid catalyzed reaction by path 1: %4.2f '%(phiP1*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.8:pg-477"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaMAAAEWCAYAAADLkvgyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmUVNW1x/HvhgZnjIIKNCqTKCKCiIAYsCQhIlFQE0fU\naIyKs4JTjEjHNgkaRY04GzEOUaMhMWL02UZb4oAiCLYgogQ1gsPDCXwOiOz3xymkabuaB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qb8isD2HtnMw7hYkIi9z9fsLCbsPT941ESoKSkci6Wy1ZpKdz\nv1ZPuz2o1TMys/b1tOlLWB0Td/+UsNDb4CzFKZJ4SkYia8nMNjGzs4CdzOwsM9s4/VUKqK7VroeZ\nnQPsChxsZlulJyE8Xud4/YFTgTZm1jZ9vI2BX5vZDrn/i0Ti00qvIlliZqe5+4RGtNvb3Z/KR0wi\nhUI9I5EsSFdAWNjI5hvkMhaRQqSekUgWpB9wnezun8eORaQQKRmJiEh0GqYTEZHolIxERCQ6JSMR\nEYlOyUhERKJTMhIRkeiUjEREJDolIxERiU7JSEREolMyEhGR6P4ffTyAN3dtCVsAAAAASUVORK5C\nYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x9358710>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Slope and intercept are, -6419.8 and 14.45\n",
+ "Pre-exponential factor and Activation energy are 53.37 kJ/mol and 1.88e+06 1/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange,array,ones,linalg,log, exp, size\n",
+ "from matplotlib.pylab import plot, show, xlabel, ylabel\n",
+ "%matplotlib inline\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "T = array([22.7,27.2,33.7,38.0])\n",
+ "k1 = array([7.e-4,9.8e-4,1.6e-3,2.e-3])\n",
+ "R = 8.314 \n",
+ "\n",
+ "#Calculations\n",
+ "T = T +273.15\n",
+ "x = 1./T\n",
+ "y = log(k1)\n",
+ "A = array([ x, ones(size(x))])\n",
+ "# linearly generated sequence\n",
+ "[slope, intercept] = linalg.lstsq(A.T,y)[0] # obtaining the parameters\n",
+ "\n",
+ "# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook\n",
+ "# plotting the line\n",
+ "line = slope*x+intercept # regression line\n",
+ "#Results\n",
+ "plot(x,line,'-',x,y,'o')\n",
+ "xlabel('$ 1/T, K^{-1} $')\n",
+ "ylabel('$ log(k) $')\n",
+ "show()\n",
+ "Ea = -slope*R\n",
+ "A = exp(intercept)\n",
+ "print 'Slope and intercept are, %6.1f and %4.2f'%(slope, intercept)\n",
+ "print 'Pre-exponential factor and Activation energy are %4.2f kJ/mol and %4.2e 1/s'%(Ea/1e3, A)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.9:pg-482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Forward Rate constant is 4.34e+08 1/s\n",
+ "Backward Rate constant is 4.34e+04 1/s\n",
+ "Apperent Rate constant is 4.34e+08 1/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "#Variable Declaration\n",
+ "Ea = 42.e3 #Activation energy for reaction, J/mol\n",
+ "A = 1.e12 #Pre-exponential factor for reaction, 1/s\n",
+ "T = 298.0 #Temeprature, K\n",
+ "Kc = 1.0e4 #Equilibrium constant for reaction\n",
+ "R = 8.314 #Ideal gas constant, J/(mol.K)\n",
+ "#Calculations\n",
+ "kB = A*exp(-Ea/(R*T))\n",
+ "kA = kB*Kc\n",
+ "kApp = kA + kB\n",
+ "\n",
+ "#Results\n",
+ "print 'Forward Rate constant is %4.2e 1/s'%kA\n",
+ "print 'Backward Rate constant is %4.2e 1/s'%kB\n",
+ "print 'Apperent Rate constant is %4.2e 1/s'%kApp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.10:pg-492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Estimated rate 6.4e+13 1/(M.s) is far grater than experimental value of 4.0e+07 1/(M.s), \n",
+ "hence the reaction is not diffusion controlled\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "#Variable Declaration\n",
+ "Dh = 7.6e-7 #Diffusion coefficient of Hemoglobin, cm2/s\n",
+ "Do2 = 2.2e-5 #Diffusion coefficient of oxygen, cm2/s\n",
+ "rh = 35. #Radius of Hemoglobin, °A\n",
+ "ro2 = 2.0 #Radius of Oxygen, °A\n",
+ "k = 4e7 #Rate constant for binding of O2 to Hemoglobin, 1/(M.s)\n",
+ "NA =6.022e23 #Avagadro Number\n",
+ "#Calculations\n",
+ "DA = Dh + Do2\n",
+ "kd = 4*pi*NA*(rh+ro2)*1e-8*DA\n",
+ "\n",
+ "#Results\n",
+ "print 'Estimated rate %4.1e 1/(M.s) is far grater than experimental value of %4.1e 1/(M.s), \\nhence the reaction is not diffusion controlled'%(kd,k)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex18.11:pg-494"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Forward Rate constant is 9.90e+04 1/s\n",
+ "Backward Rate constant is -12.72 1/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log, e\n",
+ "#Variable Declaration\n",
+ "Ea = 104e3 #Activation energy for reaction, J/mol\n",
+ "A = 1.e13 #Pre-exponential factor for reaction, 1/s\n",
+ "T = 300.0 #Temeprature, K\n",
+ "R = 8.314 #Ideal gas constant, J/(mol.K)\n",
+ "h = 6.626e-34 #Plnak constant, Js\n",
+ "c = 1.0 #Std. State concentration, M\n",
+ "k = 1.38e-23 #,J/K\n",
+ "\n",
+ "#Calculations\n",
+ "dH = Ea - 2*R*T\n",
+ "dS = R*log(A*h*c/(k*T*e**2))\n",
+ "\n",
+ "#Results\n",
+ "print 'Forward Rate constant is %4.2e 1/s'%dH\n",
+ "print 'Backward Rate constant is %4.2f 1/s'%dS"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter19.ipynb b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter19.ipynb
new file mode 100644
index 00000000..81a699eb
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/Chapter19.ipynb
@@ -0,0 +1,356 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 19: Complex Reaction Mechanism "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.1:pg-511"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAEQCAYAAACTEVJTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xuc1VW9//HXGxQvGKaVKKg4oih4Q8Jbao6kqJ3yUh5F\nK6VDHhUUL13E+hF4SFPLJDW7mIXXSK28pCEYZywTFAQEARERFAYBFcXEGzCf3x/rC2w5Mzgz7D3f\nPTPv5+MxD/as+X73fu8B5jNrre93LUUEZmZmxdIm7wBmZtayuLCYmVlRubCYmVlRubCYmVlRubCY\nmVlRubCYmVlRbZZ3gHIgyddcm5k1UESotnb3WDIRUZYfw4YNy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zXMYcDjGzYWu6hsoDoi/gzsT+qZ/JW0VXShhcAu2eZskX39\nY/fWiIhlEfG1iHBRsaJxYTFrmBrSdrnrSNpC0tHZ430lnS7pKEnflbS3pP0kHSupt6TzsuN6Z8d8\nr64XiogngK4RMSnbzOz1SNtDH0I22S6pA7CcVFi6AIdmw1sHU/oNr8xq5cJi1jB/Aw7doO10oEpS\nZ9KE/h8j4nFgAfA28B8RMS7SdrttJe0HfBaYCHw628URSbsVPqmkLYH3sk97s34O5z+AxyUdkLU/\nE2mL4d2Bd7JjXFgsNy4sZg0QEXOAX0i6TtIASWeQdogMYCBp1761x94LnAOMLniKCuCdiPg1sApo\nGxErs4n1xzZ4uX2Bf2SP9wP+N3u8gLQV87bAj4EvZ+1PRMS07PLjnsCRxXjPZg3lHSTNikTSlcBV\nWaFoC+xF2mP8hxHxgaTts8cXZ8efQdoqdkVErJZ0VNbTMWvWXFjMiiQbCjuBtH84EfGvbHjrYOBl\nUqH5Y1Zkzib1KGqA8yKiRlLfiBibS3izInJhMTOzovIci5mZFZULi5mZFZULi5mZFZULi5mZFZUL\ni5mZFZULi5mZFZULi5mZFZULi5mZFZULi5mZFdX/B8J/v5b87GuOAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x9aa4048>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Km and k2 are 10.0 mM and 1.1e+05 s-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "from numpy import arange,array,ones,linalg,size\n",
+ "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n",
+ "%matplotlib inline\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ce = 2.3e-9 #Initial value of enzyme concentration, M\n",
+ "r = array([2.78e-5,5.e-5,8.33e-5,1.67e-4])\n",
+ "CCO2 = array([1.25e-3,2.5e-3,5.e-3,20.e-3])\n",
+ "\n",
+ "#Calculations\n",
+ "rinv = 1./r\n",
+ "CCO2inv = 1./CCO2\n",
+ "xlim(0,850)\n",
+ "ylim(0,38000)\n",
+ "xi = CCO2inv\n",
+ "A = array([ CCO2inv, ones(size(CCO2inv))])\n",
+ "# linearly generated sequence\n",
+ "w = linalg.lstsq(A.T,rinv)[0] # obtaining the parameters\n",
+ "slope = w[0]\n",
+ "intercept = w[1]\n",
+ "\n",
+ "line = w[0]*CCO2inv+w[1] # regression line\n",
+ "plot(CCO2inv,line,'r-',CCO2inv,rinv,'o')\n",
+ "xlabel('$ {C_{CO}}_2, mM^{-1} $')\n",
+ "ylabel('$ Rate^{-1}, s/M^{-1} $')\n",
+ "show()\n",
+ "rmax = 1./intercept\n",
+ "k2 = rmax/Ce\n",
+ "Km = slope*rmax\n",
+ "\n",
+ "#Results\n",
+ "print 'Km and k2 are %4.1f mM and %3.1e s-1'%(Km*1e3,k2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.2:pg-517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEWCAYAAACufwpNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH11JREFUeJzt3Xl4VdW5x/HvGwQH2jrUOhCEplEBrViqRlqnoFKnKk6t\nxaJFRa0KVXHAKQ3ctF5HtIqtYq3cXrXcVm8pV8WSWtMWKYooqJgwpigJ1aJCBSdM3vvHOsghJuTk\nZOfsM/w+z5MnZ5+z98mbTcIve6291jJ3R0REJApFcRcgIiL5Q6EiIiKRUaiIiEhkFCoiIhIZhYqI\niERGoSIiIpGJLVTM7FgzqzOzxWY2rpXXzzSzBYmPWWY2MNVjRUQkHhbHOBUzKwIWA0cBjcBc4Hvu\nXpe0z2Cg1t3XmtmxwH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hItIKCya28XI50JS07w1mttTMzjOzS8zsXjP7XNLre5nZDDO7wMyqzeyXZnZh\nYoXFyH4HE1PwjCS/53STLJfzc3+JRM3MdiT853x4G7v0c/c/JW2/AOzm7g8kjr85cfykxOuDCLMg\nb1ye9hZ3X2xma9y9Oaq63f1NM5sf1fuJpEOhItJCYgr8O8zsxDZ2aWqxfTDwYtJ2b2BR0vbixOp6\nAHu7++LE47p0a0wsJrUfYdJDA9a6+xx0lSIxU6iIdEBiCvC5LZ4uA/6QeH03wgp6Uze+6O7zE6/t\nSVgXfOPzC8zsBGDnxMeTwBeBbwM7ANsD9yR23+y5xJonjS1q24WwiNKRwEOd/25FOk6hItIxBySW\nmk02CChNhMbngeNbrPm+URnw/MYNM9sbGOHuwxNLtV4M3A28B/wZ+Iu7f5S4KWCz51orzN3fAr7f\nuW9PpHMUKiIds1nzkpl9BVjh7o+lcGwZ8HTS9g+ARxKP+wDvJvpaDiT0u2wAcPdFLZ8TyVa6+0uk\nbS0DpB+b95VA6E959jMHmn25lfc7iKQrFaAHsCLx+DuEdeEBerQSHq09J5J1FCoiLZhZTzO7DOhv\nZpeZ2XaJl8qBmqT9DgcuAHZJ9GdsfL4X8Kek7f3N7EpgIHCqmX0p8dL9wDGJFRcfdfclZtaXzTv9\nae05kWyllR9FUmRmo919Uvt7gpkd4e5/6eqaRLKNrlREUpAYpd7QgUO27qpaRLKZrlREUmBm3wUe\nb+OuLhFJUKiIiEhk1PwlIiKRUaiIiEhkFCoiIhIZhYqIiERGoSIiIpFRqIiISGQUKiIiEhmFioiI\nREahIiIikfl//rBLh3QxZCwAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x9acd4a8>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Slope and intercept are 0.3449 torr.g/cm3 and 0.0293 g/cm3\n",
+ "K and Vm are 8.48e-02 Torr^-1 and 34.2 cm3/g\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange,array,ones,linalg\n",
+ "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n",
+ "%matplotlib inline\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vads = array([5.98,7.76,10.1,12.35,16.45,18.05,19.72,21.1]) #Adsorption data at 193.5K\n",
+ "P = array([2.45,3.5,5.2,7.2,11.2,12.8,14.6,16.1]) #Pressure, torr\n",
+ "\n",
+ "#Calculations\n",
+ "Vinv = 1./Vads\n",
+ "Pinv =1./P\n",
+ "xlim(0,0.5)\n",
+ "ylim(0,0.2)\n",
+ "A = array([ Pinv, ones(size(Pinv))])\n",
+ "# linearly generated sequence\n",
+ "w = linalg.lstsq(A.T,Vinv)[0] # obtaining the parameters\n",
+ "m = w[0]\n",
+ "c = w[1]\n",
+ "line = m*Pinv+c # regression line\n",
+ "plot(Pinv,line,'r-',Pinv,Vinv,'o')\n",
+ "xlabel('$ 1/P, Torr^{-1} $')\n",
+ "ylabel('$ 1/V_{abs}, cm^{-1}g $')\n",
+ "show()\n",
+ "Vm = 1./c\n",
+ "K = 1./(m*Vm)\n",
+ "\n",
+ "#Results\n",
+ "print 'Slope and intercept are %5.4f torr.g/cm3 and %5.4f g/cm3'%(m,c)\n",
+ "print 'K and Vm are %4.2e Torr^-1 and %3.1f cm3/g'%(K,Vm)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.4:pg-533"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHFRJREFUeJzt3XuUXHWV6PHvjvgMDioIToKGJoBwQURACIjQqIwEVBjH\npaKo8UGiCPhARLm0CZ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zWGorUqlxYl0YgM3+7gcc+fxTDkUpnJSJJqplrIpKkmplEJEk1M4lI\nkmpmEpEk1cwkIkmqmUlEklQzk4gkqWYmEUlSzf4/9Fa7EFJttIoAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0xa641f28>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Slope and intercept are kq = 3.1995e+09 per s and kf = 2.1545e+06 per s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import arange,array,ones,linalg\n",
+ "from matplotlib.pylab import plot,show,xlim,ylim,xlabel,ylabel\n",
+ "%matplotlib inline\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "CBr = array([0.0005,0.001,0.002,0.003,0.005]) #C6Br6 concentration, M\n",
+ "tf = array([2.66e-7,1.87e-7,1.17e-7,8.50e-8,5.51e-8]) #Fluroscence life time, s\n",
+ "\n",
+ "#Calculations\n",
+ "Tfinv = 1./tf\n",
+ "xlim(0,0.006)\n",
+ "ylim(0,2.e7)\n",
+ "A = array([ CBr, ones(size(CBr))])\n",
+ "# linearly generated sequence\n",
+ "[m,c] = linalg.lstsq(A.T,Tfinv)[0] # obtaining the parameters\n",
+ "\n",
+ "line = m*CBr+c # regression line\n",
+ "plot(CBr,line,'r-',CBr,Tfinv,'o')\n",
+ "xlabel('$ Br_6C_6, M $')\n",
+ "ylabel('$ tau_f $')\n",
+ "show()\n",
+ "\n",
+ "#Results\n",
+ "print 'Slope and intercept are kq = %5.4e per s and kf = %5.4e per s'%(m,c)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.5:pg-536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Separation Distance at decreased efficiency 11.53\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy.optimize import root\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "r = 11. #Distance of residue separation, °A\n",
+ "r0 = 9. #Initial Distance of residue separation, °A\n",
+ "EffD = 0.2 #Fraction decrease in eff\n",
+ "\n",
+ "#Calculations\n",
+ "Effi = r0**6/(r0**6+r**6)\n",
+ "Eff = Effi*(1-EffD)\n",
+ "f = lambda r: r0**6/(r0**6+r**6) - Eff\n",
+ "sol = root(f, 12)\n",
+ "rn = sol.x[0]\n",
+ "\n",
+ "#Results\n",
+ "print 'Separation Distance at decreased efficiency %4.2f'%rn"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.6:pg-538"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total photon energy absorbed by sample 2.7e+03 J\n",
+ "Photon energy absorbed at 280 nm is 7.1e-19 J\n",
+ "Total number of photon absorbed by sample 3.8e+21 photones\n",
+ "Overall quantum yield 0.40\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declarations\n",
+ "import math\n",
+ "mr = 2.5e-3 #Moles reacted, mol\n",
+ "P = 100.0 #Irradiation Power, J/s\n",
+ "t = 27 #Time of irradiation, s\n",
+ "h = 6.626e-34 #Planks constant, Js\n",
+ "c = 3.0e8 #Speed of light, m/s\n",
+ "labda = 280e-9 #Wavelength of light, m\n",
+ "\n",
+ "#Calculation\n",
+ "Eabs = P*t\n",
+ "Eph = h*c/labda\n",
+ "nph = Eabs/Eph #moles of photone\n",
+ "phi = mr/6.31e-3\n",
+ "\n",
+ "#Results\n",
+ "print 'Total photon energy absorbed by sample %3.1e J'%Eabs\n",
+ "print 'Photon energy absorbed at 280 nm is %3.1e J'%Eph\n",
+ "print 'Total number of photon absorbed by sample %3.1e photones'%nph\n",
+ "print 'Overall quantum yield %4.2f'%phi"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex19.7:pg-542"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "DGS = 0.111 eV\n",
+ "Rate constant with barrier to electron transfer 2.66e+07 per s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "#Variable Declarations\n",
+ "r = 2.0e9 #Rate constant for electron transfer, per s\n",
+ "labda = 1.2 #Gibss energy change, eV\n",
+ "DG = -1.93 #Gibss energy change for 2-naphthoquinoyl, eV\n",
+ "k = 1.38e-23 #Boltzman constant, J/K\n",
+ "T = 298.0 #Temeprature, K\n",
+ "#Calculation\n",
+ "DGS = (DG+labda)**2/(4*labda)\n",
+ "k193 = r*exp(-DGS*1.6e-19/(k*T))\n",
+ "#Results\n",
+ "print 'DGS = %5.3f eV'%DGS\n",
+ "print 'Rate constant with barrier to electron transfer %3.2e per s'%k193"
+ ]
+ }
+ ],
+ "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.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/15.8.png b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/15.8.png
new file mode 100644
index 00000000..3d698568
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/15.8.png
Binary files differ
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/4.3.png b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/4.3.png
new file mode 100644
index 00000000..f66fbef8
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/4.3.png
Binary files differ
diff --git a/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/9.6.png b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/9.6.png
new file mode 100644
index 00000000..ddd62603
--- /dev/null
+++ b/Thermodynamics,_Statistical_Thermodynamics_and_Kinetics_by_T._Engel_and_P._Reid/screenshots/9.6.png
Binary files differ
diff --git a/f_by_df/1_An_overview_of_C.ipynb b/f_by_df/1_An_overview_of_C.ipynb
new file mode 100644
index 00000000..ecf52ddd
--- /dev/null
+++ b/f_by_df/1_An_overview_of_C.ipynb
@@ -0,0 +1,254 @@
+{
+ "metadata": {
+ "name": "1 An overview of C++"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Ex 1 , Page Number: 14#\\n#This program outputs a string, two integer values, and a double floating-point value. #\ni=10\nj=20\nd=99.101\nprint ('Here are some values : %d %d %2.3f'%(i,j,d))\n ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Here are some values : 10 20 99.101\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Ex 3 , Page Number: 16#\n\n#Variable declaration\ni=100\n\n#Result\nprint('Enter a value: 100')\nprint 'Here\\'s your number: ',i\n\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Enter a value: 100\nHere's your number: 100\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Ex 4 , Page Number 16#\n\n#Variable declaration\ni=10\nf=100.12\ns='Hello World'\n\n#Result\nprint 'Enter an integer,float and string: ',i,f,s\nprint 'Here\\'s your data: ',i,f,s \n ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": " Enter an integer,float and string: 10 100.12 Hello World\nHere's your data: 10 100.12 Hello World\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Ex 5 , Page Number 17#\n\n#Variable declaration\nch='X'\n\n#Result\nprint 'Enter keys,X to stop.'\n\n#while loop\nwhile ch!='X':\n if(ch!='X'): \n print ': ',ch\n else:\n break",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Enter keys,X to stop.\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Ex 1 , Page Number 19#\n\n#Variable declaration\na=199\n\nprint 'Enter number to be tested: ',a\n#if loop\nif a % 2 == 0:\n#Result\n print 'Number is even'\nelse:\n print 'Number is odd'\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Enter number to be tested: 199\nNumber is odd\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Ex 3 ,Page Number 25#\n\n#class declaration\nclass Myclass():\n def __init__(self,c,d):\n self.a = c\n self.b = d\nobj = Myclass(10,99)\nobj.a,obj.b\n\n#Result\nprint obj.a\nprint obj.b",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "10\n99\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Ex 2 , Page Number 30#\n\n#DefiningFunction\ndef sum(a,b):\n return a+b\na=10\nb=40\n\n#Result\nprint 'Enter two numbers: ',a,b\nprint 'Sum is: ',sum(a,b)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Enter two numbers: 10 40\nSum is: 50\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Ex 3 , Page Number 31#\n\n#Variable declaration\ni=5\nprint 'Enter number: ',i\nfact=1\nfor j in range(i):\n fact = fact * (j+1)\n \n#Result\nprint 'Factorial is ',fact\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Enter number: 5\nFactorial is 120\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Ex 4 ,Page Number 32#\n\noutcome = 'false'\n\n#if loop\nif(outcome):\n print 'true'\nelse:\n print 'false'",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "true\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Ex 2 ,Page Number 36#\n\n#Defining function\ndef get_date(day=None, month=None, year=None, as_string=None):\n\tif as_string:\n\t\tprint 'Date:', as_string\n\telse:\n\t\tif not (day and month and year):\n\t\t\traise Exception(\"Invalid Date arguments\")\n\t\tprint \"Date : %d/%d/%d\" % (month, day, year)\n\n\nif __name__ == '__main__':\n\tget_date(as_string=\"3/12/2013\")\n\tget_date(day=12, month=3, year=2013)\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Date: 3/12/2013\nDate : 3/12/2013\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Exercise 1.3 Q3 , Page Number 18#\n\n#Variable declaration\na=4\nb=8\nd=2\nprint 'Enter two numbers: ',a,b\nif a>b:\n min=b\nelse:\n min=a\nfor d in range(d,min):\n if a % d == 0 and b % d == 0: \n break\nif d == min:\n print 'No common denominators ' \nelse:\n print 'The lowest common denominator is ',d\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Enter two numbers: 4 8\nThe lowest common denominator is 2\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Ex 1 , Page Number 34#\n\nprint 'Absolute value of -10: ',abs(-10)\nprint 'Absolute value of -10L: ',abs(-10L)\nprint 'Absolute value of -10.01: ',abs(-10.01)\n\n#Defining function\ndef abs(n):\n print 'In integer abs() '\n \n\ndef abs(n):\n print 'In longs abs() '\n\ndef abs(n):\n print 'In double abs() '\n",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Absolute value of -10: 10\nAbsolute value of -10L: 10\nAbsolute value of -10.01: 10.01\n"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Excercise 1 , Page Number 18#\n\n#Variable declaration\nhours=3\nwage=2000\n\n#Result\nprint 'Enter hours worked: ',hours\n\nprint 'Enter wage per hour: ',wage\nprint 'Pay is: $',wage*hours",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Enter hours worked: 3\nEnter wage per hour: 2000\nPay is: $ 6000\n"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Exercise 2 , Page Number 18#\n\n#Variable declaration\nfeet = 5.0\n\n#If loop\nif(feet == 0.0):\n print 'Wrong inpt.'\nelse:\n print 'Enter feet :',feet\n #Result\n print feet*12,'inches'\n ",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Enter feet : 5.0\n60.0 inches\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Exercise 1.7 Q1 , Page Number 38#\n\nimport math\n\n#Result\nprint 'Square root of 90.34 is : ',math.sqrt(90.34)\nprint 'Square root of 90L is: ',math.sqrt(90L)\nprint 'Square root of 90 is: ',math.sqrt(90)\n\n#Defining functions\ndef sqrt(n):\n print 'computing integer root '\n \n\ndef sqrt(n):\n print 'computing long root '\n\ndef sqrt(n):\n print 'computing double root '",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Square root of 90.34 is : 9.50473566176\nSquare root of 90L is: 9.48683298051\nSquare root of 90 is: 9.48683298051\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Example 3 , Page Number 36#\n\n#Defining functions\ndef f1(a=None,b=None,c=None):\n if a:\n print 'In f1',(a)\n else:\n if not (b and c):\n raise Exception(\"Invalid arguments\")\n print 'In f1',(b,c)\nif __name__ == '__main__':\n\tf1(a=10)\n\tf1(b=10, c=20)",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "In f1 10\nIn f1 (10, 20)\n"
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/f_by_df/screenshots/amit_Das.png b/f_by_df/screenshots/amit_Das.png
new file mode 100644
index 00000000..1789360b
--- /dev/null
+++ b/f_by_df/screenshots/amit_Das.png
Binary files differ
diff --git a/f_by_df/screenshots/amit_Das_2s4uFcV.png b/f_by_df/screenshots/amit_Das_2s4uFcV.png
new file mode 100644
index 00000000..1789360b
--- /dev/null
+++ b/f_by_df/screenshots/amit_Das_2s4uFcV.png
Binary files differ
diff --git a/f_by_df/screenshots/anshul_zMmwiWY.png b/f_by_df/screenshots/anshul_zMmwiWY.png
new file mode 100644
index 00000000..a8cec645
--- /dev/null
+++ b/f_by_df/screenshots/anshul_zMmwiWY.png
Binary files differ
diff --git a/sample_notebooks/RahulJoshi/Chapter_1_An_Overview_of_Heat_Trasnfer.ipynb b/sample_notebooks/RahulJoshi/Chapter_1_An_Overview_of_Heat_Trasnfer.ipynb
new file mode 100644
index 00000000..0cef27c9
--- /dev/null
+++ b/sample_notebooks/RahulJoshi/Chapter_1_An_Overview_of_Heat_Trasnfer.ipynb
@@ -0,0 +1,1396 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 1.1 Page Number 2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat Flow through the surface is 17850.0 W\n",
+ "Temprature Gradient in flow direction -700.0 C/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "T = 100 # temperature of wall 1 in deg celcius\n",
+ "\n",
+ "t = 30 # temperature of wall 2 in deg celcius\n",
+ "\n",
+ "L = 0.1 # distance between the walls in meters\n",
+ "\n",
+ "k = 8.5 # thermal conductivity in W/mK\n",
+ "\n",
+ "A = 3 # area is meters square\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Q = (T-t)/(L/(k*A)) # heat flow rate in (W)\n",
+ "\n",
+ "tempgrad = (-1*Q)/(k*A) # temperature gradient in celcius/meter\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Heat Flow through the surface is\",Q,\"W\")\n",
+ "\n",
+ "print(\"Temprature Gradient in flow direction\",tempgrad,\"C/m\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 1.2 Page Number 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Convective heat transfer rate 1500.0 W\n",
+ "Resistance 0.08 C/W\n",
+ "Temprature Gradient along y direction -3000.0 C/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "T = 160 # temperature of wall 1 in deg celcius\n",
+ "\n",
+ "t = 40 # temperature of wall 2 in deg celcius\n",
+ "\n",
+ "k = 1 # thermal conductivity in W/mK\n",
+ "\n",
+ "h = 25 # Convective heat transfer coefficient W/m2K\n",
+ "\n",
+ "A = 0.5 # area is meters square\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Q = h*A*(T-t) # heat tranfer by convection (W)\n",
+ "\n",
+ "r = 1/(h*A) # resistance (C/W)\n",
+ "\n",
+ "tempgrad = (-1*Q)/(k*A) # temperature gradient in celcius/meter along y\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Convective heat transfer rate \",Q,\"W\")\n",
+ "\n",
+ "print(\"Resistance\",r,\"C/W\")\n",
+ "\n",
+ "print(\"Temprature Gradient along y direction\",tempgrad,\"C/m\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 1.3 Page number 7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat Flow through the surface is 2171.37 W\n",
+ "Resistance 0.0783 K/W\n",
+ "Equivalent thermal coefficient 6.3864 W/m2K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "T = 473 # temperature of wall 1 kelvin\n",
+ "\n",
+ "t = 303 # temperature of wall 2 in kelvin\n",
+ "\n",
+ "sigma = 5.67*10**-8 # Stefen-Boltzmann constant\n",
+ "\n",
+ "F = 0.46 # emmissivity \n",
+ "\n",
+ "A = 2 # area is meters sq\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Q = F*sigma*A*(T**4-t**4) # heat exchange in (W)\n",
+ "\n",
+ "R = (T-t)/Q # Resistance in (K/W)\n",
+ "\n",
+ "hr = 1/(R*A) # equivalent thermal coefficient W/m2K\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Heat Flow through the surface is\",round(Q,2),\"W\")\n",
+ "\n",
+ "print(\"Resistance\",round(R,4),\"K/W\")\n",
+ "\n",
+ "print(\"Equivalent thermal coefficient\",round(hr,4),\"W/m2K\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 1.4 Page number 8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat Received 7092.23 W\n",
+ "T2 = 368.479 K\n",
+ "Temprature on other side of the wall 263.3 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Tinf1 = 500 # temperature of wall 1 Kelvin\n",
+ "\n",
+ "T1 = 400 # temperature of wall 2 in Kelvin\n",
+ "\n",
+ "sigma = 5.67 # Stefen-Boltzmann constant\n",
+ "\n",
+ "h = 50 # Convective heat transfer coefficient W/m2K\n",
+ "\n",
+ "k = 45 # thermal conductivity in W/mK\n",
+ "\n",
+ "L = 0.2 # slab thickness in meters\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Q = sigma*((Tinf1/100)**4 - (T1/100)**4)+ h*(Tinf1-T1) # heat received (W)\n",
+ "\n",
+ "dT = Q*(L/k) # temp gradient (K)\n",
+ "\n",
+ "T2 = T1-dT #\n",
+ "\n",
+ "Tinf2 = 263.3 # temperature on the other side of the wall using trial and error\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Heat Received \",round(Q,3),\"W\")\n",
+ "\n",
+ "print(\"T2 = \",round(T2,3),\"K\")\n",
+ "\n",
+ "print(\"Temprature on other side of the wall\",round(Tinf2,3),\"K\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 1.5 Page number "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rate of change of temperature 0.03984 C/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "T1 = 400 # temperature of wall 1 Kelvin\n",
+ "\n",
+ "T2 = 100 # temperature of wall 2 in Kelvin\n",
+ "\n",
+ "sigma = 5.67*10**-8 # Stefen-Boltzmann constant\n",
+ "\n",
+ "h = 200 # Convective heat transfer coefficient W/m2K\n",
+ "\n",
+ "q = 1.5*10**6 # heat generated in W/m3\n",
+ "\n",
+ "H = 0.3 # height in meters\n",
+ "\n",
+ "r = 0.15 # radius in meters\n",
+ "\n",
+ "rho = 19000 # density in kg/m3\n",
+ "\n",
+ "cp = 118 # specific heat capacity in kJ/kgK\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Sa = 2*3.14*r*H+2*3.14*r**2 # Surface area in meters sq\n",
+ "\n",
+ "Hc = 3.14*r**2*H*rho*cp # heat capacity in J/deg C\n",
+ "\n",
+ "Hg = 3.14*r**2*H*q # Heat generated in W\n",
+ "\n",
+ "Hcon = h*Sa*(T1-T2) # convective heat transfer in W\n",
+ "\n",
+ "Hrad = sigma*Sa*((T1+273)**4 - (T2+273)**4)\n",
+ "\n",
+ "Th = Hg-Hcon-Hrad\n",
+ "\n",
+ "dTbydt = Th/Hc\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Rate of change of temperature \",round(dTbydt,5),\"C/s\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example 1.6 Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "BTU/hrftF = 1.7322 W/mC\n",
+ "BTU/hrft2F = 5.6831 W/m2C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "J = 9.47*10**-4 # Joule to BTU conversion\n",
+ "\n",
+ "m = 39.37 # meter to inch conversion\n",
+ "\n",
+ "kg = 2.2046 # kg to lb conversion\n",
+ "\n",
+ "C = 9/5 # Celcius to Farhenight\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "BTU = 1/J # in Joule\n",
+ "\n",
+ "ft = 12/m # in feet\n",
+ "\n",
+ "a = (BTU/(3600*ft*(5/9))) # in BTU/hrftF\n",
+ "\n",
+ "print(\"BTU/hrftF = \",round(a,4),\"W/mC\")\n",
+ "\n",
+ "b = (BTU/(3600*ft**2*(5/9))) # in BTU/hrftF\n",
+ "\n",
+ "print(\"BTU/hrft2F = \",round(b,4),\"W/m2C\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 1 page Number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Temprature gradient along surface -1111.7 C/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "T1 = 200 # temperature of wall 1 Kelvin\n",
+ "\n",
+ "T2 = 60 # temperature of wall 2 in Kelvin\n",
+ "\n",
+ "sigma = 5.67 # Stefen-Boltzmann constant\n",
+ "\n",
+ "h = 80 # Convective heat transfer coefficient W/m2K\n",
+ "\n",
+ "k = 12 # thermal conductivity in W/mK\n",
+ "\n",
+ "#L = 0.2 # slab thickness in meters\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Q = sigma*(((T1+273)/100)**4 - ((T2+273)/100)**4)+ h*(T1-T2) # heat received (W)\n",
+ "\n",
+ "dTbydx = Q/(-1*k) # temp gradient (K)\n",
+ "\n",
+ "print(\"Temprature gradient along surface\",round(dTbydx,1),\"C/m\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 2 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Temprature only conduction and convection 682.174 C\n",
+ "Temprature only conduction and radiation 1139.148 C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "dTbydx = -9000 # temperature gradient \n",
+ "\n",
+ "T2 = 30 # temperature of wall 2 in C\n",
+ "\n",
+ "sigma = 5.67 # Stefen-Boltzmann constant\n",
+ "\n",
+ "k = -25 # Convective heat transfer coefficient W/mK\n",
+ "\n",
+ "h = 345 # thermal conductivity in W/m2K\n",
+ "\n",
+ "A = 1 # area in meters sq\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "#only conduction and convection\n",
+ "\n",
+ "T11 = k*A*dTbydx/(h*A) + T2\n",
+ "\n",
+ "#only conduction and radiation\n",
+ "\n",
+ "T12 = (((k*A*dTbydx/(sigma)) + ((T2+273)/100)**4)*100**4)**(1/4)-273\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Temprature only conduction and convection \",round(T11,3),\"C\")\n",
+ "\n",
+ "print(\"Temprature only conduction and radiation \",round(T12,3),\"C\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem number 3 Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Wall surface temperature 330.4 K\n",
+ "Heat Generated 2252.765 W/m2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Qc = 2250 # heat conducted in W/m2\n",
+ "\n",
+ "T1 = 303 # temperature of wall 2 in C\n",
+ "\n",
+ "sigma = 5.67 # Stefen-Boltzmann constant\n",
+ "\n",
+ "h = 75 # thermal conductivity in W/m2K\n",
+ "\n",
+ "A = 1 # area in meters sq\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "# taking the approximate value from table 330.4\n",
+ "\n",
+ "Tapprox = 330.4\n",
+ "\n",
+ "Q = h*(Tapprox-T1)+sigma*((Tapprox/100)**4-(T1/100)**4)\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Wall surface temperature \",round(Tapprox,3),\"K\")\n",
+ "\n",
+ "print(\"Heat Generated \",round(Q,3),\"W/m2\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 4 page number 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Wall surface temperature 277.75 K\n",
+ "Heat Generated 65.479 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Hc = 65.5 # heat conducted in W/m\n",
+ "\n",
+ "T1 = 263 # temperature of wall in K\n",
+ "\n",
+ "sigma = 5.67 # Stefen-Boltzmann constant\n",
+ "\n",
+ "h = 4.35 # thermal conductivity in W/m2K\n",
+ "\n",
+ "r = 0.08 # area in meters \n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "# taking the approximate value from table 277.75 K\n",
+ "\n",
+ "Tapprox = 277.75\n",
+ "\n",
+ "Q = h*3.14*r*2*(Tapprox-T1)+sigma*2*3.14*r*((Tapprox/100)**4-(T1/100)**4)\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Wall surface temperature \",round(Tapprox,3),\"K\")\n",
+ "\n",
+ "print(\"Heat Generated \",round(Q,3),\"W\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 5 Page number 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Wall surface temperature 386.1 K\n",
+ "Heat Generated 449.65 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Hc = 450 # heat conducted in W/m\n",
+ "\n",
+ "T1 = 396.4 # temperature of wall in K\n",
+ "\n",
+ "sigma = 5.67 # Stefen-Boltzmann constant\n",
+ "\n",
+ "h = 1.5 # thermal conductivity in W/m2K\n",
+ "\n",
+ "r = 0.08 # area in meters \n",
+ "\n",
+ "A = 4*3.14*0.48**2 # area in meters sq\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "# taking the approximate value from table 386.1 K\n",
+ "\n",
+ "Tapprox = 386.1\n",
+ "\n",
+ "Q = h*A*(T1-Tapprox)+sigma*A*((T1/100)**4-(Tapprox/100)**4)\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Wall surface temperature \",round(Tapprox,3),\"K\")\n",
+ "\n",
+ "print(\"Heat Generated \",round(Q,3),\"W\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 6 Page number 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat Capacity 1000.0 J/C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "dTbydt = 0.5 # Temperature transition in C/s\n",
+ "\n",
+ "Qr = 4000 # Heat Received in J/s\n",
+ "\n",
+ "Qc = 5200 # Heat Convection in J/s\n",
+ "\n",
+ "qdot = 1700 # Heat generated in J/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "HeatCapacity = (Qr-Qc+qdot)/dTbydt\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Heat Capacity \",round(HeatCapacity,3),\"J/C\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 7 page number 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Time rate of temperature change 0.1 C/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "Q = 240 # Heat Received in J/s\n",
+ "\n",
+ "qdot = 100000 # Heat generated in J/m3/s\n",
+ "\n",
+ "rho = 2500 # density in kg/m3\n",
+ "\n",
+ "cp = 0.52*10**3 # heat capacity in kJ/KgK\n",
+ "\n",
+ "a = 0.2 # side of the cube in meters\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "V = a**3\n",
+ "\n",
+ "dTbydt = (Q+qdot*V)/(rho*V*cp)\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Time rate of temperature change \",round(dTbydt,3),\"C/s\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 8 Page Number 15 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat Convected 1309.5 W/m2\n",
+ "Heat Received 1303.428 W/m2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "T1 = 160 # heat conducted in W/m\n",
+ "\n",
+ "T2 = 30 # temperature of wall in K\n",
+ "\n",
+ "sigma = 5.67 # Stefen-Boltzmann constant\n",
+ "\n",
+ "h = 45 # thermal conductivity in W/m2K\n",
+ "\n",
+ "A = 1 # area in meters sq\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "# taking the approximate value from table 332 K\n",
+ "\n",
+ "Tapprox = 332.1 \n",
+ "\n",
+ "Hc = h*A*(Tapprox-(273+T2)) # Heat Convected in W/m2\n",
+ "\n",
+ "Hr = sigma*A*(((T1+273)/100)**4-(Tapprox/100)**4) # Heat received in W/m2\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Heat Convected \",round(Hc,3),\"W/m2\")\n",
+ "\n",
+ "print(\"Heat Received \",round(Hr,3),\"W/m2\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 9 Page number 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total Heat loss case 1 150.6 W\n",
+ "Total Heat loss case 2 81.9 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "T1 = 37 # temperature of body in C\n",
+ "\n",
+ "T21 = 26 # temperature of air in C\n",
+ "\n",
+ "T22 = 5 # temperature of walls in room in C\n",
+ "\n",
+ "sigma = 5.67 # Stefen-Boltzmann constant\n",
+ "\n",
+ "h = 6 # Convective heat transfer coefficient W/m2K\n",
+ "\n",
+ "A = 0.6 # area in meters sq\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Hc = h*A*(T1-T21) # Heat Convected in W/m2\n",
+ "\n",
+ "Hr1 = sigma*A*(((T1+273)/100)**4-((T22+273)/100)**4) # Heat received in W/m2\n",
+ "\n",
+ "Ht1 = Hr1+Hc\n",
+ "\n",
+ "# calculate when temperature is 26C\n",
+ "\n",
+ "Hr2 = sigma*A*(((T1+273)/100)**4 - ((T21+273)/100)**4) # Heat received in W/m2\n",
+ "\n",
+ "Ht2 = Hc+Hr2\n",
+ "\n",
+ "print(\"Total Heat loss case 1\",round(Ht1,1),\"W\")\n",
+ "\n",
+ "print(\"Total Heat loss case 2\",round(Ht2,1),\"W\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 10 Page number 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Net heat Gain 291.1 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "T1 = 37 # temperature of body in C\n",
+ "\n",
+ "T21 = 650 # temperature of air in C\n",
+ "\n",
+ "T22 = 5 # temperature of walls in room in C\n",
+ "\n",
+ "sigma = 5.67 # Stefen-Boltzmann constant\n",
+ "\n",
+ "h = 6 # Convective heat transfer coefficient W/m2K\n",
+ "\n",
+ "A = 0.6 # area in meters sq\n",
+ "\n",
+ "F = 0.01 # fraction of radiation \n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "# Heat loss by convection in W\n",
+ "\n",
+ "Hc = h*A*(T1-T22)\n",
+ "\n",
+ "# Heat Gain by radiation\n",
+ "\n",
+ "Hr = sigma*F*(((T21+273)/100)**4 - ((T1+273)/100)**4) # Heat received in W/m2\n",
+ "\n",
+ "Hnet = Hr-Hc\n",
+ "\n",
+ "print(\"Net heat Gain\",round(Hnet,1),\"W\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 11 Page number 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Equilibrium Temperature = 960.01 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "Q = 1500 # heat dissipation in W\n",
+ "\n",
+ "sigma = 5.67 # stefan-Boltzmann constant\n",
+ "\n",
+ "T2 = 288 # temperature in K\n",
+ "\n",
+ "r = 0.04 # radius in meters\n",
+ "\n",
+ "H = 0.25 # height in meters\n",
+ "\n",
+ "T1 = ((Q/(sigma*3.14*r*H)+(288/100)**4)*100**4)**(1/4)\n",
+ "\n",
+ "print(\"Equilibrium Temperature = \",round(T1,2),\"K\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem number 12 Page number 17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Equilibrium Temperature = 62.0 C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "Hr = 800 # Heat Rate in W/m2\n",
+ "\n",
+ "h1 = 10 # convective heat transfer rate on back of plate in W/m2K\n",
+ "\n",
+ "h2 = 15 # convective heat transfer rate on front of plate in W/m2K\n",
+ "\n",
+ "T2 = 30 # temperature on both sides of the plate\n",
+ "\n",
+ "T = (Hr+h1*30+h2*30)/25\n",
+ "\n",
+ "print(\"Equilibrium Temperature = \",round(T,2),\"C\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem number 13 Page number 17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "temperature of the plate 784.57 K\n",
+ "heat transfer with sheet 19668.31 W\n",
+ "heat transfer without sheet 39336.61 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "T1 = 650 # temperature from one side of the source in C\n",
+ "\n",
+ "T2 = 150 # temperature on other side of the surface in C\n",
+ "\n",
+ "sigma = 5.67 # stefan-boltzmann constant\n",
+ "\n",
+ "T = (((((T1+273)/100)**4 + ((T2+273)/100)**4)/2)*100**4)**(1/4)\n",
+ "\n",
+ "print(\"temperature of the plate\",round(T,2),\"K\")\n",
+ "\n",
+ "Q1 = sigma*(((T1+273)/100)**4 - (T/100)**4)\n",
+ "\n",
+ "print(\"heat transfer with sheet\",round(Q1,2),\"W\")\n",
+ "\n",
+ "Q2 = sigma*(((T1+273)/100)**4 - ((T2+273)/100)**4)\n",
+ "\n",
+ "print(\"heat transfer without sheet\",round(Q2,2),\"W\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 14 Page number 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 83,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "COnvective heat trasnfer rate 375.0 W/m2K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "Tair = 120 # temperature of air in C\n",
+ "\n",
+ "T1 = 42 # temperature of plate 1 in C\n",
+ "\n",
+ "T2 = 30 # temperature of plate 2 in C\n",
+ "\n",
+ "L = 0.01 # length of the slab in meters\n",
+ "\n",
+ "A = 1 # area in meters sq\n",
+ "\n",
+ "k = 22.5 # thermal conductivity in W/mK\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "Q = (T1-T2)/(L/(k*A))\n",
+ "\n",
+ "Tnew = T1+6\n",
+ "\n",
+ "h = Q/(A*(Tair-Tnew))\n",
+ "\n",
+ "print(\"COnvective heat trasnfer rate\",round(h,2),\"W/m2K\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 15 Page number 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 87,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency of the collector when temperature is 32 deg C 47.5 %\n",
+ "Efficiency of the collector when temperature is 45 deg C 75.62 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "T1 = 60 # temperature of the tube in C\n",
+ "\n",
+ "T2 = 32 # temperature of air in C\n",
+ "\n",
+ "h = 15 # convective heat transfer in W/m2K\n",
+ "\n",
+ "A = 1 # area in meters sq\n",
+ "\n",
+ "Qf = 800 # heat flux in W/m2\n",
+ "\n",
+ "Tnew = 45 # new temperature in C\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "Q = h*A*(T1-T2) # heat transfer in W\n",
+ "\n",
+ "eff = ((Qf-Q)/Qf)*100\n",
+ "\n",
+ "print(\"Efficiency of the collector when temperature is 32 deg C\",round(eff,2),\"%\")\n",
+ "\n",
+ "# Heat lost by convection when T = 45 C\n",
+ "\n",
+ "Q2 = h*A*(Tnew-T2) # heat transfer in W\n",
+ "\n",
+ "eff1 = ((Qf-Q2)/Qf)*100 \n",
+ "\n",
+ "print(\"Efficiency of the collector when temperature is 45 deg C\",round(eff1,2),\"%\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 16 Page Number 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 88,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Temperature of the air 428.89 C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "Tg = 40 # temperature of the glass plate in C\n",
+ "\n",
+ "dT = 5 # temperature graditent in C\n",
+ "\n",
+ "L = 0.001 # length in meters\n",
+ "\n",
+ "k = 1.4 # conductive heat transfer coefficient in W/mK\n",
+ "\n",
+ "A = 1 # area in meters sq\n",
+ "\n",
+ "h = 18 # convective heat trasnfer coefficient in W/m2K\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "Q = dT/(L/(k*A))\n",
+ "\n",
+ "Tair = (Q/h)+ Tg\n",
+ "\n",
+ "print(\"Temperature of the air\",round(Tair,2),\"C\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 17 Page number 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 89,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Temperature gradient in the solid -631.58 C/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "h = 30 # Convective heat transfer coefficient in W/m2K\n",
+ "\n",
+ "k = 9.5 # conductive heat trasnfer coefficient in W/mK\n",
+ "\n",
+ "T1 = 260 # temperature of the surface in C\n",
+ "\n",
+ "T2 = 60 # temperature of the air in C\n",
+ "\n",
+ "tempgrad = (h/k)*(T2-T1)\n",
+ "\n",
+ "print(\"Temperature gradient in the solid\",round(tempgrad,2),\"C/m\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 18 Page number 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 90,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Steady state temperature of plate 313.33 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "A = 1 # area in meters sq\n",
+ "\n",
+ "h1 = 100 # convective heat transfer coeffcient in W/m2K\n",
+ "\n",
+ "h2 = 15 # convective heat transfer coeffcient in W/m2K\n",
+ "\n",
+ "# solving by trial and error we get T1 = 313.33 K\n",
+ "\n",
+ "T1 = 313.33 \n",
+ "\n",
+ "print(\"Steady state temperature of plate\",round(T1,2),\"K\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 19 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 91,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Surface temperature 674.39 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "k = -22.5 # conductive heat trasnfer coefficient in W/mK\n",
+ "\n",
+ "tempgrad = -500 # temperature gradient in C/m\n",
+ "\n",
+ "sigma = 5.67 # stefan-boltzmann constant\n",
+ "\n",
+ "Ts = 303 # temperatre of surroundings in K\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "T2 = ((((k*tempgrad)/sigma)+(Ts/100)**4)*100**4)**(1/4)\n",
+ "\n",
+ "print(\"Surface temperature\",round(T2,2),\"K\")\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 20 Page number 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 92,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Surface temperatrue 230.2 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "# variable declaration \n",
+ "\n",
+ "Hc = 2000 # heat generated in W\n",
+ "\n",
+ "r = 1 # radius in meters\n",
+ "\n",
+ "sigma = 5.67 # stefan boltzmann constant\n",
+ "\n",
+ "T2 = 0 # temperate of space in K\n",
+ "\n",
+ "# Calculation \n",
+ "\n",
+ "T = ((Hc/(4*3.14*r**2*sigma))*100**4)**(1/4)\n",
+ "\n",
+ "print(\"Surface temperatrue\",round(T,2),\"K\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Problem 21 page Number 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 93,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Temperature drop through the wall 1.33 C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "Q = 10 # heat flux in W/m2\n",
+ "\n",
+ "A = 1 # area in meters sq\n",
+ "\n",
+ "k = 1.5 # thermal cnductivity in W/mK\n",
+ "\n",
+ "t = 0.2 # wall thockness in m\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "dT = (Q*t)/(k*A)\n",
+ "\n",
+ "print(\"Temperature drop through the wall\",round(dT,2),\"C\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [default]",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.5.2"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 1
+}