A new layout optimization method for offshore wind farms is proposed to minimize power deficits due to wake effect. The main engine of the algorithm is a gradient-descent method, in which an analogy is established between power deficit and repulsive electrostatic potential energy. To achieve a maximum dispersion in the initial solution, throughout the optimization process, new turbines are included in the centre of the concession area, and quickly expand outward looking for areas with less potential, in turn pushing the previous ones. When the optimization process ends, to avoid local maximums, it enters into a process of suppression of the set of locations that cause the greatest potential (power deficit). Then, a potential map of the entire area is created and a greedy algorithm includes new turbines to complete the layout with the final number of turbines. To speed up the search process and the creation of the potential map, two simplifications have been validated and added: the spatial distribution of velocities has been converted into its equivalent with point symmetry; and, for turbines affected by multiple wakes, the power deficit has been calculated by using a linear aggregation of powers, instead of the usual linear (or quadratic) aggregation of speeds. Owing to this type of aggregation, the process is accelerated in a factor of 90.