  We consider the steady state of an open system in which there is a flux of
matter between two reservoirs at different chemical potentials. For a large
system of size $N$, the probability of any macroscopic density profile
$\rho(x)$ is $\exp[-N{\cal F}(\{\rho\})]$; ${\cal F}$ thus generalizes to
nonequilibrium systems the notion of free energy density for equilibrium
systems. Our exact expression for $\cal F$ is a nonlocal functional of $\rho$,
which yields the macroscopically long range correlations in the nonequilibrium
steady state previously predicted by fluctuating hydrodynamics and observed
experimentally.
