From 76ba8d34660ad1ab84914974b1966f124b5303cf Mon Sep 17 00:00:00 2001 From: Nathan Moore Date: Wed, 30 Oct 2024 16:01:08 -0600 Subject: [PATCH] add default for `fraLat` and clean up setting other defaults --- .../load_connectors/teaser.py | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/geojson_modelica_translator/model_connectors/load_connectors/teaser.py b/geojson_modelica_translator/model_connectors/load_connectors/teaser.py index 301938f22..f336f2c64 100644 --- a/geojson_modelica_translator/model_connectors/load_connectors/teaser.py +++ b/geojson_modelica_translator/model_connectors/load_connectors/teaser.py @@ -265,21 +265,17 @@ def post_process(self, scaffold, keep_original_models=False): ], ) - fraction_latent_person = self.system_parameters.get_param( - "buildings.load_model_parameters.rc.fraction_latent_person" - ) + fraction_latent_person = ( + self.system_parameters.get_param("buildings.load_model_parameters.rc.fraction_latent_person") or 1.25 + ) # Fraction latent of sensible persons load = 0.8 for home, 1.25 for office. - use_moisture_balance = self.system_parameters.get_param( - "buildings.load_model_parameters.rc.use_moisture_balance" - ) - if use_moisture_balance is None: - use_moisture_balance = "false" + use_moisture_balance = ( + self.system_parameters.get_param("buildings.load_model_parameters.rc.use_moisture_balance") or "false" + ) # If true, input connector QLat_flow is enabled and room air computes moisture balance. - # TODO: Determine why we are looking for use_moisture_balance & nPorts in the sys-param file. + # TODO: Determine why we are looking for these values in the sys-param file. # Is this just an allowance for future flexibility? - n_ports = self.system_parameters.get_param("buildings.load_model_parameters.rc.nPorts") - if n_ports is None: - n_ports = 1 + n_ports = self.system_parameters.get_param("buildings.load_model_parameters.rc.nPorts") or 1 # create a new parameter for fraction latent person mofile.add_parameter(