The impact of local-scale processes on solubility and capillary trapping of injected CO2