Skip to content

Commit 0d2e181

Browse files
Parameterize 'Peaking Boiler Cost per KW' to address NREL#392
1 parent 85a7594 commit 0d2e181

File tree

3 files changed

+56
-3
lines changed

3 files changed

+56
-3
lines changed

src/geophires_x/Economics.py

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,6 +1111,18 @@ def __init__(self, model: Model):
11111111
ErrMessage="assume default peaking boiler efficiency (85%)",
11121112
ToolTipText="Peaking boiler efficiency"
11131113
)
1114+
self._default_peaking_boiler_cost_USD_per_kw = 65
1115+
self.peaking_boiler_cost_per_kw = self.ParameterDict[self.peaking_boiler_cost_per_kw.Name] = floatParameter(
1116+
"Peaking Boiler Cost per KW",
1117+
DefaultValue=self._default_peaking_boiler_cost_USD_per_kw,
1118+
Min=0,
1119+
Max=1000,
1120+
UnitType=Units.ENERGYCOST,
1121+
PreferredUnits=EnergyCostUnit.DOLLARSPERKW,
1122+
CurrentUnits=EnergyCostUnit.DOLLARSPERKW,
1123+
Required=False,
1124+
ToolTipText="Peaking boiler cost per KW of maximum peaking boiler demand"
1125+
)
11141126
self.dhpipingcostrate = self.ParameterDict[self.dhpipingcostrate.Name] = floatParameter(
11151127
"District Heating Piping Cost Rate",
11161128
DefaultValue=1200,
@@ -1689,13 +1701,18 @@ def __init__(self, model: Model):
16891701
PreferredUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR,
16901702
CurrentUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR
16911703
)
1704+
16921705
# district heating
16931706
self.peakingboilercost = self.OutputParameterDict[self.peakingboilercost.Name] = OutputParameter(
16941707
Name="Peaking boiler cost",
16951708
UnitType=Units.CURRENCY,
16961709
PreferredUnits=CurrencyUnit.MDOLLARS,
1697-
CurrentUnits=CurrencyUnit.MDOLLARS
1710+
CurrentUnits=CurrencyUnit.MDOLLARS,
1711+
ToolTipText=f'Default cost: ${self._default_peaking_boiler_cost_USD_per_kw}/KW '
1712+
f'of maximum peaking boiler demand. '
1713+
f'Provide {self.peaking_boiler_cost_per_kw.Name} override the default.'
16981714
)
1715+
16991716
self.dhdistrictcost = self.OutputParameterDict[self.dhdistrictcost.Name] = OutputParameter(
17001717
Name="District Heating System Cost",
17011718
UnitType=Units.CURRENCY,
@@ -2386,8 +2403,13 @@ def Calculate(self, model: Model) -> None:
23862403
self.Cplant.value = 1.12 * 1.15 * self.ccplantadjfactor.value * 250E-6 * np.max(
23872404
model.surfaceplant.HeatExtracted.value) * 1000.
23882405

2389-
self.peakingboilercost.value = 65 * model.surfaceplant.max_peaking_boiler_demand.value / 1000 # add 65$/KW for peaking boiler
2390-
self.Cplant.value += self.peakingboilercost.value # add peaking boiler cost to surface plant cost
2406+
# add 65$/KW for peaking boiler
2407+
self.peakingboilercost.value = (self.peaking_boiler_cost_per_kw.quantity()
2408+
.to('USD / kilowatt').magnitude
2409+
* model.surfaceplant.max_peaking_boiler_demand.value / 1000)
2410+
2411+
# add peaking boiler cost to surface plant cost
2412+
self.Cplant.value += self.peakingboilercost.value
23912413

23922414

23932415
else: # all other options have power plant

src/geophires_x_schema_generator/geophires-request.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,6 +1861,15 @@
18611861
"minimum": 0,
18621862
"maximum": 1
18631863
},
1864+
"Peaking Boiler Cost per KW": {
1865+
"description": "Peaking boiler cost per KW of maximum peaking boiler demand",
1866+
"type": "number",
1867+
"units": "USD/kW",
1868+
"category": "Economics",
1869+
"default": 65,
1870+
"minimum": 0,
1871+
"maximum": 1000
1872+
},
18641873
"District Heating Piping Cost Rate": {
18651874
"description": "District heating piping cost rate ($/m)",
18661875
"type": "number",

tests/geophires_x_tests/test_economics.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# ruff: noqa: I001 # Successful module initialization is dependent on this specific import order.
88
from geophires_x.Model import Model
99
from geophires_x.Economics import CalculateFinancialPerformance
10+
from geophires_x_client import GeophiresXResult, GeophiresXClient, GeophiresInputParameters
1011
from tests.base_test_case import BaseTestCase
1112

1213

@@ -115,3 +116,24 @@ def _new_model(self) -> Model:
115116
os.chdir(stash_cwd)
116117

117118
return m
119+
120+
def test_peaking_boiler_cost(self):
121+
def _get_result(peaking_boiler_cost_: int) -> GeophiresXResult:
122+
return GeophiresXClient().get_geophires_result(
123+
GeophiresInputParameters(
124+
from_file_path=self._get_test_file_path('../examples/example12_DH.txt'),
125+
params={
126+
'Peaking Boiler Cost per KW': peaking_boiler_cost_,
127+
},
128+
)
129+
)
130+
131+
def _lcoh_pbc(r: GeophiresXResult) -> tuple[float, float]:
132+
return (
133+
r.result['SUMMARY OF RESULTS']['Direct-Use heat breakeven price (LCOH)']['value'],
134+
r.result['CAPITAL COSTS (M$)']['of which Peaking Boiler Cost']['value'],
135+
)
136+
137+
lcoh, peaking_boiler_cost = _lcoh_pbc(_get_result(0))
138+
self.assertLess(lcoh, 13.19)
139+
self.assertEqual(0, peaking_boiler_cost)

0 commit comments

Comments
 (0)