Skip to content

#3905 - Allow ZoneHVAC:TerminalUnit:VariableRefrigerantFlow to connect to AirLoopHVAC#137

Merged
jmarrec merged 3 commits intodevelopfrom
3905_VRF_Terminal_AirLoopHVAC
May 18, 2021
Merged

#3905 - Allow ZoneHVAC:TerminalUnit:VariableRefrigerantFlow to connect to AirLoopHVAC#137
jmarrec merged 3 commits intodevelopfrom
3905_VRF_Terminal_AirLoopHVAC

Conversation

@jmarrec
Copy link
Copy Markdown
Contributor

@jmarrec jmarrec commented Mar 22, 2021

Pull request overview

New test for the ability to connect a ZoneHVAC:TerminalUnit:VariableRefrigerantFlow to an AirLoopHVAC

Link to relevant GitHub Issue(s) if appropriate: NatLabRockies/OpenStudio#4253

Link to the Linux.deb installer to use for CI Testing. If not set, it will default to latest official release.
[OpenStudio Installer]: http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/incremental/develop/4253/OpenStudio-3.1.1-alpha%2B1a5c1d5d84-Ubuntu-18.04.deb

Related issue in eplusout.err: NatLabRockies/EnergyPlus#8640

This Pull Request is concerning:

  • Case 1 - NewTest: a new test for a new model API class,
  • Case 2 - TestFix: a fix for an existing test. The GitHub issue should be referenced in the PR description
  • Case 3 - NewTestForExisting: a new test for an already-existing model API class
  • Case 4 - Other: Something else, like maintenance of the repo, or just committing test results with a new OpenStudio version.

Depending on your answer, please fill out the required section below, and delete the three others.
Leave the review checklist in place.


Case 3: New test for an already-existing model API class

This PR adds a new test for a new capabillity of ZoneHVACTerminalUnitVariableRefrigerantFlow

cf PR NatLabRockies/OpenStudio#4253

Work Checklist

The following has been checked to ensure compliance with the guidelines:

  • Test has been run backwards (see Instructions for Running Docker) for all OpenStudio versions: N/A: it passes only with a new feature branch

  • Tests pass either:

    • with official OpenStudio release (include version):

      • A matching OSM test has been added from the successful run of the Ruby one with the official OpenStudio release
      • The label AddedOSM has been added to this PR
      • All new out.osw have been committed
    • with current develop (incude SHA): Fix #3905 - Allow ZoneHVAC:TerminalUnit:VariableRefrigerantFlow to connect to AirLoopHVAC OpenStudio#4253

      • The label PendingOSM has been added to this PR
      • A matching OSM test has not yet been added because the official release is pending, but model_tests.rb has a TODO.
        def test_airterminal_cooledbeam_rb
          result = sim_test('airterminal_cooledbeam.rb')
        end
        
        # TODO: To be added in the next official release after: 2.5.0
        # def test_airterminal_fourpipebeam_osm
        #   result = sim_test('airterminal_fourpipebeam.osm')
        # end
      • No out.osw have been committed as they need to be run with an official OpenStudio version
  • Ruby test is stable in the last OpenStudio version: when run multiple times on the same machine, it produces the same total site kBTU.

    • I ensured that I assign systems/loads/etc in a repeatable manner (eg: if I assign stuff to thermalZones, I do model.getThermalZones.sort_by{|z| z.name.to_s}.each do ... so I am sure I put the same ZoneHVAC systems to the same zones regardless of their order)
    • I tested stability using process_results.py (see python process_results.py --help for usage). see https://github.com/NREL/OpenStudio-resources/pull/137/checks?check_run_id=2168085314
      + ls test/vrf_airloophvac.rb_3.1.1-alpha_out_Linux_run1.osw
      test/vrf_airloophvac.rb_3.1.1-alpha_out_Linux_run1.osw
      + python process_results.py test-status --tagged --quiet
      
      Filtering only tests where there is a missing or failed osm OR ruby test
      OK: No Failing tests were found
      HTML file saved in /home/runner/work/OpenStudio-resources/OpenStudio-resources/Test-Stability/Regression_Test_Status.html
      
      + python process_results.py heatmap --tagged --quiet
      Mapping OS '3.1.1-alpha' to '9.4.0'
      OK: There are NO differences at all
  • Object has been added to autosize_hvac.rb to ensure the autosizedXXX values methods do work: N/A


Review Checklist

  • Code style (indentation, variable names, strip trailing spaces)
  • Functional code review (it has to work!)
  • Matching OSM test has been added or # TODO added to model_tests.rb
  • Appropriate out.osw have been committed
  • Test is stable
  • Object is tested in autosize_hvac as appropriate
  • The appropriate labels have been added to this PR:
    • One of: NewTest, TestFix, NewTestForExisting, Other
    • If NewTest: add PendingOSM or AddedOSM

@jmarrec jmarrec added NewTestForExisting PR type: a new test for an already-existing model API class PendingOSM A matching OSM test has yet to be added with the next official OpenStudio Release labels Mar 22, 2021
@jmarrec jmarrec self-assigned this Mar 22, 2021
@jmarrec jmarrec force-pushed the 3905_VRF_Terminal_AirLoopHVAC branch from 834c09b to a7bbe35 Compare March 22, 2021 16:36
@jmarrec jmarrec added NewTest PR type: a new test for a new model API class and removed NewTestForExisting PR type: a new test for an already-existing model API class labels Mar 22, 2021
Comment on lines +1041 to +1048
# TODO: To be added in the next official release after: 3.1.0
# def test_vrf_airloophvac_osm
# result = sim_test('vrf_airloophvac.osm')
# end

def test_vrf_airloophvac_rb
result = sim_test('vrf_airloophvac.rb')
end
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NewTest + TODO

Comment on lines +62 to +95
zones.each_with_index do |z, i|
if i == 0
# First zone, we place this VRF Terminal on the main branch of the AirLoopHVAC
# The default Ctor has a fan, which we actually need here
vrf_terminal = OpenStudio::Model::ZoneHVACTerminalUnitVariableRefrigerantFlow.new(model)
vrf_terminal.addToNode(airLoop.supplyOutletNode)
vrf_terminal.setControllingZoneorThermostatLocation(z)
name_vrf_terminal(vrf_terminal, 'VRF Terminal on Main Branch')
vrf_terminal.setSupplyAirFanPlacement('DrawThrough')
vrf.addTerminal(vrf_terminal)

# And we add an ATU Uncontroller for this zone
atu = OpenStudio::Model::AirTerminalSingleDuctConstantVolumeNoReheat.new(model, model.alwaysOnDiscreteSchedule)
airLoop.addBranchForZone(z, atu)
else
# We add an ATU, for outside air
atu = OpenStudio::Model::AirTerminalSingleDuctConstantVolumeNoReheat.new(model, model.alwaysOnDiscreteSchedule)
airLoop.addBranchForZone(z, atu)

# And a regular (zonehvac) VRF terminal
vrf_terminal = OpenStudio::Model::ZoneHVACTerminalUnitVariableRefrigerantFlow.new(model)
vrf_terminal.addToThermalZone(z)
vrf_terminal.setSupplyAirFanPlacement('BlowThrough')
name_vrf_terminal(vrf_terminal, 'Regular VRF Terminal')
vrf.addTerminal(vrf_terminal)
end
end

# Now we also create a VRF Terminal to place onto the OutdoorAirSystem, on the OA branch (for preheat/precool)
oa_vrf_terminal = OpenStudio::Model::ZoneHVACTerminalUnitVariableRefrigerantFlow.new(model)
oa_vrf_terminal.addToNode(outdoorAirSystem.outboardOANode.get)
name_vrf_terminal(oa_vrf_terminal, 'VRF Terminal on OA System')
oa_vrf_terminal.setSupplyAirFanPlacement('DrawThrough')
vrf.addTerminal(oa_vrf_terminal)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test several configurations

@jmarrec jmarrec force-pushed the 3905_VRF_Terminal_AirLoopHVAC branch from a7bbe35 to fe9aa5a Compare March 22, 2021 16:45
@jmarrec jmarrec requested a review from kbenne March 22, 2021 16:55
…not translated)

cf 1a5c1d5d8494471ddbeaa89bdf5a15428904fc1d
@jmarrec jmarrec merged commit cb24c52 into develop May 18, 2021
@jmarrec jmarrec deleted the 3905_VRF_Terminal_AirLoopHVAC branch May 18, 2021 08:20
@jmarrec jmarrec added AddedOSM A matching OSM test has been added with an official OpenStudio release and removed PendingOSM A matching OSM test has yet to be added with the next official OpenStudio Release labels May 18, 2021
jmarrec added a commit that referenced this pull request May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AddedOSM A matching OSM test has been added with an official OpenStudio release NewTest PR type: a new test for a new model API class

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant