Skip to content

Commit

Permalink
Adjust test and rename nodes for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Jan 16, 2025
1 parent fa5ae45 commit 75f4ccc
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions model/simulationtests/zone_hvac_evaporative_cooler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
'offset' => 1,
'application_type' => 'Above Floor' })

# add ASHRAE System type 03, PSZ-AC
model.add_hvac({ 'ashrae_sys_num' => '03' })

# assign constructions from a local library to the walls/windows/etc. in the model
model.set_constructions

Expand All @@ -40,19 +37,19 @@
# else...)
zones = model.getThermalZones.sort_by { |z| z.name.to_s }
z = zones[0]
air_system = z.airLoopHVAC.get

oa_node = air_system.airLoopHVACOutdoorAirSystem.get.outboardOANode.get

# Add ZoneHVACEvaporativeCoolerUnit
zoneHVACEvaporativeCoolerUnit = OpenStudio::Model::ZoneHVACEvaporativeCoolerUnit.new(model)
direct_evap = zoneHVACEvaporativeCoolerUnit.firstEvaporativeCooler
direct_evap.addToNode(oa_node)
indirect_evap = OpenStudio::Model::EvaporativeCoolerIndirectResearchSpecial.new(model)
indirect_evap.addToNode(oa_node)
zoneHVACEvaporativeCoolerUnit.setSecondEvaporativeCooler(indirect_evap)
zoneHVACEvaporativeCoolerUnit.addToThermalZone(z)

z.zoneAirNode.setName("#{z.nameString} Zone Air Node")
# z.returnAirModelObjects.modelObjects[0].setName("#{z.nameString} Zone Return Air Node")
z.inletPortList.modelObjects[0].setName("#{z.nameString} Zone Inlet Node")
z.exhaustPortList.modelObjects[0].setName("#{z.nameString} Zone Exhaust Air Node")

# save the OpenStudio model (.osm)
model.save_openstudio_osm({ 'osm_save_directory' => Dir.pwd,
'osm_name' => 'in.osm' })

0 comments on commit 75f4ccc

Please sign in to comment.