Ideal gas law

Volume of one mole of hydrogen at STP = 24,070 cm3.
Temperature of core of the sun = 10,000,000 K.
Pressure at core of the sun = 200,000,000,000 bar.
Volume of one mole of hydrogen at core of sun = 3.3 mm3
Volume per atom at core = 2.75 \* 10^12 fm3
Distance between atoms in core = 14,000 fm (assuming a gaseous state)
3\*10,000,000 K \* 1 boltzmann constant = 2585 eV
2585 eV = Electric potential of 1 proton at 557 fm

The **ideal gas law**, also called the **general gas equation**, is the equation of state of a hypothetical ideal gas. It is a good approximation of the behavior of many gases under many conditions, although it has several limitations. It was first stated by Benoît Paul Émile Clapeyron in 1834 as a combination of the empirical Boyle's law, Charles's law, Avogadro's law, and Gay-Lussac's law. The ideal gas law is often written in an empirical form:

P
# V
n
R
T

{\displaystyle PV = nRT}

where

P

{\displaystyle P}

,

V

{\displaystyle V}

 and

T

{\displaystyle T}

 are the pressure, volume and temperature;

n

{\displaystyle n}

 is the amount of substance; and

R

{\displaystyle R}

 is the ideal gas constant. It is the same for all gases.
It can also be derived from the microscopic kinetic theory, as was achieved (apparently independently) by August Krönig in 1856 and Rudolf Clausius in 1857.

Note that this law makes no comment as to whether a gas heats or cools during compression or expansion. An ideal gas may not change temperature, but most gases like air are not ideal and follow the Joule–Thomson effect.

## Equation

The state of an amount of gas is determined by its pressure, volume, and temperature. The modern form of the equation relates these simply in two main forms. The temperature used in the equation of state is an absolute temperature: the appropriate SI unit is the kelvin.

### Common forms

The most frequently introduced forms are:

p
# V
n
R
# T
n

k
B

N
A

T
,

{\displaystyle pV = nRT = nk\_\text{B}N\_\text{A}T,}

where:

* p

{\displaystyle p}

 is the pressure of the gas,
* V

{\displaystyle V}

 is the volume of the gas,
* n

{\displaystyle n}

 is the amount of substance of gas (also known as number of moles),
* R

{\displaystyle R}

 is the ideal, or universal, gas constant, equal to the product of the Boltzmann constant and the Avogadro constant,
* k
B

{\displaystyle k\_\text{B}}

 is the Boltzmann constant
* ***N
A

{\displaystyle N\_A}*** is the Avogadro constant
* T

{\displaystyle T}

 is the absolute temperature of the gas.

In SI units, *p* is measured in pascals, *V* is measured in cubic metres, *n* is measured in moles, and *T* in kelvins (the Kelvin scale is a shifted Celsius scale, where 0.00 K = −273.15 °C, the lowest possible temperature). *R* has the value 8.314 J/(K·mol) ≈ 2 cal/(K·mol), or 0.0821 l·atm/(mol·K).

### Molar form

How much gas is present could be specified by giving the mass instead of the chemical amount of gas. Therefore, an alternative form of the ideal gas law may be useful. The chemical amount (*n*) (in moles) is equal to total mass of the gas (*m*) (in kilograms) divided by the molar mass (*M*) (in kilograms per mole):

# n

m
M

.

{\displaystyle n = \frac{m}{M}. }

By replacing *n* with *m*/*M* and subsequently introducing density *ρ* = *m*/*V*, we get:

p
# V

m
M

R
T

{\displaystyle pV = \frac{m}{M} RT }

# p

m
V

R
T

M

{\displaystyle p = \frac{m}{V} \frac{RT}{M} }

# p
ρ

R
M

T

{\displaystyle p = \rho \frac{R}{M} T }

Defining the specific gas constant *R*specific(r) as the ratio *R*/*M*,

# p
ρ

R
specific

T

{\displaystyle p = \rho R\_\text{specific}T }

This form of the ideal gas law is very useful because it links pressure, density, and temperature in a unique formula independent of the quantity of the considered gas. Alternatively, the law may be written in terms of the specific volume *v*, the reciprocal of density, as

p
# v

R
specific

T
.

{\displaystyle pv = R\_\text{specific}T. }

It is common, especially in engineering and meteorological applications, to represent the **specific** gas constant by the symbol *R*. In such cases, the **universal** gas constant is usually given a different symbol such as

R
¯

{\displaystyle \bar R}

 or

R
∗

{\displaystyle R^\*}

 to distinguish it. In any case, the context and/or units of the gas constant should make it clear as to whether the universal or specific gas constant is being referred to.

### Statistical mechanics

In statistical mechanics the following molecular equation is derived from first p

where *P* is the absolute pressure of the gas, *n* is the number density of the molecules (given by the ratio *n* = *N*/*V*, in contrast to the previous formulation in which *n* is the *number of moles*), *T* is the absolute temperature, and *k*B is the Boltzmann constant relating temperature and energy, given by:

k
B

=

R

N
A

{\displaystyle k\_\text{B} = \frac{R}{N\_\text{A}} }

where *N*A is the Avogadro constant.

From this we notice that for a gas of mass *m*, with an average particle mass of *μ* times the atomic mass constant, *m*u, (i.e., the mass is *μ* u) the number of molecules will be given by

# N

m

μ

m
u

,

{\displaystyle N = \frac{m}{\mu m\_\text{u}}, }

and since *ρ* = *m*/*V* = *nμm*u, we find that the ideal gas law can be rewritten as

# P

1
V

m

μ

m
u

k
B

# T

k
B

μ

m
u

ρ
T
.

{\displaystyle P = \frac{1}{V}\frac{m}{\mu m\_\text{u}} k\_\text{B} T = \frac{k\_\text{B}}{\mu m\_\text{u}} \rho T. }

In SI units, *P* is measured in pascals, *V* in cubic metres, *T* in kelvins, and
*k*B = 1.38×10−23 J⋅K−1  in SI units.

### Combined gas law

Combining the laws of Charles, Boyle and Gay-Lussac gives the **combined gas law**, which takes the same functional form as the ideal gas law save that the number of moles is unspecified, and the ratio of

P
V

{\displaystyle PV}

 to

T

{\displaystyle T}

 is simply taken as a constant:

P
V

T

=
k
,

{\displaystyle \frac{PV}{T}=k,}

where

p

{\displaystyle p}

 is the pressure of the gas,

V

{\displaystyle V}

 is the volume of the gas,

T

{\displaystyle T}

 is the absolute temperature of the gas, and

k

{\displaystyle k}

 is a constant. When comparing the same substance under two different sets of conditions, the law can be written as

P
1

V
1

T
1

=

P
2

V
2

T
2

.

{\displaystyle \frac{P\_1 V\_1}{T\_1}= \frac{P\_2 V\_2}{T\_2}. }

## Energy associated with a gas

According to assumptions of the kinetic theory of ideal gases, we assume that there are no intermolecular attractions between the molecules of an ideal gas. In other words, its potential energy is zero. Hence, all the energy possessed by the gas is in the kinetic energy of the molecules of the gas.

# E

3
2

n
R
T

{\displaystyle E=\frac{3}{2} n RT }

This is the kinetic energy of *n* moles of a monatomic gas having 3 degrees of freedom; *x*, *y*, *z*.

# E

3
2

R
T

{\displaystyle E=\frac{3}{2}RT}
 energy associated with one gram of a monatomic gas

# E

3
2

r
T

{\displaystyle E=\frac{3}{2}rT}
 energy associated with one molecule (or atom) of a monatomic gas

# E

3
2

k
B

T

{\displaystyle E=\frac{3}{2}k\_BT}

## Applications to thermodynamic processes

The table below essentially simplifies the ideal gas equation for a particular processes, thus making this equation easier to solve using numerical methods.

A thermodynamic process is defined as a system that moves from state 1 to state 2, where the state number is denoted by subscript. As shown in the first column of the table, basic thermodynamic processes are defined such that one of the gas properties (*P*, *V*, *T*, *S*, or *H*) is constant throughout the process.

For a given thermodynamics process, in order to specify the extent of a particular process, one of the properties ratios (which are listed under the column labeled "known ratio") must be specified (either directly or indirectly). Also, the property for which the ratio is known must be distinct from the property held constant in the previous column (otherwise the ratio would be unity, and not enough information would be available to simplify the gas law equation).

In the final three columns, the properties (*p*, *V*, or *T*) at state 2 can be calculated from the properties at state 1 using the equations listed.

**^** **a.** In an isentropic process, system entropy (*S*) is constant. Under these conditions, *p*1 *V*1*γ* = *p*2 *V*2*γ*, where *γ* is defined as the heat capacity ratio, which is constant for a calorifically perfect gas. The value used for *γ* is typically 1.4 for diatomic gases like nitrogen (N2) and oxygen (O2), (and air, which is 99% diatomic). Also *γ* is typically 1.6 for mono atomic gases like the noble gases helium (He), and argon (Ar). In internal combustion engines *γ* varies between 1.35 and 1.15, depending on constitution gases and temperature.

**^** **b.** In an isenthalpic process, system enthalpy (*H*) is constant. In the case of free expansion for an ideal gas, there are no molecular interactions, and the temperature remains constant. For real gasses, the molecules do interact via attraction or repulsion depending on temperature and pressure, and heating or cooling does occur. This is known as the Joule–Thomson effect. For reference, the Joule–Thomson coefficient μJT for air at room temperature and sea level is 0.22 °C/bar.

## Deviations from ideal behavior of real gases

The equation of state given here (*PV=nRT*) applies only to an ideal gas, or as an approximation to a real gas that behaves sufficiently like an ideal gas. There are in fact many different forms of the equation of state. Since the ideal gas law neglects both molecular size and inter molecular attractions, it is most accurate for monatomic gases at high temperatures and low pressures. The neglect of molecular size becomes less important for lower densities, i.e. for larger volumes at lower pressures, because the average distance between adjacent molecules becomes much larger than the molecular size. The relative importance of intermolecular attractions diminishes with increasing thermal kinetic energy, i.e., with increasing temperatures. More detailed *equations of state*, such as the van der Waals equation, account for deviations from ideality caused by molecular size and intermolecular forces.

A residual property is defined as the difference between a real gas property and an ideal gas property, both considered at the same pressure, temperature, and composition.

## Derivations

### Empirical

The empirical laws that led to the derivation of the ideal gas law were discovered with experiments that changed only 2 state variables of the gas and kept every other one constant.

All the possible gas laws that could have been discovered with this kind of setup are:

P
V

=

C
1

{\displaystyle {PV}=C\_1 }

 or

P
1

V
1

=

P
2

V
2

{\displaystyle P\_1V\_1=P\_2V\_2 }

 (1) known as Boyle's law

V
T

=

C
2

{\displaystyle \frac{V}{T} = C\_2 }

 or

V
1

T
1

=

V
2

T
2

{\displaystyle \frac{V\_1}{T\_1}=\frac{V\_2}{T\_2}}

 (2) known as Charles's law

V
N

=

C
3

{\displaystyle \frac{V}{N}=C\_3 }

 or

V
1

N
1

=

V
2

N
2

{\displaystyle \frac{V\_1}{N\_1}=\frac{V\_2}{N\_2} }

 (3) known as Avogadro's law

P
T

=

C
4

{\displaystyle \frac{P}{T}=C\_4 }

or

P
1

T
1

=

P
2

T
2

{\displaystyle \frac{P\_1}{T\_1}=\frac{P\_2}{T\_2} }

 (4) known as Gay-Lussac's law

N
# T

C
5

{\displaystyle NT=C\_5 }

or

N
1

T
1

=

N
2

T
2

{\displaystyle N\_1T\_1=N\_2T\_2 }

 (5)

P
N

=

C
6

{\displaystyle \frac{P}{N}=C\_6 }

 or

P
1

N
1

=

P
2

N
2

{\displaystyle \frac{P\_1}{N\_1}=\frac{P\_2}{N\_2} }

 (6)

where "P" stands for pressure, "V" for volume, "N" for number of particles in the gas and "T" for temperature; where

C
1

,

C
2

,

C
3

,

C
4

,

C
5

,

C
6

{\displaystyle C\_1, C\_2, C\_3, C\_4, C\_5, C\_6 }

 are not actual constants but are in this context because of each equation requiring only the parameters explicitly noted in it changing.

To derive the ideal gas law one does not need to know all 6 formulas, one can just know 3 and with those derive the rest or just one more to be able to get the ideal gas law, which needs 4.

Since each formula only holds when only the state variables involved in said formula change while the others remain constant, we cannot simply use algebra and directly combine them all. I.e. Boyle did his experiments while keeping *N* and *T* constant and this must be taken into account.

Keeping this in mind, to carry the derivation on correctly, one must imagine the gas being altered by one process at a time. The derivation using 4 formulas can look like this:

at first the gas has parameters

P
1

,

V
1

,

N
1

,

T
1

{\displaystyle P\_1,V\_1,N\_1,T\_1 }

Say, starting to change only pressure and volume, according to Boyle's law, then:

P
1

V
1

=

P
2

V
2

{\displaystyle P\_1V\_1=P\_2V\_2 }

 (7) After this process, the gas has parameters

P
2

,

V
2

,

N
1

,

T
1

{\displaystyle P\_2,V\_2,N\_1,T\_1 }

Using then Eq. (5) to change the number of particles in the gas and the temperature,

N
1

T
1

=

N
2

T
2

{\displaystyle N\_1T\_1=N\_2T\_2 }

 (8) After this process, the gas has parameters

P
2

,

V
2

,

N
2

,

T
2

{\displaystyle P\_2,V\_2,N\_2,T\_2 }

Using then Eq. (6) to change the pressure and the number of particles,

P
2

N
2

=

P
3

N
3

{\displaystyle \frac{P\_2}{N\_2}=\frac{P\_3}{N\_3} }

 (9) After this process, the gas has parameters

P
3

,

V
2

,

N
3

,

T
2

{\displaystyle P\_3,V\_2,N\_3,T\_2 }

Using then Charles's law to change the volume and temperature of the gas,

V
2

T
2

=

V
3

T
3

{\displaystyle \frac{V\_2}{T\_2}=\frac{V\_3}{T\_3} }

 (10) After this process, the gas has parameters

P
3

,

V
3

,

N
3

,

T
3

{\displaystyle P\_3,V\_3,N\_3,T\_3 }

Using simple algebra on equations (7), (8), (9) and (10) yields the result:

P
1

V
1

N
1

T
1

=

P
3

V
3

N
3

T
3

{\displaystyle \frac{P\_1V\_1}{N\_1T\_1}=\frac{P\_3V\_3}{N\_3T\_3} }

 or

P
V

N
T

=

K
B

{\displaystyle \frac{PV}{NT}=K\_B }

, where

K
B

{\displaystyle K\_B}

 stands for Boltzmann's constant.
Another equivalent result, using the fact that

n
# R
N

K
B

{\displaystyle nR=NK\_B }

, where "n" is the number of moles in the gas and "R" is the universal gas constant, is:

P
# V
n
R
T
,

{\displaystyle PV=nRT, }

 which is known as the ideal gas law.
If you know or have found with an experiment 3 of the 6 formulas, you can easily derive the rest using the same method explained above; but due to the properties of said equations, namely that they only have 2 variables in them, they can't be any 3 formulas. For example, if you were to have Eqs. (1), (2) and (4) you would not be able to get any more because combining any two of them will give you the third; But if you had Eqs. (1), (2) and (3) you would be able to get all 6 Equations without having to do the rest of the experiments because combining (1) and (2) will yield (4), then (1) and (3) will yield (6), then (4) and (6) will yield (5), as well as would the combination of (2) and (3) as is visually explained in the following visual relation:

where the numbers represent the gas laws numbered above.

If you were to use the same method used above on 2 of the 3 laws on the vertices of one triangle that has a "O" inside it, you would get the third.

P
1

V
1

=

P
2

V
2

{\displaystyle P\_1V\_1=P\_2V\_2 }

 (1´)

then only volume and temperature:

V
2

T
1

=

V
3

T
2

{\displaystyle \frac{V\_2}{T\_1}=\frac{V\_3}{T\_2} }

 (2´)

then as we can choose any value for

V
3

{\displaystyle V\_3 }

, if we set

V
1

=

V
3

{\displaystyle V\_1=V\_3 }

, Eq. (2´) becomes:

V
2

T
1

=

V
1

T
2

{\displaystyle \frac{V\_2}{T\_1}=\frac{V\_1}{T\_2} }

(3´)

combining equations (1´) and (3´) yields

P
1

T
1

=

P
2

T
2

{\displaystyle \frac{P\_1}{T\_1}=\frac{P\_2}{T\_2} }

 , which is Eq. (4), of which we had no prior knowledge until this derivation.

### Theoretical

#### Kinetic theory

Main articles: Kinetic theory of gases
The ideal gas law can also be derived from first principles using the kinetic theory of gases, in which several simplifying assumptions are made, chief among which are that the molecules, or atoms, of the gas are point masses, possessing mass but no significant volume, and undergo only elastic collisions with each other and the sides of the container in which both linear momentum and kinetic energy are conserved.

The fundamental assumptions of the kinetic theory of gases imply that

P
# V

1
3

N
m

v

rms

2

.

{\displaystyle PV=\frac{1}{3}Nmv\_{\text{rms}}^2.}

Using the Maxwell–Boltzmann distribution, the fraction of molecules that have a speed in the range

v

{\displaystyle v}

 to

v
d
v

{\displaystyle v+dv}

 is

f
(
v
)

d
v

{\displaystyle f(v) \, dv}

, where

f
(
v
# )
4
π

(

m

2
π
k
T

)

3
2

v
2

e

−

m

v
2

2
k
T

{\displaystyle f(v)=4\pi \left(\frac{m}{2\pi kT}\right)^{\frac{3}{2}}v^2 e^{-\frac{mv^2}{2kT}}}

and

k

{\displaystyle k}

 denotes the Boltzmann constant. The root-mean-square speed can be calculated by

v

rms

2

=

∫
0
∞

v
2

f
(
v
)

d
# v
4
π

(

m

2
π
k
T

)

3
2

∫
0
∞

v
4

e

−

m

v
2

2
k
T

d
v
.

{\displaystyle v\_{\text{rms}}^2=\int\_0^\infty v^2 f(v) \, dv=4\pi \left(\frac{m}{2\pi kT}\right)^{\frac{3}{2}}\int\_0^\infty v^4 e^{-\frac{mv^2}{2kT}} \, dv.}

Using the integration formula

∫
0
∞

x

2
n

e

−

x
2

a
2

d
# x

π

(
2
n
)
!

n
!

(

a
2

)

2
n
1

,

{\displaystyle \int\_0^\infty x^{2n}e^{-\frac{x^2}{a^2}} \, dx=\sqrt{\pi} \, \frac{(2n)!}{n!}\left(\frac{a}{2}\right)^{2n+1},}

it follows that

v

rms

2

=
4
π

(

m

2
π
k
T

)

3
2

π

4
!

2
!

(

2
k
T

m

2

)

5

=

3
k
T

m

,

{\displaystyle v\_{\text{rms}}^2=4\pi\left(\frac{m}{2\pi kT}\right)^{\frac{3}{2}}\sqrt{\pi} \, \frac{4!}{2!}\left(\frac{\sqrt{\frac{2kT}{m}}}{2}\right)^{5}=\frac{3kT}{m},}

from which we get the ideal gas law:

P
# V

1
3

N
m

(

3
k
T

m

)

=
N
k
T
.

{\displaystyle PV=\frac{1}{3}Nm\left(\frac{3kT}{m}\right)=NkT.}

#### Statistical mechanics

Main articles: Statistical mechanics
Let **q** = (*q*x, *q*y, *q*z) and **p** = (*p*x, *p*y, *p*z) denote the position vector and momentum vector of a particle of an ideal gas, respectively. Let **F** denote the net force on that particle. Then the time-averaged kinetic energy of the particle is:

⟨

q

⋅

F

⟩

=

⟨

q

x

d

p

x

d
t

⟩

⟨

q

y

d

p

y

d
t

⟩

⟨

q

z

d

p

z

d
t

⟩

=
−

⟨

q

x

∂
H

∂

q
x

⟩

−

⟨

q

y

∂
H

∂

q
y

⟩

−

⟨

q

z

∂
H

∂

q
z

⟩

=
−
3

k

B

T
,

{\displaystyle
\begin{align}
\langle \mathbf{q} \cdot \mathbf{F} \rangle &= \Bigl\langle q\_{x} \frac{dp\_{x}}{dt} \Bigr\rangle +
\Bigl\langle q\_{y} \frac{dp\_{y}}{dt} \Bigr\rangle +
\Bigl\langle q\_{z} \frac{dp\_{z}}{dt} \Bigr\rangle\\
&=-\Bigl\langle q\_{x} \frac{\partial H}{\partial q\_x} \Bigr\rangle -
\Bigl\langle q\_{y} \frac{\partial H}{\partial q\_y} \Bigr\rangle -
\Bigl\langle q\_{z} \frac{\partial H}{\partial q\_z} \Bigr\rangle = -3k\_{B} T,
\end{align}
}

where the first equality is Newton's second law, and the second line uses Hamilton's equations and the equipartition theorem. Summing over a system of *N* particles yields

3
N

k

B

# T
−

⟨

∑

# k
1

N

q

k

⋅

F

k

⟩

.

{\displaystyle
3Nk\_{B} T = - \biggl\langle \sum\_{k=1}^{N} \mathbf{q}\_{k} \cdot \mathbf{F}\_{k} \biggr\rangle.
}

By Newton's third law and the ideal gas assumption, the net force of the system is the force applied by the walls of the container, and this force is given by the pressure *P* of the gas. Hence

−

⟨

∑

# k
1

N

q

k

⋅

F

k

⟩

=
P

∮

s
u
r
f
a
c
e

q

⋅
d

S

,

{\displaystyle
-\biggl\langle\sum\_{k=1}^{N} \mathbf{q}\_{k} \cdot \mathbf{F}\_{k}\biggr\rangle = P \oint\_{\mathrm{surface}} \mathbf{q} \cdot d\mathbf{S},
}

where d**S** is the infinitesimal area element along the walls of the container. Since the divergence of the position vector **q** is

∇
⋅

q

=

∂

q

x

∂

q

x

∂

q

y

∂

q

y

∂

q

z

∂

q

z

=
3
,

{\displaystyle
\nabla \cdot \mathbf{q} =
\frac{\partial q\_{x}}{\partial q\_{x}} +
\frac{\partial q\_{y}}{\partial q\_{y}} +
\frac{\partial q\_{z}}{\partial q\_{z}} = 3,
}

the divergence theorem implies that

P

∮

s
u
r
f
a
c
e

q

⋅
d

S

=
P

∫

v
o
l
u
m
e

(

∇
⋅

q

)

d
# V
3
P
V
,

{\displaystyle P \oint\_{\mathrm{surface}} \mathbf{q} \cdot d\mathbf{S} = P \int\_{\mathrm{volume}} \left( \nabla \cdot \mathbf{q} \right) dV = 3PV,
}

where *dV* is an infinitesimal volume within the container and *V* is the total volume of the container.

Putting these equalities together yields

3
N

k

B

# T
−

⟨

∑

# k
1

N

q

k

⋅

F

k

⟩

=
3
P
V
,

{\displaystyle
3Nk\_{B} T = -\biggl\langle \sum\_{k=1}^{N} \mathbf{q}\_{k} \cdot \mathbf{F}\_{k} \biggr\rangle = 3PV,
}

which immediately implies the ideal gas law for *N* particles:

P
# V
N

k

B

# T
n
R
T
,

{\displaystyle
PV = Nk\_{B} T = nRT,\,
}

where *n* = *N*/*N*A is the number of moles of gas and *R* = *N*A*k*B is the gas constant.

## Other dimensions

For a *d*-dimensional system, the ideal gas pressure is:

P

(
d
)

=

N

k
B

T

L
d

,

{\displaystyle P^{(d)}=\frac{N k\_B T}{L^d}, }

where

L
d

{\displaystyle L^d}

 is the volume of the *d*-dimensional domain in which the gas exists. Note that the dimensions of the pressure changes with dimensionality.

## See also

* Van der Waals equation
* Boltzmann constant
* Configuration integral
* Dynamic pressure
* Internal energy