Analysis of the energetics and stability of liquid droplets on textured surfaces with square micropillars