Skip to content

Commit f7570cd

Browse files
fix sdac electricity net gen calc
1 parent 6af69e0 commit f7570cd

3 files changed

Lines changed: 146 additions & 140 deletions

File tree

src/geophires_x/EconomicsSam.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,13 @@ def _get_utility_rate_parameters(m: Model) -> dict[str, Any]:
588588

589589
max_total_kWh_produced = np.max(m.surfaceplant.TotalkWhProduced.quantity().to(convertible_unit('kWh')).magnitude)
590590

591+
if econ.DoSDACGTCalculations.value:
592+
# Restore the true gross maximum before S-DAC in-place mutation decremented it
593+
sdac_elec_consumption_kwh = (
594+
np.max(m.sdacgteconomics.CarbonExtractedAnnually.value) * m.sdacgteconomics.elec.value
595+
)
596+
max_total_kWh_produced += sdac_elec_consumption_kwh
597+
591598
net_kwh_produced_series: Iterable | float | int = (
592599
m.surfaceplant.NetkWhProduced.quantity().to(convertible_unit('kWh')).magnitude
593600
)

0 commit comments

Comments
 (0)