A microstructure made up of a digital image is already naturally discretized and so lends itself to numerical computation of many quantities. The finite element method uses a variational formulation of the linear elastic equations, and finds the solution by minimizing the elastic energy via a fast conjugate gradient method. The digital image is assumed to have periodic boundary conditions. Details of the theory and programs used are reported in the papers of Garboczi & Day  and Garboczi .
In order to obtain accurate results using the FEM on models of random porous materials, it is absolutely necessary to estimate and minimize three sources of error: finite size effects, discretization errors, and statistical fluctuations. This has generally not been done in the past, owing to limitations in computer memory and speed. FEM results for random microstructures do not have much meaning without such an error analysis.
The various sources of error are defined in the following way. First, the length scale of the microstructure is fixed, usually by fixing the size of a typical pore (e.g. the spherical pore radius). The size of the system is then controlled by the side length of the cubic sample, denoted T. The size of T compared to the pore size controls how many pores will appear in the computational cell. A real material has many thousands or more such pores. Errors can occur in using a smaller number in a periodic cell to simulate a much larger number. We vary T in order to map out this effect.
Once a value of T is chosen that minimizes finite size errors but is still computationally possible, we next must consider the discretization error, which comes about because we are using discrete pixels to represent continuum objects. The number of pixels along each edge of the cubical unit cell is M, giving a resolution of dx=T/M (in units of µm per pixel, if T is in µm). For the chosen value of T, a value of M is chosen that also gives acceptable discretization errors, usually on the order of a few percent.
Finally, when computing the properties of random materials, either computationally or experimentally, one must carefully choose the number of samples (Ns) over which the results need to be averaged to produce acceptable uncertainties. This value is again chosen, within computational constraints, to keep statistical fluctuations within a few percent.