  Stress and material deformation field predictions are among the most
important tasks in computational mechanics. These predictions are typically
made by solving the governing equations of continuum mechanics using finite
element analysis, which can become computationally prohibitive considering
complex microstructures and material behaviors. Machine learning (ML) methods
offer potentially cost effective surrogates for these applications. However,
existing ML surrogates are either limited to low-dimensional problems and/or do
not provide uncertainty estimates in the predictions. This work proposes an ML
surrogate framework for stress field prediction and uncertainty quantification
for diverse materials microstructures. A modified Bayesian U-net architecture
is employed to provide a data-driven image-to-image mapping from initial
microstructure to stress field with prediction (epistemic) uncertainty
estimates. The Bayesian posterior distributions for the U-net parameters are
estimated using three state-of-the-art inference algorithms: the posterior
sampling-based Hamiltonian Monte Carlo method and two variational approaches,
the Monte-Carlo Dropout method and the Bayes by Backprop algorithm. A
systematic comparison of the predictive accuracy and uncertainty estimates for
these methods is performed for a fiber reinforced composite material and
polycrystalline microstructure application. It is shown that the proposed
methods yield predictions of high accuracy compared to the FEA solution, while
uncertainty estimates depend on the inference approach. Generally, the
Hamiltonian Monte Carlo and Bayes by Backprop methods provide consistent
uncertainty estimates. Uncertainty estimates from Monte Carlo Dropout, on the
other hand, are more difficult to interpret and depend strongly on the method's
design.
