Water retention on mathematical surfaces