Open mleot opened 2 months ago
I opened a pull request (draft) just to demonstrate an example and ask others for their opinion. In this version, I pulled both primary and secondary reaction and particle concentration overpotentials for a half cell, and took the average of the two. I know this isn't the correct way to go about this, but this is the result:
The dashed voltage line is not aligned with the sum of the overpotentials. Maybe there is something fundamentally different for half-cell plot voltage_components that I don't understand yet.
Description
I would like to see the functionality for plotting the different over potentials separated by particle phases for a composite electrode, in the
plot_voltage_components
function.Motivation
Having visibility into the contributions of each phase toward the net overpotentials would allow for better understanding of the dynamics in composite electrode systems.
Possible Implementation
I suggest that the definitions of overpotentials and labels be done differently when the cell is a half-cell. I also suggest that the new 'battery' overpotential variables be defined when the composite electrode model is being used.
Additional context
I attempted to make the changes locally, when I noticed a few interesting things that may deserve attention. I noticed in the
BaseBatteryModel.set_voltage_variables()
method, it appeared that there was no case where the secondary phase overpotentials would be extracted from the variables.I wasn't sure if this behavior was a bug, or if this is the intended behavior. Maybe I am missing it, but I don't see where exactly the secondary phase overpotentials would be stored or accessed.