Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/geophires_x/Economics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3369,6 +3369,15 @@ def calculate_plant_costs(self, model: Model) -> None:
# all other options have power plant
# TODO migrate relevant constants/calculations below to their respective classes

def _check_temperature_for_ORC(temperature: float) -> None:
if temperature > 200.:
msg = ('The simulated production temperature exceeds 200 degrees Celsius. The built-in ORC utilization '
'efficiency correlations may not be valid above this temperature. Consider using a single or double '
'flash plant, or providing a custom correlation via a surface plant module. For more information, '
'see: https://natlabrockies.github.io/GEOPHIRES-X/Theoretical-Basis-for-GEOPHIRES.html#surface-plant')
print(f'Warning: {msg}')
model.logger.warning(msg)

if model.surfaceplant.plant_type.value == PlantType.SUB_CRITICAL_ORC:
MaxProducedTemperature = np.max(model.surfaceplant.TenteringPP.value)
if MaxProducedTemperature < 150.:
Expand All @@ -3379,6 +3388,7 @@ def calculate_plant_costs(self, model: Model) -> None:
CCAPP1 = C3 * MaxProducedTemperature ** 3 + C2 * MaxProducedTemperature ** 2 + C1 * MaxProducedTemperature + C0
else:
CCAPP1 = 2231 - 2 * (MaxProducedTemperature - 150.)
_check_temperature_for_ORC(MaxProducedTemperature)
x = np.max(model.surfaceplant.ElectricityProduced.value)
y = np.max(model.surfaceplant.ElectricityProduced.value)
if y == 0.0:
Expand All @@ -3396,6 +3406,7 @@ def calculate_plant_costs(self, model: Model) -> None:
CCAPP1 = C3 * MaxProducedTemperature ** 3 + C2 * MaxProducedTemperature ** 2 + C1 * MaxProducedTemperature + C0
else:
CCAPP1 = 2231 - 2 * (MaxProducedTemperature - 150.)
_check_temperature_for_ORC(MaxProducedTemperature)
# factor 1.1 to make supercritical 10% more expansive than subcritical
self.Cplantcorrelation = 1.1 * CCAPP1 * math.pow(
np.max(model.surfaceplant.ElectricityProduced.value) / 15., -0.06) * np.max(
Expand Down