The massive need for freshwater is driving new desalination technologies such as capacitive deionization (CDI), wherein an applied electric field between porous electrodes removes salt ions from water. In this work, we present substantial advances in numerical approaches to 2D finite-element models that make it possible tractably and accurately simulate the local transport, charge-transfer, ion...