Fluctuations of the instantaneous local Lagrangian strain
ϵij(r,t), measured with respect to a static ``reference''
lattice, are used to obtain accurate estimates of the elastic constants of
model solids from atomistic computer simulations. The measured strains are
systematically coarse- grained by averaging them within subsystems (of size
Lb) of a system (of total size L) in the canonical ensemble. Using a
simple finite size scaling theory we predict the behaviour of the fluctuations
as a function of Lb/L and extract elastic
constants of the system {\em in the thermodynamic limit} at nonzero
temperature. Our method is simple to implement, efficient and general enough to
be able to handle a wide class of model systems including those with singular
potentials without any essential modification. We illustrate the technique by
computing isothermal elastic constants of the ``soft'' and the hard disk
triangular solids in two dimensions from molecular dynamics and Monte Carlo
simulations. We compare our results with those from earlier simulations and
density functional theory.Comment: 24 pages REVTEX, 10 .ps figures, version accepted for publication in
Physical Review