summaryrefslogtreecommitdiff
path: root/sample_notebooks
diff options
context:
space:
mode:
authorTrupti Kini2015-12-22 23:30:15 +0600
committerTrupti Kini2015-12-22 23:30:15 +0600
commit5d4ad197775046773493a55d4ae90b7e7a8cd51e (patch)
treef6d2e49583a8dbbf42d4b5e141379bb1f3d4021d /sample_notebooks
parent44374f5910ed12df7ad65318de217c6eafa3365f (diff)
downloadPython-Textbook-Companions-5d4ad197775046773493a55d4ae90b7e7a8cd51e.tar.gz
Python-Textbook-Companions-5d4ad197775046773493a55d4ae90b7e7a8cd51e.tar.bz2
Python-Textbook-Companions-5d4ad197775046773493a55d4ae90b7e7a8cd51e.zip
Added(A)/Deleted(D) following books
A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter10_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter11_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter12_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter13_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter1_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter2_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter3_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter4_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter5_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter6_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter7_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter8_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter9_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Frequency_1.png A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Saturation_1.png A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Step_1.png A Electronic_Devices_by_S._Sharma/README.txt A Manufacturing_Science_by_A._Ghosh_And_A._K._Mallik/README.txt A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter10_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter1_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter2_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter3_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter4_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter5_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter6_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter7_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter8_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter9_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/CHAPTER9_1.png A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_1.24_2.png A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_8.26_2.png A "sample_notebooks/KAVANA B/chapter3.ipynb" A sample_notebooks/RohitPhadtare/chapter_no.6.ipynb A "sample_notebooks/S PRASHANTHS PRASHANTH/Chapter_1_4.ipynb"
Diffstat (limited to 'sample_notebooks')
-rw-r--r--sample_notebooks/KAVANA B/chapter3.ipynb145
-rw-r--r--sample_notebooks/RohitPhadtare/chapter_no.6.ipynb1494
-rw-r--r--sample_notebooks/S PRASHANTHS PRASHANTH/Chapter_1_4.ipynb593
3 files changed, 2232 insertions, 0 deletions
diff --git a/sample_notebooks/KAVANA B/chapter3.ipynb b/sample_notebooks/KAVANA B/chapter3.ipynb
new file mode 100644
index 00000000..a66c91da
--- /dev/null
+++ b/sample_notebooks/KAVANA B/chapter3.ipynb
@@ -0,0 +1,145 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHAPTER 3: Heating and Cooling of Electrical Machines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1, Page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "d = 12.0 #Diameter of copper bar(mm)\n",
+ "t = 1.5 #Thickness of micanite tube(mm)\n",
+ "rho = 8.0 #Thermal resistivity(ohm-m)\n",
+ "theta_diff = 25.0 #Temperature difference(\u00b0C)\n",
+ "l = 0.2 #Length of bar(m)\n",
+ "\n",
+ "#Calculation\n",
+ "S = math.pi*(d+t)*10**-3*l #Area of insulation in the path of heat flow(m^2)\n",
+ "R_s = rho*t*10**-3/S #Thermal resistance in the micanite tube(ohm)\n",
+ "Q_con = theta_diff/R_s #Loss that will pass from copper bar to iron(W)\n",
+ "\n",
+ "#Result\n",
+ "print('Loss that will pass from copper bar to iron, Q_con = %.2f W' %Q_con)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss that will pass from copper bar to iron, Q_con = 17.67 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2, Page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ratio = 20.0 #Ratio of resistivity across lamination to along lamination\n",
+ "t = 40.0 #Thickness of lamination stack(mm)\n",
+ "S = 6000.0 #Cross-section of lamination(mm^2)\n",
+ "theta = 20.0 #Temperature difference across laminations(\u00b0C)\n",
+ "theta_1 = 5.0 #Temperature difference among laminations(\u00b0C)\n",
+ "Q_con_1 = 25.0 #Heat conducted along laminations(W)\n",
+ "S_1 = 2500.0 #Cross-section of lamination(mm^2)\n",
+ "t_1 = 20.0 #Thickness of lamination stack(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "rho_1 = S_1*theta_1*10**-6/(Q_con_1*t_1*10**-3) #Thermal resistivity along direction of lamination(ohm-m)\n",
+ "rho = ratio*rho_1 #Thermal resistivity across laminations(ohm-m)\n",
+ "Q_con = S*10**-6*theta/(rho*t*10**-3) #Heat conducted across laminations(W)\n",
+ "\n",
+ "#Result\n",
+ "print('Loss that will be conducted across laminations, Q_con = %.f W' %Q_con)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss that will be conducted across laminations, Q_con = 6 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3, Page number 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "e = 0.8 #Co-efficient of emissivity\n",
+ "temp_body = 60.0 #Temperature of body(\u00b0C)\n",
+ "temp_walls = 20.0 #Temperature of walls of room(\u00b0C)\n",
+ "\n",
+ "#Calculation\n",
+ "T_1 = 273+temp_body #Temperature of body(K)\n",
+ "T_0 = 273+temp_walls #Temperature of walls of room(K)\n",
+ "q_rad = 5.7*10**-8*e*(T_1**4-T_0**4) #Heat radiated from body(W/m^2)\n",
+ "\n",
+ "#Result\n",
+ "print('Heat radiated from body, q_rad = %.1f W/m^2' %q_rad)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat radiated from body, q_rad = 224.6 W/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/sample_notebooks/RohitPhadtare/chapter_no.6.ipynb b/sample_notebooks/RohitPhadtare/chapter_no.6.ipynb
new file mode 100644
index 00000000..4657aa0b
--- /dev/null
+++ b/sample_notebooks/RohitPhadtare/chapter_no.6.ipynb
@@ -0,0 +1,1494 @@
+{
+ "metadata": {
+ "name": "chapter no.6.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter No.6:Torsion"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.1,Page No.225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "L=10000 #mm #Length of solid shaft\n",
+ "d=100 #mm #Diameter of shaft\n",
+ "n=150 #rpm\n",
+ "P=112.5*10**6 #N-mm/sec #Power Transmitted\n",
+ "G=82*10**3 #N/mm**2 #modulus of Rigidity\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "J=pi*d**4*(32)**-1 #mm**3 #Polar Modulus\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #Torsional moment\n",
+ "\n",
+ "r=50 #mm #Radius\n",
+ "\n",
+ "q_s=T*r*J**-1 #N/mm**2 #Max shear stress intensity\n",
+ "Theta=T*L*(G*J)**-1 #angle of twist\n",
+ "\n",
+ "#Result\n",
+ "print\"Max shear stress intensity\",round(q_s,2),\"N/mm**2\"\n",
+ "print\"Angle of Twist\",round(Theta,3),\"radian\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max shear stress intensity 36.48 N/mm**2\n",
+ "Angle of Twist 0.089 radian\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.2,Page No.226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "P=440*10**6 #N-m/sec #Power transmitted\n",
+ "n=280 #rpm\n",
+ "theta=pi*180**-1 #radian #angle of twist\n",
+ "L=1000 #mm #Length of solid shaft\n",
+ "q_s=40 #N/mm**2 #Max torsional shear stress\n",
+ "G=84*10**3 #N/mm**2 #Modulus of rigidity\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#P=2*pi*n*T*(60)**-1 #Equation of Power transmitted\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #torsional moment\n",
+ "\n",
+ "#From Consideration of shear stress\n",
+ "d1=(T*16*(pi*40)**-1)**0.333333 \n",
+ "\n",
+ "#From Consideration of angle of twist\n",
+ "d2=(T*L*32*180*(pi*84*10**3*pi)**-1)**0.25\n",
+ "\n",
+ "#result\n",
+ "print\"Diameter of solid shaft is\",round(d1,2),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of solid shaft is 124.09 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.3,Page No.227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "G=80*10**3 #N/mm**2 #Modulus of rigidity\n",
+ "q_s=80 #N/mm**2 #Max sheare stress\n",
+ "P=736*10**6 #N-mm/sec #Power transmitted\n",
+ "n=200\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #Torsional moment\n",
+ "\n",
+ "#Now From consideration of angle of twist\n",
+ "theta=pi*180**-1\n",
+ "#L=15*d\n",
+ "\n",
+ "d=(T*32*180*15*(pi**2*G)**-1)**0.33333\n",
+ "\n",
+ "#Now corresponding stress at the surface is\n",
+ "q_s2=T*32*d*(pi*2*d**4)**-1\n",
+ "\n",
+ "#Result\n",
+ "print\"Max diameter required is\",round(d,2),\"mm\"\n",
+ "print\"Corresponding shear stress is\",round(q_s2,2),\"N/mm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max diameter required is 156.66 mm\n",
+ "Corresponding shear stress is 46.55 N/mm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.4,Page No.228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d=25 #mm #Diameter of steel bar\n",
+ "p=50*10**3 #N #Pull\n",
+ "dell_1=0.095 #mm #Extension of bar\n",
+ "l=200 #mm #Guage Length\n",
+ "T=200*10**3 #N-mm #Torsional moment\n",
+ "theta=0.9*pi*180**-1 #angle of twist\n",
+ "L=250 #mm Length of steel bar\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "A=pi*4**-1*d**2 #Area of steel bar #mm**2\n",
+ "E=p*l*(dell_1*A)**-1 #N/mm**2 #Modulus of elasticity \n",
+ "\n",
+ "J=pi*32**-1*d**4 #mm**4 #Polar modulus\n",
+ "\n",
+ "G=T*L*(theta*J)**-1 #Modulus of rigidity #N/mm**2\n",
+ "\n",
+ "#Now from the relation of Elastic constants\n",
+ "mu=E*(2*G)**-1-1\n",
+ "\n",
+ "#result\n",
+ "print\"The Poissoin's ratio is\",round(mu,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Poissoin's ratio is 0.292\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.5,Page No.229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "L=6000 #mm #Length of circular shaft\n",
+ "d1=100 #mm #Outer Diameter\n",
+ "d2=75 #mm #Inner Diameter\n",
+ "R=100*2**-1 #Radius of shaft\n",
+ "T=10*10**6 #N-mm #Torsional moment\n",
+ "G=80*10**3 #N/mm**2 #Modulus of Rigidity\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "J=pi*32**-1*(d1**4-d2**4) #mm**4 #Polar Modulus \n",
+ "\n",
+ "#Max Shear stress produced\n",
+ "q_s=T*R*J**-1 #N/mm**2\n",
+ "\n",
+ "#Angle of twist\n",
+ "theta=T*L*(G*J)**-1 #Radian\n",
+ "\n",
+ "#Result\n",
+ "print\"MAx shear stress produced is\",round(q_s,2),\"N/mm**2\"\n",
+ "print\"Angle of Twist is\",round(theta,2),\"Radian\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "MAx shear stress produced is 74.5 N/mm**2\n",
+ "Angle of Twist is 0.11 Radian\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.6,Page No.229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d1=200 #mm #External Diameter of shaft\n",
+ "t=25 #mm #Thickness of shaft\n",
+ "n=200 #rpm\n",
+ "theta=0.5*pi*180**-1 #Radian #angle of twist\n",
+ "L=2000 #mm #Length of shaft\n",
+ "G=84*10**3 #N/mm**2\n",
+ "d2=d1-2*t #mm #Internal Diameter of shaft\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "J=pi*32**-1*(d1**4-d2**4) #mm**4 #Polar Modulus \n",
+ "\n",
+ "#Torsional moment\n",
+ "T=G*J*theta*L**-1 #N/mm**2 \n",
+ "\n",
+ "#Power Transmitted\n",
+ "P=2*pi*n*T*60**-1*10**-6 #N-mm\n",
+ "\n",
+ "#Max shear stress transmitted\n",
+ "q_s=G*theta*(d1*2**-1)*L**-1 #N/mm**2 \n",
+ "\n",
+ "#Result\n",
+ "print\"Power Transmitted is\",round(P,2),\"N-mm\"\n",
+ "print\"Max Shear stress produced is\",round(q_s,2),\"N/mm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power Transmitted is 824.28 N-mm\n",
+ "Max Shear stress produced is 36.65 N/mm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.7,Page No.230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "P=3750*10**6 #N-mm/sec\n",
+ "n=240 #Rpm\n",
+ "q_s=160 #N/mm**2 #Max shear stress\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#d2=0.8*d2 #mm #Internal Diameter of shaft\n",
+ "\n",
+ "#J=pi*32**-1*(d1**4-d2**4) #mm**4 #Polar modulus\n",
+ "#After substituting value in above Equation we get\n",
+ "#J=0.05796*d1**4\n",
+ "\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #Torsional moment\n",
+ "\n",
+ "#Now from Torsion Formula\n",
+ "#T*J**-1=q_s*R**-1 ......................................(1)\n",
+ "\n",
+ "#But R=d1*2**-1 \n",
+ "\n",
+ "#Now substituting value of R and J in Equation (1) we get\n",
+ "d1=(T*(0.05796*q_s*2)**-1)**0.33333\n",
+ "\n",
+ "d2=d1*0.8\n",
+ "\n",
+ "#Result\n",
+ "print\"The size of the Shaft is:d1\",round(d1,3),\"mm\"\n",
+ "print\" :d2\",round(d2,3),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The size of the Shaft is:d1 200.362 mm\n",
+ " :d2 160.289 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.8,Page No.231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "P=245*10**6 #N-mm/sec #Power transmitted\n",
+ "n=240 #rpm\n",
+ "q_s=40 #N/mm**2 #Shear stress\n",
+ "theta=pi*180**-1 #radian #Angle of twist\n",
+ "L=1000 #mm #Length of shaft\n",
+ "G=80*10**3 #N/mm**2\n",
+ "\n",
+ "#Tmax=1.5*T\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #Torsional Moment\n",
+ "Tmax=1.5*T\n",
+ "\n",
+ "#Now For Solid shaft\n",
+ "#J=pi*32*d**4\n",
+ "\n",
+ "#Now from the consideration of shear stress we get\n",
+ "#T*J**-1=q_s*(d*2**-1)**-1\n",
+ "#After substituting value in above Equation we get\n",
+ "#T=pi*16**-1*d**3*q_s\n",
+ "\n",
+ "#Designing For max Torque\n",
+ "d=(Tmax*16*(pi*40)**-1)**0.33333 #mm #Diameter of shaft\n",
+ "\n",
+ "#For max Angle of Twist\n",
+ "#Tmax*J**-1=G*theta*L**-1 \n",
+ "#After substituting value in above Equation we get\n",
+ "d2=(Tmax*32*180*L*(pi**2*G)**-1)**0.25\n",
+ "\n",
+ "#For Hollow Shaft\n",
+ "\n",
+ "#d1_2=Outer Diameter\n",
+ "#d2_2=Inner Diameter\n",
+ "\n",
+ "#d2_2=0.5*d1_2\n",
+ "\n",
+ "# Polar modulus\n",
+ "#J=pi*32**-1*(d1_2**4-d2_2**4)\n",
+ "#After substituting values we get\n",
+ "#J=0.092038*d1_2**4\n",
+ "\n",
+ "#Now from the consideration of stress\n",
+ "#Tmax*J**-1=q_s*(d1_2*2**-1)**-1\n",
+ "#After substituting values and further simplifying we get\n",
+ "d1_2=(Tmax*(0.092038*2*q_s)**-1)**0.33333\n",
+ "\n",
+ "#Now from the consideration of angle of twist\n",
+ "#Tmax*J**-1=G*theta*L**-1\n",
+ "#After substituting values and further simplifying we get\n",
+ "d1_3=(Tmax*180*L*(0.092038*G*pi)**-1)**0.25\n",
+ "\n",
+ "d2_2=0.5*d1_2\n",
+ "\n",
+ "#result\n",
+ "print\"Diameter of shaft is:For solid shaft:d\",round(d,2),\"mm\"\n",
+ "print\" :For Hollow shaft:d1_2\",round(d1_2,3),\"mm\"\n",
+ "print\" : :d2_2\",round(d2_2,3),\"mm\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of shaft is:For solid shaft:d 123.01 mm\n",
+ " :For Hollow shaft:d1_2 125.69 mm\n",
+ " : :d2_2 62.845 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.11,Page No.235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "P=250*10**6 #N-mm/sec #Power transmitted\n",
+ "n=100 #rpm\n",
+ "q_s=75 #N/mm**2 #Shear stress\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#From Equation of Power we have\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #Torsional moment\n",
+ "\n",
+ "#Now from torsional moment equation we have\n",
+ "#T=j*q_s*(d/2**-1)**-1\n",
+ "#After substituting values in above equation and further simplifying we get\n",
+ "#T=pi*16**-1**d**3*q_s\n",
+ "d=(T*16*(pi*q_s)**-1)**0.3333 #mm #Diameter of solid shaft\n",
+ "\n",
+ "#PArt-2\n",
+ "\n",
+ "#Let d1 and d2 be the outer and inner diameter of hollow shaft\n",
+ "#d2=0.6*d1\n",
+ "\n",
+ "#Again from torsional moment equation we have\n",
+ "#T=pi*32**-1*(d1**4-d2**4)*q_s*(d1/2)**-1\n",
+ "d1=(T*16*(pi*(1-0.6**4)*q_s)**-1)**0.33333\n",
+ "d2=0.6*d1\n",
+ "\n",
+ "#Cross sectional area of solid shaft\n",
+ "A1=pi*4**-1*d**2 #mm**2\n",
+ "\n",
+ "#cross sectional area of hollow shaft\n",
+ "A2=pi*4**-1*(d1**2-d2**2)\n",
+ "\n",
+ "#Now percentage saving in weight\n",
+ "#Let W be the percentage saving in weight\n",
+ "W=(A1-A2)*100*A1**-1\n",
+ "\n",
+ "#Result\n",
+ "print\"Percentage saving in Weight is\",round(W,3),\"%\"\n",
+ "print\"Size of shaft is:solid shaft:d\",round(d,3),\"mm\"\n",
+ "print\" :Hollow shaft:d1\",round(d1,3),\"mm\"\n",
+ "print\" : :d2\",round(d2,3),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage saving in Weight is 29.735 %\n",
+ "Size of shaft is:solid shaft:d 117.418 mm\n",
+ " :Hollow shaft:d1 123.031 mm\n",
+ " : :d2 73.818 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.12,Page No.237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "d=100 #mm #Diameter of solid shaft\n",
+ "d1=100 #mm #Outer Diameter of hollow shaft\n",
+ "d2=50 #mm #Inner Diameter of hollow shaft\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Torsional moment of solid shaft\n",
+ "#T_s=J*q_s*(d*2**-1)**-1 \n",
+ "#After substituting values in above equation and further simplifying we get\n",
+ "#T_s=pi*16*d**3*q_s ...............(1)\n",
+ "\n",
+ "#torsional moment for hollow shaft is\n",
+ "#T_h=J*q_s*(d1**4-d2**4)**-1*(d1*2**-1)\n",
+ "#After substituting values in above equation and further simplifying we get\n",
+ "#T_h=pi*32**-1*2*d1**-1*(d1**4-d2**4)*q_s ...........(2)\n",
+ "\n",
+ "#Dividing Equation 2 by 1 we get\n",
+ "#Let the ratio of T_h*T_s**-1 Be X\n",
+ "X=1-0.5**4\n",
+ "\n",
+ "#Loss in strength \n",
+ "#Let s be the loss in strength\n",
+ "#s=T_s*T_h*100*T_s**-1\n",
+ "#After substituting values in above equation and further simplifying we get\n",
+ "s=(1-0.9375)*100\n",
+ "\n",
+ "#Weight Ratio \n",
+ "#Let w be the Weight ratio\n",
+ "#w=W_h*W_s**-1\n",
+ "\n",
+ "A_h=pi*32**-1*(d1**2-d2**2) #mm**2 #Area of Hollow shaft\n",
+ "A_s=pi*32**-1*d**2 #mm**2 #Area of solid shaft\n",
+ "\n",
+ "w=A_h*A_s**-1 \n",
+ "\n",
+ "#Result\n",
+ "print\"Loss in strength is\",round(s,2)\n",
+ "print\"Weight ratio is\",round(w,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss in strength is 6.25\n",
+ "Weight ratio is 0.75\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.13,Page No.239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "T=8 #KN-m #Torque \n",
+ "d=100 #mm #Diameter of portion AB\n",
+ "d1=100 #mm #External Diameter of Portion BC\n",
+ "d2=75 #mm #Internal Diameter of Portion BC\n",
+ "G=80 #KN/mm**2 #Modulus of Rigidity\n",
+ "L1=1500 #mm #Radial Distance of Portion AB\n",
+ "L2=2500 #mm #Radial Distance ofPortion BC\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "R=d*2**-1 #mm #Radius of shaft\n",
+ "\n",
+ "#For Portion AB,Polar Modulus\n",
+ "J1=pi*32**-1*d**4 #mm**4 \n",
+ "\n",
+ "#For Portion BC,Polar modulus \n",
+ "J2=pi*32**-1*(d1**4-d2**4) #mm**4\n",
+ "\n",
+ "#Now Max stress occurs in portion BC since max radial Distance is sme in both cases\n",
+ "q_max=T*J2**-1*R*10**6 #N/mm**2 \n",
+ "\n",
+ "#Let theta1 be the rotation in Portion AB and theta2 be the rotation in portion BC\n",
+ "theta1=T*L1*(G*J1)**-1 #Radians\n",
+ "theta2=T*L2*(G*J2)**-1 #Radians\n",
+ "\n",
+ "#Total Rotational at end C\n",
+ "theta=(theta1+theta2)*10**3 #Radians\n",
+ "\n",
+ "#Result\n",
+ "print\"Max stress induced is\",round(q_max,2),\"N/mm**2\"\n",
+ "print\"Angle of Twist is\",round(theta,3),\"radians\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max stress induced is 59.6 N/mm**2\n",
+ "Angle of Twist is 0.053 radians\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.14,Page No.240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "q_b=80 #N/mm**2 #Shear stress in Brass\n",
+ "q_s=100 #N/mm**2 #Shear stress in Steel\n",
+ "G_b=40*10**3 #N/mm**2 \n",
+ "G_s=80*10**3 \n",
+ "L_b=1000 #mm #Length of brass shaft\n",
+ "L_s=1200 #mm #Length of steel shaft\n",
+ "d1=80 #mm #Diameter of brass shaft\n",
+ "d2=60 #mm #Diameter of steel shaft\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Polar modulus of brass rod\n",
+ "J_b=pi*32**-1*d1**4 #mm**4 \n",
+ "\n",
+ "#Polar modulus of steel rod\n",
+ "J_s=pi*32**-1*d2**4 #mm**4\n",
+ "\n",
+ "#Considering bras Rod:AB\n",
+ "T1=J_b*q_b*(d1*2**-1)**-1 #N-mm \n",
+ "\n",
+ "#Considering Steel Rod:BC\n",
+ "T2=J_s*q_s*(d2*2**-1)**-1 #N-mm\n",
+ "\n",
+ "#Max Torque that can be applied\n",
+ "T2\n",
+ "\n",
+ "#Let theta_b and theta_s be the rotations in Brass and steel respectively\n",
+ "theta_b=T2*L_b*(G_b*J_b)**-1 #Radians\n",
+ "theta_s=T2*L_s*(G_s*J_s)**-1 #Radians\n",
+ "\n",
+ "theta=theta_b+theta_s #Radians #Rotation of free end\n",
+ "\n",
+ "#Result\n",
+ "print\"Total of free end is\",round(theta,3),\"Radians\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total of free end is 0.076 Radians\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.15,Page No.241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "G=80*10**3 #N/mm**2 #Modulus of Rigidity\n",
+ "d1=100 #mm #Outer diameter of hollow shft\n",
+ "d2=80 #mm #Inner diameter of hollow shaft\n",
+ "d=80 #mm #diameter of Solid shaft\n",
+ "d3=60 #mm #diameter of Solid shaft having L=0.5m\n",
+ "L1=300 #mm #Length of Hollow shaft\n",
+ "L2=400 #mm #Length of solid shaft\n",
+ "L3=500 #mm #LEngth of solid shaft of diameter 60mm\n",
+ "T1=2*10**6 #N-mm #Torsion in Shaft AB\n",
+ "T2=1*10**6 #N-mm #Torsion in shaft BC\n",
+ "T3=1*10**6 #N-mm #Torsion in shaft CD\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Now Polar modulus of section AB\n",
+ "J1=pi*32**-1*(d1**4-d2**4) #mm**4 \n",
+ "\n",
+ "#Polar modulus of section BC\n",
+ "J2=pi*32**-1*d**4 #mm**4\n",
+ "\n",
+ "#Polar modulus of section CD\n",
+ "J3=pi*32**-1*d3**4 #mm**4\n",
+ "\n",
+ "#Now angle of twist of AB\n",
+ "theta1=T1*L1*(G*J1)**-1 #radians\n",
+ "\n",
+ "#Angle of twist of BC\n",
+ "theta2=T2*L2*(G*J2)**-1 #radians\n",
+ "\n",
+ "#Angle of twist of CD\n",
+ "theta3=T3*L3*(G*J3)**-1 #radians\n",
+ "\n",
+ "#Angle of twist\n",
+ "theta=theta1-theta2+theta3 #Radians\n",
+ "\n",
+ "#Shear stress in AB From Torsion Equation\n",
+ "q_s1=T1*(d1*2**-1)*J1**-1 #N/mm**2 \n",
+ "\n",
+ "#Shear stress in BC\n",
+ "q_s2=T2*(d*2**-1)*J2**-1 #N/mm**2 \n",
+ "\n",
+ "#Shear stress in CD\n",
+ "q_s3=T3*(d3*2**-1)*J3**-1 #N-mm**2\n",
+ "\n",
+ "#As max shear stress occurs in portion CD,so consider CD\n",
+ "\n",
+ "#Result\n",
+ "print\"Angle of twist at free end is\",round(theta,5),\"Radian\"\n",
+ "print\"Max Shear stress\",round(q_s3,2),\"N/mm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle of twist at free end is 0.00496 Radian\n",
+ "Max Shear stress 23.58 N/mm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.16,Page No.242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "L=1000 #mm #Length of bar\n",
+ "L1=600 #mm #Length of Bar AB\n",
+ "L2=400 #mm #Length of Bar BC\n",
+ "d1=60 #mm #Outer Diameter of bar BC\n",
+ "d2=30 #mm #Inner Diameter of bar BC\n",
+ "d=60 #mm #Diameter of bar AB\n",
+ "T=2*10**6 #N-mm #Total Torque\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Polar Modulus of Portion AB\n",
+ "J1=pi*32**-1*d**4 #mm*4\n",
+ "\n",
+ "#Polar Modulus of Portion BC\n",
+ "J2=pi*32**-1*(d1**4-d2**4) #mm**4\n",
+ "\n",
+ "#Let T1 be the torque resisted by bar AB and T2 be torque resisted by Bar BC\n",
+ "#Let theta1 and theta2 be the rotation of shaft in portion AB & BC\n",
+ "\n",
+ "#theta1=T1*L1*(G*J1)**-1 #radians\n",
+ "#After substituting values and further simplifying we get \n",
+ "#theta1=32*600*T1*(pi*60**4*G)**-1\n",
+ "\n",
+ "#theta2=T2*L*(J2*G)**-1 #Radians\n",
+ "#After substituting values and further simplifying we get \n",
+ "#theta2=32*400*T2*(pi*60**4*(1-0.5**4)*G)**-1 \n",
+ "\n",
+ "#Now For consistency of Deformation,theta1=theta2\n",
+ "#After substituting values and further simplifying we get \n",
+ "#T1=0.7111*T2 ..................................................(1)\n",
+ "\n",
+ "#But T1+T2=T=2*10**6 ...........................................(2)\n",
+ "#Substituting value of T1 in above equation\n",
+ "\n",
+ "T2=T*(0.7111+1)**-1\n",
+ "T1=0.71111*T2\n",
+ "\n",
+ "#Max stress in Portion AB\n",
+ "q_s1=T1*(d*2**-1)*(J1)**-1 #N/mm**2\n",
+ "\n",
+ "#Max stress in Portion BC\n",
+ "q_s2=T2*(d1*2**-1)*J2**-1 #N/mm**2 \n",
+ "\n",
+ "#Result\n",
+ "print\"Stresses Developed in Portion:AB\",round(q_s1,2),\"N/mm**2\"\n",
+ "print\" :BC\",round(q_s2,2),\"N/mm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stresses Developed in Portion:AB 19.6 N/mm**2\n",
+ " :BC 29.4 N/mm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.17,Page No.243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d1=80 #mm #External Diameter of Brass tube\n",
+ "d2=50 #mm #Internal Diameter of Brass tube\n",
+ "d=50 #mm #Diameter of steel Tube\n",
+ "G_b=40*10**3 #N/mm**2 #Modulus of Rigidity of brass tube\n",
+ "G_s=80*10**3 #N/mm**2 #Modulus of rigidity of steel tube\n",
+ "T=6*10**6 #N-mm #Torque\n",
+ "L=2000 #mm #Length of Tube\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Polar Modulus of brass tube\n",
+ "J1=pi*32**-1*(d1**4-d2**4) #mm**4 \n",
+ "\n",
+ "#Polar modulus of steel Tube\n",
+ "J2=pi*32**-1*d**4 #mm**4\n",
+ "\n",
+ "#Let T_s & T_b be the torque resisted by steel and brass respectively\n",
+ "#Then, T_b+T_s=T ............................................(1)\n",
+ "\n",
+ "#Since the angle of twist will be the same\n",
+ "#Theta1=Theta2\n",
+ "#After substituting values and further simplifying we get \n",
+ "#Ts=0.360*Tb ...........................................(2)\n",
+ "\n",
+ "#After substituting value of Ts in eqn 1 and further simplifying we get \n",
+ "T_b=T*(0.36+1)**-1 #N-mm\n",
+ "T_s=0.360*T_b\n",
+ "\n",
+ "#Let q_s and q_b be the max stress in steel and brass respectively\n",
+ "q_b=T_b*(d1*2**-1)*J1**-1 #N/mm**2\n",
+ "q_s=T_s*(d2*2**-1)*J2**-1 #N/mm**2\n",
+ "\n",
+ "#Since angle of twist in brass=angle of twist in steel\n",
+ "theta_s=T_s*L*(J2*G_s)**-1\n",
+ "\n",
+ "#Result\n",
+ "print\"Stresses Developed in Materials are:Brass\",round(q_b,2),\"N/mm**2\"\n",
+ "print\" :Steel\",round(q_s,2),\"N/mm**2\"\n",
+ "print\"Angle of Twist in 2m Length\",round(theta_s,3),\"Radians\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stresses Developed in Materials are:Brass 51.79 N/mm**2\n",
+ " :Steel 64.71 N/mm**2\n",
+ "Angle of Twist in 2m Length 0.065 Radians\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.18,Page No.245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d1=60 #mm #External Diameter of aluminium Tube\n",
+ "d2=40 #mm #Internal Diameter of aluminium Tube\n",
+ "d=40 #mm #Diameter of steel tube\n",
+ "q_a=60 #N/mm**2 #Permissible stress in aluminium\n",
+ "q_s=100 #N/mm**2 #Permissible stress in steel tube\n",
+ "G_a=27*10**3 #N/mm**2 \n",
+ "G_s=80*10**3 #N/mm**2 \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Polar modulus of aluminium Tube\n",
+ "J_a=pi*32**-1*(d1**4-d2**4) #mm**4\n",
+ "\n",
+ "#Polar Modulus of steel Tube\n",
+ "J_s=pi*32**-1*d**4 #mm**4\n",
+ "\n",
+ "#Now the angle of twist of steel tube = angle of twist of aluminium tube\n",
+ "#T_s*L_s*(J_s*theta_s)**-1=T_a*L_a*(J_a*theta_a)**-1\n",
+ "#After substituting values in above Equation and Further simplifyin we get\n",
+ "#T_s=0.7293*T_a .....................(1)\n",
+ "\n",
+ "#If steel Governs the resisting capacity\n",
+ "T_s1=q_s*J_s*(d*2**-1)**-1 #N-mm\n",
+ "T_a1=T_s1*0.7293**-1 #N-mm\n",
+ "T1=(T_s1+T_a1)*10**-6 #KN-m #Total Torque in steel Tube\n",
+ "\n",
+ "#If aluminium Governs the resisting capacity \n",
+ "T_a2=q_a*J_a*(d1*2**-1) #N-mm\n",
+ "T_s2=T_a2*0.7293 #N-mm\n",
+ "T2=(T_s2+T_a2)*10**-6 #KN-m #Total Torque in aluminium tube\n",
+ "\n",
+ "#Result\n",
+ "print\"Steel Governs the torque carrying capacity\",round(T1,2),\"KN-m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steel Governs the torque carrying capacity 2.98 KN-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.19,Page No.247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "P=225*10**6 #N-mm/sec #Power Trasmitted\n",
+ "q_b=80 #N/mm**2 #Shear stress\n",
+ "n=200 #Rpm\n",
+ "q_k=100 #N/mm**2 #PErmissible stress in Keys\n",
+ "D=300 #mm #Diameter of bolt circle\n",
+ "L=150 #mm #Length of shear key\n",
+ "d=16 #mm #Diameterr of bolt\n",
+ "\n",
+ "#Calculations\n",
+ "T=60*P*(2*pi*n)**-1 #N-mm #Torque\n",
+ "\n",
+ "#Now From Torsion Formula\n",
+ "#T*J**-1=q_s*R**-1\n",
+ "#After substituting values we get\n",
+ "#T=pi*16*d**3*n\n",
+ "#After further simplifying we get\n",
+ "d1=(T*16*(pi*q_s)**-1)**0.33333\n",
+ "\n",
+ "#Let b be the width of shear Key\n",
+ "#T=q_k*L*b*R\n",
+ "#After simplifying further we get\n",
+ "b=T*(q_k*L*(d1*2**-1))**-1 #mm\n",
+ "\n",
+ "#Let n2 be the no. of bolts required at bolt circle of radius\n",
+ "R_b=D*2**-1 #mm \n",
+ "\n",
+ "n2=T*4*(q_b*pi*d**2*R_b)**-1\n",
+ "\n",
+ "#result\n",
+ "print\"Minimum no. of Bolts Required are\",round(n2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum no. of Bolts Required are 4.45\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.20,Page No.250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "T=2*10**6 #N-mm #Torque transmitted\n",
+ "G=80*10**3 #N/mm**2 #Modulus of rigidity\n",
+ "d1=40 #mm \n",
+ "d2=80 #mm\n",
+ "r1=20 #mm\n",
+ "r2=40 #mm\n",
+ "L=2000 #mm #Length of shaft\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Angle of twist \n",
+ "theta=2*T*L*(r1**2+r1*r2+r2**2)*(3*pi*G*r2**3*r1**3)**-1 #radians\n",
+ "\n",
+ "#If the shaft is treated as shaft of average Diameter\n",
+ "d_avg=(d1+d2)*2**-1 #mm\n",
+ "\n",
+ "theta1=T*L*(G*pi*32**-1*d_avg**4)**-1 #Radians\n",
+ "\n",
+ "#Percentage Error\n",
+ "#Let Percentage Error be E\n",
+ "X=theta-theta1\n",
+ "E=(X*theta**-1)*100 \n",
+ "\n",
+ "#Result\n",
+ "print\"Percentage Error is\",round(E,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage Error is 32.28 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.21,Page No.252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "G=80*10**3 #N/mm**2 \n",
+ "P=1*10**9 #N-mm/sec #Power\n",
+ "n=300 \n",
+ "d1=150 #mm #Outer Diameter\n",
+ "d2=120 #mm #Inner Diameter\n",
+ "L=2000 #mm #Length of circular shaft\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm\n",
+ "\n",
+ "#Polar Modulus \n",
+ "J=pi*32**-1*(d1**4-d2**4) #mm**4\n",
+ "\n",
+ "q_s=T*J**-1*(d1*2**-1) #N/mm**2 \n",
+ "\n",
+ "\n",
+ "#Strain ENergy\n",
+ "U=q_s**2*(4*G)**-1*pi*4**-1*(d1**2-d2**2)*L\n",
+ "\n",
+ "#Result\n",
+ "print\"Max shear stress is\",round(q_s,2),\"N/mm**2\"\n",
+ "print\"Strain Energy stored in the shaft is\",round(U,2),\"N-mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max shear stress is 81.36 N/mm**2\n",
+ "Strain Energy stored in the shaft is 263181.37 N-mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.22,Page No.254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d=12 #mm #Diameter of helical spring\n",
+ "D=150 #mm #Mean Diameter\n",
+ "R=D*2**-1 #mm #Radius of helical spring\n",
+ "n=10 #no.of turns\n",
+ "G=80*10**3 #N/mm**2 \n",
+ "W=450 #N #Load\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Max shear stress \n",
+ "q_s=16*W*R*(pi*d**3)**-1 #N/mm**2\n",
+ "\n",
+ "#Strain Energy stored\n",
+ "U=32*W**2*R**3*n*(G*d**4)**-1 #N-mm\n",
+ "\n",
+ "#Deflection Produced\n",
+ "dell=64*W*R**3*n*(G*d**4)**-1 #mm\n",
+ "\n",
+ "#Stiffness Spring\n",
+ "k=W*dell**-1 #N/mm\n",
+ "\n",
+ "#Result\n",
+ "print\"Max shear stress is\",round(q_s,2),\"N/mm**2\"\n",
+ "print\"Strain Energy stored is\",round(U,2),\"N-mm\"\n",
+ "print\"Deflection Produced is\",round(dell,2),\"mm\"\n",
+ "print\"Stiffness spring is\",round(k,2),\"N/mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max shear stress is 99.47 N/mm**2\n",
+ "Strain Energy stored is 16479.49 N-mm\n",
+ "Deflection Produced is 73.24 mm\n",
+ "Stiffness spring is 6.14 N/mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.23,Page No.255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "K=5 #N/mm #Stiffness\n",
+ "L=100 #mm #Solid Length\n",
+ "q_s=60 #N/mm**2 #Max shear stress\n",
+ "W=200 #N #Max Load\n",
+ "G=80*10**3 #N/mm**2\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#K=W*dell**-1\n",
+ "#After substituting values and further simplifying we get\n",
+ "#d=0.004*R**3*n ........(1) #mm #Diameter of wire\n",
+ "#n=L*d**-1 ........(2)\n",
+ "\n",
+ "#From Shearing stress\n",
+ "#q_s=16*W*R*(pi*d**3)**-1 \n",
+ "#After substituting values and further simplifying we get\n",
+ "#d**4=0.004*R**3*n .................(4)\n",
+ "\n",
+ "#From Equation 1,2,3\n",
+ "#d**4=0.004*(0.0785*d**3)**3*100*d**-1\n",
+ "#after further simplifying we get\n",
+ "d=5168.101**0.25\n",
+ "n=100*d**-1\n",
+ "R=(d**4*(0.004*n)**-1)**0.3333\n",
+ "\n",
+ "#Result\n",
+ "print\"Diameter of Wire is\",round(d,2),\"mm\"\n",
+ "print\"No.of turns is\",round(n,2)\n",
+ "print\"Mean Radius of spring is\",round(R,2),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of Wire is 8.48 mm\n",
+ "No.fo turns is 11.79\n",
+ "Mean Radius of spring is 47.83 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.24,Page No.255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "m=5*10**5 #Wagon Weighing\n",
+ "v=18*1000*36000**-1 \n",
+ "d=300 #mm #Diameter of Beffer springs\n",
+ "n=18 #no.of turns\n",
+ "G=80*10**3 #N/mm**2\n",
+ "dell=225\n",
+ "R=100 #mm #Mean Radius\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Energy of Wagon\n",
+ "E=m*v**2*(9.81*2)**-1 #N-mm\n",
+ "\n",
+ "#Load applied\n",
+ "W=dell*G*d**4*(64*R**3*n)**-1 #N \n",
+ "\n",
+ "#Energy each spring can absorb is\n",
+ "E2=W*dell*2**-1 #N-mm\n",
+ "\n",
+ "#No.of springs required to absorb energy of Wagon\n",
+ "n2=E*E2**-1 *10**7\n",
+ "\n",
+ "#Result\n",
+ "print\"No.of springs Required for Buffer is\",round(n2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No.of springs Required for Buffer is 4.47\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.25,Page No.259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "b=180 #mm #width of flange\n",
+ "d=10 #mm #Depth of flange\n",
+ "t=10 #mm #Thickness of flange\n",
+ "D=400 #mm #Overall Depth \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "I_xx=1*12**-1*(b*D**3-(b-t)*(D-2*d)**3)\n",
+ "I_yy=1*12**-1*((D-2*d)*t**3+2*t*b**3)\n",
+ "\n",
+ "#If warping is neglected\n",
+ "J=I_xx+I_yy #mm**4\n",
+ "\n",
+ "#Since b/d>1.6,we get\n",
+ "J2=1*3**-1*d**3*b*(1-0.63*d*b**-1)*2+1*3**-1*t**3*(D-2*d)*(1-0.63*t*b**-1)\n",
+ "\n",
+ "#Over Estimation of torsional Rigidity would have been \n",
+ "T=J*J2**-1\n",
+ "\n",
+ "#Result\n",
+ "print\"Error in assessing torsional Rigidity if the warping is neglected is\",round(T,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Error in assessing torsional Rigidity if the warping is neglected is 808.28\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.26,Page No.261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d1=100 #mm #Outer Diameter\n",
+ "d2=95 #mm #Inner Diameter\n",
+ "T=2*10**6 #N-mm #Torque\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "J=pi*32**-1*(d1**4-d2**4) #mm**4 #Polar Modulus\n",
+ "\n",
+ "#Shear stress\n",
+ "q_max=T*J**-1*d1*2**-1 #N/mm**2 \n",
+ "\n",
+ "#Now theta*L**-1=T*(G*J)**-1\n",
+ "#After substituting values and further simplifying we get\n",
+ "#Let theta*L**-1=X\n",
+ "X=T*J**-1\n",
+ "\n",
+ "#Now Treating it as very thin walled tube\n",
+ "d=(d1+d2)*2**-1 #mm\n",
+ "\n",
+ "r=d*2**-1 \n",
+ "t=(d1-d2)*2**-1\n",
+ "q_max2=T*(2*pi*r**2*t)**-1 #N/mm**2\n",
+ "\n",
+ "X2=T*(2*pi*r**3*t)**-1 \n",
+ "\n",
+ "#Result\n",
+ "print\"When it is treated as hollow shaft:Max shear stress\",round(q_max,2),\"N/mm**2\"\n",
+ "print\" :Angle of Twist per unit Length\",round(X,3)\n",
+ "print\"When it is very thin Walled Tube :Max shear stress\",round(q_max2,2),\"N/mm**2\"\n",
+ "print\" :Angle of twist per Unit Length\",round(X2,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When it is treated as hollow shaft:Max shear stress 54.91 N/mm**2\n",
+ " :Angle of Twist per unit Length 1.098\n",
+ "When it is very thin Walled Tube :Max shear stress 53.57 N/mm**2\n",
+ " :Angle of twist per Unit Length 1.099\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/sample_notebooks/S PRASHANTHS PRASHANTH/Chapter_1_4.ipynb b/sample_notebooks/S PRASHANTHS PRASHANTH/Chapter_1_4.ipynb
new file mode 100644
index 00000000..8713fcf8
--- /dev/null
+++ b/sample_notebooks/S PRASHANTHS PRASHANTH/Chapter_1_4.ipynb
@@ -0,0 +1,593 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Circuit Configuration for Linear Integrated Ciruits"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1 Page No:1.81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "adm= -1482.0\n",
+ "acm= -1.0\n",
+ "cmrr= 76.4838188131 db\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "rc=50000;#ohm\n",
+ "re=100000;#ohm\n",
+ "rs=10000;#ohm\n",
+ "rp=50000;#ohm\n",
+ "beta0=2000;\n",
+ "r0=400000;#ohm\n",
+ "\n",
+ "\n",
+ "\n",
+ "#determine adm,acm,cmrr\n",
+ "#calculation\n",
+ "rc1=(rc*r0)/(rc+r0);\n",
+ "adm=(-(beta0*rc1)/(rs+rp))#differential mode gain\n",
+ "acm=(-(beta0*rc1)/(rs+rp+2*re*(beta0+1)))#common mode gain\n",
+ "import math\n",
+ "cmrr=20*(math.log10((1+((2*re*(beta0+1))/(rs+rp)))))#common mode rejection ratio\n",
+ "\n",
+ "#result\n",
+ "print 'adm=',round(adm,3);\n",
+ "print 'acm=',round(acm,3);\n",
+ "print 'cmrr=',cmrr,'db'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2 Page No:1.83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum peak amplitude at 100khz 3.185 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=0.000001;#volt/sec\n",
+ "freq=100000;\n",
+ "vsat=12;\n",
+ "baw=100000;\n",
+ "#determine vx\n",
+ "\n",
+ "#calculation\n",
+ "vx=2*(1/(sr*2*3.14*freq))\n",
+ "\n",
+ "#result\n",
+ "print 'maximum peak amplitude at 100khz',round(vx,3),'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3 Page No: 1.84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "slew rate= 5 volt/μsec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "V=20;\n",
+ "t=4;\n",
+ "#determine slew rate\n",
+ "#calculation\n",
+ "w=V/t\n",
+ "#result\n",
+ "print'slew rate=',w,'volt/μsec'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4 Page No: 1.84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "max frequency of input is 79617.8343949 hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "a=50;\n",
+ "vi=20e-3;\n",
+ "sr=0.5e6;\n",
+ "#determine max frequency\n",
+ "#calculation\n",
+ "vm=a*vi;\n",
+ "freq=sr/(2*3.14*vm)\n",
+ "#result\n",
+ "print 'max frequency of input is ',freq,'hz'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5 Page No: 1.84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "max peak to peak input signal 0.398089171975 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=0.5e6;\n",
+ "freq=40e3;\n",
+ "a=10;\n",
+ "#determine max peak to peak input signal\n",
+ "#calculation\n",
+ "vm=sr/(2*3.14*freq);\n",
+ "vm=2*vm;\n",
+ "v1=vm/a\n",
+ "#result\n",
+ "print'max peak to peak input signal ',v1,'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6 Page No: 1.85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "noise 0.0063247 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "adm=400;\n",
+ "cmrr=50;\n",
+ "vin1=50e-3;\n",
+ "vin2=60e-3;\n",
+ "vnoise=5e-3;\n",
+ "#calculation\n",
+ "v0=(vin2-vin1)*adm;\n",
+ "acm=adm/316.22;\n",
+ "v1=vnoise*acm\n",
+ "print'noise ',round(v1,7),'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7 Page No: 1.86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time to change from 0 t0 15 4e-07 sec\n",
+ "slew rate 1.5 volt/μsec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=35e6;#volt/sec\n",
+ "vsat=15;#volt\n",
+ "#determine time to change from 0 to 15V\n",
+ "#calculation\n",
+ "c=100e-12;#farad\n",
+ "i=150e-6;#A\n",
+ "w=vsat/sr\n",
+ "w1=i/c;\n",
+ "#result\n",
+ "print'time to change from 0 t0 15 ',round(w,7),'sec'\n",
+ "print'slew rate',w1/1000000,'volt/μsec'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8 Page No: 1.86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "bandwidth 21231.4225053 hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=2e6;#v/sec\n",
+ "vsat=15;#volt\n",
+ "#determine bandwidth \n",
+ "#calculation\n",
+ "\n",
+ "bw=sr/(2*3.14*vsat)\n",
+ "#result\n",
+ "print'bandwidth ',bw,'hz'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9 Page No: 1.87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "output offset 3.0 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "iin=30e-9;#A\n",
+ "a=1e5;\n",
+ "rin=1000;#ohm\n",
+ "#determine output offset voltage\n",
+ "#calculation\n",
+ "vid=iin*rin;\n",
+ "v0=a*vid\n",
+ "#result\n",
+ "print'output offset ',v0,'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10 Page No: 1.86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "input offset current 4e-06 A\n",
+ "input base current 2.4e-05 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "inb1=22e-6;#A\n",
+ "inb2=26e-6;#A\n",
+ "#determine input offset current input base current\n",
+ "#calculation\n",
+ "i1=inb2-inb1\n",
+ "i2=(inb2+inb1)/2\n",
+ "#result\n",
+ "print'input offset current ',i1,'A'\n",
+ "print'input base current ',i2,'A'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 11 Page No: 1.86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "input base current 8e-08 A\n",
+ "input offset current 2e-08 A\n",
+ "input offset 2.0 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "inb2=90e-9;#A\n",
+ "inb1=70e-9;#A\n",
+ "a=1e5;\n",
+ "#determine input offset current\n",
+ "#calculation\n",
+ "i1=(inb2+inb1)/2\n",
+ "i2=inb2-inb1\n",
+ "v1=((inb2-inb1)*1000)*a\n",
+ "print'input base current ',i1,'A'\n",
+ "print'input offset current ',i2,'A'\n",
+ "print'input offset ',v1,'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12 Page No: 1.87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "output voltage cmrr 100 0.051 V\n",
+ "output voltage cmrr 200 0.051 V\n",
+ "output voltage cmrr 450 0.05 V\n",
+ "output voltage cmrr 105 0.051 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "vin1=150e-6;#volt\n",
+ "vin2=100e-6;#volt\n",
+ "a=1000;\n",
+ "from array import *\n",
+ "cmrr=array('i',[100,200,450,105])\n",
+ "#determine output voltage\n",
+ "#calculation\n",
+ "vc=(vin1+vin2)/2;\n",
+ "vd=(vin1-vin2);\n",
+ "j=0;\n",
+ "while j<=3 :v0=(a*vd*(1+(vc/(cmrr[j]*vd)))) ;print 'output voltage cmrr ',cmrr[j],' ',round(v0,3),'V';j=j+1;\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13 Page No: 1.87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "output voltage 0.003 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "rin=100e3;#ohm\n",
+ "rf1=900e3;#ohm\n",
+ "vc=1;#volt\n",
+ "cmrr=70;\n",
+ "#determine the output voltage\n",
+ "#calculation\n",
+ "v0=(1+(rf1/rin))*vc/3160\n",
+ "print 'output voltage ',round(v0,3),'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14 Page No: 1.89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "input voltage 0.08 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=0.5e6;#volt/sec\n",
+ "a=50;\n",
+ "freq=20e3;#hz\n",
+ "#determine max peak to peak voltage\n",
+ "#calculation\n",
+ "v1=sr/(2*3.14*freq*a)\n",
+ "print'input voltage ',round(v1,3),'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15 Page No: 1.90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "max frequency 26.539 Khz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=50e6;#volt/sec\n",
+ "rin=2;\n",
+ "vimax=10;\n",
+ "#determine max frequency\n",
+ "#calculation\n",
+ "vm=vimax*(1+rin);\n",
+ "freq=sr/(2*3.14*vm)/10e3;\n",
+ "print 'max frequency ',round(freq,3),'Khz'\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}