summaryrefslogtreecommitdiff
path: root/Machine_Design-I_by_Dr._Sadhu_Singh/chapter8.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Machine_Design-I_by_Dr._Sadhu_Singh/chapter8.ipynb')
-rw-r--r--Machine_Design-I_by_Dr._Sadhu_Singh/chapter8.ipynb753
1 files changed, 753 insertions, 0 deletions
diff --git a/Machine_Design-I_by_Dr._Sadhu_Singh/chapter8.ipynb b/Machine_Design-I_by_Dr._Sadhu_Singh/chapter8.ipynb
new file mode 100644
index 00000000..f1479e25
--- /dev/null
+++ b/Machine_Design-I_by_Dr._Sadhu_Singh/chapter8.ipynb
@@ -0,0 +1,753 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8 - Mechanical Springs"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## exa 8.1 Pg 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Wahl's correction factor = 1.184 \n",
+ " \n",
+ " Wire diameter = 4.15 mm. Use 4.25 mm.\n",
+ " \n",
+ " Mean coil diameter = 34 mm.\n",
+ " \n",
+ " no. of active turns = 14\n",
+ " \n",
+ " total no. of turns for squared and ground ends = 16\n",
+ " \n",
+ " Free length of spring = 123.0 mm Use 124 mm\n",
+ " \n",
+ " Pitch of coils = 8.30 mm\n",
+ " \n",
+ " Check for buckling - \n",
+ " \n",
+ " ratio lf/Dm = 3.647 > 2.6. So, Providing guide is necessary.\n",
+ " \n",
+ " Critical load for buckling - \n",
+ " \n",
+ " Fcr = 170.5 N for hinged ends < Fmax\n",
+ " \n",
+ " Fcr = 480.5 N for fixed ends > Fmax\n",
+ " \n",
+ " From above two calculatio, it can be seen that spring is safe in buckling for fixed ends.\n",
+ " \n",
+ "\n",
+ " Lowest natural frequency for both ends fixed, fn = 3.079 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "# Given Data\n",
+ "Fmin=250## N\n",
+ "Fmax=300## N\n",
+ "Del=8## mm\n",
+ "C=8## spring index\n",
+ "tau_d=420## MPa\n",
+ "G=84## GPa\n",
+ "\n",
+ "# 1. Wahl's correction factor\n",
+ "Kw=(4*C-1)/(4*C-4)+0.615/C## Wahl's correction factor\n",
+ "print \"\\n Wahl's correction factor = %.3f \"%(Kw)\n",
+ "# 2. Wire diameter\n",
+ "# tau_d=Kw*8*Fmax*C/pi/d**2\n",
+ "d=sqrt(Kw*8*Fmax*C/pi/tau_d)## mm\n",
+ "print ' \\n Wire diameter = %.2f mm. Use 4.25 mm.'%(d)\n",
+ "d=4.25## mm\n",
+ "# 3. Mean coil diameter\n",
+ "Dm=8*d## mm\n",
+ "print ' \\n Mean coil diameter = %.f mm.'%(Dm)\n",
+ "# 4. Stiffness of spring\n",
+ "k=(Fmax-Fmin)/Del## N/mm\n",
+ "# 5. no. of active turns\n",
+ "n = G*10**3*d/8/C**3/k ## no. of active turns\n",
+ "print ' \\n no. of active turns = %.f'%(n)\n",
+ "# 6. total no. of turns for squared and ground ends\n",
+ "nt=n+2## total no. of turns for squared and ground ends\n",
+ "print ' \\n total no. of turns for squared and ground ends = %.f'%(nt)\n",
+ "# 7. Free length of spring\n",
+ "#lf=l_s+del_max+clashallowance(=0.15*del_max)\n",
+ "del_max=Del*Fmax/(Fmax-Fmin)##mm\n",
+ "l_s=nt*d## mm\n",
+ "lf=l_s+del_max+0.15*del_max## mm\n",
+ "print ' \\n Free length of spring = %.1f mm Use 124 mm'%(lf)\n",
+ "lf=124##mm\n",
+ "# 8. Pitch of coils\n",
+ "p=lf/(nt-1)##mm\n",
+ "print ' \\n Pitch of coils = %.2f mm'%(p)\n",
+ "# 9. Check for buckling\n",
+ "print ' \\n Check for buckling - '\n",
+ "m=lf/Dm## > 2.6 provided guide\n",
+ "print ' \\n ratio lf/Dm = %.3f > 2.6. So, Providing guide is necessary.'%(m)\n",
+ "kl_1=0.22## for hinged ends\n",
+ "kl_2=0.62## for fixed ends\n",
+ "Fcr_1=k*kl_1*lf##N (for hinged ends)\n",
+ "Fcr_2=k*kl_2*lf##N (for fixed ends)\n",
+ "print ' \\n Critical load for buckling - '\n",
+ "print ' \\n Fcr = %.1f N for hinged ends < Fmax'%(Fcr_1)\n",
+ "print ' \\n Fcr = %.1f N for fixed ends > Fmax'%(Fcr_2)\n",
+ "print ' \\n From above two calculatio, it can be seen that spring is safe in buckling for fixed ends.'\n",
+ "# 10. Lowest natural frequency for both ends fixed\n",
+ "rau=7800## N/mm.cube. (Density of spring material)\n",
+ "fn=d/(pi*n*Dm**2)*sqrt(G*10**3/8/(rau*10**-9))##\n",
+ "print ' \\n\\n Lowest natural frequency for both ends fixed, fn = %.3f Hz'%(fn)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## exa 8.2 Pg 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " \n",
+ " factor of safety = 1.44\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "# Given Data\n",
+ "Fmin=60## N\n",
+ "Fmax=140## N\n",
+ "d=3## mm\n",
+ "Dm=18## mm\n",
+ "Sut=1430## MPa\n",
+ "\n",
+ "C=Dm/d## spring index\n",
+ "Kw=(4*C-1)/(4*C-4)+0.615/C## Wahl's correction factor\n",
+ "Ks=1+0.5/C## Shear Stress factor\n",
+ "Fm=(Fmax+Fmin)/2## N\n",
+ "Fa=(Fmax-Fmin)/2## N\n",
+ "tau_m=Ks*(8*Fm*C)/(pi*d**2)## MPa\n",
+ "tau_a=Kw*(8*Fa*C)/(pi*d**2)## MPa\n",
+ "Ses_dash=0.22*Sut## MPa\n",
+ "Sys=0.45*Sut## MPa\n",
+ "#tau_m/Sys+tua_a/Ses_dash*(2-Ses_dash/Sys)=1/n\n",
+ "n=1/(tau_m/Sys+tau_a/Ses_dash*(2-Ses_dash/Sys))## factor of safety\n",
+ "print ' \\n factor of safety = %.2f'%(n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## exa 8.3 Pg 229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ " Wahl's correction factor = 1.2525 \n",
+ " \n",
+ " Initial tortional shear stress = 85.05 MPa\n",
+ " \n",
+ " spring stiffness = 9.72 N/mm\n",
+ " \n",
+ " Spring load to cause yielding = 305.7 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "# Given Data\n",
+ "Fi=40## N\n",
+ "d=3## mm\n",
+ "C=6## spring index\n",
+ "n=15## factor of safety\n",
+ "tau=650## N/mm.sq.\n",
+ "G=84## kN/mm.sq.\n",
+ "\n",
+ "# Wahl's correction factor\n",
+ "Kw=(4*C-1)/(4*C-4)+0.615/C## Wahl's correction factor\n",
+ "print \"\\n Wahl's correction factor = %.4f \"%Kw\n",
+ "\n",
+ "# Initial tortional shear stress\n",
+ "tau_i=Kw*(8*Fi*C)/(pi*d**2)## MPa\n",
+ "print ' \\n Initial tortional shear stress = %.2f MPa'%(tau_i)\n",
+ "k=G*10**3*d/(8*C**3*n)## spring stiffness\n",
+ "print ' \\n spring stiffness = %.2f N/mm'%(k)\n",
+ "# Spring load to cause yielding\n",
+ "#tau=Kw*(8*Fi*C)/(pi*d**2)\n",
+ "F=tau/(Kw*(8*C)/(pi*d**2))\n",
+ "print ' \\n Spring load to cause yielding = %.1f N'%(F)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## exa 8.4 Pg 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " \n",
+ " diameter of spring wire = 8.48 mm or 9 mm\n",
+ " \n",
+ " Mean coil diameter = 54 mm\n",
+ " \n",
+ " no. of active coils = 9\n",
+ " \n",
+ " free length of spring = 127.75 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi,ceil\n",
+ "# Given Data\n",
+ "Fmin=500## N\n",
+ "Fmax=1200## N\n",
+ "C=6## spring index\n",
+ "n=1.5## factor of safety\n",
+ "Sys=760## MPa\n",
+ "Ses_dash=350## MPa\n",
+ "Del=25## mm\n",
+ "G=82## kN/mm.sq.\n",
+ "\n",
+ "Kw=(4*C-1)/(4*C-4)+0.615/C## Wahl's correction factor\n",
+ "Ks=1+0.5/C## Shear stress factor\n",
+ "Fm=(Fmax+Fmin)/2## N\n",
+ "Fa=(Fmax-Fmin)/2## N\n",
+ "tau_m_into_d_sq=Ks*(8*Fm*C)/(pi)## where tau_m_into_d_sq = tau_m*d**2\n",
+ "tau_a_into_d_sq=Kw*(8*Fa*C)/(pi)## where tau_a_into_d_sq = tau_a*d**2\n",
+ "\n",
+ "#(tau_m-tau_a)/Sys+2*tua_a/Ses_dash=1/n\n",
+ "d=sqrt(n)*sqrt((tau_m_into_d_sq-tau_a_into_d_sq)/Sys+2*tau_a_into_d_sq/Ses_dash)## mm\n",
+ "print ' \\n diameter of spring wire = %.2f mm or %.f mm'%(d, ceil(d))\n",
+ "d=ceil(d)## mm\n",
+ "Dm=C*d## mm\n",
+ "print ' \\n Mean coil diameter = %.f mm'%( Dm)\n",
+ "#del=8*Fmax*Ci**3/(G*d)\n",
+ "i=(Del/(8*Fmax*C**3/(G*10**3*d)))## no. of active coils\n",
+ "i=ceil(i)## no. of active coils\n",
+ "print ' \\n no. of active coils = %.f'%(i)\n",
+ "nt=i+2## no. of active coils (for square & ground ends)\n",
+ "lf=nt*d+1.15*Del## mm\n",
+ "print ' \\n free length of spring = %.2f mm'%(lf)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## exa 8.5 Pg 231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " \n",
+ " Force on the valve = 3534.3 N\n",
+ " \n",
+ " Maximum deflection = 60 mm\n",
+ " \n",
+ " Maximum force = 5301.4 N\n",
+ " \n",
+ " Wahls correction factor = 1.2525 \n",
+ " \n",
+ " Diameter of spring wire = 13 mm\n",
+ " \n",
+ " Mean coil diameter = 78 mm\n",
+ " \n",
+ " number of turns = 8 \n",
+ " \n",
+ " Total number of turns for square & ground ends = 10 \n",
+ " \n",
+ " Free length = 199 mm. Use 200 mm\n",
+ " \n",
+ " Pitch of coil = 22.1 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi,ceil\n",
+ "# Given Data\n",
+ "p=125## MPa\n",
+ "dv=60## mm\n",
+ "del1=40## mm\n",
+ "del2=20## mm\n",
+ "tau_max=600## MPa\n",
+ "G=85## kN/mm.sq.\n",
+ "C=6## spring index\n",
+ "\n",
+ "Fv=(pi/4)*dv**2*p/100## N (Force on the valve)\n",
+ "del_max=del1+del2## mm (Max. deflection)\n",
+ "Fmax=Fv*dv/del1## N (Max. force)\n",
+ "Kw=(4*C-1)/(4*C-4)+0.615/C## Wahl's correction factor\n",
+ "# tau = 8*Fmax*C*Kw/(pi*d**2)\n",
+ "d=sqrt((8*Fmax*C*Kw/(pi))/tau_max)## mm (Diameter of spring wire)\n",
+ "Dm=6*d## mm (Mean coil diameter)\n",
+ "n=G*10**3*d*del_max/(8*Fmax*C**3)## no. of turns\n",
+ "n = ceil(n)## no. of turns\n",
+ "nt=n+2## total no. of turns\n",
+ "lf=nt*d+1.15*del_max## mm (Free length)\n",
+ "p=lf/(nt-1)## mm (Pitch of coil)\n",
+ "print ' \\n Force on the valve = %.1f N'%(Fv)\n",
+ "print ' \\n Maximum deflection = %.f mm'%( del_max)\n",
+ "print ' \\n Maximum force = %.1f N'%( Fmax)\n",
+ "print ' \\n Wahl''s correction factor = %.4f '%(Kw)\n",
+ "print ' \\n Diameter of spring wire = %.f mm'%(d)\n",
+ "print ' \\n Mean coil diameter = %.f mm'%( Dm)\n",
+ "print ' \\n number of turns = %.f '%(n)\n",
+ "print ' \\n Total number of turns for square & ground ends = %.f '%(nt)\n",
+ "print ' \\n Free length = %.f mm. Use 200 mm'%(lf)\n",
+ "print ' \\n Pitch of coil = %.1f mm'%(p)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## exa 8.7 Pg 232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " \n",
+ " Spring force when valve is lifted = 1484.4 N\n",
+ " \n",
+ "\n",
+ " Design of spring - \n",
+ " \n",
+ " Spring stiffness = 61.85 N/mm\n",
+ " \n",
+ " Wahl's correction factor = 1.2525\n",
+ " \n",
+ " spring diameter = 7.54 mm or 8 mm\n",
+ " \n",
+ " no. of active coils = 6.29. Use n=7\n",
+ " \n",
+ " total no. of active coils = 8\n",
+ " \n",
+ " pitch of coils = 16.67 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi,ceil\n",
+ "from numpy.linalg import solve\n",
+ "# Given Data\n",
+ "dv=30## mm\n",
+ "Wv=10## N\n",
+ "Wl=25## N\n",
+ "lf=100## mm\n",
+ "del1=20## mm\n",
+ "p=3.5## N/mm.sq.\n",
+ "valve_lift=2## mm\n",
+ "C=6## spring index\n",
+ "tau=500## N/mm.sq.\n",
+ "G=0.84*10**5## N/mm.sq.\n",
+ "\n",
+ "W=(pi/4)*dv**2*p## N (load on the valve at operating condition)\n",
+ "W1=W-Wv##N (Net load on the valve at operating condition)\n",
+ "#W1*100=Wl*150+S1*200+P*300 # taking momens about the fulcrum\n",
+ "#S1*200+P*300=W1*100-Wl*150 ...eqn(1)\n",
+ "valve_lift=20*100/200## mm #from figure (when spring is extended by 20 mm)\n",
+ "spring_extension=2*200/100## mm # from figure (when valve is lifted 2 mm)\n",
+ "valve_load=W*12/10## N # (when valve is lifted 2 mm)\n",
+ "W2=valve_load-Wv## N # (when valve is lifted 2 mm)\n",
+ "del2=del1+4## mm (when valve is lifted)\n",
+ "#S2=S1*del2/del1## spring force when valve is lifted\n",
+ "#S1*del2/del1-s2=0 ... eqn(1)\n",
+ "#W2*100=Wl*150+S2*200+P*300 # taking momens about the fulcrum\n",
+ "#S2*200+P*300 =W2*100-Wl*150 ... eqn(2)\n",
+ "#S1*200+P*300=W1*100-Wl*150 ...eqn(3)\n",
+ "# solving above 3 eqn. by matrix method\n",
+ "A=[[del2/del1, -1, 0],[200, 0, 300],[0, 200, 300]]\n",
+ "B=[[0],[W1*100-Wl*150],[W2*100-Wl*150]]\n",
+ "X=solve(A,B)## solution matrix\n",
+ "S1=X[0]## N\n",
+ "S2=X[1]## N\n",
+ "print ' \\n Spring force when valve is lifted = %.1f N'%(S2)\n",
+ "print ' \\n\\n Design of spring - '\n",
+ "k=(S2-S1)/(del2-del1)## N/mm (Spring stiffness)\n",
+ "print ' \\n Spring stiffness = %.2f N/mm'%(k)\n",
+ "Kw=(4*C-1)/(4*C-4)+0.615/C## Wahl's correction factor\n",
+ "print \" \\n Wahl's correction factor = %.4f\"%(Kw)\n",
+ "# tau=Kw*8*S2*C/pi/d**2 max. shear stress\n",
+ "d=sqrt(Kw*8*S2*C/pi/tau)## mm (spring diameter)\n",
+ "print ' \\n spring diameter = %.2f mm or %.f mm'%(d,d)\n",
+ "d=ceil(d)## mm\n",
+ "# k=G*d/(8*C**3*n) (Spring stiffness)\n",
+ "n=G*d/(8*C**3*k)## no. of active coils\n",
+ "print ' \\n no. of active coils = %.2f. Use n=7'%(n)\n",
+ "n=ceil(n)## rounding\n",
+ "nt=n+1## total no. of active coils\n",
+ "print ' \\n total no. of active coils = %.f'%(nt)\n",
+ "p=lf/(n-1)## mm (pitch of coils)\n",
+ "print ' \\n pitch of coils = %.2f mm'%(p)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## exa 8.8 Pg 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " \n",
+ " Spring stiffness = 12.5 N/mm\n",
+ " \n",
+ " By hit and trial method and using value of C**3/d -\n",
+ " \n",
+ " value of Spring Index, C = 4.8 \n",
+ " \n",
+ " value of wire diameter, d = 3.9 mm\n",
+ " \n",
+ " But we adopt d=4 mm.\n",
+ " Hence, Spring Index = 4.84 \n",
+ " \n",
+ " Mean coil diameter = 19.36 mm\n",
+ " \n",
+ " Outside coil diameter = 23.36 mm < 25 mm. Hence design is ok.\n",
+ " \n",
+ " Wahls correction factor = 1.322 \n",
+ " \n",
+ " Maximum shear stress = 1018.54 N/mm.sq.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "\n",
+ "# Given Data\n",
+ "Fmin=0## N\n",
+ "Fmax=1000## N\n",
+ "Del=80## mm\n",
+ "Do=25## mm\n",
+ "n=30## no. of turns\n",
+ "G=85## kN/mm.sq.\n",
+ "\n",
+ "k=(Fmax-Fmin)/Del## N/mm (Spring stiffness)\n",
+ "print ' \\n Spring stiffness = %.1f N/mm'%(k)\n",
+ "# k=G*d/(8*C**3*n) (Spring stiffness)\n",
+ "C_cube_BY_d=G*10**3/(k*8*n)## \n",
+ "\n",
+ "def hitntrial(c3d,Do):\n",
+ " from numpy import arange\n",
+ " for C in arange(5.0,4.5,-0.1):\n",
+ " d=C**3/(c3d)#\n",
+ " Doo=d*C+C#\n",
+ " if Doo<Do :\n",
+ " break\n",
+ " \n",
+ " return [C,d]\n",
+ "\n",
+ "[C,d]=hitntrial(C_cube_BY_d,Do)\n",
+ "print ' \\n By hit and trial method and using value of C**3/d -'\n",
+ "print ' \\n value of Spring Index, C = %.1f '%(C)\n",
+ "print ' \\n value of wire diameter, d = %.1f mm'%(d)\n",
+ "print ' \\n But we adopt d=4 mm.'\n",
+ "d=4## mm (adopted for design)\n",
+ "C=(C_cube_BY_d*d)**(1/3)## Spring index\n",
+ "print ' Hence, Spring Index = %.2f '%(C)\n",
+ "Dm=C*d## mm\n",
+ "print ' \\n Mean coil diameter = %.2f mm'%( Dm)\n",
+ "Do=Dm+d## mm\n",
+ "print ' \\n Outside coil diameter = %.2f mm < 25 mm. Hence design is ok.'%( Do)\n",
+ "Kw=(4*C-1)/(4*C-4)+0.615/C## Wahl's correction factor\n",
+ "print ' \\n Wahl''s correction factor = %.3f '%(Kw)\n",
+ "tau=8*Kw*C*Fmax/(pi*d**2)## N/mm.sq.\n",
+ "print ' \\n Maximum shear stress = %.2f N/mm.sq.'%(tau)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## exa 8.10 Pg 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " wire diameter of spring = 7.28 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi\n",
+ "# Given Data\n",
+ "Fmin=600## N\n",
+ "Fmax=1000## N\n",
+ "C=6## spring index\n",
+ "n=1.5## factor of safety\n",
+ "Sys=700## N/mm.sq.\n",
+ "Ses_dash=350## N/mm.sq.\n",
+ "\n",
+ "Kw=(4*C-1)/(4*C-4)+0.615/C## Wahl's correction factor\n",
+ "Ks=1+0.5/C## Shear Stress factor\n",
+ "Fm=(Fmax+Fmin)/2## N\n",
+ "Fa=(Fmax-Fmin)/2## N\n",
+ "tau_m_into_d_sq=Ks*(8*Fm*C)/(pi)## where tau_m_into_d_sq = tau_m*d**2\n",
+ "tau_a_into_d_sq=Kw*(8*Fa*C)/(pi)## where tau_a_into_d_sq = tau_a*d**2\n",
+ "\n",
+ "#(tau_m-tau_a)/Sys+2*tua_a/Ses_dash=1/n\n",
+ "d=sqrt(n)*sqrt((tau_m_into_d_sq-tau_a_into_d_sq)/Sys+2*tau_a_into_d_sq/Ses_dash)## mm\n",
+ "print ' wire diameter of spring = %.2f mm'%(d)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## exa 8.11 Pg 236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " \n",
+ " initial tension in spring = 2500 N\n",
+ " \n",
+ " maximum tension in spring = 2688 N\n",
+ " \n",
+ " stiffness of spring = 31.25 N/mm\n",
+ " \n",
+ " diameter of spring = 17.19 mm. Use 18 mm.\n",
+ " \n",
+ " mean coil diameter = 99 mm\n",
+ " \n",
+ " outside coil diameter = 117 mm\n",
+ " \n",
+ " initial coil diameter = 81 mm\n",
+ " \n",
+ " no. of turns = 35\n",
+ " \n",
+ " total no. of turns(for extension spring) = 36\n",
+ " \n",
+ " free length of spring = 676 mm\n",
+ " \n",
+ " pitch of coils = 19.52 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi,ceil\n",
+ "# Given Data\n",
+ "dv=100##mm\n",
+ "C=5.5## spring index\n",
+ "pi=1## N/mm.sq.\n",
+ "p=1.075## N/mm.sq.\n",
+ "Del=6## mm\n",
+ "tau_max=400## N/mm.sq.\n",
+ "G=80## kN/mm.sq.\n",
+ "\n",
+ "Fi=(pi/4)*dv**2*pi## N (initial tension in spring)\n",
+ "print ' \\n initial tension in spring = %.f N'%( Fi)\n",
+ "F=(pi/4)*dv**2*p## N (maximum tension in spring)\n",
+ "print ' \\n maximum tension in spring = %.f N'%( F)\n",
+ "k=(F-Fi)/Del## N/mm (stiffness of spring)\n",
+ "print ' \\n stiffness of spring = %.2f N/mm'%(k)\n",
+ "#Tmax=F*Dm/2 where Dm=5.5*d\n",
+ "Tmax_BY_d=F*5.5/2## calculation\n",
+ "#Tmax=(pi/16)*d**3*tau_max\n",
+ "d=sqrt(Tmax_BY_d/((pi/16)*tau_max))## mm\n",
+ "print ' \\n diameter of spring = %.2f mm. Use 18 mm.'%(d)\n",
+ "d=ceil(d)## mm (rounding)\n",
+ "Dm=5.5*d##mm\n",
+ "print ' \\n mean coil diameter = %.f mm'%(Dm)\n",
+ "Do=Dm+d##mm\n",
+ "print ' \\n outside coil diameter = %.f mm'%(Do)\n",
+ "Di=Dm-d## mm\n",
+ "print ' \\n initial coil diameter = %.f mm'%(Di)\n",
+ "n=G*10**3*d*Del/8/(F-Fi)/C**3## no. of turns\n",
+ "print ' \\n no. of turns = %.f'%(n)\n",
+ "nt=n+1## total no. of turns\n",
+ "print ' \\n total no. of turns(for extension spring) = %.f'%(nt)\n",
+ "gi=1## mm (initial gap)\n",
+ "lf=nt*d+(nt-1)*gi## mm\n",
+ "print ' \\n free length of spring = %.f mm'%(lf)\n",
+ "p=lf/(nt-1)##mm\n",
+ "print ' \\n pitch of coils = %.2f mm'%(p)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## exa 8.12 Pg 236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " \n",
+ " (i) neglecting the effect of curvature\n",
+ " \n",
+ " Axial load = 412.3 N\n",
+ " \n",
+ " deflection per active turn = 9.954 mm/turn\n",
+ " \n",
+ "\n",
+ " (ii) considering the effect of curvature\n",
+ " \n",
+ " Axial load = 382.5 N\n",
+ " \n",
+ " deflection per active turn = 9.234 mm/turn\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt,pi,ceil\n",
+ "# Given Data\n",
+ "d=6##mm\n",
+ "Do=75## mm\n",
+ "tau=350## N/mm.sq.\n",
+ "G=84## kN/mm.sq.\n",
+ "\n",
+ "print ' \\n (i) neglecting the effect of curvature'\n",
+ "dm=Do-d## mm\n",
+ "C=dm/d## spring index\n",
+ "Ks=1+0.5/C## shear stress factor\n",
+ "#tau=Ks*(8*Fmax*C)/(pi*d**2)\n",
+ "Fmax=tau/(Ks*(8*C)/(pi*d**2))## N\n",
+ "print ' \\n Axial load = %.1f N'%(Fmax)\n",
+ "delBYi=8*Fmax*C**3/(G*10**3*d)## mm/turn\n",
+ "print ' \\n deflection per active turn = %.3f mm/turn'%(delBYi)\n",
+ "print ' \\n\\n (ii) considering the effect of curvature'\n",
+ "Kw=(4*C-1)/(4*C-4)+0.615/C## Wahl's correction factor\n",
+ "#tau=Kw*(8*Fmax*C)/(G*d)\n",
+ "Fmax=tau/(Kw*8*C/(pi*d**2))#\n",
+ "print ' \\n Axial load = %.1f N'%(Fmax)\n",
+ "delBYn=8*Fmax*C**3/(G*10**3*d)## mm/turn\n",
+ "print ' \\n deflection per active turn = %.3f mm/turn'%(delBYn)\n",
+ "# Note - answer in the textbook is wrong for last part."
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}