  We discuss Onsager's thermodynamic formalism for transport coefficients and
apply it to the calculation of the shear modulus and shear viscosity of a
monodisperse system of repulsive particles. We focus on the concept of
extensive "distance" and intensive "field" conjugated via a Fenchel-Legendre
transform involving a thermodynamic(-like) potential, which allows to switch
ensembles. Employing Brownian dynamics, we calculate both the shear modulus and
the shear viscosity from strain fluctuations and show that they agree with
direct calculations from strained and non-equilibrium simulations,
respectively. We find a dependence of the fluctuations on the coupling strength
to the strain reservoir, which can be traced back to the discrete-time
integration. These results demonstrate the viability of exploiting fluctuations
of extensive quantities for the numerical calculation of transport
coefficients.
