Tuesday, June 17, 2014

Thermal Expansion

Thermal expansion is an extremely simple concept, however it is so important it has to be taken into account in practically every aspect of engineering and physics. As objects heat up they tend to expand, and as they cool tend to contract. There are of course exceptions, such as water (which is surprisingly most dense at around 4 degrees celsius) - however for simplicity we will discuss solid objects for now. 


My first run in with the concept of thermal expansion came wondering why they put the lines in sidewalk. After asking around it was explained to me that the sidewalk expands when it gets hot, so they put the cracks in so its less likely to crack due to the expansion. So, how is this modeled???

This is the equation that models linear expansion. Lets look at each term piece by piece.

Delta L - is the change in the length of the object
L - The initial length of the object
alpha - the coefficient of expansion that is different for each object
Delta T - is the change in the temperature of the object

Well lets look at a basic example. Concrete is one of the most common ingredient so lets look at that. How much would a strip of sidewalk expand on a hot day? 

Lets start with a 100 meter strip of concrete. The alpha, in this case coefficient of linear expansion, for concrete is about 12 * 10^-6 / Celsius. Now we just need the temperature change. Keep in mind most coefficients are based off the celsius, so the temperature change needs to be in celsius. Lets say it was created at 100 meters long at 20 celsius(68 fahrenheit) and we want to know how long it will be at 38 celsius (100 fahrenheit).


Doing the math we get that it expands about 2.1 centimeters. This may not seem like much, but if there was no room to expand this could cause a lot of problems! Its also good to keep in mind that sidewalks get much hotter due to direct sunlight and heat absorption, which I may cover in the future. 

If you're curious, here is a chart with a few commonly used coefficients. It's also important to keep in mind that this happens in all directions, so while the sidewalk is getting longer its also getting thicker and wider. There is a similar equation used for volumes, with a different set of coefficients referred to as beta, which is actually 3 times alpha. (Should make sense if you think about it). 


You can imagine how important it is to take this into account when designing buildings and bridges, and even very small circuits and coils!

Sorry for such a short and simple one, quite busy with summer school. Hopefully the next one will be much more interesting and unique...


Sunday, June 15, 2014

Diminishing Returns

Well, I've decided it may be useful to myself mostly to practice writing up guides and overviews on mathematical and scientific concepts. Because of this many of the things I go over may be a bit complex and require a good deal of calculus and physics, but I figured I'd start out with something simple that everyone can understand and relate with - the concept of diminishing returns. I have a good deal of experience working with diminishing returns going back over 10 years ago, as they are crucial in the competitive gaming world. 

So what are diminishing returns?

The best technical definition I was able to find is, "A rate of yield that beyond a certain point fails to increase in proportion to additional investments of labor or capital". While this is more of an economic definition I feel that economics is the easiest way to understand the concept. Diminishing returns can also generally be mathematically interpreted as series such as the one below. 


So what does this all actually mean and how can it be applied to real world problems? Imagine you own a deli and you have 3 stations for people to make sandwiches. You hire 3 people to make sandwiches however you still aren't making sandwiches fast enough because you make the best sandwiches ever so you decide to hire a 4th person. Since there are only 3 stations the 4th person has to mooch off of the area provided and cant make sandwiches as efficiently because of the lack of space and interference with the other workers. Instead of making 1 sandwich every 3 minutes like the others perhaps it takes him 5 minutes. You've invested more into sandwich production but the rate of yield is not as effective and didn't "increase in proportion" to your additional investments. As you add more and more people the effectiveness of the new people get less and less - eventually there's no room for new ones to do anything so you get zero return on your investment! 

OK so maybe that's not the best example, but I'm kinda hungry and feel like a prosciutto and brie sandwich. Lets use an example you can experiment with and see how it works for yourself. 


Lets play some cookie clicker! 

You can find the game here http://orteil.dashnet.org/cookieclicker/

I feel this game is a perfect example of diminishing returns, as its essentially a constant battle of balancing the diminishing returns of the cookie production devices to maximize the return on your investments. The goal of the games to get cookies, initially you have to click the big cookie to get a cookie, but as you save up cookies you can buy devices that produce cookies over time. However, the price of the devices goes up over time, so you start paying more and more for the same returns - the cost effectiveness of the cookie makers diminishes over time. The price is modeled based on the equation below.  
The price essentially increases by 15% for each one you buy. So what can we do with this information? Lets use excel to model this. 


This shows the cost of each additional cursor upgrade purchase, you can see the first one costs 15 cookies, the second costs 18, the 3rd 20, etc. etc. Each cursor gives .1 cookies per second, and the final column which is the cost divided by the value it provides (example - the first one is 15 / .1 ) shows how effective buying that number cursor is. Eventually when you get enough cookies you can buy grandmas, which provide .5 cookies per second and scale in the same way as the cursors did. 

The graph shows the same thing but with grandmas. What can you do with this? Well you can figure out the most cost effective choice on what you should buy next based on the cost / value column. The object with the lowest cost / value is the one you should buy next! This is a simple way to look at things, as there are bonuses and upgrades you also have to take into consideration but technically you could calculate out an ideal purchasing plan!

This should give you a good idea of what diminishing returns are and a basic idea of how they can be utilized in the real world! But I feel one more example more relating to my field of study would be useful. 

We can look at models of the kinetic energy in relation to speed and see that they also follow the concept of diminishing returns! If you've taken a basic physics class you are probably familiar with the Newtonian or classical model of kinetic energy in the equation shown below, 1/2mv^2. What happens when you create a graph of the kinetic energy in relation to speed? You can see the green line in the graph below since its a square function it curves upwards. What does this mean? Well essentially it takes more and more energy to be able to increase the speed of the object steadily, there's a diminishing return on the amount of energy put into the system! You can see this easily in the chart on the bottom, to make a 1kg object go 20% of the speed of light it takes 1.798 petajoules, and making it go twice as fast or 40% of the speed of light takes 7.19 petajoules! The return on your investment decreases pretty greatly over time.

Now you may be asking, I thought it was impossible to get an object with mass moving at lightspeed, but clearly this shows that if you have enough energy you can make it so. Well classical mechanics works for most speeds, however for really high speeds you need to take into account relativity. You can see in the charts and equations below that relativity fixes this, and shows us that at high speeds the return on investment of energy is way worse than we initially thought!


There are loads of applications of the concept of diminishing returns in the real world, and having a solid knowledge of the concept can help you increase the effectiveness of what you are doing. You can find ideal or most effective routes of action based on your situation, this idea is used heavily in economics, finance, engineering, and the sciences! 

Now go play more cookie clicker and feel free to to let me know if you have any questions or would like me to go over any specific concepts in math or physics in future posts.