{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Working with Unit in Equations" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Units and Prefix Conversions" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Lets look at those prefixes real quick on at the metric [Prefixes](https://en.wikipedia.org/wiki/International_System_of_Units#Prefixes). Just so you can get used to dealing with prefix conversions.\n", "How many M(something) are in 0.25 G(something)?\n", "\n", "* G is the same as multiplying by 10$^9$ \n", "* M is the same as multiplying by 10$^6$,\n", "\n", "Let's just focus on the prefixes for now and drop the \"(something)\",\n", "\n", "$$(0.25) \\text{G} = (x) \\text{M}$$\n", "\n", "...is the same as,\n", "\n", "$$(0.25) \\times 10^9 = (x) 10^6$$\n", "\n", "$$x = \\frac{(0.25)\\times 10^9}{10^6} = (0.25)\\times 10^{9-6}$$\n", "\n", "$$x = (0.25)\\times 10^{3} = 0.25 \\times 1000$$\n", "\n", "$$x = 250$$\n", "\n", "thus\n", "\n", "$$0.25\\text{G(something)} = 250\\text{M(something)}$$\n", "\n", "What about $589\\text{ n(something)}=x\\text{ m(something)}$, what is $x$ in this case?\n", "\n", "...\n", "\n", "\n", "$$589\\text{ n(something)}=0.589\\text{ m(something)}$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Calculating with Units" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In most real world calculations the numbers we use are based on measured values. Things like force, velocity, length, strain, and stiffness are measurements and to make a measurement meaningful we need to use units and use a specific unit system.\n", "\n", "At the beginning of this set of examples we are going to use the MKS metric system (see [Units and Prefixes](https://en.wikipedia.org/wiki/International_System_of_Units#Units_and_prefixes) and [Derived Units](https://en.wikipedia.org/wiki/International_System_of_Units#Derived_units)). That is to say that our base units are going to be meters (m) for length, kilograms (kg) for mass and seconds (s or sec) for time. These are base units as apposed to derived units such as newtons (N) for force or joules (J) for work.\n", "A derived unit is one that one that is made up of combinations of base units. Look at velocity for example. In the MKS system the velocity of a moving object is meters per second (m/s). That is how far (a length) the object moves in one second of time.\n", "\n", "Specifying the unit system (MKS in our case) in design can be really important, especially in international projects. In construction there are some relationships and equations that will only work if we plug in values with the right units. This has tripped up many a student so make sure you are using the correct units before you start any calculation.\n", "\n", "Lets look at how you would go about converting units.\n", "\n", "$$90 \\frac{km}{hr} = ? \\frac{m}{s}$$\n", "\n", "We know:\n", "\n", "* 1000 m = 1 km\n", "* 60 min = 1 hr\n", "* 60 sec = 1 min *(note that second can also be written as just $s$)*\n", "\n", "$$90 \\frac{km}{hr} \\left(\\frac{1000 m}{1 km} \\right) \\left(\\frac{1hr}{60min}\\right)\\left(\\frac{1 min}{60sec}\\right)=? \\frac{m}{sec}$$\n", "\n", "Notice that everything I used to convert with equals 1? For instance,\n", "\n", "$$1 km = 1000 m$$\n", "\n", "...divide both sides by 1 km...\n", "\n", "$$\\frac{1 km}{1 km} = \\frac{1000 m}{1 km} $$\n", "\n", "...reducing the left hand side...\n", "\n", "$$1 = \\frac{1000 m}{1 km} $$\n", "\n", "\n", "Also since this is multiplication, we can use the transitive property and rewrite the equation like this." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$$\\left(\\frac{90\\times1000\\times 1\\times 1}{1\\times60\\times 60}\\right) \\frac{km}{hr} \\times\\frac{m}{ km} \\times\\frac{hr}{min}\\times\\frac{min}{sec}=? \\frac{m}{sec}$$\n", "\n", "$$\\left(\\frac{90\\times1000}{60\\times 60}\\right) \\frac{km\\times m \\times hr \\times min}{hr\\times km\\times min\\times sec}=? \\frac{m}{sec}$$\n", "\n", "$$\\left(\\frac{90,000}{3,600}\\right) \\frac{km\\times hr \\times min\\times m }{km\\times hr\\times min\\times sec}=? \\frac{m}{sec}$$\n", "\n", "$$\\left(\\frac{900}{36}\\right) \\frac{km}{km}\\times\\frac{hr}{hr}\\times\\frac{min}{min}\\times\\frac{m}{sec}=? \\frac{m}{sec}$$\n", "\n", "Can you see how $\\frac{km}{km}$, $\\frac{hr}{hr}$, and $\\frac{min}{min}$ all equal 1? Anything divided by itself equals 1.\n", "\n", "$$(25) \\times 1\\times1\\times1\\times\\frac{m}{sec}= 25 \\frac{m}{sec}$$\n", "\n", "So,\n", "$$90 \\frac{km}{hr} = 25 \\frac{m}{s}$$\n", "\n", "In your Physics class you may switch unit systems to cgs (centimeter, gram, second) system, so lets try a conversion to that system.\n", "\n", "$$1000 \\frac{kg}{m^3} = ? \\frac{g}{cm^3}$$\n", "\n", "We know:\n", "\n", "* 1 kg = 1000 g\n", "* 1 m = 100 cm\n", "\n", "$$1000 \\frac{kg}{m^3}\\left(\\frac{1000g}{1kg}\\right)\\left(\\frac{1m}{100cm}\\right)\\left(\\frac{1m}{100cm}\\right)\\left(\\frac{1m}{100cm}\\right)=? \\frac{g}{cm^3}$$\n", "\n", "Do you see how I create the conversion factors I want by placing the one I want to eliminate on the opposite side of the fraction from what I'm converting from?\n", "\n", "$$1000 \\frac{kg}{m^3}\\left(\\frac{1000g}{1kg}\\right)\\left(\\frac{1m^3}{1000000cm^3}\\right)=? \\frac{g}{cm^3}$$\n", "\n", "$$1000 \\frac{\\cancel{kg}}{\\cancel{m^3}}\\left(\\frac{1000g}{1\\cancel{kg}}\\right)\\left(\\frac{1\\cancel{m^3}}{1000000cm^3}\\right)=? \\frac{g}{cm^3}$$\n", "\n", "$$10^3 \\left(\\frac{10^3}{10^6}\\right)\\left(\\frac{g}{cm^3}\\right)=? \\frac{g}{cm^3}$$\n", "\n", "$$10^{3+3-6} \\frac{g}{cm^3}=10^0 \\frac{g}{cm^3} = 1 \\frac{g}{cm^3}$$\n", "\n", "so,\n", "\n", "$$1000 \\frac{kg}{m^3} = 1 \\frac{g}{cm^3}$$\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Imperial Unit Conversion" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's look at an equation using the [imperial system of units](https://en.wikipedia.org/wiki/Imperial_units#Units) since that is more common in construction in this country." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For those of you who have has Physics the following equation should look familiar, but if you haven't or it doesn't then I'll explain the terms. It is the equation describing the position of an object at any time while it is in free-fall with constant acceleration (like that caused by gravity).\n", "\n", "$$y = y_0 + v_{y0} t + \\frac{1}{2} a_y t^2$$\n", "\n", "* $y$ - is the measurement of any object's the distance from the ground's surface with positive numbers indicating up.\n", "* $y_0$ - is the initial position as measured from the surface from the ground.\n", "* $v_{y0}$ - is the initial velocity of the object in the vertical direction (positive is up).\n", "* $a_{y}$ - is the acceleration of the object, and at the surface of the earth this is caused by gravity.\n", "* $t$ - is time measured from the objects initial release.\n", "\n", "This may seem very complicated for you if you have not taken Physics, however knowing what everything means is not important for our purposes. This equation is just being used as a framework to show a unit conversion example.\n", "\n", "Let's plug in the following numbers:\n", "\n", "* $y_0 = 739 yd$ *(yd is yards)*\n", "* $v_{y0} = 63 \\frac{miles}{hour}$\n", "* $a_{y} = -32.2 \\frac{ft}{s^2}$\n", "* $t = 0.25 min$\n", "\n", "We also need to know the following conversion factors:\n", "\n", "* 1 mile = 5,280 ft\n", "* 1 yd = 3 ft\n", "* 1 min = 60 s = 60 sec\n", "* 1 hr = 1 hour = 60 min" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$$y = 739 yd + 63 \\frac{miles}{hour} \\times 0.25 min + \\frac{1}{2} \\times -32.2 \\frac{ft}{s^2} \\times (0.25 min)^2$$\n", "\n", "This problem is no where near being unit consistent. Let's try to find our answer in feet and convert all our times to seconds. In order to do that simply we'll convert all the units to feet and seconds in our problem first.\n", "\n", "\\begin{equation}\n", "\\begin{array}\n", "y = 739 yd \\left(\\frac{3 ft}{1 yd}\\right) + \n", "63 \\frac{miles}{hour}\\left(\\frac{5,280 ft}{1 mile}\\right)\n", "\\left(\\frac{1 hr}{60 min} \\right) \\left(\\frac{1 min}{60 sec} \\right) \\times ...\\\\ \n", "... 0.25 min \\left(\\frac{60 sec}{1 min}\\right)+ \n", "\\frac{1}{2} \\times -32.2 \\frac{ft}{s^2} \n", "\\times \\left(0.25 min \\left(\\frac{60 sec}{1 min}\\right)\\right)^2\n", "\\end{array}\n", "\\end{equation}\n", "\n", "Let's go ahead and cancel out the units that are on opposite sides of the vinculum (the horizontal division bar).\n", "\n", "\\begin{equation}\n", "\\begin{array}\n", "y = 739 \\cancel{yd} \\left(\\frac{3 ft}{1 \\cancel{yd}}\\right) + \n", "63 \\frac{\\cancel{miles}}{\\cancel{hour}}\\left(\\frac{5,280 ft}{1 \\cancel{miles}}\\right)\n", "\\left(\\frac{1 \\cancel{hr}}{60 \\cancel{min}} \\right) \\left(\\frac{1\\cancel{min}}{60 sec} \\right) \\times ...\\\\\n", "... 0.25 \\cancel{min} \\left(\\frac{60 sec}{1 \\cancel{min}}\\right)+ \n", "\\frac{1}{2} \\times -32.2 \\frac{ft}{s^2} \n", "\\times \\left(0.25 \\cancel{min} \\left(\\frac{60 sec}{1 \\cancel{min}}\\right)\\right)^2\n", "\\end{array}\n", "\\end{equation}\n", "\n", "Separate the units from the numbers for clarity.\n", "\n", "\\begin{equation}\n", "y = 739 \\times 3 (ft) + \n", "63 \\times \\frac{5,280 }{60 \\times 60}\\left(\\frac{ft}{sec}\\right)\n", "\\times 0.25 \\times 60 (sec)+ \n", "\\frac{1}{2} \\times -32.2 \\frac{ft}{s^2} \n", "\\times \\left(0.25 \\times 60 (sec)\\right)^2\n", "\\end{equation}\n", "\n", "Multiply the numbers together to get the converted form.\n", "\n", "\\begin{equation}\n", "y = 2217 ft + \n", "92.4 \\frac{ft}{sec}\n", "\\times 15 sec+ \n", "\\frac{1}{2} \\times -32.2 \\frac{ft}{s^2} \n", "\\times \\left(15 sec\\right)^2\n", "\\end{equation}\n", "\n", "Now we can begin to work out the final answer without doing any more conversions.\n", "\n", "\\begin{equation}\n", "y = 2217 ft + \n", "92.4 \\times 15 \\left(\\frac{ft}{\\cancel{sec}}\n", " \\times \\cancel{sec}\\right)+ \n", "\\frac{1}{2} \\times -32.2 \\frac{ft}{s^2} \n", "\\times 225 sec^2\n", "\\end{equation}\n", "\n", "\\begin{equation}\n", "y = 2217 ft + \n", "1386 ft+ \n", "\\frac{1}{2} \\times -32.2 \\times 225 \\frac{ft}{\\cancel{s^2}} \n", "\\times \\cancel{ sec^2}\n", "\\end{equation}\n", "\n", "\\begin{equation}\n", "y = 2217 ft + \n", "1386 ft+ \n", "\\left(-3600 ft\\right)\n", "\\end{equation}\n", "\n", "$$ y = 2217 ft + 1386 ft - 3600 ft$$ \n", "\n", "$$ y = 3 ft$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "So if we though a ball straight up at 63 mph and release it at 739 yards above the ground from the top of a cliff, after 15 seconds it will have flown up, stopped, then fallen back to only 3 feet above the ground.* \n", "\n", "This is really as bad as it is ever likely to get. If you see how and why all the conversions and cancellations were done then you will not have any problems working with units ever again.\n", "\n", "\n", "_(*Not to add any more confusion than is necessary, but I should point out that this neglects the effects of air resistance which would cause the ball to be a little higher than I indicated.)_" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Ignore Below Here\n", "\n", "The text that is below is just the programming code used to display the cancellation slashes. " ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "data": { "application/javascript": [ "MathJax.Extension[\"TeX/cancel\"]={version:\"2.4.0\",ALLOWED:{color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function(){var c=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml,b=MathJax.Extension[\"TeX/cancel\"];b.setAttributes=function(h,e){if(e!==\"\"){e=e.replace(/ /g,\"\").split(/,/);for(var g=0,d=e.length;g" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%javascript\n", "MathJax.Extension[\"TeX/cancel\"]={version:\"2.4.0\",ALLOWED:{color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function(){var c=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml,b=MathJax.Extension[\"TeX/cancel\"];b.setAttributes=function(h,e){if(e!==\"\"){e=e.replace(/ /g,\"\").split(/,/);for(var g=0,d=e.length;g