Modeling the electrical double layer to understand the reaction environment in a CO2 electrocatalytic system