# Confusion in first law of thermodynamics

Our teacher while explaining first law of thermodynamics showed us an example of a piston inside a chamber. He said when heat is applied the particles move, i.e the kinetic energy increases. Due to this velocity the molecules put some pressure on piston. Due to which the piston moves.

He said that some part of the energy supplied (heat) goes in increasing kinetic energy and other in doing work due to which the piston moves.

$$dQ= dU + dW$$

My doubt is that how is the heat affecting the pressure applied directly. The heat affects the velocity of gas molecule which then increases the pressure on piston due to which it moves.

He also said that if there was no piston then the total heat will go into increase in kinetic energy. Which doesn't make sense how does the heat or molecules know when to take some energy when when to not?

But how is heat directly effecting the work done? I believe that heat goes fully in to vibrating/increasing kinetic energy of particle.

• What level of answer are you looking for? Do you understand statistical mechanics? – David White Feb 11 at 20:32

If no heat was entering or escaping from the container, and it had fixed walls, we could assume that the energy of the molecules, ($$\frac{1}{2} mv^2 = \frac{p^2}{2m}$$) after each bounce on the walls was conserved, and temperature was constant.