From 907a6b09707e2bcfae46404f029e3fd89a9da856 Mon Sep 17 00:00:00 2001 From: Johannes Roeder Date: Sat, 3 Feb 2024 00:07:05 +0100 Subject: [PATCH] Remove conversion factors --- dhnx/optimization/oemof_heatpipe.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/dhnx/optimization/oemof_heatpipe.py b/dhnx/optimization/oemof_heatpipe.py index 3d13c834..d96f660e 100644 --- a/dhnx/optimization/oemof_heatpipe.py +++ b/dhnx/optimization/oemof_heatpipe.py @@ -34,10 +34,10 @@ def __str__(self): class HeatPipeline(Transformer): r"""A HeatPipeline represent a Pipeline in a district heating system. + This is done by a Transformer with a constant energy loss independent of - actual power, but dependent on the nominal power and the length parameter. - The HeatPipeline is a single-input-single-output transformer. Additionally, - conversion factors for in- and output flow can be applied. + actual power, but dependent on the nominal power. + The HeatPipeline is a single-input-single-output transformer. Parameters ---------- @@ -189,10 +189,6 @@ class HeatPipelineBlock(ScalarBlock): # pylint: disable=too-many-ancestors loss of heat pipeline" ":math:`\dot{Q}_{nominal}`", ":py:obj:`flows[n, o].nominal_value`", " P", "Nominal capacity of heating pipeline" - ":math:`\eta_{out}`", ":py:obj:`conversion_factors[o][t]`", "P", " - Conversion factor of output flow (Heat Output)" - ":math:`\eta_{in}`", ":py:obj:`conversion_factors[i][t]`", "P", " - Conversion factor of input flow (Heat Input)" ":math:`f_{loss}(t)`", ":py:obj:`heat_loss_factor`", "P", "Specific heat loss factor for pipeline" ":math:`l`", ":py:obj:`length`", "P", "Length of heating pipeline" @@ -311,10 +307,6 @@ class HeatPipelineInvestBlock(ScalarBlock): # pylint: disable=too-many-ancestor loss of heat pipeline" ":math:`\dot{Q}_{nominal}`", ":py:obj:`flows[n, o].nominal_value`", " V", "Nominal capacity of heating pipeline" - ":math:`\eta_{out}`", ":py:obj:`conversion_factors[o][t]`", "P", " - Conversion factor of output flow (heat output)" - ":math:`\eta_{in}`", ":py:obj:`conversion_factors[i][t]`", "P", " - Conversion factor of input flow (heat input)" ":math:`f_{loss}(t)`", ":py:obj:`heat_loss_factor`", "P", "Specific heat loss factor for pipeline" ":math:`l`", ":py:obj:`length`", "P", "Length of heating pipeline" @@ -444,15 +436,13 @@ def _relation_rule_with_demand(block, n, t): expr = 0 try: # oemof.solph<=0.5.0 expr += - m.flow[n, o, t] - expr += m.flow[i, n, t] * n.conversion_factors[ - o][t] / n.conversion_factors[i][t] + expr += m.flow[i, n, t] expr += - block.heat_loss[n, t] expr += - m.flow[n, d, t] except KeyError: # oemof.solph>=0.5.1 period = 0 # Periods are not (yet) supported in DHNx expr += - m.flow[n, o, period, t] - expr += m.flow[i, n, period, t] * n.conversion_factors[ - o][t] / n.conversion_factors[i][t] + expr += m.flow[i, n, period, t] expr += - block.heat_loss[n, t] expr += - m.flow[n, d, period, t]