diff --git a/src/rtctools_heat_network/esdl/_edr_pipes.json b/src/rtctools_heat_network/esdl/_edr_pipes.json
index ac1191b4..e3967961 100644
--- a/src/rtctools_heat_network/esdl/_edr_pipes.json
+++ b/src/rtctools_heat_network/esdl/_edr_pipes.json
@@ -1,6 +1,6 @@
{
"Steel-S1-DN-20": {
- "inner_diameter": 0.0217,
+ "inner_diameter": 0.02,
"u_1": 0.14264250396258266,
"u_2": 0.0036419580112703703,
"insulation_thicknesses": [
@@ -51,7 +51,7 @@
"xml_string": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"
},
"Steel-S1-DN-40": {
- "inner_diameter": 0.0431,
+ "inner_diameter": 0.04,
"u_1": 0.2083588991429329,
"u_2": 0.007193386331494938,
"insulation_thicknesses": [
@@ -102,7 +102,7 @@
"xml_string": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"
},
"Steel-S1-DN-80": {
- "inner_diameter": 0.0825,
+ "inner_diameter": 0.08,
"u_1": 0.2869061375581693,
"u_2": 0.011643213891622031,
"insulation_thicknesses": [
@@ -136,7 +136,7 @@
"xml_string": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"
},
"Steel-S1-DN-125": {
- "inner_diameter": 0.1325,
+ "inner_diameter": 0.125,
"u_1": 0.3507491672336199,
"u_2": 0.014785413358434316,
"insulation_thicknesses": [
@@ -170,7 +170,7 @@
"xml_string": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"
},
"Steel-S1-DN-200": {
- "inner_diameter": 0.2101,
+ "inner_diameter": 0.2,
"u_1": 0.4576799199049079,
"u_2": 0.02098848308481162,
"insulation_thicknesses": [
diff --git a/src/rtctools_heat_network/esdl/esdl_heat_model.py b/src/rtctools_heat_network/esdl/esdl_heat_model.py
index 8a64eab1..092b5cc9 100644
--- a/src/rtctools_heat_network/esdl/esdl_heat_model.py
+++ b/src/rtctools_heat_network/esdl/esdl_heat_model.py
@@ -96,7 +96,7 @@ def get_density(self, asset_name, carrier):
# temperature = 20.0
temperature = 9.0
- if NetworkSettings.NETWORK_TYPE_GAS.lower() in carrier.name: # is this maybe a bug below as well
+ if NetworkSettings.NETWORK_TYPE_GAS.lower() in carrier.name.lower(): # is this maybe a bug below as well
density = cP.CoolProp.PropsSI(
"D",
"T",
@@ -105,7 +105,7 @@ def get_density(self, asset_name, carrier):
carrier.pressure * 1.0e5,
NetworkSettings.NETWORK_COMPOSITION_GAS,
)
- elif NetworkSettings.NETWORK_TYPE_HYDROGEN in carrier.name:
+ elif NetworkSettings.NETWORK_TYPE_HYDROGEN.lower() in carrier.name.lower():
density = cP.CoolProp.PropsSI(
"D",
"T",
diff --git a/src/rtctools_heat_network/gas_physics_mixin.py b/src/rtctools_heat_network/gas_physics_mixin.py
index 008f87ec..da3b0778 100644
--- a/src/rtctools_heat_network/gas_physics_mixin.py
+++ b/src/rtctools_heat_network/gas_physics_mixin.py
@@ -95,7 +95,8 @@ def __init__(self, *args, **kwargs):
"""
self.gas_network_settings = {
"network_type": NetworkSettings.NETWORK_TYPE_GAS,
- "maximum_velocity": 15.0,
+ "maximum_velocity": 15.0, # check if this was the issue for not reaching v > 15
+ # "maximum_velocity": 20.0,
"minimum_velocity": 0.005,
"head_loss_option": HeadLossOption.LINEARIZED_ONE_LINE_EQUALITY,
"minimize_head_losses": False,
diff --git a/src/rtctools_heat_network/pycml/component_library/milp/gas/gas_pipe.py b/src/rtctools_heat_network/pycml/component_library/milp/gas/gas_pipe.py
index ad7416c4..87e136fa 100644
--- a/src/rtctools_heat_network/pycml/component_library/milp/gas/gas_pipe.py
+++ b/src/rtctools_heat_network/pycml/component_library/milp/gas/gas_pipe.py
@@ -19,6 +19,7 @@ def __init__(self, name, **modifiers):
self.disconnectable = False
self.v_max = 15.0
+ # self.v_max = 20.0
self.density = 2.5e3 # [g/m3] # this is vlaue is overwritten?
self.diameter = nan
self.area = 0.25 * pi * self.diameter**2
diff --git a/tests/test_head_loss.py b/tests/test_head_loss.py
index f77ae9be..bdf41c04 100644
--- a/tests/test_head_loss.py
+++ b/tests/test_head_loss.py
@@ -726,7 +726,7 @@ def energy_system_options(self):
head_loss_option_setting = head_loss_option_setting
self.gas_network_settings["head_loss_option"] = head_loss_option_setting
- # self.gas_network_settings["n_linearization_lines"] = 5
+ self.gas_network_settings["n_linearization_lines"] = 5
self.gas_network_settings["minimize_head_losses"] = True
self.gas_network_settings["minimum_velocity"] = 0.0
@@ -739,9 +739,9 @@ def esdl_assets(self):
assets = super().esdl_assets
for asset in assets:
if assets[asset].asset_type in ["Pipe"]:
- assets[asset].attributes["diameter"] = esdl.PipeDiameterEnum.DN20
+ # assets[asset].attributes["diameter"] = esdl.PipeDiameterEnum.DN20
# assets[asset].attributes["diameter"] = esdl.PipeDiameterEnum.DN40
- # assets[asset].attributes["diameter"] = esdl.PipeDiameterEnum.DN80
+ assets[asset].attributes["diameter"] = esdl.PipeDiameterEnum.DN80
# assets[asset].attributes["diameter"] = esdl.PipeDiameterEnum.DN125
# assets[asset].attributes["diameter"] = esdl.PipeDiameterEnum.DN200
@@ -754,20 +754,26 @@ def pre(self):
target = self.get_timeseries(f"{demand}.target_gas_demand")
if self.esdl_assets["4abcb49f-2dac-4e00-9c93-9dbab4510a31"].attributes["diameter"] == esdl.PipeDiameterEnum.DN20:
- inner_pipe_diam_m = 0.0217
+ # inner_pipe_diam_m = 0.0217
+ inner_pipe_diam_m = 0.02
elif self.esdl_assets["4abcb49f-2dac-4e00-9c93-9dbab4510a31"].attributes["diameter"] == esdl.PipeDiameterEnum.DN40:
- inner_pipe_diam_m = 0.0431
+ # inner_pipe_diam_m = 0.0431
+ inner_pipe_diam_m = 0.04
elif self.esdl_assets["4abcb49f-2dac-4e00-9c93-9dbab4510a31"].attributes["diameter"] == esdl.PipeDiameterEnum.DN80:
- inner_pipe_diam_m = 0.0825
+ # inner_pipe_diam_m = 0.0825
+ inner_pipe_diam_m = 0.08
elif self.esdl_assets["4abcb49f-2dac-4e00-9c93-9dbab4510a31"].attributes["diameter"] == esdl.PipeDiameterEnum.DN125:
- inner_pipe_diam_m = 0.1325
+ # inner_pipe_diam_m = 0.1325
+ inner_pipe_diam_m = 0.125
elif self.esdl_assets["4abcb49f-2dac-4e00-9c93-9dbab4510a31"].attributes["diameter"] == esdl.PipeDiameterEnum.DN200:
- inner_pipe_diam_m = 0.2101
+ # inner_pipe_diam_m = 0.2101
+ inner_pipe_diam_m = 0.2
+
# gas_velo_m_s = 2.5
# gas_velo_m_s = 5.0
- gas_velo_m_s = 10.0
- # gas_velo_m_s = 15.0
+ # gas_velo_m_s = 10.0
+ gas_velo_m_s = 15.0
# gas_velo_m_s = 20.0
target_gas_demand_g_s = (