NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
503 stars 192 forks source link

Creating a VS WSHP using UnitarySystem object generates incorrect air flow ratios for UnitarySystemPerformance:Multispeed object #4715

Closed Nigusse closed 1 year ago

Nigusse commented 2 years ago

Created a Variable Speed WSHP programmatically using OS:AirLoopHVAC:UnitarySystem object in Openstudio V3.4 but the ForwardTranslateAirLoopHVACUnitarySystem code fails to generate the UnitarySystemPerformance:Multispeed object correctly. See sample energyplus object output created for water-source VS coils:

UnitarySystemPerformance:Multispeed,
  SZ-SYS SPACE1-1 Thermal Zone Unitary System Performance, !- Name
  5,                                      !- Number of Speeds for Heating
  5,                                      !- Number of Speeds for Cooling
  No,                                     !- Single Mode Operation
  ,                                       !- No Load Supply Air Flow Rate Ratio
  1,                                      !- Heating Speed Supply Air Flow Ratio 1
  1,                                      !- Cooling Speed Supply Air Flow Ratio 1
  1,                                      !- Heating Speed Supply Air Flow Ratio 2
  1,                                      !- Cooling Speed Supply Air Flow Ratio 2
  ,                                       !- Heating Speed Supply Air Flow Ratio 3
  ,                                       !- Cooling Speed Supply Air Flow Ratio 3
  ,                                       !- Heating Speed Supply Air Flow Ratio 4
  ,                                       !- Cooling Speed Supply Air Flow Ratio 4
  ,                                       !- Heating Speed Supply Air Flow Ratio 5
  ;                                       !- Cooling Speed Supply Air Flow Ratio 5

Inspecting the ForwardTranslateAirLoopHVACUnitarySystem code I'm suspicious of this section https://github.com/NREL/OpenStudio/blob/6a935cab2ae26b4170caf107287df201f4612401/src/energyplus/ForwardTranslator/ForwardTranslateAirLoopHVACUnitarySystem.cpp#L573-L610

Also, I see a typo CoilCoolingDXMultiSpeed. This DX cooling coil type should have been CoilCoolingDXVariableSpeed, I think. I ran into the same problem when I tried to created a VS air-source heat pump using OS:AirLoopHVAC:UnitarySystem as a parent.

https://github.com/NREL/OpenStudio/blob/6a935cab2ae26b4170caf107287df201f4612401/src/energyplus/ForwardTranslator/ForwardTranslateAirLoopHVACUnitarySystem.cpp#L480-L482

Environment

Some additional details about your environment for this issue (if relevant):

in.osm.txt

Nigusse commented 2 years ago

If I create a variable speed air-source heat pumps using the Variable Speed DX coils in Openstudio V3.4 and run the osm input file, then the ForwardTranslateAirLoopHVACUnitarySystem code does not set the variable speed DX cooling coil number of speeds correctly as shown in the object snippet below. The issue is partly here because the VS DX cooling coil is excluded and a code for setting the Number of Speeds for Cooling is also missing.

UnitarySystemPerformance:Multispeed,
  SZ-SYS SPACE4-1 Thermal Zone Unitary System Performance, !- Name
  5,                                      !- Number of Speeds for Heating
  1,                                      !- Number of Speeds for Cooling
  No,                                     !- Single Mode Operation
  ,                                       !- No Load Supply Air Flow Rate Ratio
  1,                                      !- Heating Speed Supply Air Flow Ratio 1
  1,                                      !- Cooling Speed Supply Air Flow Ratio 1
  1,                                      !- Heating Speed Supply Air Flow Ratio 2
  1,                                      !- Cooling Speed Supply Air Flow Ratio 2
  ,                                       !- Heating Speed Supply Air Flow Ratio 3
  ,                                       !- Cooling Speed Supply Air Flow Ratio 3
  ,                                       !- Heating Speed Supply Air Flow Ratio 4
  ,                                       !- Cooling Speed Supply Air Flow Ratio 4
  ,                                       !- Heating Speed Supply Air Flow Ratio 5
  ;                                       !- Cooling Speed Supply Air Flow Ratio 5 
Nigusse commented 2 years ago

@jmarrec @kbenne I am documenting the issues and where in the code the problems are. Addressing this issue by fixing what is broken or taking the option to NOT generate the UnitarySystemPerformance:Multispeed are the two options we have. I would like to see others weigh in if there is preference for one option over the other.

joseph-robertson commented 1 year ago

To clarify, based on your attached in.osm.txt, you are expecting each of UnitarySystemPerformanceMultispeed's "Heating/Cooling Speed Supply Air Flow Ratio X" fields to be "Autosize", correct? I believe you should only get doubles if the AirLoopHVACUnitarySystem's "Supply Air Flow Rate During Heating/Cooling Operation" fields are not "Autosize".