06 May 2022

Early Universe as an example of a "simple system"

Knowing when the first stars were formed, soon after the Big Bang, and understanding how they produced the building blocks of the first galaxies is an important scientific question and one of the primary science goals of JWST. We know that the elements that are needed for life and modern technology, such as carbon, silicon and gold, were ultimately created in early starsbut we don't currently have a good understanding of how this happened.  From the article "James Webb telescope: How it could uncover some of the universe's best-kept secrets," by Martin Barstow.

Before moving on to the different kinds of postulates that can be used to quantify and justify quantum mechanics, I'll take a brief detour to an unexpected and rather spectacular example of a simple thermodynamic system: the universe in its early stages of existence, just before it cooled enough (to about 3000 K) for atoms to be formed. This was 380,000 years after the Big Bang, when the signature of the cosmic microwave background radiation (CMB) we observe today was left behind.

As I mentioned previously, our main man Harry Robertson defines a simple system as a “bounded region of space that is macroscopically homogeneous,” and says of the possible boundaries for such a system that they can be material boundaries or “described by a set of mathematical surfaces in space.” 

Mark Whittle, an astronomy professor at the University of Virginia, in Lecture 16 of “Cosmology: The History and Nature of Our Universe,” gives the conditions that make the early universe simple:

1. The young universe is almost perfectly homogeneous (“it’s a smooth gas”).

2. It contains (relatively) simple components: light, electrons, nuclei, and dark matter. “And furthermore, the light, electrons, and nuclei are all tied tightly together into a single coherent photon-baryon gas.” So the early universe was a photon-baryon gas plus dark matter.

3. The gas of nuclei, electrons and light is in thermal equilibrium.

4. The deviation from exact homogeneity—the lumpiness—is very slight, so it’s considered to be in the “linear regime,” and the physics of how the lumpiness grows in time is simple (linear, not nonlinear).

The only other condition we need in order for the early universe to fit the criteria for a simple system is a boundary—and this is more of a problem.  In Lecture 15, “Primordial Sound—Big Bang Acoustics,” Mark Whittle says, “Although the universe has no spatial boundary, it is bounded in time. At a given time, e.g., the [time of formation of the] CMB, regions of a specific size are caught at maximum or minimum compression or rarefaction, and these specific region sizes create the strongest patches on the CMB, giving the harmonics … .”

The slight deviations in the density of the almost-homogeneous gas of electromagnetic radiation, simple nuclei (protons+neutrons), and electrons result in acoustic waves in the gas that bounce in and out of the denser regions. These waves each have a fundamental frequency (about 50 times lower than the low end of human hearing range) and harmonics. And what good are harmonics? Different harmonics make different musical instruments playing the same note (the fundamental) sound different. The size and shape of an object and the components that make up the object can be roughly determined by what harmonics it produces.

Studying the harmonics may not be able to give a unique or exact size, shape, and material composition of a vibrating object, but given a limited set of possible components in the material and other information, the harmonics give the best possible educated guess. 

In his intro to Lecture 16, Whittle says, “Different objects make different sounds, and this is also true for the Universe: If the Universe had different properties, its primordial sound would be different. Cosmologists have been extremely successful at measuring many properties of the Universe by comparing computer calculations of the primordial sound with the sound of the real Universe. The match is in fact so good that it essentially proves that the Hot Big Bang Theory is valid and robust.”

Don’t forget that the CMB radiation is black-body radiation. It’s in the microwave region of the electromagnetic spectrum today because it’s been redshifted by cosmic expansion from its original black-body spectrum centered in the infrared region.  The infrared photons were what mainly gave the photon-baryon gas its pressure and temperature, and the small fluctuations in the density of this gas—the rarefactions and compressions—are what it is measurable today as former sound waves frozen in time on the microwave background. These fluctuations tell us when and how the first stars and galaxies formed and what the universe is made of. We now know the presence of dark matter is necessary for stars and galaxies to form, but we still don’t know what dark matter is.

By the way, Astronomy magazine's cover story this month is called "Assembling the Universe."  So there's an example of how it's better to call even a "simple system" an assembly rather than a system. See my previous post for more on this subject, under the sub-heading "An aside related to vocabulary."

For a short summary of the big bang and its consequences, see this "early universe" website.

For a short summary of what homogeneous means, see this Organic Valley blog post on homogenized milk. A carton of homogenized milk sitting in a refrigerator at 277 K is another example of a simple thermodynamic system in equilibrium. 


12 March 2022

Thermo Postulates of Callen and Robertson, etc.

 (see my previous post for a general comparison of the C and R textbooks)

Callen:

I.    There exist particular states (called equilibrium states) of simple systems that, macroscopically, are characterized completely by the internal energy U, the volume V, and the mole numbers N1, N2, …, Nr of the chemical components.

II.   There exists a function (called the entropy S) of the extensive parameters of any composite system, defined for all equilibrium states and having the following property: The values assumed by the extensive parameters in the absence of an internal constraint are those that maximize the entropy over the manifold of constrained equilibrium states.

III.  The entropy of a composite system is additive over the constituent subsystems. The entropy is continuous and differentiable and is a monotonically increasing function of the energy. [Callen then adds: Several mathematical consequences follow immediately.]

IV.  The entropy of any system vanishes in the state for which (∂U/∂S) = 0, with volume and all chemical potentials held constant. That is, the entropy goes to zero at the zero of absolute temperature.

 

Robertson:

1.  The macroscopic thermodynamic equilibrium states of simple systems are completely specified in terms of the extensive parameters (U, V, Ni in the present context), where the Ni are the component populations, with all the information contained in the entropy function S(U,V,Ni), called the fundamental relation.

2.  The entropy of a simple system is a continuous, differentiable, homogeneous-first-order function of the extensive parameters, monotone increasing in U.

3.  The entropy of a composite system S({Ui, Vi, {Ni}}) is the sum of the entropies of the constituent subsystems:

S({Ui, Vi, {Ni}}) = S1({U1, V1, N1i }) S1({U2, V2, N2i }) + … .

4.  The equilibrium state of a composite system when a constraint is removed maximizes the total entropy over the set of all possible constrained equilibrium states compatible with the constraint and the permitted range of extensive parameters.

5.  The entropy of a simple system approaches zero when

(∂U/∂S)V, {N} → 0


 --------

Like Callen, Robertson uses the idea of equilibrium states of simple macroscopic systems as a starting point, with equilibrium sort of implicitly taken to be any state that can be characterized completely by a constant internal (average) energy, constant volume, and constant “component populations” (Robertson) or “mole numbers of the chemical components” (Callen).

Notice that C and R both use a completeness specification. The word “completeness” resonates a little bit here with the “complete set of commuting observables” in quantum mechanics. We could say an equilibrium state in thermodynamics is characterized by—or exists because of— the existence of stationary values of a complete set of extensive parameters,  which are U, V and {Ni} in the entropy representation.

Also notice that a fundamental relation such as the monotonically increasing entropy function S(U,V,Ni) in thermodynamics is described similarly to the wave function in quantum mechanics, in that both are said to contain all the information about the system.

An aside related to vocabulary

The word “system” should be used with some humility and caution, rather like the word “universe”. An ideal isolated system in thermodynamics is a universe unto itself (if you don’t tamper with it), while, conversely, the universe is a system unto itself.  What are they really? Models. Mainly, “system” is a very broadly used word in science and engineering and it can close off creative thinking rather than promoting it. Some people—Darwin and Fowler in their 1922 and 1923 papers, and Schrödinger in his little Statistical Thermodynamics book—have chosen to use the word “assembly” instead of “system” when discussing Boltzmann’s ideal gas and Planck’s ideal electromagnetic resonators. These authors also use the word “system,” but they refer to the individual molecules or Planck resonators/vibrators/oscillators as the systems that make up the assembly under consideration.  Thus, in their view, an assembly is macroscopic and must be assembled, and its “component population” is made of N identical (sub)microscopic systems that each possess mechanical and maybe electromagnetic energy (KE, PE). The assembly itself then has some overall thermal energy distribution. A more complicated assembly would be made up of a set {Ni} of different types of systems.

Now back to (thermodynamic) systems analysis

But I will continue talking about thermodynamic “systems” and their constituents since this is the usual terminology.

Before he provides the above postulates (Chapter 2, p. 66), Robertson describes a simple system (his bold emphasis) as “a bounded region of space that is macroscopically homogeneous.” He goes on to say: “That we regard a system as simple may imply nothing more than that we have not examined it on a fine enough scale. The failure to do so may be one of choice, or lack of it. We may usually choose to regard an obviously complex system as simple if its internal behavior is not involved in the problem at hand … the simple systems that are treated in terms of statistical thermophysics are made up of atoms or molecules, the spatial distribution of which is described by probability densities that are constant (or periodic on the scale of a crystal lattice) over the volume of the system.” Robertson then discusses the nature of possible boundaries of simple systems, such as their being either material or “described by a set of mathematical surfaces in space,” or diathermal (allowing thermal contact) or adiabatic (preventing thermal contact), or restrictive to matter flow in various degrees (semipermeable, open, closed), and whether they allow transfer of energy via a work process (such as a movable piston).

I’ve discussed Robertson’s and Callen’s statements of the postulates of thermodynamics in this post in order to prepare for my next post, where I’ll compare these postulates with those of quantum mechanics and also, mainly, try to figure out why we don’t normally see the square of the wavefunction or the squares of the complex quantum mechanical superposition coefficients used as probabilities in the Shannon expression for entropy. Meanwhile, here’s a blog post on that subject: Wavefunction entropy. [The comparison of thermo and quantum postulates wasn't my next post. As of December 16, 2023, I still haven't managed to get to it. Later!]

 

Postscript, March 22: Callen's postulate II and Robertson's corresponding postulate (No. 4) are too abstract to be understood, at least for me, without an example.  Callen gives a general sort of example, and also gives a problem at the end of the section (1.10) to further illustrate the example.

But first let's consider the problem that these particular postulates of C and R are supposed to solve. It's el problema grande of thermodynamics, which as Callen states it (and I've previously quoted) is: The single, all-encompassing problem of thermodynamics is the determination of the equilibrium state that eventually results after the removal of internal constraints in a closed, composite system.

Example: (page 26) "Given two or more simple systems, they may be considered as constituting a single composite system. The composite system is termed closed if it is surrounded by a wall that is restrictive with respect to the total energy, the total volume, and the total mole numbers of each component of the composite system." ... (page 28) "In the case of two systems separated by a diathermal wall we might wish to predict the manner in which the total energy U distributes between the two systems. We then consider the composite system with the internal diathermal wall replaced by an adiabatic wall and with particular values of U(1) and U(2), with U(1) + U(2) = U. For each such constrained equilibrium state there is an entropy of the composite system, and for some particular values of U(1) and U(2) this entropy is a maximum. These, then, are the values of U(1) and U(2) that obtain in the presence of the diathermal wall, or in the absence of the adiabatic constraint."

Problem 1.10-3: "The fundamental equation of system A is

S = (R2/v0 θ)1/3(NVU)1/3

and similarly for System B. The two systems are separated by a rigid, impermeable, adiabatic wall. System A has a volume of 9x10-6 m3 and a mole number of 3 moles. System B has a volume of 4x10-6 m3 and a mole number of 2 moles. The total energy of the composite system is 80 J. Calculate and Plot the entropy as a function of UA/(UA + UB) . If the internal wall is now made diathermal and the system is allowed to come to equilibrium, what are the internal energies of the individual systems? (R2v, and θ are constants.)"

Post-postscript, March 25: (The red text above is what I left out or wrote wrongly in my initial post. The red text below is what I re-wrote on March 29.) Non-numerical solution to our Problem 1.10-3: The given constraint U = UA + UB applies to the composite system with either the adiabatic wall or the diathermal wall. The composite system entropy sum S = SA + SB applies when the adiabatic wall is in place and subsystems A and B are energetically distinct, AND when the diathermal wall is in place with the particular values of UA and UB found from maximizing S = SA + SB.  These are the thermal equilibrium values with the diathermal wall in place.

We have a continuum of different values for SA and SB that satisfy the sum S = SA + Swith the adiabatic wall in place, and these are Callen’s and Robertson’s “constrained equilibrium states” over which we want to maximize S. Using the energy constraint to write total entropy in terms of system A’s energy, and using constants kA and kB as stand-ins for all the alphabetic and numerical constants given in the problem,

S  =  SA + SB   =  kA UA 1/3 + kB UB 1/3

kA UA 1/3 + kB (U – UA)1/3

dS/dUA =  (kA /3) UA -2/3 –  (kB /3)(U – UA)-2/3  = 0,

(not checked yet for min instead of max) resulting in

UA = U/[1 +  (kB / kA)3/2]

and

UB = U/[1 +  (kA / kB )3/2].

The ratios are easy to calculate, with alphabetic constants and numerical exponents canceling:  kA / kB  = 27/8Plotting the normalized relation "entropy as a function of UA/(UA + UB)" is left to the intrepid reader for the moment.

08 October 2021

Robertson’s "uncertainty" vs Callen’s "disorder"

Harry Robertson may take Herb Callen’s place as our main man of statistical mechanics. Robertson is the author of Statistical Thermophysics (1993). I don’t see this textbook cited very often, but I remember when I ran across it on the “New Books” shelf in the Physics-Math-Astronomy library at UT-Austin. I liked it enough to make some photocopies from it right away, but I never bought a copy of the book myself until a few weeks ago. Based on what I’ve studied in it so far, I think it’s the best graduate-level statistical mechanics text I've seen.  And maybe it’s also one of the most overlooked, although Mark Loewe mentions it in his 1995 notes I included in my previous post (see last page of notes, last footnote, about the “surprise” function--more about that later). One reason instructors might not use Robertson's book as a text is that complete solutions to the problems are given in the book. Instructors would have to assign different problems if they wanted to grade students on problem solving.


Callen uses the idea of the disorder in a probability distribution {pi} – he labels it {fi} but I’m using Robertson’s notation—whereas Robertson uses the idea of the uncertainty in information content of such a distribution.  They both write the entropy (a lá Claude Shannon) as


S = –k∑ pi ln pi .


For the special case (the subject of this post) of having N possible outcomes, the maximum entropy occurs when each outcome has a probability 1/N. For Callen, this is the maximum disorder for the N outcomes. My problem with Callen’s “disorder” interpretation of entropy is that I don’t see why this equiprobability of outcomes should be called the maximum disorder.  Callen’s discussion of this, at the beginning of Chapter 17, doesn’t agree with my intuition of what disorder is. Equiprobability seems very ordered!

Robertson’s discussion of how the {pi} should be interpreted in the N outcomes case is worth quoting from the beginning of his section on Information Theory, on page 3:

 

It has long been realized that the assignment of probabilities to a set of events represents information, in a loose sense, and that some probability sets represent more information than do others. For example, if we know that one of the probabilities, say p2, is unity, and therefore all the others are zero, then we know that the outcome of the experiment to determine yi will give y2. Thus we have complete information. On the other hand, if we have no basis whatever for believing that any event yi is more or less likely than any other, then we obviously have the least possible information about the outcome of the experiment.

 

Having “no basis whatever for believing” that any one event is more, or less, probable than any other means assigning all the events the same probability, and this equiprobability of events is something I can understand intuitively as giving the least amount of information. And this is the “information-theoretic maximized uncertainty” that Robertson uses in place of Callen’s maximum disorder.

Robertson subscribes to what is often called the subjective assignment of probabilities, while Callen sticks with the frequency-of-occurrence assignment of probabilities. Both men use Claude Shannon’s 1948 information theory formulation to define entropy (see above equation), but their interpretations of what the {pi} represent are very different.

Callen wants to use only frequencies of occurrence as a measure of probabilities, as in, for example (my example), the objectively calculable and measurable frequencies of various sums-of-dots appearing on the upward faces of many dice tossed simultaneously many times. Robertson, on the other hand, is a follower of Edwin Jaynes’ 1957 re-interpretation of Shannon’s information theory as a subjective-probabilities theory.  Lots of controversy is involved in that interpretation. (The dice-throwing example probabilities are not uncertain enough to even need a subjective-probabilities approach.)

In spite of not agreeing with the subjective interpretation, Callen gives a great discussion (p. 380) of the subjectiveness in the general meaning of the word “disorder” before he introduces Shannon’s solution to the problem of the meaning of disorder. As one example of subjective disorder, Callen says a pile of bricks appears to be very disordered, but it may be “the prized creation of a modern artist,” and thus may not be any more disordered than a brick wall once the artist’s intention is understood.

But Callen then says this sort of apparent subjectiveness in the idea of disorder is removed by Shannon’s definition of the type of disorder used in information theory.  “The problem solved by Shannon,” Callen claims, “is the definition of a quantitative measure of the disorder associated with a given distribution {pi}.” By “quantitative measure” he means the entropy expression above, and there’s no controversy over that. The controversy is about how the set {pi} can legitimately be determined.

That’s as far as I’ll go on the subject at the moment. I only wanted to say how much better the idea of minimal information (and thus maximal uncertainty in information) is than the idea of maximal disorder when the case of equiprobability of outcomes is being described.


P.S. (15 October 2021)  Maybe it occurred to you that there are two different ideas of "maximum" being discussed here? After a week of pondering these and related concepts--like uncertainty and probability in quantum theory compared with uncertainty and probability as discussed above in relation to the expression for entropy--it's finally occurred to me that we have a particular case of known equiprobable outcomes as a case of maximum entropy, and we also have the general case that involves the entropy function with unknown or arbitrary p's and we want to find it's maximum and in the process find the pi themselves for this case, which would usually be a thermodynamic equilibrium case.  

Robertson distinguishes the particular case from the general cases at the end of his Information Theory section, prior to his introducing the idea of Maximum Uncertainty in the next section: "For a given number of possible events n, it is easily shown that S is a maxima when the events are all equally probable ... . The next problem to be examined is that of assigning the pi's on the basis of our knowledge. This problem leads to the conceptual foundation of the approach to statistical mechanics used in the present development." The "present development" means Robertson's textbook.

The particular case is the subject of the first Problem at the end of Robertson's first chapter. In this problem, he gives the constraint of the probabilities summing to unity as the only constraint to use in maximizing the entropy expression, meaning one Lagrange unknown multiplier rather than the usual two--try it! You only need the above entropy expression and the constraint

∑ pi = 1,

where the sum goes from 1 to n. (Or 1 to N, or however you want to label the number of possible outcomes.)

Callen's and Robertson's textbooks are actually very complementary in the different subjects, and levels of subjects, and interpretation of the subject itself, that they cover. Callen's book is an undergrad text, the best one in my opinion, and it covers more thermodynamics than Robertson's book, which is intended to be a graduate-level text (the best one in my opinion) with statistical mechanics as its primary subject rather than macroscopic thermodynamics. The difference in their interpretations has been the subject of this little essay, thank you.

08 August 2021

Fundamental relations and equations of state

A fundamental relation contains all the information about a system--all the thermodynamic information about a thermodynamic system--and involves independent extensive variables. For instance, entropy S expressed as a function of internal energy U, system volume V, and conserved particle number N (same type of particles)  is a fundamental relation, expressed symbolically as S(U,V,N).  Or, equivalently, the internal energy U can be expressed as a function of entropy, volume, and particle number, U(S,V,N), and this is also a fundamental relation.

In contrast, the more commonly used equations of state are not fundamental relations, and involve functions of state that are not independent of each other, such as temperature T,  pressure P, and chemical potential μ, that are partial derivatives of fundamental relations. A complete set of equations of state, however, is informationally equivalent to a fundamental relation. The three equations of state 

T(S,V,N) = ∂U/∂S,

 -P(S,V,N) = ∂U/∂V,

and μ(S,V,N) = ∂U/∂N,

for example, contain all the information of the energetic fundamental relation, U(S,V,N). For an interesting case where N isn't involved (because it's not conserved) see my July 22 post on the Stefan-Boltzmann law as one of the equations of state for black-body radiation.

(This discussion should make you think of similar descriptions used in quantum theory, such as "the wave function contains all the information about the system," the need for "a complete set of commuting observables," and the choice of  energy or entropy fundamental relations being somewhat like the choice of  Schrödinger or Heisenberg 'pictures'.)

The connections between fundamental relations and equations of state are discussed in Callen's book in the first three sections of Chapter 3, "Some Formal Relationships and Sample Systems." In case you don't have access to that, I'm posting (below) some meticulous notes on this subject put together for a Statistical Physics class by Professor Mark Loewe in the mid-1990s, when he was teaching at Southwest Texas State University in San Marcos (now Texas State University-San Marcos). He used Callen's book, but he also handed out notes such as these that he wrote himself.  He is concise and thorough, as you can see. (Well, yeh, sorry the notes are hard to see. Slide 'em over to your desktop, maybe.) There's more info in the notes than you would likely ever want or need, but the accompanying descriptions are worth reading. One little thing Mark wasn't thorough about: in the corrections and clarifications, he doesn't say which problem Callen gives an incorrect answer to. Maybe I have it in my class notes, and will post it if I find it. 

Just how fundamental relations and equations of state are related to the first law of thermodynamics in its most basic form,

,

is something worth thinking about and looking up. Does the first law contain all the thermodynamic (macroscopic) information about a system? Oh yeah, and we have to talk about isolated systems versus systems attached to a heat reservoir. The 1st law equation above is for the change in internal energy for Q (energy as heat) supplied to the system, and W the work done by the system on its surroundings. It's a good starting point for imagining either an isolated system that has energy added to it (temporarily connected to, then disconnected from, some kind of reservoir) or a system connected to a heat reservoir and not yet in thermal equilibrium with the reservoir.

Just to keep things in perspective before going on to specific examples in later posts, I'll quote Callen from the top of page 26, "The single, all-encompassing problem of thermodynamics is the determination of the equilibrium state that eventually results after the removal of internal constraints in a closed, composite system." 


Mark Loewe's notes:











01 August 2021

Herb Callen problems 3.6-1, 3.6-2, and 3.6-3

(Revised 5 Aug 2021.  See my previous post for notes and comments on Callen's Section 3.6.)

3.6-1   The universe is considered by cosmologists to be an expanding electromagnetic cavity containing radiation that now is at a temperature of 2.7 K. What will be the temperature of the radiation when the volume of the universe is twice its current value?  Assume the expansion to be isentropic (this being a nonobvious prediction of cosmological model calculations).

So the entropy will be the same when the volume V1 becomes V2  and when  T1 becomes T2 :

S(U, V)   =  constant =  (4/3) (bV2)1/4 (U2 )3/4   =   (4/3) (bV)1/4 (U1 )3/4 , 

where  U2 = bV2 (T4   and  U1 = b V1 (T1 4 .  

Canceling the 4/3 and b factors on each side of the above entropy equation and putting in temperature T in place of the energy U gives (exponent on V's  becomes 1/4 + 3/4 = 1, and exponent of T's becomes 4 x 3/4 = 3)

V2 (T)3  =   V1 (T1 )3  

(T/T1 ) 3  =  V1/V2  =

(T/T1 ) 3 1/2    

T2  =  (1/2)1/3 T1    =     0.79 (2.7 K)  =   2.1 K .

Question for further research: in how many years will this doubling in size occur? The accepted answer to this question is not the same now as it was in 1985 when Callen’s book was published, due to the discovery in 1998 of the acceleration of the expansion (dark energy). 

 

3.6-2 Assuming the electromagnetic radiation filling the universe to be in equilibrium at  T = 2.7 K,  what is the pressure associated with this radiation?  Express the answer in both pascals and atmospheres.

From Stefan-Boltz law, we have U/V = bT4 , and the pressure equation for isotropic radiation is PR = U/3V.  So PR = (b/3)T4

(7.56x10-16 Joule · meter-3 · Kelvin-4))(2.7 K)4/3 

= 134 x 10-16  Newton/meter2

PR =  1.34 x 10-14 Pa

PR =  1.32 x 10-19 atm.

 

3.6-3  The density of matter (primarily hydrogen atoms) in intergalactic space is such that its contribution to the pressure is of the order of 10-23 Pa. 

(a) What is the approximate density of matter (in atoms/meter3) in intergalactic space?

(b) What is the ratio of the kinetic energy of matter to the energy of radiation in intergalactic space? (Recall Problems 3.6-1 and 3.6-2.)  

(c)  What is the ratio of the total matter energy (i.e., the sum of the kinetic energy and the relativistic energy mc2) to the energy of radiation in intergalactic space?

 

(a)  We want to calculate N/V from PM, and, assuming (maybe incorrectly) the hydrogen gas in intergalactic space is in equilibrium with the CMB radiation, we use the ideal gas law, PMV = NkT, where T = 2.7 K.  Rearranging gives

 N/V  =  PM/kT  =  10-23 Pa/[(1.38 x 10-23 J/K) · 2.7K]

=  (1/3.7) atoms/meter

0.27 atoms/meter

The answer is actually about one per cubic centimeter, or one million per cubic meter, alas. That means the temp of the very diffuse hydrogen gas is about 4 million degrees Kelvin.  Here's the first paragraph from a good discussion of the subject:

There are some missing details that are often skipped over in popular science articles/documentaries, which can make this confusing. First: the temperature of space, 2.7 K or -270 C, refers to the remaining radiation from the Big Bang, not to the temperature of any matter. If you were in space and somehow prevented any matter from touching you, you would still absorb microwave radiation equivalent to being surrounded by matter with a temperature of 2.7 K (since all matter with temperatures above 0K emits radiation). Of course, with all the stars and such, you also receive a lot of other radiation, so you wouldn't necessarily cool down to 2.7 K. That temperature refers specifically, and only, to the background microwave radiation left over from the early history of the universe.

--------

   (b)  For our intergalactic atomic hydrogen gas, the only energy is kinetic energy (well, ignoring the spin flipping the electron can undergo relative to the spin of the proton, resulting in the famous 21 cm spectral line).  (Also ignoring, until part (c), the relativistic mass-energy.)  So we have (KE)H = (3/2) NkT = (3/2)PMV for the kinetic energy of matter, which we want to divide by the Urad =  bVT4  = 3PRof radiation:

 

(KE)H / Urad  =  (3/2) PMV / 3PRV

PM / 2PR

10-23 Pa / 2(1.34 x 10-14 Pa)

=   3.7 x 10-10 

 

(c) The relativistic energy is Urel = Mc2, where M is the mass of all the hydrogen atoms in intergalactic space. We could do this calculation by estimating the size of the universe which we’d multiply by the density of hydrogen atoms. But volume cancels out in a ratio of energy density calculations, and energy density is the determining factor for the total energy of radiation, of hydrogen atoms’ KE, and of relativistic energy. And we've calculated number density of H atoms, so we should use it. We divide by total volume, V, of the universe to get density:

Urel/V = (Mc2 /V) =  m(N/V)c2

= (1.67 x 10-27 kg for one H atom) (0.27 H atoms per meter3)(3 x 108 m/s)2

=  9 x 1016 · 0.45 x 10-27 joule/meter3

=  4 x 10-11 joule/meter3


Now I need to divide this by Urad/V for radiation, and add the result to the answer to (b). I didn’t do the Urad/V calculation separately for radiation energy density in part (b)—but we know U/3V = P for the radiation pressure, so we take 3P as our radiation energy density

Urad/V = 3P = 3 x 1.34 x 10-14 Pa = 4 x 10-14 joule/meter3

so

Urel/Urad  =  1000.

The KE/Urad  ratio of 3.7 x 10-10 is negligible in comparison with the factor-of-1000 ratio of relativistic-to-radiation energy. No point in adding them! But we’d expect the relativistic energy to be much greater than the total KE of atoms in a gas at temperature 2.7 K.

Questions for further research:

At what temperature does the KE of the H atoms equal their mass-energy?

At what temp does the radiation energy equal the H atoms mass-energy?

Does the mass-energy of all the loose H atoms in the universe have any significance beyond the fact that it has to be included when we account for all the energy released (created) in the Big Bang?