4
4
distribution is a probability distribution that describes the distribution of
5
5
speeds of particles in an ideal gas.
6
6
7
- The distribution is given by the following equation:
7
+ The distribution is given by the following equation::
8
8
9
9
-------------------------------------------------
10
10
| f(v) = (M/2πRT)^(3/2) * 4πv^2 * e^(-Mv^2/2RT) |
11
11
-------------------------------------------------
12
12
13
13
where:
14
- f(v) is the fraction of molecules with a speed v
15
- M is the molar mass of the gas in kg/mol
16
- R is the gas constant
17
- T is the absolute temperature
14
+ * `` f(v)`` is the fraction of molecules with a speed ``v``
15
+ * ``M`` is the molar mass of the gas in kg/mol
16
+ * ``R`` is the gas constant
17
+ * ``T`` is the absolute temperature
18
18
19
19
More information about the Maxwell-Boltzmann distribution can be found here:
20
20
https://en.wikipedia.org/wiki/Maxwell%E2%80%93Boltzmann_distribution
21
21
22
22
The average speed can be calculated by integrating the Maxwell-Boltzmann distribution
23
- from 0 to infinity and dividing by the total number of molecules. The result is:
23
+ from 0 to infinity and dividing by the total number of molecules. The result is::
24
24
25
- ---------------------
26
- | vavg = √(8RT/πM) |
27
- ---------------------
25
+ ----------------------
26
+ | v_avg = √(8RT/πM) |
27
+ ----------------------
28
28
29
29
The most probable speed is the speed at which the Maxwell-Boltzmann distribution
30
30
is at its maximum. This can be found by differentiating the Maxwell-Boltzmann
31
- distribution with respect to v and setting the result equal to zero. The result is:
31
+ distribution with respect to ``v`` and setting the result equal to zero. The result is: :
32
32
33
- ---------------------
34
- | vmp = √(2RT/M) |
35
- ---------------------
33
+ ----------------------
34
+ | v_mp = √(2RT/M) |
35
+ ----------------------
36
36
37
37
The root-mean-square speed is another measure of the average speed
38
38
of the molecules in a gas. It is calculated by taking the square root
39
- of the average of the squares of the speeds of the molecules. The result is:
39
+ of the average of the squares of the speeds of the molecules. The result is::
40
40
41
- ---------------------
42
- | vrms = √(3RT/M) |
43
- ---------------------
41
+ ----------------------
42
+ | v_rms = √(3RT/M) |
43
+ ----------------------
44
44
45
45
Here we have defined functions to calculate the average and
46
46
most probable speeds of molecules in a gas given the
@@ -57,6 +57,7 @@ def avg_speed_of_molecule(temperature: float, molar_mass: float) -> float:
57
57
and returns the average speed of a molecule in the gas (in m/s).
58
58
59
59
Examples:
60
+
60
61
>>> avg_speed_of_molecule(273, 0.028) # nitrogen at 273 K
61
62
454.3488755020387
62
63
>>> avg_speed_of_molecule(300, 0.032) # oxygen at 300 K
@@ -84,6 +85,7 @@ def mps_speed_of_molecule(temperature: float, molar_mass: float) -> float:
84
85
and returns the most probable speed of a molecule in the gas (in m/s).
85
86
86
87
Examples:
88
+
87
89
>>> mps_speed_of_molecule(273, 0.028) # nitrogen at 273 K
88
90
402.65620701908966
89
91
>>> mps_speed_of_molecule(300, 0.032) # oxygen at 300 K
0 commit comments