I am having trouble understanding the transient phase of an ideal gas expanding into vacuum.
Firstly, the pressure of any gas is defined only when there is an instrument (barometer/ wall/ piston) equally resisting the expansion of the gas. The amount of resistance that the instrument has to put up is what we call pressure.
Consider the scenario where an ideal gas is kept from expanding into another adjacent volume V2 through a door (The second chamber is vacuous). Now, suddenly the door vanishes, the ideal gas expands and re-establishes equilibrium in the new volume V1+V2.
The textbooks calculate the change in entropy for this process using the following equations.
Equation 1: PV = nRT
Equation 2: dU = TdS - PdV
The textbooks also state that the temperature, and consequently internal energy, do not change for such an expansion.
My confusion pertains to how one calculates this entropy change. The words 'Pressure' and 'Volume' have no meaning when the gas is still expanding into the volume. So how can one consider equation 1 to hold true during the transient phase, and then use it to calculate the change in entropy?
Edit: I have another question related to equation 2; the textbooks have substituted TdS for dQ in the first law of thermodynamics. However, dQ is equal to TdS only for reversible processes. So how does equation 2 make sense in the context of irreversible processes? (Such as free expansion)