Current to the cathode as a function of cathode potential relative to electrolyte
(E)
| 129 | |
| 130 | |
| 131 | def cathode_curr(E): |
| 132 | """ |
| 133 | Current to the cathode as a function of cathode |
| 134 | potential relative to electrolyte |
| 135 | """ |
| 136 | |
| 137 | # due to ohmic losses, the cathode-side electrolyte potential is non-zero. |
| 138 | # Therefore, we need to add this potential to E to get the cathode |
| 139 | # potential. |
| 140 | cathode_bulk.electric_potential = E + oxide_c.electric_potential |
| 141 | |
| 142 | # get the species net production rates due to the cathode-side TPB |
| 143 | # reaction mechanism. The production rate array has the values for the |
| 144 | # neighbor species in the order listed in the .yaml file, followed by the |
| 145 | # tpb phase. The kinetics_species_index method finds the index of the species, |
| 146 | # accounting for the possibility of species being in different orders in the |
| 147 | # arrays. |
| 148 | w = tpb_c.net_production_rates |
| 149 | electron_index = tpb_c.kinetics_species_index('electron') |
| 150 | |
| 151 | # the sign convention is that the current is positive when electrons are |
| 152 | # being drawn from the cathode (that is, negative production rate). |
| 153 | return -ct.faraday * w[electron_index] * TPB_length_per_area |
| 154 | |
| 155 | # %% |
| 156 | # Initialization |