Based on your responses to the previous answers, I understand that there are actually two distinct bodies of gas involved in the setup you describe:
- The gas which, at the start of your experiment, is already in the sample chamber (gas A)
- The gas which, at the start of your experiment, is stored in a separate vessel at a higher pressure (gas B)
These two bodies of gas will of course be mixed at the end of the experiment, but for the purpose of this discussion, it will be helpful to imagine these two bodies of gas separately, and then to find the final result from there.
Imagine, for example, if the sample chamber were cylindrical in shape, with a zero-mass frictionless piston dividing the two bodies of gas. The piston would then start at one end of the chamber, since the chamber's total volume is initially filled entirely with gas A:
|--------------------------------|
| . . . . . .gas A. . . . . . ][ |
|--------------------------------|
Then, as gas from body B is introduced on the other side of the piston, it is forced to slide towards the center of the chamber:
|--------------------------------|
| . . gas A . . ][ . . gas B . . |
|--------------------------------|
With this analogy, it is easy to understand that gas A will undergo adiabatic compression, heating up in the process. What happens to gas B, however, depends entirely on what's outside of the sample chamber!
If, for example, the external pressure vessel is fully sealed and rigid, then gas B will have to expend a portion of its stored heat energy in order to expand against the piston, thereby undergoing adiabatic expansion and cooling down in the process. In the case of a true ideal gas, this energy loss will exactly match the corresponding energy gain on the other side of the piston. In real life, however, we would find that the energy loss of gas B is greater than the corresponding energy gain of gas A, thanks to the Joule-Thompson Effect. As such, there would be a net temperature drop in the chamber-- although not as great a difference as you might expect.
On the other hand, if the external pressure vessel is somehow maintained at a constant pressure throughout this process, then the work necessary to expand against the piston will no longer come entirely out of the gas B! Instead, this work will be offset by whatever outside force is maintaining the pressure of the external vessel. (Examples of this kind of setup might include a balloon, a pump, a spring-piston assembly, or even just the outside atmosphere!) In that case, then the energy loss in gas B would be reduced, and we would see a net temperature rise inside the sample chamber.