{ "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