I learnt that entropy in the universe can only be created, never destroyed. (And so change in entropy can never be negative, right?)
But during compression, don't we increase the order in, say, the gas I have taken? Hence, isn't entropy decreasing?
I learnt that entropy in the universe can only be created, never destroyed. (And so change in entropy can never be negative, right?)
But during compression, don't we increase the order in, say, the gas I have taken? Hence, isn't entropy decreasing?
The total entropy change of the system plus the surroundings (the universe) can never decrease. It remains the same for any reversible process or increases for an irreversible process.
For example, if a gas is compressed reversibly and adiabatically there is no change in entropy of the system. Although decreasing the volume reduces the number of available micro states, and thus entropy, the rise in temperature (increase in molecular kinetic energy and disorder) increases access to those micro states increasing entropy by an equal amount, for a system entropy change of zero. Since the process is adiabatic there’s no change in entropy of the surroundings, so the total entropy change of the system plus surroundings is zero.
If the compression is reversible and isothermal the entropy of the gas decreases, but the heat transfer to the surroundings increases its entropy by an equal amount. So once again the total entropy change of the system plus the surroundings is zero.
Hope this helps.
Work (including compression work) doesn’t transfer entropy.
Cooling does transfer entropy.
If you compress a material reversibly—not possible in practice—its entropy remains constant. (In reality, we always see the entropy increase somewhat from entropy generation associated with dissipative processes.) Gases tend to heat up, as their volume decreases. (If you’re working with a material whose entropy is higher in the compressed state, you could even see cooling, but this is unusual.)
If you maintain a constant temperature during gas compression—equivalent to cooling it—then you’ll see a localized decrease in entropy. This isn’t particularly remarkable; entropy decreases locally any time we cool something. The surroundings are subject to a greater entropy increase, and in this way, the Second Law of global entropy increase for any real process is maintained.
The total change in entropy cannot be negative. However, to be able to compress (in an irreversible process) the gas (say, using a piston) some other part of the system must have expanded (or exerted a force - though, as noted and clarified by another answer - it is not this force or work that causes a change in entropy). When everything has been accounted for, one will find that the entropy in all the other unspecified parts of the system will have increased. Therefore, if we count all of this, then the total entropy will certainly not have decreased.
First of all, in thermodynamics, you can't just change one variable. So you can't just say "compress the gas" and not change anything else. When you're analyzing what happens when you perform some process, you need to know what else is change, and what (if anything) is being kept constant. As you compress the gas, you're doing work on it, so it's gaining energy. If the gas is thermally insulated (adiabatic process), the temperature will go up. If it's not thermally insulated, then it will bleed heat into the surrounding. So there has to be some increase in temperature, or some increase in exuded heat, or a combination of the two.
There are many different scenarios, but all of them involve entropy staying the same or increasing. If you first let the gas heat up, and then let it cool down, then heat will be going from a hot body to a cooler one, so there will be an increase in entropy. The slower you compress the gas, the smaller the difference in temperature, so the increase entropy will be smaller (not just increase per time, but total increase). In the limit as the compression speed goes to zero, the increase in entropy also goes to zero. This is an idealized (as in not achievable in practice) "reversible" process.
Entropy is a measure of how many microscopic states (or "microstates") a system can occupy. The more possible microstates, the higher the entropy. For a gas, these microstates can be related to both position (where the particles are in space) and momentum (how fast they're moving).
During compression:
Entropy reflects the balance between these two types of microstates. In slow (reversible) compression, the changes can nearly cancel out, but in rapid (irreversible) processes, the system generates extra entropy due to inefficiencies like friction.