Calculating entropy for a simple scenario

Click For Summary
The discussion centers on modeling the thermodynamics of an ideal gas in two separate rooms and calculating entropy as the gas equilibrates after a partition is removed. The initial challenge is that the simulation is deterministic, focusing on individual molecules, which complicates the introduction of probability necessary for entropy calculations. Participants suggest that to estimate entropy, one might need to run multiple simulations with varied initial conditions to create a probability distribution of microstates. However, defining entropy during non-equilibrium states remains problematic, as current textbooks do not provide a standard definition for such scenarios. Ultimately, the conversation highlights the complexities of calculating entropy in real-time during dynamic processes rather than just at equilibrium states.
  • #31
zrek said:
4. During the process, the volume of gas from the left chamber increases, while the volume of the other gas decreases. (a or d?)You mentioned 2 things against it:
4.a: The volume of gas had not been decided in a non-equilibrium situation.
4.b: Particles from lower pressure chamber may go into the higher pressured one.

4.b is not a problem. It is clear that if we run a simulation, we will see that in average more particles will go from the higher pressured place than from the lower pressured one. In the point 4. I ment the volume increases and decreases in average.2

You are speaking as if "the volume" has been defined. It has not. If you want to say something about "the volume" of a gas that is not equilibrium, you need to state your definition of volume for that situation.

An "average" is defined for some population of things. What population are you talking about when you say "in average"?

Lets refine my statement, please answer (please don't forget that initially the only difference between the contents of the chambers is the number of the particles):
4.2: During the process more particles will go from the higher pressured place to the lower one than to the opposite direction. (a or d?)

Disagree.

Are you assuming the high pressure chamber must contain more particles? The high pressure chamber might contain fewer particles than the low pressure chamber. The pressure also depends on the velocity of the particles, not merely the number of particles.

4.a is not a real problem.
It is a real problem to speak of "the volume" when the gases are not in equilibrium. You have not yet defined it. The gases have a defined volume at the beginning and the end of the process when they are in equilibrium. That says nothing about the definition of volume in a non-equilibrium case.

Earlier I also was thinking about this situation, but simply ignored it, as it is an edge problem like the division by zero. But now you forced me to give an explanation.
If the first molecule comes out from the chamber, the main problem is not with the volume, but with the definition of gas. One molecule is not gas. For example one molecule of water can not be solid, fluid or gas. Also problematic to measure its temperature I think you also know why. But in our case it is not a problem. As I mentioned in my earlier post, we can wait until these parameters have meaning, when we can measure these.
If we wait to define volume then there is an interval of time when volume is undefined. Is that the plan?
 
Science news on Phys.org
  • #32
Stephen Tashi said:
You are speaking as if "the volume" has been defined. It has not. If you want to say something about "the volume" of a gas that is not equilibrium, you need to state your definition of volume for that situation.
It is defined, because I'm talking about the gas in equilibrium. I'm sorry if I can't wording clearly, please try to understand even if my english is poor.
In the sentence "During the process, the volume of gas from the left chamber increases, while the volume of the other gas decreases." I referred the "volume of gas from" as it was clearly defined in the beginning of the process. On the "increased" or decreased" I ment also the state when the gases were in equilibrium, since at the end they were also in equilibrium. In this sentence I analyse the gas volumes (in timestamps when standard definition apply), and try to make it clear that there are four mentionable possibilities:
p1: From the beginning to the end both of the gases keep their volume
p2: The gas from the left chamber will have bigger volume at the end (compared to its volume was at the begining) and paralelly the gas from the right one decreases
p3: The opposite of p2 (gas from the left decreases)
p4: Other thing happens (for example there is no connection between the properties of the two gases and how their volume changes)
I try to convince you that the p2 is the only logical scenario, even if the volume is not defined between the beginning and ending states, if we want to say something about the volumes, then p2 is the acceptable way for approximate calculations.

Stephen Tashi said:
An "average" is defined for some population of things. What population are you talking about when you say "in average"?
I referred to the population of the gas molecules originated from the chambers. And "on average" I referred to a timescale (may happen that for tiny intervals the volume changes irregulary, but as we increase the time steps, the irregularities "averages out"), so the most likely (statistically) change is that the volumes increases and decreases as I stated in the 4.

Stephen Tashi said:
Are you assuming the high pressure chamber must contain more particles? The high pressure chamber might contain fewer particles than the low pressure chamber. The pressure also depends on the velocity of the particles, not merely the number of particles.
Please read back, #28. We are in a scenario, when all of the particles have the same properties, same mass, same speed.
No can you agree this?
4.2: During the process more particles will go from the higher pressured place to the lower one than to the opposite direction. (a or d?)

Stephen Tashi said:
It is a real problem to speak of "the volume" when the gases are not in equilibrium. You have not yet defined it. The gases have a defined volume at the beginning and the end of the process when they are in equilibrium. That says nothing about the definition of volume in a non-equilibrium case.
I think you are wrong. We can say lot. If there is a non-instantaneous process and we have known beginning and ending values, then we can make good assuptions for the values between by analytic continuation. This method is a well accepted logical way in science.
https://en.wikipedia.org/wiki/Analytic_continuation
Since our simulation is deterministic, it is clear that between the two known and accepted volume values we can find a function that can give good approximate informations about the value changes properties. For example it can turn out that the function is strictly increasing, or whatever. Also the formula you mentioned helps: U′(t)=T(t)S′(t)−P(t)V′(t) -- this means the volume function is continuous and derivable during the process.

Stephen Tashi said:
If we wait to define volume then there is an interval of time when volume is undefined. Is that the plan?
It is normal in computer simulations. Only in edge cases and for tiny time intervals happens that the volume (and the other macro properties) can't be defined, and most of the time they can be approximated with interpolation, to make the function continous. For example I already described the method of how the pressure can be calculated during a simulation: we have to wait until several particle reach a wall, and the frequency of the hits and the known surface area gives the pressure in average. Isn't this method acceptable?
 
  • #33
zrek said:
p2: The gas from the left chamber will have bigger volume at the end (compared to its volume was at the begining) and paralelly the gas from the right one decreases

In the final equilibrium state the combined gas has a volume of two units.

Let us attempt to visualize the volumes of the two gases separately. Suppose the gas particles initially in chamber_A (of volume 1 unit) are colored red and gas particles initially in chamber_B (of volume 1 unit) are colored blue. In the final equilibrium state, we imagine that the red particles are uniformly distributed over both chambers. So if we consider the red particles as a gas, they have a volume of 2 units. Likewise the blue particles considered as a gas have a volume of 2 units.

You wish to say that the gas of red particles increases in volume and the gas of blue particles decreases its volume.
In each gas, the particles spread out as time passes. I don't understand how you intend to define "volume" of a gas so that the volume of a gas decreases when its particles spread out.
 
  • #34
Stephen Tashi said:
You wish to say that the gas of red particles increases in volume and the gas of blue particles decreases its volume.
I'm not sure: is it necessary at all to know what happens with the red and blue? I'm thinking on this only because I assumed from your earlier posts that this is necessary for the calculation of entropy.
Stephen Tashi said:
In each gas, the particles spread out as time passes. I don't understand how you intend to define "volume" of a gas so that the volume of a gas decreases when its particles spread out.
We can't even say that the red and blue are separated gases (and this is important, since the entropy calculated correctly if the particles are excangable). They have the same kind of molecules, mixed, and act mutually together for every calculations of the macro values like temperature and pressure. I tried to thinking on their future separatedly because I thought you mean this is necessary for the calculation of entropy.
If this is necessary, then I can try to visualize for you how I intend to define the volume of an already mixed gas.
For example imagine that the blue gas is not a gas, but a non-Newtonian fluid that stays in one body, does not keep its volume, can be compressed with the same energy-force-pressure behavior just like if it was a gas. This scenario result the same for the red gas as if the blue were gas, but they will never mix.
To calculate this new volumes (which at the end finally balances), I think it is a good way if we reserve volumes for each and every particles, and calculating just like I mentioned before, in #30: "Since there is no other difference, also we can say that the ratio between the volume of the two gases is the same as the ratio between their number of particles. (For example if the left chamber contained 2000 particles and the right camber only 1000, then after the mixing, the total available 2 units of volume also shared between the gas molecules with 2:1 ratio)" This analogy will result the proper volume and pressure at the end of the process. But if we are thinking like you mentioned "the red particles are uniformly distributed over both chambers" and "the red" and "the blue particles considered as a gas have a volume of 2 units", this will lead us nowhere (2+2=4).

I have an easier visualization.
Say that between the chambers there is no door, but a zero-mass piston, a wall that prevents mixing the gases. What if we calculate this way?
 
Last edited:
  • #35
zrek said:
I'm not sure: is it necessary at all to know what happens with the red and blue? I'm thinking on this only because I assumed from your earlier posts that this is necessary for the calculation of entropy.

What is necessary to calculate entropy in non-equilibrium situations is to first define entropy in those situations.

In all situations where Shannon entropy can be defined, there must be a specific probability distribution involved. This is a greater requirement than simply saying that there are complications involved or that the visual impression of the process shows (subjective) "disorder".

In situations where thermodynamic entropy is involved we have equations defining entropy in equilibrium conditions. These equations are derived from a statistical model of gases. Thus these equations are also based on a model that involves a probability distribution.

You are proposing to do a deterministic simulation. A single run of this simulation does not involve a probability distribution. The deterministic simulation simulates a process that is theoretically reversible. The main consequence of entropy in thermodynamics is that when entropy increases, it characterizes this processes that are not reversible.

The intended point of my posts is that a deterministic simulation with states of non-equilibrium contradicts attempts to define entropy.
1) It contradicts attempts to define entropy in terms of the entropy of a probability distribution.
2) It contradicts attempts to define entropy in terms of equations used in equilibrium states such as U'(t) = TS'(t) - PV'(t) because quantities like V(t) are undefined in non-equilibrium states.

I am not saying that there exists a useful definition for V(t) in non-equilibrium conditions. I am not saying that there exists some definition of V(t) that we must use in order to define the entropy in non-equilibrium states. The main point of my posts is that attempts to define entropy by methods 1) and 2) appear to be dead-ends.

If this is necessary, then I can try to visualize for you how I intend to define the volume of an already mixed gas.
For example imagine that the blue gas is not a gas, but a non-Newtonian fluid that stays in one body, does not keep its volume, can be compressed with the same energy-force-pressure behavior just like if it was a gas. This scenario result the same for the red gas as if the blue were gas, but they will never mix.
That would contradict the proposed deterministic simulation wouldn't it? You intend to allow the particles to intermingle. I think you must drop the condition that the fluid "stays in one body".

To calculate this new volumes (which at the end finally balances), I think it is a good way if we reserve volumes for each and every particles, and calculating just like I mentioned before, in #30
I assume you say that it is a "good" way because it mathematically keeps the total volume equal to 2 at all times during the particular situation we are considering. However (to me) it doesn't make physical sense. It seems to be a model where each particle has a compressible "balloon" around it that defines the particle's volume.

If there are initially N_A particles in Chamber_A and Chamber_A has volume 1 unit then each of the particles is inside a little balloon of volume 1/N_A units. Likewise, each of the N_B particles in Chamber_B is initially inside a balloon of volume 1/N_B units. Let the door be opened and let 1 particle from Chamber_A enter Chamber_B. Then instantly, the balloon around this particle increases from size 1/N_A to size 1/(N_B +1) and instantly the balloons around the particles in Chamber_B decrease in size from 1/N_B to 1/(N_B+1).

That doesn't agree with the process modeled by your deterministic simulation. A particle from Chamber_A that enters Chamber_B doesn't instantly affect all the particles in Chamber_B. It doesn't affect any particle in Chamber_B until it collides with the particle.
I have an easier visualization.
Say that between the chambers there is no door, but a zero-mass piston, a wall that prevents mixing the gases. What if we calculate this way?

That's fine if you goal is visualize a physical situation that justifies a mathematical calculation. But I think the goal is to analyze the deterministic simulation you proposed, which didn't have a piston in it.We can invent an arbitrary definition for the "volume" V(t) of a non-equilibrium gas and ask if it is possible to test whether the equation mentioned in 2) is satisfied. I don't think it is possible to do such a test using your deterministic simulation. The terms U(t) and T(t) makes sense in your simulation. However P(t) is problematic. For example, at a given instant of time, there may be no particles at all that collide with the walls of the chambers, so P(t) (interpreted as a force per unit area on a physical surface ) drops to zero at such instants. How is such a discontinuous function going to work as a term in a differential equation ?
 
  • #36
Stephen Tashi said:
The main point of my posts is that attempts to define entropy by methods 1) and 2) appear to be dead-ends.
Please try thinking with my head. I'm not posting here just because I'd like to convince you, my intension is only that I'd like to solve the problem I faced and I need some help form others who have greater knowledge on the topic. I don't really need explanations on why I can't calculate entropy -- but describing the problems may help to solve them one by one. For example if you say that "It would be possible to calculate the entropy if we could find a way to numerize the volume change through non-equilibrium conditions" then together maybe we will be able to find a good, analitycal approximation, and then we can step forward. I think I had several good ideas for this problem, but if it is not necessary or dead-end, then let's skip it, and find another way to entropy.

I answered your questions and reacted to your critics, but then I decided to not post here, because I'm not sure it leads to a solution. If you are interested, I'd be happy to send you my thoughts in a personal message.

I think you also would like the result if I would be able to create a simulation in which a deterministic process with particles demonstrates the change of macro values (temperature, pressure, entropy). If you have any ideas or suggestion on how to accomplish this, I'd be thankful for it.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
543
  • · Replies 109 ·
4
Replies
109
Views
8K
Replies
6
Views
914
  • · Replies 60 ·
3
Replies
60
Views
10K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 22 ·
Replies
22
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K