Describe the bug
The battery lifetime models currently do not allow for reversible thermal degradation due to this line: https://github.com/NREL/ssc/blame/936dd955c46799fe721b315576a395220b12efa9/shared/lib_battery_capacity.cpp#L523
The capacity (qmax_lifetime) can only be decreased because of the if statement. If the capacity_percent increases, the qmax_lifetime still cannot increase. This prevents the thermal reversible degradation from reversing.
To Reproduce
Use this SAM project file which has a battery that is always charging (to replenish any lost charge from degradation, but doesn't discharge) while it sits for a month at 0 deg then 60 deg.
battery_reversible_fade.sam.zip
The plot shows that as the temperature changes (black), the relative capacity also changes, recovering some capacity when the temperature increases (blue).
The charge (red) and max charge (orange) however do not recover.

Expected behavior
The expected behavior is for the charge (red) and max charge (orange) to increase again.
@aspeake
Describe the bug
The battery lifetime models currently do not allow for reversible thermal degradation due to this line: https://github.com/NREL/ssc/blame/936dd955c46799fe721b315576a395220b12efa9/shared/lib_battery_capacity.cpp#L523
The capacity (qmax_lifetime) can only be decreased because of the if statement. If the capacity_percent increases, the qmax_lifetime still cannot increase. This prevents the thermal reversible degradation from reversing.
To Reproduce
Use this SAM project file which has a battery that is always charging (to replenish any lost charge from degradation, but doesn't discharge) while it sits for a month at 0 deg then 60 deg.
battery_reversible_fade.sam.zip
The plot shows that as the temperature changes (black), the relative capacity also changes, recovering some capacity when the temperature increases (blue).
The charge (red) and max charge (orange) however do not recover.

Expected behavior
The expected behavior is for the charge (red) and max charge (orange) to increase again.
@aspeake