-
Notifications
You must be signed in to change notification settings - Fork 16
Wrap ZoneHVAC:EvaporativeCoolerUnit #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
be72603
fa5ae45
75f4ccc
96801a1
9eaada9
f16dda8
516030d
9670dce
f90ba33
9c626d4
0299faf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| require 'openstudio' | ||
| require_relative 'lib/baseline_model' | ||
|
|
||
| model = BaselineModel.new | ||
|
|
||
| # make a 1 story, 100m X 50m, 1 zone building | ||
| model.add_geometry({ 'length' => 100, | ||
| 'width' => 50, | ||
| 'num_floors' => 1, | ||
| 'floor_to_floor_height' => 4, | ||
| 'plenum_height' => 0, | ||
| 'perimeter_zone_depth' => 0 }) | ||
|
|
||
| # add windows at a 40% window-to-wall ratio | ||
| model.add_windows({ 'wwr' => 0.4, | ||
| 'offset' => 1, | ||
| 'application_type' => 'Above Floor' }) | ||
|
|
||
| # assign constructions from a local library to the walls/windows/etc. in the model | ||
| model.set_constructions | ||
|
|
||
| # set whole building space type; simplified 90.1-2004 Large Office Whole Building | ||
| model.set_space_type | ||
|
|
||
| # add design days to the model (Chicago) | ||
| model.add_design_days | ||
|
|
||
| # add thermostats | ||
| model.add_thermostats({ 'heating_setpoint' => 24, | ||
| 'cooling_setpoint' => 28 }) | ||
|
|
||
| # In order to produce more consistent results between different runs, | ||
| # we sort the zones by names | ||
| # (There's only one here, but just in case this would be copy pasted somewhere | ||
| # else...) | ||
| zones = model.getThermalZones.sort_by { |z| z.name.to_s } | ||
| z = zones[0] | ||
|
|
||
| # Add ZoneHVACEvaporativeCoolerUnit | ||
| zoneHVACEvaporativeCoolerUnit = OpenStudio::Model::ZoneHVACEvaporativeCoolerUnit.new(model) | ||
| direct_evap = zoneHVACEvaporativeCoolerUnit.firstEvaporativeCooler | ||
| indirect_evap = OpenStudio::Model::EvaporativeCoolerIndirectResearchSpecial.new(model) | ||
| zoneHVACEvaporativeCoolerUnit.setSecondEvaporativeCooler(indirect_evap) | ||
| zoneHVACEvaporativeCoolerUnit.addToThermalZone(z) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should exercise the other setters for demonstration purposes |
||
|
|
||
| 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' }) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2147,6 +2147,18 @@ def test_zone_hvac_cooling_panel_osm | |
| result = sim_test('zone_hvac_cooling_panel.osm') | ||
| end | ||
|
|
||
| def test_zone_hvac_evaporative_cooler_rb | ||
| result = sim_test('zone_hvac_evaporative_cooler.rb') | ||
| end | ||
|
|
||
| # def test_zone_hvac_evaporative_cooler_py | ||
| # result = sim_test('zone_hvac_evaporative_cooler.py') | ||
| # end | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: once happy with he ruby test, the python one needs to be added now in this PR |
||
|
|
||
| # def test_zone_hvac_evaporative_cooler_osm | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MISSING the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
| # result = sim_test('zone_hvac_evaporative_cooler.osm') | ||
| # end | ||
|
|
||
| def test_zone_hvac_equipment_list_rb | ||
| result = sim_test('zone_hvac_equipment_list.rb') | ||
| end | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I found the node connections to be broken, I'm using 8 zones...