Fine-grained Gibbs entropy (source code)

= Fine-grained Gibbs entropy
{title2=$S_{\rm fg}=-k_B\int\rho\log(\rho/\rho_{\rm ref})\,d\Gamma$}

= Fine-grained entropy
{synonym}

For a normalized <probability density> $\rho$ on classical <phase space> with canonical volume element $d\Gamma$, the fine-grained <Gibbs entropy> is $-k_B\int\rho\log(\rho/\rho_{\rm ref})\,d\Gamma$, whenever the integral exists. Here $\rho_{\rm ref}>0$ is a constant reference density fixing the units inside the <logarithm>, and $k_B$ is the <Boltzmann constant>. No averaging into finite cells is performed.

For a regular <Hamiltonian flow> $\Phi_t$, <Liouville theorem in Hamiltonian mechanics> gives $d\Gamma(\Phi_tz)=d\Gamma(z)$ and $\rho_t(\Phi_tz)=\rho_0(z)$. Substitution directly proves
$$
S_{\rm fg}[\rho_t]=-k_B\int\rho_0(z)\log(\rho_0(z)/\rho_{\rm ref})\,d\Gamma(z)=S_{\rm fg}[\rho_0].
$$
An irreversible macroscopic entropy increase therefore requires a different description or additional assumptions; it is not a failure of this volume-preservation argument.