{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 5 Force Torque and Shaft power Measurement"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5_1 pgno:294"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x=(Sg*sig_f*(1+v))/(2*E)\n",
      "('a voltmeter with a maximum range of  mV is suitable for measurement', 95.0)\n",
      "Round it off to get the suitable range voltmeter\n"
     ]
    }
   ],
   "source": [
    "#CHAPTER 5_ Force,Torque and Shaft Power Measurement\n",
    "#Caption : Load cell\n",
    "# Example 1# Page 294\n",
    "from math import sqrt\n",
    "\n",
    "Sg=2.;   # Strain gage factor\n",
    "Rg=120.;    # Gage resistance\n",
    "v=0.3    # poissons ratio\n",
    "E=210*10**9;    # for steel\n",
    "Pd=1.   #('enter the power dissipation capacity=:')\n",
    "# Looking for a suitable voltage measuring system\n",
    "sig_f=700*10**6   #('enter the fatigue strength=:')\n",
    "P_max=10000.   #('enter the maximum load=:')\n",
    "# For a load cell of square cross-section d,\n",
    "d=sqrt(P_max/sig_f);\n",
    "Ei=sqrt(4*Rg*Pd)   #input excitation to the bridge circuit\n",
    "x=(Sg*sig_f*(1+v))/(2*E);\n",
    "dEo_max=x*Ei*10**3;\n",
    "print (\"x=(Sg*sig_f*(1+v))/(2*E)\")\n",
    "print ('a voltmeter with a maximum range of  mV is suitable for measurement',round(dEo_max))\n",
    "print (\"Round it off to get the suitable range voltmeter\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5_2 pgno:295"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('(dE/V)_max= d\\n ', 4285714.285714285)\n",
      "Sensitivity of this load cell is  nV/N/per unit excitation 42.86\n"
     ]
    }
   ],
   "source": [
    "#CHAPTER 5_ Force,Torque and Shaft Power Measurement\n",
    "#Caption : Load cell\n",
    "# Example 2# Page 295\n",
    "\n",
    "b=.2   #('enter the width of load cell=:')\n",
    "h=.05   #('enter the thickness of load cell=:')\n",
    "Sg=2.;\n",
    "Rg=120.;\n",
    "sig_f=150*10**6   #('enter the fatigue strength=:')\n",
    "E=70.;      #(in GPa) for aluminium\n",
    "v=0.33;           #poissons ratio\n",
    "# Let dE/V_max be represented by W\n",
    "W=Sg*sig_f/E;\n",
    "print('(dE/V)_max= d\\n ',W)\n",
    "P_max=100000.   #('enter the value of maximum load=:')\n",
    "l=sig_f*b*h**2/(6*P_max);\n",
    "\n",
    "S=(6*Sg*l)/(E*b*h**2);\n",
    "print'Sensitivity of this load cell is  nV/N/per unit excitation',round(S,2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5_3 pgno:296"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sensitivity of this load cell is  micro V/N\n",
      "0.13\n",
      "The maximum density that can be achieved without endangering the strain gage sensors is micro V/N\n",
      "0.284815729903\n",
      "The voltage ratio is mV/V 3.9\n"
     ]
    }
   ],
   "source": [
    "#CHAPTER 5_ Force,Torque and Shaft Power Measurement\n",
    "#Caption : Load cell\n",
    "# Example 3# Page 296\n",
    "from math import sqrt\n",
    "Sg=2;\n",
    "v=0.3;    #poissons ratio\n",
    "Ei=10.   #('enter the excitation voltage=:')\n",
    "A=5*10**-4  #('enter the area of load cell=:')\n",
    "E=200.;   #(in Gpa) Youngs modulus\n",
    "# Let sensitivity Eo/P be represented by Se\n",
    "Se=Sg*(1+v)*Ei/(2*A*E)*.001;\n",
    "print'Sensitivity of this load cell is  micro V/N\\n',Se\n",
    "Rg=120.   #given\n",
    "Pd=1. #('enter the power dissipated in each gage=:')\n",
    "Ei_max=sqrt(4*Rg*Pd)\n",
    "Se_max=Sg*(1+v)*Ei_max/(2*A*E)*.001\n",
    "print'The maximum density that can be achieved without endangering the strain gage sensors is micro V/N\\n',Se_max\n",
    "# Let (Eo/Ei)_max be represented by Em\n",
    "sig_f=600*10**6  #('enter the fatigue strength=:')\n",
    "Em=Sg*sig_f*(1+v)/(2*E)*10**-6\n",
    "print'The voltage ratio is mV/V',Em\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5_4 pgno:302"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('Relative displacement is d', 1.9999999999999997e-08)\n",
      "wnc**2 is approx. 10**9. So,\n",
      "Z is approx. 20nm(rms)\n",
      "Actual force transmitted to the plate is d N 18.03\n"
     ]
    }
   ],
   "source": [
    "#CHAPTER 5_ Force,Torque and Shaft Power Measurement\n",
    "#Caption : Piezoelectric Transducers\n",
    "# Example 4# Page 302\n",
    "from math import sqrt,pi\n",
    "mc=0.04   #('enter the connector mass=:')\n",
    "m=0.01   #('enter the seismic mass=:')\n",
    "k=10**9   #('enter the stiffness of the sensing element=:')\n",
    "Sf=.005   #('enter the sensitivity of the transducer=:')\n",
    "Xi=100*10**-6 #  ('enter the displacement amplitude of the shaker vibration=:')\n",
    "Eo=.1   #('enter the reading of voltage recorder connected to the transducer=:')\n",
    "wnc=sqrt(k/(m+mc));\n",
    "R=20;    #20N (rms)\n",
    "Z=(1/(m+mc))*(1/wnc**2)*R;\n",
    "print('Relative displacement is d',Z)\n",
    "print(\"wnc**2 is approx. 10**9. So,\")\n",
    "print(\"Z is approx. 20nm(rms)\")\n",
    "f=100.;   # given\n",
    "\n",
    "F=R-((2*pi*f)**2*(m+mc)*Xi);\n",
    "print'Actual force transmitted to the plate is d N',round(F,2)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5_5 pgno:308"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The load torque is d N-m 1636.0\n"
     ]
    }
   ],
   "source": [
    "#CHAPTER 5_ Force,Torque and Shaft Power Measurement\n",
    "#Caption : Torque measurement on rotating shaft\n",
    "# Example 5# Page 308\n",
    "Sg=2.;\n",
    "Rg=120.;\n",
    "G=80*10**9   #('enter the sheer modulus of elasticity=:')\n",
    "D=0.05   #('enter the shaft diameter=:')\n",
    "dR=0.1   # given\n",
    "# we have to find the load torque\n",
    "from math import pi\n",
    "\n",
    "y=2*dR/(Rg*Sg);\n",
    "tou_xy=y*G;\n",
    "j=pi*D**4;\n",
    "T=tou_xy*2*j/(D*32);\n",
    "print'The load torque is d N-m',round(T)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5_6 pgno:310"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('Relative displacement is d', 2e-08)\n",
      "wnc**2 is approx. 10**9. So,\n",
      "Z is approx. 20nm(rms)\n",
      "Actual force transmitted to the plate is d N 16.84\n"
     ]
    }
   ],
   "source": [
    "#CHAPTER 5_ Force,Torque and Shaft Power Measurement\n",
    "#Caption : Piezoelectric Transducers\n",
    "# Example 6# Page 310\n",
    "from math import sqrt,pi\n",
    "mc=0.02   #('enter the connector mass=:')\n",
    "m=0.06  #('enter the seismic mass=:')\n",
    "k=10**9   #('enter the stiffness of the sensing element=:')\n",
    "Sf=.008   #('enter the sensitivity of the transducer=:')\n",
    "Xi=100*10**-6 #  ('enter the displacement amplitude of the shaker vibration=:')\n",
    "Eo=.1   #('enter the reading of voltage recorder connected to the transducer=:')\n",
    "wnc=sqrt(k/(m+mc));\n",
    "R=20;    #20N (rms)\n",
    "Z=(1/(m+mc))*(1/wnc**2)*R;\n",
    "print('Relative displacement is d',Z)\n",
    "print(\"wnc**2 is approx. 10**9. So,\")\n",
    "print(\"Z is approx. 20nm(rms)\")\n",
    "f=100.;   # given\n",
    "\n",
    "F=R-((2*pi*f)**2*(m+mc)*Xi);\n",
    "print'Actual force transmitted to the plate is d N',round(F,2)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5_7 pgno:311"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sensitivity of this load cell is  micro V/N\n",
      "1.08333333333\n",
      "The maximum density that can be achieved without endangering the strain gage sensors is micro V/N\n",
      "0.474692883171\n",
      "The voltage ratio is mV/V 3.9\n"
     ]
    }
   ],
   "source": [
    "#CHAPTER 5_ Force,Torque and Shaft Power Measurement\n",
    "#Caption : Load cell\n",
    "# Example 7# Page 311\n",
    "from math import sqrt\n",
    "Sg=5;\n",
    "v=0.3;    #poissons ratio\n",
    "Ei=50.   #('enter the excitation voltage=:')\n",
    "A=3*10**-4  #('enter the area of load cell=:')\n",
    "E=500.;   #(in Gpa) Youngs modulus\n",
    "# Let sensitivity Eo/P be represented by Se\n",
    "Se=Sg*(1+v)*Ei/(2*A*E)*.001;\n",
    "print'Sensitivity of this load cell is  micro V/N\\n',Se\n",
    "Rg=120.   #given\n",
    "Pd=1. #('enter the power dissipated in each gage=:')\n",
    "Ei_max=sqrt(4*Rg*Pd)\n",
    "Se_max=Sg*(1+v)*Ei_max/(2*A*E)*.001\n",
    "print'The maximum density that can be achieved without endangering the strain gage sensors is micro V/N\\n',Se_max\n",
    "# Let (Eo/Ei)_max be represented by Em\n",
    "sig_f=600*10**6  #('enter the fatigue strength=:')\n",
    "Em=Sg*sig_f*(1+v)/(2*E)*10**-6\n",
    "print'The voltage ratio is mV/V',Em\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.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
