Problem solving with dimensional analysis
gregorygundersen.com
gregorygundersen.com
I've never seen dimensional analysis without using concrete dimensions, so this blog post was really eye opening. It seems a little magic to me, so I'm interested to learn more about a quick and helpful technique I thought I mastered.
(1/√a) ∫ exp(-u) u^-½ du
which furnishes a handy proof that (-½)! = √π, once you know the Gaussian integral.
You can't just multiply the thickness of the material (scalar meters) to get Watts vs. temperature difference.
You need to DIVIDE by it to get conductance (W/(m^2⋅K)) and THEN figure out the area the transfer is occurring over.
ρ := Ωm²/m.
To calculate the resistance of a specific piece of wire, plug in the intrinsic property of copper (resistivity), and the dimensions of the specific wire. Out comes resistance.
Ω(wire) = ρ(copper) × length ÷ area
Where things get weird are thin films, ICs, and pcb traces with constant thicknes.
The unit of sheet resistance is ohms per square.
Because resistance increases with length and decreases with width, multiplying both by the same number doesn't change the resistance. Any square cut from the same sheet of copper has the same resistance between two opposite edges.
I think there's an interesting parallel to this usefulness in code which the author just briefly mentioned. Static typing can help bridge thoughts about what makes sense to do ("I have a callable with signature (x: int, s: str) -> str, and this function I need to use is (s: str) -> str; huh, my x here is fixed, does it make sense to make a partially applied function? yes, that'll work") as well as, of course, verifying all assumptions make sense at some level (types matching is a necessary, though not sufficient, condition).
Then there's more power unlocked by giving dimensions/units to your types/instances. For instance, overloading the division operator in a class representing length so that when dividing length by time, you get speed. Or, one could overload addition/subtraction in classes representing a currency so that trying to add ¥100 to $100 raises an exception.
In general I think there's a lot of interesting applications for the information that comes along with numbers that we usually just discard. Things in the real world aren't dimensionless that often, and yet our code almost always treats them as if they were.
Another bonus was I could focus on the equations and then output the final answer in either metric or franken-imperial, as the homework assignment required (I did my undergrad in the US.)
You can take it even one step further and write tests to check the resulting units for you.
But seriously, I am planning some numerical modelling experiments, and am considering Juila partially because Unitful.jl. Can you recommend it?
I sometimes even go one step further and use specific types for dimensionless factors in financial calculations, such as specific types for the rates of different kinds of taxes. This way I get a compiler error, when I am trying to use the wrong type of tax rate in a calculation.
Although string types seems intractible, you could easily specify things like [a-zA-Z0-9], or character sets/UTF ranges for limiting inputs to certain languages. All list types (strings, arrays) could specify length as a limit.
Programmers would naturally want flexibility with domain enforcement, so could just write a (turing complete) function to which returns the domain of the function in question!
Dimensions are the equivalent of typing in programming. It can help you write valid programs without having to run them in order to verify it.
[1] https://pubs.acs.org/doi/abs/10.1021/acs.chemmater.8b02837
[2] https://www.researchgate.net/profile/Janakiraman-Balachandra...
Or, on a different angle, shape of rotors and how they affect sound of their movements.
Here you go, a whole Julia SciML thesis on this topic: https://dspace.mit.edu/handle/1721.1/144946
https://ocw.mit.edu/courses/18-098-street-fighting-mathemati...
The reading list has a link to both the printed version and a free pdf of the book.
It unfortunately skips the basic level that you learn a little about in high school.
This makes sense because the book was originally a PhD thesis about solving research level problems with dimensional analysis, so the easy problems were already solved, but makes it a bit of steep start for the casual reader who doesn't already understand the basic idea.
The review on ams.org (by a structural engineer, not a mathematician) mirrors my difficulty (and fascination) with the book.
I always think of dimensional reduction when I see these headlines, which is sadly very unrelated.
Actually, the two are related. The Buckingham pi theorem of dimensional analysis guarantees the reduction of the number of variables ("dimension" in a different sense) in many instances.
https://en.wikipedia.org/wiki/Buckingham_%CF%80_theorem
This fact is frequently used in experiments in some areas of physics to reduce the number of tests.
Here's a good example of the power of dimensional analysis: how small should the Earth be to collapse into a black hole?
Knowing nothing about the problem, you know it should involve at least two things: the mass of the Earth, M, and the gravitational constant G.
Since F=ma and F=GMm/d^2, we know that GM has units of distance^2 * acceleration (check that). This is equal to distance * (distance/time)^2.
We want a radius, which is a distance. And we almost have it! At least if we can get rid of the (distance/time)^2 factor. But that's a velocity^2! Now, what's a velocity that should be natural in questions about black holes and general relativity? Why the speed of light c, of course.
So, we can guess that the answer is GM/c^2.
Now compare this with the real answer: https://en.m.wikipedia.org/wiki/Schwarzschild_radius
The whole point of this article is that you can use dimensional analysis to get the form of the answer up to a dimensionless constant. You don't have to know anything about calculus except that dx has the same units as x, and that the integral sign is an additive compounding operation, i.e. it does not change the dimensions of it's argument.
Using a change of variables (the standard trick to solve the integral) still requires you to know 1) how does the differential change under "u-substitution", 2) that the derivative of exp is itself, 3) the chain rule and 4) the fundamental theorem of calculus, which relates definite integrals to the antiderivative of the integrand. In other words, you have to do calculus.
It doesn’t require anything except knowing how to change variables in an integral, you don’t have to actually be able to do the integral.
* The same mathy physics people also do fun things like define Gaussian units where charge is proportional to fractional powers of length and mass.
Well some things get better with area and some things get worse with volume, and since those grow at different rates, there's an optimal size for which the difference is maximized.
Pretty much any emergent constant size can be explained by the intersection of two functions.
Snowflakes fly up from area and fall down from volume, so there's a maximum size they can stay in a cloud
1) If lengths are absolutely fixed, why are they fixed at that scale? Why *didn't* things end up doubled (assuming an external absolute to measure against).
2) If they're *not* absolutely fixed, the "fundamental length" appears pretty fixed to us as humans because things kind of look the same day-to-day. Is there a variation we just don't perceive? Is the fixedness we see just us imposing part of our perception on the world?
It's sort of like this illustration of gauge fixing[1] -- just like "how do you know the cylinder is twisted?", you can ask "how do you know your fundamental lengths?"[1]: https://en.wikipedia.org/wiki/Gauge_fixing#An_illustration
So the issue here is you don't quite know how certain shape of boat/airplane will behave in a flow of water/air.
But you do know that whatever the relationships are, they have to be dimensionally consistent. You then work out a dimensionless version of force or whatever your interested in, and that tells you how it scales since you have a bunch of square, cube, root, etc terms.
So now you can build a little model, measure the real force you're interested in, and make a guess about what the force would be on the actual size version.
The tests give a correlation from one dimensionless quantity to another.
That can mean, counter-intuitively, that a wind tunnel model needs to have a higher wind speed than the full-size object - so that the Reynolds number is correct.
Solid angle is area/area.
I remember reading an article once about how if you make some really basic but reasonable assumptions about how the laws of physics should work (e.g. probabilities add up to 1 at all times), you can get almost all the way to the Schrödinger equation. I was quite impressed.
(Just like types in programming languages.)
Sure enough, the end of the article indicates [1] as the reference.
[1] https://ocw.mit.edu/courses/18-098-street-fighting-mathemati...