Skip to content

Commit

Permalink
Merge pull request #4873 from NREL/airloop-hvac-unitary-sys-opmethod
Browse files Browse the repository at this point in the history
AirLoopHVACUnitarySystem set Method During XXX Operation
  • Loading branch information
joseph-robertson committed Aug 1, 2023
2 parents 82304dc + 52b5d43 commit 84bd57c
Show file tree
Hide file tree
Showing 7 changed files with 506 additions and 300 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ You can also refer to the [OpenStudio SDK Python Binding Version Compatibility M
## New Features, Major Fixes and API-breaking changes

* [#4827](https://github.com/NREL/OpenStudio/pull/4827) - #4748 #4817 - Validate BCLXML with schema when loading + make sorting of files in measure.xml consistent when saving
* [#4873](https://github.com/NREL/OpenStudio/pull/4873) - AirLoopHVACUnitarySystem set Method During XXX Operation
* Fix #4695 - AirLoopHVACUnitarySystem: Supply Air Flow Rate Method During <XXX> Operation should be set via related setters/autosize
* Breaks the return of `supplyAirFlowRateMethodDuringCoolingOperation` and `supplyAirFlowRateMethodDuringHeatingOperation`: now returns `std::string` instead of `boost::optional<std::string>`
* Deprecates many set/reset methods

## Minor changes and bug fixes

Expand Down
2 changes: 2 additions & 0 deletions resources/model/OpenStudio.idd
Original file line number Diff line number Diff line change
Expand Up @@ -11902,6 +11902,7 @@ OS:AirLoopHVAC:UnitarySystem,
\key FlowPerFloorArea
\key FractionOfAutosizedCoolingValue
\key FlowPerCoolingCapacity
\default None
\note Enter the method used to determine the cooling supply air volume flow rate.
\note None is used when a cooling coil is not included in the unitary system or this field may be blank.
\note SupplyAirFlowRate is selected when the magnitude of the supply air volume is used.
Expand Down Expand Up @@ -11946,6 +11947,7 @@ OS:AirLoopHVAC:UnitarySystem,
\key FlowPerFloorArea
\key FractionOfAutosizedHeatingValue
\key FlowPerHeatingCapacity
\default None
\note Enter the method used to determine the heating supply air volume flow rate.
\note None is used when a heating coil is not included in the unitary system or this field may be blank.
\note SupplyAirFlowRate is selected when the magnitude of the supply air volume is used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,34 @@ namespace energyplus {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingCoilObjectType, _heatingCoil->iddObject().name());
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingCoilName, _heatingCoil->name().get());
}

// Supply Air Flow Rate Method During Heating Operation
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRateMethod,
modelObject.supplyAirFlowRateMethodDuringHeatingOperation());

// Supply Air Flow Rate During Heating Operation
if (modelObject.isSupplyAirFlowRateDuringHeatingOperationAutosized()) {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRate, "Autosize");
} else if (auto val_ = modelObject.supplyAirFlowRateDuringHeatingOperation()) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRate, val_.get());
}

// Supply Air Flow Rate Per Floor Area during Heating Operation
if (auto val_ = modelObject.supplyAirFlowRatePerFloorAreaduringHeatingOperation()) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRatePerFloorArea, val_.get());
}

// Fraction of Autosized Design Heating Supply Air Flow Rate
if (auto val_ = modelObject.fractionofAutosizedDesignHeatingSupplyAirFlowRate()) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingFractionofAutosizedHeatingSupplyAirFlowRate, val_.get());
}

// Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation
if (auto val_ = modelObject.designSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation()) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRatePerUnitofCapacity, val_.get());
}
} else {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRateMethod, "None");
}

// DX Heating Coil Sizing Ratio
Expand All @@ -217,6 +245,34 @@ namespace energyplus {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingCoilObjectType, _coolingCoil->iddObject().name());
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingCoilName, _coolingCoil->name().get());
}

// Supply Air Flow Rate Method During Cooling Operation
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRateMethod,
modelObject.supplyAirFlowRateMethodDuringCoolingOperation());

// Supply Air Flow Rate During Cooling Operation
if (modelObject.isSupplyAirFlowRateDuringCoolingOperationAutosized()) {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRate, "Autosize");
} else if (auto val_ = modelObject.supplyAirFlowRateDuringCoolingOperation()) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRate, val_.get());
}

// Supply Air Flow Rate Per Floor Area During Cooling Operation
if (auto val_ = modelObject.supplyAirFlowRatePerFloorAreaDuringCoolingOperation()) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRatePerFloorArea, val_.get());
}

// Fraction of Autosized Design Cooling Supply Air Flow Rate
if (auto val_ = modelObject.fractionofAutosizedDesignCoolingSupplyAirFlowRate()) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingFractionofAutosizedCoolingSupplyAirFlowRate, val_.get());
}

// Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation
if (auto val_ = modelObject.designSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperation()) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRatePerUnitofCapacity, val_.get());
}
} else {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRateMethod, "None");
}

// Use DOAS DX Cooling Coil
Expand Down Expand Up @@ -252,68 +308,6 @@ namespace energyplus {
}
}

// Supply Air Flow Rate Method During Cooling Operation
s = modelObject.supplyAirFlowRateMethodDuringCoolingOperation();
if (s) {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRateMethod, s.get());
}

// Supply Air Flow Rate During Cooling Operation
if (modelObject.isSupplyAirFlowRateDuringCoolingOperationAutosized()) {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRate, "Autosize");
} else if ((d = modelObject.supplyAirFlowRateDuringCoolingOperation())) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRate, d.get());
}

// Supply Air Flow Rate Per Floor Area During Cooling Operation
d = modelObject.supplyAirFlowRatePerFloorAreaDuringCoolingOperation();
if (d) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRatePerFloorArea, d.get());
}

// Fraction of Autosized Design Cooling Supply Air Flow Rate
d = modelObject.fractionofAutosizedDesignCoolingSupplyAirFlowRate();
if (d) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingFractionofAutosizedCoolingSupplyAirFlowRate, d.get());
}

// Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation
d = modelObject.designSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperation();
if (d) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRatePerUnitofCapacity, d.get());
}

// Supply Air Flow Rate Method During Heating Operation
s = modelObject.supplyAirFlowRateMethodDuringHeatingOperation();
if (s) {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRateMethod, s.get());
}

// Supply Air Flow Rate During Heating Operation
if (modelObject.isSupplyAirFlowRateDuringHeatingOperationAutosized()) {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRate, "Autosize");
} else if ((d = modelObject.supplyAirFlowRateDuringHeatingOperation())) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRate, d.get());
}

// Supply Air Flow Rate Per Floor Area during Heating Operation
d = modelObject.supplyAirFlowRatePerFloorAreaduringHeatingOperation();
if (d) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRatePerFloorArea, d.get());
}

// Fraction of Autosized Design Heating Supply Air Flow Rate
d = modelObject.fractionofAutosizedDesignHeatingSupplyAirFlowRate();
if (d) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingFractionofAutosizedHeatingSupplyAirFlowRate, d.get());
}

// Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation
d = modelObject.designSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation();
if (d) {
unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRatePerUnitofCapacity, d.get());
}

// Supply Air Flow Rate Method When No Cooling or Heating is Required
s = modelObject.supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired();
if (s) {
Expand Down
Loading

0 comments on commit 84bd57c

Please sign in to comment.