Physics Forums

## Work done by compressing a container of gas

I want to show that the work done by compressing a container of gas with uniform pressure is $$-\int_{V_i}^{V_F} p(V)dV,$$ where p(V) is the pressure of the gas as a function of volume. This equation was derived in my text for the special case of a piston, but I wanted a more general derivation.

So I started by writing down the equation for the power transmitted to the gas in the container: $$P=-\oint p \vec{v} \cdot d\vec{A},$$ where the integral is taken over the entire surface of the container and v is the velocity of some point on the container. Assuming p is uniform, we get that
$$P=-p\oint \vec{v} \cdot d\vec{A} = -p\frac{d}{dt} \oint \vec{r} \cdot d\vec{A} = -p\frac{d}{dt} \int \nabla \cdot \vec{r} dV = -3p\frac{dV}{dt}.$$
Integrating this equation with respect to time gives the wrong result by a factor of 3. What have I done wrong?

PhysOrg.com  physics news on PhysOrg.com  >> Promising doped zirconia>> New X-ray method shows how frog embryos could help thwart disease>> Bringing life into focus

Not sure I understand the question. If you're compressing the gas, the pressure should be increasing, otherwise you're not really compressing the gas. Also, if you're calculating a force times a velocity, you're solving for power rather than work.

Quote by Ryoko 					 				 				If you're compressing the gas, the pressure should be increasing, otherwise you're not really compressing the gas.
By "uniform pressure" I mean constant throughout the container, not constant in time. As you can see, pressure is a function of volume in the equation.

Quote by Ryoko 					 				 				Also, if you're calculating a force times a velocity, you're solving for power rather than work.
Which I can then integrate to yield the work done.

## Work done by compressing a container of gas

By "uniform pressure" I mean constant throughout the container, not constant in time. As you can see, pressure is a function of volume in the equation.
Well I am a bit rusty on my calculus, but I'm noticing that your first function has p as function of volume. But the last function has p taken out as a constant. The problem is that p is still a function of the closed volume and can't be taken out as a constant.

You should be careful about this and check your notes.  P should be the external pressure not the pressure of the gas.  (external) Work is done against this external pressure. Pint may not even be uniform or definable.   It is quite possible for ∫PintdV to exist but not be equal to the work done. In an extreme case, such as expansion into a vacuum, the work done is zero, but ∫PintdV is not.

Quote by Ryoko 					 				 				Well I am a bit rusty on my calculus, but I'm noticing that your first function has p as function of volume. But the last function has p taken out as a constant. The problem is that p is still a function of the closed volume and can't be taken out as a constant.
I'm taking the integral over the surface of the container at a fixed instant of time, so the volume is fixed when I perform the integral.

Quote by Studiot 					 				 				P should be the external pressure not the pressure of the gas.  (external) Work is done against this external pressure. Pint may not even be uniform or definable.
I don't think this is a problem. The external pressure and the interior pressure at the surface of the container will be equal (unless the container has a large acceleration). It's true that "P_int may not even be uniform or definable", but I'm assuming it is uniform for the purposes of this derivation. This is, as I understand it, a good approximation for quasi-static processes.

At any rate, even if you think it's important to replace internal pressure with external pressure, neither the derivation nor the desired result changes, so we're still left with the original problem. IMO I don't think the problem is with the physics. I don't think my math was quite kosher, especially the step were I pulled the time derivative out of the integral.

If the pressures are equal on both sides of the container, no work is being done.

I don't think this is a problem. The external pressure and the interior pressure at the surface of the container will be equal (unless the container has a large acceleration). It's true that "P_int may not even be uniform or definable", but I'm assuming it is uniform for the purposes of this derivation. This is, as I understand it, a good approximation for quasi-static processes.  At any rate, even if you think it's important to replace internal pressure with external pressure, neither the derivation nor the desired result changes, so we're still left with the original problem. IMO I don't think the problem is with the physics. I don't think my math was quite kosher, especially the step were I pulled the time derivative out of the integral.
With respect, you need to get the physics correct before performing calculations.

Here is a simplified physics argument along the lines of yours, you might like to reproduce using your surface integrals.

Referring to the diagram consider a volume of fluid with surface area A.
Let it suffer a small expansion to area A' under a uniform external pressure P.

Consider element of area dA of the surface and let its displacement along the normal be dn.

If this is expansion is carried out extemely slowly no energy of motion will be developed so the only mechanical work performed will be due to the enlargement of the volume.

Thus the work done by the fluid is

δW = Ʃ(P.dA)dn

= PƩdA.dn

=P x total increase in volume of small shell

=P dV

Integrating again (ie dW) from V1 to V2

gives the total work
Attached Thumbnails

I think if the pressure is constant while compressing, it is not likely to be an adiabatic process, meaning that there would be interaction with surroundings that you also need to consider, right?

Recognitions:
Gold Member

Quote by dEdt 					 				 				I want to show that the work done by compressing a container of gas with uniform pressure is $$-\int_{V_i}^{V_F} p(V)dV,$$ where p(V) is the pressure of the gas as a function of volume. This equation was derived in my text for the special case of a piston, but I wanted a more general derivation.  So I started by writing down the equation for the power transmitted to the gas in the container: $$P=-\oint p \vec{v} \cdot d\vec{A},$$ where the integral is taken over the entire surface of the container and v is the velocity of some point on the container. Assuming p is uniform, we get that  $$P=-p\oint \vec{v} \cdot d\vec{A} = -p\frac{d}{dt} \oint \vec{r} \cdot d\vec{A} = -p\frac{d}{dt} \int \nabla \cdot \vec{r} dV = -3p\frac{dV}{dt}.$$ Integrating this equation with respect to time gives the wrong result by a factor of 3. What have I done wrong?
Your problem was introducing the position vector $\vec{r}$.

$\nabla \cdot \frac{D\vec{r}}{Dt}$ is not equal to $\frac{D(\nabla \cdot\vec{r})}{Dt}$

You already had the result you needed, and didn't realize it. $$P=-\int p \vec{v} \cdot d\vec{A}=-p\int \vec{v} \cdot \vec{n}dA$$
where $\vec{n}$ is an outwardly directed normal to the boundary. $\vec{v} \cdot \vec{n}$ is just the component of boundary velocity normal to the present boundary location (the component tangent to the boundary surface doesn't contribute to volume increase). When this is integrated over the entire boundary surface, it gives you the rate of change of volume contained within the boundary. Thus,

$$\frac{dV}{dt}=\int \vec{v} \cdot \vec{n}dA$$

Recognitions:      Gold Member  I think the next thing you want to do is apply the divergence theorem to my last equation, and then combine the result with the continuity equation (differential mass balance equation) to eliminate del dot v, and replace it with the material time derivative of the natural log of density.    $$\frac{dV}{dt}=\int \vec{v} \cdot \vec{n}dA$$  Applying the divergence theorem:  $$\frac{dV}{dt}=\int (\nabla \cdot \vec{v})dV$$  The continuity equation gives:  $$\nabla \cdot \vec{v}=-\frac{1}{\rho}\frac{D\rho}{Dt}$$  The right hand side of this equation represents physically the local fractional rate in volumetric expansion per unit time, following the material parcels.  If we substitute this equation into the previous equation, we get: $$\frac{dV}{dt}=\int (-\frac{1}{\rho}\frac{D\rho}{Dt})dV$$  In this equation, the quantity $(-\frac{1}{\rho}\frac{D\rho}{Dt})dV$ represents physically the time rate of increase in volume of the material parcel dV.   Chet

Recognitions:      Gold Member  I also wanted to mention that the material derivative D/Dt does not commute with the integral over surface area or volume.  D/Dt is strictly a local microscopic derivative following a mass parcel.  This is another mistake that you made in your derivation.

Thread Tools

|                                                                  |                               |         |
|------------------------------------------------------------------|-------------------------------|---------|
| Similar Threads for: Work done by compressing a container of gas |                               |         |
| Thread                                                           | Forum                         | Replies |
|                                                                  | Introductory Physics Homework | 3       |
|                                                                  | Introductory Physics Homework | 9       |
|                                                                  | Advanced Physics Homework     | 2       |
|                                                                  | Introductory Physics Homework | 1       |
|                                                                  | Introductory Physics Homework | 7       |
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 6, "mathjax_display_tex": 12, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9461482763290405, "perplexity_flag": "head"}