# Calculating Joules to Compress Air: Dan's Question

• Dalau
In summary, the conversation is about calculating the amount of energy required to compress a certain volume of air at a specific temperature to a desired pressure. The equation P=nRT/V is used to integrate the function and the result is 5520.035 Joules for compressing air into a 4-gallon tank to 300 kPa. There is also a question about the volume of gas expanding at ambient pressure and whether it would be 12 or 16 gallons.

#### Dalau

So here I am at work, and the go-to people for physics are away. Here is the problem I am trying to figure out:

I'm wondering how much energy it takes to compress a certain amount of
air at a certain temperature, to a certain pressure. For example, let's
say I had a 4-gallon tank of STP air and I wanted to add air until the
pressure inside the tank reached 300 kPa. How much energy, in joules,
would it require to do this?
-Dan

edit: nevermind this thread. Zz gave me a bit of help. If you want, you can still give me some help, but for now, I should be fine, unless I post here again requesting help.

You just do it the opposite way : calculate how much work the tank releases when it vents the gas out.

We have P=nRT/V, so you integrate the function nRT/V dV with 4 galon and 12 galon as the endpoints of the interval. 12 galon is the volume the compressed gas expand when it is released.
I am sorry not to have the numerical results for you.

In this case, consider the atmosphere equals to 100kPa, then the energy needed to compress air into a 4 gallon tank to 300kPa is 5520.035 Joules.

I ve got a question:

The gas is compressed to 300kPa with the volume of 1 gallon. At ambient condition, the pressure is 100kPa, and the absolute value of 300kPa must be 400kPa, so that the volume of gas will be 16 gallons, not just 12 gallons after being expanded to ambient pressure.
I am right?