# How to work out the kWh required to compress hydrogen gas?

I am trying to work out the kWh/kg of compression of hydrogen. I have used the isentropic compression calculations and get values for the entropy but am unsure how to get this to a kWh value. I might be doing completely the wrong thing however.

• I want to really help you, plz consider providing following information: what are boundary conditions ( assuming piston as a system), is wall of piston insulated or diabatic. What is desired degree of accuracy, you want exact values or maximum values ? Mar 17 at 14:33

Calculating the specific kWh required to compress hydrogen gas depends on several factors, making it impossible to provide a one universally applicable formula. However, here's an outline of the key steps involved:

1. Define the conditions:

Specify the initial pressure (P1) of the hydrogen gas. Determine the final pressure (P2) you want to achieve. Define the mass (m) or volume (V) of hydrogen gas to be compressed. Choose the type of compressor (e.g., reciprocating, centrifugal) as different types have varying efficiencies.

1. Select a method:

There are two main methods to estimate the energy required for compression:

a) Using the ideal gas law (assuming isothermal compression): This method assumes constant temperature during compression, which is an ideal case not achievable in reality. However, it provides a theoretical minimum energy requirement.

The formula is: $$W = n * R * ln(P2/P1)$$, where: W is the work done in Joules; n is the number of moles of gas; R is the gas constant (8.314 J/mol*K); ln is the natural logarithm. To convert Joules to kWh, divide by the conversion factor 3600 seconds/hour and 1000 J/kJ: kWh = W / (3600 * 1000).

b) Using compressor efficiency: This method is more realistic as it accounts for energy losses due to friction and other factors within the compressor.

The formula is: $$kWh = (m * (P2 * V2) / (η * Z * J))$$, where: m is the mass of hydrogen gas (kg); V2 is the final volume of hydrogen gas (m³); η is the compressor efficiency (decimal value between 0 and 1); Z is the compressibility factor (accounts for non-ideal gas behavior) at the specific conditions, which can be found from tables or charts; J is the conversion factor (1 kJ/kWh).

Additional consideration: The actual energy consumption can be higher than the estimated values due to factors like heat loss during compression, additional equipment needs, and possible inefficiencies in the system.

• Hi, thanks for both of those, the second formula looks good but do you have any information on how it is derived? Mar 16 at 16:51

Let's consider a piston. Area A, length L1, filled with an ideal gas at pressure P1 (ideal gas requires pressures and temperatures be absolute- 0 being true theoretical vacuum, absolute zero respectively). Initial volume is V1=A×L1.

We compress it to volume V2. Supposing temperature doesn't change, PV remains a constant (nRT) so P1×V1=P2×V2 and more generally P=P1×V1/V.

P×A×dL is the energy spent (Force×distance) to compress. A×dL=dV. In other words we wish to integrate P1×V1/V dV from V1 to V2. Integral of 1/V dV is ln(V)+C so

Energy = P1×V1×(ln(V2)-ln(V1)) = P1×V1×ln(V2/V1) [volume form]

Substitute V2= P1×V1/P2

= P1×V1×ln(P1/P2) = [pressure form]

Note the signage for energy. Letting it expand can make it do work (positive). Reciprocating the division can get it in forms where the cost instead becomes positive.

• Hi, If I were to use this formula, would I use pressure in the form of Pa or bar? Mar 16 at 17:13
• Make sure it's absolute pressure (not gauge) for ideal gas approx. Most unit conversions can be searched online these days google.com/search?q=barm3+to+J&oq=barm3+to+J
– Abel
Mar 17 at 10:03