English physicist James Joule's 1844 volume expansion experiment: wherein a pressurized volume A is connected to a vacuumed volume B, the connecting valve is opened, and temperature change is recorded (no change was found); which gave experimental proof to Joule's second law, that the internal energy of an ideal gas body is independent of volume or volume change, depending only on temperature. [4]
In thermodynamics, Joule's second law (TR:17), as contrasted with Joule's first law (1841), states that the internal energy U of a given mass of an ideal gas is independent of its volume and pressure, depending only on its temperature T, as defined by: [1]

$U = f(T) \,$

The law is named after English physicist James Joule who determined this relation via experiment in 1843. [5] To note, in the case of a non-ideal gas, intermolecular forces would cause changes in internal energy should a volume change occur. [2]

Proof
The experimental proof for the law that the energy of a body of gas is a function of temperature only, and does not depend on volume was conducted by
English physicist James Joule in 1844 who conducted an experiment in which he placed a single bi-chamber system (A and B), as depicted adjacent, with chamber A filled with gas, chamber B evacuated, the two chambers connected by a closed stopcock into a calorimeter. [4]

After placing the bipartite system into the water bath, he then let the system (A + B) reach thermal equilibrium, as indicated by a thermometer placed within the calorimeter; meaning that he waited until the temperature reached a constant value.

In this initial state, to clarify terminology, what seems to be the case is that Joule is defining the "system", or working substance, working body, or working fluid, or thermodynamic system, in modern parlance, as the boundaried region contained within containers A and B, such that A and B constitute one system, such that in this initial state, whatever happens to the system, e.g. if the experimenter twists the stopcock, the process will abide by the first law of thermodynamics:

$Q = \Delta U + W \,$

meaning that if any heat release (or absorption) is measured by the calorimeter, it will be a function of the change in internal energy ΔU and or work W done by or on the system. The work W, to clarify, is PV work, done on or by the surroundings. Since, however, the boundary of A + B is fixed, irregardless of the internal happenings, the PV work, will always be zero:

$W = 0 \,$
 A modern rendition of Joule's classic dual bulb experiment, which, according to American thermodynamicist Merle Potter, took place in 1843. [5]

Hence, with substitution, in the second previous equation, Joule's experiment, according to the first law, will abide by the following expression:

$Q = \Delta U \,$

Joule then opened the stopcock, thus permitting the gas to expand in volume, a type of internal system volume change, until it filled both chambers, thus the body of initial state gas reaching a final state volume Vf (size of chambers A and B, combined) and final state internal energy Uf. The internal system volume change defined by:

$\Delta V = V_f - V_i \,$

which equals:

$\Delta V = (V_A + V_B) - V_A \,$
or
$\Delta V = V_B \,$

The energy change defined by:

$\Delta U = U_f - U_i \,$

Joule then observed that there was only a slight change in the reading of the thermometer, meaning that there had been practically no transfer of heat Q from the calorimeter to the chamber or vice versa. In equation form:

$Q \cong 0 \,$

It has been assumed that if the experiment could be performed with a perfect ideal gas, with chamber B initially being a perfect vacuum, that there would be no temperature change at all and that there would be no heat flow across the boundary during the volume expansion. In equation form:

$Q = 0 \,$

With substitution of this experimental finding into the first law balance for this equation:

$\Delta U = 0 \,$

From these results, Joule concluded that the internal energy of an ideal gas is not a function of volume change:

$U \ne f(V) \,$

since the initial state volume and final state volume were different, yet no heat left or was absorbed by the body. He also concluded that the internal energy of an ideal gas is not a function of pressure change:

$U \ne f(P) \,$

since the initial state volume and final state volume were different, yet no heat left or was absorbed by the body.

Conclusion
Joule's experimental findings leads us to the conclusion that a variation in volume at constant temperature produces no variation in energy or in other words the energy of an ideal gas is a function of the temperature only and not a function of the volume:

$U = f(T) \,$

One must then determine the form of this function, from experimental findings.

Discussion
The underlying conclusion, as to internal system happenings, with the finding that the overall internal energy change was zero:

$\Delta U = 0 \,$

implies that with substitution of zero into the definition of internal energy change:

$\Delta U = U_f - U_i \,$

the conclusion is that the initial state internal energy must equal the final state internal energy:

$U_f = U_i \,$

The definition of the formula for internal energy, however, is a bit illusive. The standard formula is that given by German physicist Rudolf Clausius in 1850 as:

$U = H + J \,$

where H (not to be confused with enthalpy, H) is vis viva, not to be and J is ergal, which loosely translates as the sum of kinetic energy and potential energy, respectively:

$U = E_K + E_P \,$

or the sum of the energies of motion and the sum of the energies of position. Other more exotic definitions of internal energy exist. In regard to Joule's experimental finding, using the standard Clausius definition:

$E_{K_i} + E_{P_i} = E_{K_f} + E_{P_f} \,$

which loosely states that some of the initial experiment state potential energy EKi was converted into final experiment state kinetic energy EPf.

Human thermodynamics
Iranian-born American engineer Robert Kenoun, in his 2006 book Theory of History and Social Evolution, seems to use an unwritten Joule's second law interpretation of human social systems, in combination with Newton's law of cooling, to argue that evolving human social systems tend towards a minimum of internal energy and that conjoined systems will exchange energy during these evolutions, through a process of thermalization or equilibriation, at a rate proportional to their difference in internal energies. [3]

References
1. Powell, Michael. (2004). Stuff You Should Have Learned in School. New York: Barnes & Noble.
2. Daintith, John. (2005). Oxford Dictionary of Science. Oxford University Press.
3. Kenoun, Robert. (2006). A Proposition to Theory of History and Social Evolution. Trafford Publishing.
4. Fermi, Enrico. Thermodynamics (proof, pg. 22). Dover.
5. Potter, Merle C. and Somerton, Craig W. (2009). Schaum's Outlines: Thermodynamics for Engineers (pgs. 67-68). McGraw-Hill.