A two-dimensional thermodynamic model based on Helmholtz free energy for wettability regulation of textured metal surfaces