Friday, November 21, 2014

Nerd Squared : A Saturn V Rocket Built By Harry Potter

I am a huge Harry Potter fan. When I was 12 or 13, I got a Harry Potter trivia game for Christmas. When I was asked what flavor popsicle Harry ate when he went to the zoo with the Dursleys, I not only knew the answer. I was able to look up the page in the book to prove to my brother that Harry had a lemon popsicle, not a cherry flavored popsicle as the trivia game incorrectly claimed. From that moment on, no one would play that game with me.



Now that I am studying math and physics, I was naturally interested in some of the math and physics behind Harry Potter. I was really intrigued with broomsticks. The other day, some information from a Harry Potter book caught my eye. In the Prisoner of Azkaban, the Firebolt broomstick's top speed is advertised as 150mph (or 67m/s) and can accelerate to that speed in 10 seconds.



Acceleration is a measurement of the change in velocity relative to the change in time. It is equal to the change in velocity divided by the change in time, so we can calculate that the acceleration of the broom is (67 m/s)/(10 sec) or 6.7m/s2. I looked at Amazon's shipping information to find out how much the average broom weighs. A typical broom weighs about 1 pound, or 0.5kg. Daniel Radcliffe (the actor who plays Harry Potter) has a listed mass of 53kg.


Since Force = Mass * Acceleration, we know that the amount of thrust produced by one Firebolt is equal to (6.7m/s2) * (53.5kg), or around 360 Newtons.

While this is an interesting factoid, knowing the amount of thrust that something produces doesn't really mean a whole lot without any context. I wanted to compare the thrust to the amount of thrust that other vehicles can create to really get a sense of how powerful these broomsticks are.



What I found would probably surprise no one. Cars, boats, planes, and rockets can all produce much more thrust than a broomstick. But a broomstick weighs so much less than these other objects! If we had the same mass of broomsticks as the mass of whatever is powering the craft, I'm sure the broomsticks would dominate! So let's look at that.

I wanted to look at the most extreme example I can find: the Saturn V Rocket.



Weighing in at a whopping 5 million pounds, this world heavy weight champion of spaceflight was used to fly the Apollo missions to the moon. This rocket used 2,160,000 kg of liquid oxygen and liquid hydrogen as rocket fuel and produced a thrust of 7.5 million pounds (or 3.4*10Newtons). The first stage of the engine burned for 168 seconds, at which time the rocket was at an altitude of 67,000 meters and was moving 2,300 m/s.



OK, there are many different ways to compare the NASA model and the HP model. If we just straight up traded the mass of fuel for the mass of broomsticks, we would have around 4,320,000 broomsticks. At the rate of 360 Newtons/broomstick, this would create 1.6*109 Newtons of thrust, easily surpassing the liquid oxygen and hydrogen.



Or we could figure out how many brooms we would need to create the amount of thrust needed. We still have 360 Newtons/broom, so 3.4*10Newtons requires 95,000 brooms. Cool!



But this doesn't really tell the full story. One of the main reasons rockets are so heavy is because they have to carry their fuel with them. They start out extra heavy and end up with hardly any mass left. But if we used broomsticks, that mass would not change. NASA is all about efficiency, and any good Quidditch player doesn't want to waste any broomsticks. So we want to figure out the minimum number of brooms to reach the stars.



Remember that brother that refused to play Harry Potter trivia that I talked about above? He's now a rocket scientist. He got his undergraduate and graduate degrees in Aerospace and Mechanical Engineering at the University of Michigan (Go Blue!) and now works as an engineer at Boeing, so I naturally tagged him in for this fight.

I'd recommend using a Fourier Transformation then finishing it off with a Suplex.
He was very intrigued. You see, the really tricky part about rockets is that they require a LOT of fuel. They are constantly burning a massive amount of fuel, so the mass you end up with is very different from the mass you start with. My brother said that engineers normally deal with Tsiolkovsky's equation, which is:
\Delta v = v_\text{e} \ln \frac {m_0} {m_1}
where v_\text{e} is the velocity of the exhaust, m_0 is the initial mass (both rocket and fuel), m_1 is the final mass, and \Delta v\  is the maximum change in velocity of the craft. Since we are using magic to power our rockets, there is no change in mass.



This means that m/m above is equal to 1, and as we all know after looking at logarithmic functions, the logarithm of 1 is equal to 0. Therefore according to Tsiolkovsky, we cannot move.



My brother told me that since rockets are so aerodynamic and stable, we don't really need to worry about the drag force acting on the rocket. Rockets are specifically engineered to minimize the air resistance, which means that the drag force is significantly less than the amount of thrust produced by the rocket.
This is pretty much word for word how I asked my brother for help.
So this problem breaks down to a simpler-than-you-would-expect-for-rocket-science-meets-magic scenario. Since we don't have to worry about changing mass or drag forces, we only have 2 forces acting on the rocket: gravity and thrust. We know that these two forces added together equal the net force, and the net force needs to be great enough to get the rocket up to escape velocity (which is 11,200 m/s).

ForceNet = ForceThrust - ForceGravity

mass*vesc/t = (360 Newtons/Broom)*(n brooms) - mg
(120,000+n/2 kg)(11,200 m/s)/(168 sec) = (360 N/broom)n - (120,000+n/2 kg)(9.81 m/s2)
33.3n + 8*10= 360n - 4.9n - 1.2*106
322n = 1.208*106
n = 28,500 brooms

So it would take about 28,500 Firebolt broomsticks to fly the Saturn V rocket into outer space. This seems like a lot, but is it?

The Saturn V rocket uses about 90,000 kg of liquid hydrogen, 1,800,000 kg of liquid oxygen, and 700,000 kg of RP-1 (rocket propellant 1, similar to kerosene). This fuel costs around $800,000 today. Meanwhile, the Firebolt broomstick cost around 1000 galleons in the Harry Potter books in 1993. This converts to about $10,000 in 1993 or $16,500 in 2014. This means that the total cost of the brooms would be 28,500*$16,500, or about $470 million.


Unfortunately this method of space travel would not save us money until about our 590th trip into space. While it might start getting more cost effective if we started sending spaceships farther out into space, for the immediate future it would not save us money. I say we go for it even though it costs more. I think half a billion dollars is a fair price to kick the laws of nature in the face!


Friday, November 14, 2014

Archimedes: Doing more math in 200BC than any of us can today

Most of you probably have heard of Archimedes of Syracuse. He was a Greek mathematician and (possibly mad) scientist alive in the 200B.C.'s. I like to call him the Corn Syrup Mathematician because, like corn syrup, you would be astounded to believe how many things people use today that contain something that Archimedes worked with.
Fun fact. Much of what we know about Archimedes was recorded by Vitruvius. I wonder if
we could get Morgan Freeman to narrate some of Archimedes work...
One of the really cool things about Archimedes is that a lot of the topics he worked on make sense. Look at other famous mathematicians and scientists. Does anyone think that what Einstein talked about truly makes sense? Does anyone look at the work of Heisenberg or Schrodinger and think "Oh, now that you put it like that, I totally get it"? In no way am I saying those scientists are incorrect, but the scientific breakthroughs they made are hard to conceptualize. Archimedes on the other hand is a great example to show to people that you can make great insights simply by using common sense and prior knowledge.
I honestly cannot tell if this is the most insightful thing I've heard today or useless.
Archimedes discovered many principles dealing with fluid displacement, buoyancy, and density. He built an Archimedes Screw, something that is still used today. He designed many different kind of siege warfare machines, and supposedly burned a fleet of ships using mirrors.

He also worked in mathematics. He gave an approximation of the square root of 3 (which was accurate to the hundred thousandths decimal). He calculated the area contained by a parabola and a straight line. He calculated the areas of triangles and parallelograms. He approximated π.
Coincidence? I think not.
The work he was most proud of looked at a sphere inside a cylinder where the height of the cylinder and the diameter of the end of the cylinder was equal to the diameter of the sphere. (I want to note here that at this time in history, calculus did not exist. Archimedes was able to accomplish all of this without integrals, infinite series, or limits. Or if he did use those concepts, he had to discover those concepts himself.) Archimedes actually requested that after he died, instead of a gravestone, he wanted a carving of the following figure placed over him.
Yeah, instead of an epitaph, could you just carve my 9th grade
essay on "Haroun and the Sea of Stories" onto a marble slate?
He first calculated the area of a circle by looking at a circle made up of 6 equilateral triangles. He realized that if you put the triangles next to each other, the the length is slightly less than the circumference and the height of reach triangle is slightly less than r. As you increase the number of triangles, the height of the triangles gets closer and closer to r while the length gets closer and closer to the circumference.


AreaCircle = (Area of 1 Triangle) * (Number of Triangles)
ACircle = (1/2 * Circumference/n * r) * n
ACircle = 1/2 * C * r
Since C = 2πr, we know that
ACircle = 1/2 * 2πr * r
ACircle = πr2

Now Archimedes thought about the surface area of the sphere. He decided to first start by looking at the surface area of a section of the sphere, defined by a section of the sphere cut off by a plane slicing through the sphere.

Archimedes claimed that the surface area of the section of the sphere that was sliced off is equal to the area of a circle with radius equal to the distance from the perimeter of the intersection to the top of the center of the circular area.

Since we are looking at the surface area, let's imagine that the sphere is empty. It is just a shell that outlines the sphere. For reasons that will be clear very soon, let's think of the sphere as the empty casing around a spherical roast beef at Arby's.
[Insert Product Placement Here]
I chose a hunk of roast beef so we can imagine slicing it with a meat slicer. If we were to keep slicing the meat thinner and thinner, we could imagine slicing a 2-Dimensional slice of meat. But remember that our special roast beef is just a hollow shell, so these 2-Dimensional slices are just circles.

"Isosceles. You know, I love the name Isosceles. If I had a kid,
I would name him Isosceles. Isosceles Kramer." - Cosmo Kramer
If we were to take all of these circles, cut them, and lay them out straight so that their ends were level, we would see something like this (this is very similar to the situation we looked at above).
As the slices get thinner, the number of slices increases and the picture above starts to look like a triangle.
AreaCross Section = 1/2 * Circumference * Radius
ACS = 1/2 * C * r
Since C = 2πr, we know that
ACS = 1/2 * 2πr * r
ACS = πr2

Therefore, we know that the surface area of the portion of the sphere that is cut off by a plane slicing through the sphere is equal to the area of the circle defined by the intersection of the surface of the sphere and the plane. Now if we imagine that the plane cutting the sphere goes through the center point of the sphere, the radius of the intersection circle is equal to the distance from point (0, 0, r) to 
(r, 0, 0). This distance is equal to 2r. Since this only calculates the surface area of the top half of the sphere, the surface area of the sphere is twice the area of the circle with radius 2r.

Surface AreaSphere = 2*π*Radius2
SAS = 2*π*(2r)2
SAS = 4πr2

Now at this point, Archimedes kind of goes off the deep end. He started talking about approximating the volume of a sphere using pyramids. I looked at how he calculated the volume of a sphere and had the following reaction.

I don't quite understand it myself yet. There is a strong possibility that I write another blog post about more of Archimedes work, but for now 


Thursday, October 23, 2014

Menger Sponge Cost Analysis: A Great Sponge or The Greatest Sponge?

On Monday, October 20th, we looked at the Menger Sponge project currently going on. Sure it seemed interesting and figuring out the different properties of the fractal was fun, but I had a different question. How much does this thing cost, both in resources and man-hours required to build this thing?
I ran a computer simulation to figure it out. I determined that we need to include the costs of
treatment for Carpal Tunnel Syndrome. We also need to budget for a Creeper Defense System.
When I started to think about it, I realized that the cost of the fractal grows exponentially. As the cube gets larger, the number of cards and the amount of time required to assemble it gets MUCH larger. This reminded me of my favorite episode of Mythbusters where they built a balloon out of lead and actually got it to fly.


This made me wonder: how large would we have to build this cube so that it were worth it's weight in gold?
I pity the fool who tries to calculate this!
OK, so first things first. I need to define a few functions I am going to use. Let E(n) be the expenses to build a Menger Sponge and W(n) be the weight of the Menger Sponge. W(n) looks easier, so I will start there.

To calculate the total weight of a lot of small objects, you can multiply the weight of one of the objects by the total number of objects. Now by looking at various shipping companies, they ship business cards in boxes of 100, and on average 5 of those boxes is about 2 lbs. So (ignoring the weight of the 5 boxes), the weight of 1 business card is 1/250 lbs. We also know that there are 6 business cards per cube, so the total number of business cards is 6 times the number of cubes.
I can't help but think we missed out on a better cube opportunity here...
One way to think about going from the n sponge to the n+1 sponge is to recognize that you are making a giant sponge out of sponges one size smaller. By looking at the geometry of the structure (8 corner boxes and 12 side boxes), each new larger box requires 20 of the smaller boxes. So 20describes the number of boxes required to build Sponge n. This means that there are 6*20cards required to build Sponge n. Now we know that:


W(n) = (Weight of 1 Card) * (Number of Cards to Build Sponge n)
W(n) = 1lb/250cards * 6*20cards
W(n) = 6/250*20(lbs)

Now let's look at the expenses.

The expenses incorporates both the cost of materials (let's call this M(n)) and production (P(n)). Well the cost of materials should be easy since we already know the number of cards required to build Sponge n. After looking around the internet, it seems that 100 plain white cards approximately the size of a business card costs $10. This means that each card costs $0.10.

M(n) = (Cost of 1 Card) * (Number of Cards to Build Sponge n)
M(n) = $0.10/card * 6*20cards
M(n) = 6/10*20dollars

Minimum wage varies in different areas, but for the sake of my own sanity, I will say it is $10/hour.

For the number of hours, I am going to make some estimates off of anecdotal information. In class on Monday, somebody mentioned that 3 people were able to make 60 cubes (enough cubes for 3 Sponges n=1) in 15 minutes. This means one person can make 20 cubes in 15 minutes, or 80 cubes/hour.

But there is more to building this Sponge than just making small cubes!



We need to attach them to each other. In my own practice, I was able to attach around 3 cubes per minute. But I feel pretty confident that with more practice (and whoever is making this giant Sponge is going to have more practice than...well...I'm not sure what analogy I could use to convey just how much practice this will be. Let's just say it's a lot.) I could have comfortably got 6 attachments per minute. That comes out to 360 attachments/hour.

The number of attachments is trickier. I am going to assume any 2 cubes that are touching are connected. So another way to think about how many connections there are in the sponge is to think about how many cards are facing other cards. Since these cards can only either face other cards or face the outside, the number of cards facing other cards plus the number of cards facing the outside of the sponge should equal the total number of cards. So the total number of cards facing each other equals the total number of cards minus the surface area of the sponge. Since I know the total number of cards, I just need to figure out the surface area!



The sponges of size n can be broken into 2 types of regions: corner pieces size n-1 and edge pieces size n-1. Corner pieces have the same surface as the surface area of a sponge size n-1 minus the surface area of 3 faces of the sponge (since the corner piece is connected on 3 of the 6 sides). In class we talked about how the area of a surface that follows this pattern is 8n. So this means that the Surface are of the corner pieces of the sponge of size n is SA(Corner)n = SA(Sponge)n-1 -3*8n-1. Similarly, the surface area of the edge piece is equal to the surface area of the sponge n-1 minus the surface area of 2 faces (since the edge pieces are all connected on 2 sides). So SA(Edge)n = SA(Sponge)n-1 -2*8n-1. Since every sponge size n is made of 8 corner pieces and 12 edge pieces, the equation for surface area is


Surface Area = 8*SA(Corner)n + 12*SA(Edge)n

SAn = 8(SAn-1 -3*8n-1) + 12(SAn-1 -2*8n-1)
SAn = 20SAn-1 - 48*8n-1
SAn = 20SAn-1 - 6*8n

Party on, Weierstrass. Part on, Gauss.
Now that we have a recurrence relation, we can find an equation for the surface area of a Menger Sponge of size n, or SA(n). Since this recurrence relation is a non-homogeneous relation, we need to find both the homogeneous solution and the particular solution (If you have not done any work with discrete mathematics, check out this slide show. What I am doing starts on slide 24. WARNING: Math Ahead. I'm realizing this is a little late for the warning...)


an = hn + pn
Let pn be in the form of c*8n + d

pn = 20pn-1 - 6*8n
c*8n + d = 20(c*8n-1 + d) - 6*8n
0 = 20c*8n-1 - c*8n - 6*8n + 20d - d
0 = 8n-1(20c - 8c - 6*6) + 19d
0 = 8n-1(12c-48) + 19d
c = 4 and d = 0.
Therefore pn = 4*8n
hn = 20hn-1
0 = x - 20
The characteristic equation is (x-20).
Therefore hn = α20n
an = α20n + 4*8n
Since SA(0) = 6, we know that 6 = α200 + 4*80
6 = α + 4
α = 2
Therefore SA(n) = 2*20n + 4*8n

If you've never dealt with recurrence relations, this was probably your reaction...
Now that we know the number of cards and the surface area, we have a formula for the number of cards facing other cards. And since there is 1 attachment for every 2 cards facing each other, the number of attachment is 1/2 of the amount of cards minus the surface area.

# of Attachments = (Number of Cards - Surface Area)/2
Attachments = (6*20n - 2*20n - 4*8n)/2
Attachments = 2*20n - 2*8n

Finally, for a Menger Sponge of size n, we know (1) how many cubes we have to make, (2) how fast we can build the cubes, (3) how many attachments we need to make, and (4) how fast we can attach cubes. Therefore the equation for the number of hours required to build a Menger Sponge of size n is

Hours = (# of Cubes)/(Cubes/Hours) + (# of Attachments)/(Attachments/Hour)
Hours = (20n)/80 + (2*20n - 2*8n)/360
And since the hourly wage is $10.00, we know the wages are
Wages = (20n)/8 + (2*20n - 2*8n)/36
Wages(n) = (13*20n - 4*8n)/72
And since all the expenses come from materials and production, we know that
E(n) = (Cost of Cards) + (Wages to Build)
E(n) = (6*20n)/10 + (13*20n - 4*8n)/72
E(n) = (281*20n - 20*8n)/360 (in dollars)

Finally! We know the expenses, we know the weight, and knowing that gold costs about $20,000 per pound, we can compare our results. Below is a graph of E(n) (in green) and 20,000*W(n) (in, of course, gold). (For the following graphs, the x-axis represents the xth Menger Sponge, the y-axis represents dollars, and all of the graphs can be seen here).


Well, this cube definitely won't be worth it's weight in gold for small sizes, but maybe if we kept going for a while...


Nope! It looks like the expenses will never catch up to the amount of gold. In fact, looking at 20,000*W(n) - E(n) shows the graph (in red) below.

This gap is just going to keep going up and up. This cube will never cost it's weight in gold. But it could be worth it's weight in something else...

Let's look at how we graphed the equations. We graphed E(n), and we graphed the price of gold/lb multiplied by W(n). We want to know the material that costs x dollars/pounds such that
E(n) = x*W(n). So let's look at E(n)/W(n) (graphed below in blue).


This graph seems to level off around 30-35 dollars/lb.

I took a look at the price of various materials. Precious metals and minerals were all much higher than this. Common metals (like lead, aluminum, tin, copper, etc.) were all lower. Seafood and meat were all lower. But there was one material that cost around $35/lb.

Uranium.

So if you know anyone who wants to make a doomsday device powered by uranium, let them know that the money they spend on uranium could be spent on a pretty awesome arts and crafts project...
Good news everyone! I invented a machine that makes you read this caption in your head in my voice!