IceArdor's Blog

The Search for InterOperability

Is it a stack or a queue?

, , , , , ,

Combining my love for aerospace engineering and computer science, stuff like this isn't uncommon in my life. How does this fit into aerospace engineering? Read.

As a general note: Adding to the top is stack behavior. Adding to the bottom is queue behavior. Retrieving from the top is stack behavior. Retrieving from the bottom is queue behavior. The "oldest" liquid is the liquid poured first. The "newest" liquid is the liquid poured last.

Pouring the liquid
You slowly pour a liquid down the side of the cup until the cup is full. Assuming no mixing has occurred, does this represent a stack or a queue (that is to say, does the "oldest" liquid sit on the bottom or top of the cup)?

It probably matters what temperature the liquid and cup are. If the cup is colder than the liquid, the cup will cool down the "old" liquid, causing it to become more dense, and "new" liquid, being warmer and less dense, will float on top of the "old" liquid until it too, is cooled down by the cup and the old liquid. This would plainly be a stack. A temperature gradient between the bottom and top of the cup should exist. Is this a linear gradient? But then for the curveball, if the liquid is water is 4°C, then cooling the liquid will decrease the density, and what was once a stack is now a queue. "Old" liquid now sits at the top. But then if you're using styrofoam or another poor conductor of heat, does this make a difference?

Drinking the liquid
Now what happens if you drink from the cup? If you use a straw, it is plainly a queue (assuming your straw isn't hovering at the top). But what if you drink from the cup by tilting it?

Does it matter what the liquid is? What if you use an oil/water combo? What if you use a highly viscous liquid like honey? What if you use a slush? What if you use a non-Newtonian fluid like ketchup or a starch suspension? Let me know what you find out.

Fluid mechanics and thermodynamics answer these questions, but there's an easier way to find out.

Coconut Mochi Recipe

Comments

Unregistered user Monday, April 11, 2011 11:22:25 AM

fresh healthy vending writes: Fresh Healthy Vending is the only vending franchise company that offers locations 100% juices, fresh vegetables and fruits, smoothies, and yogurts in every one of its healthy vending machines. potato chips and low fat popcorn like Pirate's Booty. fresh healthy vending recipes

Write a comment

New comments have been disabled for this post.

June 2012
S M T W T F S
May 2012July 2012
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30