6 ms·
Dimensional analysis is useful when you want to convert between compositions of units. A good example is comparing the price of petrol where different units are
by 10000truths 3y ago
Dimensional analysis is useful when you want to convert between compositions of units. A good example is comparing the price of petrol where different units are being used. If you know the conversion rate between litres and gallons, and the conversion rate between USD and GBP, then you can figure out the conversion rate between USD/gal and GBP/L:
USD/gal * GBP/USD * gal/L = GBP/L
1.24 USD = 1 GBP
1 gal = 3.78541 L
GBP/USD = 1.24
gal/L = 3.78541
USD/gal * 1.24 * 3.78541 = GBP/L
USD/gal * 4.6939084 = GBP/L
$4.6939084/gal = £1/L
- HPsquared 3y agoAgreed, it's super useful to write out all the units and check that they cancel out properly. I usually write out the Witt I want to convert, complete with units, and successively multiply by dimensionless conversion factors which equal 1. That is to convert 45 MPG to "km/l" I'd write out: 45 (mile / UK gallon) * (1 UK gallon / 4.55 l) * (1.6 km / 1 mile) The expression (1.6 km / 1 mile) is dimensionless and equal to 1 (it's a length divided by an equal length). Cancelling the units gives (45 / 4.55 * 1.6) km/l
- sokoloff 3y agoI taught an hour-long class at work where I'd prepped an example to warm the group up, which involved converting the sales material for a US car that got 26 mpg to a Canadian market using liters per 100 km. 26 mpg is carefully chosen because between 1/3 and 2/3 (usually on the lower end) would get it right (~9 liters per 100km) and the others would often come up with around 11 (km per liter). I could then ask "who got a figure around 9?" and "who got a figure around 11?" and both groups would raise their hand feeling pretty confident they'd gotten it right. I'd then introduce and walk them through dimensional analysis and finish with an example that was more complex and error-prone, but was pretty straightforward if you just applied DA. (The main point of the class was "use correct units" rather than "learn dimensional analysis".)
- stkdump 3y agoThe great thing about that conversion is that due to the reciprocal relationship the same conversion formula works both ways, so you don't have the risk of converting the wrong way.
- tiffanyg 3y agoExactly. I consider it much like "types" in programming languages: middling to weak "formal verification". In the case of most calculations I've ever carried out substantially 'by hand' in physics / chemistry / etc., it still made / makes a substantial difference in error rate. Without propagating dimensions, my error rate can be a real issue. I wouldn't trust the final number on a full, say, roughly "letter-sized" (US 'wonderland' system) page. By propagating, I might trust the result 75 or 80% of the time... (I do rather doubt I could have been an even average NASA "computer" given the opportunity to do a great deal more of these kinds of calculations than I have had to... my mind is much better at generating random numbers and nonsense than doing anything 'mechanical'. AFAIK, NASA had no call for such skills in the "age of human computers".) :)
- ttoinou 3y agoIt is a type in the mathematical sense too, so it makes sense to treat it like it
- akira2501 3y agoI use 'ruby-units' with ruby's 'irb' in order to do complex unit calculations. It's an excellent library and with some helpers one can write: (U('45 mi') / U('1.20095 gal')) >> 'km/l' It doesn't come with an imperial gallon, but it could be added. It's also fun to do stuff like: (U('3.99e33 ergs/s') / (4 * Math::PI * U('1 AU')**2)) >> 'W/m^2' To get the potential available solar energy output at earth's average orbital distance from the sun usefully expressed as Watts per Square Meter. Anyways, what I really got from unit analysis was a more useful and fundamental understanding of electronics. Getting an intuition for how Tesla's relate to Weber's relate to Volts and Ohms and how the Coloumb relates to the Ampere and Siemen and how they all combine into Henry's and Farad's both to ultimately lead you right into Joule's and Watt's. I really wish I was taught the material that way.
- ElectronBadger 3y agoSimilar library for Julia is Unitful.jl (https://github.com/PainterQubits/Unitful.jl https://github.com/PainterQubits/Unitful.jl).
- bandrami 3y agoWay back in undergrad I asked why the conversion ratio between electromagnetic and electrostatic charge had the dimensions of meters per second (it's the speed of light, for those who haven't had to drag themselves through Maxwell). The prof pointed out that if you had a soap factory and measured output in pounds per day and also in dollars per day, the conversion ratio of the two output measures would have the dimensions of dollars per pound, which would also happen to be the price of a pound of soap. I just always thought that was neat.
- bonzini 3y agoThe instant consumption of electric cars can be measured as kW which is power, but the overall consumption will more commonly use something like kWh/km which is a force unit (equal to 3600 N); and the ratio between the two is the average speed measured in km/h. Is this related to the answer of your original question? [Yes technically you'd more likely see kWh/100km or Wh/km, but the result is a silly unit for speed].
- bandrami 3y agoYeah it gets to the kind of weirdness that a kWh has the same dimensions as a Joule: power is an instantaneous measurement and when integrated over time yields energy: (mass * distance) / (time squared) vs (mass * distance) / (time), to use the engineering sense of d / dt meaning "dividing by a little bit of t" (we were supposed to avoid saying that around people from the mathematics department). Where it got really interesting was Heisenberg, because the indeterminance relationship doesn't just hold for position and momentum but for any two units whose dimensions multiply out to (mass * distance squared) / (time). So famously meter vs kilogram * meter / second, but more usefully in real life second vs Joule. Or weird combos like mass vs change in area over time, whatever that would mean...
- pjc50 3y agoSimilarly for the petrol consumption case, once you convert "liters per 100km" to normalized units, you get "square meters". Usually for most cars a value of a few square milimeters. You can intuit this as "sweep the volume of the fuel injector across the distance travelled"; imagine all the petrol used as a very thin cylinder lying along the length of the trip.