# Confused with the energy equation in thermodynamics

Homework posted in wrong forum, so no template
Hello

I am confused with the energy conservation equation in thermodynamics.

Is it U2 - U1 = Q - W ? This is what most books say.

Or is it H2 - H1 = Q - W ?

Which should I use to solve problems? For example we have a gas with U1 and P1V1 (which makes H1). After a process, we have Q transferred in or out and W transferred in or out. How can I write the equation in this situation?

Thanks

gleem
How do you understand the meaning of the quantities in the two equations?

U is the internal energy, the energy due to the molecular motion of the gas
H is the internal energy plus the pressure energy PV
Q is the heat transferred in/out of the gas
W is the work transferred in/out of the gas

What are you trying to say? Please be clear

gleem
That W and PV both have units of energy but are not the same. Work is not a state variable and thus depends on the process that produced it.

So which of the two equations are correct? If both, how can that be?

gleem
U2 - U1 = Heat added to the system - Work done by the system

H2 - H1 = U2 - U1 + P2V2 - P1V1

You use the one appropriate to the problem.

So the equation H2 - H1 = Q - W is not correct?

Also, in U2 - U1 = Q - W, you say that Q is heat ONLY added to the system and W only DONE by the system. What about heat substracted by the system and work added to the system?

gleem
Yes W ≠ PV2 - PV1

The first law is written as U2 - U1 = Heat added to the system - Work done by the system =Q - W where both Q and W are positive quantities. A negative Q will mean heat removed from the system and a negative W is the work done ON the system.

You must always watch out if you are adding or removing heat to a system and whether work is done on the system versus having the system do work.

So, there is no situation where there is no change in U, there is no heat exchanged and there is work done on or by the system? Ie. in an adiabatic expansion or compression, there is ALWAYS dU≠0?

gleem
An adiabatic process is one that is thermally insulated so ΔQ = 0. So dU = work done by( du < 0) / on (du>0) the system.

So you are saying that there is no possibility for work to be done adiabatically in the system and not to increase U, but rather increase pressure energy PV ?

Chestermiller
Mentor
Hello

I am confused with the energy conservation equation in thermodynamics.

Is it U2 - U1 = Q - W ? This is what most books say.

Or is it H2 - H1 = Q - W ?

Which should I use to solve problems? For example we have a gas with U1 and P1V1 (which makes H1). After a process, we have Q transferred in or out and W transferred in or out. How can I write the equation in this situation?

Thanks
The first equation is always correct. The second equation is correct only for a process carried out at a constant pressure, equal to the original pressure (say by adding heat at constant pressure).

Do you have a specific problem that we can use as an example.

Here is a Physics Forums Insights article that should be helpful to you. Although the title refers to the second law of thermodynamics, the first section covers the first law of thermodynamics: https://www.physicsforums.com/insights/understanding-entropy-2nd-law-thermodynamics/

Last edited:
gleem
In the case of constant pressure H2 - H1 = Q

Chestermiller
Mentor
In the case of constant pressure H2 - H1 = Q
Oops. Thanks. I didn't notice the W there.

This NASA webpage says something different than what you say:
https://www.grc.nasa.gov/www/k-12/airplane/thermo1f.html
They say that dH=Q-W (if you ignore kinetic energy). To me this is more complete, because it takes into account the change in pressure energy of the system, which can be caused by either Q or W.

I don't have a specific problem, but if I am asked this:
We know U1, U2, Q, W, P1, V1, V2 and they ask me P2, how do I answer?

I do NOT want to learn equations that have limited application, ie. when P=constant or V=constant or whatever. I want to know one complete energy conservation equations that applies in EVERY situation and that I can calculate every parameter from it, if I know the rest parameters.

Chestermiller
Mentor
This NASA webpage says something different than what you say:
https://www.grc.nasa.gov/www/k-12/airplane/thermo1f.html
They say that dH=Q-W (if you ignore kinetic energy). To me this is more complete, because it takes into account the change in pressure energy of the system, which can be caused by either Q or W.
This equation applies only to the open system version of the first law, in which mass is flowing into and out of the system. And H refers to the enthalpy change between the inlet and outlet streams of the flow system, not the change in enthalpy within the system. And, did you notice the subscript S on the W. That is not the total work done. It is only the "shaft work". So the NASA document does not apply to a closed system that you have been asking about.

Mmmm now it starts to make sense.

So there IS dH=Q-W, and it is the Steady Flow Energy Equation!

BTW, when did I say I am asking for closed systems?

So can you elaborate now, why in SFEE we have dH=Q-W (ignoring kinetic and potential energy) and in closed systems we have dU=Q-W ?
And what is the Work in the SFEE that is only "part"of the work done?

Chestermiller
Mentor
I don't have a specific problem, but if I am asked this:
We know U1, U2, Q, W, P1, V1, V2 and they ask me P2, how do I answer?

I do NOT want to learn equations that have limited application, ie. when P=constant or V=constant or whatever. I want to know one complete energy conservation equations that applies in EVERY situation and that I can calculate every parameter from it, if I know the rest parameters.
That's covered in my Physics Forums article.

Regarding the specific question you asked, is this the actual question they asked you? What other information is given?

As I told you I don't have a specific question. I just got confused between dU=Q-W and dH=Q-W.

Chestermiller
Mentor
Mmmm now it starts to make sense.

So there IS dH=Q-W, and it is the Steady Flow Energy Equation!

BTW, when did I say I am asking for closed systems?

So can you elaborate now, why in SFEE we have dH=Q-W (ignoring kinetic and potential energy) and in closed systems we have dU=Q-W ?
And what is the Work in the SFEE that is only "part"of the work done?
You need to look up the derivation of the SFEE. It focuses on an open control volume, and part of the work goes into pushing material into and out of the control volume. The shaft work does not include this work. That is why there is a ##\Delta H##, not a ##\Delta U##.

Regarding your comment "BTW, when did I say I am asking for closed systems?", what were we supposed to think? We can't read your mind. You need to provide us with all the information that is relevant.

Chestermiller
Mentor
As I told you I don't have a specific question. I just got confused between dU=Q-W and dH=Q-W.
Does what I said about the SFEE help?

Mmm, I read a bit about derivation of SFEE but I can't figure out much. In few words, I understand that in a closed system, P2V2-P1V1=W. In an open system it seems that P2V2-P1V1 is not W. How is the work done to the system or produced by the system in SFEE conditions categorized? And what is its relations to the difference in pressure energy?

Chestermiller
Mentor
Mmm, I read a bit about derivation of SFEE but I can't figure out much. In few words, I understand that in a closed system, P2V2-P1V1=W.
This is totally incorrect. You need to go back and review closed systems so that you can understand them properly before you can move on to open systems.

This is totally incorrect. You need to go back and review closed systems so that you can understand them properly before you can move on to open systems.

OK, W=d(PV), which means when we have constant P, we can write W=PdV and when we have constant V, we can write W=VdP.

But can anyone explain me in few words why in SFEE, for energy conservation, we consider pressure energy and in closed systems we don't?

Chestermiller
Mentor
OK, W=d(PV), which means when we have constant P, we can write W=PdV and when we have constant V, we can write W=VdP.

Totally incorrect again (except at constant pressure). You'll never be able to understand SFEE if you first don't understand the closed system version of the first law. You obviously haven't read my Physics Forums Insights article that I referred you to.

Chet

I read the article! (the first law part). It says only that W=PdV when P=const. Obviously when V=const there is no W. Yet, in that situation, pressure energy increases! How is that depicted?

And it doesn't mention anything about SFEE.

Chestermiller
Mentor
I read the article! (the first law part). It says only that W=PdV when P=const. Obviously when V=const there is no W.
It doesn't mention anything about SFEE.
It doesn't say that W=PdV only when P=const.

any update?

will anyone explain me why in closed systems we have dU=Q-W and why in open steady flow systems we have dH=Q-W?

thanks!