Skip to content

Fix SSC 621 - cycle degradation penalty is nan or zero#627

Merged
brtietz merged 1 commit into
developfrom
fix_ssc_621_batt_degradation_penalty
Oct 28, 2021
Merged

Fix SSC 621 - cycle degradation penalty is nan or zero#627
brtietz merged 1 commit into
developfrom
fix_ssc_621_batt_degradation_penalty

Conversation

@brtietz

@brtietz brtietz commented Oct 22, 2021

Copy link
Copy Markdown
Collaborator
  • restore o&m variables to battery vartable for algorithms that compute cycle degradation.
  • prevent divide by zero errors for new degradation algorithms

#621

… cycle degradation. prevent divide by zero errors for new degradation algorithms

@mjprilliman mjprilliman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. Will check degradation penalty results once my SAM tests are finished running.

Comment thread ssc/cmod_battery.cpp
Comment on lines +194 to +196
{ SSC_INPUT, SSC_ARRAY, "om_batt_replacement_cost" , "Replacement cost 1" , "$/kWh" , "" , "System Costs" , "?=0.0" , "" , "" },
{ SSC_INPUT, SSC_NUMBER, "om_replacement_cost_escal" , "Replacement cost escalation" , "%/year" , "" , "System Costs" , "?=0.0" , "" , "" },

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do these need to be in the cmod_battery vartable rather than in vtab_oandm in common.cpp?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The battery compute modules don't include that vartable definition (see line 2014 of cmod_battery, or line 928 if cmod_pvsamv1). I thought it was better to duplicate the lines than include unnecessary variables, but I'm open to other options.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I like your solution. I was mostly asking for my own understanding

@brtietz brtietz merged commit 29e6b3b into develop Oct 28, 2021
@brtietz brtietz deleted the fix_ssc_621_batt_degradation_penalty branch November 5, 2021 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants