Thermodynamic approach to tailor porosity in piezoelectric polymer fibers for application in nanogenerators