The laws of thermodynamics govern all systems that rely on heat flows for energy. The
first law of thermodynamics is about energy conservation, but before stating that law,
we need to be able to define the energy contained in a system. Internal energy includes
any potential energy associated with interactions among molecules. The first law of
thermodynamics states that the change in a system's internal energy is the sum of the
heat transferred to it and the work done on it. Because gasses can readily change their
volumes, work is usually more significant than for liquids and solids. When a gas is
compressed, the work done on it is positive, and when a gas expands, the work done
on it is negative. By moving a piston slow enough in an environment of a stable
temperature, an isothermal process can be achieved. The work done in an isothermal
graph can be found by evaluating the area under the curve. When the volume of a
system in a pressure vs volume graph is constant, then the area under the curve equals
zero, so there was no work done. An adiabatic process is a process where there is no
heat transfer. An adiabatic process is nearly impossible to obtain, however, if a process
is done quickly enough, it is nearly adiabatic because there is not enough time for any
significant heat flow. The relationship between pressure and volume in an adiabatic
process depends on the type of gas which has its own adiabatic exponent or the ratio of
the specific heats at constant pressure and constant volume. The second law describes
the tendency to evolve from more ordered to less ordered states by what is called time's
arrow, or the notion that many processes have a preferred direction. The second law of
thermodynamics states that heat flows spontaneously only from hotter to cooler objects.
An entropy is a state variable that helps make the second law quantitative. From
entropy, we can say that in the second law, heat flow is accompanied by an increase in
the entropy of the universe. Because entropy can only increase, natural processes
evolve toward a state of maximum entropy. In a car, only some of the gasoline's energy
ends up moving your car, and the rest is lost as heat. This is a limitation set by the
second law that applies for all heat engines. The most efficient engine is one that
follows the Carnot cycle, although no real engine is a Carnot engine. It is impossible to
convert thermal energy entirely to work. A refrigerator is a cooling machine, or a
machine that runs heat backwards. Like the heat engine, the efficiency of a refrigerator
is given by ratio of the benefit to the energy cost, known as the coefficient of
performance. An air conditioner is similar to a refrigerator because it removes heat from
a building's interior and dumps it to the higher-temperature environment outside. A heat
pump is like an air conditioner but backwards, it takes energy from outside and moves it
into the space you're trying to heat. When talking about an ideal gas, the term
microstate describes a specific configuration, giving the position of each molecule, and
a macrostate is a less detailed description that doesn't include positions of individual
molecules. From this, we can find that an entropy relates to a macrostate. This shows
us that natural processes tend to evolve toward a state of maximum entropy, which
again, is part of the second law.