From eafa636d4fb87b5298e831a4865dabd95894437f Mon Sep 17 00:00:00 2001 From: Michael Barlow Date: Wed, 3 Sep 2025 15:18:05 -0600 Subject: [PATCH 1/2] fix(process): continue instead of break on uninitialized input streams in Boundary fix(transmission_compressor): combine all gas input streams using regex matching --- opgee/process.py | 2 +- opgee/processes/transmission_compressor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opgee/process.py b/opgee/process.py index 7a92a9c3..41203748 100644 --- a/opgee/process.py +++ b/opgee/process.py @@ -1032,7 +1032,7 @@ def run(self, analysis): if not is_chosen_boundary: for in_stream in self.inputs: if in_stream.is_uninitialized(): - break + continue contents = in_stream.contents if len(contents) != 1: raise ModelValidationError(f"Streams to and from boundaries must have only a " diff --git a/opgee/processes/transmission_compressor.py b/opgee/processes/transmission_compressor.py index 4f723a5b..bf187d08 100644 --- a/opgee/processes/transmission_compressor.py +++ b/opgee/processes/transmission_compressor.py @@ -63,7 +63,7 @@ def cache_attributes(self): def run(self, analysis): self.print_running_msg() - input = self.find_input_stream("gas") + input = self.find_input_streams(".*gas", regex=True, combine=True) if input.is_uninitialized(): return From 0c23d22d98773daf9464355d05c50c32e00937dd Mon Sep 17 00:00:00 2001 From: Michael Barlow Date: Mon, 15 Sep 2025 10:26:49 -0600 Subject: [PATCH 2/2] fix(processes): add missing stream and clarify attribute defaults - add "prod exported gas" stream in opgee.xml - comment default values for crude oil storage attributes - broaden input requirement pattern in transmission compressor process --- opgee/etc/opgee.xml | 4 ++++ opgee/processes/crude_oil_storage.py | 4 ++-- opgee/processes/transmission_compressor.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/opgee/etc/opgee.xml b/opgee/etc/opgee.xml index 56087a1f..163f8bdb 100644 --- a/opgee/etc/opgee.xml +++ b/opgee/etc/opgee.xml @@ -577,6 +577,10 @@ gas + + exported gas + + exported gas diff --git a/opgee/processes/crude_oil_storage.py b/opgee/processes/crude_oil_storage.py index 0911e92b..9a79ccea 100644 --- a/opgee/processes/crude_oil_storage.py +++ b/opgee/processes/crude_oil_storage.py @@ -68,8 +68,8 @@ def __init__(self, name, **kwargs): def cache_attributes(self): self.oil_sands_mine = self.field.oil_sands_mine - self.f_FG_CS_VRU = self.attr("f_FG_CS_VRU") - self.f_FG_CS_FL = self.attr("f_FG_CS_FL") + self.f_FG_CS_VRU = self.attr("f_FG_CS_VRU") # default 0.9 + self.f_FG_CS_FL = self.attr("f_FG_CS_FL") # default 0.1 def run(self, analysis): self.print_running_msg() diff --git a/opgee/processes/transmission_compressor.py b/opgee/processes/transmission_compressor.py index bf187d08..a603e5f3 100644 --- a/opgee/processes/transmission_compressor.py +++ b/opgee/processes/transmission_compressor.py @@ -26,7 +26,7 @@ def __init__(self, *args, **kwargs): # TODO: avoid process names in contents. self._required_inputs = [ - "gas", + ".*gas", ] self._required_outputs = [