-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconcile total site load #456
base: gridRE-dev
Are you sure you want to change the base?
Conversation
@adfarth just tracking a couple other notes here:
No fixes for these yet but I'll track and see if I can follow up with good fixes. One concern is the electrical load could be a weird |
@adfarth Ready for you to check! The steam turbine is left out of all of this for now but the other heating and cooling loads have been caught up. I added a result in |
@zolanaj would you mind adding a CHANGELOG entry for this? And perhaps updating the PR description with the same entry? |
# tech electric loads from thermal techs | ||
+ sum(m[:dvCoolingProduction][t, ts] / p.cooling_cop[t][ts] for t in setdiff(p.techs.cooling,p.techs.ghp), ts in p.time_steps) | ||
+ sum(m[:dvHeatingProduction][t, q, ts] / p.heating_cop[t][ts] for q in p.heating_loads, t in p.techs.electric_heater, ts in p.time_steps) | ||
+ sum(p.ghp_electric_consumption_kw[g,ts] * m[:binGHP][g] for g in p.ghp_options, ts in p.time_steps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zolanaj two questions on this:
- Did you intentionally choose
p.time_steps
instead ofp.time_steps_with_grid
? Honestly, so few people are using the single outage modeling that it probably doesn't matter much anymore, but just wanting to know if we should include a note about this choice - in the load balance constraints, we include
- p.s.cooling_load.loads_kw_thermal[ts] / p.cooling_cop["ExistingChiller"][ts]
You described this as "That subtraction of cooling load is due to our electric load being inclusive of the cooling load which is met by the electric chiller. The cooling production three lines up from what's highlighted allows for either the electric chiller meeting the load (i.e., no change in electricity consumption) or a full or partial replacement by ASHP, or an absorption chiller."
Should that be included here too?
- sum(m[:dvProductionToWaste][t,q,ts] for t in p.techs.chp, q in p.heating_loads, ts in p.time_steps) #minus CHP waste heat | ||
+ sum(m[:dvSupplementaryThermalProduction][t,ts] for t in p.techs.chp, ts in p.time_steps) # plus CHP supplemental firing thermal generation | ||
- sum(m[:dvProductionToStorage][b,t,ts]*(1-p.s.storage.attr[b].charge_efficiency*p.s.storage.attr[b].discharge_efficiency) for t in setdiff(union(p.techs.heating, p.techs.chp), p.techs.ghp), b in p.s.storage.types.thermal, ts in p.time_steps) #minus thermal storage losses | ||
- sum(m[:dvProductionToStorage][b,t,ts]*(1-p.s.storage.attr[b].charge_efficiency*p.s.storage.attr[b].discharge_efficiency) for t in setdiff(union(p.techs.heating, p.techs.chp), union(p.techs.ghp, p.techs.electric_heater)), b in p.s.storage.types.thermal, ts in p.time_steps) #minus thermal storage losses | ||
) | ||
# - AnnualSteamToSteamTurbine # minus steam going to SteamTurbine; already adjusted by p.hours_per_time_step | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zolanaj could you confirm if the TODO below is now addressed?
) | ||
# - AnnualRESteamToSteamTurbine # minus RE steam feeding steam turbine, adjusted by p.hours_per_time_step | ||
# + AnnualSteamTurbineREThermOut #plus steam turbine RE generation, adjusted for storage losses, adjusted by p.hours_per_time_step (not included in first line because p.tech_renewable_energy_fraction for SteamTurbine is 0) | ||
) | ||
|
||
# Total heat (steam/hot water heat that is not being used to generate electricity) | ||
AnnualHeatkWh = @expression(m,p.hours_per_time_step*( | ||
sum(m[:dvHeatingProduction][t,q,ts] for t in setdiff(union(p.techs.heating, p.techs.chp), p.techs.ghp), q in p.heating_loads, ts in p.time_steps) #total heat generation (need to see how GHP fits into this) | ||
sum(m[:dvHeatingProduction][t,q,ts] for t in setdiff(union(p.techs.heating, p.techs.chp), union(p.techs.ghp, p.techs.electric_heater)), q in p.heating_loads, ts in p.time_steps) #total heat generation (need to see how GHP fits into this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the GHP comment here be removed, if addressed?
@@ -47,6 +47,7 @@ function add_site_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict; _n="") | |||
r["annual_onsite_renewable_electricity_kwh"] = round(value(m[:AnnualOnsiteREEleckWh]), digits=2) | |||
r["onsite_renewable_electricity_fraction_of_elec_load"] = round(value(m[:AnnualOnsiteREEleckWh])/value(m[:AnnualEleckWh]), digits=4) | |||
r["onsite_and_grid_renewable_electricity_fraction_of_elec_load"] = round((value(m[:AnnualOnsiteREEleckWh]) + value(m[:AnnualGridREEleckWh])) /value(m[:AnnualEleckWh]), digits=4) | |||
r["electric_load_converted_from_thermal_kwh"] = round(value(m[:AnnualEleckWh]) - (sum(p.s.electric_load.loads_kw) * p.hours_per_time_step), digits=2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the naming of this, just confirming that there aren't instances in which REopt competes one electric tech against another more efficient tech, which could change the load? (not sure how important that would even be here). Would you mind adding this to the help text at the top with a brief commented description?
) | ||
# - AnnualRESteamToSteamTurbine # minus RE steam feeding steam turbine, adjusted by p.hours_per_time_step | ||
# + AnnualSteamTurbineREThermOut #plus steam turbine RE generation, adjusted for storage losses, adjusted by p.hours_per_time_step (not included in first line because p.tech_renewable_energy_fraction for SteamTurbine is 0) | ||
) | ||
|
||
# Total heat (steam/hot water heat that is not being used to generate electricity) | ||
AnnualHeatkWh = @expression(m,p.hours_per_time_step*( | ||
sum(m[:dvHeatingProduction][t,q,ts] for t in setdiff(union(p.techs.heating, p.techs.chp), p.techs.ghp), q in p.heating_loads, ts in p.time_steps) #total heat generation (need to see how GHP fits into this) | ||
sum(m[:dvHeatingProduction][t,q,ts] for t in setdiff(union(p.techs.heating, p.techs.chp), union(p.techs.ghp, p.techs.electric_heater)), q in p.heating_loads, ts in p.time_steps) #total heat generation (need to see how GHP fits into this) | ||
- sum(m[:dvProductionToWaste][t,q,ts] for t in p.techs.chp, q in p.heating_loads, ts in p.time_steps) #minus CHP waste heat | ||
+ sum(m[:dvSupplementaryThermalProduction][t,ts] for t in p.techs.chp, ts in p.time_steps) # plus CHP supplemental firing thermal generation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zolanaj would you mind looking into whether dvSupplementaryThermalProduction
is being double counted here? I.e., is it already included in dvHeatingProduction
?
- sum(m[:dvProductionToWaste][t,q,ts]* p.tech_renewable_energy_fraction[t] for t in p.techs.chp, q in p.heating_loads, ts in p.time_steps) #minus CHP waste heat | ||
+ sum(m[:dvSupplementaryThermalProduction][t,ts] * p.tech_renewable_energy_fraction[t] for t in p.techs.chp, ts in p.time_steps) # plus CHP supplemental firing thermal generation | ||
- sum(m[:dvProductionToStorage][b,t,ts]*p.tech_renewable_energy_fraction[t]*(1-p.s.storage.attr[b].charge_efficiency*p.s.storage.attr[b].discharge_efficiency) for t in setdiff(union(p.techs.heating, p.techs.chp), p.techs.ghp), b in p.s.storage.types.thermal, ts in p.time_steps) #minus thermal storage losses, note does not account for p.DecayRate | ||
- sum(m[:dvProductionToStorage][b,t,ts]*p.tech_renewable_energy_fraction[t]*(1-p.s.storage.attr[b].charge_efficiency*p.s.storage.attr[b].discharge_efficiency) for t in setdiff(union(p.techs.heating, p.techs.chp), union(p.techs.ghp, p.techs.electric_heater)), b in p.s.storage.types.thermal, ts in p.time_steps) #minus thermal storage losses, note does not account for p.DecayRate | ||
) | ||
# - AnnualRESteamToSteamTurbine # minus RE steam feeding steam turbine, adjusted by p.hours_per_time_step | ||
# + AnnualSteamTurbineREThermOut #plus steam turbine RE generation, adjusted for storage losses, adjusted by p.hours_per_time_step (not included in first line because p.tech_renewable_energy_fraction for SteamTurbine is 0) | ||
) | ||
|
||
# Total heat (steam/hot water heat that is not being used to generate electricity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zolanaj could you modify the descriptor of this calculation to describe something along the lines of "end use load" so we remember next time we look at this? :)
uncomments code that tracks electrical load attributable to thermal technologies when calculating the expression
m[:AnnualEleckWh]
TODO note at end of add_re_tot_calcs(): ensure no double counting once AnnualEleckWh accounts for electric heating and cooling loads