Brownian motion · The statistical mechanics derivation

Why counting positions gives the pressure law.

How can a vast microscopic problem, with every solvent molecule and every suspended particle in motion, yield a law as simple as Π=nkBT\Pi = n k_B T without solving any molecular equations of motion?

Statistical mechanics derivation

The configuration integral laboratory

Static worked example

Predict before the numbers

Doubling the volume available to two independent particles multiplies the number of position arrangements by 2, 4, or 8?

Three relations the model could have

The result appears when you choose, say you have one in mind, or skip.

Presets and parameters
Particle placement model
Notation
Experiment settings particle count, volume ratio, reference volume, temperature

Whole integer Np ≥ 1, positive volume ratio V/V₀, reference volume V₀ and temperature T.

Worked example: 2 independent particles in a volume 2 times larger have 4 times as many position arrangements, and the free energy changes by −5.61 × 10⁻²¹ J.

Step 1: one particle in the accessible volume V*

Its possible positions are proportional to the room it has.

V* = 2 × V₀

Integral over (x₁, y₁, z₁)

B₁ = ∫ dx₁ dy₁ dz₁ = V*

Factor ratio: 2

Step 1 of 4

One accepted calculation, in explicit units
Particle count2
Volume expansion ratio V/V₀2
Position arrangement factor4
Free-energy difference ΔF−5.61085 × 10−21 J
Ideal pressure p4.0473725 × 10−9 Pa
Locked-cluster pressure2.0236863 × 10−9 Pa
Volume-independent factor Jsymbolic (cancels in derivative)
Momentum integralssymbolic (cancels in derivative)
Free-energy offset F₀symbolic (cancels in derivative)

Counting where independent particles can be, not how they move, gives the pressure they exert. Twice the room gives each particle twice the places to be, and two particles four times the arrangements.

§2 derives osmotic pressure from the molecular-kinetic theory without any picture of how the particles move. The free energy is F = −(RT/N) lg B, where B is an integral over every possible state of the system. For n particles held in a volume V* by a semipermeable wall, moving independently in a homogeneous liquid with no forces on them, §2 shows that the integral splits into a factor J that depends neither on where the particles are nor on V*, times one factor of V* for each particle: B = J V*n. Then F = −(RT/N){lg J + n lg V*}, and the pressure is p = −∂F/∂V* = (RT/N)(n/V*), in modern symbols NpkBT/V. So suspended bodies and dissolved molecules of equal number exert the same osmotic pressure at high dilution. The lab's default is two particles in 2 × 10−12 m³, twice the starting volume, at 293.15 K: the free energy falls by 5.61 × 10−21 J, and the pressure is 4.05 × 10−9 Pa. With 100 particles it is 2.02 × 10−7 Pa, fifty times as much. Lock the two particles into one rigid cluster and they have only one placement to make: the free energy falls by half as much, 2.81 × 10−21 J, and the pressure is 2.02 × 10−9 Pa, that of a single particle.

Modern qualifications

Einstein's printed §2 writes the entropy as S = E/T + 2κ lg ∫e−E/2κT dp1 … dpl, with 2κN = R, so his κ is half of the modern kB; B stands for the integral, J for the volume-independent factor, V* for the volume inside the semipermeable wall, n for the number of particles, and lg for the natural logarithm. A footnote says the section presupposes his papers on the foundations of thermodynamics of 1902 and 1903, and that the paper's results can be understood without it. The rigid cluster is a comparison authored for this site: it shows that pressure counts independently placed units, not constituents, the point the light-quanta paper's §5 makes with its exponent n.

What this model assumes

• Independence of particle positions (the §2 premise).

• Dilution (no excluded volume interactions).

• Uniform potential inside the accessible volume.

• Thermal equilibrium.

• The volume-independent factor J does not depend on volume V.

Not modeled: interactions between particles; excluded volume effects; external potential fields; non-ideal solutions; quantum statistics; momentum integrals beyond their cancellation in the derivative; molecular dynamics or collision trajectories; cluster formation or breakup kinetics.

Show which code computes these numbers

Configuration volume term, factor ratio and locked cluster pressure are computed by src/physics/reference/diffusion/routeA.ts.

Live terms bind particleCount, volume, temperature, and freeEnergy.

Show the code

The site’s own reference code for this law, in TypeScript. It computes the numbers above when the page runs it, and it is what the page uses wherever a FrankenSim result is not available.

configurationVolumeTerm · src/physics/reference/diffusion/routeA.ts · this site’s source, as built · sha256:5efc881026d009ea6b258be1989aa5d7c2a99f1725fce0ea2429a0e57be5404f

This function computes the listed outputs when it runs.

In words

For Np independent particles the volume-dependent free energy is minus k_B T times Np times the logarithm of the volume, and the change between two volumes is minus k_B T Np ln(V/V0). Differentiating gives the pressure Np k_B T / V, which is the ideal osmotic law arrived at by counting configurations rather than by assuming it. All four are returned separately: Np ln V, the free-energy term, the difference between two volumes, and the pressure.

Implementation

export function configurationVolumeTerm(
  { Np, V, V0, T }: { Np: number; V: number; V0: number; T: number },
  set: ConstantSet,
): ConfigurationVolume | RouteAEvaluation {
  if (
    !Number.isSafeInteger(Np) ||
    Np < 0 ||
    ![V, V0, T].every((v) => Number.isFinite(v) && v > 0)
  ) {
    return outside(
      "freeEnergy",
      "configurationVolumeTerm",
      "Np a nonnegative integer, V > 0, V0 > 0, T > 0",
      "Use a whole particle count and positive volumes and temperature.",
      "input",
      set,
    );
  }
  const kT = thermalConstant(set).value * T;
  const symbolic = (
    expressionRef: string,
    unspecifiedSymbols: readonly string[],
  ): ScientificResult =>
    Object.freeze({
      ...identity("freeEnergy", "configurationVolumeTerm"),
      status: "symbolic" as const,
      expressionRef,
      unspecifiedSymbols,
    });
  return Object.freeze({
    npLnV: number("freeEnergy", "configurationVolumeTerm", Np * Math.log(V), set),
    freeEnergyTerm: number("freeEnergy", "configurationVolumeTerm", -kT * Np * Math.log(V), set),
    deltaF: number("freeEnergy", "configurationVolumeTerm", -kT * Np * Math.log(V / V0), set),
    pressure: number("osmoticPressure", "configurationVolumeTerm", (Np * kT) / V, set),
    volumeIndependentFactor: symbolic("configuration-factor-J", ["J"]),
    momentumIntegrals: symbolic("momentum-integrals", ["p"]),
    freeEnergyOffset: symbolic("free-energy-offset", ["F0"]),
  });
}

The site’s own reference code for this law, in TypeScript. It computes the numbers above when the page runs it, and it is what the page uses wherever a FrankenSim result is not available.

configurationFactorRatio · src/physics/reference/diffusion/routeA.ts · this site’s source, as built · sha256:c43183b40c6387e4f2e0a7fc010ad221c0076449787b4d5d2f52374e165081b1

This function computes the listed outputs when it runs.

In words

The configuration factor is the volume ratio to the power of the particle count, which is the probability in Boltzmann's relation once it is compared with a reference state. The function returns it three ways, because at any interesting count only some of them exist: an exact decimal for a count up to 12, the natural and base-ten logarithms always, and the plain double when one can hold it. The ratio arrives as a decimal STRING and is refused if it is not an exact decimal, so the exact answer is exact.

Implementation

export function configurationFactorRatio(
  Np: number,
  ratio: string,
): FactorRatio | RouteAEvaluation {
  if (!Number.isSafeInteger(Np) || Np < 0 || !isExactDecimal(ratio) || Number(ratio) <= 0) {
    return outside(
      "freeEnergy",
      "configurationFactorRatio",
      "Np a nonnegative integer and ratio a positive exact decimal",
      "Give the volume ratio as an exact decimal string.",
    );
  }
  const ln = Np * Math.log(Number(ratio));
  const log10 = ln / Math.LN10;
  let decimal: string | undefined;
  if (Np <= 12) {
    decimal = "1";
    for (let i = 0; i < Np; i++) decimal = multiplyExactDecimal(decimal, ratio);
  }
  // r ** Np is correctly rounded, where exp(Np ln r) drifts (exp(500 ln 2) is off in the 14th
  // digit though 2^500 is exact) and can land just under the largest double for a ratio that
  // overflows it (Np = 1024, r = 2). Overflow, underflow to 0 and a subnormal result are not the
  // ratio, so each reports null and the logarithms stand.
  const dbl = Number(ratio) ** Np;
  return Object.freeze({
    ...(decimal === undefined ? {} : { decimal }),
    ln,
    log10,
    representableDouble: Number.isFinite(dbl) && dbl >= SMALLEST_NORMAL_DOUBLE ? dbl : null,
  });
}

The site’s own reference code for this law, in TypeScript. It computes the numbers above when the page runs it, and it is what the page uses wherever a FrankenSim result is not available.

lockedClusterPressure · src/physics/reference/diffusion/routeA.ts · this site’s source, as built · sha256:4701dd45ce653f169f66b47d6c2a29963ef53bfb8e35998832fe669eb2f23ef0

This function computes the listed outputs when it runs.

In words

Lock every particle into a single unit and the configuration factor is the volume ratio itself rather than the ratio to the power of the count, so the pressure is k_B T / V instead of Np k_B T / V. For a cubic millimetre at 290.15 K that is 4.006 times 10^-12 Pa, smaller by exactly the particle count. The two readings are returned side by side, which is what lets a reader see that the pressure is a statement about independence rather than about the particles being there.

Implementation

export function lockedClusterPressure(
  V: number,
  T: number,
  set: ConstantSet,
): LockedCluster | RouteAEvaluation {
  if (![V, T].every((v) => Number.isFinite(v) && v > 0)) {
    return outside(
      "osmoticPressure",
      "lockedClusterPressure",
      "V > 0 and T > 0",
      "Use a positive volume and temperature.",
      "input",
      set,
    );
  }
  const kT = thermalConstant(set).value * T;
  return Object.freeze({
    locked: number("osmoticPressure", "lockedClusterPressure", kT / V, set, {
      modelIdentity: "locked-cluster",
      modelNote:
        "Perfectly locked particles move as one unit, so the factor ratio is V/V0 and the pressure is k_B T / V.",
    }),
    independent: outside(
      "osmoticPressure",
      "lockedClusterPressure",
      "independence-premise-removed",
      "The independent-particle pressure N_p k_B T / V is not defined once particles are locked as one unit. Pressure counts independently placed units.",
      "model",
      set,
    ),
  });
}

Compare two setups side by side in your reading. Each laboratory has its own settings, stepwise state and accepted results.

Open the derivation

From available volume to free energy

Einstein's §2 writes the free energy using the logarithm of an integral over all state variables (the configuration integral B). Under the premises of independent particle positions and dilution, the spatial positions of NpN_p particles contribute a clean volume factor VNpV^{N_p}.

B=∫⋯∫dx1…dzn=V∗nJ,F=−2κTlg⁡B=−2κTnlg⁡V∗−2κTlg⁡J+const\begin{aligned}B &= \int\cdots\int dx_1\dots dz_n \\ &= V^{*n}J, \\ F &= -2\kappa T\lg B \\ &= -2\kappa Tn\lg V^* \\ &\quad -2\kappa T\lg J+\text{const}\end{aligned}

In modern notation, 2κN=R2\kappa N = R gives 2κ=kB2\kappa = k_B, the particle count n is written NpN_p, and the volume V* is V:

F=−NpkBTln⁡V−kBTln⁡J+F0\begin{aligned}F &= -N_p k_B T\ln V \\ &\quad - k_B T\ln J + F_0\end{aligned}
Explain this equation

Why the complicated molecular factor J drops out

The factor J represents the integral over all solvent positions and interactions for fixed tracer coordinates. Under Einstein's three premises (homogeneous fluid, dilute independent particles, no external forces), shifting the particle positions does not change the probability of finding solvent molecules in any region. Thus J is independent of V, and differentiating with respect to volume leaves zero:

p=−∂F∂V=NpkBTV=nkBTp=-\frac{\partial F}{\partial V}=\frac{N_p k_BT}{V}=n k_BT
Explain this equation

The locked-cluster counterexample: what is actually counted?

If the particles are rigidly locked together into a single cluster, the spatial arrangements grow only like V (or V/V0V/V_0) rather than (V/V0)Np(V/V_0)^{N_p}. The resulting osmotic pressure is that of one independent unit:

plocked=kBTVp_{\text{locked}}=\frac{k_B T}{V}

This demonstrates that osmotic pressure counts independently placed units, not constituents.

Embed this laboratory on another page. It starts from its worked defaults, not your current settings.