Question about entropy and "smart materials" (that remember shape) We all know that entropy is the measure of chaos in the system, and it's always increasing in the system.
Now comes my question - how does entropy work in smart materials? Here is a youtube video about smart material that I'm talking about, it remembers its shape - you can distort it, but when you heat it, it returns back to its original shape. So effectively it reverses from more chaotic state to a more uniform state:
http://www.youtube.com/watch?v=fsBHF_j2FJ4
Therefore my question - how come the system became less chaotic just by adding heat? It looks like entropy decreased, but the 2nd law of thermodynamics says that entropy can only increase.
 A: The law that entropy always stays constant or increases applies only to closed systems.
This material gets more ordered at the price of greater disorder in the closed system : energy generator + material.
It is the same with crystals, crystallizing out of a solution. They are highly ordered but the energy expelled to the total "solution +crystal" increases the entropy of the closed system.
And the paramount example are living things. They are highly ordered, but not a closed system. They continually absorb and expel energy to the surrounding environment increasing the entropy of a "living system" + "energy source" closed system.
A: There are two parts to this.


*

*As @anna v said in her answer, the Second Law applies only to closed systems. If you want to try to apply it to this system, you need to take into account the entropy created by your heat source. 

*As @Ron Maimon suggested in his comment, it's not obvious just by looking at the macroscopic shape of the material which scenario has a higher entropy. If you count the entropy of the material and its immediate surroundings, deforming the material can sometimes cause a lower entropy by allowing the immediate surroundings to rearrange themselves into a highly ordered state.
