Variational Problems in Materials Science