From 9226f0259f13a1f7f7a6647504e52d11070fb2f0 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 6 May 2024 16:34:29 +0200 Subject: [PATCH] Use historial HX AirToAirSensibleAndLatent effectiveness cf https://github.com/NREL/OpenStudio/pull/5099 --- model/simulationtests/autosize_hvac.rb | 3 +++ model/simulationtests/coilsystem_waterhx.py | 4 +++- model/simulationtests/coilsystem_waterhx.rb | 5 ++++- .../doas_heatexchanger_airtoair_sensibleandlatent.py | 2 ++ .../doas_heatexchanger_airtoair_sensibleandlatent.rb | 3 +++ model/simulationtests/fan_systemmodel.py | 2 ++ model/simulationtests/fan_systemmodel.rb | 3 +++ .../heatexchanger_airtoair_sensibleandlatent.py | 2 ++ .../heatexchanger_airtoair_sensibleandlatent.rb | 3 +++ 9 files changed, 25 insertions(+), 2 deletions(-) diff --git a/model/simulationtests/autosize_hvac.rb b/model/simulationtests/autosize_hvac.rb index 45735ca9f..8a557cc1e 100644 --- a/model/simulationtests/autosize_hvac.rb +++ b/model/simulationtests/autosize_hvac.rb @@ -430,6 +430,9 @@ def curve_quadratic(model, c_1constant, c_2x, c_3xPOW2, minx, maxx, miny, maxy) # OA equipment erv = OpenStudio::Model::HeatExchangerAirToAirSensibleAndLatent.new(model) +if Gem::Version.new(OpenStudio.openStudioVersion) >= Gem::Version.new('3.8.0') + erv.assignHistoricalEffectivenessCurves +end erv.addToNode(oa_system.outboardOANode.get) spm_oa_pretreat = OpenStudio::Model::SetpointManagerOutdoorAirPretreat.new(model) spm_oa_pretreat.setMinimumSetpointTemperature(-99.0) diff --git a/model/simulationtests/coilsystem_waterhx.py b/model/simulationtests/coilsystem_waterhx.py index d51533d57..368b7a80b 100644 --- a/model/simulationtests/coilsystem_waterhx.py +++ b/model/simulationtests/coilsystem_waterhx.py @@ -53,8 +53,10 @@ plant.addDemandBranchForComponent(water_coil) coil.remove() -hx = coil_system.heatExchanger() +hx = coil_system.heatExchanger().to_HeatExchangerAirToAirSensibleAndLatent().get() hx.setName("CoilSystemWaterHX HX") +if openstudio.VersionString(openstudio.openStudioVersion()) >= openstudio.VersionString("3.8.0"): + hx.assignHistoricalEffectivenessCurves() # Rename some nodes and such, for ease of debugging airloop.supplyInletNode().setName("#{airloop.name()} Supply Inlet Node") diff --git a/model/simulationtests/coilsystem_waterhx.rb b/model/simulationtests/coilsystem_waterhx.rb index 86a4b5558..30e2180dd 100644 --- a/model/simulationtests/coilsystem_waterhx.rb +++ b/model/simulationtests/coilsystem_waterhx.rb @@ -62,8 +62,11 @@ plant.addDemandBranchForComponent(water_coil) coil.remove -hx = coil_system.heatExchanger +hx = coil_system.heatExchanger.to_HeatExchangerAirToAirSensibleAndLatent.get hx.setName('CoilSystemWaterHX HX') +if Gem::Version.new(OpenStudio.openStudioVersion) >= Gem::Version.new('3.8.0') + hx.assignHistoricalEffectivenessCurves +end # Rename some nodes and such, for ease of debugging airloop.supplyInletNode.setName("#{airloop.name} Supply Inlet Node") diff --git a/model/simulationtests/doas_heatexchanger_airtoair_sensibleandlatent.py b/model/simulationtests/doas_heatexchanger_airtoair_sensibleandlatent.py index f2d4bc009..ba7cc3ba8 100644 --- a/model/simulationtests/doas_heatexchanger_airtoair_sensibleandlatent.py +++ b/model/simulationtests/doas_heatexchanger_airtoair_sensibleandlatent.py @@ -64,6 +64,8 @@ # Equipment heatexchanger_airtoair_sensibleandlatent = openstudio.model.HeatExchangerAirToAirSensibleAndLatent(model) +if openstudio.VersionString(openstudio.openStudioVersion()) >= openstudio.VersionString("3.8.0"): + heatexchanger_airtoair_sensibleandlatent.assignHistoricalEffectivenessCurves() fan = openstudio.model.FanSystemModel(model) heatexchanger_airtoair_sensibleandlatent.addToNode(oas.outboardOANode().get()) fan.addToNode(oas.outboardOANode().get()) diff --git a/model/simulationtests/doas_heatexchanger_airtoair_sensibleandlatent.rb b/model/simulationtests/doas_heatexchanger_airtoair_sensibleandlatent.rb index b92942c96..95dc63b03 100644 --- a/model/simulationtests/doas_heatexchanger_airtoair_sensibleandlatent.rb +++ b/model/simulationtests/doas_heatexchanger_airtoair_sensibleandlatent.rb @@ -73,6 +73,9 @@ # Equipment heatexchanger_airtoair_sensibleandlatent = OpenStudio::Model::HeatExchangerAirToAirSensibleAndLatent.new(model) +if Gem::Version.new(OpenStudio.openStudioVersion) >= Gem::Version.new('3.8.0') + heatexchanger_airtoair_sensibleandlatent.assignHistoricalEffectivenessCurves +end fan = OpenStudio::Model::FanSystemModel.new(model) heatexchanger_airtoair_sensibleandlatent.addToNode(oas.outboardOANode.get) fan.addToNode(oas.outboardOANode.get) diff --git a/model/simulationtests/fan_systemmodel.py b/model/simulationtests/fan_systemmodel.py index 2c9055a6d..ff347b794 100644 --- a/model/simulationtests/fan_systemmodel.py +++ b/model/simulationtests/fan_systemmodel.py @@ -248,6 +248,8 @@ exhaustFan = openstudio.model.FanSystemModel(model) heatExchanger = openstudio.model.HeatExchangerAirToAirSensibleAndLatent(model) + if openstudio.VersionString(openstudio.openStudioVersion()) >= openstudio.VersionString("3.8.0"): + heatExchanger.assignHistoricalEffectivenessCurves() heatExchanger.setSupplyAirOutletTemperatureControl(False) zoneHVACEnergyRecoveryVentilator = openstudio.model.ZoneHVACEnergyRecoveryVentilator( diff --git a/model/simulationtests/fan_systemmodel.rb b/model/simulationtests/fan_systemmodel.rb index 549379fe0..c80170aca 100644 --- a/model/simulationtests/fan_systemmodel.rb +++ b/model/simulationtests/fan_systemmodel.rb @@ -252,6 +252,9 @@ exhaustFan = OpenStudio::Model::FanSystemModel.new(model) heatExchanger = OpenStudio::Model::HeatExchangerAirToAirSensibleAndLatent.new(model) + if Gem::Version.new(OpenStudio.openStudioVersion) >= Gem::Version.new('3.8.0') + heatExchanger.assignHistoricalEffectivenessCurves + end heatExchanger.setSupplyAirOutletTemperatureControl(false) zoneHVACEnergyRecoveryVentilator = OpenStudio::Model::ZoneHVACEnergyRecoveryVentilator.new(model, heatExchanger, supplyFan, exhaustFan) diff --git a/model/simulationtests/heatexchanger_airtoair_sensibleandlatent.py b/model/simulationtests/heatexchanger_airtoair_sensibleandlatent.py index ec6043141..055740780 100644 --- a/model/simulationtests/heatexchanger_airtoair_sensibleandlatent.py +++ b/model/simulationtests/heatexchanger_airtoair_sensibleandlatent.py @@ -31,6 +31,8 @@ oa_node = s.airLoopHVACOutdoorAirSystem().get().outboardOANode().get() hx = openstudio.model.HeatExchangerAirToAirSensibleAndLatent(model) + if openstudio.VersionString(openstudio.openStudioVersion()) >= openstudio.VersionString("3.8.0"): + hx.assignHistoricalEffectivenessCurves() hx.addToNode(oa_node) diff --git a/model/simulationtests/heatexchanger_airtoair_sensibleandlatent.rb b/model/simulationtests/heatexchanger_airtoair_sensibleandlatent.rb index 70128f098..bccb492f3 100644 --- a/model/simulationtests/heatexchanger_airtoair_sensibleandlatent.rb +++ b/model/simulationtests/heatexchanger_airtoair_sensibleandlatent.rb @@ -40,6 +40,9 @@ oa_node = s.airLoopHVACOutdoorAirSystem.get.outboardOANode.get hx = OpenStudio::Model::HeatExchangerAirToAirSensibleAndLatent.new(model) + if Gem::Version.new(OpenStudio.openStudioVersion) >= Gem::Version.new('3.8.0') + hx.assignHistoricalEffectivenessCurves + end hx.addToNode(oa_node)