Optimal design of spacers in reverse osmosis