Main content
Physics library
Course: Physics library > Unit 10
Lesson 3: Laws of thermodynamics- Macrostates and microstates
- Quasistatic and reversible processes
- First law of thermodynamics / internal energy
- More on internal energy
- What is the first law of thermodynamics?
- Work from expansion
- PV-diagrams and expansion work
- What are PV diagrams?
- Proof: U = (3/2)PV or U = (3/2)nRT
- Work done by isothermic process
- Carnot cycle and Carnot engine
- Proof: Volume ratios in a Carnot cycle
- Proof: S (or entropy) is a valid state variable
- Thermodynamic entropy definition clarification
- Reconciling thermodynamic and state definitions of entropy
- Entropy intuition
- Maxwell's demon
- More on entropy
- Efficiency of a Carnot engine
- Carnot efficiency 2: Reversing the cycle
- Carnot efficiency 3: Proving that it is the most efficient
© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice
What are PV diagrams?
Learn what PV diagrams are and how to use them to find the change in internal energy, work done, and heat.
What are PV diagrams?
Consider a gas sealed in a container with a tightly fitting yet movable piston as seen below. We can do work on the gas by pressing the piston downward, and we can heat up the gas by placing the container over a flame or submerging it in a bath of boiling water. When we subject the gas to these thermodynamics processes, the pressure and volume of the gas can change.
A convenient way to visualize these changes in the pressure and volume is by using a Pressure Volume diagram or PV diagram for short. Each point on a PV diagram corresponds to a different state of the gas. The pressure is given on the vertical axis and the volume is given on the horizontal axis, as seen below.
Every point on a PV diagram represents a different state for the gas (one for every possible volume and pressure). As a gas goes through a thermodynamics process, the state of the gas will shift around in the PV diagram, tracing out a path as it moves (as shown in the diagram below).
Being able to decode the information shown in a PV diagram allows us to make statements about the change in internal energy delta, U, heat transferred Q, and work done W on a gas. In the sections below, we'll explain how to decipher the hidden information contained in a PV diagram.
Note: Unless otherwise specified, we will assume that the work W refers to the work done on the gas.
How do we determine the sign of the work done from a PV diagram?
Let's say our gas starts out in the state shown in the PV diagram below.
If we press the piston downward, the volume of the gas will decrease, so the state must shift to the left toward smaller volumes (as seen in the diagram below). Since the gas is being compressed we can also say for sure that positive work W is being done on the gas.
Similarly, if we let the gas expand, pushing the piston upward, the volume of the gas will increase, so the state must shift to the right toward larger volumes (as seen in the diagram below). Since the gas is expanding we can also say for sure that negative work W is being done on the gas.
So if we ever see a state shifting to the left on a PV diagram we can say for sure that the work done on the gas was positive. Similarly, if we ever see a state shifting to the right on a PV diagram we can say for sure that the work done on the gas was negative.
How do we determine the magnitude of the work done from a PV diagram?
The work done during a thermodynamic process is equal to the area under the curve as seen in the diagram below.
The reason why work is equal to the area under the curve is that,
And since P, delta, V is just the start text, h, e, i, g, h, t, end text, times, start text, space, w, i, d, t, h, end text of the rectangle shown above, the work is equal to the area. If we use pressure units of start text, p, a, s, c, a, l, s, end text and volume units of start text, m, end text, cubed then the energy we find will be in units of start text, j, o, u, l, e, s, end text.
We have to be really careful with signs though. If the path on a PV diagram is directed to the left, the volume is decreasing, and positive work is being done on the gas. If the path on a PV diagram is directed to the right (as in the diagram above), the volume is increasing, and negative work is being done on the gas since W, start subscript, start text, b, y, space, g, a, s, end text, end subscript, equals, minus, W, start subscript, start text, o, n, space, g, a, s, end text, end subscript.
It doesn't matter what shape the path takes, the area under the curve will still represent the work done. For any curved path we can imagine breaking the area into an infinite amount of infinitesimally thin rectangles.
The area of each rectangle would represent the work done during each infinitesimal step, and the sum of the areas would represent the total work done for the entire process.
It should be said that we are always going to assume these processes are taking place slowly enough that the entire gas can be at thermodynamic equilibrium at every moment (i.e. the same temperature throughout the gas). If this seems dubious to you, you're right to question it. However, even though basically no real world processes will exactly satisfy this requirement, our ability to model many thermodynamic processes are not fatally jeopardized by this lack of adherence to ideal circumstances.
How do we determine the sign of delta, U from a PV diagram?
Remember that internal energy and temperature are proportional U, \propto, T. So if the temperature increases, the internal energy must also increase.
Now, if the gas we're considering is an ideal gas we also know that,
And if no gas is allowed to escape (so the number of molecules N is constant) we can say that P, V, \propto, T. All of this means that,
So if the quantity of pressure times volume left parenthesis, P, times, V, right parenthesis increases, the temperature T and internal energy U must also increase (which makes delta, U positive). This idea is represented in the diagram shown below.
This means that anytime the state in a PV diagram ends up further up and right than where it started, delta, U is a positive number. Similarly, anytime the state in a PV diagram ends up further down and left than where it started, delta, U is a negative number.
Now if the state in the PV diagram moves up and left (pressure increases and volume decreases), or down and right (pressure decreases and volume increases), it is a little ambiguous whether the quantity left parenthesis, P, times, V, right parenthesis actually increased or decreased (since one variable increased and the other variable decreased). To be sure, one would have to check the exact values of the initial and final P and V on the axes of the graph to tell if the quantity left parenthesis, P, times, V, right parenthesis actually increased or decreased.
It is also good to note that if the quantity left parenthesis, P, times, V, right parenthesis does not change, then the temperature T and internal energy U do not change either. For instance, if the pressure doubles, and the volume is cut in half, left parenthesis, P, times, V, right parenthesis remains the same value (since 2, P, times, start fraction, V, divided by, 2, end fraction, equals, P, V). the temperature T and internal energy U will end the process with the same values they started with.
How do we determine the sign of Q from a PV diagram?
Given a PV diagram, we typically have to rely on the first law of thermodynamics delta, U, equals, Q, plus, W to determine the sign of the net heat that enters or exits a gas. If we solve this equation for the heat Q we get,
Now that we know this, we can use what we know about finding the sign of delta, U and W to find the sign of Q in many cases. So for instance, if the change in internal energy is positive and the work done is negative,
Q, equals, left parenthesis, plus, right parenthesis, minus, left parenthesis, minus, right parenthesis, equals, plus ...the net heat must be positive.
Which makes sense, since if the internal energy increased even though work was done by the gas, that implies that more heat must have entered the gas than energy lost due to the work done by the gas.
Or for example, if the internal energy decreases and the work is positive,
Q, equals, left parenthesis, minus, right parenthesis, minus, left parenthesis, plus, right parenthesis, equals, minus ...the net heat must be negative.
Which makes sense, since if the internal energy decreased even though work was done on the gas, that implies that more heat must have left the gas than energy gained by the gas from work being done on it.
What do solved examples involving PV diagrams look like?
Example 1: Finding signs
An ideal gas in a sealed container is taken through the process shown in the PV diagram below.
Example 2: Finding area
An ideal gas in a sealed container is taken through the process shown in the PV diagram below. The initial volume of the gas is V, start subscript, i, end subscript, equals, 0, point, 25, start text, m, end text, cubed and the final volume of the gas is V, start subscript, f, end subscript, equals, 0, point, 75, start text, m, end text, cubed. The initial pressure of the gas is P, start subscript, i, end subscript, equals, 70, comma, 000, start text, space, P, a, end text and the final pressure of the gas is P, start subscript, f, end subscript, equals, 160, comma, 000, start text, space, P, a, end text.
What is the work done on the gas during the process shown?
Solution:
We can find the work done by determining the total area under the curve on a PV diagram. We have to make sure we use the total area, all the way down to the volume axis. For instance, we can imagine viewing the area under the curve in the example shown above as a triangle and a rectangle (as seen below).
Now we just find the sum of the areas of the triangle and rectangle. The height of the rectangle is the pressure P, start subscript, i, end subscript and the width of the rectangle is the change in volume delta, V, equals, V, start subscript, f, end subscript, minus, V, start subscript, i, end subscript. So,
start color #11accd, start text, a, r, e, a, space, 1, end text, end color #11accd, equals, start text, h, e, i, g, h, t, end text, times, start text, w, i, d, t, h, end text (area of the rectangle)
start color #11accd, start text, a, r, e, a, space, 1, end text, end color #11accd, equals, P, start subscript, i, end subscript, times, delta, V (height is P, start subscript, i, end subscript and width is delta, V)
start color #11accd, start text, a, r, e, a, space, 1, end text, end color #11accd, equals, left parenthesis, 70, comma, 000, start text, space, P, a, end text, right parenthesis, times, left parenthesis, 0, point, 75, start text, m, end text, cubed, minus, 0, point, 25, start text, m, end text, cubed, right parenthesis (plug in values)
start color #11accd, start text, a, r, e, a, space, 1, end text, end color #11accd, equals, 35, comma, 000, start text, space, J, end text (calculate)
We can find the area of a triangle by using A, equals, start fraction, 1, divided by, 2, end fraction, b, h.
start color #1fab54, start text, a, r, e, a, space, 2, end text, end color #1fab54, equals, start fraction, 1, divided by, 2, end fraction, b, h (area of the triangle)
start color #1fab54, start text, a, r, e, a, space, 2, end text, end color #1fab54, equals, start fraction, 1, divided by, 2, end fraction, b, left parenthesis, 160, comma, 000, start text, P, a, end text, minus, 70, comma, 000, start text, space, P, a, end text, right parenthesis (the height of the triangle is the difference in pressures P, start subscript, f, end subscript, minus, P, start subscript, i, end subscript)
start color #1fab54, start text, a, r, e, a, space, 2, end text, end color #1fab54, equals, start fraction, 1, divided by, 2, end fraction, left parenthesis, 0, point, 75, start text, m, end text, cubed, minus, 0, point, 25, start text, m, end text, cubed, right parenthesis, left parenthesis, 160, comma, 000, start text, P, a, end text, minus, 70, comma, 000, start text, space, P, a, end text, right parenthesis (the base of the triangle is the difference in volumes V, start subscript, f, end subscript, minus, V, start subscript, i, end subscript)
start color #1fab54, start text, a, r, e, a, space, 2, end text, end color #1fab54, equals, 22, comma, 500, start text, space, J, end text (calculate)
So the total area under the curve is 35, comma, 000, start text, space, J, end text, plus, 22, comma, 500, start text, space, J, end text, equals, 57, comma, 500, start text, space, J, end text
This area represents the absolute value of the total work done during the process. To determine the sign of the work done on the gas we notice that the process moves the state to the right, causing the gas to expand. When gas expands the work done on the gas is negative. So,
W, start subscript, start text, o, n, space, g, a, s, end text, end subscript, equals, minus, 57, comma, 500, start text, space, J, end text (celebrate)
Want to join the conversation?
- If work done by a system is equal to change in pressure-volume. Why does an upward and rightward shift in the pressure-volume diagram cause an increase in internal energy? Work done by the system should reduce the systems internal energy shouldn't it?(3 votes)
- The work done in expanding does in fact take energy out of the system, so the only way the state can shift to a higher PV value while the gas does work is to have even more heat Q added to the gas during the process so that overall the gas gains energy.(20 votes)
- maybe this is not a good doubt .. but if the gas has been compressed why is the work done on the gas positive? is nt work done = PdeltaV
so the work done by the gas should be negative if im not wrong
...
correct me if im wrong(2 votes)- I would say is more a matter of semantics
- The work done on the gas is positive
- The work done by the gas is negative
The conservation of energy (first law of thermodynamics) states:
Internal Energy Change = Heat added into the System + Work done on the System
or
Internal Energy Change = Heat added into the System - Work done by the System(5 votes)
- If we were to forcefully pull the piston up instead of push down - would this be considered work in or out (+ or -). Just a little confused because we are applying a force (doing work) to move the piston but the volume is increasing and pressure decreasing so according to the convention the gas is doing work?? :)(4 votes)
- What if there is a closed path for a cyclic process?- This is confusing me.(2 votes)
- This is now explained in a little pop-up box in the middle of the article, but you may have missed it or it may have been added after your question.
While the cycle is moving L to R (increasing volume) the work done BY the gas (area under the curve) is considered positive. While the cycle is moving R to L (decreasing volume) the work done BY the gas is considered negative. The total work of the cycle is the sum of these two works (areas under the curves), but since one is negative, it's essentially the difference. The difference between the two areas is, by definition, the area within the cycle and that is the work done BY the gas during the cycle.
As for the sign, if the cycle is clockwise, that means the higher line (higher work area) was L to R (positive work), so the total W is positive. if the cycle is counterclockwise, that means the higher line (higher W area) was R to L (negative work), so the total W is negative (work was done ON the gas). But in the either case, the magnitude of the work is still the area inside the PV cycle.(3 votes)
- The slope of the PV diagram has the units N/m^5, does that mean anything?
Thanks(2 votes)- The slope tells you how fast the pressure is changing with respect to volume. Slope m, is equal to Pressure/Volume, or dimensionally: m=(F/A)/V in SI units, it will be kg/(m^5) or kg*(m^-4)s^(-2). This tells you how fast the pressure is changing with volume for every kg of gas/atoms in the system per volume. If you think about classical mechanics, for example, a ball heading towards the earth, (neglecting air resistance and approximating the distance near the surface of the earth), the force is F=N=kg(m/s^2). Intuitively, you can think of it as I need to apply this force to move this object with this mass. And to see how long it takes, you divide by the time interval (1/s). The extra s is to account for the extra time needed to move the object that is already traveling with some velocity.
Sorry if I ended up confusing you more... The slope essentially tells you how fast the dependent variable (y-axis) is changing when you let the independent (x-axis) vary.
- (senior) physics/mechanical engineering(2 votes)
- I solved example 2 using integral Calculus. I found the equation of the line and then I calculated its definite integral from 0.25 to 0.75. Alas, I gost -45778 joules as final answer. Does this have to do with thwe fact that I did not account for the constant of the indefinite integral of the equation of the line? I guess so, but could refer me to some videos where Sal takes this into account? (Please do not bother to xplain the matematical technique here. Refer me some videos)(2 votes)
- When using calculus to calculate these changes you really have to take into account that the pressure isn't constant.
From ideal gas law, P = nRT/V
If you sub this in for P when integrating this takes the pressure changes into account.
Leading to
W = -PdV
= -nRT X integral of 1/v
Giving final answer of, W = -nRT ln(Vf/Vi) (Vf = v final, Vi = v initial)(1 vote)
- When a gas is doing work yet increasing its pressure, can we say that the pressure increase is definitely due to heat being added?(1 vote)
- Unless gas is added, it is. If gas is doing work, its volume is increasing. As pressure and volume increases, T=PV/nR is increasing too. Thus, Delta U = Q - W is positive. As W is positive, Q should be positive.(2 votes)
- why does the volume change determines work sign in the first place? to me, pressure change would be much more intuitive since thats what causing the imbalance - increasing alerady higher pressure in containter, while decreasing already low pressure in surrounding(1 vote)
- Work is force*distance. The volume change occurs because a wall of the container is being displaced. If you just increase the pressure and there is no volume change (think about how you would do that), no work is being done.(2 votes)
- What if we use energy to push the piston up? Wouldn't it mean that we are losing energy?(1 vote)
- If you add external energy to the system by performing work on the system, then the system is gaining energy.(1 vote)
- why In the PV diagram we are using the internal pressure to calculate the work ? shouldn't it be the external pressure as we have done in the previous videos ?(1 vote)
- since it's a quasistatic pressure, every intermediate state is in equilibrium i.e. internal pressure is almost equal to external pressure so they can be considered interchangable(1 vote)