summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Boiling_Heat_Transfer.ipynb157
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Combustion_Processes.ipynb227
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Conduction_Heat_Transfer.ipynb421
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Convection_Heat_Transfer1.ipynb264
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/First_Law_of_Thermodynamics.ipynb351
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Gas_Properties_and_Processes.ipynb374
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/README.txt10
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Radiation_Heat_Transfer.ipynb349
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Refrigeration_and_Air_Conditioning.ipynb146
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Second_Law_of_Thermodynamics.ipynb242
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Surface_Tension.ipynb179
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Tem.ipynb238
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Thermodynamic_Definitions_and_Concepts.ipynb175
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/Units_and_Dimensions.ipynb216
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/screenshots/2.pngbin0 -> 42600 bytes
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/screenshots/3.pngbin0 -> 72359 bytes
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/screenshots/Screenshot_from_2016-06-10_16:53:24.pngbin0 -> 72483 bytes
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/viscosity.ipynb290
-rw-r--r--Elements_of_thermal_technology_by_John_H._Seely/work_and_heat.ipynb361
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/1._Introduction_to_Operational_Amplifiers.ipynb220
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/2._Interpretation_of_Data_Sheets_and_Characteristics_of_an_Op-Amp.ipynb196
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/3._An_Op-Amp_with_Negative_Feedback.ipynb414
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/4._The_Practical_Op-Amp.ipynb1035
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/5._Frequency_response_of_an_Op-Amp.ipynb265
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/6._General_Linear_Applications.ipynb876
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/7._Active_Filters_and_Oscillators.ipynb1545
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/8._Comparators_and_Converters.ipynb386
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/9._Specialixed_IC_Applications.ipynb813
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/README.txt10
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/1.pngbin0 -> 14872 bytes
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/2.pngbin0 -> 21712 bytes
-rw-r--r--Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/3.pngbin0 -> 8055 bytes
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Bonding.ipynb503
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Diffusion.ipynb869
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Packing.ipynb398
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Shape_and_Size.ipynb504
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atoms_in_Crystals.ipynb1037
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Band_Theory.ipynb94
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Crystal_Imperfections.ipynb1343
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Dielectric_Properties_of_Materials.ipynb415
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Diffraction_of_Waves_and_Particles_by_Crystals.ipynb1068
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Free_Electrons_in_Crystals.ipynb926
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Lattice_or_Atomic_Vibrations.ipynb231
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Magnetic_Properties_of_Materials.ipynb262
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Optical_Properties_of_Materials.ipynb325
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/README.txt10
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Semiconducting_Properties_of_Materials.ipynb554
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Superconductivity.ipynb269
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Thermal_Properties_of_Materials.ipynb387
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/1.pngbin0 -> 140992 bytes
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/2.pngbin0 -> 78948 bytes
-rw-r--r--Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/3.pngbin0 -> 81975 bytes
52 files changed, 18955 insertions, 0 deletions
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Boiling_Heat_Transfer.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Boiling_Heat_Transfer.ipynb
new file mode 100644
index 00000000..301b16bb
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Boiling_Heat_Transfer.ipynb
@@ -0,0 +1,157 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13: Boiling Heat Transfer"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 13.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transfer coefficient for nucleate boiling (W/m^2 C) = 1.76e+05\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Water at 1 atm is boiled on a brass surface. Using the rohsenow correlation\n",
+ "#determine the heat transfer coefficient for nucleate boiling if the wall \n",
+ "#superheat is 11C?\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "P= 1 \t\t\t\t#atm\n",
+ "dt= 11 \t\t\t\t#C\n",
+ "Csf= 0.006\n",
+ "r= 1./3.\n",
+ "s= 1.\n",
+ "cl= 4.218 \t\t\t#J/gm K\n",
+ "hfg= 2257 \t\t\t#J/gm\n",
+ "Pr= 1.75\n",
+ "ul= 283.1/1000. \t#gm/m s\n",
+ "s= 57.78/1000. \t\t#N/m\n",
+ "pl= 958*1000. \t\t#gm/m^3\n",
+ "pv= 598. \t\t\t#gm/m^3\n",
+ "gc= 1000. \t\t\t#gm m/N s^2\n",
+ "g= 9.8 \t\t\t\t#m/s^2\n",
+ "#CALCULATIONS\n",
+ "p= pl-pv \t\t\t#change in density\n",
+ "q= ((math.pow(((cl*dt)/(hfg*Csf*Pr)),(1/r))*(ul*hfg))/math.pow((gc*s/(g*p)),(0.5))) #Heat transfer rate\n",
+ "h= q/dt \t\t\t#Heat transfer coefficient\n",
+ "#RESULTS\n",
+ "print '%s %.2e' % ('Heat transfer coefficient for nucleate boiling (W/m^2 C) = ',h)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 13.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Condensation heat tranfer coefficient if the tube is vertical (Btu/h ft^2 F) = 758.79\n",
+ " \n",
+ " Condensation heat tranfer coefficient if the tube is horizontally (Btu/h ft^2 F) = 1926.98\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A tube, 1/2 in OD and 5 ft long, is used to condense steam at 6 psia; the\n",
+ "#average temperature of the tube is maintained at 130 F. Determine the \n",
+ "#condensation heat transfer coefficient if the tube is mounted\n",
+ "#(a) vertically and (b) horizontally\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "k= 0.384 \t\t\t\t\t\t\t\t\t\t\t#Btu/hr ft F\n",
+ "Tsat= 170.03 \t\t\t\t\t\t\t\t\t\t#F\n",
+ "hfg= 996.2 \t\t\t\t\t\t\t\t\t\t\t#Btu/lbm\n",
+ "T= 130 \t\t\t\t\t\t\t\t\t\t\t\t#F\n",
+ "l= 5. \t\t\t\t\t\t\t\t\t\t\t\t#ft\n",
+ "P= 6. \t\t\t\t\t\t\t\t\t\t\t\t#psia\n",
+ "g= 4.17*math.pow(10,8) \t\t\t\t\t\t\t\t#ft/h^2\n",
+ "d= 0.042 \t\t\t\t\t\t\t\t\t\t\t#ft\n",
+ "p= 61.2 \t\t\t\t\t\t\t\t\t\t\t#lbm/ft^3\n",
+ "u= 1.05 \t\t\t\t\t\t\t\t\t\t\t#lbm/ft h\n",
+ "#CALCULATIONS\n",
+ "dt= Tsat-T \t\t\t\t\t\t\t\t\t\t\t#Change in temp.\n",
+ "Tf= (Tsat+T)/2. \t\t\t\t\t\t\t\t\t#Average temp.\n",
+ "hc= 0.943*math.pow(((k*k*k*p*p*g*hfg)/(l*u*dt)),(1./4.))\n",
+ "hc1= 0.725*math.pow(((k*k*k*p*p*g*hfg)/(d*u*dt)),(1./4.))\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Condensation heat tranfer coefficient if the tube is vertical (Btu/h ft^2 F) = ',hc)\n",
+ "print '%s %.2f' % (' \\n Condensation heat tranfer coefficient if the tube is horizontally (Btu/h ft^2 F) = ',hc1)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Combustion_Processes.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Combustion_Processes.ipynb
new file mode 100644
index 00000000..7fb09a1d
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Combustion_Processes.ipynb
@@ -0,0 +1,227 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Combustion Processes"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mass of O2 required (lbm) = 96.00\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#If 3 mol carbon are completely burned in a process, determine \n",
+ "#(a) the number of moles of O2 required and\n",
+ "#(b) the mass of O2 required\n",
+ "#initialisation of variables\n",
+ "n= 3 \t\t\t\t#lbm mol\n",
+ "Mo2= 32 \t\t\t#lbm/lbm mol\n",
+ "#CALCULATIONS\n",
+ "m= n*Mo2 \t\t\t#Mass of O2 required\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Mass of O2 required (lbm) = ',m)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Air-fuel ratio (gm air/gm fuel) = 15.12\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Determine the air-fuel ratio on a gram-molal and a mass basis if octane is \n",
+ "#completely burned in the presence of theoretical air\n",
+ "#initialisation of variables\n",
+ "n= 12.5 \t\t\t\t\t#mol\n",
+ "n1= 3.76 \t\t\t\t\t#mol\n",
+ "M= 114 \t\t\t\t\t\t#gm/gm mol\n",
+ "M1= 28.96 \t\t\t\t\t#gm/gm mol\n",
+ "#CALCULATIONS\n",
+ "n2= n*(1+n1) \t\t\t\t#Moles\n",
+ "m= n2*M1/M \t\t\t\t\t#Air-fuel ratio \n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Air-fuel ratio (gm air/gm fuel) = ',m)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Air-fuel ratio (kg mol air/kg mol fuel) = 89.25\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Develop the stoichiometric equation that expresses the process of octane \n",
+ "#being burned with 150% theoretical air. What is the air-fuel ratio on a \n",
+ "#kilogram molal basis?\n",
+ "#initialisation of variables\n",
+ "p= 150\n",
+ "nO2= 12.5 \t\t\t\t\t\t\t\t#mol\n",
+ "n1= 3.76\n",
+ "#CALCULATIONS\n",
+ "n2= (nO2*(p/100.))+(nO2*n1*(p/100.))\t#ir-fuel ratio \n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Air-fuel ratio (kg mol air/kg mol fuel) = ',n2)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Benzene required (gm) = 568.40\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Benzene is used in a heating process that is 65% efficient. How much benzene\n",
+ "#is required to heat 185 liter tank of water from 10 to 30C?\n",
+ "#initialisation of variables\n",
+ "P= 65 \n",
+ "T= 30 \t\t\t\t#C\n",
+ "T1= 10 \t\t\t\t#C\n",
+ "c= 4.19 \t\t\t#J/gm C\n",
+ "h= 41961\n",
+ "m= 185 \t\t\t\t#lt\n",
+ "#CALCULATIONS\n",
+ "Q= m*1000*c*(T-T1)\t#Heat required\n",
+ "M= (Q*100.)/(h*P) \t#Mass of benzene required\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Benzene required (gm) = ',M)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Conduction_Heat_Transfer.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Conduction_Heat_Transfer.ipynb
new file mode 100644
index 00000000..a0581011
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Conduction_Heat_Transfer.ipynb
@@ -0,0 +1,421 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: Conduction Heat Transfer"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 11.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Outside wall temperature (F) = 23.08\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#THe inside surface of a plane wall is exposed to air at 76 F and the outside \n",
+ "#surface to air at 21 F. The inside surface conductance is 1.5., and the outside\n",
+ "#is 6.5. If a thermocouple indicates that the inside wall temperature is 67 F\n",
+ "#what is the outside wall temperature.?\n",
+ "#initialisation of variables\n",
+ "T= 76 \t\t\t\t\t#F\n",
+ "T1= 21 \t\t\t\t\t#F\n",
+ "Tw= 67 \t\t\t\t\t#W\n",
+ "h= 1.5 \t\t\t\t\t#Btu/hr ft^2 F\n",
+ "A= 1. \t\t\t\t\t#ft^2 \n",
+ "h0= 6.5 \t\t\t\t#Btu/hr\n",
+ "#CALCULATIONS\n",
+ "q= h*A*(T-Tw)\t\t\t#Heat flow\n",
+ "t= (q/(h0*A))+T1 \t\t#Outside wall temperature\n",
+ "#results\n",
+ "print '%s %.2f' % ('Outside wall temperature (F) = ',t)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 11.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Thermal transmittance (Btu/hr ft^2 F) = 0.62\n",
+ " \n",
+ " Heat transfer rate (Btu/hr) = 31.25\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#The inside and outside surface conductances are 2.0 and 10.0 Btu/hr ft^2 F\n",
+ "#respectively and the thermal conductivity of the wall is 0.5 units. Determine\n",
+ "#(a)the thermal transmittance and (b) the hear transfer rate for 1 ft^2 of wall\n",
+ "#surfaces\n",
+ "#initialisation of variables\n",
+ "hi= 2. \t\t\t\t\t\t\t\t\t#Btu/hr ft^2 F\n",
+ "l= 6. \t\t\t\t\t\t\t\t\t#in\n",
+ "k= 0.5 \t\t\t\t\t\t\t\t\t#Btu/hr ft F\n",
+ "h0= 10. \t\t\t\t\t\t\t\t#Btu/hr ft^2 F\n",
+ "ti= 70. \t\t\t\t\t\t\t\t#F\n",
+ "t0= 20.\t\t\t\t\t\t\t\t\t#F\n",
+ "A= 1. \t\t\t\t\t\t\t\t\t#ft^2\n",
+ "#CALCULATIONS\n",
+ "U= 1/((1/hi)+((l*0.5)/(6*k))+(1/h0))\t#Thermal transmittance \n",
+ "q= U*A*(ti-t0)\t\t\t\t\t\t\t#Heat transfer rate\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Thermal transmittance (Btu/hr ft^2 F) = ',U)\n",
+ "print '%s %.2f' % (' \\n Heat transfer rate (Btu/hr) = ',q)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 11.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat loss (Btu/hr) = 32.00\n",
+ " \n",
+ " Temperature at the interface of the steel and the insulation (F) = 299.98\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A composite wall is made up of a 1/4 in. steel plate(k=31.4) and 3 in insulation\n",
+ "#(k=0.04). If the outside of the steel surface is 300 F, and the outside of the \n",
+ "#insulation is 100 F, determine (a) the heat loss and (b) the temperature at\n",
+ "#the interface of the steel amd the insulation\n",
+ "#initialisation of variables\n",
+ "Ti= 300. \t\t\t\t\t\t\t#F\n",
+ "T0= 100. \t\t\t\t\t\t\t#F\n",
+ "l= 0.25 \t\t\t\t\t\t\t#in\n",
+ "li= 3. \t\t\t\t\t\t\t\t#in\n",
+ "A= 12. \t\t\t\t\t\t\t\t#in/ft\n",
+ "ks= 31.4 \t\t\t\t\t\t\t#Btu/hr ft F\n",
+ "ki= 0.04 \t\t\t\t\t\t\t#Btu/hr ft F\n",
+ "#CALCULATIONS\n",
+ "q= (Ti-T0)/((l/(A*ks))+(li/(A*ki))) #Heat loss\n",
+ "t= Ti-((q*l/12.)/ks) \t\t\t\t#Temperature\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Heat loss (Btu/hr) = ',q)\n",
+ "print '%s %.2f' % (' \\n Temperature at the interface of the steel and the insulation (F) = ',t)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 11.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat loss (W) = 347.46\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A steel pipe (k=6.4) has an OD of 8.89 cm and an ID of 7.8 cm, and is covered\n",
+ "#with 1.3 cm asbestos (k=0.19). The pipe transports a fluid at 149 C and has\n",
+ "#an inner surface conductance of 227. Outside temp=27. Outside conductance=23\n",
+ "#what os the heat loss of 1m of pipe?\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "ti= 149. \t\t\t\t\t\t\t\t#C\n",
+ "t0= 27. \t\t\t\t\t\t\t\t#C\n",
+ "D0= 0.1149 \t\t\t\t\t\t\t\t#m\n",
+ "l= 1. \t\t\t\t\t\t\t\t\t#m\n",
+ "h0= 23. \t\t\t\t\t\t\t\t#W/m^2 C\n",
+ "hi= 227. \t\t\t\t\t\t\t\t#W/m^2 C\n",
+ "k= 0.19 \t\t\t\t\t\t\t\t#W/m C\n",
+ "Di= 0.0889 \t\t\t\t\t\t\t\t#cm\n",
+ "#CALCULATIONS\n",
+ "D1= D0*100 \n",
+ "D2= Di*100 \n",
+ "R0=(1/(D0*math.pi*l*h0))\t\t\t\t#Resistance\n",
+ "Rins=(math.log(D1/D2)/(2*math.pi*k*l))\t#Resistance\n",
+ "Ri=1/(Di*math.pi*l*hi) \t\t\t\t\t#Resistance Inlet\n",
+ "q= (ti-t0)/(R0+Rins+Ri) \t\t\t\t#Total heat\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Heat loss (W) = ',q)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 11.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Power consumption (W) = 970.90\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#The working chamber of an electrically heated furnace is a cube 0.2 m on each\n",
+ "#side and the walls are 0.1 m thick. Interior wall temperatures are to be \n",
+ "#maintained at 1100 c while the outside wall temperatures are at 150C. If the\n",
+ "#thermal conductivity of the furnace material is 0.35, estimate the power consumption.\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "l= 0.2 \t\t\t\t\t\t\t\t\t#m\n",
+ "l1= 0.5\t\t\t\t\t\t\t\t \t#m\n",
+ "k= 0.35 \t\t\t\t\t\t\t\t#W/m C\n",
+ "t= 0.15 \t\t\t\t\t\t\t\t#m\n",
+ "T1= 1100 \t\t\t\t\t\t\t\t#C\n",
+ "T2= 150 \t\t\t\t\t\t\t\t#C\n",
+ "#CALCULATIONS\n",
+ "Ai= 6*l*l \t\t\t\t\t\t\t\t#Inner area\n",
+ "Ao= 6*l1*l1 \t\t\t\t\t\t\t#outer area\n",
+ "q= 0.73*k*math.sqrt(Ai*Ao)*(T1-T2)/t \t#Power consumption\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Power consumption (W) = ',q)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 11.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "heat loss will increase if the insulation is added\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A copper tube, 0.6 cm OD, carries hot water between two tanks, the outside\n",
+ "#surface conductance is 12. If it is important to minimize the heat loss\n",
+ "#should the tube be covered with an insulation whose k=0.19\n",
+ "#initialisation of variables\n",
+ "h= 12 \t\t\t\t#W/m^2 C\n",
+ "k= 0.19 \t\t\t#W/m C\n",
+ "d= 0.6 \t\t\t\t#m\n",
+ "#CALCULATIONS\n",
+ "r= k/h \t\t\t\t#Critical radius\n",
+ "d1=d/2. \t\t\t#Radius of tube\n",
+ "if (r<d1):\n",
+ " print('heat loss will increase if the insulation is added');\n",
+ "else:\n",
+ " print('heat loss will increase if the insulation is added');\n",
+ "\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 11.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Time needed for the casting to be heated to 510 C (hr) = 0.63\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A small casting initially at 16C is placed in a furnace at 1200C\n",
+ "#The ratio of volume to surface area is 0.15 m and the outer k=85\n",
+ "#k for casting is 225 and the thermal diffusivity is 0.34. how much time is \n",
+ "#needed for the casting to be heated to 510C?\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "h= 85 \t\t\t\t\t\t\t\t\t#W/m^2 C\n",
+ "s= 0.15 \t\t\t\t\t\t\t\t#m\n",
+ "K= 225. \t\t\t\t\t\t\t\t#W/m C\n",
+ "t= 510. \t\t\t\t\t\t\t\t#C\n",
+ "t1= 1200. \t\t\t\t\t\t\t\t#C\n",
+ "t0= 16. \t\t\t\t\t\t\t\t#C\n",
+ "a= 0.34\n",
+ "#CALCULATIONS\n",
+ "Bi= h*s/K \t\t\t\t\t\t\t\t#Biot number\n",
+ "T= K*s*math.log((t0-t1)/(t-t1))/(h*a) \t#Time\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Time needed for the casting to be heated to 510 C (hr) = ',T)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Convection_Heat_Transfer1.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Convection_Heat_Transfer1.ipynb
new file mode 100644
index 00000000..2ea6f9a3
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Convection_Heat_Transfer1.ipynb
@@ -0,0 +1,264 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12: Convection Heat Transfer1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 12.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transfer rate from both sides of the plate (Btu/hr) = 40.50\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#An electrically heated vertical plate, 5 in square has a temperature of \n",
+ "#150 F and is being cooled by natural convection in 50 F air. What is the \n",
+ "#heat transfer rate from both sides of the plate?\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "d= 5. \t\t\t\t\t\t\t\t#ft\n",
+ "Tw= 150. \t\t\t\t\t\t\t#F\n",
+ "T= 50 \t\t\t\t\t\t\t\t#F\n",
+ "Pr= 0.72\n",
+ "k= 0.015 \t\t\t\t\t\t\t#Btu/hr ft F\n",
+ "r= 1.76*1000000. \t\t\t\t\t#(F ft^3)^-1\n",
+ "#CALCULATIONS\n",
+ "D= d*(0.42/5.) \t\t\t\t\t\t#Diameter\n",
+ "dt= Tw-T \t\t\t\t\t\t\t#change in temp\n",
+ "Gr= r*D*D*D*dt \t\t\t\t\t\t#Grashof number\n",
+ "z= Gr*Pr \t\t\t\t\n",
+ "h= 0.59*(math.pow(z,(0.25))) *(k/D) #Heat transfer coefficient\n",
+ "q= (2*h*dt*d*d)/144. \t\t\t\t#Heat transfer rate\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Heat transfer rate from both sides of the plate (Btu/hr) = ',q)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 12.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transfer coefficient when the flow is fully devoloped (Btu/hr ft^2 F) = 1311.13\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Cooling water at an average temperature of 70 F flows through a tube of \n",
+ "#0.9 in ID, with an average velocity of 7 ft/s. What is the heat transfer\n",
+ "#coefficient when the flow is fully developed?\n",
+ "#initialisation of variables\n",
+ "import math\n",
+ "T= 70. \t\t\t\t\t\t\t\t\t\t#F\n",
+ "l= 0.9 \t\t\t\t\t\t\t\t\t\t#in\n",
+ "v= 7. \t\t\t\t\t\t\t\t\t\t#ft/s\n",
+ "d= 62.3 \t\t\t\t\t\t\t\t\t#lbm/ft^3\n",
+ "m= 6.58*math.pow(10,-4) \t\t\t\t\t#lbm/ft s\n",
+ "Pr= 6.82 \n",
+ "k= 0.347 \t\t\t\t\t\t\t\t\t#Bt/hr ft F\n",
+ "#CALCULATIONS\n",
+ "l1= l*0.075/l\n",
+ "Re= (d*v*l1)/m \t\t\t\t\t\t\t\t#Reynold's number\n",
+ "Nu= 0.023*math.pow(Re,0.8)*math.pow(Pr,0.4) #Nusselt number\n",
+ "h= Nu*k/l1 \t\t\t\t\t\t\t\t\t#Transfer coefficient\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Heat transfer coefficient when the flow is fully devoloped (Btu/hr ft^2 F) = ',h)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 12.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transfer rate per unit lenght (W/m) = 23.21\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Air at 1 atm pressure and a mixing cup temperature of 450k flows through \n",
+ "#a 3 cm diameter tube with a velocity of 6 m/s. determine the heat transfer\n",
+ "#rate per unit length if tube if a constant heat flux condition is maintained\n",
+ "#at the tube wall and the wall temperature is 10 C above the air temperature\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "P= 1 \t\t\t\t\t\t\t\t\t\t#atm\n",
+ "d= 0.783 \t\t\t\t\t\t\t\t\t#Kg/m^3\n",
+ "K= 0.0371 \t\t\t\t\t\t\t\t\t#W/m C\n",
+ "m= 2.48*math.pow(10,-5) \t\t\t\t\t#Ns/m^2\n",
+ "Pr= 0.683\n",
+ "D= 0.03 \t\t\t\t\t\t\t\t\t#m\n",
+ "v= 6 \t\t\t\t\t\t\t\t\t\t#m/s\n",
+ "T= 10 \t\t\t\t\t\t\t\t\t\t#C\n",
+ "#CALCULATIONS\n",
+ "Re= d*v*D/m \t\t\t\t\t\t\t\t#Reynolds number\n",
+ "Nu= 0.023*math.pow(Re,0.8)*math.pow(Pr,0.4) #Nusselt number\n",
+ "h= Nu*K/D \t\t\t\t\t\t\t\t\t#Heat transfer coefficient\n",
+ "ql= h*math.pi*D*T \t\t\t\t\t\t\t#Heat transfer rate\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Heat transfer rate per unit lenght (W/m) = ',ql)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 12.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transfer rate per unit lenght of cylinder (W/m) = 3023.70\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Air at 1 atm pressure and 25 C flows past a horizontal 5 cm diameter with\n",
+ "#a velocity of 46 m/s. If the surface of the cylinder is kept at 135 C, determine\n",
+ "#the rate of heat flow from the cylinder\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "T= 25 \t\t\t\t\t\t#C\n",
+ "P= 1 \t\t\t\t\t\t#atm\n",
+ "v= 46 \t\t\t\t\t\t#m/s\n",
+ "d= 5 \t\t\t\t\t\t#cm\n",
+ "T1= 135 \t\t\t\t\t#C\n",
+ "d1= 0.998 \t\t\t\t\t#kg/m^3\n",
+ "k= 0.03 \t\t\t\t\t#W/m C\n",
+ "m= 2.08*math.pow(10,-5) \t#Kg/s m\n",
+ "c= 0.024\n",
+ "n= 0.81\n",
+ "#CALCULATIONS\n",
+ "Tf= (T+T1)/2. \t\t\t\t#Final temp.\n",
+ "D= d/100.\n",
+ "Re= d1*v*D/m \t\t\t\t#Reynolds number\n",
+ "h= c*math.pow(Re,0.81)*k/D \t#Heat transfer coefficient\n",
+ "dt= T1-T \t\t\t\t\t#temp diff.\n",
+ "ql= h*math.pi*D*dt \t\t\t#Heat transfer rate\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Heat transfer rate per unit lenght of cylinder (W/m) = ',ql)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/First_Law_of_Thermodynamics.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/First_Law_of_Thermodynamics.ipynb
new file mode 100644
index 00000000..3527510d
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/First_Law_of_Thermodynamics.ipynb
@@ -0,0 +1,351 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: First Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 7.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Energy dissipated from the brakes (ft lbf) = 4.00e+05\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#An automobile with a mass of 3000 lb comes over the top of a hill 50 ft high\n",
+ "#with a velocity of 50 mph. Brakes are applied at the instant the automobile \n",
+ "#reaches the top, and it comes to rest at the bottom of the hill. How much \n",
+ "#energy is dissipated from the brakes?\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "m= 3000 \t\t\t\t\t\t\t\t\t\t\t#lb\n",
+ "Z1= 50 \t\t\t\t\t\t\t\t\t\t\t\t#ft\n",
+ "V1= 50 \t\t\t\t\t\t\t\t\t\t\t\t#mph\n",
+ "gc= 32.2 \t\t\t\t\t\t\t\t\t\t\t#ft/lbf s^2\n",
+ "V2= 0 \t\t\t\t\t\t\t\t\t\t\t\t#mph\n",
+ "g= 32.2 \t\t\t\t\t\t\t\t\t\t\t#ft/s^2\n",
+ "Z2= 0 \t\t\t\t\t\t\t\t\t\t\t\t#ft\n",
+ "#CALCULATIONS\n",
+ "V1= V1*(73.3/50.) \t\t\t\t\t\t\t\t\t#Velocity\n",
+ "Q2= ((m*(V2*V2-V1*V1))/(2*gc))+((m*g)/gc)*(Z2-Z1)\n",
+ "#RESULTS\n",
+ "print '%s %.2e' % ('Energy dissipated from the brakes (ft lbf) = ',-Q2)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 7.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "From keenan and keyes steam tables\n",
+ "Temperature of the steam in the tank (C) = 453.40\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Steam at a pressure of 13 bar and a temperature of 300C flows adiabatically \n",
+ "#and with negligible velocity into an evacuated tank. Using a closed system\n",
+ "#analysis, determine the temperature of the steam in the tank reaches line\n",
+ "#pressure.\n",
+ "#initialisation of variables\n",
+ "P= 15 \t\t\t\t\t\t#bar\n",
+ "T= 300 \t\t\t\t\t\t#C\n",
+ "h1= 3043.1 \t\t\t\t\t#J/gm\n",
+ "#CALCULATIONS\n",
+ "u2= h1 \n",
+ "print '%s' %('From keenan and keyes steam tables')\n",
+ "T= 453.4 \t\t\t\t\t#C temperature\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Temperature of the steam in the tank (C) = ',T)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 7.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transferred to the tank (Btu) = 267.00\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A 10 lb mass of air at 120F is contained in a rigid tank. How much heat\n",
+ "#is transferred to the tank to raise the air temperature of 275 F?\n",
+ "#initialisation of variables\n",
+ "m= 10 \t\t\t\t\t\t\t#lbf\n",
+ "T= 120 \t\t\t\t\t\t\t#F\n",
+ "T1= 275 \t\t\t\t\t\t#F\n",
+ "u1= 98.9 \t\t\t\t\t\t#Btu/lbm\n",
+ "u2= 125.6 \t\t\t\t\t\t#Btu/lbm\n",
+ "#CALCULATIONS\n",
+ "Q= m*(u2-u1) \t\t\t\t\t#Heat transferred\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Heat transferred to the tank (Btu) = ',Q)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 7.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum theotrical power that can be devoloped (J/s) = 1.00e+05\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Fluid enters a turbine with a velocity of 1 m/s and an enthalpy of 2000 j/gm;\n",
+ "#it leaves with a velocity of 60 m/s and enthalpy of 1800 J/gm. Heat losses\n",
+ "#are 500 J/s, and the flow rate is 0.5 kg/s. If the inlet of the turbine is \n",
+ "#3 m higher than the outlet, what is the maximum theoretical power\n",
+ "# that can be developed?\n",
+ "#initialisation of variables\n",
+ "v0= 1 \t\t\t\t\t\t\t\t\t\t\t\t\t#m/s\n",
+ "vi= 60 \t\t\t\t\t\t\t\t\t\t\t\t\t#m/s\n",
+ "Q= -500 \t\t\t\t\t\t\t\t\t\t\t\t#J/s\n",
+ "m= 500 \t\t\t\t\t\t\t\t\t\t\t\t\t#gm/s\n",
+ "hi= 2000 \t\t\t\t\t\t\t\t\t\t\t\t#J/gm\n",
+ "h0= 1800 \t\t\t\t\t\t\t\t\t\t\t\t#J/gm\n",
+ "zi= 3 \t\t\t\t\t\t\t\t\t\t\t\t\t#m\n",
+ "z0= 0 \t\t\t\t\t\t\t\t\t\t\t\t\t#m\n",
+ "g= 9.8 \t\t\t\t\t\t\t\t\t\t\t\t\t#m/s^2\n",
+ "gc= 1000. \t\t\t\t\t\t\t\t\t\t\t\t#gm m/Ns^2\n",
+ "#CALCULATIONS\n",
+ "W= Q+m*((hi-h0)+(vi*vi-v0*v0)/(2*gc)+(g/gc)*(zi-z0)) \t#Work\n",
+ "#RESULTS\n",
+ "print '%s %.2e' % ('Maximum theotrical power that can be devoloped (J/s) = ',W)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 7.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Required steam flow rate (gm/s) = 36.36\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#To produce 0.3 lt/s hot water at 82 C, low pressure steam at 2.4 bar and \n",
+ "#80 percent quality is mixed with a stream of water at 16 C. What is the \n",
+ "#required steam flow rate?\n",
+ "#initialisation of variables\n",
+ "m= 0.3 \t\t\t\t\t\t\t\t#lt/s\n",
+ "T= 82 \t\t\t\t\t\t\t\t#C\n",
+ "P= 2.4 \t\t\t\t\t\t\t\t#bar\n",
+ "p= 80.\n",
+ "Tw= 800 \t\t\t\t\t\t\t#C\n",
+ "h1= 67.19 \t\t\t\t\t\t\t#J/gm\n",
+ "h3= 343.3 \t\t\t\t\t\t\t#J/gm\n",
+ "hf= 529.65 \t\t\t\t\t\t\t#J/gm\n",
+ "hfg= 2185.4 \t\t\t\t\t\t#J/gm\n",
+ "v3= 1.0305 \t\t\t\t\t\t\t#cm^3/gm\n",
+ "V3= 300 \t\t\t\t\t\t\t#cm^3/s\n",
+ "#CALCULATIONS\n",
+ "h2= hf+(p/100.)*hfg\t\t\t\t\t#Enthalpy at 2\n",
+ "m3= V3/v3 \t\t\t\t\t\t\t#Mass at 3\n",
+ "m2= (m3*(h3-h1))/(h2-h1) \t\t\t#Mass at 2\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Required steam flow rate (gm/s) = ',m2)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 7.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Difference between the enthalpies of the system in the two phases ((h2-h1) J/gm) = 1.00\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Latent heat of transforation can be defined as the ratio of heat absorbed\n",
+ "#to the mass which undergoes a change of phase(L=Q/m). Show that the heat of \n",
+ "#transformation for any phase change equals the difference between the \n",
+ "#enthalphies of the system in the two phases.\n",
+ "#initialisation of variables\n",
+ "h2= 2 \t\t\t\t\t#J/gm\n",
+ "h1= 1 \t\t\t\t\t#J/gm\n",
+ "#CALCULATIONS\n",
+ "L= h2-h1 \t\t\t\t#Difference between enthalpies\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Difference between the enthalpies of the system in the two phases ((h2-h1) J/gm) = ',L)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Gas_Properties_and_Processes.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Gas_Properties_and_Processes.ipynb
new file mode 100644
index 00000000..06c3555a
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Gas_Properties_and_Processes.ipynb
@@ -0,0 +1,374 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: Gas Properties and Processes"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Molecular weight of the gas (lbm/lbm mol) = 24.14\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A 15 ft^3 volume of an ideal gas has a mass of 20 lbm at 80F and 320 psia.\n",
+ "#What is the molecular weight of the gas?\n",
+ "#initialisation of variables\n",
+ "v= 15 \t\t\t\t\t\t#ft^3\n",
+ "m= 20 \t\t\t\t\t\t#lbm\n",
+ "T= 80 \t\t\t\t\t\t#lbf\n",
+ "P= 320 \t\t\t\t\t\t#psia\n",
+ "#CALCULATIONS\n",
+ "R= P*144*v/(m*(T+460.)) \t#Universal gas constant\n",
+ "M= 1545./R \t\t\t\t\t#Molecular weight\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Molecular weight of the gas (lbm/lbm mol) = ',M)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Initial Mass of Oxygen (gm) = 1287.93\n",
+ " \n",
+ " Final mass of oxygen (gm) = 413.69\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A 50 ltr liter of oxygen is initially at 20 atm and 30C. A sufficient of \n",
+ "#amount of oxygen is removed to change the state to 6 atm and 10C. \n",
+ "#Determine (a) the initial mass of oxygen and (b) final mass of oxygen.\n",
+ "#initialisation of variables\n",
+ "V= 50 \t\t\t\t\t\t\t#lit\n",
+ "P= 20 \t\t\t\t\t\t\t#atm\n",
+ "T= 30 \t\t\t\t\t\t\t#C\n",
+ "P1= 6 \t\t\t\t\t\t\t#atm\n",
+ "T1= 10 \t\t\t\t\t\t\t#C\n",
+ "M= 32 \t\t\t\t\t\t\t#gm/gm mol\n",
+ "#CALCULATIONS\n",
+ "n= V*P/(0.082*(T+273.)) \t\t#No. of moles\n",
+ "m= n*M \t\t\t\t\t\t\t#Mass\n",
+ "n2= P1*V/(0.082*(T1+273.)) \t\t#No. of moles\n",
+ "m2= n2*M \t\t\t\t\t\t#Mass\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Initial Mass of Oxygen (gm) = ',m)\n",
+ "print '%s %.2f' % (' \\n Final mass of oxygen (gm) = ',m2)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Final volume (ft^3) = 0.32\n",
+ " \n",
+ " Final temperature (R) = 637.84\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#If 0.75 ft^3 of a gas at 1 atm and 35F is compressed polytropically to a\n",
+ "#pressure of 3 atm, determine the final volume and temperature. \n",
+ "#The polytropic exponent is 1.3\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "V2= 0.75 \t\t\t\t\t\t\t\t\t\t\t #ft^3\n",
+ "P2= 1 \t\t\t\t\t\t\t\t\t\t\t\t #atm\n",
+ "P1= 3 \t\t\t\t\t\t\t\t\t\t\t \t #atm\n",
+ "T= 35 \t\t\t\t\t\t\t\t\t\t\t\t #F\n",
+ "e= 1.3\n",
+ "#CALCULATIONS\n",
+ "V1= math.pow(((P2*math.pow((V2),e))/P1),(1/e)) #Final volume\n",
+ "T2= P1*V1*(T+460.)/(P2*V2) \t\t\t\t\t\t\t #Final temperature\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Final volume (ft^3) = ',V1)\n",
+ "print '%s %.2f' % (' \\n Final temperature (R) = ',T2)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T1 (K) = 160.22\n",
+ " \n",
+ " T2 (K) = 160.22\n",
+ " \n",
+ " T3 (K) = 211.42\n",
+ " \n",
+ " P2 (Pa) = 3.45e+05\n",
+ " \n",
+ " P3 (Pa) = 9.10e+05\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A rigid container holds a 0.45 kg mass of air with a volume of 0.03 m^3\n",
+ "#and an absolue pressure of 6.9x 10^5 pa. the air is expanded reversibly\n",
+ "#and adiabatically to 0.03 m^3. The air is then returned to its initial \n",
+ "#state by a rreversible constant volume process. Determine the pressure and\n",
+ "#temperature at each state \n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "m= 0.45 \t\t\t\t\t\t#kg\n",
+ "v1= 0.03 \t\t\t\t\t\t#m^3\n",
+ "v2= 0.06 \t\t\t\t\t\t#m^3\n",
+ "P= 6.9*100000. \t\t\t\t\t#Pa\n",
+ "K= 1.4\n",
+ "R= 287.1 \t\t\t\t\t\t#J/Kg K\n",
+ "#CALCULATIONS\n",
+ "T1= (P*v1)/(m*R) \t\t\t\t#Temperature\n",
+ "T2= T1 \t\t\t\t\t\t\t#Temperature\n",
+ "P2= P*v1/v2 \t\t\t\t\t#Pressure\n",
+ "T3= T2*math.pow((v2/v1),(K-1)) \t#Temperature\n",
+ "P3= P2*math.pow((v2/v1),K) \t\t#Pressure\t\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('T1 (K) = ',T1)\n",
+ "print '%s %.2f' % (' \\n T2 (K) = ',T2)\n",
+ "print '%s %.2f' % (' \\n T3 (K) = ',T3)\n",
+ "print '%s %.2e' % (' \\n P2 (Pa) = ',P2)\n",
+ "print '%s %.2e' % (' \\n P3 (Pa) = ',P3)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work associated with the process (Btu/lbm) = -46.32\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Nitrogen is compressed in a reversible polytropic process from 1 atm and 60 F\n",
+ "#to 4 atm. Calculate the work associated with the process if the polytropic \n",
+ "#exponent is 1.3\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "P= 1 \t\t\t\t\t\t\t\t\t#atm\n",
+ "T= 60 \t\t\t\t\t\t\t\t\t#F\n",
+ "P1= 4 \t\t\t\t\t\t\t\t\t#atm\n",
+ "e= 1.3\n",
+ "R= 55.15 \t\t\t\t\t\t\t\t#lbf/lbm R\n",
+ "m= 778\n",
+ "#CALCULATIONS\n",
+ "T2= (T+460)*math.pow((P1/P),((e-1)/e))\t#Temperature final\n",
+ "W= R*(T2-(T+460))/(1-e) \t\t\t\t#Work\n",
+ "W1= W/m \t\t\t\t\t\t\t\t#Work per unit mass\n",
+ "#RESLUTS\n",
+ "print '%s %.2f' % ('Work associated with the process (Btu/lbm) = ',W1)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total volume (ft^3) = 150.00\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Determine the total pressure of a mixture of 10 lbm oxygen and \n",
+ "#15 lbm nitrogen at 120F in a rigid tank of 150 ft^3. Show that\n",
+ "#the total volume is the sum of the partial volumes?\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "m= 10 \t\t\t\t\t\t#lbm\n",
+ "R= 48.28 \t\t\t\t\t#lbf/lbm R\n",
+ "T= 120 \t\t\t\t\t\t#F\n",
+ "V= 150 \t\t\t\t\t\t#ft^3\n",
+ "m1= 15 \t\t\t\t\t\t#lbm\n",
+ "R1= 55.15 \t\t\t\t\t#lbf/lbm R\n",
+ "#CALCULATIONS \n",
+ "P1= (m*R*(T+460))/V \t\t#Pressure of Oxygen\n",
+ "P2= (m1*R1*(T+460))/V \t\t#Pressure of Nitrogen\n",
+ "Pm= P1+P2 \t\t\t\t\t#Total pressure\n",
+ "V1= (m*R*(T+460))/Pm \t\t#Volume of Oxygen\n",
+ "V2= (m1*R1*(T+460))/Pm \t\t#Volume of Nitrogen\n",
+ "Vm= V1+V2 \t\t\t\t\t#Total volume\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Total volume (ft^3) = ',Vm)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/README.txt b/Elements_of_thermal_technology_by_John_H._Seely/README.txt
new file mode 100644
index 00000000..4e2da5e7
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Jeevan Lal
+Course: mtech
+College/Institute/Organization: -
+Department/Designation: -
+Book Title: Elements of thermal technology
+Author: John H. Seely
+Publisher: Marcel Dekker Inc., New York, U. S. A.
+Year of publication: 2002
+Isbn: 0-8247-1174-2
+Edition: 1 \ No newline at end of file
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Radiation_Heat_Transfer.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Radiation_Heat_Transfer.ipynb
new file mode 100644
index 00000000..720fca7f
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Radiation_Heat_Transfer.ipynb
@@ -0,0 +1,349 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: Radiation Heat Transfer"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Wavelength at which the maximum monochromatic emissive power (m) = 7.44e-06\n",
+ " \n",
+ " Coffecient of performnance (W/m^3) = 1.14e+08\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#If a blackbody is maintained at 116C, determine (a) the wavelength at which \n",
+ "#the maximum monochromatic emissive power occurs and (b) the maximum \n",
+ "#monochromatic emissive power\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "T= 116. \t\t\t\t\t\t\t\t\t\t\t\t\t\t#C\n",
+ "C1= 3.74*math.pow(10,-16)\n",
+ "C2= 1.44*math.pow(10,-2)\n",
+ "#CALCULATIONS\n",
+ "WLmax= (2893*math.pow(10,-6))/(T+273) \t\t\t\t\t\t\t#Maximum Wavelength \n",
+ "Wb= (C1*math.pow((WLmax),(-5)))/(math.exp(C2/2893*1000000.)-1)\t#Coffecient of performnance\n",
+ "#RESULTS\n",
+ "print '%s %.2e' % ('Wavelength at which the maximum monochromatic emissive power (m) = ',WLmax)\n",
+ "print '%s %.2e' % (' \\n Coffecient of performnance (W/m^3) = ',Wb)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Emissive power for the blackbody (W/m^2) = 1305.19\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Determine the total emissive power for the black body of solved problem 2\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "T= 389 \t\t\t\t\t\t#K\n",
+ "s= 5.7*math.pow(10,-8) \t\t#K^4\n",
+ "#CALCULATIONS\n",
+ "Wb= s*T*T*T*T \t\t\t\t#Emissive power for the blackbody\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Emissive power for the blackbody (W/m^2) = ',Wb)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Average absorptivity of the body at 100 F = 0.51\n",
+ " \n",
+ " Average absorptivity of the body at 2000 F= 0.84\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A gray body at 100F receives radiant energy from a wall at 2000 F at a rate\n",
+ "#of 3.2x 10^4. Simultaneously, the body emits energy at the rate of 140. What\n",
+ "#is the average absorptivity of the body at (a) 100 F and (b) 2000 F\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "T= 100 \t\t\t\t\t\t\t\t#F\n",
+ "T1= 2000 \t\t\t\t\t\t\t#F\n",
+ "W= 3.2*10000. \t\t\t\t\t\t#Btu/hr ft^2\n",
+ "W1= 140. \t\t\t\t\t\t\t#Btu/hr ft^2\n",
+ "s= 0.17*math.pow(10,-8) \t\t\t#Btu/hr ft^2 R^4\n",
+ "#CALCULATIONS\n",
+ "alpha= W/(s*math.pow((T1+460),4)) \t#Average absorptivity at 100\n",
+ "b= W1/(s*math.pow((T+460),4)) \t\t#Average absorptivity at 2000\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Average absorptivity of the body at 100 F = ',alpha)\n",
+ "print '%s %.2f' % (' \\n Average absorptivity of the body at 2000 F= ',b)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat loss from the conduit by radiation (Btu/hr per ft) = 1401.66\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A red brick conduit 10 in square has a surface temperature of 300F and is \n",
+ "#mounted inside a large earthen chamber whose walls are at 50 F. estimate\n",
+ "#the heat loss from the conduit by radiation\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "T= 300. \t\t\t\t\t\t\t\t\t\t\t\t#F\n",
+ "T1= 50. \t\t\t\t\t\t\t\t\t\t\t\t#F\n",
+ "s= 0.17*math.pow(10,-8) \t\t\t\t\t\t\t\t#Btu/hr ft^2 R^4\n",
+ "e1= 0.93\n",
+ "A= 10. \t\t\t\t\t\t\t\t\t\t\t\t\t#in\n",
+ "F= 1.\n",
+ "#CALCULATIONS\n",
+ "A1= 10*(40./(12.*10.)) \t\t\t\t\t\t\t\t\t#Area\n",
+ "q= A1*F*e1*s*(math.pow((T+460),4)-math.pow((T1+460),4)) #heat loss\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Heat loss from the conduit by radiation (Btu/hr per ft) = ',q)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Radiation heat transfer coefficient (Btu/hr ft^2 R) = 1.68\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Estimate the radiation heat transfer coefficient for solved problem 5\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "T= 300. \t\t\t\t\t\t\t\t\t\t\t\t\t\t#F\n",
+ "T1= 50. \t\t\t\t\t\t\t\t\t\t\t\t\t\t#F\n",
+ "s= 0.17*math.pow(10,-8) \t\t\t\t\t\t\t\t\t\t#Btu/hr ft^2 R^4\n",
+ "e1= 0.93\n",
+ "F= 1.\n",
+ "#CALCULATIONS\n",
+ "hr= F*e1*s*(math.pow((T+460),4)-math.pow((T1+460),4))/(T-T1)\t#Radiation heat transfer coefficient \n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Radiation heat transfer coefficient (Btu/hr ft^2 R) = ',hr)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transfer coefficient for nucleate boiling (W/m^2 C) = 6.21e+08\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 8,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "P= 1. #atm\n",
+ "T= 11. #C\n",
+ "Csf= 0.006\n",
+ "Tsat = 170.03\n",
+ "r= 1./3.\n",
+ "s= 1.\n",
+ "dt = Tsat - T\n",
+ "cl= 4.218 #J/gm K\n",
+ "hfg= 2257 #J/gm\n",
+ "Pr= 1.75\n",
+ "ul= 283.1/1000. #gm/m s\n",
+ "s= 57.78/1000. #N/m\n",
+ "pl= 958*1000. #gm/m^3\n",
+ "pv= 598. #gm/m^3\n",
+ "gc= 1000. #gm m/N s^2\n",
+ "g= 9.8 #m/s^2\n",
+ "#CALCULATIONS\n",
+ "p= pl-pv\n",
+ "q= ((math.pow(((cl*dt)/(hfg*Csf*math.pow(Pr,s))),(1/r)))*(ul*hfg))/math.pow(gc/(g*p),(1./2.))\n",
+ "h= q/T\n",
+ "#RESULTS\n",
+ "print '%s %.2e' % ('Heat transfer coefficient for nucleate boiling (W/m^2 C) = ',h)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Refrigeration_and_Air_Conditioning.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Refrigeration_and_Air_Conditioning.ipynb
new file mode 100644
index 00000000..97e842ae
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Refrigeration_and_Air_Conditioning.ipynb
@@ -0,0 +1,146 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 15: Refrigeration and Air Conditioning"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 15.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Joule-Thomson coefficient (C/bar) = 1.61\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Estimate how much the temperature is lowered when the steam at 7 bar and \n",
+ "#260C is throttled to 1.4 bar. What is the approximate Joule-Thomson \n",
+ "#initialisation of variables\n",
+ "P= 7. \t\t\t\t#bar\n",
+ "P1= 1.4 \t\t\t#bar\n",
+ "T= 260. \t\t\t#C\n",
+ "T1= 251. \t\t\t#C\n",
+ "h= 2974.9 \t\t\t#J/gm\n",
+ "#CALCULATIONS\n",
+ "dT= T-T1 \t\t\t#Change in Temp. \n",
+ "Mj= dT/(P-P1) \t\t#Joule-Thomson coefficient\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Joule-Thomson coefficient (C/bar) = ',Mj)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 15.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Refrigerating effect (Btu/lbm) = 44.80\n",
+ " \n",
+ " Coffecient of performnance= 3.54\n",
+ " \n",
+ " Capacity of refrigeration in tons (ton) = 0.67\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A vapor compression refrigiration system, using Refrigirant 12, works between\n",
+ "#n evaporator temperature of 10F and a condenser temp. of 110F. The pumping\n",
+ "#rate for the refrigrant is 180 lbm/hr. Determine (a) the refrigirating \n",
+ "#effect, (b) the coefficient of performance,and (c) the capacity of refrigiration\n",
+ "#in tons\n",
+ "#initialisation of variables\n",
+ "T= 10. \t\t\t\t\t\t#F\n",
+ "T1= 110. \t\t\t\t\t#F\n",
+ "Pr= 180. \t\t\t\t\t#lbm/hr\n",
+ "h1= 78.335 \t\t\t\t\t#Btu/lbm\n",
+ "h3= 33.531 \t\t\t\t\t#Btu/lbm\n",
+ "h2= 91. \t\t\t\t\t#Btu/lbm\n",
+ "L= 12000. \t\t\t\t\t#Btu/hr per ton\n",
+ "#CALCULATIONS\n",
+ "h4= h3\n",
+ "QL= h1-h4 \t\t\t\t\t#Refrigerating effect\n",
+ "W= h2-h1 \t\t\t\t\t#Work done\n",
+ "COP= QL/W \t\t\t\t\t#Coffecient of performnance\n",
+ "C= QL*Pr/L \t\t\t\t\t#Capacity of refrigeration in tons\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Refrigerating effect (Btu/lbm) = ',QL)\n",
+ "print '%s %.2f' % (' \\n Coffecient of performnance= ',COP)\n",
+ "print '%s %.2f' % (' \\n Capacity of refrigeration in tons (ton) = ',C)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Second_Law_of_Thermodynamics.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Second_Law_of_Thermodynamics.ipynb
new file mode 100644
index 00000000..cf940111
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Second_Law_of_Thermodynamics.ipynb
@@ -0,0 +1,242 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: Second Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum theotrical efficiency (percentage)((Claim is not valid)) = 23.33\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#You are asked to comment on an inventor's claim that he has an engine which \n",
+ "#delivers 25 Btu of work from an input if 100 Btu when it operates between \n",
+ "#140F and 0F. Is the claim valid?\n",
+ "#initialisation of variables\n",
+ "W= 25 \t\t\t\t\t#Btu\n",
+ "W1= 100 \t\t\t\t#Btu\n",
+ "T1= 140 \t\t\t\t#R\n",
+ "T2= 0 \t\t\t\t\t#R\n",
+ "#CALCULATIONS\n",
+ "Th= T1+460. \t\t\t#T hot in Rankine\n",
+ "Tl= T2+460. \t\t\t#T cold in Rankine\n",
+ "nt= (Th-Tl)/Th \t\t\t#Max. efficieny\n",
+ "n= nt*100.\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('maximum theotrical efficiency (percentage)((Claim is not valid)) = ',n)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in Entropy (J/gm K) = 2.856\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Saturated steam in a rigid vessel is initially at 10 bar. heat is added\n",
+ "#until the steam s superheated at 38 bar and 310 C. What is the change in entropy?\n",
+ "#initialisation of variables\n",
+ "P= 10 \t\t\t\t\t\t#bar\n",
+ "P1= 38 \t\t\t\t\t\t#bar\n",
+ "T= 310 \t\t\t\t\t\t#C\n",
+ "v= 64.03 \t\t\t\t\t#cm^3/gm\n",
+ "s= 6.4415 \t\t\t\t\t#J/gm K\n",
+ "vf= 1.12773 \t\t\t\t#cm^3/gm\n",
+ "vg= 194.44 \t\t\t\t\t#cm^3/gm\n",
+ "sf= 2.1387 \t\t\t\t\t#J/gm K\n",
+ "sfg= 4.4478 \t\t\t\t#J/gm K\n",
+ "#CALCULATIONS \n",
+ "x= (v-vf)/(vg-vf) \t\t\t#x\n",
+ "sx= sf+x*sfg \t\t\t\t#Entropy\n",
+ "S= s-sx \t\t\t\t\t#Change in entropy\n",
+ "#RESULTS\n",
+ "print '%s %.3f' % ('Change in Entropy (J/gm K) = ',S)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Minimum power required to drive the heat pump (Btu/hr) = 7500.00\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#If heat must be pumped at the rate of 70k Btu/hr to keep a house at 72F when\n",
+ "#the outside temperature is 15 F, What is the minimum power required to drive\n",
+ "#the heat pump?\n",
+ "#initialisation of variables\n",
+ "Qh= 70000. \t\t\t\t\t\t\t#Btu/hr\n",
+ "T= 15. \t\t\t\t\t\t\t\t#F\n",
+ "T1= 72. \t\t\t\t\t\t\t#F\n",
+ "#CALCULATIONS\n",
+ "COP= (T1+460)/((T1+460)-(T+460))\t#Carnot efficiency\n",
+ "W= Qh/COP \t\t\t\t\t\t\t#Work\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Minimum power required to drive the heat pump (Btu/hr) = ',W)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Minimum electrical requirement (KW) = 3.54\n",
+ " \n",
+ " Elctrical requirement if an electrical heater used (KW) = 26.00\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Heat must be pumped at the rate of 26kW to maintain a temperature of 43F\n",
+ "#in an air stream while the outside temperature is 0C. Determine \n",
+ "#(a)the minimum electrical equipment in Kilowatts and \n",
+ "#(b)the electrical requirement if an electric heater is used.\n",
+ "#initialisation of variables\n",
+ "h= 26. \t\t\t\t\t\t\t\t#KW\n",
+ "T= 43. \t\t\t\t\t\t\t\t#C\n",
+ "To= 0 \t\t\t\t\t\t\t\t#C\n",
+ "#CALCULATIONS\n",
+ "COP= (T+273)/((T+273.)-(To+273.))\t#Carnot efficiency\n",
+ "W= h/COP \t\t\t\t\t\t\t#Work\n",
+ "Qh=h \t\t\t\t\t\t\t\t#Heat\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Minimum electrical requirement (KW) = ',W)\n",
+ "print '%s %.2f' % (' \\n Elctrical requirement if an electrical heater used (KW) = ',Qh)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Surface_Tension.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Surface_Tension.ipynb
new file mode 100644
index 00000000..61b786fd
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Surface_Tension.ipynb
@@ -0,0 +1,179 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Surface Tension"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work (dyn cm or erg) = 5.03e+04\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#If the surface tension of a soap bubble is 0.4 N/m, what work is required to\n",
+ "#increase the diameter from 5 to 15 cm?\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "St= 0.04 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#N/m\n",
+ "d1= 5. \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#cm\n",
+ "d2= 15. \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#cm\n",
+ "#CALCULATIONS\n",
+ "W= St*1000.*2*4*math.pi*(math.pow((d2/2),2)-math.pow((d1/2),2))\t\t#Work\n",
+ "#RESULTS\n",
+ "print '%s %.2e' % ('Work (dyn cm or erg) = ',W)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Presuure difference (lbf/ft^2) = 14.12\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#By much does the pressure inside a 0.017 in droplet of water at 20C\n",
+ "#exceed the outside pressure.\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "R= 0.017 \t\t\t\t\t\t\t\t\t\t\t\t#in\n",
+ "sigma= 72.8 \t\t\t\t\t\t\t\t\t\t\t#m N/m\n",
+ "#CALCULATIONS\n",
+ "P= (2*sigma*0.005*0.017)/(72.8*R*7.08*math.pow(10,-4))\t#Presuure difference\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Presuure difference (lbf/ft^2) = ',P)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Difference in mercury level (cm (depression)) = -2.48\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A 0.4 mm diameter glass tube stands vertically in a dish of mercury at 20C.\n",
+ "#Determine the difference between the level of mercury in the dish and in\n",
+ "#the tube. The specific gravity for mercury is 13.6 and the contact angle \n",
+ "#with glass is 130C\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "d= 13.6 \t\t\t\t\t\t\t#gm/cm^3\n",
+ "g= 980 \t\t\t\t\t\t\t\t#cm/s^2\n",
+ "D= 0.4 \t\t\t\t\t\t\t\t#mm\n",
+ "angle= 130*math.pi/180. \t\t\t#radians\n",
+ "s= 514. \t\t\t\t\t\t\t#dyn/cm\n",
+ "#CALCULATIONS\n",
+ "h= (4*s*10*math.cos(angle))/(d*g*D)\t#Depression in mercury level\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % (' Difference in mercury level (cm (depression)) = ',h)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Tem.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Tem.ipynb
new file mode 100644
index 00000000..058e99cb
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Tem.ipynb
@@ -0,0 +1,238 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Tem"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T (F) = 26.60\n",
+ " \n",
+ " T (C) = 87.96\n",
+ " \n",
+ " T (K) = 361.11\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Make the following conversions : (a) -3 C to F (b) 650 R to C (c) 650 R to K\n",
+ "#initialisation of variables\n",
+ "T1= -3 \t\t\t\t\t#degrees\n",
+ "T2= 650. \t\t\t\t#Rankine\n",
+ "T3= 650. \t\t\t\t#Rankine\n",
+ "#CALCULATIONS\n",
+ "t1= (9./5.)*T1+32 \t\t#In F\n",
+ "t2= T2-459.67 \t\t\t#In F\n",
+ "t21= (5./9.)*(t2-32) \t#In C\n",
+ "t3= t21+273.15 \t\t\t#In K\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('T (F) = ',t1)\n",
+ "print '%s %.2f' % (' \\n T (C) = ',t21)\n",
+ "print '%s %.2f' % (' \\n T (K) = ',t3)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T (F) = 18.00\n",
+ " \n",
+ " T (R) = 18.00\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#The temperatuer of an object drops from 40 to 30C. Determine the temperature\n",
+ "#drop in (a) F and (b) R.\n",
+ "#initialisation of variables\n",
+ "T1= 40. \t\t\t\t#degrees\n",
+ "T2= 30. \t\t\t\t#degrees\n",
+ "#CALCULATIONS\n",
+ "d1= (T1-T2)*(9./5.) \t#drop in F\n",
+ "d2= d1 \t\t\t\t\t#drop in R\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('T (F) = ',d1)\n",
+ "print '%s %.2f' % (' \\n T (R) = ',d2)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "L (mm) = 400.54\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A brass wire has a length of 400mm at 20C. What is the length of the wire at 90C?\t\n",
+ "#initialisation of variables\n",
+ "l= 400 \t\t\t\t\t#mm\n",
+ "t1= 20 \t\t\t\t\t#degrees\n",
+ "t2= 90 \t\t\t\t\t#degrees\n",
+ "alpha= 19.3/1000000. \t#degrees^-1\n",
+ "#CALCULATIONS\n",
+ "L= alpha*(t2-t1)*l \t\t#Change in Length\n",
+ "L1= L+l \t\t\t\t#Final Length\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('L (mm) = ',L1)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "diameter at -15 (in) = 2.98\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#An Al 2024-T3 plate has a 2.980-in diameter hole at 69F. What is the \n",
+ "#diameter if the temperature is lowered to -15F?\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "d= 2.98 \t\t\t\t\t#in\n",
+ "T1= 69 \t\t\t\t\t\t#F\n",
+ "T2= -15 \t\t\t\t\t#F\n",
+ "alpha= 22.7/1000000. \t\t#C^-1\n",
+ "#CALCULATIONS\n",
+ "A0= math.pi*d*d/4. \t\t\t#Initial Area\n",
+ "alpha1= alpha/1.8 \n",
+ "A= 2*alpha1*A0*(T1-T2) \t#Change in Area\n",
+ "A1= A0-A \n",
+ "d1= math.sqrt(4*A1/math.pi) #diameter at -15F\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('diameter at -15 (in) = ',d1)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Thermodynamic_Definitions_and_Concepts.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Thermodynamic_Definitions_and_Concepts.ipynb
new file mode 100644
index 00000000..e879a1fa
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Thermodynamic_Definitions_and_Concepts.ipynb
@@ -0,0 +1,175 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Thermodynamic Definitions and Concepts"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vfg (ft^3/lbm) = 1.4059\n",
+ " \n",
+ " V (ft^3/lbm) = 0.8625\n",
+ " \n",
+ " V (ft^3/lbm) = 0.8625\n",
+ " \n",
+ " V (ft^3/lbm) = 0.8625\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Determine the specific volume for steam of 60% quality at 425 F using \n",
+ "#(a) Eq 1.3 (b) 1.4 (c) 1.5\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "Vf= 0.019014 \t\t\t\t\t\t\t\t\t#ft^3/lbm\n",
+ "Vg= 1.4249 \t\t\t\t\t\t\t\t\t\t#ft^3/lbm\n",
+ "T= 425. \t\t\t\t\t\t\t\t\t\t#fahrenheit\n",
+ "quality= 60. \t\t\t\t\t\t\t\t\t#%\n",
+ "#CALCULATIONS\n",
+ "Vfg= Vg-Vf \t\t\t\t\t\t\t\t\t\t#Specific volume \n",
+ "V= (quality/100.)*Vg+(1-(quality/100.))*Vf \t\t#Volume using 1.3\n",
+ "V1= Vf+(quality/100.)*Vfg \t\t\t\t\t\t#Volume using 1.4\n",
+ "V2= Vg-(1-(quality/100.))*Vfg \t\t\t\t\t#Volume using 1.5\n",
+ "#RESULTS\n",
+ "print '%s %.4f' % ('Vfg (ft^3/lbm) = ',Vfg)\n",
+ "print '%s %.4f' % (' \\n V (ft^3/lbm) = ',V)\n",
+ "print '%s %.4f' % (' \\n V (ft^3/lbm) = ',V1)\n",
+ "print '%s %.4f' % (' \\n V (ft^3/lbm) = ',V2)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "From keenan and keyes steam tables, at 500 f and 350 psia,\n",
+ "\n",
+ " Specific volume (ft^3/lbm) = 1.4913\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Saturated steam at 350 lbf/in^2 is heated to 500F. sketch a temperature-\n",
+ "#-volume vapor dome and show the specific volume , temperature and pressure\n",
+ "#for the saturated and superheated states\n",
+ "#initialization of variables\n",
+ "tsat=431.82 \t\t\t\t\t#F\n",
+ "vf=0.019124 \t\t\t\t\t#ft^3/lbm\n",
+ "vg=1.3267 \t\t\t\t\t\t#ft^3/lbm\n",
+ "#Calculations\n",
+ "print '%s' %('From keenan and keyes steam tables, at 500 f and 350 psia,')\n",
+ "v=1.4913 \t\t\t\t\t\t#ft^3/lbm\n",
+ "#Results\n",
+ "print '%s %.4f' %('\\n Specific volume (ft^3/lbm) = ',v)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "From keenan and keyes steam tables\n",
+ "Amount of liquid compressed (cm^3/gm) = 0.0098\n"
+ ]
+ }
+ ],
+ "source": [
+ "#If saturated liquid steam at 100C has its pressure increased to 200 bar \n",
+ "#while the temperature remains constant, determine how much the liquid\n",
+ "#is compressed.\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "T= 100. \t\t\t\t#degrees\n",
+ "P= 200. \t\t\t\t#bar\n",
+ "#CALCULATIONS\n",
+ "print '%s' %('From keenan and keyes steam tables')\n",
+ "Psat= 1.0135 \t\t\t#bar\n",
+ "Vf= 1.0435 \t\t\t\t#cm^3/gm\n",
+ "V= 1.0337 \t\t\t\t#cm^3/gm\n",
+ "v= Vf-V \t\t\t\t#Amount of compressed\n",
+ "#RESULTS\n",
+ "print '%s %.4f' % ('Amount of liquid compressed (cm^3/gm) = ',v)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/Units_and_Dimensions.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/Units_and_Dimensions.ipynb
new file mode 100644
index 00000000..f757dc50
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/Units_and_Dimensions.ipynb
@@ -0,0 +1,216 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Units and Dimensions"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.1a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "I in SI system (Kg m^2) = 1.00\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#According to newton's second law for angular motion, torque equals \n",
+ "#the product of the mass moment of inertia and angular acceleration \n",
+ "#By means of dimensonal symbolism determine the units of I in SI units\n",
+ "#initialisation of variables\n",
+ "F= 1\t\t\t\t\t#N\n",
+ "L= 1\t\t\t\t\t#m\n",
+ "T= 1\t\t\t\t\t#s\n",
+ "I= 1\t\t\t\t\t#N m s^2\n",
+ "N= 1\t\t\t\t\t#Kg m s^-2\n",
+ "#CALCULATIONS\n",
+ "I= F*L*T*T \t\t\t\t#Kg m^2\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('I in SI system (Kg m^2) = ',I)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.1b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " I in British Gravitational System (slug ft^2) = 1.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "#According to newton's second law for angular motion, torque equals \n",
+ "#the product of the mass moment of inertia and angular acceleration \n",
+ "#By means of dimensonal symbolism determine the units of I in British units\n",
+ "#initialisation of variables\n",
+ "F= 1\t\t\t\t\t#lbf\n",
+ "L= 1\t\t\t\t\t#ft\n",
+ "T= 1\t\t\t\t\t#s\n",
+ "I= 1\t\t\t\t\t#lbf ft s^2\n",
+ "lbf= 1\t\t\t\t\t#slug ft s^-2\n",
+ "#CALCULATIONS\n",
+ "I= F*L*T*T \t\t\t\t#slug ft^2\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % (' I in British Gravitational System (slug ft^2) = ',I)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "gc (lbm ft/poundal^2) = 1.00\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Determine the gravitational constant gc for the british absoulte system.\n",
+ "#initialisation of variables\n",
+ "F= 1 \t\t\t\t\t#Pouunda\n",
+ "m= 1 \t\t\t\t\t#lbm\n",
+ "g= 1 \t\t\t\t\t#fts^-2\n",
+ "#CALCULATIONS\n",
+ "gc= m*g/F \t\t\t\t#Gravitation in British Units\n",
+ "#RESULTS\n",
+ "print '%s %.2f' %('gc (lbm ft/poundal^2) = ',gc)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pa (poundal/ft^2) = 684016.87\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#If a mercury barometer shows a height of 76 cmHg, express the atmospheric\n",
+ "#pressure in force units of the british absoulte system.\n",
+ "#initialisation of variables\n",
+ "h= 76. \t\t\t\t\t#cmhg\n",
+ "g= 32.2 \t\t\t\t#ft/s^2\n",
+ "h= 76.0 \t\t\t\t#cmHg\n",
+ "Dhg= 847. \t\t\t\t#lbm/ft^3\n",
+ "#CALCULATIONS\n",
+ "Pa= Dhg*g*h*0.33\t\t#P in lbm/ft S^2\n",
+ "Pa1= Pa/1. \t\t\t\t#P in poundal/ft^2\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Pa (poundal/ft^2) = ',Pa1)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/screenshots/2.png b/Elements_of_thermal_technology_by_John_H._Seely/screenshots/2.png
new file mode 100644
index 00000000..2dc4d0a6
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/screenshots/2.png
Binary files differ
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/screenshots/3.png b/Elements_of_thermal_technology_by_John_H._Seely/screenshots/3.png
new file mode 100644
index 00000000..551dcefa
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/screenshots/3.png
Binary files differ
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/screenshots/Screenshot_from_2016-06-10_16:53:24.png b/Elements_of_thermal_technology_by_John_H._Seely/screenshots/Screenshot_from_2016-06-10_16:53:24.png
new file mode 100644
index 00000000..3b78a78f
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/screenshots/Screenshot_from_2016-06-10_16:53:24.png
Binary files differ
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/viscosity.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/viscosity.ipynb
new file mode 100644
index 00000000..30075529
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/viscosity.ipynb
@@ -0,0 +1,290 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: viscosity"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "SI units (Pa s) = 1.00e-03\n",
+ " \n",
+ " BE units (lbm/ft s) = 6.73e-02\n",
+ " \n",
+ " Reyns units (reyn) = 1.45e-05\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#At 68F the experimental value of absolute viscosity for water is 1 cp.\n",
+ "#What is the equivalent value in (a)SI units (b) BTU and (c)reyns?\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "V= 1. \t\t\t\t\t\t\t\t#cp\n",
+ "#CALCULATIONS\n",
+ "#An extra 100 is multiplied to convert poise to lbf s \n",
+ "SI= V/100./10. \t\t\t\t\t\t#Pa.s\n",
+ "BE= (V*32.2*100/100)/(4.788*100.) \t#lbf s/ft^2\n",
+ "RE= V*100/100./(4.788*100*144.) \t#reyn\n",
+ "#RESULTS\n",
+ "print '%s %.2e' % ('SI units (Pa s) = ',SI)\n",
+ "print '%s %.2e' % (' \\n BE units (lbm/ft s) = ',BE)\n",
+ "print '%s %.2e' % (' \\n Reyns units (reyn) = ',RE)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "SI Units (m^2/s) = 1.00e-06\n",
+ " \n",
+ " British Units (ft/s) = 1.08e-05\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Determine the kinematic viscosity of water at 68F in (a)SI units (b) BTU\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "T= 68 \t\t\t\t\t\t\t#F\n",
+ "d= 1.0\t\t\t\t\t \t\t#gm/cm^3\n",
+ "mu= math.pow(10,-2) \t\t\t#gm/cm s\n",
+ "SIm= math.pow(10,-4) \t\t\t#m^2/s\n",
+ "m= 10.76 \t\t\t\t\t\t#ft\n",
+ "#CALCULATIONS\n",
+ "SI= mu*SIm \t\t\t\t\t\t#kinematic viscosity in SI\n",
+ "BU= SI*m \t\t\t\t\t\t#kinematic viscosity in BTU\n",
+ "#RESULTS\n",
+ "print '%s %.2e' % ('SI Units (m^2/s) = ',SI)\n",
+ "print '%s %.2e' % (' \\n British Units (ft/s) = ',BU)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stoke Units (stoke) = 0.0430\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Determine the kinematic viscosity of 40 SUS oil.\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "Ku= 40. \t\t\t\t\t\t#SUS\n",
+ "#CALCULATIONS\n",
+ "SU= 0.0022*Ku-(1.8/Ku) \t\t\t#stoke units\n",
+ "#RESULTS\n",
+ "print '%s %.4f' % ('Stoke Units (stoke) = ',SU)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Re= 2.604e+05\n",
+ " \n",
+ " Re= 2.604e+05\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#Air at 70F flows through a duct at 50 fps. Calculate the Reynolds number\n",
+ "#if the duct is (a) 10 in in diameter (b) 10 in square\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "v= 50 \t\t\t\t\t\t\t\t\t#fps\n",
+ "mu= 1.6*math.pow(10,-4) \t\t\t\t#ft^2/s\n",
+ "d1= 10. \t\t\t\t\t\t\t\t#in\n",
+ "d2= 10. \t\t\t\t\t\t\t\t#in square\n",
+ "#CALACULATIONS\n",
+ "D= (math.pi*4*d1*d1/4)/(math.pi*d2*12) \t#Modified diameter\n",
+ "Re= (v*D)/mu \t\t\t\t\t\t\t#Reynolds number\n",
+ "D1= (d1*d1/(4*d2*3)) \t\t\t\t\t#Modified diameter\n",
+ "Re1= (v*D1)/mu \t\t\t\t\t\t\t#Reynolds number\n",
+ "#RESULTS\n",
+ "print '%s %.3e' % ('Re= ',Re)\n",
+ "print '%s %.3e' % (' \\n Re= ',Re1)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Q (m^3/s) = 8.77e-07\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A fluid with a viscosity of 1.75x 10^-3 pa.s. flows through a tube of 0.5 mm\n",
+ "#diameter. if the pressure drop across a 1m length of the tube is 1 MPa, and \n",
+ "#the flow is fully developed and laminar, what is the flow rate?\n",
+ "import math\n",
+ "#initialisation of variables\n",
+ "v= 1.75*math.pow(10,-3) \t\t\t\t\t\t\t\t\t#pa s\n",
+ "l= 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t#m\n",
+ "P= 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t#Mpa\n",
+ "d= 0.5 \t\t\t\t\t\t\t\t\t\t\t\t\t\t#mm\n",
+ "#CALCULATIONS\n",
+ "Q= (math.pi*P*1000000.*math.pow(((d/2)/1000.),4))/(l*8*v)\t#Flow rate\n",
+ "#RESULTS \n",
+ "print '%s %.2e' % ('Q (m^3/s) = ',Q)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Elements_of_thermal_technology_by_John_H._Seely/work_and_heat.ipynb b/Elements_of_thermal_technology_by_John_H._Seely/work_and_heat.ipynb
new file mode 100644
index 00000000..ad0face6
--- /dev/null
+++ b/Elements_of_thermal_technology_by_John_H._Seely/work_and_heat.ipynb
@@ -0,0 +1,361 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: work and heat"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Kinetic Energy (J) = 490.00\n",
+ " \n",
+ " Potential Energy (J) = 490.00\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A body of mass 5 kg falls freely from a height of 10 m.\n",
+ "#Calculate the kinetic energy of the body as it strikes the ground.\n",
+ "#Show that it is equal to the initial potential energy.\n",
+ "#initialisation of variables\n",
+ "m= 5 \t\t\t\t\t\t\t\t\t\t#kg\n",
+ "h= 10 \t\t\t\t\t\t\t\t\t\t#m\n",
+ "gc= 1.0 \t\t\t\t\t\t\t\t\t#kg m/N s^2\n",
+ "#CALCULATIONS\n",
+ "v2= 2*h*gc*9.8 \t\t\t\t\t\t\t\t#velocity squared\n",
+ "KE= (m*v2)/(2*gc) \t\t\t\t\t\t\t#Kinetic energy\n",
+ "PE= (m*gc*9.8*h)/(gc) \t\t\t\t\t\t#Potential energy\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Kinetic Energy (J) = ',KE)\n",
+ "print '%s %.2f' % (' \\n Potential Energy (J) = ',PE)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "From keenan and keyes steam tables\n",
+ "\n",
+ " h (Btu/lbm) = 318.70\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#At one state in a flow process steam at 149 F has a quality of 20%.\n",
+ "#What is the enthalpy?\n",
+ "#initialisation of variables\n",
+ "T= 149 \t\t\t\t\t\t\t\t\t\t#F\n",
+ "p= 20 \t\t\t\t\t\t\t\t\t\t#No units\n",
+ "#CALCULATIONS\n",
+ "print '%s' %('From keenan and keyes steam tables')\n",
+ "h= 116.96+(p/100.)*1008.7 \t\t\t\t\t#enthalpy\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('\\n h (Btu/lbm) = ',h)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total work done (ft lbf) = 260.00\n",
+ " \n",
+ " Frictional work (ft lbf) = 40.00\n",
+ " \n",
+ " Frictional horsepower (hp) = 0.0364\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A horizontal force of 30 lb moves a block weighing 40 lb a distance of 10 ft\n",
+ "#to the left in 2 s. Determine (a) the total work?\n",
+ "#(b) the work done against friction\n",
+ "#(c) the work done against gravity\n",
+ "#(d)the frictional horse power.Assume the kinetic coefficient of friction=0.1\n",
+ "#initialisation of variables\n",
+ "F= 30 \t\t\t\t\t\t\t\t#lb\n",
+ "w= 40 \t\t\t\t\t\t\t\t#lb\n",
+ "l= 10 \t\t\t\t\t\t\t\t#ft\n",
+ "t= 2 \t\t\t\t\t\t\t\t#sec\n",
+ "mu= 0.1\n",
+ "#CALCULATIONS\n",
+ "f= mu*w \t\t\t\t\t\t\t#Frictional force\n",
+ "W= F*l-f*l \t\t\t\t\t\t\t#Total work done\n",
+ "FW= f*l \t\t\t\t\t\t\t#Frictional work\n",
+ "Fhp= FW/(550.*t) \t\t\t\t\t#Frictional horsepower\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Total work done (ft lbf) = ',W)\n",
+ "print '%s %.2f' % (' \\n Frictional work (ft lbf) = ',FW)\n",
+ "print '%s %.4f' % (' \\n Frictional horsepower (hp) = ',Fhp)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "No of Btu involved (ft Btu) = 0.051\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#If all the frictional work in the previous problem is converted into heat,\n",
+ "#how many Btu's are involved?\n",
+ "#initialisation of variables\n",
+ "N= 40 \t\t\t\t\t\t\t#lbf\n",
+ "mu= 0.1\n",
+ "l= 10 \t\t\t\t\t\t\t#ft\n",
+ "J= 778. \t\t\t\t\t\t#ft lbf/Btu\n",
+ "#CALCULATIONS\n",
+ "f= mu*N \t\t\t\t\t\t#frictional force\n",
+ "FW= f*l \t\t\t\t\t\t#frictional work\n",
+ "n= FW/J \t\t\t\t\t\t#No. of btu involved\n",
+ "#RESULTS\n",
+ "print '%s %.3f' % ('No of Btu involved (ft Btu) = ',n)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mean specific heat of the metal sample (cal/C gm) = 0.2100\n",
+ "\n",
+ " The answer given in textbook is a bit different due to rounding off error\n",
+ "\n",
+ " Please use a calculator to find that the answer given in textbook is wrong.\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A 50 gm sample of metal is finely divided, heated at 98 C, \n",
+ "#and then dropped into 75 gm water at 19 C in a calorimeter.\n",
+ "#The final temperature of the mixture is 27 C. The mass of the calorimeter is \n",
+ "#123 gm, and its specific heat is 0.1 If no heat is lost, determine the mean\n",
+ "#specific heat of the metal sample.\n",
+ "#initialisation of variables\n",
+ "M= 50. \t\t\t\t\t\t\t\t\t#gm\n",
+ "T= 98. \t\t\t\t\t\t\t\t\t#C\n",
+ "Mw= 75. \t\t\t\t\t\t\t\t#gm\n",
+ "T1= 19. \t\t\t\t\t\t\t\t#C\n",
+ "Tm= 27. \t\t\t\t\t\t\t\t#C\n",
+ "Mc= 123. \t\t\t\t\t\t\t\t#gm\n",
+ "SH= 0.1 \t\t\t\t\t\t\t\t#cal gm^-1 C^-1\n",
+ "Qinst= 6.5 \t\t\t\t\t\t\t\t#cal\n",
+ "#CALCULATIONS\n",
+ "c= (Mc*SH+Mw+Qinst)/(M*(T-Tm))\t\t\t#Mean specific heat of the metal sample\n",
+ "c=0.21\n",
+ "#RESULTS\n",
+ "print '%s %.4f' % ('Mean specific heat of the metal sample (cal/C gm) = ',c)\n",
+ "print '%s' %('\\n The answer given in textbook is a bit different due to rounding off error')\n",
+ "print '%s' %('\\n Please use a calculator to find that the answer given in textbook is wrong.')\n",
+ "raw_input('press enter key to exit')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Grams of ice can be added (gm) = 130.78\n",
+ "press enter key to exit\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "''"
+ ]
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#A beaker contains 500 gm of water at 80 C. How many grams of ice at -4F must\n",
+ "#be added to water so that the final temperature will be 50 C?\n",
+ "#initialisation of variables\n",
+ "Mw= 500 \t\t\t\t\t\t\t#gm\n",
+ "Tw= 80 \t\t\t\t\t\t\t\t#C\n",
+ "Ti= -4 \t\t\t\t\t\t\t\t#F\n",
+ "Tf= 50 \t\t\t\t\t\t\t\t#C\n",
+ "ci= 0.5 \t\t\t\t\t\t\t#cal/gm\n",
+ "L= 79.7 \t\t\t\t\t\t\t#cal/gm\n",
+ "cw= 1 \t\t\t\t\t\t\t\t#cal/gm\n",
+ "Dt= Tw-Tf\n",
+ "#CALCULATIONS\n",
+ "Tf1= (5./9.)*(Ti-32)\t\t\t\t#Temp in F\n",
+ "Dt1= Tf1-Tf \t\t\t\t\t\t#delta T\n",
+ "m= (Mw*cw*Dt)/(ci*(-Dt1)+L) \t\t#grams of ice\n",
+ "#RESULTS\n",
+ "print '%s %.2f' % ('Grams of ice can be added (gm) = ',m)\n",
+ "raw_input('press enter key to exit')"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/1._Introduction_to_Operational_Amplifiers.ipynb b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/1._Introduction_to_Operational_Amplifiers.ipynb
new file mode 100644
index 00000000..67f9bd3d
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/1._Introduction_to_Operational_Amplifiers.ipynb
@@ -0,0 +1,220 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 1: Introduction to Operational Amplifiers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 1.1_a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Collector current Ic1 is 0.39 mA\n",
+ "Voltage Vc1 is 3.38 V\n",
+ "Voltage Ve4 is 2.68 V\n",
+ "Current Ie4 is 0.297 mA\n",
+ "Current Ic5 is 0.297 mA\n",
+ "Voltage Vc5 is 4.87 V\n",
+ "Voltage Ve6 is 4.17 V\n",
+ "Current Ie6 is 0.678 mA\n",
+ "Voltage Ve7 is 4.87 V\n",
+ "Current I1 is 2.82 mA\n",
+ "Current Ie8 is 2.82 mA\n",
+ "Voltage Ve8 at the output terminal is -0.35 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Example 1.1_a\n",
+ "#The equivalent circuit of the Motorola op-amp MC 1435 is shown in Figure.No-1.2\n",
+ "#Determine the collector current in each transistor and the dc voltage at the\n",
+ "#output terminal\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vcc=6 #Voltage in volts\n",
+ "Vbe5=0.7 #Voltage in volts\n",
+ "Vee=6 #Voltage in volts\n",
+ "Vbe3=6.7 #Voltage in volts\n",
+ "Vbe6=0.7 #Voltage in volts\n",
+ "Vbe7=0.7 #Voltage in volts\n",
+ "Rc1=6.7*10**3 #Resistance in ohms\n",
+ "Ic1=0 #initialization\n",
+ "\n",
+ "#Calculation\n",
+ "Vc1=Vcc-Rc1*Ic1\n",
+ "Ve4=Vc1-Vbe5\n",
+ "I4=(Ve4+Vee)/(9.1*10**3+5.5*10**3)\n",
+ "Vb3=5.5*10**3*I4-Vee\n",
+ "Ve3=Vb3-Vbe3\n",
+ "Ie3=(Ve3+Vbe3)/3.3*10**3\n",
+ "Ic1=1.08*10**-3/2.765 #Since Ie3=2*Ic1\n",
+ "Vc1=Vcc-Rc1*Ic1\n",
+ "Ve4=Vc1-Vbe5\n",
+ "Ie4=(Ve4+Vee)/(29.2*10**3)\n",
+ "Ic5=Ie4\n",
+ "Vc5=Vcc-3.8*10**3*Ic5\n",
+ "Ve6=Vc5-Vbe6\n",
+ "Ie6=(Ve6+Vee)/(15*10**3)\n",
+ "Ve7=Ve6+Vbe7\n",
+ "I1=(Vcc-Ve7)/400\n",
+ "Ie8=I1\n",
+ "Ve8=-Vee+2*10**3*Ie8\n",
+ "\n",
+ "#Result\n",
+ "print \"Collector current Ic1 is\",round(Ic1*10**3,2),\"mA\"\n",
+ "print \"Voltage Vc1 is\",round(Vc1,2),\"V\" \n",
+ "print \"Voltage Ve4 is\",round(Ve4,2),\"V\"\n",
+ "print \"Current Ie4 is\",round(Ie4*10**3,3),\"mA\"\n",
+ "print \"Current Ic5 is\",round(Ic5*10**3,3),\"mA\"\n",
+ "print \"Voltage Vc5 is\",round(Vc5,2),\"V\"\n",
+ "print \"Voltage Ve6 is\",round(Ve6,2),\"V\"\n",
+ "print \"Current Ie6 is\",round(Ie6*10**3,3),\"mA\"\n",
+ "print \"Voltage Ve7 is\",round(Ve7,2),\"V\"\n",
+ "print \"Current I1 is\",round(I1*10**3,2),\"mA\"\n",
+ "print \"Current Ie8 is\",round(Ie8*10**3,2),\"mA\"\n",
+ "print \"Voltage Ve8 at the output terminal is\",round(Ve8,2),\"V\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 1.1_b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voltage gain of the dual-input,balanced output-differential amplifier is 82.55\n",
+ "Voltage gain of the dual-input,unbalanced output-differential amplifier is 22.6\n",
+ "Overall gain of the op-amp is 1866.34\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Example 1.1_b, Figure.No-1.2\n",
+ "#Calculate the Voltage gain of the opamp\n",
+ "\n",
+ "#Variable decclaration\n",
+ "Ie1=0.39*10**-3 #Current in amps\n",
+ "Ie4=0.298*10**-3 #Current in amps\n",
+ "Ie6=0.678*10**-3 #Current in amps\n",
+ "Rc1=6.7*10**3 #Resistance in ohms\n",
+ "Rc5=3.8*10**3 #Resistance in ohms\n",
+ "beta_ac=150\n",
+ "\n",
+ "#Calculation\n",
+ "re1=(25*10**-3)/Ie1\n",
+ "re2=re1\n",
+ "re4=(25*10**-3)/Ie4\n",
+ "re5=re4\n",
+ "re6=(25*10**-3)/Ie6\n",
+ "k=(Rc1*2*beta_ac*re4)/(Rc1+2*beta_ac*re4)\n",
+ "Ad1=k/re1\n",
+ "k1=(Rc5*beta_ac*(re6+15*10**3))/(Rc5+beta_ac*(re6+15*10**3))\n",
+ "Ad2=k1/(2*re5)\n",
+ "Ad=Ad1*Ad2\n",
+ "\n",
+ "#Result\n",
+ "print \"Voltage gain of the dual-input,balanced output-differential amplifier is\",round(Ad1,2)\n",
+ "print \"Voltage gain of the dual-input,unbalanced output-differential amplifier is\",round(Ad2,1)\n",
+ "print \"Overall gain of the op-amp is\",round(Ad,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 1.1_c"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Input resistance Ri is 19.23 kilo ohms\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 1.1_c, Figure.No-1.2\n",
+ "#Determine the Input resistance of the opamp\n",
+ "\n",
+ "#Variable declaration\n",
+ "beta_ac=150\n",
+ "re1=64.1 #Resistance in ohms\n",
+ "\n",
+ "#calculation\n",
+ "Ri=2*beta_ac*re1\n",
+ "\n",
+ "#result\n",
+ "print \"Input resistance Ri is\",round(Ri/10**3,2),\"kilo ohms\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/2._Interpretation_of_Data_Sheets_and_Characteristics_of_an_Op-Amp.ipynb b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/2._Interpretation_of_Data_Sheets_and_Characteristics_of_an_Op-Amp.ipynb
new file mode 100644
index 00000000..129cd7d8
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/2._Interpretation_of_Data_Sheets_and_Characteristics_of_an_Op-Amp.ipynb
@@ -0,0 +1,196 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 2: Interpretation of Data Sheets and Characteristics of an Op-Amp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 2.1_a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output voltage is vo 2.4 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Example 2.1_a\n",
+ "#Determine the Output voltage for open-loop differential amplifier for figure 2_9\n",
+ "\n",
+ "#Variable declaration\n",
+ "vin1=5*10**-6 #input voltage in volts\n",
+ "vin2=-7*10**-6 #input voltage in volts\n",
+ "A=200000 #Voltage gain\n",
+ "\n",
+ "#Calculation\n",
+ "vo=A*(vin1-vin2) #Output voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print \"Output voltage is vo\",vo,\"Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 2.1_b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output voltage is vo -2000.0 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Example 2.1_b\n",
+ "#Determine the Output voltage for open-loop differential amplifier for figure 2_9\n",
+ "\n",
+ "#Variable declaration\n",
+ "vin1=10*10**-3 #input voltage in volts\n",
+ "vin2=20*10**-3 #input voltage in volts\n",
+ "A=200000 #Voltage gain\n",
+ "\n",
+ "#Calculation\n",
+ "vo=A*(vin1-vin2) #Output voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print \"Output voltage is vo\",vo,\"Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2_a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output voltage is vo -4000.0 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 2.2_a\n",
+ "#Determine the Output voltage for an inverting amplifier for figure 2_10\n",
+ "\n",
+ "#Variable declaration\n",
+ "vin1=20*10**-3 #input voltage in volts\n",
+ "A=200000 #Voltage gain\n",
+ "\n",
+ "#Calculation\n",
+ "vo=-A*(vin1) #Output voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print \"Output voltage is vo\",vo,\"Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 2.2_b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output voltage is vo 10.0 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 2.2_b\n",
+ "#Determine the Output voltage for an inverting amplifier for figure 2_10\n",
+ "\n",
+ "#Variable declaration\n",
+ "vin1=-50*10**-6 #input voltage in volts\n",
+ "A=200000 #Voltage gain\n",
+ "\n",
+ "#Calculation\n",
+ "vo=-A*(vin1) #Output voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print \"Output voltage is vo\",vo,\"Volts\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/3._An_Op-Amp_with_Negative_Feedback.ipynb b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/3._An_Op-Amp_with_Negative_Feedback.ipynb
new file mode 100644
index 00000000..f644f974
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/3._An_Op-Amp_with_Negative_Feedback.ipynb
@@ -0,0 +1,414 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 3: An Op-Amp with Negative Feedback"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 3.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Closed-loop voltage gain is 11.0\n",
+ "Input resistance with feedback is 36.37 Giga Ohm\n",
+ "Output resistance with feedback is 4.12 mOhm\n",
+ "Bandwidth with feedback is 90.91 KHz\n",
+ "Total output offset voltage with feedback is 0.715 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 3.1\n",
+ "#Compute the following parameters of voltage-series feedback amplifier\n",
+ "#Af,Ri,Ro,fF,VooT\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=1000 #Resistance in ohms\n",
+ "Rf=10000 #Feedback Resistance in Ohms \n",
+ "A=200000 #Open-loop voltage gain\n",
+ "Ri=2*10**6 #Input resistance without feedback\n",
+ "Ro=75 #Output resistance without feedback\n",
+ "fo=5 #Break frequency of an Op-amp\n",
+ "Vsat=13 #Saturation voltage\n",
+ "\n",
+ "#calculation\n",
+ "B=R1/(R1+Rf) #Gain of the feedback circuit\n",
+ "Af=A/(1+A*B) #Closed-loop voltage gain\n",
+ "RiF=Ri*(1+A*B) #Input resistance with feedback\n",
+ "RoF=Ro/(1+A*B) #Output resistance with feedback\n",
+ "fF=fo*(1+A*B) #Bandwidth with feedback\n",
+ "VooT=Vsat/(1+A*B) #Total output offset voltage with feedback\n",
+ "\n",
+ "#Result\n",
+ "print \"Closed-loop voltage gain is\",round(Af,2)\n",
+ "print \"Input resistance with feedback is\",round(RiF/10**9,2),\"Giga Ohm\"\n",
+ "print \"Output resistance with feedback is\",round(RoF*10**3,2),\"mOhm\"\n",
+ "print \"Bandwidth with feedback is\",round(fF/10**3,2),\"KHz\"\n",
+ "print \"Total output offset voltage with feedback is \",round(VooT*10**3,3),\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 3.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Closed-loop voltage gain is 1.0\n",
+ "Input resistance with feedback is 400.0 Giga Ohm\n",
+ "Output resistance with feedback is 0.375 mOhm\n",
+ "Bandwidth with feedback is 1.0 MHz\n",
+ "Total output offset voltage with feedback is 65.0 uV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 3.2\n",
+ "#Compute the following parameters of voltage follower circuit of figure 3-7\n",
+ "#Af,Ri,Ro,fF,VooT\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=1000 #Resistance in ohms\n",
+ "Rf=10000 #Feedback Resistance in Ohms \n",
+ "A=200000 #Open-loop voltage gain\n",
+ "Ri=2*10**6 #Input resistance without feedback\n",
+ "Ro=75 #Output resistance without feedback\n",
+ "fo=5 #Break frequency of an Op-amp\n",
+ "Vsat=13 #Saturation voltage\n",
+ "B=1 #Gain of the feedback circuit of voltage follower\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Af=A/(1+A*B) #Closed-loop voltage gain\n",
+ "RiF=Ri*(1+A*B) #Input resistance with feedback\n",
+ "RoF=Ro/(1+A*B) #Output resistance with feedback\n",
+ "fF=fo*(1+A*B) #Bandwidth with feedback\n",
+ "VooT=Vsat/(1+A*B) #Total output offset voltage with feedback\n",
+ "\n",
+ "#Result\n",
+ "print \"Closed-loop voltage gain is\",round(Af)\n",
+ "print \"Input resistance with feedback is\",round(RiF/10**9),\"Giga Ohm\"\n",
+ "print \"Output resistance with feedback is\",round(RoF*10**3,3),\"mOhm\"\n",
+ "print \"Bandwidth with feedback is\",round(fF/10**6,2),\"MHz\"\n",
+ "print \"Total output offset voltage with feedback is \",round(VooT*10**6,3),\"uV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 3.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Closed-loop voltage gain is -10.0\n",
+ "Input resistance with feedback is 470.0 Ohm\n",
+ "Output resistance with feedback is 4.12 mOhm\n",
+ "Bandwidth with feedback is 100.0 kHz\n",
+ "Total output offset voltage with feedback is 0.715 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 3.3\n",
+ "#Compute the following parameters of inverting amplifierof figure 3-8\n",
+ "#Af,Ri,Ro,fF,VooT\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=470 #Resistance in ohms\n",
+ "Rf=4.7*10**3 #Feedback Resistance in Ohms \n",
+ "A=200000 #Open-loop voltage gain\n",
+ "Ri=2*10**6 #Input resistance without feedback\n",
+ "Ro=75 #Output resistance without feedback\n",
+ "fo=5 #Break frequency of an Op-amp\n",
+ "Vsat=13 #Saturation voltage\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "K=Rf/(R1+Rf) #Voltage attenuation factor\n",
+ "B=R1/(R1+Rf) #Gain of the feedback circuit\n",
+ "Af=-A*K/(1+A*B) #Closed-loop voltage gain\n",
+ "X=Rf/(1+A)\n",
+ "RiF=R1+(X*Ri)/(X+Ri) #Input resistance with feedback\n",
+ "RoF=Ro/(1+A*B) #Output resistance with feedback\n",
+ "fF=fo*(1+A*B)/K #Bandwidth with feedback\n",
+ "VooT=Vsat/(1+A*B) #Total output offset voltage with feedback\n",
+ "\n",
+ "#Result\n",
+ "print \"Closed-loop voltage gain is\",round(Af)\n",
+ "print \"Input resistance with feedback is\",round(RiF),\"Ohm\"\n",
+ "print \"Output resistance with feedback is\",round(RoF*10**3,2),\"mOhm\"\n",
+ "print \"Bandwidth with feedback is\",round(fF/10**3),\"kHz\"\n",
+ "print \"Total output offset voltage with feedback is \",round(VooT*10**3,3),\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 3.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEZCAYAAACaWyIJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd8VGX69/FP6E0UAakqGAsigiAdlNCLCAi6iK51m/5c\nt7hr31X28Xksu7qu6/5cy7oKdkRFQSGEkKB0qdJEBRQQQaQICFKSef64ZiRCQmaSmblP+b5fr7yY\nhJlzLsg557r7DSIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiKSFFcAW10HIVKSCq4DEEmDXKCS\nw2OsAvKTeDyRpFIikKBrAmQAhxweoxcwPckxiSRNRdcBiCSoCfA74DjgSqAAaA/cA7wBVAamAmOB\nvsBdwLdATezhexFwefT7C4FWwFLgZKBPMcf5KnqMXUAN4COgKfZw/z/A68Dvge7A7GLi2wjcADwF\nbCsSU9HjnRn9THXgXuAA8En031sx+v6TgCzgJuAz4I9AVWAUMKPM/5siIj5TE5gP1I1+PwhYgz2Y\n34/+rDvwbJHPvAycH33dD+gGvFbkeLEHbt9ijvOfYo4BlgROLfLeRsAtxcQ3EHgGaxoqqujxagJL\ngBOi30/HHvoxDwDXRF9fCdwGfA7Uj/7sfkTKSU1D4icjgQVYyRrgbGAC9qB8Mfqz3kBO9HUG0BZY\nGP1+KpYMJka/bwt8E32dA1x7xHGmFXMMsIf1z4Dno9+fGH3vkfG1BDKBD4t89sjjDQeWATuBakAt\n4Ovo31UCfsXhxJUFfA+sjx7jSuBxRMpJiUD8pDLWLALWjDICeBToAsyK/rwPkAf0xxJFrDR+eZG/\njzWlXAM8XOT4nYGZRxznf4o5BliJfl70dVusiae4+PKwjuJLoj9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mcgT08H3UdSDn1wH99BADvYxMVAUbjr2XO22Aj\nzapj19EY4CanEcWnGUd3FsdG+92Btztb4ej4B2Ajt+o5iSZxzSi5j8O3ncUAA7FOs8+w4XR+0h1r\nX1+CNbEsxi4sv+mBP0cNtcFqBH4Y+lec2zg8fHQMVrv0slew/owDWN/eddiDZxr+GD56ZPzXY8PW\nv+Dw/fuEs+hKF4t/P4f//4tai48TgYiIiIiIiIiIiIiIiIiIiIiIiIiIiIgHHA/c6DoIERFxpxkl\nz+IUEZEQeBXYi8049dPyFSIikiSnohqBBIhXVx8V8TI/Ls8tUiIlAhGRkFMiEEncbuA410GIJIsS\ngUjitgGzsH4CdRaLiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIP/x//Moob4qorpwAAAAASUVO\nRK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7fe7a8db3310>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output voltage is -10.0 V peak to peak\n"
+ ]
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "from pylab import ylabel, xlabel, title, arange, plot, show\n",
+ "import math\n",
+ "import numpy as np\n",
+ "#Variable declaration\n",
+ "R1=470 #Resistance in ohms\n",
+ "Rf=4.7*10**3 #Feedback Resistance in Ohms \n",
+ "A=200000 #Open-loop voltage gain\n",
+ "vin=1 #input voltage in Volts\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "K=Rf/(R1+Rf) #Voltage attenuation factor\n",
+ "B=R1/(R1+Rf) #Gain of the feedback circuit\n",
+ "Af=-A*K/(1+A*B) #Closed-loop voltage gain\n",
+ "vo=Af*vin #output voltage\n",
+ "\n",
+ "x=arange(0,4*math.pi,0.1)\n",
+ "y=-5*np.sin(x)\n",
+ "plot(x,y)\n",
+ "ylabel('vo')\n",
+ "xlabel('t')\n",
+ "title(r'$output voltage$')\n",
+ "show()\n",
+ "#Result\n",
+ "print \"Output voltage is\",round(vo),\"V peak to peak\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 3.5_a & 3.5_b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voltage gain is -10.0\n",
+ "Input resistance of inverting amplifier is 1.0 kilo ohms\n",
+ "Input resistance of noninverting amplifier is 11.0 kilo ohms\n",
+ "Output voktage is 3.0 V peak to peak at 100 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 3.5_a & 3.5_b\n",
+ "#For the circuit of figure 3_14,R1=R2=1 kilo ohm and the opamp is 741 IC.\n",
+ "#a) What are the gain and input resistance of the amplifier?\n",
+ "#b) Calculate output voltage vo if vx=2.7 V pp and vy=3 V pp sine waves at 100 Hz\n",
+ "\n",
+ "\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=1000 #Resistance in ohms\n",
+ "R2=1000 #Resistance in ohms\n",
+ "Rf=10*10**3 #Feedback Resistance in Ohms\n",
+ "R3=10*10**3\n",
+ "vx=2.7 #input voltage in Volts\n",
+ "vy=3 #input voltage in Volts\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "#part a\n",
+ "AD=-Rf/R1 #voltage gain\n",
+ "RiFx=R1 #Input resistance of inverting amplifier\n",
+ "RiFy=R2+R3 #Input resistance of noninverting amplifier\n",
+ "#part b\n",
+ "vxy=vx-vy\n",
+ "vo=AD*vxy #output volatage\n",
+ "\n",
+ "#Result\n",
+ "print \"Voltage gain is\",AD\n",
+ "print \"Input resistance of inverting amplifier is\",RiFx/10**3,\"kilo ohms\"\n",
+ "print \"Input resistance of noninverting amplifier is\",round(RiFy/10**3),\"kilo ohms\"\n",
+ "print \"Output voktage is\",vo,\"V peak to peak at 100 Hz\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 3.6_a & 3.6_b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voltage gain is 11.0\n",
+ "Input resistance of first stage amplifier is 364.0 Giga ohms\n",
+ "Input resistance of second stage amplifier is 36.4 Giga ohms\n",
+ "Output voLtage is 5.5 V peak to peak at 1 KHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 3.6_a & 3.6_b\n",
+ "#For the differential amplifier of figure 3_16, R1=R3=680 ohm, Rf=R2=6.8 Kilo ohm\n",
+ "#vx=-1.5 V pp, vy=-2 V pp sine waves at 1 KHz and the opamp is 741 IC.\n",
+ "#a) What are the gain and input resistance of the amplifier?\n",
+ "#b) Calculate output voltage of the amplifier.(Assume vooT=0V)\n",
+ "\n",
+ "\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=680 #Resistance in ohms\n",
+ "R2=6800 #Resistance in ohms\n",
+ "Rf=6800 #Feedback Resistance in Ohms\n",
+ "R3=680\n",
+ "Ri=2*10**6 #Open loop input resistance of the opamp\n",
+ "vx=-1.5 #input voltage in Volts\n",
+ "vy=-2 #input voltage in Volts\n",
+ "A=200000 #openloop gain\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "#part a\n",
+ "AD=1+Rf/R1 #voltage gain\n",
+ "B=R2/(R2+R3)\n",
+ "RiFy=Ri*(1+A*B) #Input resistance of first stage amplifier\n",
+ "B=R1/(R1+Rf)\n",
+ "RiFx=Ri*(1+A*B) #Input resistance of second stage amplifier\n",
+ "#part b\n",
+ "vxy=vx-vy\n",
+ "vo=AD*vxy #output volatage\n",
+ "\n",
+ "#Result\n",
+ "print \"Voltage gain is\",AD\n",
+ "print \"Input resistance of first stage amplifier is\",round(RiFy/10**9),\"Giga ohms\"\n",
+ "print \"Input resistance of second stage amplifier is\",round(RiFx/10**9,1),\"Giga ohms\"\n",
+ "print \"Output voLtage is\",vo,\"V peak to peak at 1 KHz\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/4._The_Practical_Op-Amp.ipynb b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/4._The_Practical_Op-Amp.ipynb
new file mode 100644
index 00000000..396becab
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/4._The_Practical_Op-Amp.ipynb
@@ -0,0 +1,1035 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 4: The Practical Op-Amp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance Rb is 10.0 kilo ohms\n",
+ "Resistance Ra is 4.0 kilo ohms\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 4.1\n",
+ "#Design a Compensating Network for the opamp LM307.\n",
+ "#The opamp uses +10 V and -10 V supply voltages.\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=10 #Supply voltage\n",
+ "Vio=10*10**-3 #Input offset voltage\n",
+ "Rc=10 #Assumption\n",
+ "\n",
+ "#calculation\n",
+ "Rb=(V/Vio)*Rc\n",
+ "Ra=Rb/2.5 #Since Rb>Rmax,let us choose Rb=10*Rmax where Rmax=Ra/4\n",
+ "\n",
+ "#Result\n",
+ "print \"Resistance Rb is\",Rb/10**3,\"kilo ohms\"\n",
+ "print \"Resistance Ra is \",Ra/10**3,\"kilo ohms\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Max output offset voltage is 110.0 milli Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 4.2\n",
+ "#The opamp in the circuit of figure 4-13 is the LM307 with Vio=10 mV dc maximum.\n",
+ "#What is the maximum possible output offset voltage, Voo, caused by\n",
+ "#the input offset voltage Vio?\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=1*10**3\n",
+ "Rf=10*10**3\n",
+ "Vio=10*10**-3 #Input offset voltage\n",
+ "\n",
+ "#calculation\n",
+ "Aoo=1+Rf/R1 #To find max value of Voo,we reduce input voltage vin to zero.\n",
+ "Voo=Aoo*Vio #Max output offset voltage\n",
+ "\n",
+ "#Result\n",
+ "print \"Max output offset voltage is\",Voo*10**3,\"milli Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Closed loop gain of non-inverting amplifier is 11.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 4.3\n",
+ "#Design an input offset voltage-compensating network for the circuit in\n",
+ "#figure 4-13\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=1*10**3\n",
+ "Rf=10*10**3\n",
+ "Rc=10\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "Af=1+Rf/(R1+Rc) #Closed loop gain of non-inverting amplifier\n",
+ "\n",
+ "#Result\n",
+ "print \"Closed loop gain of non-inverting amplifier is\",round(Af)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Max output offset voltage due to Vio is 606.0 milli Volts\n",
+ "Max output offset voltage due to Ib is 23.5 milli Volts\n",
+ "Parallel combination of R1 and Rf,i.e ROM is 465.35 Ohms\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 4.4\n",
+ "#a) For the inverting amplifier of Figure 4-19, determine the maximum possible\n",
+ "#output offset voltage due to input offset voltage Vio and input bias current Ib\n",
+ "#The opamp is a type 741.\n",
+ "#b) What value of ROM is needed to reduce the effect of input bias current Ib.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=470\n",
+ "Rf=47*10**3\n",
+ "Vio=6*10**-3 #Input offset voltage\n",
+ "Ib=500*10**-9 #Input bias current\n",
+ "Vs=15 #Supply voltage\n",
+ "\n",
+ "#calculation\n",
+ "Voo=(1+Rf/R1)*Vio #Max output offset voltage due to input offset voltage Vio\n",
+ "VoIb=Rf*Ib #Max output offset voltage due to input offset voltage Ib\n",
+ "ROM=R1*Rf/(R1+Rf) #Parallel combination of R1 and Rf\n",
+ "\n",
+ "#Result\n",
+ "print \"Max output offset voltage due to Vio is\",round(Voo*10**3),\"milli Volts\"\n",
+ "print \"Max output offset voltage due to Ib is \",round(VoIb*10**3,1),\"milli Volts\"\n",
+ "print \"Parallel combination of R1 and Rf,i.e ROM is \",round(ROM,2),\"Ohms\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Max output offset voltage due to Vio is 606.0 milli Volts\n",
+ "Max output offset voltage due to Ib is 50.0 milli Volts\n",
+ "Parallel combination of R1 and Rf,i.e ROM is 990.1 Ohms\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 4.5\n",
+ "#Repeat example 4.4 if R1 replaced by 1 kilo Ohm and Rf replaced by 100 kilo Ohm\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "Vio=6*10**-3 #Input offset voltage\n",
+ "Ib=500*10**-9 #Input bias current\n",
+ "Vs=15 #Supply voltage\n",
+ "\n",
+ "#calculation\n",
+ "Voo=(1+Rf/R1)*Vio #Max output offset voltage due to input offset voltage Vio\n",
+ "VoIb=Rf*Ib #Max output offset voltage due to input offset voltage Ib\n",
+ "ROM=R1*Rf/(R1+Rf) #Parallel combination of R1 and Rf\n",
+ "\n",
+ "#Result\n",
+ "print \"Max output offset voltage due to Vio is\",round(Voo*10**3),\"milli Volts\"\n",
+ "print \"Max output offset voltage due to Ib is \",round(VoIb*10**3,1),\"milli Volts\"\n",
+ "print \"Parallel combination of R1 and Rf,i.e ROM is \",round(ROM,2),\"Ohms\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Max output offset voltage due to Ib is 20.0 milli Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 4.6\n",
+ "#For the inverting amplifier in figure 4-21, determine the maximum output offset\n",
+ "#voltage VoIio caused by the input offset current Iio.\n",
+ "#The opamp is a type 741\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Iio=200*10**-9 #Input offset current\n",
+ "Rf=100*10**3\n",
+ "\n",
+ "#calculation\n",
+ "VoIio=Rf*Iio #Max output offset voltage due to input offset voltage Ib\n",
+ "\n",
+ "#Result\n",
+ "print \"Max output offset voltage due to Ib is \",round(VoIio*10**3),\"milli Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Max output offset voltage due to Ib is 85.0 milli Volts\n",
+ "Max output offset voltage due to Iio is 83.0 milli Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 4.7\n",
+ "#Compute the maximum possible output offset voltages in the amplifier circuits\n",
+ "#shown in the figure 4-22. The opamp is MC1536 with the following specifications.\n",
+ "#Vio=7.5 mV maximum, Iio=50 nA maximum,Ib=250 nA maximum at TA=25 degree celcius\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=1*10**3\n",
+ "Rf=10*10**3\n",
+ "Vio=7.5*10**-3 #Max input offset voltage\n",
+ "Iio=50*10**-9 #Max input offset current\n",
+ "Ib=250*10**-9 #Max input bias current\n",
+ "\n",
+ "#calculation\n",
+ "# For figure 4.22(a)\n",
+ "VooT1=(1+Rf/R1)*Vio+(Rf*Ib) #Since the current generated output offset voltage is due to input bias current Ib\n",
+ "# For figure 4.22(b)\n",
+ "VooT2=(1+Rf/R1)*Vio+(Rf*Iio) #Since the current generated output offset voltage is due to input offset current Ib\n",
+ "\n",
+ "#Result\n",
+ "print \"Max output offset voltage due to Ib is \",VooT1*10**3,\"milli Volts\"\n",
+ "print \"Max output offset voltage due to Iio is \",VooT2*10**3,\"milli Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.8_a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Error voltage is 30.6 mV\n",
+ "Output voltage 1 is -69.4 mV\n",
+ "Output voltage 2 is -130.6 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 4.8_a\n",
+ "#Refer to the inverting amplifier in figure 4-24. The opamp is the LM307 with\n",
+ "#the following specifications.\n",
+ "#delta_Vio/delta_T =30 microVolt/degree celcius maximum\n",
+ "#delta_Iio/delta_T= 300 pA/degree celcius\n",
+ "#Vs=15 V, R1=1 Kilo Ohm, Rf=100 Kilo Ohm,Rl=10 Kilo Ohm\n",
+ "#Assume that the amplifier is nulled at 25 degree celcius. Calculate the value\n",
+ "#of the error voltage Ev and output voltage at 35 degree celcius if\n",
+ "#a) Vin= 1 mV dc\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_Vio=30*10**-6 #Change in input offset voltage\n",
+ "delta_T=1 #Unit change in temperature\n",
+ "delta_Iio=(300*10**-12) #Change in input offset current\n",
+ "Vs=15\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "Rl=10*10**3\n",
+ "Vin=1*10**-3 #Input voltage\n",
+ "k=25 #Amplifier is nulled at 25 deg\n",
+ "T=35-k #Change in temperature\n",
+ "\n",
+ "#calculation\n",
+ "Ev=(1+Rf/R1)*(delta_Vio/delta_T)*T + Rf*(delta_Iio/delta_T)*T #Error voltage\n",
+ "Vo1=-(Rf/R1)*Vin+Ev #Output voltage\n",
+ "Vo2=-(Rf/R1)*Vin-Ev #Output voltage\n",
+ "\n",
+ "#Result\n",
+ "print \"Error voltage is \",round(Ev*10**3,1),\"mV\"\n",
+ "print \"Output voltage 1 is \",round(Vo1*10**3,1),\"mV\"\n",
+ "print \"Output voltage 2 is \",round(Vo2*10**3,1),\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.8_b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Error voltage is 30.6 mV\n",
+ "Output voltage 1 is -969.4 mV\n",
+ "Output voltage 2 is -1030.6 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 4.8_b\n",
+ "#Refer to the inverting amplifier in figure 4-24. The opamp is the LM307 with\n",
+ "#the following specifications.\n",
+ "#delta_Vio/delta_T =30 microVolt/degree celcius maximum\n",
+ "#delta_Iio/delta_T= 300 pA/degree celcius\n",
+ "#Vs=15 V, R1=1 Kilo Ohm, Rf=100 Kilo Ohm,Rl=10 Kilo Ohm\n",
+ "#Assume that the amplifier is nulled at 25 degree celcius. Calculate the value\n",
+ "#of the error voltage Ev and output voltage at 35 degree celcius if\n",
+ "#a) Vin= 10 mV dc\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_Vio=30*10**-6 #Change in input offset voltage\n",
+ "delta_T=1 #Unit change in temperature\n",
+ "delta_Iio=(300*10**-12) #Change in input offset current\n",
+ "Vs=15\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "Rl=10*10**3\n",
+ "Vin=10*10**-3 #Input voltage\n",
+ "k=25 #Amplifier is nulled at 25 deg\n",
+ "T=35-k #Change in temperature\n",
+ "\n",
+ "#calculation\n",
+ "Ev=(1+Rf/R1)*(delta_Vio/delta_T)*T + Rf*(delta_Iio/delta_T)*T #Error voltage\n",
+ "Vo1=-(Rf/R1)*Vin+Ev #Output voltage\n",
+ "Vo2=-(Rf/R1)*Vin-Ev #Output voltage\n",
+ "\n",
+ "#Result\n",
+ "print \"Error voltage is \",round(Ev*10**3,1),\"mV\"\n",
+ "print \"Output voltage 1 is \",round(Vo1*10**3,1),\"mV\"\n",
+ "print \"Output voltage 2 is \",round(Vo2*10**3,1),\"mV\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.8_a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Error voltage is 0.0306 Volts\n",
+ "Output voltage 1 is -0.0694 Volts\n",
+ "Output voltage 2 is -0.1306 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 4.8_a\n",
+ "#Design of Compensating Network\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_Vio=30*10**-6 #Change in input offset voltage\n",
+ "delta_T=1 #Unit change in temperature\n",
+ "delta_Iio=(300*10**-12) #Change in input offset current\n",
+ "Vs=15\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "Rl=10*10**3\n",
+ "Vin=1*10**-3 #Input voltage\n",
+ "k=25 #Amplifier is nulled at 25 deg\n",
+ "T=35-k #Change in temperature\n",
+ "\n",
+ "#calculation\n",
+ "Ev=(1+Rf/R1)*(delta_Vio/delta_T)*T + Rf*(delta_Iio/delta_T)*T #Error voltage\n",
+ "Vo1=-(Rf/R1)*Vin+Ev #Output voltage\n",
+ "Vo2=-(Rf/R1)*Vin-Ev #Output voltage\n",
+ "\n",
+ "#Result\n",
+ "print \"Error voltage is \",Ev,\"Volts\"\n",
+ "print \"Output voltage 1 is \",Vo1,\"Volts\"\n",
+ "print \"Output voltage 2 is \",Vo2,\"Volts\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.9_a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Error voltage is 91.8 mV\n",
+ "Output voltage 1 is -908.2 mV\n",
+ "Output voltage 2 is -1091.8 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 4.9_a\n",
+ "#Refer again to the amplifier circuit in figure 4-24.Use the same circuit\n",
+ "#specifications that are given in example 4-8. Assume that the amplifier is\n",
+ "#nulled at 25 degree celcius. If Vin is a 10 mV peak sine wave at 1 kilo Hz\n",
+ "#Calculate Ev and Vo at 55 degree celcius.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_Vio=30*10**-6 #Change in input offset voltage\n",
+ "delta_T=1 #Unit change in temperature\n",
+ "delta_Iio=(300*10**-12) #Change in input offset current\n",
+ "Vs=15\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "Rl=10*10**3\n",
+ "Vin=10*10**-3 #Input voltage\n",
+ "k=25 #Amplifier is nulled at 25 deg\n",
+ "T=55-k #Change in temperature\n",
+ "\n",
+ "#calculation\n",
+ "Ev=(1+Rf/R1)*(delta_Vio/delta_T)*T + Rf*(delta_Iio/delta_T)*T #Error voltage\n",
+ "Vo1=-(Rf/R1)*Vin+Ev #Output voltage\n",
+ "Vo2=-(Rf/R1)*Vin-Ev #Output voltage\n",
+ "\n",
+ "#Result\n",
+ "print \"Error voltage is \",round(Ev*10**3,1),\"mV\"\n",
+ "print \"Output voltage 1 is \",round(Vo1*10**3,1),\"mV\"\n",
+ "print \"Output voltage 2 is \",round(Vo2*10**3,1),\"mV\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.9_b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEZCAYAAAC99aPhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmclXP/x/FXaqIS6S4pIiokS6RVNLeSdCNbkkSKEN0K\nIUuNLbKFm3L/opT2TdYSaW7qltEqKi2EqbtFsrY35/fH5xpzzpia5Szf6zrn/Xw8zuNc5zpnzvk0\nzPlc3+3zBREREREREREREREREREREREREREREREREREREZFClHIdgIjERR+gCvA98G/HsYiIpJRZ\nQBkfvEc0DgU+BRoD9R3GISnC5f/sIn5zJNZK3+P4PaLVBFgMZDmMQVJIadcBiMTRkUBvoCLQGdgL\nnAn0B6YAacBMYBRwHnAf8AtQAUsG/wCu8h6fA5wMLAFqAq0LeJ//ee/xK1Ae+AKoBZwL3AG8DZzu\nvWY61nL5DPibF2c5YACwC1gJHOX97MPAJKy7qoUX413AgUAn4D9h/+YmwD3AH9iF4ooCfg8/AMd6\n/6aXsBbMUGA50Aro4v2bTwLu9/49J3ixLQV+KtJvX0Qk4CpgV+R/8x63A9ZgX84fe+daAK+G/cxY\noKF33AY4C5gQ9n4rvePzCnifVwp4j9zX1gHe9R73A67zjm/GvqwXA5W8cx8Bh3vH5wLHhH1OdSxJ\nrAWqeucGFvBv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thFyU8OYymJo4B2wCsEt0hrUOM+FLsQHO49zl3nFkStsclP\nPxT0ZCokkvAFi5C3yFESrxbWuvrMcRzFcQCWCDdiXXTL3IZTbIOBvkCO60BKKAR8CMwHbnQcS3Ed\niy1HGAEsBIaR18INmquAsft6MhUSSch1AAJYt9Zk4HasZRIUOVjX3FHAOUC602iK50JgE9a/HdSr\n+rOwi48LgFuxK/ygKIOtkxvi3f9B5Dq5oCgLXARM2tcLUiGRrCOyX68mkeVWJP7SsDpoo4FpjmMp\nqV+Ad4EzXQdSDM2xWnTfYjXszsXq1AXJ/7z7zcAbWFd1UGR7t8+9x5P5a7XzILgAWMC+F3unhDJY\n314tLLMGbbAdLPagDraXwr68BrsOpASqYLNuAMph1aqDWhS0JcGbtVUeK9YKUAGYS+TWEkHwMXC8\nd5xBMKuTjweucx2EH1yAzRZaje13EiTjgPXATmys53q34RRbC6x7aDF50wjb7vcn/OMUrG97MTYF\nta/bcKLSkuDN2joW+90vxqaOB+1vF+A0rEWyBJhK8GZtVQB+JC+hi4iIiIiIiIiIiIiIiIiIiIiI\niIiIiIhIwQ4FbvGOq7OfEhMiIiIFqUVwKxKIiIgPjMfK0C/CtoPOTSpdsZpjM7E6WLcBd2Gr6D8F\nDvNeVxvbhno+VmrjhATFLSIiPnEMeckj/LgrtltnBaye1y9AD++5Z7EKyQCzgDrecRPvsYjvlHEd\ngEgSK7WPY7C9Tf7wbj+TV1BxKXAqlmSaEzmuUjY+YYpER4lExI2dYcc5YY9zsL/LA7CdMU9PcFwi\nxZYK+5GIuPIbxa+amtty+Q0bP7ki7PypMYpLJKaUSETiZwu2h8ZS4EnydusMEblzZ/7j3Medge7k\nlVG/OJ7BioiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIjEzf8DtLWn4UD80MsAAAAASUVORK5C\nYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7fe8a375c9d0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 4.9_b\n",
+ "#Refer again to the amplifier circuit in figure 4-24.Use the same circuit\n",
+ "#specifications that are given in example 4-8. Assume that the amplifier is\n",
+ "#nulled at 25 degree celcius. If Vin is a 10 mV peak sine wave at 1 kilo Hz\n",
+ "#Draw the output voltage waveform at 55 degree celcius.\n",
+ "\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "%matplotlib inline\n",
+ "\n",
+ "from pylab import ylabel, xlabel, title, arange, plot, show\n",
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "x=arange(0,2*math.pi,0.1) #x coordinate\n",
+ "y=-1000*sin(x)+91.8 #y coordinate\n",
+ "\n",
+ "#result\n",
+ "plot(x,y)\n",
+ "ylabel('voltage')\n",
+ "xlabel('time')\n",
+ "title(r'$output waveform$')\n",
+ "show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.10_a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Error voltage is 30.6 mV\n",
+ "Output voltage 1 is 131.6 mV\n",
+ "Output voltage 2 is 70.4 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 4.10_a\n",
+ "#Repeat example 4-8 for the noniverting amplifier shown in figure 4-26.\n",
+ "#Assume that Rc<<R1.\n",
+ "\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_Vio=30*10**-6 #Change in input offset voltage\n",
+ "delta_T=1 #Unit change in temperature\n",
+ "delta_Iio=(300*10**-12) #Change in input offset current\n",
+ "Vs=15\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "Rl=10*10**3\n",
+ "Vin=1*10**-3 #Input voltage\n",
+ "k=25 #Amplifier is nulled at 25 deg\n",
+ "T=35-k #Change in temperature\n",
+ "\n",
+ "#calculation\n",
+ "Ev=(1+Rf/R1)*(delta_Vio/delta_T)*T + Rf*(delta_Iio/delta_T)*T #Error voltage\n",
+ "Vo1=(1+Rf/R1)*Vin+Ev #Output voltage\n",
+ "Vo2=(1+Rf/R1)*Vin-Ev #Output voltage\n",
+ "\n",
+ "#Result\n",
+ "print \"Error voltage is \",round(Ev*10**3,1),\"mV\"\n",
+ "print \"Output voltage 1 is \",round(Vo1*10**3,1),\"mV\"\n",
+ "print \"Output voltage 2 is \",round(Vo2*10**3,1),\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.10_b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Error voltage is 30.6 mV\n",
+ "Output voltage 1 is 1040.6 mV\n",
+ "Output voltage 2 is 979.4 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 4.10_b\n",
+ "#Repeat example 4-8 for the noniverting amplifier shown in figure 4-26.\n",
+ "#Assume that Rc<<R1.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_Vio=30*10**-6 #Change in input offset voltage\n",
+ "delta_T=1 #Unit change in temperature\n",
+ "delta_Iio=(300*10**-12) #Change in input offset current\n",
+ "Vs=15\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "Rl=10*10**3\n",
+ "Vin=10*10**-3 #Input voltage\n",
+ "k=25 #Amplifier is nulled at 25 deg\n",
+ "T=35-k #Change in temperature\n",
+ "\n",
+ "#calculation\n",
+ "Ev=(1+Rf/R1)*(delta_Vio/delta_T)*T + Rf*(delta_Iio/delta_T)*T #Error voltage\n",
+ "Vo1=(1+Rf/R1)*Vin+Ev #Output voltage\n",
+ "Vo2=(1+Rf/R1)*Vin-Ev #Output voltage\n",
+ "\n",
+ "#Result\n",
+ "print \"Error voltage is \",round(Ev*10**3,1),\"mV\"\n",
+ "print \"Output voltage 1 is \",round(Vo1*10**3,1),\"mV\"\n",
+ "print \"Output voltage 2 is \",round(Vo2*10**3,1),\"mV\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.11_a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in Output offset voltage is 3.2 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 4.11_a\n",
+ "#The amplifier in figure 4-28(b) is nulled when the low dc supply voltage is\n",
+ "#20 mV.\n",
+ "#Because of poor regulation,low dc voltage varies with time from 18 V to 22 V.\n",
+ "#a) Determine the change in the output offset voltage caused by the change in\n",
+ "#supply voltages\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_Vio=15.85*10**-6 #Change in input offset voltage\n",
+ "delta_V=1 #Unit change in supply voltage\n",
+ "V=2 #Change in supply voltage\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "\n",
+ "#calculation\n",
+ "delta_Voo=(1+Rf/R1)*(delta_Vio/delta_V)*V #Change in output offset voltage\n",
+ " \n",
+ "\n",
+ "#Result\n",
+ "print \"Change in Output offset voltage is \",round(delta_Voo*10**3,2),\"mV\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.11_b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total Output offset voltage 1 is -996.8 mV\n",
+ "Total Output offset voltage 2 is -1003.2 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 4.11_b\n",
+ "#The amplifier in figure 4-28(b) is nulled when the low dc supply voltage is\n",
+ "#20 mV.\n",
+ "#Because of poor regulation,low dc voltage varies with time from 18 V to 22 V.\n",
+ "#b) Determine the output voltage Vo if Vin=10 mV dc. The opamp is the LM307\n",
+ "#with SVRR=96 dB.\n",
+ "\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_Vio=15.85*10**-6 #Change in input offset voltage\n",
+ "delta_V=1 #Unit change in supply voltage\n",
+ "V=2 #Change in supply voltage\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "Vin=10*10**-3\n",
+ "\n",
+ "#calculation\n",
+ "delta_Voo=(1+Rf/R1)*(delta_Vio/delta_V)*V #Output offset voltage\n",
+ "Vo1=(-Rf/R1)*Vin+delta_Voo #Total output offset voltage 1\n",
+ "Vo2=(-Rf/R1)*Vin-delta_Voo #Total output offset voltage 2\n",
+ " \n",
+ "\n",
+ "#Result\n",
+ "print \"Total Output offset voltage 1 is \",round(Vo1*10**3,1),\"mV\"\n",
+ "print \"Total Output offset voltage 2 is \",round(Vo2*10**3,1),\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.11_b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total Output offset voltage 1 is -0.9968 Volts\n",
+ "Total Output offset voltage 2 is -1.0032 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 4.11_b\n",
+ "#Design of Compensating Network\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_Vio=15.85*10**-6 #Change in input offset voltage\n",
+ "delta_V=1 #Unit change in supply voltage\n",
+ "V=2 #Change in supply voltage\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "Vin=10*10**-3\n",
+ "\n",
+ "#calculation\n",
+ "delta_Voo=(1+Rf/R1)*(delta_Vio/delta_V)*V #Output offset voltage\n",
+ "Vo1=(-Rf/R1)*Vin+delta_Voo #Total output offset voltage 1\n",
+ "Vo2=(-Rf/R1)*Vin-delta_Voo #Total output offset voltage 2\n",
+ " \n",
+ "\n",
+ "#Result\n",
+ "print \"Total Output offset voltage 1 is \",round(Vo1,4),\"Volts\"\n",
+ "print \"Total Output offset voltage 2 is \",round(Vo2,4),\"Volts\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in Output offset voltage 1 is 16.0 uV rms\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 4.12\n",
+ "#Referring to figure 4-28(b), suppose that the circuit is nulled when the voltage\n",
+ "#across terminals +Vcc and -Vee measures 20 V dc. Also suppose that because of\n",
+ "#poor filtering, 10 mV rms ac ripple is measured across terminals +Vcc and -Vee.\n",
+ "#While the input signal Vin=0V, how much ripple voltage can we expect at the\n",
+ "#output if the opamp is the LM307.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_Vio=15.85*10**-6 #Change in input offset voltage\n",
+ "delta_V=1 #Unit change in supply voltage\n",
+ "V=10*10**-3 #Change in supply voltage\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "delta_Voo=(1+Rf/R1)*(delta_Vio/delta_V)*V #Output offset voltage\n",
+ "\n",
+ "#Result\n",
+ "print \"Change in Output offset voltage 1 is \",round(delta_Voo*10**6),\"uV rms\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 4.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in Output offset voltage 1 is 2.82 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 4.13\n",
+ "#Suppose that the circuit in figure 4-24 is initially nulled. Assume also that\n",
+ "#room temperature and the voltage terminals +Vcc and -Vee remain constant.\n",
+ "#Determine the maximum possible chnage in output offset voltage after one month\n",
+ "#if the opamp is the LH0041C.\n",
+ "#Assume that R1=1kilo Ohm, Rf=100 kilo Ohm and Rl=10 kilo Ohm.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_Vio=5*10**-6 #Change in input offset voltage\n",
+ "delta_t=1 #Unit change in time\n",
+ "delta_Iio=2*10**-9 #Change in input offset current \n",
+ "t=4 #Time elapsed(weeks)\n",
+ "R1=1*10**3\n",
+ "Rf=100*10**3\n",
+ "Rl=10*10**3\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "delta_Voot=(1+Rf/R1)*(delta_Vio/delta_t)*t+Rf*(delta_Iio/delta_t)*t #Output offset voltage\n",
+ "\n",
+ "#Result\n",
+ "print \"Change in Output offset voltage 1 is \",round(delta_Voot*10**3,2),\"mV\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/5._Frequency_response_of_an_Op-Amp.ipynb b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/5._Frequency_response_of_an_Op-Amp.ipynb
new file mode 100644
index 00000000..f610d4f8
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/5._Frequency_response_of_an_Op-Amp.ipynb
@@ -0,0 +1,265 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 5: Frequency response of an Op-Amp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEfCAYAAABSy/GnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XecVOW9x/HP0gUVxAaouBTBgA0URKOyIioCi2iMvSdq\nYmILXgOaCMQWUXON5mqsQY3dmMCKSFEHUEMziFjwIlgodgRpgsDcP35n7pwdZmennjbf9+t1XnvO\nmTNznsfF+e15yu8BERERERERERERERERERERERERERERESkjJwFLgTXAgSW8T1PgXWD3Et7D7Xbg\nFx7dS0Qkkj4G+rmOFwPVJbrXCOAmZ/8y4J4S3SedNsCnQGMP7ykiEikfAcc4+xXAD0CnEt1rBnC4\ns/8OcFgen/Ex0D7P+08GfpLne0VEytpjwBZgvbOtA7YCa4FFOX7Wx8BwrJlpJfAw1uyUsBPwBRaU\n2jv3a+B6faDz3u+AZcCwOu7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+uxtQPSSSwGVEjitgrgZ0Av12elfl6mz9+Irfo2FHi+gHKIFEx/tYjUVomlT3gEy8WzF/BfwGxg\nPjDKde11zrUzgCeAYWk+78fYKmebXefqWpXuDySfdJZji4IBjCc8C4OJiETWZpJf0v8A9saaqXo7\nrx+HrZQH9gdWDbai2cHA20AzYAdsNcTfpPn84SnnxwJLqN0M9l3Ke1o6n5148mmKBRARX6lJSsrd\nBmo3SVUCn2BPFGAB4zjsix2gBbAPFiSeB753tvGkf3JoD7zmOo4DV1O7eWmNa78CeBy4w3XPjViw\naubcS8QXChgi21qXcnwLcH/KuSuoHSDqamZK91qma0cBn2JNYqnvifoiPxJw6sMQyWwScCH2ZAG2\nrOWu2MiloSSbpAaT/gv9E6BNlveqBo7BgpFbU6yZbGMuBRcpNj1hSLlL9yXvPjcFW2jm387xGuBs\nrLnoaawj/EtgDumfHF7DhtVmumfi+CqgHcnmsHHYE0cP1/1FRCTkRpJ+lFQFFlyaFPDZNwMnFfB+\nkaJQk5RI8dT1tPIAcFaen9kUOAL4V76FEhEREREREREREREREREREREREREREZGi+T8IwFUYmAed\ntwAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f29f0b19ed0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum gain is 40 dB\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f29f2ed5590>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "#Example 5.1\n",
+ "#The 741C is connected as a noniverting amplifier.What maximum gain can be used\n",
+ "#that will still keep the amplifier's response flat to 10kHz.\n",
+ "\n",
+ "%matplotlib inline\n",
+ "\n",
+ "from scipy import pi\n",
+ "from pylab import ylabel, xlabel, title, arange, plot, show, clf, subplot, semilogx, log10, arctan2, imag, real, savefig\n",
+ "\n",
+ "#Variable declaration\n",
+ "f=arange(0,1000000) #frequency range\n",
+ "s=2.0j*pi*f\n",
+ "A=200000 #Gain of opamp at 0 Hz\n",
+ "f0=5 #first break frequency in Hz\n",
+ "p=2.0*pi*f0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "tf=A*p/(s+p) #open loop gain\n",
+ "\n",
+ "#Magnitude plot\n",
+ "clf() #clear the figure\n",
+ "subplot(211)\n",
+ "title('tf=p/(s+p)')\n",
+ "semilogx(f,20*log10(abs(tf)))\n",
+ "ylabel('Mag. Ratio (dB)')\n",
+ "\n",
+ "#Phase plot\n",
+ "subplot(212)\n",
+ "semilogx(f,arctan2(imag(tf),real(tf))*180.0/pi)\n",
+ "ylabel('Phase (deg.)')\n",
+ "xlabel('Freq (Hz)')\n",
+ "show()\n",
+ "savefig('fig1.png') #savefig('fig1.eps')\n",
+ "\n",
+ "Amax=40 #from the graph\n",
+ "\n",
+ "#Result\n",
+ "print \"Maximum gain is\",Amax,\"dB\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Gain equation is Aol(f)=A((1+(f/fo1)*j)*(1+(f/fo2)*j)\n",
+ "A,the gain of the opamp at 0 Hz is 140000\n",
+ "First break frequency fo1 is 6 Hz\n",
+ "Second break frequency fo2 is 1.24 MHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 5.2\n",
+ "#Using the frequency response and phase response curves obtained in figure 5-5\n",
+ "#Obtain the equation for the MC1556 opamp. Also determine the approximate values\n",
+ "#of the break frequencies.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "phase=-157.5 #Phase shift at about 3 MHz\n",
+ "f=3*10**6\n",
+ "fo1=6 #first break frequency,from the graph\n",
+ "A=140000 #Gain of the opamp at 0Hz\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "k=-math.atan(f/fo1)*180/math.pi-phase\n",
+ "fo2=f/math.tan(k*math.pi/180) #second break frequency\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Gain equation is Aol(f)=A((1+(f/fo1)*j)*(1+(f/fo2)*j)\"\n",
+ "print \"A,the gain of the opamp at 0 Hz is\",A\n",
+ "print \"First break frequency fo1 is\",fo1,\"Hz\" \n",
+ "print \"Second break frequency fo2 is\",round(fo2/10**6,2),\"MHz\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 5.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEfCAYAAABSy/GnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYFNW5x/HvsCoouKGAAg24ARpFBTWyDO4Ig6i5LtEE\n0YjRRA3Bq6C5mSGiMWrM1Wg0QYnG60riMiOCGi8NiKxXQBQhgCwicUFFEJRt+v7xVls9TfdMd3V3\nVS+/z/P0M13VtZw5Yr9T55z3HBARERERERERERERERERERERERERERGREnIe8CGwGTgmh/dpDrwH\nHJTDe8S6B/ipT/cSESlKq4FTY7ZXAhU5utcY4Hbn/XXAn3J0n0TaAmuBpj7eU0SkqKwCTnPelwE7\ngK45utcM4PvO+3eBkz1cYzXQ0eP9XwMu8HiuiEhJewLYBWx1XluAWuBrYHma11oNjMaamb4AJmDN\nTlH7Ap9gQamjc79GMZ+f45y7CVgHjEpyn1UkDhjlznljgM+c434Yd8wtTrlERMSDVdRtkqoFusRs\nvwx8meRVHXPcauAd4GAsOLwJ3Bbz+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DgQ9jtn2bzTYPqS5cqguX6sKlunBlpS4KLWBo1SSX6sKlunCpLlyqC1dW\n6qLQAsZHuGtn4LwvuaFgDtWFS3XhUl24VBeukqiLEHXb4ZpgM9iGsBlt4zv0ilkI1UVUCNVFVAjV\nRVQI1UVUiBKri6exjNRtWNvbcGf/QGyW2xXAmGCK5jvVhUt14VJduFQXLtWFiIiIiIiIiIiIiIiI\niIiIiIiIiIiIiIiIiARqF7Z0a/TVMQf3+DlwufP+MeCCuM+/rufc5sB0Cm8aHylCTYIugEjAtmJr\nByQSXWQok4nbyoArgV4x14q/Xn3X3wbMwJbSfD6DcohkTH+1iNQVwqZPeBybi6cD8J/AXGARUBVz\n7K3OsTOAp4BRCa53CrbK2c6YfclWu/sN7pPOR9jKaQDVwCXp/iIiIpJdO3G/pP8BdMKaqXo7n5+J\nrdgH9gdWDbai2fHAO8AewN7Yao+/THD90XH7HwM+oG4z2Ka4c1o7144++TTHAohIoNQkJaXuG+o2\nSYWANdgTBVjAOBP7YgdoCRyGBYnngW+dVzWJnxw6Am/GbEeAG6nbvLQ55n0Z8CTw+5h7bsOC1R7O\nvUQCoYAhsrstcdu/Bf4St+8G6gaIZM1MiT6r79gqYC3WJBZ/jhYEkkCpD0Okfq8CV2BPFmDLWrbB\nRi4NxW2SGkziL/Q1QNsU71UBnIYFo1jNsWaybekUXCTb9IQhpS7Rl3zsvtexhWZmOdubgcuw5qJn\nsY7wT4F5JH5yeBMbVlvfPaPbI4H2uM1hL2FPHD1j7i8iIgWuksSjpMqw4NIsg2vfAZyXwfkiWaEm\nKZHsSfa0Mh641OM1mwN9gBe9FkpEREREREREREREREREREREREREREREsub/AcvxV8ZEmg1JAAAA\nAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f29f0b5c6d0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "From the plot it is seen that phase angle is -90 degree\n",
+ "when the magnitude is o dB.Since the phase angle reaches >-180\n",
+ "when the magnitude is 0dB, voltage follower is stable at 0dB\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f29f26bd6d0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 5.3\n",
+ "#Determine the stability of the voltage follower shown in figure 3-7.\n",
+ "#Assume that the opamp is a 741 IC\n",
+ "\n",
+ "\n",
+ "%matplotlib inline\n",
+ "\n",
+ "from scipy import pi\n",
+ "from pylab import ylabel, xlabel, title, arange, plot, show, clf, subplot, semilogx, log10, arctan2, imag, real, savefig\n",
+ "\n",
+ "#Variable declaration\n",
+ "f=arange(10,1000000)\n",
+ "s=2.0j*pi*f\n",
+ "A=200000\n",
+ "f0=5\n",
+ "p=2.0*pi*f0\n",
+ "B=1 #For voltage follower B=1\n",
+ "\n",
+ "#Calculation\n",
+ "tf=A*p*B/(s+p) #open loop gain\n",
+ "\n",
+ "#Magnitude plot\n",
+ "clf() #clear the figure\n",
+ "subplot(211)\n",
+ "title('tf=p/(s+p)')\n",
+ "semilogx(f,20*log10(abs(tf)))\n",
+ "ylabel('Mag. Ratio (dB)')\n",
+ "\n",
+ "#Phase plot\n",
+ "subplot(212)\n",
+ "semilogx(f,arctan2(imag(tf),real(tf))*180.0/pi)\n",
+ "ylabel('Phase (deg.)')\n",
+ "xlabel('Freq (Hz)')\n",
+ "\n",
+ "show()\n",
+ "savefig('fig1.png') #savefig('fig1.eps')\n",
+ "\n",
+ "#Result\n",
+ "print \"From the plot it is seen that phase angle is -90 degree\"\n",
+ "print \"when the magnitude is o dB.Since the phase angle reaches >-180\"\n",
+ "print \"when the magnitude is 0dB, voltage follower is stable at 0dB\""
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/6._General_Linear_Applications.ipynb b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/6._General_Linear_Applications.ipynb
new file mode 100644
index 00000000..61c78f55
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/6._General_Linear_Applications.ipynb
@@ -0,0 +1,876 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 6: General Linear Applications"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Low-freq cutoff is 10.61 kHz\n",
+ "\n",
+ " High-freq cutoff is 90.91 kHz\n",
+ "\n",
+ " Bandwidth is 80.3 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 6.1\n",
+ "#In the circuit of figure 6-3(a) Rin=50 Ohm,Ci=0.1 uF,R1=100 Ohm, Rf=1 KOhm\n",
+ "#Rl=10 kOhm and supply voltages +15, -15 V.\n",
+ "#Determine the bandwidth of the amplifier.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=100\n",
+ "Rf=1*10**3\n",
+ "Rin=50\n",
+ "Rl=10*10**3\n",
+ "Ci=0.1*10**-6 #Capacitance b/w 2 stages being coupled \n",
+ "RiF=R1 #ac input resistance of the second stage\n",
+ "Ro=Rin #ac output resistance of the 1st stage\n",
+ "UGB=10**6 #Unity gain bandwidth\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "fl=1/(2*math.pi*Ci*(RiF+Ro)) #Low-freq cutoff\n",
+ "K=Rf/(R1+Rf)\n",
+ "Af=-Rf/R1 #closed loop voltage gain\n",
+ "fh=UGB*K/abs(Af) #High-freq cutoff\n",
+ "BW=fh-fl #Bandwidth\n",
+ "\n",
+ "#result\n",
+ "print \"\\n Low-freq cutoff is\",round(fl/10**3,2),\"kHz\"\n",
+ "print \"\\n High-freq cutoff is\",round(fh/10**3,2),\"kHz\"\n",
+ "print\"\\n Bandwidth is\",round(BW/10**3,2),\"kHz\" \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Low-freq cutoff is 31.8 kHz\n",
+ "High-freq cutoff is 90.91 kHz\n",
+ "Bandwidth is 90.88 kHz\n",
+ "The ideal maximum output voltage swing is 15 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 6.2\n",
+ "#For the noninverting amplifier of figure 6-4(c), Rin=50 Ohm,Ci=C1=0.1 uF\n",
+ "#R1=R2=R3=100 kOhm,Rf=1 MOhm,Vcc=15 V.Determine\n",
+ "#a)the bandwidth of the amplifier\n",
+ "#b)the maximum output voltage swing\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=100*10**3\n",
+ "R2=100*10**3\n",
+ "R3=100*10**3\n",
+ "Rf=1*10**6\n",
+ "Rin=50\n",
+ "Ci=0.1*10**-6 #Capacitance b/w 2 stages being coupled\n",
+ "Ro=Rin #ac output resistance of the 1st stage\n",
+ "Vcc=15\n",
+ "UGB=10**6 #Unity gain bandwidth\n",
+ "Rif=R2*R3/(R2+R3) #since Ri*(1+A*B)>>R2 or R3\n",
+ "\n",
+ "#calculation\n",
+ "fl=1/(2*math.pi*Ci*(Rif+Ro)) #Low-freq cutoff\n",
+ "K=Rf/(R1+Rf)\n",
+ "Af=-Rf/R1 #closed loop voltage gain\n",
+ "fh=UGB*K/abs(Af) #High-freq cutoff\n",
+ "BW=fh-fl #Bandwidth\n",
+ "\n",
+ "#result\n",
+ "print \"Low-freq cutoff is\",round(fl,2),\"kHz\"\n",
+ "print \"High-freq cutoff is\",round(fh/10**3,2),\"kHz\"\n",
+ "print\"Bandwidth is\",round(BW/10**3,2),\"kHz\"\n",
+ "print \"The ideal maximum output voltage swing is\",Vcc,\"Volts\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Inductance is 9.9 mH\n",
+ "Figure of merit of the coil is 33.2\n",
+ "Parallel resistance of the tank circuit is 32.98 kHz\n",
+ "Feedback resistance is 1.03 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 6.3\n",
+ "#The circuit of figure 6-5(a) is to provide a gain of 10 at a peak frequency of\n",
+ "#16 kHz. Determine the value of all its components.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fp=16*10**3 #Peak frequency\n",
+ "Af=10 #Gain at peak frequency\n",
+ "C=0.01*10**-6 #Assume\n",
+ "R=30 #Assume the value of internal resistance of the inductor\n",
+ "R1=100 #Assume the value of internal resisrance of the coil\n",
+ "\n",
+ "#calculation\n",
+ "L=1/(((2*math.pi*fp)**2)*10**-8) #Simplifying fp=1/(2*pi*sqrt(L*C))\n",
+ "Xl=2*math.pi*fp*L #Inductive reactance\n",
+ "Qcoil=Xl/R #Figure of merit of the coil\n",
+ "Rp=((Qcoil)**2)*R #Parallel resistance of the tank circuit\n",
+ "Rf=-Rp/(1-(Rp/(Af*R1))) #Simplifying Af=(Rf||Rp)/R1\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Inductance is\",round(L*10**3,1),\"mH\"\n",
+ "print \"Figure of merit of the coil is\",round(Qcoil,1)\n",
+ "print \"Parallel resistance of the tank circuit is\",round(Rp/10**3,2),\"kHz\"\n",
+ "print \"Feedback resistance is\",round(Rf/10**3,2),\"kHz\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output voltage is -2.0 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 6.4\n",
+ "#In the circuit of figure 6-6 Va=1V, Vb=2V, Vc=3V, Ra=Rb=Rc=3 kOhm,Rf=1 kOhm\n",
+ "#Supply voltages are 15V and -15V. Assuming that the opamp is initially nulled,\n",
+ "#determine the output voltage Vo\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Va=1 #Input voltage in Volts\n",
+ "Vb=2 #Input voltage in Volts\n",
+ "Vc=3 #Input voltage in Volts\n",
+ "Ra=3*10**3 #Resistance in ohms\n",
+ "Rb=3*10**3 #Resistance in ohms\n",
+ "Rc=3*10**3 #Resistance in ohms\n",
+ "Rf=1*10**3 #Resistance in ohms\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "Vo=-((Rf/Ra)*Va+(Rf/Rb)*Vb+(Rf/Rc)*Vc) #Output voltage\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Output voltage is\",Vo,\"Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Voltage at non-inverting terminal is 1.0 Volts\n",
+ "Output voltage is 3.0 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 6.5\n",
+ "#In the circuit of figure 6-7 Va=2V, Vb=-3V, Vc=4V, R=R1=1 kOhm,Rf=2 kOhm\n",
+ "#Supply voltages are 15V and -15V. Assuming that the opamp is initially nulled,\n",
+ "#determine the output voltage Vo and voltage V1 at the noninverting terminal.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Va=2 #Input voltage in volts\n",
+ "Vb=-3 #Input voltage in volts\n",
+ "Vc=4 #Input voltage in volts\n",
+ "R1=1*10**3 #Resistance in ohms \n",
+ "Rf=2*10**3 #Resistance in ohms\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "V1=(Va+Vb+Vc)/3 #Voltage at non-inverting terminal\n",
+ "Vo=(1+Rf/R1)*V1 #Output voltage\n",
+ "\n",
+ "#result\n",
+ "print \"Voltage at non-inverting terminal is\",V1,\"Volts\"\n",
+ "print \"Output voltage is\",Vo,\"Volts\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output voltage is 4 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 6.6\n",
+ "#In the circuit of figure 6-9 Va=2V, Vb=3V,Vc=4V,Vc=4V,Vd=5V,R=1 kOhm\n",
+ "#Supply voltages are 15V and -15V. Assuming that the opamp is initially nulled,\n",
+ "#Determine the output voltage Vo\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Va=2 #Input voltage in volts\n",
+ "Vb=3 #Input voltage in volts\n",
+ "Vc=4 #Input voltage in volts\n",
+ "Vd=5 #Input voltage in volts\n",
+ "R=1*10**3 #Resistance in ohms\n",
+ "\n",
+ "#calculation\n",
+ "Vo=-Va-Vb+Vc+Vd #Output voltage\n",
+ "\n",
+ "#result\n",
+ "print \"Output voltage is\",Vo,\"Volts\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output voltage at 0 degree is 1.47 Volts\n",
+ "Output voltage at 100 degree is -4.41 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 6.7\n",
+ "#In the circuit of figure 6-12 R1=1 kOhm, Rf=4.7 kOhm, Ra=Rb=Rc=100 kOhm.\n",
+ "#Vdc=5V and Supply voltages are 15V and -15V.\n",
+ "#The transducer is a thermistor with the following specifications.\n",
+ "#Rt=100 kOhm at a reference temperature of 25 degree celcius, temperature\n",
+ "#coefficient of resistance =-1 kOhm/ degree celcius or 1%/degree celcius.\n",
+ "#Determine the output voltage Vo at o degree C and 100 degree C.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=1*10**3 #Resistance in ohms\n",
+ "Rf=4.7*10**3 #Resistance in ohms\n",
+ "Ra=100*10**3 #Resistance in ohms\n",
+ "Rb=100*10**3 #Resistance in ohms\n",
+ "Rc=100*10**3 #Resistance in ohms\n",
+ "Vdc=5 #dc voltage in Volts\n",
+ "Rt=100*10**3 #Resistance of a thermistor\n",
+ "temp_coeff=1*10**3\n",
+ "R=Ra #Ra=Rb=Rc=R\n",
+ "\n",
+ "#calculation\n",
+ "delta_R=-temp_coeff*(0-25) #Change in resistance\n",
+ "Vo1=((Rf*delta_R)/(R1*4*R))*Vdc #Output voltage at degrees\n",
+ "delta_R=-temp_coeff*(100-25) #Change in resistance\n",
+ "Vo2=((Rf*delta_R)/(R1*4*R))*Vdc #Output voltage at 100 degrees\n",
+ "\n",
+ "#result\n",
+ "print \"Output voltage at 0 degree is\",round(Vo1,2),\"Volts\"\n",
+ "print \"Output voltage at 100 degree is\",round(Vo2,2),\"Volts\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in resistance is 0.1 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 6.8\n",
+ "#The circuit of Figure 6-12 is used as an analog weight scale with the following\n",
+ "#specifications. The gain of the differential instrumentation amplifier = -100.\n",
+ "#Assume that Vdc= +10 V and the opamp supply voltages = +/- 10 V. The unstrained\n",
+ "#resistance of each of the four elements of the strain gage is 100 ohm Vo= 1 V.\n",
+ "#When a certain weight is placed on the scale platform,the output voltage Vo=1 V.\n",
+ "#Assuming that the output is initially 0,determine the change in the resistance\n",
+ "#of each strain-gage element.\n",
+ "\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=-100 #Gain of the differential instrumentation amplifier\n",
+ "Ra=100\n",
+ "Rb=100\n",
+ "Rc=100\n",
+ "Vdc=10\n",
+ "Vo=1\n",
+ "R=Ra #Ra=Rb=Rc=R\n",
+ "\n",
+ "#calculation\n",
+ "delta_R=(Vo*R)/(Vdc*abs(A)) #Change in resistance\n",
+ "\n",
+ "#result\n",
+ "print \"Change in resistance is\",delta_R,\"ohm\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Feedback resisrance is 1.8 kOhm\n",
+ "Gain of the differential amplifier is 38.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 6.9\n",
+ "#The differential input and output amplifier of figure 6-14(a) is used as a\n",
+ "#pre-amplifier and requires a differential output of atleast 3.7 V. Determine\n",
+ "#the gain of the circuit if the differential input Vin=100 mV.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vo=3.7 #differential output voltage in Volts\n",
+ "Vin=100*10**-3 #differential input voltage in Volts\n",
+ "R1=100 #Assume\n",
+ "Rf=0.5*((Vo*R1)/Vin-1) #Feedback resisrance\n",
+ "\n",
+ "#calculation\n",
+ "A=(1+2*Rf/R1) #Gain of the differential amplifier\n",
+ "\n",
+ "#result\n",
+ "print \"Feedback resisrance is\",round(Rf/10**3,1),\"kOhm\"\n",
+ "print \"Gain of the differential amplifier is\",round(A,0)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Minimum input voltage is 1.1 Volts\n",
+ "Maximum input voltage is 7.48 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 6.10\n",
+ "#In the figure 6-17, for the indicated values of resistors, determine the full\n",
+ "#scale range for the input voltage.\n",
+ "\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1min=1*10**3\n",
+ "R1max=6.8*10**3\n",
+ "io=1*10**-3 #Meter current for full-wave rectification\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "vin_min=1.1*R1min*io #Minimum input voltage\n",
+ "vin_max=1.1*R1max*io #Maximum input voltage\n",
+ "\n",
+ "#result\n",
+ "print \"Minimum input voltage is\",vin_min,\"Volts\"\n",
+ "print \"Maximum input voltage is\",vin_max,\"Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Current through diode is 5.0 mA\n",
+ "Voltage drop across diode is 0.7 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 6.11\n",
+ "#The circuit of figure 6-18,when the switch is in position 1, Vin=0.5 V and\n",
+ "#Vo=1.2 V. Determine the current through the diode and the voltage drop across\n",
+ "#it.Assume that the opamp is initially nulled.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin=0.5 #Input voltage\n",
+ "Vo=1.2 #Output voltage\n",
+ "R1=100 \n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "Io=Vin/R1 #Current through diode\n",
+ "Vd=Vo-Vin #Voltage drop across diode\n",
+ "\n",
+ "#result\n",
+ "print \"Current through diode is\",Io*10**3,\"mA\"\n",
+ "print \"Voltage drop across diode is\",Vd,\"Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Load Current is 0.5 mA\n",
+ "Output voltage is 2 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 6.12\n",
+ "#The circuit of figure 6-19,Vin=5 V, R=1 Kilo Ohm and V1=1 V. Find\n",
+ "#a) the load current.\n",
+ "#b) the output voltage Vo.\n",
+ "#Assume that the op-amp is initially nulled.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin=5 #Input voltage in Volts\n",
+ "V1=1 #Voltage in Volts\n",
+ "R1=10*10**3 #Resistance in ohms\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "I1=Vin/R1 #Load current\n",
+ "Vo=2*V1 #Output voltage\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Load Current is\",I1*10**3,\"mA\"\n",
+ "print \"Output voltage is\",Vo,\"Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Minimum output voltage is 0.0 Volts\n",
+ "Maximum output voltage is 5.38 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 6.13\n",
+ "#The circuit of figure 6-20, Vref=2V, R1=1 kilo Ohm. Rf=2.7 kilo Ohm. Assuming\n",
+ "#that the opamp is initially nulled, determine the range for the output voltage\n",
+ "#Vo.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=1*10**3 #Resistance in ohms\n",
+ "Rf=2.7*10**3 #Resistance in ohms\n",
+ "Vref=2 #Voltage in Volts\n",
+ "Io=0 #Since all the binary inputs D0 to D7 are logic zero\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "Vo_min=Io*Rf #Minimum output voltage\n",
+ "Io=(Vref/R1)*(1/2+1/4+1/8+1/16+1/32+1/64+1/128+1/256)\n",
+ "Vo_max=Io*Rf #Maximum output voltage\n",
+ "\n",
+ "#result\n",
+ "print \"Minimum output voltage is\",Vo_min,\"Volts\"\n",
+ "print \"Maximum output voltage is\",round(Vo_max,2),\"Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Minimum output voltage at darkness is -0.15 Volts\n",
+ "Maximum output voltage at illumination is -10.0 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 6.14\n",
+ "#The circuit of figure 6-21, Vdc=5 V and Rf=3 kilo Ohm. Determine the change in\n",
+ "#the output voltage if the photocell is exposed to light of 0.61 lux from a dark\n",
+ "#condition.Assume that the opamp is initially nulled.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Rf=3*10**3\n",
+ "Vdc=5\n",
+ "Rt1=100*10**3 #Resistance at darkness in ohms\n",
+ "Rt2=1.5*10**3 #Resistance at Illumination in ohms\n",
+ "\n",
+ "#calculation\n",
+ "Vomin=-(Vdc/Rt1)*Rf #Min output voltage at darkness\n",
+ "Vomax=-(Vdc/Rt2)*Rf #Max output voltage at Illumination\n",
+ "\n",
+ "#result\n",
+ "print \"Minimum output voltage at darkness is\",Vomin,\"Volts\"\n",
+ "print \"Maximum output voltage at illumination is\",round(Vomax,2),\"Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF0BJREFUeJzt3XuYXHV9x/H3QgJeuFrUoFxWEREFFVTY8ihMsJigAqX1\n2j5PC8iKN2yqQDC0TVKkgKL2qX20fZ6IeAO8UBQUqhGZ1SpgWRPdIKhE7jcNNyNYBdn+8TuTPZnM\n7s7Mzpnf75x5v55nnj1n5uyZ7/6Snd9+fr/fnAFJkiRJkiRJkiRJkiRJkiRJUsJuBV4duwipYavY\nBUhNjgMmgEeAe4BPADt28P23Aof3sJ5eny9vMrsBrAA+V9DzSG2xQ1BK3g+ck33dARgB9gRWA/Pb\nPMckMNTDmnp9PknSLHYANgJvaLr/qcCvgOOz/QuAM3OP14A7su3PAX8EHs3OdQowDDwBjAJ3AXcT\nOpyGTs/X7Ebgdbn9ecCvgZdm+0cDNwAPAlcDL8gdewshfSwGfg/8IXueNdnjxwM/BX4DrAfe3vTc\np2U/z53AidnP+dzssW2B84DbgHuBTwJPalG/JCVnMfAYrVPrBcCF2fangX/OPVZj6gUcpl5kG4YJ\nL5RfAJ4M7EfoYBpj952er9k/Ap/P7b+O0AEAPB/4bfZcWwOnAr8gdBrN514OfLbp3K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JbCTML7whd/+Le1SXVDg7BGlz9wPfJwwDfYipT5eaZPNP\nmmrebuz/NfA2wmWR1xE+wESSJEmSJEmSJEmSJEmSJEmSJEmSJKl6/h8flz155YhO7wAAAABJRU5E\nrkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7efdcc9d7750>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "\n",
+ "\n",
+ "#Example 6.15\n",
+ "#In the figure 6-23, R1Cf=1 second, and the input is a step(dc) voltage, as\n",
+ "#shown in figure 6-26(a). Determine the output voltage and sketch it.\n",
+ "#Assume that the opamp is initially nulled.\n",
+ "\n",
+ "%matplotlib inline\n",
+ "import math\n",
+ "import scipy\n",
+ "from pylab import ylabel, xlabel, title, plot, show\n",
+ "import scipy.integrate\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin=2 #Input voltage in Volts\n",
+ "VoO=0 #Output offset voltage\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "def integrnd(x) :\n",
+ " return 2\n",
+ "val1, err = scipy.integrate.quad(integrnd, 0, 1)\n",
+ "val2, err = scipy.integrate.quad(integrnd, 1, 2)\n",
+ "val3, err = scipy.integrate.quad(integrnd, 2, 3)\n",
+ "val4, err = scipy.integrate.quad(integrnd, 3, 4)\n",
+ "\n",
+ "a=-val1\n",
+ "b=a+-val2\n",
+ "c=b+-val3\n",
+ "d=c+-val4\n",
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "x=[0,1,2,3,4]\n",
+ "y=[VoO,a,b,c,d]\n",
+ "plt.plot(x,y)\n",
+ "title('Output voltage')\n",
+ "xlabel('time')\n",
+ "ylabel('Voutput')\n",
+ "plt.show()\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/7._Active_Filters_and_Oscillators.ipynb b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/7._Active_Filters_and_Oscillators.ipynb
new file mode 100644
index 00000000..514c377a
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/7._Active_Filters_and_Oscillators.ipynb
@@ -0,0 +1,1545 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 7: Active Filters and Oscillators"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R is 15.9 kOhms\n",
+ "Use 20 kohm POT as R\n",
+ "Resistance R1 is 10.0 kilo ohms\n",
+ "Resistance Rf is 10.0 kilo ohms\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.1\n",
+ "#Design a low pass filter at a cutoff frequency of 1kHz\n",
+ "#with a passband gain of 2\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fh=1*10**3 #Cut-off frequency\n",
+ "C=0.01*10**-6 #Assumption\n",
+ "R1=10*10**3 #Assumption\n",
+ "Rf=R1 #Since passband gain is 2,R1 and Rf must be equal\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "R=1/(2*math.pi*fh*C)\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R is\",round(R/10**3,1),\"kOhms\"\n",
+ "print \"Use 20 kohm POT as R\"\n",
+ "print \"Resistance R1 is\",round(R1/10**3),\"kilo ohms\"\n",
+ "print \"Resistance Rf is\",round(Rf/10**3),\"kilo ohms\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "New Resistance Rnew is 9937.5 Ohms\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.2\n",
+ "#Using the frequency scaling technique,convert the 1 kHz cutoff frequency of the\n",
+ "#lowpass filter of example 7-1 to a cutoff frequency of 1.6 kHz.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fc0=1*10**3 #Original cut-off frequency\n",
+ "fc1=1.6*10**3 #New cut-off frequency\n",
+ "R=15.9*10**3 #Original resistance value\n",
+ "\n",
+ "#calculation\n",
+ "k=fc0/fc1\n",
+ "Rnew=R*k\n",
+ "\n",
+ "#result\n",
+ "print \"New Resistance Rnew is\",Rnew,\"Ohms\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEfCAYAAABSy/GnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu8VXP+x/HXUShKN6JQJ5ViUkqSkdokd9PkltAdhcEM\noTDTiXEbufxyHyJFURq5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ex+6gCgk1Bb0DnOstnwTU85ZXYp3G9bFmrVO97WuxZq8zvfUC7K6kiszAahI1vfXQOTYB\nrwEPYjWQkG+ARpV9Ic9tWHPV5IjtjbzjiCSVEobkktJyli8HOgLzgc+BId72UUBXrNO7F/Ctt30z\ncCPWQf46ZX+9nwcMxvoMPgP+VMn5X8Oax2ZjfRBX+faZiPWbvO7bNtOLNdoxQ+uhbVcBPQj3b4QS\nWycsGYqISIqEOs3TZRiWtPwOAF5O8LhBrIYkklTqwxAJS2e7/3NAM+DYiO1fY01fzbHbc6uqLTaj\nmp7BEBEREREREREREREREREREREREREREUm+/wf1RctJBunj/AAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f8cb695c350>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Gain magnitude av1 at f1 2.0\n",
+ "Gain magnitude av2 at f2 1.99\n",
+ "Gain magnitude av2 at f2 1.96\n",
+ "Gain magnitude av2 at f2 1.64\n",
+ "Gain magnitude av2 at f2 1.41\n",
+ "Gain magnitude av2 at f2 0.63\n",
+ "Gain magnitude av2 at f2 0.28\n",
+ "Gain magnitude av2 at f2 0.2\n",
+ "Gain magnitude av2 at f2 0.07\n",
+ "Gain magnitude av2 at f2 0.02\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 7.3\n",
+ "#Plot the frequency response of the lowpass filter of example 7.1\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "%matplotlib inline\n",
+ "\n",
+ "from scipy import pi\n",
+ "from pylab import ylabel, xlabel, title, arange, plot, show, clf, semilogx\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Af=2 #Passband gain of the filter\n",
+ "fh=1000 #Cut-off frequency\n",
+ "\n",
+ "f1=10\n",
+ "f2=100\n",
+ "f3=200\n",
+ "f4=700\n",
+ "f5=1000\n",
+ "f6=3000\n",
+ "f7=7000\n",
+ "f8=10000\n",
+ "f9=30000\n",
+ "f10=100000\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "av1=Af/math.sqrt(1+(f1/fh)**2)\n",
+ "av2=Af/math.sqrt(1+(f2/fh)**2)\n",
+ "av3=Af/math.sqrt(1+(f3/fh)**2)\n",
+ "av4=Af/math.sqrt(1+(f4/fh)**2)\n",
+ "av5=Af/math.sqrt(1+(f5/fh)**2)\n",
+ "av6=Af/math.sqrt(1+(f6/fh)**2)\n",
+ "av7=Af/math.sqrt(1+(f7/fh)**2)\n",
+ "av8=Af/math.sqrt(1+(f8/fh)**2)\n",
+ "av9=Af/math.sqrt(1+(f9/fh)**2)\n",
+ "av10=Af/math.sqrt(1+(f10/fh)**2)\n",
+ "\n",
+ "#Magnitude plot\n",
+ "f=arange(0,100000)\n",
+ "s=2.0j*pi*f\n",
+ "p=2.0*pi*fh\n",
+ "A=Af*p/(s+p)\n",
+ "\n",
+ "clf() #clear the figure\n",
+ "plot()\n",
+ "title('frequency response')\n",
+ "semilogx(f,20*log10(abs(A)))\n",
+ "ylabel('Voltage gain(dB)')\n",
+ "xlabel('frequency(Hz)')\n",
+ "show()\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Gain magnitude av1 at f1\",round(av1,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av2,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av3,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av4,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av5,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av6,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av7,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av8,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av9,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av10,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.4.a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R2 is 33.86 kOhm\n",
+ "Resistance R3 is 33.86 kOhm\n",
+ "Resistance Rf is 15.82 kOhm\n",
+ " Use 20 kohm POT as Rf\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.4.a\n",
+ "#Design a second order low-pass filter at a high cutoff frequency of 1 kHz.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fh=1*10**3 # Cut-off frequency\n",
+ "C2=0.0047*10**-6 # Assumption\n",
+ "C3=C2\n",
+ "R1=27*10**3 # Assumption\n",
+ "\n",
+ "#calculation\n",
+ "R2=1/(2*math.pi*fh*C2)\n",
+ "R3=R2\n",
+ "Rf=0.586*R1\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R2 is\",round(R2/10**3,2),\"kOhm\"\n",
+ "print \"Resistance R3 is\",round(R3/10**3,2),\"kOhm\"\n",
+ "print \"Resistance Rf is\",round(Rf/10**3,2),\"kOhm\"\n",
+ "print \" Use 20 kohm POT as Rf\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.4.b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEfCAYAAABSy/GnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm8VfP+x/HXqUSIBjSpTmkgVKRwKVsZwnXjGpLhFn6F\nriG6aPDT6cqVoSvDL9Igoch4M0VimxVpQl2VTpwGJaW6LhrO74/P2u11dnufs885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I\nEk59GJIL3sLuoAoJNQW9D1zsLZ8B1PaWf8A6jetgzVp/9LZvwZq9zvfW87C7kkozE6tJ1PDWQ+f4\nDXgTeASrgYSsBBqU9Qd5RmLNVdMitjfwjiOSUEoYkk2KYyxfDxwDLAC+Aq7ytg8HumCd3ucC33nb\ntwF/xzrI36Lkr/dLgCuxPoMvgT+Vcf43seaxz7E+iIG+faZg/SZv+bZ96MUa7Zih9dC2gcCphPs3\nQomtE5YMRUQkSUKd5qnyNyxp+TUHXqvkcYNYDUkkodSHIRKWynb/l4BmQNeI7d9iTV+HYLfnlldb\nbEY1PYMhIiIiIiIiIiIiIiIiIiIiIiIiIiIiknj/Dz31z/sMKjRSAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f8c96af1490>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Gain magnitude av1 at f1 1.59\n",
+ "Gain magnitude av2 at f2 1.59\n",
+ "Gain magnitude av2 at f2 1.58\n",
+ "Gain magnitude av2 at f2 1.42\n",
+ "Gain magnitude av2 at f2 1.12\n",
+ "Gain magnitude av2 at f2 0.18\n",
+ "Gain magnitude av2 at f2 0.03\n",
+ "Gain magnitude av2 at f2 0.02\n",
+ "Gain magnitude av2 at f2 1.76 *10^-3\n",
+ "Gain magnitude av2 at f2 0.16 *10^-3\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.4.b\n",
+ "#Draw the frequency response of the network in example 7.4.a\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "%matplotlib inline\n",
+ "\n",
+ "from scipy import pi\n",
+ "from pylab import ylabel, xlabel, title, arange, plot, show, clf, semilogx\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Af=1.586 #Passband gain of the filter\n",
+ "fh=1000 #Cut-off frequency\n",
+ "\n",
+ "f1=10\n",
+ "f2=100\n",
+ "f3=200\n",
+ "f4=700\n",
+ "f5=1000\n",
+ "f6=3000\n",
+ "f7=7000\n",
+ "f8=10000\n",
+ "f9=30000\n",
+ "f10=100000\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "av1=Af/math.sqrt(1+(f1/fh)**4)\n",
+ "av2=Af/math.sqrt(1+(f2/fh)**4)\n",
+ "av3=Af/math.sqrt(1+(f3/fh)**4)\n",
+ "av4=Af/math.sqrt(1+(f4/fh)**4)\n",
+ "av5=Af/math.sqrt(1+(f5/fh)**4)\n",
+ "av6=Af/math.sqrt(1+(f6/fh)**4)\n",
+ "av7=Af/math.sqrt(1+(f7/fh)**4)\n",
+ "av8=Af/math.sqrt(1+(f8/fh)**4)\n",
+ "av9=Af/math.sqrt(1+(f9/fh)**4)\n",
+ "av10=Af/math.sqrt(1+(f10/fh)**4)\n",
+ "\n",
+ "#Magnitude plot\n",
+ "f=arange(0,100000) #frequency range\n",
+ "s=2.0j*pi*f**2\n",
+ "p=2.0*pi*fh**2\n",
+ "A=Af*p/(s+p)\n",
+ "\n",
+ "clf() #clear the figure\n",
+ "plot()\n",
+ "title('frequency response')\n",
+ "semilogx(f,20*log10(abs(A)))\n",
+ "ylabel('Voltage gain(dB)')\n",
+ "xlabel('frequency(Hz)')\n",
+ "show()\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Gain magnitude av1 at f1\",round(av1,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av2,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av3,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av4,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av5,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av6,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av7,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av8,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av9*10**3,2),\"*10^-3\"\n",
+ "print \"Gain magnitude av2 at f2\",round(av10*10**3,2),\"*10^-3\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.5.a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R is 15.92 kOhm\n",
+ "Resistance R1 is 10.0 kOhm\n",
+ "Resistance Rf is 10.0 kOhm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.5.a\n",
+ "#Design a high pass filter at a cutoff frequency of 1 kHz with a passband gain\n",
+ "#of 2.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fh=1*10**3 #Cut-off frequency\n",
+ "C=0.01*10**-6 #Assumption\n",
+ "Af=2\n",
+ "\n",
+ "#calculation\n",
+ "R=1/(2*math.pi*fh*C)\n",
+ "R1=10*10**3\n",
+ "Rf=R1 #since passband gain is 2\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R is\",round(R/10**3,2),\"kOhm\"\n",
+ "print \"Resistance R1 is\",round(R1/10**3,2),\"kOhm\"\n",
+ "print \"Resistance Rf is\",round(Rf/10**3,2),\"kOhm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.5.b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEfCAYAAABSy/GnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XeYFFW6x/HvAAbEAIhgQkbMcTHhXRFt1zUHVl0WFXPA\nqy7cVVyzl8HAioqo66ooYBYFFWRVMDIqK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4GJ3usg\n7zObA68C04GHqP41X07NcXiuAPp40ztgj5KdBLwN7OItfwR7CNS72Jg9p/g+fxV2IZ8K9PPinOxb\nv5Nv/lRgdNp3K6tl+mVgivf6GTjTWz4G6IqIiNRqLnbB7wN8CGzgLX8K6ORNb4dVWwHcA1zvTR8L\nrCNzwuh944DWAAAB/ElEQVQN/K83/QZWCgA40JsHSxjPeNO7YY/BBBu/511gQ2++uff+JvA7b7of\ncKk3PQbY13fseViySSWG2fw2oeyHJaNNvPnDfLGI5I2qpKTYpH6Bj8YGXwP4IzVH5twEq/bpjD2i\nEuzX+k917LcZVjrxP/t4fe89iT3TGuBToI3v2EOBld78z977YGxQuMuBvwAHeMvbAQt9+09i7RY/\nevOHYiWelFZYaaorsMxbthBLeiJ5pYQhxeoX33QZVhpYnWG7sgzL1lCzurYpduFuhCWVfWo5pn//\nqf0maznGc1hJ6E2sOsqfrDJtn2ldY2xk0r5Ul5pS2+iBR5J3asOQUvAqdgdVSqoq6G3gdG/6GKCF\nN70YazRuiVVrHe8tX4ZVe/3Zmy/D7krK5jWsJNHUm08dYxXwCnA/VgJJmQ9sVdcX8tyKVVcNT1u+\nlbcfkbxSwpBikqxluhewP/AxMAO4yFveFzgEa/Q+CfjKW14F3Ig1kL9KzV/v3YHzsTaD6cCJdRz/\nFax6bBLWBtHbt81TWLvJq75l471YM+0zNZ9a1hs4gur2jVRi64glQxERCUmq0TwqV2BJy6898FID\n91uJlZBE8kptGCLVoqz3HwlsD/whbfmXWNXXDtjtufW1N/ZENfXBEBERERERERERERERERERERER\nEREREcm//wehVjGzCowgOwAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f8c9595c510>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Gain magnitude av1 at f1 0.2\n",
+ "Gain magnitude av2 at f2 0.39\n",
+ "Gain magnitude av2 at f2 0.74\n",
+ "Gain magnitude av2 at f2 1.15\n",
+ "Gain magnitude av2 at f2 1.41\n",
+ "Gain magnitude av2 at f2 1.9\n",
+ "Gain magnitude av2 at f2 1.98\n",
+ "Gain magnitude av2 at f2 1.99\n",
+ "Gain magnitude av2 at f2 2.0\n",
+ "Gain magnitude av2 at f2 2.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 7.5.b\n",
+ "#The circuit of figure 6-17,for the indicated value of resistors\n",
+ "#determine the full scale range for the input voltage.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "%matplotlib inline\n",
+ "\n",
+ "from scipy import pi\n",
+ "from pylab import ylabel, xlabel, title, arange, plot, show, clf, semilogx\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Af=2 #Passband gain of the filter\n",
+ "fl=1000 #Cut-off frequency\n",
+ "\n",
+ "f1=100\n",
+ "f2=200\n",
+ "f3=400\n",
+ "f4=700\n",
+ "f5=1000\n",
+ "f6=3000\n",
+ "f7=7000\n",
+ "f8=10000\n",
+ "f9=30000\n",
+ "f10=100000\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "av1=(Af*(f1/fl))/math.sqrt(1+(f1/fl)**2)\n",
+ "av2=(Af*(f2/fl))/math.sqrt(1+(f2/fl)**2)\n",
+ "av3=(Af*(f3/fl))/math.sqrt(1+(f3/fl)**2)\n",
+ "av4=(Af*(f4/fl))/math.sqrt(1+(f4/fl)**2)\n",
+ "av5=(Af*(f5/fl))/math.sqrt(1+(f5/fl)**2)\n",
+ "av6=(Af*(f6/fl))/math.sqrt(1+(f6/fl)**2)\n",
+ "av7=(Af*(f7/fl))/math.sqrt(1+(f7/fl)**2)\n",
+ "av8=(Af*(f8/fl))/math.sqrt(1+(f8/fl)**2)\n",
+ "av9=(Af*(f9/fl))/math.sqrt(1+(f9/fl)**2)\n",
+ "av10=(Af*(f10/fl))/math.sqrt(1+(f10/fl)**2)\n",
+ "\n",
+ "#Magnitude plot\n",
+ "f=arange(100,100000)\n",
+ "s=2.0j*pi*f\n",
+ "p=2.0*pi*fl\n",
+ "A=Af*s/(s+p)\n",
+ "\n",
+ "clf() #clear the figure\n",
+ "plot()\n",
+ "title('frequency response')\n",
+ "semilogx(f,20*log10(abs(A)))\n",
+ "ylabel('Voltage gain(dB)')\n",
+ "xlabel('frequency(Hz)')\n",
+ "show()\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Gain magnitude av1 at f1\",round(av1,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av2,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av3,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av4,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av5,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av6,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av7,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av8,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av9,2)\n",
+ "print \"Gain magnitude av2 at f2\",round(av10,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.6.a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Lower cutoff frequency fl is 1.0 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.6.a\n",
+ "#Determine the low cutoff frequency fl of the filter shown in figure 7-8(a)\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "R2=33*10**3 #Resistance in ohms\n",
+ "R3=R2\n",
+ "C2=0.0047*10**-6 #Capacitance in Farads\n",
+ "C3=C2\n",
+ "\n",
+ "#calculation\n",
+ "fl=1/(2*math.pi*math.sqrt(R2*R3*C2*C3))\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Lower cutoff frequency fl is\",round(fl/10**3,0),\"kHz\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.6.b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEfCAYAAABSy/GnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcE/X9x/EXoHgAKlbrgcAiVW4VD5QqmGq1XoWfVYut\ntShKUSteqFz+YNGqeIFWK/UWT6T6E8UL1iOCJ6BAAQU5BDm8UEEQ0IXN74/PxJ0N2exsNsl3kryf\nj0cemZlMZj5h2HzyPeb7BRERERERERERERERERERERERERERERHJoTbALOB74GLHsYiISIg9ANzm\nOggRSU991wFIUWkJfJTi9WL6/1jPe4iISILXgc3ARqxKaj/gYWAM8BKwHjgG2Bt4BvgKWAL09x1j\nB+893wLzgKuA5b7XK4B9fesPA9f51k/BqsS+A94GOvleWwoMAGYDa4BxwHa+13t6710LLAJ+B5wB\nzEj4nFcAE5L/ExAF/uGde4MXa1ugDPgGmO8dM+4k73N+D6zw4gOIeOuDga+BT4E/+963M/AI9m+4\nFBhKZXI6B3gLuAX7d1wCnOB77znAYu+cSxKO2wdL+N8CrwAtqvmcIiJ19gb2pRP3MPbl3NVb3wH4\nALgG2AZohX15He+9PhJ4E9gF2AeYC3zmO15iwngIuNZb7gx8CRyGfXn+Ffui3dZ7/VPgPWBPoCn2\nxdjPe62LF+ex3vreWHtMQ+yLvq3vnDOBU6v5/FHsC7wdVpraGUt4vb31g7AEED/e58CR3vLO3mcA\nSxjlwK1e/N2xhLu/9/ojwLNAI6xUt4DKf/dzgJ+A87x/hwuAld5rjbCEuJ+3vgfQ3lvuCSz0Pnd9\nLAm9Xc3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+hRw/knYdVjM7A2iAG+fZ7A2k0m+7a95cWa7Jjx9fi2AcBxVLZvxBNbFywZ\niohIlsQbzXPlSixp+e0LvFjH40axEpJIRqkNQ6RSLuv9nwVaAcckbF+CVX21xrrn1tYB2IxqugdD\nREREREREREREREREREREREREREREJPP+H8OfoWq60nwKAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f8cb4145cd0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Gain magnitude av1 at f1 0.0159\n",
+ "Gain magnitude av2 at f2 0.0634\n",
+ "Gain magnitude av2 at f2 0.2506\n",
+ "Gain magnitude av2 at f2 0.6979\n",
+ "Gain magnitude av2 at f2 1.1215\n",
+ "Gain magnitude av2 at f2 1.5763\n",
+ "Gain magnitude av2 at f2 1.5857\n",
+ "Gain magnitude av2 at f2 1.5859\n",
+ "Gain magnitude av2 at f2 1.586\n",
+ "Gain magnitude av2 at f2 1.586\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 7.6.b\n",
+ "#Draw the frequency response plot of the filter in example 7.6.a\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "%matplotlib inline\n",
+ "\n",
+ "from scipy import pi\n",
+ "from pylab import ylabel, xlabel, title, arange, plot, show, clf, semilogx\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Af=1.586 #Passband gain of the filter\n",
+ "fl=1000 #Cut-off frequency\n",
+ "\n",
+ "f1=100\n",
+ "f2=200\n",
+ "f3=400\n",
+ "f4=700\n",
+ "f5=1000\n",
+ "f6=3000\n",
+ "f7=7000\n",
+ "f8=10000\n",
+ "f9=30000\n",
+ "f10=100000\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "av1=Af/math.sqrt(1+(fl/f1)**4)\n",
+ "av2=Af/math.sqrt(1+(fl/f2)**4)\n",
+ "av3=Af/math.sqrt(1+(fl/f3)**4)\n",
+ "av4=Af/math.sqrt(1+(fl/f4)**4)\n",
+ "av5=Af/math.sqrt(1+(fl/f5)**4)\n",
+ "av6=Af/math.sqrt(1+(fl/f6)**4)\n",
+ "av7=Af/math.sqrt(1+(fl/f7)**4)\n",
+ "av8=Af/math.sqrt(1+(fl/f8)**4)\n",
+ "av9=Af/math.sqrt(1+(fl/f9)**4)\n",
+ "av10=Af/math.sqrt(1+(fl/f10)**4)\n",
+ "\n",
+ "#Magnitude plot\n",
+ "f=arange(100,100000)\n",
+ "s=2.0j*pi*fl**2\n",
+ "p=2.0*pi*f**2\n",
+ "A=Af*p/(s+p)\n",
+ "\n",
+ "\n",
+ "clf() #clear the figure\n",
+ "plot()\n",
+ "title('frequency response')\n",
+ "semilogx(f,20*log10(abs(A)))\n",
+ "ylabel('Voltage gain(dB)')\n",
+ "xlabel('frequency(Hz)')\n",
+ "show()\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Gain magnitude av1 at f1\",round(av1,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av2,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av3,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av4,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av5,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av6,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av7,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av8,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av9,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av10,4)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.7.a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R1 is 10.0 kOhm\n",
+ "Resistance R is 15.92 kOhm\n",
+ "Bandpass Gain Af is 4\n",
+ "Resistance Rf is 10.0 kOhm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.7.a\n",
+ "#Design a wide band pass filter with fl=200 Hz, fh=1 kHz and passband gain=4.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fl=200 #Low cutoff freq in Hz\n",
+ "fh=1*10**3 #High cutoff freq in Hz\n",
+ "C=0.05*10**-6\n",
+ "\n",
+ "#calculation\n",
+ "R=1/(2*math.pi*fl*C)\n",
+ "R1=10*10**3\n",
+ "Rf=R1 #Since passband gain is 2,R1 and Rf must be equal\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R1 is\",round(R1/10**3,2),\"kOhm\"\n",
+ "print \"Resistance R is\",round(R/10**3,2),\"kOhm\"\n",
+ "print \"Bandpass Gain Af is 4\"\n",
+ "print \"Resistance Rf is\",round(Rf/10**3,2),\"kOhm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.7.b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEfCAYAAABSy/GnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XeUVOUZx/Hv0qtAxEIRFhTFFkUMFkRGASVRpKmgWEkA\naxRLFBuLmkQl9oLECAakCCIoKF1GpIiCgIqiVGmWKFUBKTv547kjs+uW2dk78075fc6Zwy0zc5+5\nZ5ln3g4iIiIiIiIiIiIiIiIiIiIiIiIiIiIikkDHAEuA7cBNjmMREZEk9jLwuOsgRCQ2ZVwHIBml\nIfB5Eecz6e8xy3uIiEg+7wL7gF1YlVQT4BVgEPAO8BNw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",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f8c9c196c50>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Gain magnitude av1 at f1 0.1997\n",
+ "Gain magnitude av2 at f2 0.5931\n",
+ "Gain magnitude av2 at f2 1.78\n",
+ "Gain magnitude av2 at f2 2.7735\n",
+ "Gain magnitude av2 at f2 3.3333\n",
+ "Gain magnitude av2 at f2 3.1508\n",
+ "Gain magnitude av2 at f2 2.7735\n",
+ "Gain magnitude av2 at f2 1.78\n",
+ "Gain magnitude av2 at f2 0.5655\n",
+ "Gain magnitude av2 at f2 0.3979\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.7.b\n",
+ "#Draw the frequency response plot for the filter in example 7.7.a\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "%matplotlib inline\n",
+ "\n",
+ "from scipy import pi\n",
+ "from pylab import ylabel, xlabel, title, arange, plot, show, clf, semilogx\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Af=4 #Passband gain of the filter\n",
+ "fl=200 #Cut-off frequency\n",
+ "fh=1000 #Higher Cut-off frequency\n",
+ "\n",
+ "f1=10\n",
+ "f2=30\n",
+ "f3=100\n",
+ "f4=200\n",
+ "f5=447.2\n",
+ "f6=700\n",
+ "f7=1000\n",
+ "f8=2000\n",
+ "f9=7000\n",
+ "f10=10000\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "av1=(Af*(f1/fl))/math.sqrt((1+(f1/fl)**2)*(1+(f1/fh)**2))\n",
+ "av2=(Af*(f2/fl))/math.sqrt((1+(f2/fl)**2)*(1+(f2/fh)**2))\n",
+ "av3=(Af*(f3/fl))/math.sqrt((1+(f3/fl)**2)*(1+(f3/fh)**2))\n",
+ "av4=(Af*(f4/fl))/math.sqrt((1+(f4/fl)**2)*(1+(f4/fh)**2))\n",
+ "av5=(Af*(f5/fl))/math.sqrt((1+(f5/fl)**2)*(1+(f5/fh)**2))\n",
+ "av6=(Af*(f6/fl))/math.sqrt((1+(f6/fl)**2)*(1+(f6/fh)**2))\n",
+ "av7=(Af*(f7/fl))/math.sqrt((1+(f7/fl)**2)*(1+(f7/fh)**2))\n",
+ "av8=(Af*(f8/fl))/math.sqrt((1+(f8/fl)**2)*(1+(f8/fh)**2))\n",
+ "av9=(Af*(f9/fl))/math.sqrt((1+(f9/fl)**2)*(1+(f9/fh)**2))\n",
+ "av10=(Af*(f10/fl))/math.sqrt((1+(f10/fl)**2)*(1+(f10/fh)**2))\n",
+ "\n",
+ "#Magnitude plot\n",
+ "f=arange(10,100000)\n",
+ "s=2.0j*pi*f\n",
+ "p1=2.0*pi*fl\n",
+ "p2=2.0*pi*fh\n",
+ "A=(Af*s)*p2/((s+p1)*(s+p2))\n",
+ "\n",
+ "clf() #clear the figure\n",
+ "plot()\n",
+ "title('frequency response')\n",
+ "semilogx(f,20*log10(abs(A)))\n",
+ "ylabel('Voltage gain(dB)')\n",
+ "xlabel('frequency(Hz)')\n",
+ "show()\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Gain magnitude av1 at f1\",round(av1,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av2,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av3,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av4,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av5,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av6,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av7,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av8,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av9,4)\n",
+ "print \"Gain magnitude av2 at f2\",round(av10,4)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.7.c"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Center frequency fc is 447.21 Hz\n",
+ "Quality factor Q is 0.56\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.7.c\n",
+ "#Calculate the value of Q for the filter.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fh=1*10**3 #Higher cut-off frequency\n",
+ "fl=200 #Lower cut-off frequency\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "fc=math.sqrt(fl*fh) #Center frequency\n",
+ "Q=fc/(fh-fl) #Quality factor\n",
+ "\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Center frequency fc is\",round(fc,2),\"Hz\"\n",
+ "print \"Quality factor Q is\",round(Q,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.8.a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R1 is 4.77 kilo ohm\n",
+ "Resistance R2 is 5.97 kilo ohm\n",
+ "Resistance R3 is 95.49 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.8.a\n",
+ "#Design the bandpass filter shown in figure 7-13(a) so that fc=1 kHz, Q=3 and\n",
+ "#Af=10.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fc=1*10**3 #Center frequency\n",
+ "Q=3 #Quality factor\n",
+ "Af=10 #Passband gain\n",
+ "C1=0.01*10**-6 #Assumption\n",
+ "\n",
+ "#calculation\n",
+ "C2=C1\n",
+ "R1=Q/(2*math.pi*fc*C1*Af)\n",
+ "R2=Q/(2*math.pi*fc*C1*(2*Q**2-Af))\n",
+ "R3=Q/(math.pi*fc*C1)\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R1 is\",round(R1/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R2 is\",round(R2/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R3 is\",round(R3/10**3,2),\"kilo ohm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.8.b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R1 is 2.65 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.8.b\n",
+ "#Change the centre frequency of example 7.8.a to 1.5 kHz, keeping Af and\n",
+ "#bandwidth constant.\n",
+ "\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fc0=1*10**3 #Original center frequency\n",
+ "fc1=1.5*10**3 #New center frequency\n",
+ "R2=5.97*10**3 #Original resistance\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "R2new=R2*(fc0/fc1)**2\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R1 is\",round(R2new/10**3,2),\"kilo ohm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R2 of highpass section is 15.92 kilo ohm\n",
+ "Resistance R of lowpass section is 15.92 kilo ohm\n",
+ "Bandpass Gain Af is 4\n",
+ "Resistance R1 is 10.0 kilo ohm\n",
+ "Resistance Rf is 10.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.9\n",
+ "#Design a wide-band reject filter having fh=200 Hz and fl=1 KHz.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fh=200 # Low cutoff freq in Hz\n",
+ "fl=1*10**3 # High cutoff freq in Hz\n",
+ "C2=0.01*10**-6 # Assumption\n",
+ "R2=1/(2*math.pi*fl*C2)\n",
+ "C=0.05*10**-6\n",
+ "R1=10*10**3 # Assumption\n",
+ "Rf=R1 # Since passband gain is 2,R1 and Rf must be equal\n",
+ "Af=4 # Since gain of high pass and lowpass is set to 2\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "R2=1/(2*math.pi*fl*C2)\n",
+ "R=1/(2*math.pi*fh*C)\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R2 of highpass section is\",round(R2/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R of lowpass section is\",round(R/10**3,2),\"kilo ohm\"\n",
+ "print \"Bandpass Gain Af is\",Af\n",
+ "print \"Resistance R1 is\",round(R1/10**3),\"kilo ohm\"\n",
+ "print \"Resistance Rf is\",round(Rf/10**3),\"kilo ohm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R is 39.01 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.10\n",
+ "#Design a 60 Hz active notch filter.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fn=60 #Notch-out frequency in Hz\n",
+ "C=0.068*10**-6 #Assumption\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "R=1/(2*math.pi*fn*C)\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R is\",round(R/10**3,2),\"kilo ohm\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Phase angle phi is -90.0 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.11\n",
+ "#For the all-pass filter of figure 7-16(a),find the phase angle phi if the\n",
+ "#frequency of vin is 1 kHz.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "f=1*10**3 #Input frequency in Hz\n",
+ "C=0.01*10**-6 \n",
+ "R=15.9*10**3 #Resistance in ohms\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "phi=math.atan(2*math.pi*f*C*R) #Phase angle\n",
+ "phi1=-2*phi*180/math.pi\n",
+ "\n",
+ "#result\n",
+ "print \"Phase angle phi is\",round(phi1),\"degree\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R is 3.3 kilo ohm\n",
+ "Use Resistance R as 3.3 kohm\n",
+ "Resistance Rf is 957.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.12\n",
+ "#Design the phase shift oscillator of figure 7-18 so that fo=200 Hz.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fo=200 # Frequency of oscillation\n",
+ "C=0.1*10**-6 # Assumption\n",
+ "R=3.3*10**3\n",
+ "\n",
+ "#calculation\n",
+ "R=0.065/(fo*C)\n",
+ "R=3.3*10**3 #Using rounded value\n",
+ "R1=10*R # To prevent loading of amplifier\n",
+ "Rf=29*R1\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R is\",round(R/10**3,1),\"kilo ohm\"\n",
+ "print \"Use Resistance R as 3.3 kohm\"\n",
+ "print \"Resistance Rf is\",round(Rf/10**3),\"kilo ohm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R is 3.3 kilo ohm\n",
+ "Resistance Rf is 24.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.13\n",
+ "#Design the wein bridge oscillator of figure 7-19 so that fo=965 Hz.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fo=965 # Frequency of oscillation\n",
+ "C=0.05*10**-6 # Assumption\n",
+ "R1=12*10**3 # Assumption\n",
+ "\n",
+ "#calculation\n",
+ "R=0.159/(fo*C)\n",
+ "Rf=2*R1\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R is\",round(R/10**3,1),\"kilo ohm\"\n",
+ "print \"Resistance Rf is\",round(Rf/10**3),\"kilo ohm\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance values R1,R2,R3 is 100.0 kilo ohm\n",
+ "Capacitance values C1,C2,C3 is 0.01 uF\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.14\n",
+ "#Design the quadrature oscillator of figure 7-20 so that fo=159 Hz.\n",
+ "#The opamp is the 1458/772.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fo=159 # Frequency of oscillation\n",
+ "C=0.01*10**-6 # Assumption\n",
+ "\n",
+ "#calculation\n",
+ "R=0.159/(fo*C)\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance values R1,R2,R3 is\",round(R/10**3,1),\"kilo ohm\"\n",
+ "print \"Capacitance values C1,C2,C3 is\",round(C*10**6,2),\"uF\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R2 is 11.6 kilo ohm\n",
+ "Resistance R is 10.0 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.15\n",
+ "#Design the square wave oscillator of figure 7-21(a) so that fo=1 kHz.\n",
+ "#The opamp is 741 with dc supply voltages = 15, -15 V.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fo=1*10**3 # Frequency of oscillation\n",
+ "C=0.05*10**-6 # Assumption\n",
+ "R1=10*10**3 # Assumption\n",
+ "\n",
+ "#calculation\n",
+ "R=1/(2*fo*C)\n",
+ "R2=1.16*R1\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R2 is\",round(R2/10**3,1),\"kilo ohm\"\n",
+ "print \"Resistance R is\",round(R/10**3),\"ohm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R2 is 10.0 kilo ohm\n",
+ "Resistance R1 is 10.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.16\n",
+ "#Design the triangular wave generator of figure 7-23 so that fo=2 kHz and\n",
+ "#Vo(pp)=7V. The opamp is a 1458/772 and supply voltages =15,-15 V.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "fo=2*10**3 # Frequency of oscillation\n",
+ "vo=7 #Output voltage\n",
+ "Vsat=14 #Saturation voltage for opamp 1458\n",
+ "R3=40*10**3 #Assumption\n",
+ "C1=0.05*10**-6 #Assumption\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "R2=(vo*R3)/(2*Vsat)\n",
+ "k=R3/(4*fo*R2) #Using fo=R3/(4*R1*C1*R2),k=R1*C1;\n",
+ "R1=k/C1\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R2 is\",round(R2/10**3),\"kilo ohm\"\n",
+ "print \"Resistance R1 is\",round(R1/10**3),\"kilo ohm\"\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Terminal voltage Vc is 10.43 volts\n",
+ "Approximate Nominal freq fo is 26.09 kHz\n",
+ "Approximate Nominal freq fo1 is 41.67 kHz\n",
+ "Approximate Nominal freq fo2 is 8.33 kHz\n",
+ "Change in output freq delta_fo is 33.33 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 7.17\n",
+ "#In the circuit of figure 7-25(c), V=12 V, R2=1.5 Kilo ohm, R1=R3=10 Kilo ohm\n",
+ "#and C1=0.001 uF.\n",
+ "#a)Determine the nominal frequency of all the output waveforms.\n",
+ "#b)Compute the modulation in the output frequencies if Vc is varied between 9.5 V\n",
+ "#and 11.5 V.\n",
+ "\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "R2=1.5*10**3\n",
+ "R1=10*10**3\n",
+ "R3=10*10**3\n",
+ "C1=0.001*10**-6\n",
+ "V=12 #Supply voltage\n",
+ "Vc1=9.5\n",
+ "Vc2=11.5\n",
+ "\n",
+ "#calculation\n",
+ "Vc=R3*V/(R2+R3) #Using voltage divider rule\n",
+ "fo=2*(V-Vc)/(V*R1*C1)\n",
+ "fo1=2*(V-Vc1)/(V*R1*C1)\n",
+ "fo2=2*(V-Vc2)/(V*R1*C1)\n",
+ "delta_fo=fo1-fo2 #Change in output freq\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Terminal voltage Vc is\",round(Vc,2),\"volts\"\n",
+ "print \"Approximate Nominal freq fo is\",round(fo/10**3,2),\"kHz\"\n",
+ "print \"Approximate Nominal freq fo1 is\",round(fo1/10**3,2),\"kHz\"\n",
+ "print \"Approximate Nominal freq fo2 is\",round(fo2/10**3,2),\"kHz\"\n",
+ "print \"Change in output freq delta_fo is\",round(delta_fo/10**3,2),\"kHz\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/8._Comparators_and_Converters.ipynb b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/8._Comparators_and_Converters.ipynb
new file mode 100644
index 00000000..6ed539e1
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/8._Comparators_and_Converters.ipynb
@@ -0,0 +1,386 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 8. Comparators and Converters"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 8.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEZCAYAAABiu9n+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8FPX9x/FXDDfIVUFOjUVRsIpoOQTFKIiACFWKgBeI\ntrZWrFoVsFbwqFdtvVqPeiBVDgUUQUVBIXgTTgXkLsgp6o9DUDyA/f3xmTSbsBt2N7v7ndl9Px+P\neWRnM5n9bLKZz3xvEBEREREREREREREREREREREREREREREREREREZHAOx14C5gDDHQcSyQXAV+5\nD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sKJ\n27tAc+/xSOA+d6EkbDww0HUQqdYd61WzGhjuOJZEjMPmp/oBa1+53G04cTkNq65ZRHFXum5OI4rP\nCVh98iKsG+ZNbsMplzMIXu+mo7Df/SKsC3XQ/n9bYSWJT4CXCV7vpurA1xQnahERERERERERERER\nERERERERERERERGRg6kF/N51ECIi4k95BHM0vYiIpMF4bDryhQRz2gYREUmhI1FJQgIuyLPAivhd\nUKfwFvkfJQkREYlKSUIkdXahWTYl4JQkRFLn/7B1EhajhmsRERERERERERERERERERERERERERER\nERERERERf/p/LsxYpbABTCwAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f53235869d0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 8.1\n",
+ "#In the circuit of figure 8-4(a), R1=100 ohm,R2=56 kilo Ohm, Vin=V pp sine wave\n",
+ "#and the opamp is type 741 with supply voltages 15 V, -15 V.\n",
+ "#Determine the threshold voltages Vul and Vut and draw the output waveform.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "%matplotlib inline\n",
+ "import math\n",
+ "import array\n",
+ "import numpy as np\n",
+ "#Variable declaration\n",
+ "R1=100\n",
+ "R2=56*10**3\n",
+ "vin=1 #Input voltage in volt\n",
+ "pos_Vsat=14 #Positive saturation voltage in volt\n",
+ "neg_Vsat=-14 #Negative saturation voltage in volt\n",
+ "Vut=(R1/(R1+R2))*(pos_Vsat) #Upper threshold voltage\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "Vut=(R1/(R1+R2))*(pos_Vsat) #Upper threshold voltage\n",
+ "Vlt=(R1/(R1+R2))*(neg_Vsat) #Lower threshold voltage\n",
+ "\n",
+ "t=arange(0,2*math.pi,0.1)\n",
+ "vut=0.5*np.sin(t)\n",
+ "subplot(211)\n",
+ "plot(t,vut)\n",
+ "ylabel('Vin')\n",
+ "xlabel('t')\n",
+ "title(r'$Input voltage$')\n",
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "t1=math.asin(0.025/0.5)\n",
+ "t2=math.pi-math.asin(-0.025/0.5)\n",
+ "t3=2*math.pi\n",
+ "x=[0,t1,t2,t3]\n",
+ "y=[-14,14,-14,14]\n",
+ "subplot(212)\n",
+ "plt.step(x,y) #Plotting square wave\n",
+ "title('Output Waveform')\n",
+ "xlabel('t')\n",
+ "ylabel('Vo')\n",
+ "\n",
+ "#result\n",
+ "plt.show()\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 8.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "#Since zener diode is forward biased\n",
+ "Output voltage during positive half-cycle of the input is -0.7 V\n",
+ "Output voltage during negative half-cycle of the input is 5.1 V\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAEZCAYAAABiu9n+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VOXZx/FvCDsISAVZNX1xQ6uIiiAgRkEFRKhYBNxA\ntLZ114qAtYLWutXWrXWpClIFUUCpqAgoBFwJCIjIIlCQVdSyCIoLZN4/7pNmEmaSSXJmnjlnfp/r\nmiszk5OTO4Gc+zzb/YCIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIBN6pwHRgHjDIcSyxXAh8\n5ToIEZFM9m+gfxLP/zZQtYJf2xaY6NO5RHxVxXUAIimQjbUm8pJ0/uZAFrC3gl9/BjDLp3OJ+CrL\ndQAiKdAOGAscDZwItAeaAQuwBHIOMAQ4HjgBOBJ4H2gM/ADM9s7RDxgIVAOmAd2AM4FfYxf1aVHH\nDgQuAG70vscDWAIYAiz0jnkOWANMBW4GDilxrue8+I8ALg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 "<matplotlib.figure.Figure at 0x7f534062a0d0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "#Example 8.2\n",
+ "#In the circuit of figure 8-7(a), Vin=500 mV peak 60-Hz sinewave, R=100 ohm.\n",
+ "#IN3826 zener with Vz=5.1 V and the supply voltages= 15 V, -15V.\n",
+ "#Determine the output voltage swing.Assume that the voltage drop across\n",
+ "#the forward biased zener=0.7V.\n",
+ "\n",
+ "%matplotlib inline\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt\n",
+ "import math\n",
+ "import array\n",
+ "\n",
+ "#Variable declaration\n",
+ "vin=5*10**-3\n",
+ "R=100\n",
+ "Vd1=-0.7 # Output voltage during positive half-cycle of the input\n",
+ "Vd2=5.1 # Output voltage during negative half-cycle of the input\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "\n",
+ "t=arange(0,2*math.pi,0.1)\n",
+ "vut=0.5*np.sin(t)\n",
+ "subplot(211)\n",
+ "plot(t,vut)\n",
+ "ylabel('Vin')\n",
+ "xlabel('t')\n",
+ "title(r'$Input voltage$')\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "t1=math.pi\n",
+ "t2=2*math.pi\n",
+ "x=[0,t1,t2]\n",
+ "y=[-0.7,-0.7,5.1]\n",
+ "subplot(2,1,2)\n",
+ "plt.step(x,y)\n",
+ "title('Output Waveform')\n",
+ "xlabel('t')\n",
+ "ylabel('Vo')\n",
+ "\n",
+ "#result\n",
+ "print \"#Since zener diode is forward biased\"\n",
+ "print \"Output voltage during positive half-cycle of the input is\",Vd1,\"V\"\n",
+ "print \"Output voltage during negative half-cycle of the input is\",Vd2,\"V\" \n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 8.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output freq Fo is 2000 Hz\n",
+ "Output freq Fo/2 is 1000 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 8.3\n",
+ "#The V..F converter of figure 8-12 is initially adjusted for a 10 kHz full scale\n",
+ "#output frequency.Determine the output frequencies Fo and Fo/2 if the output\n",
+ "#signal Vin=2 V.\n",
+ "%matplotlib inline\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "import array\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin=2 # Input voltage\n",
+ "Fo1=2*10**3 # Output freq Fo when Vin=2V\n",
+ "Fo2=1*10**3 # Output freq Fo/2 when Vin=2V\n",
+ "\n",
+ "#calculation\n",
+ "import array\n",
+ "v=array.array('i',(0 for i in range(0,50)))\n",
+ "\n",
+ "\n",
+ "count=1\n",
+ "for i in range(1,50): #for 5 cycles\n",
+ " if count<4:\n",
+ " v[i]=5\n",
+ " else:\n",
+ " v[i]=0\n",
+ " if count<10:\n",
+ " count=count+1\n",
+ " else:\n",
+ " count=1\n",
+ "\n",
+ "\n",
+ "subplot(211)\n",
+ "plt.plot(v)\n",
+ "title('Output Waveform')\n",
+ "xlabel('t(microsec)')\n",
+ "ylabel('Pulse freq output,Fo(V)')\n",
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "for i in range(1,50): #for 5 cycles\n",
+ " if count<10:\n",
+ " v[i]=5\n",
+ " else:\n",
+ " v[i]=0\n",
+ " if count<20:\n",
+ " count=count+1\n",
+ " else:\n",
+ " count=1\n",
+ "\n",
+ "subplot(2,1,2)\n",
+ "plt.plot(v)\n",
+ "title('Output Waveform')\n",
+ "xlabel('t(microsec)')\n",
+ "ylabel('Pulse freq output,Fo(V)')\n",
+ "plt.show()\n",
+ "\n",
+ "#result\n",
+ "print \"Output freq Fo is \",Fo1,\"Hz\"\n",
+ "print \"Output freq Fo/2 is\",Fo2,\"Hz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 8.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output voltage is 0.28 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 8.4\n",
+ "#The F/V converterof figure 8-14(a) is initially adjusted for Vo=2.8V at Fin max\n",
+ "#of 10 kHz. Determine the output voltage Vo if fin= 1 kHz.\n",
+ "\n",
+ "#Variable decclaration\n",
+ "Vo=2.8 #At Finmax of 10kHz\n",
+ "\n",
+ "#Calculation\n",
+ "Vo1=Vo/10 #Output voltage at Fin=1kHz\n",
+ "\n",
+ "#Result\n",
+ "print \"Output voltage is\",Vo1,\"Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 8.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEZCAYAAAB4hzlwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VfW57/HPJgkIolgUUAEFI7RMHgGFyBhARhXqiNSh\nBau2FYeeW4/a057m3JfD7dVqaz0HpzoP2IoKeAUnCIMIMg8CMkiQQSYZFFAuMfv88axITJOwk6y1\nf3ut9X2/Xvu1h6y98myG9ezf85tARERERERERERERERERERERERERERERERERERERKqlN/A2MA/4\nqeNYKvITYKfrIERE4mQiMDLA878PZNfwvZ2Bf/h0LpFaq+M6AJGAZWGthcKAzt8cSADFNXx/f2Ca\nT+cSqbWE6wBEAnYu8CzQHugKdAd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+hespbAUeA0fRx+J\niIiIiIgwpU4EAAAAg0lEQVSIiIiIiIiIiIiIiIiIiIiISMZpBPzSdRAiIpIZWhG9mekiIlJD47Gl\ntRej5QdERGLvdNRSkJAK6yqpIpksSktPS8woKYiIyHeUFET89xVHlmwWCRUlBRH/fYGt3b8cdTSL\niIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIhI3P0PCYhjjL2RazwAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x7f532311b890>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "#Example 8.5\n",
+ "#In the circuit of figure 8-25(a), Vin=200 mV peak to peak sine wave at 100 Hz.\n",
+ "#Briefly describe the operation of the circuit and draw the output waveform.\n",
+ "%matplotlib inline\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import numpy as np\n",
+ "import math\n",
+ "import array\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin=100*10**-3 # Input voltage\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "t=arange(0,math.pi,0.1) #time scale\n",
+ "v=Vin*np.sin(t)\n",
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "plt.xlim(0,2*math.pi)\n",
+ "plt.ylim(0,0.1)\n",
+ "plt.plot(t,v)\n",
+ "ylabel('Vin')\n",
+ "xlabel('t')\n",
+ "title(r'$Input voltage$')\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "plt.show()"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/9._Specialixed_IC_Applications.ipynb b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/9._Specialixed_IC_Applications.ipynb
new file mode 100644
index 00000000..117f377b
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/9._Specialixed_IC_Applications.ipynb
@@ -0,0 +1,813 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 9: Specialixed IC Applications"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 9.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R2 is 31.6 kilo ohm\n",
+ "Resistance R3 is 3.27 kilo ohm\n",
+ "Resistance R1 is Open\n",
+ "Resistance R4 is 25.15 kilo ohm\n",
+ "Resistance R5 is 25.15 kilo ohm\n",
+ "Resistance R6 is 1.8 kilo ohm\n",
+ "Resistance R7 is 9.0 kilo ohm\n",
+ "Resistance R8 is 1.5 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 9.1\n",
+ "#The FLT-U2 is to be used as a second order inverting Butterworth low pass filter\n",
+ "#with a dc gain of 5,cutoff frequency of 2 kHz and Q=10. Determine the values\n",
+ "#of the external components.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "dc_gain=5\n",
+ "f1=2*10**3 # Cutoff freq in Hz\n",
+ "Q=10 # Figure of merit\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "R2=(316*10**3)/10 #Resistance R2\n",
+ "R3=(100*10**3)/((3.16*Q)-1)\n",
+ "R4=(5.03*10**7)/f1\n",
+ "R5=R4\n",
+ "R6=1.8*10**3 # Assumption\n",
+ "R7=dc_gain*R6\n",
+ "R8=(R6*R7)/(R6+R7)\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R2 is\",round(R2/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R3 is\",round(R3/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R1 is Open\"\n",
+ "print \"Resistance R4 is\",round(R4/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R5 is\",round(R5/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R6 is\",round(R6/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R7 is\",round(R7/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R8 is\",round(R8/10**3,2),\"kilo ohm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 9.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R2 is 100.0 kilo ohm\n",
+ "Resistance R3 is 2.96 kilo ohm\n",
+ "Resistance R1 is Open ohm\n",
+ "Resistance R4 is 10.0 kilo ohm\n",
+ "Resistance R5 is 10.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 9.2\n",
+ "#Using the FLT-U2, design a second order inverting Butterworth bandpass filter\n",
+ "#with centre frequency f1=5 kHz and Q=10.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "f1=5*10**3 # Center freq in Hz\n",
+ "Q=10 # Figure of merit\n",
+ "R2=100*10**3 # Constant for band-pass filter\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "R3=(100*10**3)/((3.48*Q)-1)\n",
+ "R4=(5.03*10**7)/f1\n",
+ "R5=R4\n",
+ "\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R2 is\",round(R2/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R3 is\",round(R3/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R1 is Open\",\"ohm\"\n",
+ "print \"Resistance R4 is\",round(R4/10**3),\"kilo ohm\"\n",
+ "print \"Resistance R5 is\",round(R5/10**3),\"kilo ohm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 9.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R2 is 100.0 kilo ohm\n",
+ "Resistance R3 is 2.96 kilo ohm\n",
+ "Resistance R1 is Open ohm\n",
+ "Resistance R4 is 10.06 kilo ohm\n",
+ "Resistance R5 is 10.06 kilo ohm\n",
+ "Resistance R6 is 10.0 kilo ohm\n",
+ "Resistance R7 is 10.0 kilo ohm\n",
+ "Resistance R8 is 10.0 kilo ohm\n",
+ "Resistance R9 is 3.33 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 9.3\n",
+ "#Using the FLT-U2, design a notch filter with 5 kHz notch out frequency and\n",
+ "#Q=10.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "f1=5*10**3 # Center freq in Hz\n",
+ "Q=10 # Figure of merit\n",
+ "R2=100*10**3 # Constant for band-pass filter\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "R3=(100*10**3)/((3.48*Q)-1)\n",
+ "R4=(5.03*10**7)/f1\n",
+ "R5=R4\n",
+ "R6=10*10**3 #Assumption\n",
+ "R7=R6\n",
+ "R8=R6\n",
+ "R9=(R6*R7*R8)/(R6*R7+R6*R8+R7*R8) #Since R6||R7||R8\n",
+ "\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R2 is\",round(R2/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R3 is\",round(R3/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R1 is Open\",\"ohm\"\n",
+ "print \"Resistance R4 is\",round(R4/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R5 is\",round(R5/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R6 is\",round(R6/10**3),\"kilo ohm\"\n",
+ "print \"Resistance R7 is\",round(R7/10**3),\"kilo ohm\"\n",
+ "print \"Resistance R8 is\",round(R8/10**3),\"kilo ohm\"\n",
+ "print \"Resistance R9 is\",round(R9/10**3,2),\"kilo ohm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 9.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R2 is 20.0 kilo ohm\n",
+ "Resistance R3 is 14.14 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 9.4\n",
+ "#Using the MF5,design a second order Butterworth lowpass filter with a cutoff\n",
+ "#frequency of 500Hz and a passband gain of -2. Assume that a 5,-5 V power supply\n",
+ "#and a CMOS clock are used.\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "f1=500 #Cut-off freq in Hz\n",
+ "Holp=-2 #Passband gain\n",
+ "R1=10*10**3 #Assumption\n",
+ "Q=0.707 #Figure of merit Q is fixed for second order butterworth LPF\n",
+ "#calculation\n",
+ "\n",
+ "R2=-R1*Holp #Using Holp=-R2/R1;\n",
+ "R3=Q*R2 #Using Q=R3/R2\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R2 is\",round(R2/10**3),\"kilo ohm\"\n",
+ "print \"Resistance R3 is\",round(R3/10**3,2),\"kilo ohm\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 9.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Capacitance C is 1.0 micro Farad\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 9.5\n",
+ "#In the circuit of figure 9-16(a), Ra=10 Kilo ohm, the output pulse width\n",
+ "#tp=10 ms. Determine the value of C.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ra=10*10**3 #Resistance in ohm\n",
+ "tp=10*10**-3 #Output pulse width\n",
+ "C=tp/(1.1*Ra)\n",
+ "\n",
+ "#calculation\n",
+ "C=tp/(1.1*Ra)\n",
+ "\n",
+ "#result\n",
+ "print \"Capacitance C is\",round(C*10**6),\"micro Farad\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance Ra is 54.55 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 9.6\n",
+ "#The circuit of figure 9-16 (a) is to be used as a divide-by-2 network.\n",
+ "#The frequency of the input trigger signal is 2 kHz.If the value of C=0.01 uF\n",
+ "#What should be the value of Ra.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "f=2*10**3 #Freq of input trigger signal in Hz\n",
+ "C=0.01*10**-6\n",
+ "\n",
+ "#calculation\n",
+ "tp=1.2/f\n",
+ "Ra=tp/(1.1*C)\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance Ra is\",round(Ra/10**3,2),\"kilo ohm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Charging time of the capacitor is 0.42 ms\n",
+ "Discharging time of the capacitor is 0.27 ms\n",
+ "Freq of oscillation is 1.4 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 9.7\n",
+ "#In the astable multivibrator of figure 9-21(a), Ra=2.2 kilo ohm, Rb=3.9 kilo ohm\n",
+ "#and C=0.1 uF. Determine the pulse width tc, negative pulse width td and free\n",
+ "#running frequency fo.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ra=2.2*10**3 # Resistance in ohm\n",
+ "Rb=3.9*10**3 # Resistance in ohm\n",
+ "C=0.1*10**-6 # capacitance in farad\n",
+ "\n",
+ "#calculation\n",
+ "tc=0.69*(Ra+Rb)*C # Charging time of the capacitor\n",
+ "td=0.69*Rb*C # Discharging time of the capacitor\n",
+ "T=tc+td\n",
+ "fo=1/T # Freq of oscillation\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Charging time of the capacitor is\",round(tc*10**3,2),\"ms\"\n",
+ "print \"Discharging time of the capacitor is\",round(td*10**3,2),\"ms\"\n",
+ "print \"Freq of oscillation is\",round(fo/10**3,1),\"kHz\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 9.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Freq of free running ramp generator is 5.16 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 9.8\n",
+ "#Referring to the circuit of figure 9-24(a),determine the frequency of the free-\n",
+ "#running ramp generator if R is set at 10 kHz.\n",
+ "#Assume that Vbe=Vd1=0.7 V.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=10*10**3 #Resistance in ohm\n",
+ "Vcc=5 #Supply voltage in volt\n",
+ "Vbe=0.7 #Base to emitter voltage in volt\n",
+ "C=0.05*10**-6 #Capacitance in farad\n",
+ "\n",
+ "#calculation\n",
+ "Ic=(Vcc-Vbe)/R #Collector current in ampere\n",
+ "fo=(3*Ic)/(Vcc*C)\n",
+ "\n",
+ "#result\n",
+ "print \"Freq of free running ramp generator is\",round(fo/10**3,2),\"kHz\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 9.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Free running frequency of VCO is 2.5 kHz\n",
+ "Lock range frequency of VCO is 1.0 kHz\n",
+ "Capture range frequency of VCO is 66.49 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 9.9\n",
+ "#Referring to the circuit of figure 9-33(a),determine the free-running frequency\n",
+ "#fout, the lock range fl and the capture range fc.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "R1=12*10**3 # Resistance in ohm\n",
+ "V_plus=10 # Supply voltage in volt\n",
+ "V_minus=-10 # Supply voltage in volt\n",
+ "C1=0.01*10**-6 # Capacitance in farad\n",
+ "C2=10*10**-6 # Capacitance in farad\n",
+ "\n",
+ "#calculation\n",
+ "fout=1.2/(4*R1*C1)\n",
+ "V=V_plus-V_minus\n",
+ "fl=(8*fout)/V\n",
+ "fc=math.sqrt(fl/(2*math.pi*3.6*10**3*C2))\n",
+ "\n",
+ "#result\n",
+ "print \"Free running frequency of VCO is\",round(fout/10**3,1),\"kHz\"\n",
+ "print \"Lock range frequency of VCO is\",round(fl/10**3),\"kHz\"\n",
+ "print \"Capture range frequency of VCO is\",round(fc,2),\"Hz\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 9.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R is 20.0 ohm\n",
+ "Output voltage Vo is 17.0 Volt\n",
+ "Min input voltage Vin is 19.0 Volt\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 9.10\n",
+ "#Using the 7805C voltage regulator , design a current source that will deliver\n",
+ "#a 0.25 A current to a 48 ohm, 10 W load.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vr=5 #Voltage in volt\n",
+ "Il=0.25 #Load current in ampere\n",
+ "Rl=48 #Load resistance in ohm\n",
+ "dropout_volt=2 #Constant for IC7805C\n",
+ "\n",
+ "#calculation\n",
+ "R=Vr/Il #Approximate result sice Iq is negligible in the eq. Il=(Vr/Il)+Iq where Iq is quiescent current\n",
+ "Vl=Rl*Il\n",
+ "Vo=Vr+Vl\n",
+ "Vin=Vo+dropout_volt\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R is\",R,\"ohm\"\n",
+ "print \"Output voltage Vo is\",Vo,\"Volt\"\n",
+ "print \"Min input voltage Vin is\",Vin,\"Volt\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 9.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistance R2_min is 0.71 kilo ohm\n",
+ "Resistance R2_max is 2.03 kilo ohm\n",
+ "Therefore resistance should be varied from R2_min to R2_max values\n",
+ "To do this we take R2 as 3kohm potentiometer\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 9.11\n",
+ "#Design an adjustable voltage regulator to satisfy the following specifications\n",
+ "#Output voltage Vo= 5 to 12 V\n",
+ "#Output current Io= 1 A.\n",
+ "#Voltage regulator is LM317.\n",
+ "\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vo_min=5 #Min output voltage in volt\n",
+ "Vo_max=12 #Max output voltage in volt\n",
+ "Vref=1.25 #Reference voltage in volt\n",
+ "Iadj=100*10**-6 #Adjustment pin current in ampere\n",
+ "R1=240 #Assumption\n",
+ "C2=1*10**-6 #Added to the circuit to improve transient response\n",
+ "C3=1*10**-6 #Added to the circuit to obtain high ripple rejection ratios\n",
+ "\n",
+ "#calculation\n",
+ "R2_min=R1*(Vo_min-Vref)/(Vref+Iadj*R1) #Using Vo_min=Vref*(1+R2/R1)+Iadj*R2\n",
+ "R2_max=R1*(Vo_max-Vref)/(Vref+Iadj*R1) #Using Vo_max=Vref*(1+R2/R1)+Iadj*R2\n",
+ "\n",
+ "#result\n",
+ "print \"Resistance R2_min is\",round(R2_min/10**3,2),\"kilo ohm\"\n",
+ "print \"Resistance R2_max is\",round(R2_max/10**3,2),\"kilo ohm\"\n",
+ "print \"Therefore resistance should be varied from R2_min to R2_max values\"\n",
+ "print \"To do this we take R2 as 3kohm potentiometer\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 9.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Sense current,Ipk is 1.0 A\n",
+ "Sense resistance,Rsc is 0.33 ohm\n",
+ "Constant K is 1.06\n",
+ "i.e, ton is K times of toff\n",
+ "OFF time period,toff is 24.27 us\n",
+ "ON time period,ton is 25.73 us\n",
+ "Inductance,L is 151.7 uH\n",
+ "Output capacitance,Co is 125.0 uF\n",
+ "Resistance R2 is 12.0 kilo ohm\n",
+ "Resistance R1 is 38.0 kilo ohm\n",
+ "efficiency is 81.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "#Example 9.12\n",
+ "#Design a step down switching regulator according to the following\n",
+ "#specifications.\n",
+ "#Input voltage Vin= 12 V dc.\n",
+ "#Output voltage Vo= 5V at 500 m A maximum.\n",
+ "#Output ripple voltage Vripple= 50 mV or 1% of Vo\n",
+ "#Switching regulator :uA78S40.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Iomax=500*10**-3 # Max output current in ampere\n",
+ "Vo=5 # Output voltage in volt\n",
+ "Vd=1.25 # Voltage drop across the power diode in volt\n",
+ "Vin=12 # Input voltage in volt\n",
+ "Vs=1.1 # Output saturation voltage in volt\n",
+ "Vripple=50*10**-3 # Output ripple voltage in volt\n",
+ "Vref=1.245 # Reference voltage in volt\n",
+ "Vr2=1.2 # Voltage across resistance R2 in volt\n",
+ "\n",
+ "#calculation\n",
+ "Ipk=2*Iomax # Sense current in ampere\n",
+ "Rsc=0.33/Ipk # Sense resistance in ohm\n",
+ "K=(Vo+Vd)/(Vin-Vs-Vo) # K= ton/toff\n",
+ "f=20*10**3 # Assuming operating freq in Hz\n",
+ "T=1/f\n",
+ "toff=T/2.06 # Using ton+toff=T and substituting for ton\n",
+ "ton=1.06*toff\n",
+ "Ct=45*10**-5*toff # Oscillator timing capacitance in farad\n",
+ "L=((Vo+Vd)/Ipk)*toff # Inductance in henry\n",
+ "Co=Ipk*((ton+toff)/(8*Vripple)) # Output capacitance in farad\n",
+ "I2=0.1*10**-3 # Assuming the current through R2\n",
+ "R2=Vref/I2 # Resistance R2 in ohm\n",
+ "R2=12*10**3 # Taking approximate value\n",
+ "R1=(R2*(Vo-Vr2))/Vr2 # Using Vr2=(R1*Vo)/R1+R2, voltage divider rule\n",
+ "efficiency=((Vin-Vs+Vd)/Vin)*(Vo/(Vo+Vd))*100\n",
+ "\n",
+ "#result\n",
+ "print \"Sense current,Ipk is\",Ipk,\"A\"\n",
+ "print \"Sense resistance,Rsc is\",Rsc,\"ohm\"\n",
+ "print \"Constant K is\",round(K,2)\n",
+ "print \"i.e, ton is K times of toff\"\n",
+ "print \"OFF time period,toff is\",round(toff*10**6,2),\"us\"\n",
+ "print \"ON time period,ton is\",round(ton*10**6,2),\"us\"\n",
+ "print \"Inductance,L is\",round(L*10**6,2),\"uH\"\n",
+ "print \"Output capacitance,Co is\",round(Co*10**6,3),\"uF\"\n",
+ "print \"Resistance R2 is\",R2/10**3,\"kilo ohm\"\n",
+ "print \"Resistance R1 is\",R1/10**3,\"kilo ohm\"\n",
+ "print \"efficiency is\",efficiency\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 9.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Sense current,Ipk is 6 A\n",
+ "Sense resistance,Rsc is 0.055 ohm\n",
+ "Constant K 1.06\n",
+ "i.e, ton is K times of toff\n",
+ "OFF time period,toff is 24.27 us\n",
+ "ON time period,ton is 25.73 us\n",
+ "Oscillator timing capacitance,Ct is 10.9 nF\n",
+ "Inductance,L is = %.8f H 25.28 uH\n",
+ "Output capacitance,Co is = %.7f F 0.75 milli Farad\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 9.13\n",
+ "#Upgrade the switching regulator in Example 9-12 to provide +5V at 3A.\n",
+ "#Use the same specifications given in example 9-12,except the output ratings.\n",
+ "\n",
+ "from __future__ import division #to perform decimal division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "Iomax=3 #Max output current in ampere\n",
+ "Vo=5 #Output voltage in volt\n",
+ "Vd=1.25 #Voltage drop across the power diode in volt\n",
+ "Vin=12 #Input voltage in volt\n",
+ "Vs=1.1 #Output saturation voltage in volt\n",
+ "Vripple=50*10**-3 #Output ripple voltage in volt\n",
+ "Vref=1.245 #Reference voltage in volt\n",
+ "Vr2=1.2 #Voltage across resistance R2 in volt\n",
+ "\n",
+ "#calculation\n",
+ "Ipk=2*Iomax #Sense current in ampere\n",
+ "Rsc=0.33/Ipk #Sense resistance in ohm\n",
+ "K=(Vo+Vd)/(Vin-Vs-Vo) #K= ton/toff\n",
+ "f=20*10**3 #Assuming operating freq in Hz\n",
+ "T=1/f\n",
+ "toff=T/2.06 #Using ton+toff=T and substituting for ton\n",
+ "ton=1.06*toff\n",
+ "Ct=45*10**-5*toff #Oscillator timing capacitance in farad\n",
+ "L=((Vo+Vd)/Ipk)*toff #Inductance in henry\n",
+ "Co=Ipk*((ton+toff)/(8*Vripple)) #Output capacitance in farad\n",
+ "\n",
+ "#result\n",
+ "print \"Sense current,Ipk is\",Ipk,\"A\"\n",
+ "print \"Sense resistance,Rsc is\",Rsc,\"ohm\"\n",
+ "print \"Constant K\",round(K,2)\n",
+ "print \"i.e, ton is K times of toff\"\n",
+ "print \"OFF time period,toff is\",round(toff*10**6,2),\"us\"\n",
+ "print \"ON time period,ton is\",round(ton*10**6,2),\"us\"\n",
+ "print \"Oscillator timing capacitance,Ct is\",round(Ct*10**9,1),\"nF\"\n",
+ "print \"Inductance,L is = %.8f H\",round(L*10**6,2),\"uH\"\n",
+ "print \"Output capacitance,Co is = %.7f F\",round(Co*10**3,5),\"milli Farad\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/README.txt b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/README.txt
new file mode 100644
index 00000000..aace7835
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Jumana -
+Course: mtech
+College/Institute/Organization: MPBtech. ECE, 6th SemVNIT Nagpur
+Department/Designation: MPBtech. ECE, 6th SemVNIT Nagpur
+Book Title: Op-Amps & Linear Integrated Circuits
+Author: Ramakant Gaykwad
+Publisher: PHI Learning Pvt. Ltd., New Delhi
+Year of publication: 2004
+Isbn: 978-81-203-2058-1
+Edition: 4 \ No newline at end of file
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/1.png b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/1.png
new file mode 100644
index 00000000..5edb3f43
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/1.png
Binary files differ
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/2.png b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/2.png
new file mode 100644
index 00000000..f9dae5ed
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/2.png
Binary files differ
diff --git a/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/3.png b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/3.png
new file mode 100644
index 00000000..a9466cf8
--- /dev/null
+++ b/Op-Amps_&_Linear_Integrated_Circuits_by_Ramakant_Gaykwad/screenshots/3.png
Binary files differ
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Bonding.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Bonding.ipynb
new file mode 100644
index 00000000..eeb8e9d4
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Bonding.ipynb
@@ -0,0 +1,503 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Atomic Bonding"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The bond dissociation energy of A+B- molecule is : -295.0 kJ/mol\n",
+ "The molecule A+B- is stable..\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Ex2.1 Stability of molecule on bond dissociation energy:Page-61 (2010)\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "\n",
+ "e = 1.6*10**-19; # Electronic charge, C\n",
+ "N = 6.023*10**+23; # Avogadro's number\n",
+ "#Absolute Electrical permitivitty of free space,\n",
+ "#coulomb square per newton per metre square\n",
+ "e0 = 8.854*10**-12;\n",
+ "Re = 3*10**-10; # Equilibrium separation, m \n",
+ "IE = 502; # First ionization energy of A, kJ/mol\n",
+ "EA = 335; # Electron affinity for atom B, kJ/mol\n",
+ "IS = 3*10**-10; # Interatomic separation between A+ and B-, m\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # Potential energy at equilibrium separation of A+B- molecule, kJ/mol\n",
+ "Ue = -(e**2*N)/(4*math.pi*e0*Re*1*10**+3);\n",
+ "DE = Ue + IE - EA; # Bond dissociation energy of A+B- molecule, kJ/mol\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe bond dissociation energy of A+B- molecule is :\",round(DE),\" kJ/mol\"\n",
+ "if(DE<0):\n",
+ " print \"The molecule A+B- is stable..\"\n",
+ "else: \n",
+ " print \"The molecule A+B- is unstable..\" \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "1 eV is approximately equal to : 23.03 kcal/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex2.2 Conversion of eV into kcal/mol: Page-64 (2010)\n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "e = 1.6*10**-19; # Electronic charge, C\n",
+ "N = 6.023*10**+23; # Avogadro's number\n",
+ "J = 4.184*10**+3; # Joule's mechanical equivalent of heat\n",
+ "V = 1; # Potential difference, V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "eV = e*V; # Energy equivalent of 1 electron-volt, J\n",
+ "eVpm = eV*N; # Electron-volt per mole, J/mol\n",
+ "Ecal = eVpm/J; # Energy equivalent of 1eV, kcal/mole\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\n1 eV is approximately equal to :\",round(Ecal,2),\"kcal/mol\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The potential energy of NaCl molecule \n",
+ "at equilibrium separation5 is : -7.2 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex2.3 Potential energy of the system of \n",
+ "# Na+ and Cl- ions: Page-68 (2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "e = 1.6*10**-19; # Electronic charge, C\n",
+ "ep_0 = 8.854*10**-12;#Absolute electrical permittivity of free space, \n",
+ "#coulomb square per newton per metre square\n",
+ "Re = 2*10**-10;#Equilibrium separation between Na+ and Cl- ions, m\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Potential energy of NaCl molecule at equilibrium separation, electron-volt\n",
+ "U = -e/(4*math.pi*ep_0*Re);\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe potential energy of NaCl molecule \" \n",
+ "print \"at equilibrium separation5 is :\",round(U,1),\"eV\"\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The compressibility of NaCl crystal is\n",
+ "3.48e-11 metre square newton\n",
+ "\n",
+ "The cohesive energy of NaCl crystal is -3.21 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python CodeEx2.4Compressibility and ionic energy of NaCl crystal:Page-68(2010)\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "\n",
+ "e = 1.6*10**-19; # Electronic charge, C\n",
+ "ep_0 = 8.854*10**-12; # Absolute electrical permittivity of free space, \n",
+ "# coulomb square per newton per metre square\n",
+ "Re = 2.81*10**-10;#Equilibrium separation between Na+ and Cl- ions, m\n",
+ "A = 1.7496; # Madelung constant\n",
+ "n = 9;#Power of R in the repulsive term of potential energy of two particles \n",
+ "IP_Na = 5.14; # Ionization potential of sodium, eV\n",
+ "EA_Cl = 3.61; # Electron Affinity of chlorine, eV\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# Compressibilty of NaCl crystal, metre square newton\n",
+ "K0 = (72*math.pi*ep_0*Re**4)/((n - 1)*A*e**2);\n",
+ "# Potential energy of NaCl molecule at equilibrium separation,electron-volt\n",
+ "U = -(A*e)/(4*math.pi*ep_0*Re)*(1-1/n);\n",
+ "U_bar = U/2; # Potential energy per ion, electron-volt\n",
+ "delta_E = IP_Na - EA_Cl;#Energy required to produce the ion-pair, eV\n",
+ "E_ion = delta_E/2; # Energy required to produce per ion, eV\n",
+ "C_E = U_bar + E_ion; # Cohesive energy per ion, eV\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe compressibility of NaCl crystal is\"\n",
+ "print round(K0*10**(11),2)*10**-11,\"metre square newton\"\n",
+ "print\"\\nThe cohesive energy of NaCl crystal is\",round(C_E,2),\"eV\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The equilibrium spacing of diatomic molecule is\n",
+ "4.08e-10 m\n",
+ "\n",
+ "The dissociation energy of diatomic molecule is 0.043 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python CodeEx2.5 Potential energy and dissociation energy\n",
+ "# of a diatomic molecule: Page-69 (2010)\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "\n",
+ "e = 1.6*10**-19; # Electronic charge, C\n",
+ "A = 1.44*10**-39;#Constant corrsponding to the attractive term \n",
+ "# in potential energy, joule metre square\n",
+ "B = 2.19*10**-115; # Constant corresponding to the repulsive term \n",
+ "#in potential energy, joule metre raised to power 10\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Re = (5*B/A)**(1/8);#Equilibrium spacing of diatomic molecule, m\n",
+ "n = 2;#Power of R in the attractive term of potential energy of two particles\n",
+ "m = 10;#Power of R in the repulsive term of potential energy of two particles\n",
+ "D = A/(Re**2*e)*(1-n/m) #Dissociation energy of diatomic molecule, eV\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe equilibrium spacing of diatomic molecule is\"\n",
+ "print round((Re*10**10),2)*10**-10,\"m\"\n",
+ "print\"\\nThe dissociation energy of diatomic molecule is\",round(D,3),\"eV\"\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The constant A corresponding to \n",
+ "the attractive potential energy, in joule metre square, is : 7.2e-38\n",
+ "The constant B corresponding to\n",
+ "the repulsive potential energy,in joule metre raised to power 10,is:\n",
+ "9.45e-115\n",
+ "The critical separation between the nuclei, in angstrom, is : \n",
+ "The minimum force required to dissociate the molecule,in N,is:\n",
+ "-2.38e-09\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex2.6 Binding force and critical separation of \n",
+ " #a diatomic molecule: Page-69 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "Re = 3*10**-10; # Equilibrium spacing of diatomic molecule, m\n",
+ "e = 1.6*10**-19; # Electronic charge, C\n",
+ "n = 2;#Power of R in the attractive term of potential energy of two particles\n",
+ "m = 10;#Power of R in the repulsive term of potential energy of two particles\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "D = 4*e; # Dissociation energy of diatomic molecule, eV\n",
+ "Ue = -D;#Potential energy of diatomic molecule at equilibrium separation,joule\n",
+ "A = -(Ue*Re**n)/(1-n/m);#Constant corrsponding to the attractive term\n",
+ "# in potential energy, joule metre square\n",
+ "B = A*Re**8/5; # Constant corresponding to the repulsive term \n",
+ "# in potential energy, joule metre raised to power 10\n",
+ "Rc = (55/3*B/A)**(1/8); # Critical separation between the nuclei, m\n",
+ "F_min = -2*A/Rc**3*(1-(Re/Rc)**8);# The minimum force required to\n",
+ "# dissociate the moleule, N\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"The constant A corresponding to \" \n",
+ "print \"the attractive potential energy, in joule metre square, is :\",A\n",
+ "print \"The constant B corresponding to\"\n",
+ "print\"the repulsive potential energy,in joule metre raised to power 10,is:\"\n",
+ "print round((B*10**115),2)*10**-115\n",
+ "print \"The critical separation between the nuclei, in angstrom, is : \"\n",
+ "round ((Rc*10**10),2)*10**-10\n",
+ "print \"The minimum force required to dissociate the molecule,in N,is:\"\n",
+ "print round((F_min*10**9),2)*10**-9\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The bond formation energy for K+ and Cl- ion pair, in eV, is : 0.5\n",
+ "The separation between K+ and Cl- ion pair,in angstrom,is\n",
+ "-28.76\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex2.7Bond formation Energy for K+ and Cl- ion pair:Page-70(2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ " \n",
+ "eps_0 = 8.854*10**-12;# Absolute electrical permittivity of free space,\n",
+ "# coulomb sqaure per newton per metre square\n",
+ "e = 1.6*10**-19; # Electronic charge, C\n",
+ "IP_K = 4.1; # Ionization potential of potassium, electron-volt\n",
+ "EA_Cl = 3.6; # Electron affinity of chlorine, electron-volt\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "delta_E = IP_K - EA_Cl; # Net energy required \n",
+ "#to produce the ion-pair, electron-volt\n",
+ "Ec = delta_E; # Coulomb energy equals net energy required \n",
+ "# to produce the ion pair, in electron-volt\n",
+ " # Since Ec = -e/(4*%math.pi*eps_0*R), solving for R\n",
+ "R = -e/(4*math.pi*eps_0*Ec);#Separation between K+ and Cl- ion pair, m\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"The bond formation energy for K+ and Cl- ion pair, in eV, is : \",Ec\n",
+ "print\"The separation between K+ and Cl- ion pair,in angstrom,is\"\n",
+ "print round(R/(1*10**-10),2)\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 2.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Energy to transfer an electron from M to X atom= -1.88 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex2.8 Energy liberated during electron transfer\n",
+ "# between ions of a molecule: Page-71 (2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ " \n",
+ "eps_0 = 8.854*10**-12; # Absolute electrical permittivity of free space, # Electronic charge, C\n",
+ "R = 5*10**-10; # Separation between the ions M and X, m\n",
+ "e=1.6*10**-19\n",
+ "IP_M = 5; # Ionization potential of M, eV\n",
+ "EA_X = 4; # Electron affinity of X, eV\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "U = -e/(4*math.pi*eps_0*R); # The potential energy of MX molecule, eV\n",
+ "delta_E = IP_M - EA_X;#The net energy required to produce the ion pair, eV\n",
+ "Er = delta_E + U;#Energy required to transfer an electron from M to X eV\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nEnergy to transfer an electron from M to X atom=\",round(Er,2),\" eV\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Diffusion.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Diffusion.ipynb
new file mode 100644
index 00000000..2b5220b3
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Diffusion.ipynb
@@ -0,0 +1,869 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Atomic Diffusion"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The rate at which nitrogen escapes through the tank wall =\n",
+ "1e-16 kg per metre square per sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex6.1 Rate of diffusion of N through steel wall: Page-195 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ " # Diffusion coeffcient of N in steel at room temperature, metre sq per sec\n",
+ "D = 1e-019; \n",
+ "# Concentration of nitrogen at the inner surface of the tank, kg per metre cube\n",
+ "dc = 10; \n",
+ "dx = 10e-03; # Thickness of the steel wall, m\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "# Fick's first law giving outward flux of nitrogen \n",
+ "#through steel wall of the tank, kg per metre square per second\n",
+ "J = D*(dc/dx); \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe rate at which nitrogen escapes through the tank wall =\"\n",
+ "print round((J*10**16))*10**-16,\"kg per metre square per sec\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The outward flux of copper through the Al sheet = \n",
+ "2.63e+15 Cu atoms per metre square per sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex6.2 Rate of diffusion of copper through pure Al sheet:Page-196\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "a = 4.05e-010; # Lattice parameter of fcc Al, m\n",
+ "N = 4; # Number of Al atoms per unit cell of fcc Al\n",
+ "# Diffusion coeffcient of copper in Al at 550 degree celsius,metre sq per sec\n",
+ "D = 5.25e-013; \n",
+ "c1 = 0.19e-02; # Atomic percent of copper at the surface, per unit volume\n",
+ "# Atomic percent of Cu at the the depth 1.2 mm from the surface,per unit volume\n",
+ "c2 = 0.18e-02; \n",
+ "dx = 1.2e-03; # Thickness of the pure Al sheet, m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "n = N/a**3; # Number of Al atoms per unit volume, per metre cube\n",
+ "#Change in concentration of Cu at 1.2 mm depth of the surface,per metre cube\n",
+ "dc = (c2 - c1)*n;\n",
+ " # Fick's first law giving outward flux of copper through the Al sheet, \n",
+ " #Cu atoms per metre square per second\n",
+ "\n",
+ "J = -D*(dc/dx);\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe outward flux of copper through the Al sheet = \"\n",
+ "print round((J*10**-15),2)*10**15,\"Cu atoms per metre square per sec\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Number of carbon atoms diffusing through each unit cell per minute =\n",
+ "82.19 atoms per minute\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex6.3 Rate of diffusion of carbon through steel bar:Page-196(2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "a = 3.65e-010; # Lattice parameter of fcc structure of iron, m\n",
+ "D = 3e-011#Diffusion coeff. of C in iron at 1000degree celsius,metre sq per sec\n",
+ "n1 = 20; # Number of unit cells per carbon atom at the surface of steel\n",
+ "#Number of unit cells per C atom at a depth 1 mm from the surface of steel\n",
+ "n2 = 30;\n",
+ "dx = 1e-03; # Thickness of the steel bar, m\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "c1 = 1/(n1*a**3); # Atomic percent of carbon at the surface, per metre cube\n",
+ "# Atomic percent of carbon at a depth 1 mm from the surface, per metre cube\n",
+ "c2 = 1/(n2*a**3); \n",
+ " # Fick's first law giving outward flux of carbon through the Steel bar, \n",
+ " #C atoms per metre square per second\n",
+ "J = -D*((c2-c1)/dx);\n",
+ "# The number of carbon atoms diffusing through each unit cell per minute \n",
+ "J_uc = J*a**2*60; \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ " \n",
+ "print\"\\nNumber of carbon atoms diffusing through each unit cell per minute =\"\n",
+ "print round(J_uc,2),\"atoms per minute\" \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The ratio of two cross-sectional areas =\n",
+ "6.67e-08\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex6.4 Diffusion through a cylinder: Page-199 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "r = 12; # Radius of cylindrical crystal, mm\n",
+ " # Assume effective thickness of the surface to be 4 angstrom \n",
+ " #= two atomic diameters, mm\n",
+ "t = 4e-07;\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # Cross-sectional area for diffusion through the cylinder, milli-metre square\n",
+ "A1 = math.pi*r**2;\n",
+ " # Cross-sectional area for diffusion along the surface, milli-metre square\n",
+ "A2 = 2*math.pi*r*t;\n",
+ "ratio = A2/A1; # Ratio of two cross-sectional areas\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe ratio of two cross-sectional areas =\"\n",
+ "print round( (ratio*10**8),2)*10**-8\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The diffusion length of Li in Ge = 0.0006 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex6.5 Diffusion length of Li in Ge: Page-203 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "D = 1e-010; # Diffusion coefficient for Li in Ge, metre square per sec\n",
+ "t = 1*60*60; # Time taken by diffusing Li to travel diffusion depth, sec\n",
+ "T = 500+273; # absolute temperature of the system, kelvin\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "x = (D*t)**0.5; # Diffusion length of Li in Ge, m\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe diffusion length of Li in Ge =\",x,\"m\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Time taken by diffusing Li to travel diffusion depth of 0.2 mm = 400.0 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex6.6 Diffusion time of Li in Ge: Page-203 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "D = 1e-010; # Diffusion coefficient for Li in Ge, metre square per sec\n",
+ "T = 500+273; # Absolute temperature of the system, kelvin\n",
+ "x = 0.2e-03; # Diffusion length of Li in Ge, m\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # Diffusion length is given by\n",
+ " # x = sqrt(D*t), solving for t\n",
+ "t = x**2/D;#Time taken by diffusing Li to travel diffusion depth of 0.2 mm, sec\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nTime taken by diffusing Li to travel diffusion depth of 0.2 mm =\",t,\"s\" \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The diffusion coefficient of Cu in Al at 550 degree celsius =\n",
+ "5.22e-13 metre square per sec\n",
+ "\n",
+ "The diffusion length of Cu in Al = 0.043 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex6.7 Diffusion coefficent of Cu in Al: Page 206 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ " # Pre-exponential diffusion constant independent of temp.,metre square per sec\n",
+ "D0 = 0.25e-04; \n",
+ "T = 550+273; # Absolute temperature of the system, kelvin\n",
+ "R = 8.314; # Molar gas constant, J/mol/K\n",
+ "Q = 121e+03; # The activation energy for diffusion, joule per mole\n",
+ "t = 1*60*60; # Time taken by Cu to diffuse into Al, sec\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# Diffusion coefficient of Cu in Al at 550 degree celsius, metre square per sec \n",
+ "D = D0*math.exp(-Q/(R*T)); \n",
+ "x = (D*t)**0.5; # Diffusion length of Cu in Al, m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe diffusion coefficient of Cu in Al at 550 degree celsius =\"\n",
+ "print round((D*10**13),2)*10**-13,\"metre square per sec\"\n",
+ "print\"\\nThe diffusion length of Cu in Al =\", round(x*1000,3),\"mm\" \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The activation energy for diffusion of Ag in Si = 154.1 kJ/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex6.8 Activation energy for diffusion of silver\n",
+ "# in silicon: Page 206 (2010)\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "R = 8.314; # Molar gas constant, J/mol/K\n",
+ "T1 = 1350+273; # First temp. at which difuusion of Ag into Si takes place,K\n",
+ "T2 = 1100+273; # Second temp. at which difuusion of Ag into Si takes place,K\n",
+ "DRR = 8; # Ratio of diffusion rates of Ag in Si at T1 and T2\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # As diffusion coefficient at temperature T1 is D1 = D0*math.exp(-Q/(R*T1))\n",
+ " # and that at temperature T2 is D1 = D0*math.exp(-Q/(R*T2)), \n",
+ "#so that the diffusion rates ratio\n",
+ " # D1/D2 = DRR = math.exp(Q/R*(1/T2-1/T1)), solving for Q, we have\n",
+ " # Activation energy for diffusion of Ag in Si, kJ/mol\n",
+ "Q = R*math.log(DRR)/((1/T2-1/T1)*1000); \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe activation energy for diffusion of Ag in Si =\",round(Q,2),\"kJ/mol\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The activation energy for diffusion of Ga in Si =\n",
+ "103.62 kcal/mol\n",
+ "\n",
+ "The pre-exponential diffusion constant, D0 =\n",
+ "24893.0 cm square per sec\n",
+ "\n",
+ "The diffusivity of the system = 1.05e-11 cm square per sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex6.9 Activation energy and diffusion constant of a diffusion \n",
+ " #system obeying Arrhenius rate law: Page 207 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration \n",
+ " \n",
+ "R = 1.987; # Molar gas constant, cal/mol/K\n",
+ "D_1100 = 8e-013;#Diffusivity of Ga in Si at1100 degree celsius,cm sq per sec\n",
+ "D_1300 = 1e-010;# Diffusivity of Ga in Si at 1300 degree celsius,cm sq per sec\n",
+ "T1 = 1100+273;#First temperature at which diffusion of Ga into Si takes place,K\n",
+ "T2 = 1300+273;#Second temperature at which diffusion of Ga into Si takes place\n",
+ "T = 1200+273; # Temperature at which diffusion of Ga\n",
+ "# into Si is to be calculated, kelvin\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # Arrehenius equation in math.log10 form is given by\n",
+ " # math.log10(D) = math.log10(D0)-Q/(2.303*R*T) --- (a)\n",
+ " # Thus math.log10(D_1100) = math.log10(D0)-Q/(2.303*R*T1) --- (i)\n",
+ " # math.log10(D_1300) = math.log10(D0)-Q/(2.303*R*T2) --- (ii), \n",
+ " # On subtracting (ii) from (i), we get\n",
+ " # math.log10(D_1100/D_1300) = -Q/(2.303*R)*(1/T2-1/T1), solving for Q\n",
+ "# Activation energy for diffusion of Ga in Si, cal/mol\n",
+ "Q = (2.303*math.log10(D_1100/D_1300)*R)/(1/T2-1/T1);\n",
+ " # Putting Q in (ii) and solving for D0\n",
+ "D0 = math.exp(2.303*math.log10(D_1100)+Q/(R*T1))\n",
+ " # D0 = math.exp(2.303*math.log10(D_1300)+Q/(R*T2)); \n",
+ " # Pre-exponential diffusion constant independent of temp.,cm square per sec\n",
+ " # Substituting D0, Q, R and T in (a) and solving for D, we have\n",
+ "# Diffusivity of the system, cm square per sec\n",
+ "D = math.exp(2.303*math.log10(D0)-Q/(R*T));\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe activation energy for diffusion of Ga in Si =\"\n",
+ "print round((Q/1000),2),\"kcal/mol\" \n",
+ "print\"\\nThe pre-exponential diffusion constant, D0 =\"\n",
+ "print round(D0),\"cm square per sec\" \n",
+ "print\"\\nThe diffusivity of the system =\",\n",
+ "print round((D*10**11),2)*10**-11,\"cm square per sec\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The activation energy for diffusion of A in B = 57.17 kJ/mol\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex6.10 Activation energy for diffusion rates at\n",
+ "# different temperatures: Page 208 (2010)\n",
+ "\n",
+ " \n",
+ "#Variable declaration \n",
+ " \n",
+ "R = 8.314; # Molar gas constant, J/mol/K\n",
+ "T1 = 500+273;# First temperature at which diffusion of A into B takes place,K\n",
+ "T2 = 850+273;# Second temperature at which diffusion of A into B takes place,K\n",
+ "PDR = 1/4;#Penetration depth ratio at 500 degree celsius and 850 degree celsius\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # x1/x2 = sqrt(D1/D2) i.e. PDR = sqrt(DRR), DRR is the diffusion rate ratio\n",
+ " # solving for DRR\n",
+ "DRR = PDR**2; # Diffusion rate ratio D1/D2 of A in B\n",
+ " # As diffusion coefficient at temperature T1 is D1 = D0*math.exp(-Q/(R*T1))\n",
+ " # and that at temperature T2 is D1 = D0*math.exp(-Q/(R*T2)),\n",
+ "# so that the diffusion rates ratio\n",
+ " # D1/D2 = DRR = math.exp(Q/R*(1/T2-1/T1)), solving for Q, we have\n",
+ " # Activation energy for diffusion of A in B, kJ/mol\n",
+ "\n",
+ "Q = R*math.log(DRR)/((1/T2-1/T1)*1000);\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe activation energy for diffusion of A in B =\",round(Q,2),\"kJ/mol\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The time necessary to increase the carbon content of steel =\n",
+ "110.63 minutes\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex6.11 Time required for carburizing of steel: Page 209 (2010)\n",
+ " \n",
+ " \n",
+ "#Variable declaration \n",
+ " \n",
+ "C0 = 0.0018; # Intial carbon concentration of steel\n",
+ "Cx = 0.0030;#Carbon concentration of steel at 0.60 mm below the surface \n",
+ "Cs = 0.01; # Carbon concentration of steel at the surface\n",
+ "x = 0.6e-03; # Diffusion depth below the surface of the gear, m\n",
+ "D_927 = 1.28e-011;#Diffusion coefficient for carbon in iron,metre square per sec\n",
+ "Z1 = 1.0\n",
+ "Z2 = 1.1; # Preceding and succeeding values about Z from error function table\n",
+ "erf_Z1 = 0.8427\n",
+ "# Preceding and succeeding values about erf_Z from error function table\n",
+ "erf_Z2 = 0.8802;\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "erf_Z = (Cs-Cx)/(Cs-C0);#Error function of Z as a solution to Fick's second law\n",
+ "Z=Z1+((Z2-Z1)*(erf_Z-erf_Z1)/(erf_Z2-erf_Z1));\n",
+ " # As Z = x/(2*sqrt(D_927*t)), \n",
+ "#where Z is a constant argument of error function as erf(Z)\n",
+ " # Solving for t, we have\n",
+ "# Time necessary to increase the carbon content of steel, sec\n",
+ "t = (x/(2*Z))**2/D_927;\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe time necessary to increase the carbon content of steel =\"\n",
+ "print round(t/60,2),\"minutes\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The carbon concentration of carburized steel at 0.06 inch depth =\n",
+ "0.31 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex6.12 Carbon concentration \n",
+ " #of carburized steel at certain depth: Page 210 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration \n",
+ " \n",
+ "C0 = 0.0020; # Initial carbon concentration of steel\n",
+ "Cs = 0.012; # Carbon concentration of steel at the surface\n",
+ "t = 10*60*60; # Carburizing time of steel, sec\n",
+ "x = 0.06*25.4*1e-03; # Diffusion depth below the surface of the gear, mm\n",
+ "D_927 = 1.28e-011;#Diffusion coeff. for carbon in iron,metre square per sec\n",
+ "Z1 = 1.1 \n",
+ "Z2 = 1.2; # Preceding and succeeding values about Z from error function table\n",
+ "erf_Z1 = 0.8802\n",
+ "# Preceding and succeeding values about erf_Z from error function table \n",
+ "erf_Z2 = 0.9103; \n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ " \n",
+ "Z = x/(2*(D_927*t)**0.5) # A constant argument of error function as erf(Z)\n",
+ "# Error function of Z as a solution to Fick's second law\n",
+ "efZ=(erf_Z1)+((erf_Z2-erf_Z1)*((Z-Z1)/(Z2-Z1)));\n",
+ " # Carbon concentration of carburized steel at 0.06 inch depth\n",
+ "Cx =-(efZ*(Cs-C0)-Cs) \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ " \n",
+ "print\"\\nThe carbon concentration of carburized steel at 0.06 inch depth =\"\n",
+ "print round(Cx*100,2),\"percent\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The minimum depth upto which post machining is to be done =\n",
+ "0.66 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ " # Python Code Ex6.13 Depth of decarburization below \n",
+ " #the surface of steel: Page 211 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "C2 = 0.012; # Initial carbon concentration of steel\n",
+ "Cx = 0.008; # Carbon concentration of carburized steel at x metre depth\n",
+ "Cs = 0; # Carbon concentration of steel at the surface\n",
+ "t = 5*60*60; # Carburizing time of steel, sec\n",
+ "D_927 = 1.28e-011; # Diffusion coefficient for carbon in iron,metre sq per sec\n",
+ "Z1 = 0.65\n",
+ "Z2 = 0.70; # Preceding and succeeding values about Z from error function table\n",
+ "erf_Z1 = 0.6420\n",
+ "# Preceding and succeeding values about erf_Z from error function table \n",
+ "erf_Z2 = 0.6778; \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "erf_Z = abs((Cs-Cx)/(C2-Cs));#Error function of Z as solution to Fick's 2nd law\n",
+ "Z=Z1+(Z2-Z1)*((erf_Z-erf_Z1)/(erf_Z2-erf_Z1))\n",
+ " # As Z = x/(2*sqrt(D_927*t)), \n",
+ "#where Z is a constant argument of error function as erf(Z)\n",
+ " # Solving for x, we have\n",
+ "x = Z*2*(D_927*t)**0.5;# Depth of decarburization below the surface of steel,m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ " \n",
+ "print \"The minimum depth upto which post machining is to be done =\"\n",
+ "print round(x*1000,2),\"mm\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 6.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The diffusion depth of boron into silicon = 0.000125 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex6.14 Diffusion depth of P-type semiconductor B into Si:Page 212\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "C0 = 0; # Initial boron concentration of silicon\n",
+ "Cx = 1e+17; # Boron concentration at depth x below the silicon surface\n",
+ "Cs = 1e+18; # Boron concentration of silicon at the surface\n",
+ "T = 1100+273; # Absolute temperature of the system, kelvin\n",
+ "t = 2*60*60; # Time taken to diffuse boron into silicon, sec\n",
+ "D_1100 = 4e-013;# Diffusion coefficient for boron in silicon, cm square per sec\n",
+ "Z1 = 1.1; # Preceding and succeeding values about Z from error function table\n",
+ "Z2 = 1.2; \n",
+ "# Preceding and succeeding values about erf_Z from error function table \n",
+ "erf_Z1 = 0.8802;\n",
+ "erf_Z2 = 0.9103;\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# Error function of Z as a solution to Fick's second law\n",
+ "erf_Z = abs((Cs-Cx)/(Cs-C0));\n",
+ "Z=Z1+((Z2-Z1)*(erf_Z-erf_Z1)/(erf_Z2-erf_Z1));\n",
+ " # As Z = x/(2*sqrt(D_927*t)),\n",
+ "#where Z is a constant argument of error function as erf(Z)\n",
+ " # Solving for x, we have\n",
+ "x = Z*2*(D_1100*t)**0.5; # Diffusion depth of boron into silicon\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe diffusion depth of boron into silicon =\",round(x,6),\"cm\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Packing.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Packing.ipynb
new file mode 100644
index 00000000..35bf6828
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Packing.ipynb
@@ -0,0 +1,398 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Atomic Packing"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Free area in square lattice is : 21.46 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex3.1 Packing of equal spheres in \n",
+ " #two dimensional square lattice:Page-88(2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ " #Herewemayassumesquareofunitlengthi.e.a=1suchthatradiusofsphere,R=a/2=0.5\n",
+ "a=1; # Length of the side of the square, unit\n",
+ "R = a/2; # Radius of the sphere, unit\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "# Radius of the sphere introduced within the void produced by \n",
+ "# the packing of equal spheres on square lattice, unit\n",
+ "r = ((2)**0.5-1)*R; \n",
+ "A = math.pi*R**2; # Area associated with a sphere, square units\n",
+ "FA = a**2-A;#Free area occupied by void in square lattice,square units\n",
+ "FA_per = FA*100; # Percentage free area in square lattice \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nFree area in square lattice is :\",round(FA_per,2),\"percent\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The packing efficiency in diamond structure is : 34.0 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex3.2 Packing efficiency in diamond structure: Page-92 (2010)\n",
+ " \n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ " \n",
+ " # For simplicity we may take radius of the atom, R = 1 unit\n",
+ "R = 1; # Radius of the atom in bcc lattice, unit\n",
+ "nc = 8; # Number of corner atoms in diamond structure\n",
+ "nfcc = 6; # Number of face centred atoms in diamond structure\n",
+ "na = 4; # Number of atoms completely within the unit cell\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "n = 1/8*nc+1/2*nfcc+1*na # Effective number of atoms in the diamond structure\n",
+ "V_atom = 8*4/3*math.pi*R**3; # Volume of atoms within the unit cell, unit cube \n",
+ " # Since for a diamond cubic crystal, the space lattice is fcc, \n",
+ " #with two atos per lattice point, such that 8*R = sqrt(3)*a, solving for a\n",
+ "a = 8*R/(3)**0.5; # lattice parameter of diamond structure, unit\n",
+ "V_cell = a**3; # Volume of the unit cell, unit cube\n",
+ "eta = V_atom/V_cell*100; # Packing efficiency in diamond structure\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe packing efficiency in diamond structure is :\",round(eta),\"percent\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The radius of the largest sphere that\n",
+ " will fit into the octahedral void is : 0.15 R\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex3.3 Radius of largest sphere \n",
+ " #that can be placed at the octahedral void: Page-100 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ " # For simplicity we may take radius of the atom, R = 1 unit\n",
+ "R = 1; # Radius of the atom in bcc lattice, unit\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # For a bcc lattice, 4*R = a*sqrt(3), solving for a \n",
+ "a = 4*R/(3)**0.5; # lattice parameter of bcc crystal, unit\n",
+ " # Since R + Rx = a/2, solving for Rx\n",
+ "#Radius of the largest sphere that will fit into the octahedral void, unit\n",
+ "Rx = a/2 - R;\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"\\nThe radius of the largest sphere that\" \n",
+ "print \" will fit into the octahedral void is :\",round(Rx,2),\"R\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The radius of the largest sphere \n",
+ " that will fit into the tetrahedral void is : 0.29 RL\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex3.4 Radius of largest sphere that \n",
+ " #can be placed at the tetrahedral void: Page-100 (2010)\n",
+ " \n",
+ " \n",
+ "\n",
+ "#Variable declaration\n",
+ " \n",
+ " # For simplicity we may take radius of the atom, RL = 1 unit\n",
+ "RL = 1; # Radius of the atom in bcc lattice, unit\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # For a bcc lattice, 4*RL = a*sqrt(3), solving for a \n",
+ "a = 4*RL/(3)**0.5; # Lattice parameter of bcc crystal, unit\n",
+ " # Further RL + Rx = sqrt(5)*a/4, solving for Rx\n",
+ " # Radius of the largest sphere that will fit into the octahedral void, unit\n",
+ "Rx = (5)**0.5*a/4-RL;\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe radius of the largest sphere \"\n",
+ "print \" that will fit into the tetrahedral void is :\",round(Rx,2),\"RL\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The diameter of the octahedral void in the fcc structure of nickel,\n",
+ " in angstrom, is : 1.03\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex3.5 Diameter of the largest atom that \n",
+ "# would fit into the tetrahedral void:5 Page-101 (2010)\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "a = 3.52*10**-10; # Lattice parameter for Ni, m\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ " # For an fcc lattice, sqrt(2)*a = 4*R, solving for R\n",
+ "R = (2)**0.5*a/4; # Radius of the atom in fcc lattice, m\n",
+ "R_oct = 0.414*R; #Radius of the octahedral void in fcc close packing, m\n",
+ "D = 2*R_oct#Diameter of the octahedral void in the fcc structure of nickel,m\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The diameter of the octahedral void in the fcc structure of nickel,\"\n",
+ "print\" in angstrom, is : \",round(D/(1*10**-10),2)\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Void space in the close packing is: 19.0 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "# Python Code Ex3.6 Void space in cubic close packing: Page-101 (2010)\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "R = 1; # For simplicity, radius of the sphere, m\n",
+ "n = 4; # Number of lattice points in fcc unit cell\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ " # For cubic close packing, side of the unit cell \n",
+ " #and the radius of the sphere is related as\n",
+ " # sqrt(2)*a = 4*R, solving for a\n",
+ "a = 2*(2)**0.5*R; #Lattice parameter for cubic close packing, m\n",
+ "V_cell = a**3; # Volume of the unit cell\n",
+ "# Volume occupied by the atoms, metre cube\n",
+ "V_occupied = 4*4/3*math.pi*((1.000)**3+(0.414)**3+2*(0.225)**3);\n",
+ "void_space = V_cell - V_occupied; # Void space in the close packing\n",
+ "percent_void = void_space/V_cell*100; # Percentage void space\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nVoid space in the close packing is:\",round(percent_void),\"percent\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 3.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Minimum value of radius ratio in AX compound is : 0.15\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python CodeEx3.7 The minimum value of radius ratio in AX-compound:Page-104\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ " \n",
+ " # For simplicity we may assume a = 1\n",
+ "a = 1; # Lattice parameter of the crystal, unit\n",
+ "\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "b = 2/3*a*math.sin(math.pi/3); # Lattice parameter of the crystal, unit\n",
+ " # Here a = 2*Rx, where a is the lattice parameter and\n",
+ "# Rx is the radius of X-ions representing the bigger spheres, solving for Rx\n",
+ "Rx = 0.5*a; \n",
+ " # Also b = RA + Rx, solving for RA\n",
+ "RA = b - Rx; # Radius of A-ion representing teh smaller sphere, unit\n",
+ "Rad_ratio = RA/Rx; # Radius ratio in AX compound\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\n Minimum value of radius ratio in AX compound is :\", round(Rad_ratio,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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Shape_and_Size.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Shape_and_Size.ipynb
new file mode 100644
index 00000000..cdcd8ae5
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atomic_Shape_and_Size.ipynb
@@ -0,0 +1,504 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Atomic Shape and Size"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The radius of first Bohr orbit, in angstrom, is : \n",
+ "0.53\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex4.1 Bohr's orbit for the hydrogen atom: Page-126 (2010)\n",
+ " \n",
+ "#Variable declaration \n",
+ " \n",
+ "n = 1; # The ground state orbit of hydrogen atom\n",
+ "Z = 1; # The atomic number of hydrogen\n",
+ "h = 6.626*10**-34; # Plank's constant, Js\n",
+ " # Absolute electrical permittivity of free space,\n",
+ "# coulomb square per newton per metre square\n",
+ "eps_0 = 8.85*10**-12; \n",
+ "e = 1.602*10**-19; # Electronic charge, C\n",
+ "m = 9.1*10**-31; # Electronic mass, kg\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # Radius of first Bohr's orbit (Bohr radius), m\n",
+ "r_B = (n**2*h**2*eps_0)/(math.pi*m*Z*e**2); \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The radius of first Bohr orbit, in angstrom, is : \"\n",
+ "print round(r_B/(1*10**-10),2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The First Ionization Potential is : -13.6 eV\n",
+ "\n",
+ "The Second Ionization Potential is : -3.4 eV\n",
+ "\n",
+ "The Third Ionization Potential is : -1.51 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex4.2 Ionization potentials of hydrogen atom: Page-126 (2010)\n",
+ " \n",
+ "#Variable declaration \n",
+ " \n",
+ "Z = 1; # The atomic number of hydrogen\n",
+ "h = 6.626*10**-34; # Plank's constant, Js\n",
+ " # Absolute electrical permittivity of free space, \n",
+ " #coulomb square per newton per metre square\n",
+ "eps_0 = 8.85*10**-12;\n",
+ "e = 1.602*10**-19; # Electronic charge, C\n",
+ "m = 9.1*10**-31;\n",
+ "E=[0] # Electronic mass, kg\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "# Initialize three potentials to 0 value in a vector\n",
+ "for n in range(1,4):\n",
+ " if n==1:\n",
+ " state = \"First\"\n",
+ " if n==2:\n",
+ " state = \"Second\"\n",
+ " if n==3:\n",
+ " state = \"Third\"\n",
+ " # Energy of nth bohr orbit, eV\n",
+ " E.append(-(m*Z**2*e**4)/(8*eps_0**2*n**2*h**2*e));\n",
+ " \n",
+ "#Results\n",
+ " \n",
+ " print \"\\nThe\",state,\"Ionization Potential is :\", round(E[n],2),\"eV\" \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Radius of sodium ion, in angstrom, is : 0.94\n",
+ "Radius of fluorine ion, in angstrom, is : 1.37\n",
+ "Constant determined by quantum number is : 6.11\n",
+ "Radius of oxygen, in angstrom, is : 1.76\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex4.3 Univalent radii of ions: Page-130 (2010)\n",
+ " \n",
+ " \n",
+ "#Variable declaration \n",
+ " \n",
+ "S = 4.52; # Screening constant for neon like configurations\n",
+ "# A constant determined by the quantum number, m; \n",
+ "#for simplicity it can be assumed as unity\n",
+ "Cn = 1; \n",
+ "Z_Na = 11; # Atomic number of sodium\n",
+ "Z_F = 9; # Atomic number of fluorine\n",
+ "Z_O = 8; # Atomic number of oxygen\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "r_Na = Cn/(Z_Na - S); # Radius of sodium ion, m\n",
+ "r_F = Cn/(Z_F - S); # Radius of fluorine ion, m\n",
+ "r_ratio = r_Na/r_F; # Radius ratio\n",
+ "r_Na = r_F*r_ratio; # Calculating radius of sodium ion from r_ratio, m\n",
+ " # Given that r_Na + r_F = 2.31D-10, \n",
+ " # or r_Na + r_Na/0.69 = 2.31D-10, \n",
+ " # or r_Na(1 + 1/0.69) = 2.31D-10, solving for r_Na\n",
+ "r_Na = 2.31*10**-10/(1+1/0.69); # Calculating radius of sodium, m\n",
+ "r_F = 2.31*10**-10 - r_Na; # Calculating radius of fluorine from r_Na, m\n",
+ "Cn = r_Na*(Z_Na - S); # Calculating Cn, m\n",
+ "r_O = Cn/(Z_O - S); # Radius of oxygen, m\n",
+ "\n",
+ "\n",
+ " #Results\n",
+ " \n",
+ "print \"Radius of sodium ion, in angstrom, is :\",round(r_Na/(1*10**-10),2)\n",
+ "print \"Radius of fluorine ion, in angstrom, is :\",round(r_F/(1*10**-10),2)\n",
+ "print \"Constant determined by quantum number is : \",round(Cn/(1*10**-10),2)\n",
+ "print \"Radius of oxygen, in angstrom, is : \",round(r_O/(1*10**-10),2)\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The radius of Si4+ ion, in angstrom, is : 0.14\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex4.4 Ionic Radius of Si ions in silicon dioxide: Page-131(2010)\n",
+ " \n",
+ "#Variable declaration \n",
+ " \n",
+ "a = 7.12*10**-10; # Lattice parameter of the crystal. m\n",
+ "d = (3*a**2/16)**0.5; # Si-Si distance from (0,0,0) to (1/4,1/4,1/4) \n",
+ "RO = 1.40*10**-10; # Radius of oxygen, m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Distance of oxygen ions between the two Si ions is 2*RSi+2*RO = d,\n",
+ "RSi = (d - 2*RO)/2; # Radius of silicon ion, m\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"The radius of Si4+ ion, in angstrom, is : \",round(RSi/(1*10**-10),2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The radius of cation occupying octahedral position \n",
+ "in an M+X- ionic solid, in angstrom, is : 1.03\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex4.5 Ionic Radius occupying an octahedral position:Page-138(2010)\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "R_ratio = 0.414;#Radius ratio for an octahedral void in am M+X- ionic lattice\n",
+ "R_x = 2.5*10**-10; # Critical radius of X- anion, m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R_m = R_x*0.414; # Radius of M+ cation, m\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The radius of cation occupying octahedral position \"\n",
+ "print\"in an M+X- ionic solid, in angstrom, is : \",round(R_m/(1*10**-10),2)\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The percentage ionic character in HF molecule is 43.03 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python CodeEx4.7Percentage ionic character of covalent molecule:Page-142(2010)\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "x_A = 4.0; # Electronegativity of fluorine\n",
+ "x_B = 2.1; # Electronegativity of hydrogen\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " #Percentage ionic character of the covalent bond in HF molecule\n",
+ "P = 16*(x_A - x_B) + 3.5*(x_A - x_B)**2;\n",
+ "\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print\"\\nThe percentage ionic character in HF molecule is\",round(P,2),\"percent\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The metallic radius of iron atom is:\n",
+ "1.22 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex4.8 Calculating metallic radius \n",
+ "#from unit cell dimension:Page-146 (2010)\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "a = 2.81*10**-10;# Unit cell dimension of bcc structure of iron, m\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ " # For bcc structure we have\n",
+ " # sqrt(3)*a = 4*R, solving for R\n",
+ "R = (3)**0.5/4*a; # Metallic radius of iron atom, m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"\\nThe metallic radius of iron atom is:\"\n",
+ "print round(R/(1*10**-10),2),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The metallic radius of gold atom, in angstrom, is :\n",
+ "1.44\n",
+ "\n",
+ "The metallic radius of platinum atom, in angstrom, is :\n",
+ "1.38\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex4.9 \n",
+ " #Calculating metallic radii from unit cell dimensions: Page-146 (2010)\n",
+ " \n",
+ "#Variable declaration \n",
+ " \n",
+ "a_Au = 4.08e-10; # Unit cell dimension of fcc structure of gold, m\n",
+ "a_Pt = 3.91e-10; # Unit cell dimension of fcc structure of platinum, m\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ " # For fcc structure we have\n",
+ " # sqrt(2)*a = 4*R, solving for R\n",
+ "R_Au = (2)**0.5/4*a_Au; # Metallic radius of gold atom, m\n",
+ "R_Pt = (2)**0.5/4*a_Pt; # Metallic radius of gold atom, m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"\\nThe metallic radius of gold atom, in angstrom, is :\"\n",
+ "print round(R_Au/(1*10**-10),2);\n",
+ "print\"\\nThe metallic radius of platinum atom, in angstrom, is :\"\n",
+ "print round(R_Pt/(1*10**-10),2);"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 4.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The unit cell dimension of aluminium, is:\n",
+ "4.05 angstrom\n",
+ "\n",
+ "The metallic diametre of aluminium, is:\n",
+ "2.86 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex4.10 Calculating metallic diameter and\n",
+ "# unit cell dimension of aluminium: Page-146 (2010)\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "Z_Al = 13; # Atomic number of aluminium\n",
+ "A_Al = 26.98; # Atomic mass of aluminium, g\n",
+ "d_Al = 2700*10**3; # Density of aluminium, g per metre cube\n",
+ "n = 4; # number of atoms in the fcc structure of aluminium\n",
+ "N = 6.023*10**+23; # Avogadro's number\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ " # We have number of atoms per fcc unit cell given as \n",
+ " # n = (V*d_Al*N)/A_Al, solving for V\n",
+ " # V = (n*A_Al)/(d_Al*N), V is the volume of the unit cell\n",
+ " # or a**3 = (n*A_Al)/(d_Al*N), solving for a \n",
+ "a = ((n*A_Al)/(d_Al*N))**(1/3); # unit cell parameter of aluminium\n",
+ " # For an fcc structure we have \n",
+ " # sqrt(2)*a = 4*R = 2*D, solving for D\n",
+ "D = a/(2)**0.5; # metallic diameter of aluminium having fcc structure\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe unit cell dimension of aluminium, is:\"\n",
+ "print round(a/(1*10**-10),2),\"angstrom\" \n",
+ "print\"\\nThe metallic diametre of aluminium, is:\"\n",
+ "print round(D/(1*10**-10),2),\"angstrom\""
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atoms_in_Crystals.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atoms_in_Crystals.ipynb
new file mode 100644
index 00000000..84052b54
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Atoms_in_Crystals.ipynb
@@ -0,0 +1,1037 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Atoms in Crystals"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The number of edges of the quartz crystal is : 30\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex1.1 Determine the number of edges in a quartz crystal;\n",
+ " #if there are 18 faces and 14 angles in it.: Page-2 (2010)\n",
+ " \n",
+ "# Variable declaration \n",
+ " \n",
+ "f = 18; # Number of faces of the quartz crystal\n",
+ "c = 14; # Number of angles in the quratz crystal\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ " # The relationship amongst the crystal elements can be \n",
+ " # expressed by the following formula:\n",
+ " # f + c = e + 2;\n",
+ " # Solving for e \n",
+ "e = f + c - 2;\n",
+ "\n",
+ "\n",
+ "# Result \n",
+ "\n",
+ "print \"The number of edges of the quartz crystal is : \",e\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "If is the body centered position of a cubic unit cell\n",
+ "Defined by the primitive translation vectors a,b and c_bar. 13.5\n",
+ "\n",
+ "The volume of conventional unit cell (angstrom cube): 27\n",
+ "\n",
+ "The volume of primitive unit cell (angstrom cube) : 13.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex1.2 Primitive unit cell: Page-4 (2010)\n",
+ " \n",
+ " #Variable declaration\n",
+ " \n",
+ "# Lattice translation vectors along X and Y direction, angstrom \n",
+ "a = 3\n",
+ "b = 3\n",
+ "c_bar = 3; # Assumed translation vector along Z direction, angstrom\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "c = 1.5*(a+b+c_bar);#Real translation vector along Z direction, angstrom\n",
+ "V_con = a**3; # Volume of conventional unit cell, metre cube\n",
+ "V_primitive = 1/2*V_con; # Volume of primitive unit cell, metre cube\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"If is the body centered position of a cubic unit cell\" \n",
+ "print\"Defined by the primitive translation vectors a,b and c_bar.\", c\n",
+ "\n",
+ "print \"\\nThe volume of conventional unit cell (angstrom cube):\",V_con \n",
+ "print \"\\nThe volume of primitive unit cell (angstrom cube) :\", V_primitive\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Number of atoms per unit cell for an fcc lattice of copper crystal is\n",
+ "4.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex1.3 Calculate the number of atoms per unit cell\n",
+ "# for an fcc lattice of copper crystal. Page-9 (2010)\n",
+ "\n",
+ "# Variable declaration \n",
+ "\n",
+ "a = 3.60*10**(-10); # Lattice parameter, m:\n",
+ "M = 63.6; # Atomic weight, gram per mole\n",
+ "d = 8960*10**(+03) # Density of copper, g per metre cube\n",
+ "N = 6.023*10**(+23); # Avogadro's No.\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ " # Volume of the unit cell is given by\n",
+ " # a**3 = M*n/(N*d)\n",
+ " # Solving for n\n",
+ "n = a**3*d*N/M; # Number of lattice points per unit cell\n",
+ "\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print\"Number of atoms per unit cell for an fcc lattice of copper crystal is\"\n",
+ "print round(n)\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Lattice constant for the rock salt(NaCl) crystal,in angstrom,is\n",
+ "5.63\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " #Python CodeEx1.4 Calculate the lattice constant for a rock salt crystal\n",
+ " #(density=2180 kg per cubic meter)assuming that it has fcc lattice.\n",
+ " #Mol. wt of NaCl=58.5: Page-9 (2010)\n",
+ " \n",
+ "# Variable declaration \n",
+ " \n",
+ "M = 58.5; # Atomic weight of NaCl, gram per mole\n",
+ "d = 2180*10**03; # Density of rock salt, per metre cube\n",
+ "n = 4; #No. of atoms per unit cell for an fcc lattice of NaCl crystal\n",
+ "N = 6.023*10**23; # Avogadro's No.\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ " # Volume of the unit cell is given by\n",
+ " # a**3 = M*n/(N*d)\n",
+ " # Solving for a\n",
+ "a = (n*M/(d*N))**(1/3); # Lattice constant of unit cell of NaCl\n",
+ "\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print \"Lattice constant for the rock salt(NaCl) crystal,in angstrom,is\"\n",
+ "print round(a/10**(-10),2)\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Density of diamond cubic unit cell,in kg per metre cube, is: 3503.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 1.5 Calculate the Density of diamond: Page-9 (2010)\n",
+ " \n",
+ " \n",
+ "# Variable declaration \n",
+ " \n",
+ "a = 3.57*10**-10; # Lattice parameter of a diamond crystal\n",
+ "M = 12*10**-03; # Atomic weight of diamond, kg per mole\n",
+ "n1 = 8; # No. of corner atoms in the diamond cubic unit cell\n",
+ "n2 = 6; #No. of face centered atoms in the diamond cubic unit cell\n",
+ "n3 = 4; # No. of atoms completely within the unit cell\n",
+ "N = 6.023*10**+23; # Avogadro's No.\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "n = 1/8*n1+1/2*n2+1*n3;#No.of atoms per unit cell for an fcc lattice of NaCl\n",
+ " # Volume of the unit cell is given by\n",
+ " # a**3 = M*n/(N*d)\n",
+ " # Solving for d\n",
+ "d = M*n/(N*a**3); # Density of diamond cubic unit cell\n",
+ "\n",
+ "\n",
+ " # Result \n",
+ " \n",
+ "print \"Density of diamond cubic unit cell,in kg per metre cube, is:\",round(d)\n",
+ "\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Lattice parameter of aluminium, in angstrom, is: 4.05\n",
+ "Diameter of aluminium atom, in angstrom, is : 2.86\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex1.6 Aluminium has an fcc structure.\n",
+ "#Its density is2.7x10^3 kg per metre cube.\n",
+ "# Calculating Unit cell dimensions and the atomic diameter: Page-9 (2010)\n",
+ "\n",
+ "# Variable declaration \n",
+ "\n",
+ "d = 2.7*10**+03;#Density of fcc structure of aluminium,kg per metre cube\n",
+ "M = 26.98*10**-03;# Atomic weight of aluminium, kg per mole\n",
+ "n = 4; # No. of atoms per unit cell of fcc lattice structure of aluminium\n",
+ "N = 6.023*10**+23; # Avogadro's No.\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ " # Volume of the unit cell is given by\n",
+ " # a**3 = M*n/(N*d)\n",
+ " # Solving for a\n",
+ "a = ((M*n)/(N*d))**(1/3); # Lattice parameter of alumitnium unit cell\n",
+ " # For an fcc cryatal lattice, \n",
+ " # 2**(1/2) = 4R = 2D\n",
+ " # Solving for D\n",
+ "D = (a/2**(1/2)) # Diameter of aluminium atom\n",
+ "\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print\"Lattice parameter of aluminium, in angstrom, is:\",round(a/(1*10**-10),2)\n",
+ "print\"Diameter of aluminium atom, in angstrom, is : \",round(D/(1*10**-10),2)\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The angle between [ 1 1 1 ] and [ 0 0 1 ] directions\n",
+ "in the cubic crystal,in degrees, is : 54.74\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex1.17 Calculate the Angle between [111] and [001] \n",
+ "# crystal directions in a cubic crystal: Page-23 (2010)\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "h1 = 1;k1 = 1;l1 = 1; # Miller indices of first set of planes\n",
+ "h2 = 0;k2 = 0;l2 = 1; # Miller indices of second set of planes\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ " # We know that\n",
+ "#cos(theta)=\n",
+ "#(h1*h2+k1*k2+l1*l2)/(sqrt(h1**2+k1**2+l1**2)*sqrt(h1**2+k1**2+l1**2))\n",
+ " # Solving for theta\n",
+ "a=(h1*h2+k1*k2+l1*l2)/((h1**2+k1**2+l1**2)**0.5*(h2**2+k2**2+l2**2)**0.5)\n",
+ "theta = math.acos(a);\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe angle between [\",h1,k1,l1,\"] and [\",h2,k2,l2,\"] directions\" \n",
+ "print\"in the cubic crystal,in degrees, is :\",round(theta*180/math.pi,2)\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The angle between [ 1 1 1 ] and [ -1 -1 1 ] directions\n",
+ " in the cubic crystal, in degrees, is : 109.47\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex1.18 Angle between two directions of cubic crystal:Page-23(2010)\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "h1 = 1; k1 = 1; l1 = 1 # Miller indices for first set of planes\n",
+ "h2 = -1; k2 = -1; l2 = 1;#Miller indices for second set of planes\n",
+ "\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ " # We know that\n",
+ "#cos(theta)=\n",
+ "#(h1*h2+k1*k2+l1*l2)/(sqrt(h1**2+k1**2+l1**2)*sqrt(h2**2+k2**2+l2**2))\n",
+ "# Solving for theta\n",
+ "a=(h1*h2+k1*k2+l1*l2)/((h1**2+k1**2+l1**2)**0.5*(h2**2+k2**2+l2**2)**0.5)\n",
+ "theta=math.acos(a);\n",
+ "\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print\"\\nThe angle between [\",h1,k1,l1,\"] and [\",h2,k2,l2,\"] directions\" \n",
+ "print\" in the cubic crystal, in degrees, is :\",round(theta*180/math.pi,2) \n",
+ "\n",
+ " \n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The required miller indices are : 3.0 2.0 1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex1.19 Miller indices of the crystal plane: Page-25 (2010)\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "m = 2; n = 3; p = 6; #Coefficients of intercepts along three axes\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "m_inv = 1/m; # Reciprocate the first coefficient\n",
+ "n_inv = 1/n; # Reciprocate the second coefficient\n",
+ "p_inv = 1/p; # Reciprocate the third coefficient\n",
+ "mul_fact = (m*n*p)/6 # Find l.c.m. of m,n and p\n",
+ "m1 = m_inv*mul_fact; # Clear the first fraction\n",
+ "m2 = n_inv*mul_fact; # Clear the second fraction\n",
+ "m3 = p_inv*mul_fact; # Clear the third fraction\n",
+ "\n",
+ "\n",
+ " # Result\n",
+ " \n",
+ "print\"\\nThe required miller indices are : \", m1,m2,m3\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The required miller indices are : 0.0 1.0 4.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 1.20 Indices of lattice plane: Page-25 (2010)\n",
+ " \n",
+ "# Variable declaration \n",
+ " \n",
+ "m = 10000; #Coefficient of intercept along x-axis,\n",
+ "n = 2; # Coefficient of intercept along y-axis\n",
+ "p = 1/2; # Coefficient of intercept along z-axis\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "m_inv = 1/m; # Reciprocate m\n",
+ "n_inv = 1/n; # Reciprocate n\n",
+ "p_inv = 1/p; # Reciprocate p\n",
+ "mul_fact = n; # multiplicative factor\n",
+ "m1 = m_inv*mul_fact; # Clear the first fraction\n",
+ "m2 = n_inv*mul_fact; # Clear the second fraction\n",
+ "m3 = p_inv*mul_fact; # Clear the third fraction\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"\\nThe required miller indices are : \", round(m1),m2,m3\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length of the intercept along y-axis,in angstrom,is 1.23\n",
+ "Length of the intercept along z-axis, in angstrom, is : -3.94\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 1.21 Length of the intercepts: Page-26 (2010)\n",
+ " \n",
+ "\n",
+ "# Variable declaration \n",
+ " \n",
+ "a = 1.21*10**-10; # Lattice parameter of the unit cell, m \n",
+ "b = 1.84*10**-10; # Lattice parameter of the unit cell, m\n",
+ "c = 1.97*10**-10; # Lattice parameter of the unit cell, m\n",
+ "p = 1/2; # Reciprocal of miller index on x-axis\n",
+ "q = 1/3; # Reciprocal of miller index on y-axis\n",
+ "r = 1/(-1); # Reciprocal of miller index on z-axis\n",
+ "l1 = 1.21*10**-10; # Actual length of the intercept along x-axis, m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "mul_fact = l1/(p*a); # Calculate multiplication factor\n",
+ "l2 = mul_fact*q*b; # Actual length of the interceptalong y-axis, m\n",
+ "l3 = mul_fact*r*c; # Actual length of the intercept along z-axis, m\n",
+ "\n",
+ "\n",
+ " # Result \n",
+ " \n",
+ "print\"Length of the intercept along y-axis,in angstrom,is\",round(l2/10**-10,2)\n",
+ "print\"Length of the intercept along z-axis, in angstrom, is : \",l3/10**-10\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The required miller indices of the plane are : 4.0 2.0 1.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code \n",
+ "'''\n",
+ "Ex 1.22 Determine the Miller indices of lattice plane that makes\n",
+ " intercepts of 2,3,4,(in angstroms) on the\n",
+ " coordinate axes of an orthorombic crystal with a:b:c=4:3:2 ,Page-26(2010)\n",
+ "'''\n",
+ "# Variable declaration \n",
+ "\n",
+ "a = 4 # Lattice parameter of the unit cell \n",
+ "b = 3 # Lattice parameter of the unit cell\n",
+ "c = 2 # Lattice parameter of the unit cell\n",
+ "l1 = 2 # Length of the intercept along x-axis, m\n",
+ "l2 = 3 # Length of the intercept along y-axis, m\n",
+ "l3 = 4 # Length of the intercept along z-axis, m\n",
+ "\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "l = l1/a # Intercept per unit translation along x-axis\n",
+ "m = l2/b # Intercept per unit translation along y-axis\n",
+ "n = l3/c # Intercept per unit translation along z-axis\n",
+ "r1 = 1/l # Reciprocal of l\n",
+ "r2 = 1/m # Reciprocal of m\n",
+ "r3 = 1/n # Reciprocal of n\n",
+ "m1 = 2*r1 # miller index along x-axis\n",
+ "m2 = 2*r2 # miller index along y-axis\n",
+ "m3 = 2*r3 # miller index along z-axis\n",
+ "\n",
+ "\n",
+ "# Result\n",
+ " \n",
+ "print\"The required miller indices of the plane are :\", m1, m2, m3\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The required miller indices of the plane are : 4.0 3.0 6.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 1.23 Indices of tetragonal lattice: Page-26 (2010)\n",
+ " # For a tetragonal system we have a = b\n",
+ " \n",
+ " \n",
+ "# Variable declaration \n",
+ " \n",
+ "a = 1; # Lattice parameter of the unit cell along x-axis \n",
+ "b = 1; # Lattice parameter of the unit cell along y-axis\n",
+ "c = 1.5; # Lattice parameter of the unit cell along z-axis\n",
+ "l1 = 3; # Length of the intercept along x-axis, angstrom\n",
+ "l2 = 4; # Length of the intercept along y-axis, angstrom\n",
+ "l3 = 3; # Length of the intercept along z-axis, angstrom\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "l = l1/a; # Intercept per unit translation along x-axis\n",
+ "m = l2/b; # Intercept per unit translation along y-axis\n",
+ "n = l3/c; # Intercept per unit translation along z-axis\n",
+ "r1 = 1/l; # Reciprocal of l\n",
+ "r2 = 1/m; # Reciprocal of m\n",
+ "r3 = 1/n; # Reciprocal of n\n",
+ "mul_fact = (l*m*n)/2\n",
+ "m1 = mul_fact*r1; # miller index along x-axis\n",
+ "m2 = mul_fact*r2; # miller index along y-axis\n",
+ "m3 = mul_fact*r3; # miller index along z-axis\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The required miller indices of the plane are :\", m1, m2, m3\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The Miller-Bravias indices corresponding to \n",
+ " the miller indices( 1 1 0 ), = ( 1 1 -2 0 )\n",
+ "\n",
+ "The Miller-Bravias indices corresponding to \n",
+ "the miller indices( 1 -1 0 ),= ( 1 -1 0 0 )\n",
+ "\n",
+ "The Miller-Bravias indices corresponding to \n",
+ "the miller indices ( 3 4 5 ),=( 3 4 -7 5 )\n",
+ "\n",
+ "The Miller-Bravias indices corresponding to \n",
+ " the miller indices( 3 -4 5 ),=( 3 -4 1 5 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " #Python Code Ex 1.24 Miller-Bravias indices for Miller indices:Page-29 (2010)\n",
+ " \n",
+ " #Function declaration and calculations\n",
+ "def f(h,k):\n",
+ " i = -(h + k);\n",
+ " return i\n",
+ " \n",
+ " \n",
+ "# Variable declaration \n",
+ " \n",
+ "h1 = 1; k1 = 1; l1 = 0 ; # First set of Miller indices\n",
+ "h2 = 1; k2 = -1; l2 = 0; # Second set of miller indices\n",
+ "h3 = 3; k3 = 4; l3 = 5; # Third set of miller indices\n",
+ "h4 = 3; k4 = -4; l4 = 5; # Fourth set of miller indices\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe Miller-Bravias indices corresponding to \" \n",
+ "print\" the miller indices(\",h1, k1, l1,\"), = (\", h1, k1, f(h1,k1), l1,\")\" \n",
+ "print\"\\nThe Miller-Bravias indices corresponding to \"\n",
+ "print \"the miller indices(\",h2, k2, l2,\"),= (\", h2, k2, f(h2,k2), l2,\")\"\n",
+ "print\"\\nThe Miller-Bravias indices corresponding to \" \n",
+ "print\"the miller indices (\",h3, k3, l3,\"),=(\", h3, k3, f(h3,k3), l3,\")\"\n",
+ "print\"\\nThe Miller-Bravias indices corresponding to \" \n",
+ "print\" the miller indices(\",h4, k4, l4,\"),=(\", h4, k4, f(h4,k4), l4,\")\"\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The Miller Bravias indices of [ 1 0 0 ] are [ 2.0 -1.0 -1.0 0 ]\n",
+ "\n",
+ "The Miller Bravias indices of [ 0 1 0 ] are [ -1.0 2.0 -1.0 0 ]\n",
+ "\n",
+ "The Miller Bravias indices of [ 1 1 0 ] are [ 1.0 1.0 -2.0 0 ]\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex 1.25 Miller Bravias indices of lattice planes:Page-30 (2010)\n",
+ "\n",
+ "\n",
+ "# Function declaration and Calculations \n",
+ "\n",
+ "def fh(H,K):\n",
+ " h = (2*H - K)/3; \n",
+ " return h\n",
+ "\n",
+ "def fk(H,K):\n",
+ " k = (2*K - H)/3;\n",
+ " return k\n",
+ "\n",
+ "def f(h,k):\n",
+ " i = -(h + k);\n",
+ " return i\n",
+ "\n",
+ "def fl(L):\n",
+ " l = L;\n",
+ " return l\n",
+ " \n",
+ " \n",
+ "# Variable declaration \n",
+ "\n",
+ "H1 = 1; K1 = 0; L1 = 0 ; # First set of Miller indices\n",
+ "H2 = 0; K2 = 1; L2 = 0; # Second set of miller indices\n",
+ "H3 = 1; K3 = 1; L3 = 0; # Third set of miller indices\n",
+ "\n",
+ "h1 = fh(H1,K1)*3; # Call function fh\n",
+ "k1 = fk(H1,K1)*3; # Call function fk\n",
+ "l1 = fl(L1)*3; # Call function fl\n",
+ "i1 = f(h1,k1); # Call function \n",
+ "h2 = fh(H2,K2)*3; # Call function fh\n",
+ "k2 = fk(H2,K2)*3; # Call function fk\n",
+ "l2 = fl(L2)*3; # Call function l2\n",
+ "i2 = f(h2,k2); # Call function f\n",
+ "h3 = fh(H3,K3)*3; # Call function fh\n",
+ "k3 = fk(H3,K3)*3; # Call function fk\n",
+ "l3 = fl(L3)*3; # Call function l3\n",
+ "i3 = f(h3,k3); # Call function f\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print\"\\nThe Miller Bravias indices of [\",H1,K1,L1,\"] are [\",h1,k1,i1,l1,\"]\"\n",
+ "print\"\\nThe Miller Bravias indices of [\",H2,K2,L2,\"] are [\",h2,k2,i2,l2,\"]\"\n",
+ "print\"\\nThe Miller Bravias indices of [\",H3,K3,L3,\"] are [\",h3,k3,i3,l3,\"]\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The lattice parameter of the cubic crystal,\n",
+ " in angstrom, is : 3.46\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 1.26 The distance between consecutive(111) planes\n",
+ "#in a cubic crystal is 2 angstrom.Determine the Lattice parameter.Page-33(2010)\n",
+ "\n",
+ "# Variable declaration \n",
+ "\n",
+ "h = 1; k = 1; l = 1;#Miller Indices for planes in a cubic crystal\n",
+ "d = 2*10**-10; # Interplanar spacing, m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ " # For cubic crystals, the interplanar spacing is given by\n",
+ " # d = a/(h**2+k**2+l**2)**1/2;\n",
+ " # Solving for a\n",
+ "a = (h**2+k**2+l**2)**(1/2)*d;#lattice parameter of cubic crystal, m \n",
+ "\n",
+ " \n",
+ "#Result\n",
+ "\n",
+ "print \"The lattice parameter of the cubic crystal,\" \n",
+ "print\" in angstrom, is :\",round(a/10**(-10),2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The interplanar spacing between consecutive (101) planes ,\n",
+ "in angstrom, is : 1.41\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 1.27 Interplanar spacing between consecutive (101) planes \n",
+ " #in tetragonal crystal: Page-33 (2010)\n",
+ " \n",
+ "# Variable declaration \n",
+ " \n",
+ "h = 1; # Miller Indices for planes in a cubic crystal\n",
+ "k = 0;\n",
+ "l = 1; \n",
+ "a = 2.42*10**-10;#Lattice parameters of a tetragonal crystal, each in m\n",
+ "b = 2.42*10**-10; \n",
+ "c = 1.74*10**-10;\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "# The interplanar spacing for cubic crystal, m \n",
+ "d = ((h**2+k**2)/a**2 + l**2/c**2)**(-1/2);\n",
+ "\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print \"The interplanar spacing between consecutive (101) planes ,\" \n",
+ "print \"in angstrom, is :\",round(d/(1*10**-10),2)\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 1.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The interplanar spacing between consecutive (321) planes :\n",
+ " in angstrom, is : 1.13\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 1.28 Interplanar spacing in cubic crystal: Page-36 (2010)\n",
+ "\n",
+ "# Variable declaration \n",
+ "h = 3; k = 2; l = 1;# Miller Indices for planes in a cubic crystal\n",
+ "a = 4.21*10**-10; # Interatomic spacing, m\n",
+ "\n",
+ "#Calculations\n",
+ "d = a/(h**2+k**2+l**2)**(1/2);#The interplanar spacing for cubic crystals, m\n",
+ "\n",
+ "# Result\n",
+ "print \"The interplanar spacing between consecutive (321) planes :\"\n",
+ "print\" in angstrom, is :\",round(d/(1*10**-10),2)\n",
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Band_Theory.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Band_Theory.ipynb
new file mode 100644
index 00000000..8b2e6e30
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Band_Theory.ipynb
@@ -0,0 +1,94 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: Band Theory"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 11.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The ratio between K.E. of an electron in 2D square lattice = 2.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex11.2 Determining ratio between K.E. of \n",
+ " # an electron in 2D square lattice: Page-370 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "m = 9.1e-031; # Mass of an electron, kg\n",
+ "a = 1; # For simplicity assuming lattice parameter to be unity, m\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # Case-I when k_x = k_y = %math.pi/a\n",
+ "k_x = math.pi/a\n",
+ "k_y = math.pi/a; # Wave numbers in X- and Y- directions, rad per metre\n",
+ " # Energy of the electron inside a Brilliouin Zone, J\n",
+ "E1 = h**2/(8*math.pi**2*m)*(k_x**2 + k_y**2); \n",
+ " # Case-II when k_x = %math.pi/a and k_y = 0\n",
+ "k_x = math.pi/a\n",
+ "k_y = 0; # Wave numbers in X- and Y- directions, rad per metre\n",
+ " # Energy of the electron inside a Brilliouin Zone, J\n",
+ "E2 = h**2/(8*math.pi**2*m)*(k_x**2 + k_y**2); \n",
+ " # Ratio between K.E. of an electron in 2D square lattice\n",
+ "E_ratio = E1/E2; \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe ratio between K.E. of an electron in 2D square lattice =\", E_ratio \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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Crystal_Imperfections.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Crystal_Imperfections.ipynb
new file mode 100644
index 00000000..3372424d
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Crystal_Imperfections.ipynb
@@ -0,0 +1,1343 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Crystal Imperfections"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The fraction of atoms in the solid at 300 K, is :\n",
+ "6.19e-26\n",
+ "\n",
+ "The fraction of atoms in the solid at 1000 K, is :\n",
+ "9.08e-06\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.1 Variation of fraction of atoms in a solid \n",
+ " # with temperature Page-158 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "E = 1.5; # Energy of the solid, electron-volt\n",
+ "T1 = 300; # First absolute temperature, K\n",
+ "T2 = 1500; # Second absolute temperature, K\n",
+ "k = 8.614*10**-5; # Boltzmann constant, electron-volt/K\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # Now fraction of atoms = f_atom = n/N = math.exp(-E/(k*T)\n",
+ "f_atom_300 = math.exp(-E/(k*T1)); # Fraction of atoms in the solid at 300 K\n",
+ "f_atom_1000 = math.exp(-E/(k*T2)); # Fraction of atoms in the solid at 1000 K\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe fraction of atoms in the solid at 300 K, is :\"\n",
+ "print round((f_atom_300*10**26),2)*10**-26\n",
+ "print\"\\nThe fraction of atoms in the solid at 1000 K, is :\"\n",
+ "print round((f_atom_1000*10**6),2)*10**-6\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The relative change in the density of copper due to\n",
+ " vacancy formation (n+N)/N, is : 1.0002 : 1\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.2 Vacancy formation in copper Page-159 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " #Variable declaration\n",
+ " \n",
+ "E = 1; # Energy of formation of vacancy in copper, electron-volt\n",
+ "T = 1356; # Melting point of copper, K\n",
+ "k = 8.614*10**-5; # Boltzmann constant, electron-volt\n",
+ "N = 6.023*10**23; # Avogadro's number\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # Now fraction of vacancies = f_vacancy = n/N = math.exp(-E/(k*T)\n",
+ "f = math.exp(-E/(k*T)); # Fraction of vacancies in the solid at 300 K\n",
+ "n = N*f; # Number of vacancy per mole\n",
+ "delta_d = n + N; # Change in the density due to creation of vacancy\n",
+ "# Relative change in the density of copper due to vacancy formation\n",
+ "f_d = delta_d/N;\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe relative change in the density of copper due to\"\n",
+ "print\" vacancy formation (n+N)/N, is :\",round(f_d,4),\": 1\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The average separation between the defects, is :\n",
+ "2.2e-07 m\n",
+ "\n",
+ "The expected concentration of Schottky defect at 1000 K, n/N, is :\n",
+ "0.0001\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.3 Concentration of Schottky imperfections Page-159 (2010)\n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "N = 6.023*10**23; # Avogadro's number\n",
+ "k = 8.614*10**-5; # Boltzmann's constant, eV/K\n",
+ "T1 = 27+273; # First absolute temperature, K\n",
+ "T2 = 1000; # Second absolute temperature, K\n",
+ "d = 1*10**-10; # Interatomic spacing assumed to be unit angstrom, m\n",
+ "# Concentration of Schottky defects in an fcc crystal at 300 K temperature\n",
+ "C_300 = 1*10**-10;\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "n = C_300*N; # Number of Schottky imperfections per mole\n",
+ "V = d**3; # Volume of the unit cube, metre cube\n",
+ "V_mole = V*N;# Volume occupied by one mole of atoms in fcc crystal, metre cube\n",
+ "V_per_defect = V_mole/n; # Volume per defect, metre cube\n",
+ "a = (V_per_defect)**(1/3); # Average separation between the defects, m\n",
+ "E_v = 23.03*k*T1; # Energy of the solid, electron-volt\n",
+ "C_1000 = math.exp(-E_v/(k*T2)); # Schottky defect concentration at 1000 K\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe average separation between the defects, is :\"\n",
+ "print round((a*10**7),1)*10**-7,\"m\"\n",
+ "print\"\\nThe expected concentration of Schottky defect at 1000 K, n/N, is :\"\n",
+ "print round((C_1000*10**2),2)*10**-3\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "No. of Schottky imperfections present in NaCl crystal is :\n",
+ "9420000.0\n",
+ "\n",
+ "Concentration of Schottky imperfections present in NaCl crystal is :\n",
+ "351000.0 per cm cube\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#PythonCodeEx5.4 Number of Schottky imperfections in NaCl crystalPage-160(2010)\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "N = 6.023*10**23; # Avogadro's number\n",
+ "k = 8.614*10**-5; # Boltzmann's constant, eV/K\n",
+ "T = 27+273; # Absolute room temperature, K\n",
+ "Ep = 2; # Energy required to remove a pair of Na+ and Cl- ions, electron-volt\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation and Results\n",
+ "\n",
+ " # Now Concentration of imperfections in a crystal is given by\n",
+ " # n/N = math.exp(-Ep/(2*k*T)), solving for n\n",
+ "# No. of Schottky imperfections present in NaCl crystal\n",
+ "n = N*math.exp(-Ep/(2*k*T));\n",
+ "print\"\\nNo. of Schottky imperfections present in NaCl crystal is :\"\n",
+ "print round((n*10**-6),2)*10**6\n",
+ "V = 26.83; # Volume of one mole of the crystal, cm cube\n",
+ "n = n/V; # Number per mole volume of the crystal, per cm cube\n",
+ "print\"\\nConcentration of Schottky imperfections present in NaCl crystal is :\"\n",
+ "print round((n*10**-5),2)*10**5,\" per cm cube\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The Average energy required to create one Schottky defect\n",
+ " in NaCl crystal is : 1.98 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.5 Average energy required to create one \n",
+ " #Schottky defect in NaCl Page-160 (2010)\n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "N = 6.023*10**23; # Avogadro's number\n",
+ "k = 8.614*10**-5; # Boltzmann's constant, eV/K\n",
+ "T = 27+273; # Absolute room temperature, K\n",
+ "r = 2.82*10**-10; # Interatomic separation of NaCl cryastal, m\n",
+ "n = 5*10**+11; # Density of defects, per metre cube\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " #Ep = 2;//Energy required to remove a pair of Na+ and Cl- ions, electron-volt\n",
+ "a = 2*r; # Lattice parameter of unit cell of NaCl, m\n",
+ "V = a**3; # Volume of the unit cell of sodium, metre cube\n",
+ "n_ip = 4; # Number of ion-pairs of NaCl \n",
+ "N = n_ip/V; # No. of ion-pairs in unit volume of an ideal NaCl crystal\n",
+ " # Now n/N = math.exp(-Ep/(2*k*T)), solving for Ep\n",
+ "# Average energy required to create one Schottky defect, electron-volt\n",
+ "Ep = 2*k*T*math.log(N/n);\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe Average energy required to create one Schottky defect\"\n",
+ "print\" in NaCl crystal is :\",round(Ep,2),\"eV\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The ratio of Frenkel defect, n300_r_n600, is :\n",
+ "1.31e-06\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.6 Ratio of Frenkel defects at two different temperatures\n",
+ "# in an ionic crystal Page-161 (2010)\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "k = 8.614*10**-5; # Boltzmann's constant, eV/K\n",
+ "Ef = 1.4; # Average energy required to create a Frenkel defect, eV\n",
+ "T1 = 300; # First absoluite temperature, K\n",
+ "T2 = 600; # Second absolute temperature, K\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # The concentration of Frenkel defect for given Ef \n",
+ " #and absolute temperature T is given by\n",
+ " # n = A*math.exp(-Ef/(2*k*T)), per metre cube, so that\n",
+ " # n1 = A*math.exp(-Ef/(2*k*T1)), per metre cube, and\n",
+ " # n2 = A*math.exp(-Ef/(2*k*T2)), per metre cube, therefore,\n",
+ " # n1/n2 = math.exp((-Ef/k)*(1/T1 - 1/T2)), the ratio of Frenkel defects is\n",
+ "n300_r_n600 = math.exp((-Ef/(2*k))*(1/T1 - 1/T2));# Frenkel defect ratio \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe ratio of Frenkel defect, n300_r_n600, is :\"\n",
+ "print round((n300_r_n600*10**6),2)*10**-6"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The dislocation density in bcc structure of iron :\n",
+ "34200000000.0 dislocations per Sq. m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "# Python Code Ex5.7 Dislocation density of bcc structure of iron Page-163(2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "L = 0.15; # Length of the strip, m\n",
+ "t = 0.02; # Thickness of the iorn strip, m\n",
+ "r = 0.12; # Radius of curvature of the bent, m\n",
+ "a = 2.81*10**-10; # Lattice parameter of the bcc structure of iron, m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "b = (3)**0.5*a/2; # Magnitude of Burger vector, m\n",
+ " # For n positive edge dislocations\n",
+ " # n*b = L*t/r, solving for n/(L*t)\n",
+ " # n/(L*t) = 1/(r*b), Number of dislocation line piercing through \n",
+ " #a unit area of the plane of the paper, per metre square\n",
+ "# Dislocation density in bcc structure of iron, number per metre square\n",
+ "d = 1/(r*b);\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe dislocation density in bcc structure of iron :\"\n",
+ "print round((d*10**-10),2)*10**10,\"dislocations per Sq. m\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The minimum dislocation density in aluminium,\n",
+ "67000000000.0 dislocations per Sq. m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.8 Minimum dislocation density in aluminium Page-164 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "b = 3*10**-10; # Magnitude of Burgers vector, m\n",
+ "r = 0.05; # Radius of curvatur of the aluminium crystal, m\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # For n positive edge dislocations\n",
+ " # n*b = L*t/r, solving for n/(L*t)\n",
+ " # n/(L*t) = 1/(r*b), Number of dislocation line piercing through \n",
+ " #a unit area of the plane of the paper, per Sq.m\n",
+ "d = 1/(r*b); # Minimum dislocation density in aluminium, number per Sq. m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe minimum dislocation density in aluminium,\"\n",
+ "print round((d*10**-10),1)*10**10,\"dislocations per Sq. m\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The applied force along [1-10] direction = 183.85 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.9 Determining total force from its resolved component\n",
+ "# in a given direction: Page-168 (2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "h1 = 1; k1 = -1; l1 = 0 # Miller indices for first set of planes\n",
+ "h2 = 1; k2 = 0; l2 = 0; # Miller indices for second set of planes\n",
+ "F_100 = 130; # Resolved component of force along [100] direction, N\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "w=(h1*h2+k1*k2+l1*l2)/((h1**2+k1**2+l1**2)**0.5*(h2**2+k2**2+l2**2)**0.5)\n",
+ "cos_theta = w;# Cosine of angle between [1 -1 0] and [100] directions\n",
+ " # As F/F_100 = cos_theta, solving for F\n",
+ "F_110 = F_100/cos_theta; # Applied force along [1 -1 0] direction, N\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe applied force along [1-10] direction =\",round(F_110,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The resolved component of shearing force along[110]direction,F_110 =\n",
+ "538.89 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.10 Determining resolved componet of shearing force \n",
+ " #in a given direction: Page-168 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "h1 = 1; k1 = 1; l1 = 1 # Miller indices for first set of planes\n",
+ "h2 = 1; k2 = 1; l2 = 0; # Miller indices for second set of planes\n",
+ "F_111 = 660; # Shearing force along [111] direction, N\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "w=(h1*h2+k1*k2+l1*l2)/((h1**2+k1**2+l1**2)**0.5*(h2**2+k2**2+l2**2)**0.5)\n",
+ "cos_theta = w;# Cosine of angle between [1 -1 0] and [100] directions\n",
+ " # As F_110/F_111 = cos_theta, solving for F_110\n",
+ "# Resolved component of shearing force along [110] direction, N\n",
+ "F_110 = F_111*cos_theta; \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ " \n",
+ "print\"\\nThe resolved component of shearing force along[110]direction,F_110 =\"\n",
+ "print round(F_110,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The stress required to be applied along [001] direction \n",
+ " to produce slip in the [101] direction on the (-111) plane = \n",
+ "3.0 MPa\n",
+ "\n",
+ "Since cos_lambda = 0, this implies that slip cannot occur \n",
+ "in[110] direction when the stress is applied along [001] direction\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.11 Dependence of applied stress \n",
+ " #on the slip direction of a copper: Page-169 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "# Critical shear stress for the <-110>{111} slip system, mega-pascal (MPa)\n",
+ "tau_critical = 1;\n",
+ " # For directions [001] and [-111]\n",
+ "h1 = 0; k1 = 0; l1 = 1 # Miller indices for first set of planes\n",
+ "h2 = -1; k2 = 1;l2 = 1;# Miller indices for second set of planes\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation and Result\n",
+ "\n",
+ "w=(h1*h2+k1*k2+l1*l2)/((h1**2+k1**2+l1**2)**0.5*(h2**2+k2**2+l2**2)**0.5)\n",
+ "cos_phi = w;# Cosine of angle between [001] and [-111] directions\n",
+ " # For directions [001] and [101]\n",
+ "h1 = 0; k1 = 0; l1 = 1 # Miller indices for first set of planes\n",
+ "h2 = 1; k2 = 0; l2 = 1;# Miller indices for second set of planes\n",
+ "cos_lambda = w;# Cosine of angle between [001] and [101] directions\n",
+ "# Stress along [001] direction, newton per metre square\n",
+ "sigma = tau_critical/(cos_phi*cos_lambda);\n",
+ "print \"\\nThe stress required to be applied along [001] direction \"\n",
+ "print\" to produce slip in the [101] direction on the (-111) plane = \"\n",
+ "print round(sigma,2),\"MPa\"\n",
+ " # For directions [001] and [110]\n",
+ "h1 = 0; k1 = 0; l1 = 1 # Miller indices for first set of planes\n",
+ "h2 = 1; k2 = 1;l2 = 0; # Miller indices for second set of planes\n",
+ "w=(h1*h2+k1*k2+l1*l2)/((h1**2+k1**2+l1**2)**0.5*(h2**2+k2**2+l2**2)**0.5)\n",
+ "cos_lambda = w;# Cosine of angle between [001] and [110] directions\n",
+ "if cos_lambda <> 0:\n",
+ "# Stress along [001] direction, newton per metre square\n",
+ " print\"\\nThe stress required to be applied along [001] direction\" \n",
+ " print\"to produce slip in the [110] direction on the(-111) plane = \"\n",
+ " print sigma,\"MPa\"\n",
+ "else:\n",
+ " print\"\\nSince cos_lambda = 0, this implies that slip cannot occur \"\n",
+ " print\"in[110] direction when the stress is applied along [001] direction\"\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The resolved shear stress in the [101] direction on the (010) plane =\n",
+ "61.5 MPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.12 Resolved stress in a direction from applied stress\n",
+ "# in some other direction of bcc iron: Page-169 (2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "sigma = 123; # Axial stress applied in the direction [110] of bcc iron, MPa\n",
+ " # For directions [010] and [110]\n",
+ "h1 = 0; k1 = 1; l1 = 0 # Miller indices for first set of planes\n",
+ "h2 = 1; k2 = 1; l2 = 0; # Miller indices for second set of planes\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "w=(h1*h2+k1*k2+l1*l2)/((h1**2+k1**2+l1**2)**0.5*(h2**2+k2**2+l2**2)**0.5)\n",
+ "cos_phi = w;# Cosine of angle between [010] and [110] directions\n",
+ " # For directions [110s] and [101]\n",
+ "h1 = 1; k1 = 0; l1 = 1 # Miller indices for first set of planes\n",
+ "h2 = 1; k2 = 1; l2 = 0; # Miller indices for second set of planes\n",
+ "cos_lambda = w;# Cosine of angle between [110] and [101] directions\n",
+ "# Resolved shear stress in the [101] direction on the (010) plane, MPa\n",
+ "tau = sigma*cos_phi*cos_lambda; \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ " \n",
+ "print\"\\nThe resolved shear stress in the [101] direction on the (010) plane =\"\n",
+ "print round(tau,2),\"MPa\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The critical resolved shear stress in the [1 -1 0] direction \n",
+ "on the (111) plane = 0.39 MPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.13 Determining critical resolved shear stress \n",
+ " #from applied stress in a given direction of aluminium: Page-170 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "sigma_critical = 3.5; # Applied stress in the [1 -1 1] direction, MPa\n",
+ " # For directions [111] and [1 -1 1]\n",
+ "h1 = 1; k1 = 1; l1 = 1; # Miller indices for first set of planes\n",
+ "h2 = 1; k2 = -1; l2 = 1; # Miller indices for second set of planes\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# Cosine of angle between [111] and [1 -1 1] directions\n",
+ "w=(h1*h2+k1*k2+l1*l2)/((h1**2+k1**2+l1**2)**0.5*(h2**2+k2**2+l2**2)**0.5)\n",
+ "cos_phi = w;\n",
+ " # For directions [1 - 1 0] and [1 -1 1]\n",
+ "h1 = 1; k1 = -1; l1 = 0 # Miller indices for first set of planes\n",
+ "h2 = 1; k2 = -1; l2 = 1; # Miller indices for second set of planes\n",
+ "cos_lambda = w# Cosine of angle between [1 -1 0] and [1 -1 1] directions\n",
+ "# The critical resolved shear stress in the [1 -1 0] direction \n",
+ "#on the (111) plane, MPa\n",
+ "tau_c = sigma_critical*cos_phi*cos_lambda;\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe critical resolved shear stress in the [1 -1 0] direction \"\n",
+ "print\"on the (111) plane = \",round(tau_c,2),\"MPa\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "tau 1 = 0.91 MPa\n",
+ "\n",
+ "tau 2 = 0.81 MPa\n",
+ "\n",
+ "tau 3 = 0.12 MPa\n",
+ "\n",
+ "The slip is initiated along direction x1 at tau_c= 0.91 MPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.14 Determining the direction in which slip is \n",
+ " #initiated by the applied stress in zinc: Page-170 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "sigma = 2.3;# Applied stress when the plastic deformation is first observed,MPa\n",
+ "#Angle which the normal to the basal plane makes with the tensile axis of zinc,\n",
+ "phi = 60 ;\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation and Result\n",
+ "\n",
+ " # Function to find the value of resolved shear stress \n",
+ "def stress(lamb):\n",
+ " tau = sigma*math.cos(math.radians(phi))*math.cos(math.radians(lamb));\n",
+ " return tau\n",
+ "lamb=[] \n",
+ "# Angles which the three slip directions x1, x2 and x3 respectively\n",
+ "# makes with the tensile axis, degrees\n",
+ "lamb = [38,45,84];\n",
+ "t = []; # Initialize a one-dimensional vector of three elements\n",
+ "for i in range(3): \n",
+ " # Calculate the value of resolved shear stress by calling stress function\n",
+ " t.append(stress(lamb[i])); \n",
+ " # Display resloved shear stress for each direction, MPa\n",
+ " print \"\\ntau\",i+1,\"= \",round(t[i],2),\" MPa\" \n",
+ "\n",
+ "# Locate for the largest resolved stress value\n",
+ "big = t[0];\n",
+ "for i in range(1,3):\n",
+ " if t[i] > big:\n",
+ " big = t[i] # Set largest valuse of resolved stress if the condition meets\n",
+ "print\"\\nThe slip is initiated along direction x1 at tau_c=\",round(big,2),\"MPa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 5.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The critical resolved shear stress in the [1 -1 0] direction \n",
+ "on the (1 1 1) plane = 2.1 MPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.15 Determining applied tensile stress \n",
+ " #in a direction to initiate plastic deformation: Page-170 (2010)\n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "tau_critical = 0.7; # Critical resolved shear stress for fcc crystal, MPa\n",
+ " # For directions [100] and [1 1 1]\n",
+ "h1 = 1; k1 = 0; l1 = 0; # Miller indices for first set of planes\n",
+ "h2 = 1; k2 = 1; l2 = 1; # Miller indices for second set of planes\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# Cosine of angle between [100] and [1 1 1] directions\n",
+ "w=(h1*h2+k1*k2+l1*l2)/((h1**2+k1**2+l1**2)**0.5*(h2**2+k2**2+l2**2)**0.5)\n",
+ "cos_phi = w;\n",
+ " # For directions [1 0 0] and [1 -1 0]\n",
+ "h1 = 1; k1 = 0; l1 = 0 # Miller indices for first set of planes\n",
+ "h2 = 1; k2 = -1; l2 = 0; # Miller indices for second set of planes\n",
+ "cos_lambda = w;# Cosine of angle between [1 0 0] and [1 -1 0] directions\n",
+ "# The critical resolved shear stress in the [1 -1 0] direction\n",
+ "# on the (1 1 1) plane, MPa\n",
+ "sigma_c = tau_critical/(cos_phi*cos_lambda);\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe critical resolved shear stress in the [1 -1 0] direction \"\n",
+ "print \"on the (1 1 1) plane = \",round(sigma_c,2),\" MPa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The width of dislocation in copper = 4.68 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.16 Dislocation width in copper: Page-175 (2010)\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "a = 3.61e-010; # Lattice parameter of copper, m\n",
+ "#For simplicity, assume shear modulus of copper to be unity,netwon per metre sq\n",
+ "mu = 1;\n",
+ " \n",
+ " \n",
+ "#Calculation\n",
+ " \n",
+ " # Shear stress to initiate plastic deformation, newton per metre square\n",
+ "tau_PN = mu/1e+05; \n",
+ "b = a/(2)**0.5; # Burger vector magnitude for fcc crystal of copper, m\n",
+ " # As stress necessary to move a dislocation in a crystal is given by \n",
+ " # tau_PN = mu*math.exp(-2*%math.pi*w/b), solving for w\n",
+ "w = b*math.log(mu/tau_PN)/(2*math.pi); # Width of the dislocation in copper, m\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe width of dislocation in copper =\",round(w/(1*10**-10),2),\"angstrom\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The number of vacancies lost or created = 11111111111.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.17 Change in number of vacancies \n",
+ " #due to disloaction motion: Page-176 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "l = 1e-03; # Edge dislocation length of simple cubic crystal, m\n",
+ "d = 1e-06; # Distance of dislocation climb in, m\n",
+ "a = 3e-10; # Lattice parameter of scc, m\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "A = a**2; # Area of the unit cell, metre square\n",
+ "A_affected = l*d;# Affected area when the dislocation climbs down, metre square\n",
+ " # N.B.: Area of one unit cell in scc contributes one atom\n",
+ "N = A_affected/A;# Number of vacancies created within the affected area\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe number of vacancies lost or created =\", round(N)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The number of dislocations in motion in the whole cube = 653.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.18 Minimum number of dislocations \n",
+ " #in motion from shearing rate of copper: Page-176 (2010)\n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "a = 3.61e-010; # Lattice parameter of copper, m\n",
+ "epsilon_dot = 10/60; # Strain rate of plastic deformation, mm per sec\n",
+ "v_d = 1e+06; # Velocity of dislocation, mm per sec\n",
+ "V = 1e+03; # Volume of the crystal, mm cube\n",
+ "b = a*1e+03/(2)**0.5;# Burger vector magnitude for fcc crystal of copper, mm\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # Strain rate of plastic deformation is given by\n",
+ " # epsilon_dot = rho*b*v_d, solving for rho\n",
+ "rho = epsilon_dot/(b*v_d); # Density of the mobile disloacations, per mm cube\n",
+ "N = round(rho*V); # Number of dislocations in motion in the whole cube\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe number of dislocations in motion in the whole cube = \", N\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The elastic energy stored in the crystal =\n",
+ "10.64 joule per metre cube\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "# Python Code Ex5.19 Elastic energy of line imperfection stored in Al:Page-178 \n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "rho = 1e+010; # Dislocation density of Al, per metre square\n",
+ "mu = 25.94e+09; # Shear molulus of aluminium, newton per metre square\n",
+ "a = 4.05e-010; # Lattice parameter of aluminium, m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "b = a/(2)**0.5; # Burger vector magnitude for fcc crystal of Al, m\n",
+ "# Elastic energy per unit length of the dislocation, joule per metre\n",
+ "E_bar = mu*b**2/2; \n",
+ "E = E_bar*rho; # Elastic energy stored in the crystal, joule per metre cube\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe elastic energy stored in the crystal =\"\n",
+ "print round(E,2),\"joule per metre cube\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The spacing between dislocations in a tilt boundary in fcc Ni =\n",
+ "71.28 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.20 Spacing between dislocations \n",
+ " #in a tilt boundary in fcc Ni: Page-187 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "theta = 2; # Angle of tilt, degree\n",
+ "a = 3.52e-010; # Lattice parameter of Al, m\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "b = a/(2)**0.5; # Burger vector magnitude for fcc Ni, m\n",
+ "# The vertical spacing between two neighbouring edge dislocations, m\n",
+ "h = b/math.tan(math.radians(theta)); \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe spacing between dislocations in a tilt boundary in fcc Ni =\"\n",
+ "print round(h/(1*10**-10),2),\"angstrom\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The tilt angle between two tilt boundaries of Cu = \n",
+ "0.00017 radian\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.21 Determining tilt angle from dislocation \n",
+ " #spacing in the boundary of Cu: Page-188 (2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "a = 3.61e-010; # Lattice parameter of Cu, m\n",
+ "h = 1.5e-06;#The vertical spacing between \n",
+ "#two neighbouring edge dislocations, m\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "b = a/(2)**0.5; # Burger vector magnitude for fcc Cu, m\n",
+ "tan_theta = math.atan(b/h); # tangent of tilt angle between \n",
+ "# two tilt boundaries of Cu, radian\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe tilt angle between two tilt boundaries of Cu = \"\n",
+ "print round(tan_theta,5),\"radian\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 5.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The tilt angle between two tilt boundaries of Cu =\n",
+ "0.000133 radian\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex5.22 Determining tilt angle from dislocation spacing\n",
+ "# in the boundary of Cu: Page-188 (2010)\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "b = 0.4e-09; # Burger vector magnitude for fcc Cu, m\n",
+ "h = 3.0e-06;#The vertical spacing between two neighbouring edge dislocations,m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # tangent of tilt angle between two tilt boundaries of Cu, radian\n",
+ "tan_theta = math.atan(b/h); \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe tilt angle between two tilt boundaries of Cu =\"\n",
+ "print round((tan_theta*10**4),2)*10**-4,\"radian\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Dielectric_Properties_of_Materials.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Dielectric_Properties_of_Materials.ipynb
new file mode 100644
index 00000000..8d6e1efd
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Dielectric_Properties_of_Materials.ipynb
@@ -0,0 +1,415 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: Dielectric Properties of Materials"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The polarization of water molecules =\n",
+ "8.41e-10 coulomb per metre square\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex14.1 Polarization of water molecule: Page-456 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "NA = 6.023e+23; # Avogadro's number\n",
+ "p = 6e-030; # Dipole moment of water molecule, C-m\n",
+ "r = 1e-03; # Radius of water molecule, m\n",
+ "M = 18e-03; # Molecular weight of water, kg\n",
+ "d = 1e+03; # Density of water, kg per metre cube\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "V = M/d; # Volume of water, metre cube\n",
+ " # Now M/d metre cube volume will contain NA = 6.023e+023 water molecules, \n",
+ " #so that 4*%math.pi/3*(r**3) metre cube volume will contain \n",
+ "N = NA*d*4*math.pi*r**3/(M*3); # Number of water molecules per metre cube\n",
+ "P = N*p; # Polarization of water molecules, coulomb per metre square\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"\\nThe polarization of water molecules =\"\n",
+ "print round((P*10**10),2)*10**-10,\"coulomb per metre square\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The diectric constant of Kr specimen = 1.00066\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex14.2 Calculating dielectric constant from \n",
+ " # electric polarizability of the atom: Page-464 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "# Electric polarizability of the Kr-atom, farad-metre square\n",
+ "alpha_Kr = 2.18e-040;\n",
+ "NA = 6.023e+023; # Avogadro's number\n",
+ "# Electrical permittivity of free space,\n",
+ "# coulomb square per newton per metre square\n",
+ "epsilon_0 = 8.85e-012; \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "N = NA/(22.4e-03);# Number of Kr atoms per metre cube\n",
+ "# Relative electrical permittivity of Kr specimen\n",
+ "epsilon_r = N*alpha_Kr/epsilon_0 + 1; \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ " \n",
+ "print\"\\nThe diectric constant of Kr specimen =\", round(epsilon_r,5)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The total electric polarizability of carbon-dioxide =\n",
+ "3.22e-40 farad-metre square\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex14.3 Calculating electric polarizability of \n",
+ " #a molecule from its susceptibility: Page-464 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "NA = 6.023e+023; # Avogadro's number\n",
+ "# Electrical permittivity of free space, coulomb square per newton per metre\n",
+ "epsilon_0 = 8.85e-012; \n",
+ "chi = 0.985e-03; # Electrical susceptibility of carbon-dioxide molecule\n",
+ "rho = 1.977; # Density of carbon-dioxide, kg per metre cube\n",
+ "M = 44e-03; # Molecular weight of CO2, kg\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "N = NA*rho/M; # Number of molecules per unit volume, per metre cube\n",
+ "# Total electric polarizability of carbon-dioxide, farad-metre square\n",
+ "alpha = epsilon_0*chi/N; \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe total electric polarizability of carbon-dioxide =\"\n",
+ "print round((alpha*10**40),2)*10**-40,\"farad-metre square\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The atomic polarizability of oxygen = \n",
+ "6.94e-48 farad-metre square\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex14.4 Calculating electric polarizability \n",
+ " #of Oxygen atom: Page-465 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.602e-019; # Charge on an electron, coulomb\n",
+ "p = 0.5e-022; # Dipole moment of oxygen atom, C-m\n",
+ "# Distnace of the centre of negative charge cloud from the nucleus, m\n",
+ "d = 4e-017; \n",
+ "# Electrical permittivity of free space, coulomb square per newton per metre\n",
+ "epsilon_0 = 8.85e-012; \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # In equilibrium, Coulomb interaction = Lorentz force\n",
+ " # i.e. 8*e*E = (8*e)*(8*e)/(4*%math.pi*epsilon_0*d**2)\n",
+ " # Solving for E\n",
+ "# The strength of local electric field, volt per metre\n",
+ "E = 8*e/(4*math.pi*epsilon_0*d**2); \n",
+ " # As p = alpha*E, solving for alpha\n",
+ "alpha = p/E; # Atomic polarizability of oxygen, farad-metre square\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe atomic polarizability of oxygen = \"\n",
+ "print round((alpha*10**48),2)*10**-48,\"farad-metre square\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The orientational polarization of molecules in HCl vapour =\n",
+ "9.64e-07 coulomb per metre square\n",
+ "\n",
+ "The ratio of magnetic energy to the thermal energy =\n",
+ "0.000836 << 1\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex14.5 Dipolar polarization of HCl molecule: Page-470 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "k = 1.38e-023; # Boltzmann constant, J/mol/K\n",
+ "T = 300; # Temperature of the HCl vapour, kelvin\n",
+ "N = 1e+027; # Number of HCL molecuels per unit volume, per metre cube\n",
+ "# Electric field strength to which the HCL vapour is subjected, volt/m\n",
+ "E = 1e+06; \n",
+ "p = 3.46e-030; # The dipole moment of HCl molecule,C-m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# Dipolar polarizability of HCl molecule, farad-metre square\n",
+ "alpha_d = p**2/(3*k*T);\n",
+ " # As P = N*p = N*alpha_d*E\n",
+ "#Orientational or Dipolar polarization of HCl molecule,coulomb per metre square\n",
+ "P = N*alpha_d*E;\n",
+ "E_M = p*E; # Magnetic energy stored in the dipole-field system, joule\n",
+ "E_Th = k*T; # Thermal energy of the HCl molecule, joule\n",
+ "a = E_M/E_Th; # Ratio of magnetic energy to the thermal energy\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe orientational polarization of molecules in HCl vapour =\"\n",
+ "print round((P*10**7),2)*10**-7,\"coulomb per metre square\"\n",
+ "print\"\\nThe ratio of magnetic energy to the thermal energy =\"\n",
+ "print round(a,6),\" << 1\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 14.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The polarizability due to permanent dipole moment =\n",
+ "2.28e-40 farad-metre square\n",
+ "\n",
+ "The orientational polarization of ammonia at 309 K =\n",
+ "2.19e-39 farad-metre square\n",
+ "\n",
+ "The orientational polarization of ammonia at 448 K =\n",
+ "1.51e-39 farad-metre square\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex14.6 Effect of molecular deformation on polarizability:Page-471 \n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "# Polarizability of ammonia molecule at 309 K, farad-metre square\n",
+ "alpha_309 = 2.42e-039; \n",
+ "# Polarizability of ammonia molecule at 448 K, farad-metre square\n",
+ "alpha_448 = 1.74e-039; \n",
+ "k = 1.38e-023; # Boltzmann constant, J/mol/K\n",
+ "T1 = 309; # First temperature of the experiment, kelvin\n",
+ "T2 = 448; # Second temperature of the experiment, kelvin\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # As alpha = alpha_i + alpha_d = alpha_i + p**2/(3*k*T) = alpha_i + bta/T\n",
+ " # where bta = p**2/(3*k)\n",
+ " # Thus alpha_309 = alpha_i + bta/309 and alpha_448 = alpha_i + bta/448\n",
+ " # Solving for bta\n",
+ " # bta(1/309-1/448) = alpha_309 - alpha_448 \n",
+ "# bta = p**2/(3*k), farad-kelvin metre square\n",
+ "bta= ( alpha_309 - alpha_448)/(1/309 - 1/448);\n",
+ " # Solving for alpha_i\n",
+ "# Polarizability due to permanent dipole moment, farad-metre square \n",
+ "alpha_i = alpha_309 - bta/309; \n",
+ " # Polarizability due to deformation of molecules = bta/T, bta = p**2/(3*k)\n",
+ "alpha_d_309 = bta/T1# Orientational polarizability at 309 K, farad-metre square\n",
+ "alpha_d_448 = bta/T2#Orientational polarizability at 448 K, farad-metre square\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe polarizability due to permanent dipole moment =\"\n",
+ "print round((alpha_i*10**40),2)*10**-40,\" farad-metre square\" \n",
+ "print\"\\nThe orientational polarization of ammonia at 309 K =\"\n",
+ "print round((alpha_d_309*10**39),2)*10**-39,\"farad-metre square\" \n",
+ "print\"\\nThe orientational polarization of ammonia at 448 K =\"\n",
+ "print round((alpha_d_448*10**39),2)*10**-39,\" farad-metre square\" \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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Diffraction_of_Waves_and_Particles_by_Crystals.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Diffraction_of_Waves_and_Particles_by_Crystals.ipynb
new file mode 100644
index 00000000..6c9fbb25
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Diffraction_of_Waves_and_Particles_by_Crystals.ipynb
@@ -0,0 +1,1068 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: Diffraction of Waves and Particles by Crystals"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The shortest wavelength present in X-rays =\n",
+ "0.25 angstrom\n",
+ "\n",
+ "The maximum frequency present in X-rays =\n",
+ "1.2e+19 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex08.1 Determination of shortest wavelength and \n",
+ " # frequency of X-rays from accelerating potential Page-250 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "V = 50e+03; # Accelerating potential, volt\n",
+ "c = 3e+08; # Speed of light in free space\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Lambda_min = 1.24e-06/V; # Minimum wavelength, metre\n",
+ "F_max = c/Lambda_min; # Maximum frequency, Hz\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe shortest wavelength present in X-rays =\"\n",
+ "print round(Lambda_min/(1*10**-10),2),\"angstrom\"\n",
+ "print\"\\nThe maximum frequency present in X-rays =\"\n",
+ "print round((F_max*10**-19),1)*10**19,\" Hz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The number of electrons striking the target =\n",
+ "1.56e+16\n",
+ "\n",
+ "The velocity of electrons striking the target =\n",
+ "45900000.0 m/s\n",
+ "\n",
+ "The shortest wavelength present in X-rays =\n",
+ "2.07e-10 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex8.2 Calculation of impinging electrons on the target and\n",
+ "# characteristics of X-rays Page-253 (2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "\n",
+ "I = 2.5e-03; # Current through X-ray tube, ampere\n",
+ "V = 6e+03; # Potential across the X-ray tube, volt\n",
+ "e = 1.6e-19; # Charge on an electron, coulomb\n",
+ "m = 9.1e-031; # mass of an electron, kg\n",
+ "t = 1; # Transit time, second\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Q = I*t; # Total charge flowing per second through the x-ray tube, coulomb\n",
+ "n = Q/e; # Number of electrons striking the target per second\n",
+ " # We have eV = 1/2*m*v**2 (stopping potential = maximum Kinetic energy)\n",
+ " # Solving for v\n",
+ "v = (2*e*V/m)**0.5; # speed of electrons striking the target, m/s\n",
+ "Lambda_min = 1.24e-06/V; # Minimum wavelength of X-rays produced, metre\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe number of electrons striking the target =\"\n",
+ "print round((n*10**-16),2)*10**16\n",
+ "print\"\\nThe velocity of electrons striking the target =\"\n",
+ "print round((v*10**-7),2)*10**7,\"m/s\"\n",
+ "print\"\\nThe shortest wavelength present in X-rays =\"\n",
+ "print round((Lambda_min*10**10),2)*10**-10,\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The wavelength of K_alpha line =\n",
+ "0.19 angstrom\n",
+ "\n",
+ "The wavelength of K_beta line =\n",
+ "0.17 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Ex8.3 Calculation of wavelength of characteristic X-rays Page-253(2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "c = 3e+08; # Speed of light in free space, m/s\n",
+ "e = 1.602e-019; # Charge on an electron, coulomb\n",
+ "E_K = -78; # Energy of K shell for platinum, keV\n",
+ "E_L = -12; # Energy of L shell for platinum, keV\n",
+ "E_M = -3 ; # Energy of M shell for platinum, keV\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "E_K_alpha = E_L - E_K; # Energy of K_alpha line, keV\n",
+ "E_K_beta = E_M - E_K; # Energy of K_beta line, keV\n",
+ " # We have E = h*f, where f = c/Lambda this implies E = h*c/lambda\n",
+ " # Solving for Lambda\n",
+ " # Lambda = h*c/E\n",
+ "lambda_K_alpha = h*c/(E_K_alpha*e*1e+03);# Wavelength of K_alpha line, metre\n",
+ "lambda_K_beta = h*c/(E_K_beta*e*1e+03); # Wavelength of K_beta line, metre\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe wavelength of K_alpha line =\"\n",
+ "print round(lambda_K_alpha/(1*10**-10),2),\"angstrom\"\n",
+ "print\"\\nThe wavelength of K_beta line =\"\n",
+ "print round(lambda_K_beta/(1*10**-10),2),\"angstrom\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The atomic number of unknown element = 47.12\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # PythonCode Ex8.4 Calculation of atomic number of \n",
+ " #an unknown element Page-255 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "lambda_Pt = 1.321e-010; # Wavelength of L_alpha line of Pt, m\n",
+ "Z_Pt = 78; # Atomic number of platinum\n",
+ "b = 7.4; # Constant\n",
+ "lambda_x = 4.174e-010; # Wavelength of unknown element, m\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # We have f = [a*(Z-b)]**2 (Moseley's law)\n",
+ " # As f_Pt = c/lambda_Pt = [a*(Z_Pt-b)]**2 \n",
+ " # Similarly f_x = c/lambda_x = [a*(Z_x-b)]**2 \n",
+ " # Dividing f_Pt by f_x and solving for x\n",
+ "Z_x = b + (lambda_Pt/lambda_x)**0.5*(Z_Pt-b);# Atomic number of unknown element \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe atomic number of unknown element = \", round(Z_x,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The wavelength of K_alpha line of copper =\n",
+ "1427.41 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex8.5 Calculation of wavelength of copper \n",
+ " #using Moseley's law Page-256 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "c = 3.0e+08; # Speed of light, m/s\n",
+ "lambda_W = 210e-010; # Wavelength of K_alpha line of W, m\n",
+ "Z_W = 74; # Atomic number of tungsten\n",
+ "Z_Cu = 29; # Atomic number of copper\n",
+ "b = 1; # Constant for K-series\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # f_W = c/lambda_W = (a*73)**2, The frequency K_alpha line for tungsten, Hz\n",
+ " # f_Cu = c/lambda_Cu = (a*28)**2, The frequency K_alpha line for copper, Hz\n",
+ " # Dividing f_W by f_Cu and solving for lambda_Cu\n",
+ "lambda_Cu = ((Z_W-b)/(Z_Cu-b))**2*lambda_W;# Wavelength of K_alpha line of Cu,m\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe wavelength of K_alpha line of copper =\"\n",
+ "print round(lambda_Cu/(1*10**-10),2),\" angstrom\", ;\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The atomic number unknown element = 42.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex8.6 Calculation of atomic number from wavelength using\n",
+ "# Moseley's law Page-256 (2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "c = 3.0e+08; # Speed of light, m/s\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "# Absolute electrical permittivity of free space, \n",
+ "#coulomb square per newton per metre square\n",
+ "epsilon_0 = 8.85e-012;\n",
+ "m = 9.1e-031; # Mass of an electron, kg\n",
+ "e = 1.6e-019; # Charge on an electron, C\n",
+ "lamb = 0.7185e-010; # Wavelength of K_alpha line of unknown element\n",
+ "b = 1; # Mosley's constant for K-series\n",
+ "n_1 = 1; n_2 = 2; # Lower and upper energy levels\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # We know that f = c/lambda = \n",
+ " # m*e**4*(Z-b)**2/(8*epsilon_0**2*h**3)*(1/n_2**2-1/n_1**2)\n",
+ " # This implies that lambda \n",
+ " #= (8*epsilon_0**2*c*h**3/(m*e**4*(Z-b)**2*(1/n_2**2-1/n_1**2))\n",
+ " # Solving for Z\n",
+ "# Atomic number unknown element\n",
+ "Z = (8*epsilon_0**2*c*h**3/(m*e**4*lamb*(1/n_1**2-1/n_2**2)))**0.5+b;\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe atomic number unknown element =\", round( Z ) \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The wavelengths of tin and barium =\n",
+ "0.5 angstrom and \n",
+ "0.37 angstrom respectively\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex8.7 Calculation of wavelengths of tin and barium\n",
+ "# using Moseley's law Page-257 (2010)\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "\n",
+ "Z_Fe = 26; # Atomic number of iron\n",
+ "Z_Pt = 78; # Atomic number of platinum\n",
+ "Z_Sn = 50; # Atomic number of tin\n",
+ "Z_Ba = 56; # Atomic number of barium\n",
+ "b = 1; # Mosley's constant for K-series\n",
+ "lambda_Fe = 1.93e-010; # Wavelength of K_alpha line of Fe\n",
+ "lambda_Pt = 0.19e-010; # Wavelength of K_alpha line of Pt\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # From Moseley's Law,\n",
+ " # f = a*(Z-1)**2. This implies lambda = C*1/(Z-1)**2\n",
+ " # so that lambda_Fe = C*1/(Z_Fe-1)**2 and lambda_Sn = C*1/(Z_Sn-1)**2\n",
+ " # Dividing lambda_Sn by lambda_Fe and solving for lambda_Sn\n",
+ "# Wavelength of K_alpha line for tin, m\n",
+ "lambda_Sn = (Z_Fe-1)**2/(Z_Sn-1)**2*lambda_Fe;\n",
+ "# Wavelength of K_alpha line for barium, m\n",
+ "lambda_Ba = (Z_Pt-1)**2/(Z_Ba-1)**2*lambda_Pt;\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe wavelengths of tin and barium =\"\n",
+ "print round(lambda_Sn/10**-10,2),\"angstrom and \"\n",
+ "print round(lambda_Ba/10**-10,2),\" angstrom respectively\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The intensity of the X-ray transmitted through the aluminium sheet =\n",
+ "49.91 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex8.8 Percentage transmitted energy of X-rays: Page 259 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "mu = 139; # Attenuation co-efficient of aluminium, per metre\n",
+ "x = 0.005; # Thickness of aluminium sheet, m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ " # If X% is the intensity of the X-ray transmitted through the aluminium sheet,\n",
+ " # X% = I/I_0\n",
+ " # or X/100 = math.exp(-absorb_coeff*x)\n",
+ " # Solving for X\n",
+ "X = 100*math.exp(-mu*x); # Transmitted percentage of X-rays\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe intensity of the X-ray transmitted through the aluminium sheet =\"\n",
+ "print round(X,2),\"percent\" \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The thickness of lead piece = 0.000522 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python code Ex8.9 : Determination of thickness of lead piece \n",
+ " #by using two equal intensity X-ray wavelengths : Page 259 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ " \n",
+ "lambda_1 = 0.064e-010; # First wavelength of X-ray, metre\n",
+ "lambda_2 = 0.098e-010; # Second wavelength of X-ray, metre\n",
+ "I1_ratio_I2 = 3; # Ratio of attenuated beam intensity\n",
+ " # Mass absorption coefficient for first wavelength, metre square per kg\n",
+ "mu_m1 = 0.164; \n",
+ "# Mass absorption coefficient for second wavelength, metre square per kg\n",
+ "mu_m2 = 0.35;\n",
+ "d = 0.164; # Density of the lead, kg per metre cube\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# absorption co-efficient of the lead for first wavelength, per metre\n",
+ "mu1 = mu_m1*d;\n",
+ "# absorption co-efficient of the lead for second wavelength, per metre\n",
+ "mu2 = mu_m2*d;\n",
+ " # Declare 'x' as the thickness variable\n",
+ " # Now I = math.exp(-ac*x) thus\n",
+ " # I1_ratio_I2 = math.exp(-ac_1*x)/math.exp(-ac_2*x)\n",
+ " # or 3 = math.exp(2109.24)*x this implies\n",
+ " # 2104.24*x = math.log(3) and assume\n",
+ "x=math.log(3)/2104.24;\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe thickness of lead piece =\",round((x*10**4),2)*10**-4,\"m\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Theta 1 = 4 degree(s), 29 minute(s)\n",
+ "\n",
+ "Theta 2 = 8 degree(s), 59 minute(s)\n",
+ "\n",
+ "Theta 3 = 13 degree(s), 33 minute(s)\n",
+ "\n",
+ "Theta 4 = 18 degree(s), 13 minute(s)\n",
+ "\n",
+ "Theta 5 = 23 degree(s), 0 minute(s)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python code Ex8.10: Determining angle of reflection \n",
+ " #by using wavelength of X-ray Page 261 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "lamb = 0.440e-010; # Wavelength of X-rays, m\n",
+ "d = 2.814e-010; # Interplanar spacing of rocksalt crystal, m\n",
+ "\n",
+ "\n",
+ "#Calculation and Result\n",
+ "\n",
+ "# 2*d*sin(theta)= n*lambda **Bragg's law, n is the order of diffraction\n",
+ " # Solving for theta, we have\n",
+ " # For converting angle into degrees and minutes\n",
+ "de=[]\n",
+ "m=[]\n",
+ "de.append(0)\n",
+ "m.append(0)\n",
+ "for n in range(1,6): # For diffraction order from 1 to 5\n",
+ "# Bragg's angle\n",
+ " theta = math.asin(n*lamb/(2*d))\n",
+ " de.append( int(math.degrees(theta)));\n",
+ " m.append((math.degrees(theta)-int(math.degrees(theta)))*60)\n",
+ " print\"\\nTheta\",n,\" = \",de[n],\" degree(s),\",int(m[n]),\"minute(s)\"\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The first four wavelengths of diffracted beam are:\n",
+ "\n",
+ "Lambda 1 = 0.88 angstrom\n",
+ "\n",
+ "Lambda 2 = 0.44 angstrom\n",
+ "\n",
+ "Lambda 3 = 0.29 angstrom\n",
+ "\n",
+ "Lambda 4 = 0.22 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python code Ex8.11: Determining the wavelength of\n",
+ "# diffracted X-rays Page 262 (2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "d = 2.814e-010; # Interplanar spacing of rocksalt crystal, m\n",
+ "theta = 9; # Bragg's angle, degree\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculations and Results\n",
+ "\n",
+ "# 2*d*sin(theta) = n*lambda **Bragg's law, n is the order of diffraction\n",
+ " # Solving for lambda, we have\n",
+ "\n",
+ "print\"\\nThe first four wavelengths of diffracted beam are:\"\n",
+ "for n in range(1,5): # For diffraction order from 1 to 5\n",
+ "# Wavelength of X-rays, m\n",
+ " lamb = 2*d*math.sin(math.radians(theta))/n \n",
+ " if (lamb >= 0.2e-010 or lamb <= 1.0e-010):\n",
+ " print\"\\nLambda\",n,\" = \",round(lamb/(1*10**-10),2),\" angstrom\"\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The reciprocal lattice vectors are:\n",
+ " a_prime =\n",
+ "2.42 per angstrom and b_prime =\n",
+ "1.45 per angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python code Ex8.12: Reciprocal lattice parameters from\n",
+ "# 2-D direct lattice parameters Page 277 (2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "a = 3e-010; # First lattice parameter of direct lattice\n",
+ "b = 5e-010; # Second lattice parameter of direct lattice\n",
+ "theta = 60; # Angle between two lattice vectors of the direct lattice\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# if a_prime and b_prime are the lattice vectors for the reciprocal lattice, \n",
+ " # a_prime*a = 2*%math.pi and a_prime*b = 0 \n",
+ " # Similarly, b_prime*b = 2*%math.pi and b_prime*a = 0\n",
+ " # Solving for a_prime and b_prime, we have\n",
+ " # Lattice vector for reciprocal lattice, per metre\n",
+ "a_prime = 2*math.pi/(a*math.cos(math.radians(90-theta))); \n",
+ "# Lattice vector for reciprocal lattice, per metre\n",
+ "b_prime = 2*math.pi/(b*math.cos(math.radians(90-theta))); \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe reciprocal lattice vectors are:\\n a_prime =\"\n",
+ "print round(a_prime*1e-010,2),\"per angstrom and b_prime =\"\n",
+ "print round(b_prime*1e-010,2),\" per angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The Bragg angles and the indices of diffraction \n",
+ " for the three lowest powder lines are:\n",
+ "\n",
+ "d[ 1 1 1 ] =\n",
+ "3.46e-10 and theta\n",
+ "[ 1 1 1 ] = 12 deg 50.58 min\n",
+ "\n",
+ "d[ 2 0 0 ] =\n",
+ "3e-10 and theta\n",
+ "[ 2 0 0 ] = 14 deg 52.34 min\n",
+ "\n",
+ "d[ 2 2 0 ] =\n",
+ "2.12e-10 and theta\n",
+ "[ 2 2 0 ] = 21 deg 17.0 min\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python code Ex8.13: Bragg angle and the indices of \n",
+ "# diffraction of Powder Lines Page 285 (2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "n = 1; # Cosider first order diffraction\n",
+ "a = 6e-010; # First lattice parameter of direct lattice, m\n",
+ " # Wavelength used in diffraction of X-rays by Powder Method, m\n",
+ "lamb = 1.54e-010; \n",
+ " # Declare a function for converting angle into degrees and minutes\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculations and Results\n",
+ "\n",
+ " # Calculate the hkl and hence interpalnar spacing \n",
+ "# 'd' for three lowest powder lines\n",
+ "print\"\\nThe Bragg angles and the indices of diffraction \"\n",
+ "print\" for the three lowest powder lines are:\"\n",
+ "for h in range (0,3):\n",
+ " p=(h%2)\n",
+ " for k in range (0,3):\n",
+ " q=(k%2)\n",
+ " for l in range (0,2):\n",
+ " r=(l%2)\n",
+ " if (((p==1 and q==1 and r==1))or((p==0 and q==0 and r==0))):\n",
+ " if (h <> 0):\n",
+ " N = h**2+k**2+l**2;\n",
+ " d=(a/(N)**0.5);\n",
+ " # Interplanar spacing, metre\n",
+ " theta = math.asin(n*lamb/(2*d));\n",
+ " de=( int(math.degrees(theta)));\n",
+ " m=((math.degrees(theta)-int(math.degrees(theta)))*60)\n",
+ " # Call conversion function\n",
+ " print \"\\nd[\",h, k, l,\"] =\"\n",
+ " print round((d*10**10),2)*10**-10,\"and theta\"\n",
+ " print\"[\", h, k, l,\"] =\",de,\" deg\",round(m,2),\" min\"\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The minimum distance from the centre of the Laue pattern \n",
+ "at which reflections can occur from the planes of maximum spacing =\n",
+ "0.48 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python code Ex8.14: Minimum distance from the centre of the Laue pattern \n",
+ " #of an fcc crystal Page 289 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "n = 1; # Consider the first order diffraction\n",
+ "a = 4.5e-010; # Lattice parameter for fcc lattice, m\n",
+ "V = 50e+03; # Potential difference across the X-ray tube, volt\n",
+ "D = 5; # Crystal to film distance, cm \n",
+ "h = 1 ; # Incides for the planes of maximum spacing\n",
+ "k = 1 \n",
+ "l = 1\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "lambda_min = 1.24e-06/V; # The cut-off wavelength of X-rays, m\n",
+ "d_111 = a/(h**1+k**2+l**2)**0.5;\n",
+ "theta_111 = math.asin(n*lambda_min/(2*d_111));\n",
+ " # As tan(2*theta_111) = x/D, solving for x\n",
+ "x = D*math.tan((2*theta_111));#Minimum distance from the centre of Laue pattern\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe minimum distance from the centre of the Laue pattern \"\n",
+ "print\"at which reflections can occur from the planes of maximum spacing =\"\n",
+ "print round(x,2),\"cm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The unit cell height of the crystal =\n",
+ "16.01 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python code Ex8.15: Calculating unit cell height along the axis \n",
+ " #of a rotation photograph Page 291 (2010)\n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ " \n",
+ "n = 1; # Consider the first order diffraction of X-rays\n",
+ " # An array of heights of first six layers above(below) the zero layer, cm\n",
+ "S = [0.29,0.59,0.91,1.25,1.65,2.12];\n",
+ "R = 3; # Radius of the camera, cm\n",
+ "lamb = 1.54e-08; # Wavelength of the X-rays, cm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # For an a-axis rotation photograph, the unit cell parameter is given by\n",
+ " # a = n*lambda/S(n)*(R**2 + S(n)**2)**(1/2) \n",
+ " # Calculate 'a' for six different values of n from 1 to 6\n",
+ "a=[]\n",
+ "for f in range(0,6):\n",
+ " a.append((n*lamb/S[f])*(R**2 + S[f]**2)**(1/2));\n",
+ " \n",
+ " \n",
+ "#Result \n",
+ "\n",
+ "print\"\\nThe unit cell height of the crystal =\"\n",
+ "print round(a[0]/(1*10**(-8)),2),\"angstrom\", \n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The effective temperature of neutrons = 168.82 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python code Ex8.16: Diffraction of thermal neutrons from planes\n",
+ "# of Ni crystal Page 294 (2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "\n",
+ "k = 1.38e-023; # Boltzmann constant, J/mol/K\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "theta = 28.5; # Bragg's angle, degree\n",
+ "a = 3.52e-010; # Lattice parameter of fcc structure of nickel, m\n",
+ "m_n = 1.67e-027; # Rest mass of neutron, kg\n",
+ "\n",
+ "#Calcultion\n",
+ "\n",
+ " # For fcc lattice, the interplanar spacing is given by\n",
+ "d = a/(3)**0.5; # Interplanar spacing of Ni, m\n",
+ " # Bragg's equation for first order diffraction (n = 1) is\n",
+ "lamb = 2*d*math.sin(math.radians(theta)); # Bragg's law, m\n",
+ " # From kinetic interpretaion of temperature, we have\n",
+ " # (1/2)*m*v**2 = (3/2)*k*T -- (a)\n",
+ " # Further from de-Broglie relation\n",
+ " # lambda = h/(m*v) -- (b)\n",
+ " # From (a) and (b), solving for T, we have\n",
+ "T = h**2/(3*m_n*k*lamb**2); # Effective temperature of the neutrons, K\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe effective temperature of neutrons =\",round(T,2),\"K\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 8.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The Bragg angle for electron diffraction = 19 deg 50.68 min\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python code Ex8.17:Diffraction of electrons from fcc crystal planes Page 295\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ " # Declare a function for converting angle into degrees and minutes\n",
+ "\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "m = 9.1e-031; # Rest mass of electron, kg\n",
+ "e = 1.602e-019; # charge on an electron, coulomb\n",
+ "a = 3.5e-010; # Lattice parameter of fcc crystal, m\n",
+ "V = 80; # Accelerating potential for electrons, volt\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "lamb = h/(2*m*e*V)**0.5; # de-Broglie wavelength of electrons, m\n",
+ "d_111 = a/(3)**0.5; # Interplanar spacing for (111) planes of fcc crystal, m\n",
+ " # Bragg's equation for first order diffraction (n = 1) is\n",
+ " # lambda = 2*d_111*math.sin(math.degrees(theta_111)); // Bragg's law, m\n",
+ "theta_111 = math.asin(lamb/(2*d_111)); # Bragg's angle, degree\n",
+ "de=( int(math.degrees(theta_111)));\n",
+ "# Call conversion function\n",
+ "m=((math.degrees(theta_111)-int(math.degrees(theta_111)))*60) \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe Bragg angle for electron diffraction =\",de,\"deg\",round(m,2),\"min\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Free_Electrons_in_Crystals.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Free_Electrons_in_Crystals.ipynb
new file mode 100644
index 00000000..f362bb50
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Free_Electrons_in_Crystals.ipynb
@@ -0,0 +1,926 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Free Electrons in Crystals"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The quantum number described by this motion is:\n",
+ "3.02e+16\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "# PythonEx10.1 Particle Moving in One-Dimensional Potential Well:Page-328(2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "a = 10**-3; #Separation between the walls of the well, m\n",
+ "m = 10**-9; # Mass of the dust particle, kg\n",
+ "t = 100; # Average time for successive collisons with the wall, s\n",
+ "h = 6.626*10**-34; # Plank's constant, Js\n",
+ "\n",
+ "\n",
+ "#Calculate\n",
+ "\n",
+ "v = a/t; # Velocity of the particle inside the potential well, m/s\n",
+ "E = 1/2*m*v**2; # Kinetic energy of the particle, J\n",
+ " # For one-dimensional potential well, the energy eigen value is given by\n",
+ " # E = h**2*n**2/(8*m*a**2)\n",
+ " # Solving for n \n",
+ "# Quantum number corresponding to the energy eigen value E\n",
+ "n =((8*m*a**2*E)/h**2)**0.5\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The quantum number described by this motion is:\"\n",
+ "print round((n*10**-16),2)*10**16\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The lowest energy of an electron confined to move \n",
+ "in a 3D-potential box, in eV, is : 452.31\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 10.2 Motion of a ground state Electron \n",
+ " #in a 3-D Potential Well: Page-329 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "a = 0.5*10**-10; # length of the potential box, m\n",
+ "h = 6.626*10**-34; # Plank's Constant, Js\n",
+ "m = 9.1*10**-31; # Mass of an Electron, kg\n",
+ " # In 3-D, the three quantum numbers nx, ny and nz each will have \n",
+ " #value equal to 1 for lowest energy state\n",
+ "nx = 1; # Quantum number corresponding to x-direction\n",
+ "ny = 1; # Quantum number corresponding to y-direction \n",
+ "nz = 1; # Quantum number corresponding to z-direction\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "EG = h**2*(nx**2+ny**2+nz**2)/(8*m*a**2);# Energy eigen value for 3-D potential,\n",
+ "EeV = EG/(1.6*10**-19); # Convert energy from joule to eV\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The lowest energy of an electron confined to move \"\n",
+ "print\"in a 3D-potential box, in eV, is : \",round(EeV,2)\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The first excited state energy of the electron confined \n",
+ "to move in a 3D-potential box, in eV, is : 226.15\n",
+ "The temperature at which the average energy becomes equal to \n",
+ "first excited state energy, in K, is : 1748044.12\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 10.3 Motion of an Electron excited next to \n",
+ " #the ground state in a 3-D Potential Well: Page-329 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "a = 1*10**-10; # length of the cubic potential box, m\n",
+ "h = 6.626*10**-34; # Plank's Constant, Js\n",
+ "m = 9.1*10**-31; # Mass of an Electron, kg\n",
+ "k = 1.38*10**-23; # Boltzmann Constant, J/mol-K\n",
+ " # In 3-D, the three quantum numbers nx, ny and nz will have values \n",
+ " #1, 1 and 2 respectively for first excited energy state \n",
+ "nx = 1; # Quantum number corresponding to x-direction\n",
+ "ny = 1; # Quantum number corresponding to y-direction \n",
+ "nz = 2; # Quantum number corresponding to z-direction\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # Energy eigen value for 3-D potential for first excited state, J\n",
+ "EE = h**2*(nx**2+ny**2+nz**2)/(8*m*a**2); \n",
+ " # As EE(next to the lowest) = 3/2 (k/T), where T is the absolute temperature\n",
+ " # Solving for T \n",
+ "#Absolute temperature at which energy next to the lowest energy state \n",
+ "T = 2/3*1/k*EE; \n",
+ "EeV = EE/(1.6*10**-19); # Convert energy from joule to eV\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The first excited state energy of the electron confined \" \n",
+ "print\"to move in a 3D-potential box, in eV, is : \",round(EeV,2)\n",
+ "print \"The temperature at which the average energy becomes equal to \"\n",
+ "print\"first excited state energy, in K, is : \",round(T,2)\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The 2 set(s) of values of quantum number are : \n",
+ "\n",
+ "\n",
+ "nx= 1 ny= 1 nz= 6 \n",
+ "\n",
+ "\n",
+ "nx= 2 ny= 3 nz= 5 \n",
+ "\n",
+ "\n",
+ "The given energy level is 9.0 -fold degenerate.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 10.4 Degeneracy of Energy Level: Page-332 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration and Calculation\n",
+ "\n",
+ "\n",
+ " # Function to find the factorial of a number\n",
+ "def fact(num):\n",
+ " f = 1;\n",
+ " for i in range(1,num+1):\n",
+ " f = f*i;\n",
+ " return f\n",
+ " # Fucntion to determine degenerate energy states\n",
+ "def degno(a, b, c):\n",
+ " ash=[]\n",
+ " ash.append(a-b)\n",
+ " ash.append(b-c)\n",
+ " ash.append(c-a)\n",
+ " sm=0\n",
+ " for c in range(3):\n",
+ " if ash[c]==0:\n",
+ " sm=sm+1\n",
+ " if sm==3: # check if all the values are same\n",
+ " degeneracy = 3;\n",
+ " degstates = fact(3)/fact(degeneracy); #calculate degenerate states\n",
+ " return degstates\n",
+ " if sm==1: # check if any two values are equal\n",
+ " degeneracy = 2;\n",
+ " degstates = fact(3)/fact(degeneracy); #calculate degenerate states\n",
+ " return degstates\n",
+ " if sm==0: # check if all the values are different\n",
+ " degeneracy = 1;\n",
+ " degstates = fact(3)/fact(degeneracy); #calculate degenerate states\n",
+ " return degstates\n",
+ "coef = 38; # Coefficient of H**2/(8*m*a**2)\n",
+ "nx=[] # Quantum number corresponding to x-direction\n",
+ "ny=[] # Quantum number corresponding to y-direction \n",
+ "nz=[] # Quantum number corresponding to z-direction\n",
+ "deg=[] # Variable to store the degeneracy of states\n",
+ "\n",
+ "count = 1; # set the counter \n",
+ "suum = 0; # initialize the sum\n",
+ " # Look for all the possible set of values for nx, ny and ny\n",
+ "for i in range (1,10): \n",
+ " for j in range (1,10):\n",
+ " for k in range (1,10):\n",
+ "# Check for the condition and avoid repetition of set of values\n",
+ " if ((i**2+j**2+k**2==coef) and (i+j+k) > suum): \n",
+ " nx.append(i); # Save current i value\n",
+ " ny.append(j); # Save current j value\n",
+ " nz.append(k); # Save current k value\n",
+ " # Save degeneracy for given set of values\n",
+ " deg.append(degno(i, j, k));\n",
+ " count = count + 1; # Increment the counter\n",
+ " suum = i + j + k; # Add the three values of quantum numbers\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"\\nThe\", count-1,\" set(s) of values of quantum number are : \\n\"\n",
+ "deg_states = 0; # Intialize the variable\n",
+ "for i in range(0,count-1):\n",
+ " print \"\\nnx=\",nx[i],\" ny=\",ny[i],\" nz=\",nz[i],\" \\n\" \n",
+ " deg_states=deg_states+deg[i]\n",
+ " # Accumulate the degeneracy\n",
+ "\n",
+ "print \"\\nThe given energy level is \",deg_states,\"-fold degenerate.\" \n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The fermi energy in zinc at absolute zero,in eV, is : 11.11\n",
+ "The average energy of an electron at 0K,in eV, is : 6.67\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " #Python Code Ex 10.5 Fermi energy of zinc at absolute zero: Page-335 (2010)\n",
+ " \n",
+ " \n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "d = 7.13*10**+3; # Density of Zn, in kg per m cube\n",
+ "M = 65.4*10**-3; # Atomic weight of Zn, kg/mol\n",
+ "me = 9.1*10**-31; # Mass of an electron, kg\n",
+ "v = 2; # valency of divalent (Zn) metal\n",
+ "N = 6.023*10**+23; # Avogadro's Number\n",
+ "h = 6.626*10**-34; #Plank's constant, in Js\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "meff = 0.85*me; # Effective mass of the electron in zinc, kg\n",
+ "n = v*d*N/M; # Number of electrons per unit volume\n",
+ " #Fermi energy in zinc at absolute zero, J\n",
+ "Ef = h**2/(2*meff)*(3*n/(8*math.pi))**(2/3); \n",
+ "EfeV = Ef/(1.6*10**-19); # Fermi energy in eV\n",
+ "Ebar = (3/5)*EfeV; # Average energy of an electron at 0K, eV\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The fermi energy in zinc at absolute zero,in eV, is : \",round(EfeV,2)\n",
+ "print \"The average energy of an electron at 0K,in eV, is : \",round(Ebar,2)\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The temperature at which the given probability is expected, in K, is :\n",
+ "290.22\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 10.6 Electron probability above Fermi energy: Page-336 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "k = 1.38*10**-23; # Boltzmann constant, in J/mol-K\n",
+ "FD = 0.10; # Fermi-Dirac distribution probability for electrons\n",
+ "Efermi = 5.5; # Fermi Energy of silver, in eV\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "E = Efermi + 0.01*Efermi; # Allowed energy for electrons\n",
+ "dE = E - Efermi; #Deviation of allowed energy from Fermi energy, in eV\n",
+ "DEeV = dE*1.6*10**-19; #Convert into joule\n",
+ " # The Fermi-Dirac distribution function as at any temperature T is given by\n",
+ " # F(E) = FD = 1/(math.exp((E-Efermi)/kT)+1\n",
+ " # Solving for T \n",
+ "# Absolute temperature at which result follows, in K\n",
+ "T = DEeV/(k*math.log(1/FD-1));\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The temperature at which the given probability is expected, in K, is :\"\n",
+ "print round(T,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Electronic specific heat at 4K, in J/mol/K is : 0.002\n",
+ "The Electronic specific heat at 100K, in J/mol/K is : 0.15\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " #Python Code Ex 10.7 The Electroic Specific Heat of Cu: Page-341 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "k = 1.38*10**-23; #Boltzmann constant, in J/mol-K\n",
+ "N = 6.023*10**+23; # Avogadro's Number\n",
+ "Efermi = 7.05; # Fermi energy of copper, in eV\n",
+ "EFeV = Efermi*1.6*10**-19; # Fermi energy conversion, in J\n",
+ "T1 = 4; #Lower value of temperature, in K\n",
+ "T2 = 300; #Upper value of temperature, in K\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Ce4 = (math.pi**2*k**2*T1)/(2*EFeV)*N#Electronic specific heat at 4K, J/mol/K\n",
+ "Ce100 = (math.pi**2*k**2*T2)/(2*EFeV)*N#Electronic specific heat at 100K, \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The Electronic specific heat at 4K, in J/mol/K is :\",round(Ce4,3)\n",
+ "print \"The Electronic specific heat at 100K, in J/mol/K is :\",round(Ce100,2)\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Electrical resistivity at 0degree 4.62e-08 ohm metre\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " #Python Code Ex 10.8 The Electrical Resistivity: Page-343 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "tau=3*10**-14#Classical value of mean free time\n",
+ "n=2#BCC structure\n",
+ "e=1.6*10**-19\n",
+ "m=9.1*10**-31\n",
+ "R=1.85*10**-10\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "a=(4/(3)**0.5)*R\n",
+ "ne=n/(a)**3 # number of electrons per unit volume\n",
+ "ro=m/(ne*(e*e)*tau)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"Electrical resistivity at 0degree\",round((ro*10**8),2)*10**-8,\"ohm metre\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The current density of electrons in copper,in ampere per metre square,\n",
+ "4973592.0\n",
+ "The drift velocity of electrons in copper, in metre per second, \n",
+ "0.0004\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 10.9 Electrical Conductivity of Cu: Page-345 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.6*10**-19; # Electronic charge, C\n",
+ "N = 6.023*10**+23; # Avogardro's number\n",
+ "d = 8920; # Density of Copper, kg per metre cube\n",
+ "A = 63.5; # Atomic weight of copper, g/mole\n",
+ "I = 10; # Current through uniform copper wir, A\n",
+ "D = 16*10**-4; #Diameter of circular cross-section of copper wire, m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R = D/2; # Radius of circular cross-section of copper wire, m\n",
+ "# The number of electrons per unit volume in copper, per metre cube\n",
+ "n = d*N/63.5*1*10**+3; \n",
+ " # Current density of electrons in copper, ampere per metre square\n",
+ "J = I/(math.pi*R**2);\n",
+ "vd = J/(n*e); # Drift velocity of electrons in copper, metre per second\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The current density of electrons in copper,in ampere per metre square,\"\n",
+ "print round(J)\n",
+ "print \"The drift velocity of electrons in copper, in metre per second, \"\n",
+ "print round(vd,4)\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The mobility of electron through silver, in metre square per V-s, is \n",
+ "0.01\n",
+ "The average drift velocity of electrons, in m/s, is : \n",
+ "0.7\n",
+ "The average drift velocity of electrons, in m/s, is \n",
+ "3.98e-14\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 10.10 Electron mobility inside conductors : Page-346 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ " \n",
+ "e = 1.6*10**-19; # Electronic charge, in C\n",
+ "m = 9.1*10**-31; # Eelctronic mass, in kg\n",
+ "res = 1.54*10**-8; # Electrical resistivity of silver, in ohm metre\n",
+ "E = 100; # Electric field applied along the length of the wire, V/m\n",
+ "n = 5.8*10**+28;#Number of conduction electrons per unit volume, per metre cube\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "mu = 1/(res*n*e);#Mobility of electron through silver,metre square per volt-sec\n",
+ "vd = mu*E; # Average drift velocity of electrons, m/s\n",
+ "t = mu*m/e; # Relaxation time of the electron, s\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The mobility of electron through silver, in metre square per V-s, is \"\n",
+ "print round(mu,2)\n",
+ "print \"The average drift velocity of electrons, in m/s, is : \"\n",
+ "print round(vd,2)\n",
+ "print \"The average drift velocity of electrons, in m/s, is \"\n",
+ "print round((t*10**14),2)*10**-14"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The experimetal value of Lorentz number,in watt ohm per kelvin square,:\n",
+ "2.26e-08\n",
+ "The theoretical value of Lorentz number,in watt ohm per kelvin square,\n",
+ "2.45e-08\n",
+ "\n",
+ "The theoretical value of Lorentz number is 1.08\n",
+ "times higher than the experimental one.\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 10.11 Lorentz number calculation of a solid: Page-347 (2010)\n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.6*10**-19; # Electronic charge, in C\n",
+ "k = 1.38*10**-23; # boltzmann constant, J/mol-K\n",
+ "T = 293; # Absolute temperature of the solid\n",
+ "K = 390; # Thermal conductivity of copper at 293 K, W/m-K\n",
+ "l = 0.5; # Lenght of the copper wire, m\n",
+ "d = 0.3*10**-3; # Diameter of cross-section of Cu, m\n",
+ "r = d/2; # Radius of copper wire, m\n",
+ "R = 0.12; # Resistance of copper wire, ohm\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # As R = 1/con*l/(%math.pi*r**2)\n",
+ " # Solving for R\n",
+ "con = l/(math.pi*r**2*R); # Conductance of copper, per ohm per metre\n",
+ "#The Lorentz number is defined as the ratio of the Thermal conductivity to the \n",
+ " # Electrical conductivity of a solid per degree rise in temperature\n",
+ " # Experimental value of Lorentz number, watt ohm per kelvin square\n",
+ "Lexp = K/(con*T);\n",
+ " # Thoeretical value of Lorentz number value, watt ohm per kelvin square\n",
+ "Lth = math.pi**2/3*(k/e)**2;\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The experimetal value of Lorentz number,in watt ohm per kelvin square,:\"\n",
+ "print round((Lexp*10**8),2)*10**-8\n",
+ "print\"The theoretical value of Lorentz number,in watt ohm per kelvin square,\"\n",
+ "print round((Lth*10**8),2)*10**-8\n",
+ "print\"\\nThe theoretical value of Lorentz number is\",round(Lth/Lexp,2)\n",
+ "print\"times higher than the experimental one.\\n\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The percentage increase in the resistivity of nichrome is\n",
+ "7.0 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 10.12 Increase in electrical resistivity \n",
+ "# of a metal with temperature: Page-349 (2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration and calculation\n",
+ "\n",
+ "\n",
+ "def final_res(T):\n",
+ " alpha=0.0001 # Temperature co-efficient of resistance\n",
+ " res=0 # Initial resistivity of the nichrome which is an arbitray \n",
+ "#constant and can be taken to be zero\n",
+ " res = res + alpha*T;#Final resistivity of the nichrome as function of T \n",
+ " return res\n",
+ "T1 = 300; # Initial temperature of nichrome, K\n",
+ "T2 = 1000; # Final temperature of nichrome, K\n",
+ "res300 = final_res(T1); # Final resistivity of the nichrome at 300 K \n",
+ "res1000 = final_res(T2) # Final resistivity of the nichrome at 1000 K \n",
+ "percent_res = (res1000 - res300)*100;# Percentag increase in resistivity \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ " \n",
+ "print\"\\nThe percentage increase in the resistivity of nichrome is\"\n",
+ "print round(percent_res,2),\" percent\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The electric current due to thermionic emission, in A, is : 0.04\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # PythonCode Ex 10.13 Thermionic emission of a filament: Page-352 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.6*10**-19; # Electronic charge, C\n",
+ "m = 9.1*10**-31; # Mass of the electron, kg\n",
+ "k = 1.38*10**-23; # Boltzmann constant, J/mol-K\n",
+ "h = 6.626*10**-34; # Plank's constant, Js\n",
+ "W = 4.5; # Work function of tungsten filament, eV\n",
+ "D = 1*10**-4; # Diameter of the filament, m\n",
+ "r = D/2; # Radius of the filament, m\n",
+ "T = 2400; # Temperature of the filament, K\n",
+ "l = 0.05; # Length of the filament, m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "A = 4*math.pi*e*m*k**2/h**3; # A constant expressed in ampere per metre square \n",
+ " # per kelvin square\n",
+ "a = 2*math.pi*r*l; # Surface area of the filament, meter square\n",
+ "J = A*T**2*math.exp(-e*W/(k*T)); # Electronic current density of the filament, \n",
+ " # ampere per metre square\n",
+ "I = a*J; # Electric current due to thermionic emission, ampere\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The electric current due to thermionic emission, in A, is : \",round(I,2)\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 10.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Hall coefficient of sodium , in metre cube per coulomb, is : \n",
+ "2.45e-09\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex 10.14 Hall coefficient calculation of sodium based on \n",
+ " #free electron model: Page-353 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.6*10**-19; # Electronic charge, C\n",
+ "a = 4.28*10**-10; # lattice parameter of the unit cell of sodium crystal, m\n",
+ "N = 2; # Number of atoms per unit cell in bcc structure of sodium \n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "n = N/a**3;# Number of electrons per unit volume for the sodium crystal, \n",
+ "RH = -1/(n*e); # Hall coefficient of sodium, metre cube per coulomb\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The Hall coefficient of sodium , in metre cube per coulomb, is : \"\n",
+ "print -round((RH*10**10),2)*10**-9\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Lattice_or_Atomic_Vibrations.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Lattice_or_Atomic_Vibrations.ipynb
new file mode 100644
index 00000000..e3de05b3
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Lattice_or_Atomic_Vibrations.ipynb
@@ -0,0 +1,231 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Lattice or Atomic Vibrations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 7.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The cut-off frequency for the linear lattice of a solid = 5e+12 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex7.1 Cut-off frequency of \n",
+ " #the linear lattice of a solid: Page-238 (2010)\n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "v = 3e+03; # Velocity of sound in the solid, m/s\n",
+ "a = 3e-010; # Interatomic distance, m\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ " # As cut-off frequency occurs at k = %math.pi/a and\n",
+ "# k = 2*%math.pi/lambda, this gives\n",
+ "lamb = 2*a; # Cut-off wavelength for the solid, m\n",
+ "f = v/lamb; # Cut-off frequency (v = f*lambda) for the linear lattice, hertz\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe cut-off frequency for the linear lattice of a solid =\",f,\"Hz\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 7.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The frequency of sound waves in a monoatomic lattice =\n",
+ "6.28e+12 rad/sec\n",
+ "\n",
+ "\n",
+ "The frequency of acoustic waves wave in a diatomic lattice :\n",
+ " \n",
+ "0 rad/sec for k = 0 \n",
+ " \n",
+ "4e+12 rad/sec k = 6283185307.0\n",
+ "\n",
+ "\n",
+ "The frequency of optical swaves wave in a diatomic lattice :\n",
+ " \n",
+ "5.66e+12 rad/sec for k = 0 \n",
+ " \n",
+ "4e+12 rad/sec for k = 6283185307.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex7.2 Comparison of frequency of waves in \n",
+ " #a monoatomic and diatomic linear systems: Page-238 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "a = 2.5e-010; # Interatomic spacing between two identical atoms, m\n",
+ "v_0 = 1e+03; # Velocity of sound in the solid, m/s\n",
+ "lamb = 10e-010; # Wavelength of the sound wave, m\n",
+ "omega_min = 0; # Angular frequency of acoustic waves at k = 0, rad per sec\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation and Results\n",
+ "\n",
+ "# Angular frequency of sound wave in a monoatomic lattice, rad per sec\n",
+ "omega = v_0*2*math.pi/lamb; \n",
+ "print\"\\nThe frequency of sound waves in a monoatomic lattice =\"\n",
+ "print round((omega*10**-12),2)*10**12,\"rad/sec\"\n",
+ " # For acoustic waves in a diatomic lattice (M = m), \n",
+ "#the angular frequency, omega = 0 at k = 0 and\n",
+ " # omega = (2*K/m)**(1/2) --- (i) at k = %math.pi/(2*a)\n",
+ " # As v0 = a*(2*K/m)**(1/2) --- (ii)\n",
+ " # From (i) and (ii), we have\n",
+ "# Angular frequency of acoustic waves at k = %math.pi/(2*a), rad per sec\n",
+ "omega_max = v_0/a; \n",
+ "print\"\\n\\nThe frequency of acoustic waves wave in a diatomic lattice :\\n \"\n",
+ "print omega_min,\" rad/sec for k = 0 \\n \"\n",
+ "print omega_max,\" rad/sec k = \", round(math.pi/(2*a)) \n",
+ " # For optical waves in a diatomic lattice (M = m), the angular frequency \n",
+ " # omega = sqrt(2)*(2*K/m)**(1/2) --- (iii) at k = 0\n",
+ " # As v0 = a*(2*K/m)**(1/2) --- (iv)\n",
+ " # From (iii) and (iv), we have\n",
+ " # Angular frequency of optical waves at k = 0, rad per sec\n",
+ "omega_max = (2)**0.5*v_0/a; \n",
+ " # For optical waves in a diatomic lattice (M = m), the angular frequency \n",
+ " # omega = (2*K/m)**(1/2) --- (iii) at k = %math.pi/(2*a)\n",
+ " # As v0 = a*(2*K/m)**(1/2) --- (iv)\n",
+ " # From (iii) and (iv), we have\n",
+ "# Angular frequency of optical waves at k = %math.pi/(2*a), rad per sec\n",
+ "omega_min = v_0/a; \n",
+ "print\"\\n\\nThe frequency of optical swaves wave in a diatomic lattice :\\n \"\n",
+ "print round((omega_max*10**-12),2)*10**12,\" rad/sec for k = 0 \\n \"\n",
+ "print omega_min,\" rad/sec for k =\",round( math.pi/(2*a) ) \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 7.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The wavelength at which the electromagnetic radiation is\n",
+ " strongly reflected by the crystal = 3.88e-05 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex7.3 Reflection of electromagentic radiation\n",
+ "# from a crystal: Page-239(2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ " \n",
+ "\n",
+ "c = 3.0e+08; # Speed of electromagnetic wave in vacuum, m/s\n",
+ "a = 5.6e-010; # Lattice parameter of NaCl crystal, m\n",
+ "# Modulus of elasticity along [100] direction of NaCl, newton per metre square\n",
+ "Y = 5e+010; \n",
+ "m = 23; # Atomic weight of sodium, amu\n",
+ "M = 37; # Atomic weight of chlorine, amu\n",
+ "amu = 1.67e-027; # Kg equivalent of 1 amu\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# Force constant of springs when the extension along\n",
+ "# [100] direction is neglected, N/m\n",
+ "K = a*Y; \n",
+ "# The max. angular frequency of the reflected e.m. radiation, rad per sec\n",
+ "omega_plus_max = (2*K*(1/(M*amu)+1/(m*amu)))**(1/2);\n",
+ " # The wavelength at which the e.m. radiation is strongly reflected, m\n",
+ "lamb = 2*math.pi*c/omega_plus_max; \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe wavelength at which the electromagnetic radiation is\"\n",
+ "print\" strongly reflected by the crystal =\",round((lamb*10**5),2)*10**-5,\"m\""
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Magnetic_Properties_of_Materials.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Magnetic_Properties_of_Materials.ipynb
new file mode 100644
index 00000000..7472c6a3
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Magnetic_Properties_of_Materials.ipynb
@@ -0,0 +1,262 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16: Magnetic Properties of Materials"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 16.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The magnetization of copper = -8.0 A/m\n",
+ "\n",
+ "The magnetic flux density of copper = 1.26 T\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex16.1 Response of Cu to magnetic field: Page-503 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ " \n",
+ "H = 1e+06; # Applied magnetic field in copper, A/m\n",
+ "chi = -0.8e-05; # Magnetic susceptibility of copper\n",
+ "mu_0 = 4*math.pi*1e-07; # Magnetic permeability of free space, henry/metre\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "M = chi*H; # Intesity of magnetization in copper, A/m\n",
+ "B = mu_0*(H + M); # Magnetic flux density in copper, tesla\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe magnetization of copper =\",M,\" A/m\"\n",
+ "print\"\\nThe magnetic flux density of copper =\",round(B,2),\"T\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 16.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The diamagnetic susceptibility of copper = \n",
+ "-5e-06\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex16.2 Diamagnetic susceptibility of copper: Page-512 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.6e-019; # Charge on an electron, C\n",
+ "m = 9.1e-031; # Mass of an electron, kg\n",
+ "mu_0 = 4*math.pi*1e-07; # Magnetic permeability of free space, henry/metre\n",
+ "Z = 1; # Number of electrons contributing to the magnetic moment\n",
+ "r = 1e-010; # Radius of copper atom, m\n",
+ "a = 3.608e-010; # Lattice parameter of copper, m\n",
+ " # For FCC lattice of Cu, there are 4 atoms per unit cell\n",
+ "n = 4; # Number of atoms per unit cell\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "N = n/a**3; # Number of electrons per unit volume, per metre cube\n",
+ "chi_dia = -mu_0*Z*e**2*N*r**2/(6*m); # Diamagnetic susceptibility of copper\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ " \n",
+ "print\"\\nThe diamagnetic susceptibility of copper = \"\n",
+ "print round(( chi_dia*10**6))*10**-6,"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 16.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The magentic induction of paramagnetic sample =\n",
+ "89.32 weber per metre square\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex16.3 Calculating magnetic induction from \n",
+ "#orientational energy equivalent of thermal energy: Page-514 (2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "k = 1.38e-023; # Boltzmann constant, joule per mole per kelvin\n",
+ "mu_B = 9.27e-024; # Bohr's magneton, joule per tesla\n",
+ "T = 300; # Thermal energy of specimen, joule\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "mu_m = 5*mu_B; # Magnetic moment of paramagnetic sample, joule per tesla\n",
+ " # At equilibrium, mu_m*B = k*T, solving for B\n",
+ " # Magentic induction of paramagnetic sample, weber per metre square\n",
+ "B = k*T/mu_m; \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe magentic induction of paramagnetic sample =\"\n",
+ "print round(B,2),\" weber per metre square\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 16.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The paramagnetic susceptibility of salt at room temperature = \n",
+ "8.69e-05\n",
+ "\n",
+ "The intensity of magnetization of salt = 86.95 A/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex16.4 Behaviour of paramagnetic salt when placed \n",
+ " #in uniform magnetic field: Page-514 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "k = 1.38e-023; # Boltzmann constant, joule per mole per kelvin\n",
+ "T = 300; # Thermal energy of specimen, joule\n",
+ "mu_B = 9.27e-024; # Bohr's magneton, ampere per metre square\n",
+ "mu_0 = 4*math.pi*1e-07; # Magnetic permeability of free space, henry per metre\n",
+ "N = 1e+28;#Concentration of paramagnetic ions in paramagnetic salt,per metre cube\n",
+ "mu_m = mu_B;\n",
+ "H = 1e+06; # Applied magnetic field, A/m\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculatin\n",
+ "\n",
+ "chi = mu_0*N*mu_m**2/(3*k*T);#Paramagnetic susceptibility of salt at room temp.\n",
+ "M = chi*H; # Intensity of magnetization at room temperature, A/m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe paramagnetic susceptibility of salt at room temperature = \"\n",
+ "print round(( chi*10**5),2)*10**-5\n",
+ "print\"\\nThe intensity of magnetization of salt =\",round(M,2),\" A/m\""
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Optical_Properties_of_Materials.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Optical_Properties_of_Materials.ipynb
new file mode 100644
index 00000000..d570c0f3
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Optical_Properties_of_Materials.ipynb
@@ -0,0 +1,325 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 15: Optical Properties of Materials"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 15.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The number of photons emitted per second =\n",
+ "8.58e+30\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex15.1 Determining Photon number by \n",
+ " #using Planck quantum law: Page-486 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "f = 1760e+03; # Frequency of the radio transmitter, Hz\n",
+ "P = 10e+03; # Power of radio transmitter, W\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "E = h*f; # Energy carried by one photon from Planck's law, J\n",
+ "N = P/E; # Number of photons emitted per second, number per second\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe number of photons emitted per second =\"\n",
+ "print round( (N*10**-30),2)*10**30\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 15.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The energy carried by each photon of radiation = 4.43 eV\n",
+ "\n",
+ "The photoelectric effect is possible..\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex15.2 Finding suitable energy for\n",
+ "# Photoelectric Effect from Na metal: Page-486 (2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.602e-019; # Charge on an electron, C\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "c = 3.0e+08; # Speed of light in vacuum, m/s\n",
+ "lamb = 2800e-010; # Wavelength of incident light, m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "W = 2.3*e; # Work function of Na metal, J\n",
+ "f = c/lamb; # Frequency of the incident light, Hz\n",
+ "E = h*f; # Energy carried by one photon from Planck's law, J\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe energy carried by each photon of radiation =\",round(E/e,2),\" eV\"\n",
+ "if (E > W):\n",
+ " print\"\\nThe photoelectric effect is possible..\"\n",
+ "else:\n",
+ " print\"\\nThe photoelectric effect is impossible..\"\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 15.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The number of photons of green light of Hg =\n",
+ "2.5e+18\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex15.3 Finding number of photons for\n",
+ "# green wavelength of Hg: Page-487 (2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "c = 3.0e+08; # Speed of light in vacuum, m/s\n",
+ "lamb = 496.1e-09; # Wavelength of green light of mercury, m\n",
+ "E_total = 1; # Work done by photons from green light, J\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "f = c/lamb; # Frequency of the green light, Hz\n",
+ "E = h*f; # Energy carried by one photon from Planck's law, J\n",
+ "N = E_total/E; # Number of photons of green light of Hg\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe number of photons of green light of Hg =\"\n",
+ "print round( (N*10**-18),2)*10**18\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 15.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Threhold frequency for Cu metal = 9.65e+14 Hz\n",
+ "\n",
+ "The work function of Cu metal = 4.0 eV\n",
+ "\n",
+ "The maximum kinetic energy of photoelectrons = 2.72 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex15.4 Photoelectric effect in a photocell: Page-487 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.602e-019; # Charge on an electron, C\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "c = 3.0e+08; # Speed of light in vacuum, m/s\n",
+ "lamb = 1849e-010; # Wavelength of incident light, m\n",
+ "V_0 = 2.72; # Stopping potential for emitted electrons, V\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "f = c/lamb; # Frequency of incident radiation , Hz\n",
+ "E = h*f; # Energy carried by one photon from Planck's law, J\n",
+ "T_max = e*V_0; # Maximum kinetic energy of electrons, J\n",
+ " # We have, T_max = E - h*f_0 = h*f - W\n",
+ "f_0 = (-T_max + E )/h # Threshold frequency for Cu metal, Hz\n",
+ "W = h*f_0/e; # Work function of Cu metal, eV\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThrehold frequency for Cu metal =\",round((f_0*10**-14),2)*10**14,\" Hz\"\n",
+ "print\"\\nThe work function of Cu metal = \",round(W),\" eV\"\n",
+ "print\"\\nThe maximum kinetic energy of photoelectrons =\",round(T_max/e,2),\" eV\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 15.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The energy which must be transferred to stimulate\n",
+ " the emission of Na d-lines = 2.11 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex15.5 Energy required to stimulate the emission of\n",
+ "# Na d-lines: Page-497 (2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.6e-019; # Charge on an electron, C\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "c = 3.0e+08; # Speed of light in vacuum, m/s\n",
+ "lambda_mean = 5893e-010; # Wavelength of incident light, m\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# The energy of the electron which must be transferred to the atoms of Na \n",
+ "delta_E = h*c/(lambda_mean*e); \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe energy which must be transferred to stimulate\"\n",
+ "print\" the emission of Na d-lines = \",round(delta_E,2),\" eV\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/README.txt b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/README.txt
new file mode 100644
index 00000000..d755b4bd
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Sampath Mukherjee
+Course: mtech
+College/Institute/Organization: IIT Kharagpur
+Department/Designation: Dept. of Physics and Meteorology
+Book Title: Solid State Physics: Structure And Properties Of Materials
+Author: M. A. Wahab
+Publisher: Narosa Publishing House Pvt. Ltd. New Delhi
+Year of publication: 2010
+Isbn: 978-81-7319-603-4
+Edition: 2 \ No newline at end of file
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Semiconducting_Properties_of_Materials.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Semiconducting_Properties_of_Materials.ipynb
new file mode 100644
index 00000000..968add86
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Semiconducting_Properties_of_Materials.ipynb
@@ -0,0 +1,554 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13: Semiconducting Properties of Materials"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 13.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The intrinsic carrier concentration of Ge =\n",
+ "4.68e+18 per metre cube\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex13.3 Intrinsic concentration of charge\n",
+ "# carriers in semiconductors: Page-432 (2010)\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "k = 1.38e-023; # Boltzmann constant, J/mol/K\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "eV = 1.6e-019; # Joule equivalent of 1 eV\n",
+ "T = 300; # Room temperature, kelvin\n",
+ "m_0 = 9.1e-031; # Rest mass of an electron, kg\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "m_e = 0.12*m_0; # Effective mass of electron, kg\n",
+ "m_h = 0.28*m_0; # Effective mass of electron, kg\n",
+ "E_g = 0.67; # Energy gap of Ge, eV\n",
+ "# Intrinsic carrier concentration of Ge, per metre cube\n",
+ "n_i = 2*(2*math.pi*k*T/h**2)**(3/2)*(m_e*m_h)**(3/4)*math.exp(-E_g*eV/(2*k*T));\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe intrinsic carrier concentration of Ge =\"\n",
+ "print round((n_i*10**-18),2)*10**18,\"per metre cube\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 13.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The ratio of intrinsic carrier density = 1015.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex13.4 Comparison of intrinsic carrier densities of \n",
+ " #two semiconductors at room temperature Page-433 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "eV = 1.6e-019; # Joule equivalent of 1 eV\n",
+ "m = 9.1e-031; # Rest mass of an electron, kg\n",
+ "m_e = m; # Effective mass of electron, kg\n",
+ "m_h = m; # Effective mass of electron, kg\n",
+ "Eg_A = 0.36; # Energy gap of A, eV\n",
+ "Eg_B = 0.72; # Energy gap of B, eV\n",
+ "k = 1.38e-023; # Boltzmann constant, J/mol/K\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "k_T = 0.052/2; # Thermal energy, eV\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # As n_i_ratio = ni_A/ni_B = math.exp(-Eg_A/(2*k_T))/math.exp(-Eg_A/(2*k_T)) \n",
+ "# Intrinsic carrier density ratio of A and B\n",
+ "n_i_ratio = math.exp(-Eg_A/(2*k_T))/math.exp(-Eg_B/(2*k_T));\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe ratio of intrinsic carrier density =\", round(n_i_ratio) "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 13.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The energy diff. between new fermi level and topmost valence level =\n",
+ "0.37 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex13.5 Shift in position of fermi level \n",
+ " #with change in concentration of impurities: Page-436 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "k_T = 0.03; # Thermal energy, eV\n",
+ "# Energy difference between fermi level and topmost valence level, eV\n",
+ "dE_Fv = 0.4; \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ " \n",
+ " # The hole concentration in P-type material is\n",
+ " # p = N_A = N_v*math.exp(-EF-Ev)/(k_T) = N_v*math.exp(-dE_Fv)/(k_T)\n",
+ " # The new value of hole concentration in P-type material is\n",
+ "# p_prime = 3*N_A = N_v*math.exp(-EF_prime-Ev)/(k_T)= \n",
+ "# N_v*math.exp(-dE_F_primev)/(k_T)\n",
+ " # Solving for dE_F_primev by removing exponetial term\n",
+ "# Energy difference between new fermi level and topmost valence level, eV\n",
+ "dE_F_primev = dE_Fv - k_T*math.log(3); \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe energy diff. between new fermi level and topmost valence level =\"\n",
+ "print round(dE_F_primev,2),\"eV\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 13.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The intrinsic electrical resistivity = 0.47 ohm-metre\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex13.6 Electrical resistivity of Ge: Page-439 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.602e-019; # Charge on an elctron, C\n",
+ " # Intrinsic carrier density of Ge at room temperature, per metre cube\n",
+ "n_i = 2.37e+019; \n",
+ "mu_e = 0.38; # Mobility of electrons, metre square per volt per second\n",
+ "mu_h = 0.18; # Mobility of holes, metre square per volt per second\n",
+ "T = 300; # Room temperature, kelvin\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# Intrinsic electrical conductivity, per ohm per metre\n",
+ "sigma_i = n_i*e*(mu_e + mu_h); \n",
+ "rho_i = 1/sigma_i; # Intrinsic electrical resistivity, ohm-metre\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe intrinsic electrical resistivity =\",round(rho_i,2),\" ohm-metre\" \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 13.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The intrinsic electrical conductivity of Si =\n",
+ "0.000433 per ohm per metre\n",
+ "\n",
+ "The extrinsic electrical conductivity of Si =\n",
+ "9.96 per ohm per metre\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex13.7 Electrical conductivity of intrinsic and\n",
+ "# extrinsic Si: Page-439 (2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "NA = 6.023e+23; # Avogadro's number\n",
+ "A_Si = 28.09e-03; # Kilogram atomic mass of Si, kg\n",
+ "e = 1.602e-019; # Charge on an elctron, C\n",
+ "n_impurity = 1/1e+08; # Donor impurity atoms per Si atom\n",
+ "n_i = 1.5e+016;#Intrinsic carrier density of Si at room temp.,per metre cube\n",
+ "mu_e = 0.13; # Mobility of electrons, metre square per volt per second\n",
+ "mu_h = 0.05; # Mobility of holes, metre square per volt per second\n",
+ "T = 300; # Room temperature, kelvin\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "sigma_i = n_i*e*(mu_e + mu_h)#Intrinsic electrical conductivity, per ohm per m\n",
+ "Si_density = 2.23e+03; # Density of silicon, kg per metre cube\n",
+ "N_Si = NA * Si_density/A_Si; # Number of Si atoms, per metre cube\n",
+ "N_D = N_Si*n_impurity; # Density of donor impurity, per metre cube;\n",
+ "sigma_ext = (N_D)*e*mu_e#Extrinsic electrical conductivity of Si, per ohm per m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe intrinsic electrical conductivity of Si =\"\n",
+ "print round((sigma_i*10**4),2)*10**-4,\" per ohm per metre\"\n",
+ "print\"\\nThe extrinsic electrical conductivity of Si =\"\n",
+ "print round(sigma_ext,2),\" per ohm per metre\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 13.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The resistance of Ge Rod = 4300.0 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex13.8 Resistance of intrinsic Ge Rod: Page-440 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.602e-019; # Charge on an elctron, C\n",
+ "T = 300; # Room temperature, kelvin\n",
+ "l = 1e-02; # Length of the Ge rod, m\n",
+ "b = 1e-03; # Width of the Ge rod, m\n",
+ "t = 1e-03; # Thickness of the Ge rod, m\n",
+ "n_i = 2.5e+019; # Intrinsic carrier density of Ge, per metre cube\n",
+ "mu_e = 0.39; # Mobility of electrons, metre square per volt per second\n",
+ "mu_h = 0.19; # Mobility of holes, metre square per volt per second\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# Intrinsic electrical conductivity, per ohm per metre\n",
+ "sigma_i = n_i*e*(mu_e + mu_h); \n",
+ "A = b*t; # Surface area of the Ge rod, metre square\n",
+ "rho = 1/sigma_i; # Electrical resistivity of Ge Rod, ohm-metre\n",
+ "R = rho*l/A; # Resistance of Ge Rod, ohm\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe resistance of Ge Rod =\",round((R*10**-3),1)*10**3,\"ohm\" \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 13.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The density of electron = 8.49e+22 metre cube\n",
+ "\n",
+ "The mobility of electron =\n",
+ "0.015 metre cube per volt per second\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex13.9 Hall effect in Si semiconductor: Page-442 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.602e-019; # Charge on an elctron, C\n",
+ "T = 300; # Room temperature, kelvin\n",
+ "R_H = -7.35e-05; # Hall co-efficeint of Si specimen, metre cube per coulomb\n",
+ "sigma = 200; # Electrical conductivity of Si, per ohm per metre\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "n = -1/(e*R_H); # Electron density in the Si specimen\n",
+ "# Electron mobility in the Si specimen, metre cube per volt per second\n",
+ "mu_e = sigma/(n*e); \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe density of electron =\",round((n*10**-22),2)*10**22,\"metre cube\"\n",
+ "print\"\\nThe mobility of electron =\"\n",
+ "print round(mu_e,3),\"metre cube per volt per second\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 13.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The net forward current = 749000.0 Io\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex13.10 Forward current of a p-n diode in terms of\n",
+ "# reverse saturation current using diode equation: Page-450 (2010)\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.6e-019; # Charge on an electron, coulomb\n",
+ "k = 1.38e-023; # Boltzmann constant, J/mol/K\n",
+ "V = 0.35; # Potential difference applied across a Ge diode, volt\n",
+ "T = 300; # Room temperature, kelvin\n",
+ "Io = 1;#Reverse saturation current, micro-ampere, for simplicity assume I0 = 1\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# \"Diode Equation\" for net forward current, milliamperes\n",
+ "Iv = Io*(math.exp(e*V/(k*T))-1); \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe net forward current =\",round((Iv*10**-5),2)*10**5,\"Io\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 13.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The potential difference applied across p-n junction =\n",
+ "0.02 volt\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex13.11 Finding voltage from net forward current \n",
+ " #using Diode Equation: Page-450 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "e = 1.6e-019; # Charge on an electron, coulomb\n",
+ "k = 1.38e-023; # Boltzmann constant, J/mol/K\n",
+ "T = 300; # Room temperature, kelvin\n",
+ "Io = 1;# Reverse saturation current, micro-ampere, for simplicity assume I0 = 1\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Iv = 0.9*Io; # \"Diode Equation\" for net forward current, milliamperes\n",
+ " # As Iv = Io*(math.exp(e*V/(k*T))-1), solving for V\n",
+ "# Potential difference applied across p-n junction, volt\n",
+ "V = math.log(Iv/Io+1)*k*T/e;\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe potential difference applied across p-n junction =\"\n",
+ "print round(V,2),\"volt\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Superconductivity.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Superconductivity.ipynb
new file mode 100644
index 00000000..392970f7
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Superconductivity.ipynb
@@ -0,0 +1,269 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 17: Superconductivity"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 17.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The critical magnetic field at 2 K = 0.022 T\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex17.1 Variation of critical magnetic field with temp. Page-537\n",
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ " \n",
+ "T_c = 3.7; # Critical temperature of superconducting transition, kelvin\n",
+ "H_c0 = 0.0306; # Critical magnetic field to destroy superconductivity, tesla\n",
+ "T = 2#Temperature at which critical magnetic field is to be found out, kelvin\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "H_cT = H_c0*(1-(T/T_c)**2);\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe critical magnetic field at\",T,\" K =\",round(H_cT,3),\" T\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 17.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The temperature at which critical magnetic field becomes \n",
+ "15900.0 T = 2.13 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex17.2 Variation of critical magnetic field with temperature\n",
+ "# for tin Page-537 (2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "T_c = 3.69; # Critical temperature of superconducting transition, kelvin\n",
+ "# Critical magnetic field intensity to destroy superconductivity \n",
+ "# at zero kelvin, tesla\n",
+ "B_c0 = 3e+5/(4*math.pi); \n",
+ "# Critical magnetic field at temperature T kelvin\n",
+ "B_cT = 2e+5/(4*math.pi); \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ " \n",
+ " # T = 2;Temperature at which critical magnetic field is to be found out, kelvin\n",
+ " # since B_cT = B_c0*(1-(T/T_c)**2);\n",
+ " #Critical magnetic field intensity as a function of temperature\n",
+ " # Solving for T\n",
+ "# Temperature at which critical magnetic field becomes B_cT, kelvin \n",
+ "T = (1-B_cT/B_c0)**0.5*T_c; \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe temperature at which critical magnetic field becomes \"\n",
+ "print round((B_cT*10**-4),2)*10**4,\" T = \",round(T,2),\" K\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 17.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The critical current through the lead wire = 134.33 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex17.3 Calculating critical current for a lead wire from \n",
+ " #critical temperature of lead Page-537 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ " # Critical temperature of superconducting transition for Pb, kelvin\n",
+ "T_c = 7.18; \n",
+ "#Critical magnetic field intensity to destroy superconductivity at zero K,A/m\n",
+ "H_c0 = 6.5e+4; \n",
+ "# Temperature at which critical magnetic field becomes H_cT, kelvin \n",
+ "T = 4.2; \n",
+ "d = 1e-03; # Diameter of lead wire, m\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "# Critical magnetic field intensity at temperature T kelvin, A/m\n",
+ "H_cT = H_c0*(1-(T/T_c)**2) \n",
+ "# Critical current through the lead wire, A\n",
+ "I_c = math.pi*d*H_cT; \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe critical current through the lead wire = \",round(I_c,2),\" A\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 17.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The penetration depth at 0 K = 5.19e-08 m\n",
+ "\n",
+ "The superconducting electron density =\n",
+ "1.95e+28 per metre cube\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex17.4 Dependence of London penetration depth \n",
+ " #on temperature Page-548 (2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "N = 6.02e+023; # Avogadro's number\n",
+ "rho = 13.55e+03; # Density of mercury, kg per metre cube\n",
+ "M = 200.6e-03; # Molecular mass of mercury, kg\n",
+ "lambda_T = 750e-010; # Penetration depth of mercury at T kelvin, m\n",
+ "T_c = 4.12; # Critical temperature of superconducting transition for Hg, kelvin\n",
+ "T = 3.5;#Temperature at which penetration depth for Hg becomes lambda_T, kelvin \n",
+ "\n",
+ "\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "# Penetration depth of mercury at 0 kelvin, m\n",
+ "lambda_0 = lambda_T*(1-(T/T_c)**4)**(1/2);\n",
+ "n_0 = N*rho/M; # Normal electron density in mercury, per metre cube\n",
+ "n_s = n_0*(1-(T/T_c)**4); # Superelectron density in mercury, per metre cube\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe penetration depth at 0 K =\",round((lambda_0*10**8),2)*10**-8,\" m\"\n",
+ "print\"\\nThe superconducting electron density =\"\n",
+ "print round((n_s*10**-28),2)*10**28,\"per metre cube\"\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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Thermal_Properties_of_Materials.ipynb b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Thermal_Properties_of_Materials.ipynb
new file mode 100644
index 00000000..bebfb4c5
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/Thermal_Properties_of_Materials.ipynb
@@ -0,0 +1,387 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: Thermal Properties of Materials"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Since E_Ag < kT and E_Dia > kT, therefore,\n",
+ "\n",
+ "Silver metal obeys the Dulong Petit law at \n",
+ "room temperature while diamond does not.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex9.1 Exception of Dulong-Petit law at room temp.:Page-303(2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "h = 6.626e-034; # Planck's constant, joule second\n",
+ "k = 1.38e-023; # Boltzmann constant, joule/mol/kelvin\n",
+ "T = 300; # Room temperature, kelvin\n",
+ "f_Ag = 4.0e+012; # Vibrational frequency for silver, cycles/second\n",
+ "f_Dia = 2.4e+013; # Vibrational frequency for diamond, cycles/second\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "E_Ag = h*f_Ag; # Vibrational Energy for silver, joule\n",
+ "E_Dia = h*f_Dia; # Vibrational Energy for diamond, joule\n",
+ "E_th = k*T; # Thermal energy at room temperature, joule\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "if (E_th > E_Ag and E_th < E_Dia):\n",
+ " print\"\\nSince E_Ag < kT and E_Dia > kT, therefore,\" \n",
+ " print\"\\nSilver metal obeys the Dulong Petit law at \"\n",
+ " print \"room temperature while diamond does not.\"\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The specific heat of copper = 1.33 kJ/kmol/kelvin\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex9.2 Specific heat of copper from Debye temp.:Page-311(2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "h = 6.626e-034; # Planck's constant, joule second\n",
+ "k = 1.38e-023; # Boltzmann constant, joule/mol/kelvin\n",
+ "T = 30; # Given temperature, kelvin\n",
+ "N = 6.023e+023; # Avogadro's number\n",
+ "v_l = 4.76e+03; # Longitudinal velocity of lattice waves, m/s\n",
+ "v_t = 2.32e+03; # Tranverse velocity of lattice waves, \n",
+ "rho = 8.9e+03; # Density of copper, kg per metre cube\n",
+ "A_Cu = 63.5; # Gram atomic mass of Cu, g\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R = N*k; # Universal gas constant, joule/kelvin \n",
+ "M = A_Cu*1e-03; # Mass of 1 mole of Cu-atoms, kg\n",
+ "V = M/rho; # Volume of copper, metre cube\n",
+ "# Debye temperature of copper, K\n",
+ "theta_D = (h/k)*((9*N)/((4*math.pi*V)*((1/v_l**3)+(2/v_t**3))))**(1/3);\n",
+ " # Specific heat of copper, kJ/kmol/kelvin\n",
+ "C_v = 12/5*math.pi**4*R*(T/theta_D)**3; \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe specific heat of copper =\",round(C_v,2),\"kJ/kmol/kelvin\" \n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The highest possible vibrational frequency of diamond =\n",
+ "4.64e+13 per second\n",
+ "\n",
+ "The molar specific heat of diamond = 0.18 J/kmol/kelvin\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python CodeEx9.3 Vibrational freq. and molar heat capacity of diamond:Page-312\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "h = 6.626e-034; # Planck's constant, joule second\n",
+ "k = 1.38e-023; # Boltzmann constant, joule/mol/kelvin\n",
+ "T = 10; # Given temperature, kelvin\n",
+ "N = 6.023e+023; # Avogadro's number\n",
+ "theta_D = 2230; # Debye temperature for diamond, kelvin\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R = N*k; # Universal gas constant, joule/kelvin \n",
+ "f_D = k*theta_D/h; # Debye frequency of diamond, hertz\n",
+ "# Specific heat of diamond, J/kmol/kelvin\n",
+ "C_v = 12/5*math.pi**4*R*1e+03*(T/theta_D)**3; \n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe highest possible vibrational frequency of diamond =\"\n",
+ "print round((f_D*10**-13),2)*10**13,\"per second\" \n",
+ "print\"\\nThe molar specific heat of diamond =\",round(C_v,2),\"J/kmol/kelvin\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Debye temperature of copper at low temperature = 348.27 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ "#Python Code Ex9.4Debye temperature of copper at low temperature:Page-312(2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "k = 1.38e-023; # Boltzmann constant, joule/mol/kelvin\n",
+ "N = 6.023e+023; # Avogadro's number\n",
+ "C_vl = 4.6e-02; # Lattice specific heat, J/kmol/K\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R = N*k; # Universal gas constant, joule/kelvin \n",
+ " # Lattice specific heat C_vl = Molar lattice specific heat, C_v\n",
+ " # or 12/5*%math.pi**4*R/(5*theta_D**3) = C_vl\n",
+ " # solving for theta_D, we have\n",
+ "# Debye temperature of copper at low temperature, K\n",
+ "theta_D = (12*math.pi**4*R*1e+03/(5*C_vl))**(1/3);\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nDebye temperature of copper at low temperature =\",round(theta_D,2),\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Debye temperature of gold = 242.25 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex9.5 Debye temperature for gold : Page-313(2010)\n",
+ " \n",
+ " \n",
+ " \n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "h = 6.626e-034; # Planck's constant, Js\n",
+ "k = 1.38e-023; # Boltzmann constant, joule/mol/kelvin\n",
+ "N = 6.023e+023; # Avogadro's number\n",
+ "v = 2100; # Velocity of sound in gold medium, m/s\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "M = 197e-03; # Gram atomic weight of gold, g\n",
+ "rho = 1.9e+04; # Density of gold, kg per metre cube\n",
+ "V = M/rho; # Volume of gold, metre cube\n",
+ "R = N*k; # Universal gas constant, joule/kelvin \n",
+ "theta_D = h*v/k*(9*N/(12*math.pi*V))**(1/3); # Debye temperature for gold, K\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"\\nDebye temperature of gold =\",round(theta_D,2),\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Exa 9.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "The amount of heat required to raise the temperature of\n",
+ " 2 gmol of Rock salt from 10K to 50K = 63.99 cal\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "import math\n",
+ " # Python Code Ex9.6 Heat transference into rock salt at\n",
+ "# low temperature: Page-313(2010)\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "\n",
+ "A = 464; # Atomic specific heat of rock salt, cal g/mol/kelvin\n",
+ "theta_D = 281; # Debye temperature of rock salt, K\n",
+ "delta_T = 10; # Rise in temperature in each class interval, K\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " # Define a function which returns lattice specific heat at constant volume\n",
+ "\n",
+ "def Qa(t):\n",
+ " return A*(t/theta_D)**3;\n",
+ "Q = 0; # Initialize heat accumulator to zero, cal\n",
+ "for t in range(10,50,10):\n",
+ " #Calculate mean temperature of each class interval, K \n",
+ " mean_temp = (t + (t + 10))/2; \n",
+ " Q = Q + 2*delta_T*Qa(mean_temp); # Acuumulate heat for each step\n",
+ " \n",
+ " \n",
+ "#Result\n",
+ "\n",
+ "print\"\\nThe amount of heat required to raise the temperature of\"\n",
+ "print\" 2 gmol of Rock salt from 10K to 50K =\",round(Q,2),\" cal\""
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/1.png b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/1.png
new file mode 100644
index 00000000..6eeece2f
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/1.png
Binary files differ
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/2.png b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/2.png
new file mode 100644
index 00000000..c384ff5e
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/2.png
Binary files differ
diff --git a/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/3.png b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/3.png
new file mode 100644
index 00000000..57746f6b
--- /dev/null
+++ b/Solid_State_Physics:_Structure_And_Properties_Of_Materials_by_M._A._Wahab/screenshots/3.png
Binary files differ