Skip to content

Commit

Permalink
Merge pull request #4971 from NREL/4963_Unitary_DefaultWhenNoHeatingO…
Browse files Browse the repository at this point in the history
…rCoolingRequired

#4963 - AirLoopHVACUnitarySystem Default Supply Air Flow Rate Method When No Cooling or Heating is Required to None
  • Loading branch information
jmarrec authored Sep 27, 2023
2 parents 32d9701 + ff08894 commit e31381d
Show file tree
Hide file tree
Showing 14 changed files with 2,045 additions and 290 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,13 @@ 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
* [#4873](https://github.com/NREL/OpenStudio/pull/4873) & [#4971](https://github.com/NREL/OpenStudio/pull/4971) - 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>`
* Breaks the return of `supplyAirFlowRateMethodDuringCoolingOperation`, `supplyAirFlowRateMethodDuringHeatingOperation` and `supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired()`: now returns `std::string` instead of `boost::optional<std::string>`
* Deprecates many set/reset methods
* These fields are now non-optional, and are set via the flow field setters and reset when the heating/cooling coils are reset.
* Example: `unitary.setSupplyAirFlowRatePerFloorAreaDuringCoolingOperation(1.0)` will set the "Supply Air Flow Rate Method During Cooling Operation" to "FlowPerFloorArea"

* [#4932](https://github.com/NREL/OpenStudio/pull/4932) - Support undisturbed ground temperature models on GroundHeatExchangerVertical
* Fix #4930 - Support undisturbed ground temperature models on GroundHeatExchangerVertical
* Update `GroundHeatExchanger:Vertical` to actually use the Ground Temeprature Model field
Expand Down
5 changes: 3 additions & 2 deletions resources/model/OpenStudio.idd
Original file line number Diff line number Diff line change
Expand Up @@ -11902,7 +11902,7 @@ OS:AirLoopHVAC:UnitarySystem,
\key FlowPerFloorArea
\key FractionOfAutosizedCoolingValue
\key FlowPerCoolingCapacity
\default None
\required-field
\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 @@ -11947,7 +11947,7 @@ OS:AirLoopHVAC:UnitarySystem,
\key FlowPerFloorArea
\key FractionOfAutosizedHeatingValue
\key FlowPerHeatingCapacity
\default None
\required-field
\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 Expand Up @@ -11994,6 +11994,7 @@ OS:AirLoopHVAC:UnitarySystem,
\key FractionOfAutosizedHeatingValue
\key FlowPerCoolingCapacity
\key FlowPerHeatingCapacity
\required-field
\note Enter the method used to determine the supply air volume flow rate when no cooling or heating is required.
\note None is used when a cooling and 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 @@ -309,10 +309,8 @@ namespace energyplus {
}

// Supply Air Flow Rate Method When No Cooling or Heating is Required
s = modelObject.supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired();
if (s) {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRateMethod, s.get());
}
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRateMethod,
modelObject.supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired());

// Supply Air Flow Rate When No Cooling or Heating is Required
if (modelObject.isSupplyAirFlowRateWhenNoCoolingorHeatingisRequiredAutosized()) {
Expand Down
497 changes: 259 additions & 238 deletions src/model/AirLoopHVACUnitarySystem.cpp

Large diffs are not rendered by default.

80 changes: 56 additions & 24 deletions src/model/AirLoopHVACUnitarySystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ namespace model {
boost::optional<double> designSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation() const;

/** In EnergyPlus 8.3.0 and above this property maps to the EnergyPlus field "No Load Supply Air Flow Rate Method" **/
boost::optional<std::string> supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired() const;
std::string supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired() const;

/** In EnergyPlus 8.3.0 and above this property maps to the EnergyPlus field "No Load Supply Air Flow Rate" **/
boost::optional<double> supplyAirFlowRateWhenNoCoolingorHeatingisRequired() const;
Expand Down Expand Up @@ -244,16 +244,26 @@ namespace model {

void resetSupplyAirFanOperatingModeSchedule();

/** Sets the Heating Coil. If the "Supply Air Flow Rate Method During Heating Operation" was "None", switch to "SupplyAirFlowRate"
* and autosize the "Supply Air Flow Rate During Heating Operation" field */
bool setHeatingCoil(const HVACComponent& heatingCoil);

/** This will switch the "Supply Air Flow Rate Method During Heating Operation" to "None" and clear all heating flow fields
* If the Unitary is left with no coils, the "Supply Air Flow Rate Method When No Heating Or Cooling" is also set to None
* and all NoCoolHeat flow fields are reset */
void resetHeatingCoil();

bool setDXHeatingCoilSizingRatio(double dXHeatingCoilSizingRatio);

void resetDXHeatingCoilSizingRatio();

/** Sets the Cooling Coil. If the "Supply Air Flow Rate Method During Cooling Operation" was "None", switch to "SupplyAirFlowRate"
* and autosize the "Supply Air Flow Rate During Cooling Operation" field */
bool setCoolingCoil(const HVACComponent& coolingCoil);

/** This will switch the "Supply Air Flow Rate Method During Cooling Operation" to "None" and clear all cooling flow fields
* If the Unitary is left with no coils, the "Supply Air Flow Rate Method When No Heating Or Cooling" is also set to None
* and all NoCoolHeat flow fields are reset */
void resetCoolingCoil();

bool setUseDOASDXCoolingCoil(bool useDOASDXCoolingCoil);
Expand All @@ -276,71 +286,93 @@ namespace model {

void resetSupplementalHeatingCoil();

OS_DEPRECATED(3, 7, 0) bool setSupplyAirFlowRateMethodDuringCoolingOperation(const std::string& supplyAirFlowRateMethodDuringCoolingOperation);
OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRateMethodDuringCoolingOperation();
// During Cooling

/** Sets the field and switches "Supply Air Flow Rate Method During Cooling Operation" (coolingSAFMethod) to "SupplyAirFlowRate" */
bool setSupplyAirFlowRateDuringCoolingOperation(double supplyAirFlowRateDuringCoolingOperation);
OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRateDuringCoolingOperation();
/** Sets the field and switches the coolingSAFMethod to "SupplyAirFlowRate" */
void autosizeSupplyAirFlowRateDuringCoolingOperation();

/** Sets the field and switches the coolingSAFMethod to "FlowPerFloorArea" */
bool setSupplyAirFlowRatePerFloorAreaDuringCoolingOperation(double supplyAirFlowRatePerFloorAreaDuringCoolingOperation);
OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRatePerFloorAreaDuringCoolingOperation();

/** Sets the field and switches the coolingSAFMethod to "FractionOfAutosizedCoolingValue" */
bool setFractionofAutosizedDesignCoolingSupplyAirFlowRate(double fractionofAutosizedDesignCoolingSupplyAirFlowRate);
OS_DEPRECATED(3, 7, 0) void resetFractionofAutosizedDesignCoolingSupplyAirFlowRate();

/** Sets the field and switches the coolingSAFMethod to "FlowPerCoolingCapacity" */
bool setDesignSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperation(double designSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperation);

OS_DEPRECATED(3, 7, 0) bool setSupplyAirFlowRateMethodDuringCoolingOperation(const std::string& supplyAirFlowRateMethodDuringCoolingOperation);
OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRateMethodDuringCoolingOperation();

OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRateDuringCoolingOperation();
OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRatePerFloorAreaDuringCoolingOperation();
OS_DEPRECATED(3, 7, 0) void resetFractionofAutosizedDesignCoolingSupplyAirFlowRate();
OS_DEPRECATED(3, 7, 0) void resetDesignSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperation();

OS_DEPRECATED(3, 7, 0) bool setSupplyAirFlowRateMethodDuringHeatingOperation(const std::string& supplyAirFlowRateMethodDuringHeatingOperation);
OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRateMethodDuringHeatingOperation();
// During Heating

/** Sets the field and switches "Supply Air Flow Rate Method During Heating Operation" (heatingSAFMethod) to "SupplyAirFlowRate" */
bool setSupplyAirFlowRateDuringHeatingOperation(double supplyAirFlowRateDuringHeatingOperation);
OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRateDuringHeatingOperation();
/** Sets the field and switches the heatingSAFMethod to "SupplyAirFlowRate" */
void autosizeSupplyAirFlowRateDuringHeatingOperation();

/** Sets the field and switches the heatingSAFMethod to "FlowPerFloorArea" */
bool setSupplyAirFlowRatePerFloorAreaduringHeatingOperation(double supplyAirFlowRatePerFloorAreaduringHeatingOperation);
OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRatePerFloorAreaduringHeatingOperation();

/** Sets the field and switches the heatingSAFMethod to "FractionOfAutosizedHeatingValue" */
bool setFractionofAutosizedDesignHeatingSupplyAirFlowRate(double fractionofAutosizedDesignHeatingSupplyAirFlowRate);
OS_DEPRECATED(3, 7, 0) void resetFractionofAutosizedDesignHeatingSupplyAirFlowRate();

/** Sets the field and switches the heatingSAFMethod to "FlowPerHeatingCapacity" */
bool setDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation(double designSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation);

OS_DEPRECATED(3, 7, 0) bool setSupplyAirFlowRateMethodDuringHeatingOperation(const std::string& supplyAirFlowRateMethodDuringHeatingOperation);
OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRateMethodDuringHeatingOperation();

OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRateDuringHeatingOperation();
OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRatePerFloorAreaduringHeatingOperation();
OS_DEPRECATED(3, 7, 0) void resetFractionofAutosizedDesignHeatingSupplyAirFlowRate();
OS_DEPRECATED(3, 7, 0) void resetDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation();

bool setSupplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired(const std::string& supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired);
// When no Heating or Cooling is Required

// Sets the "Supply Air Flow Rate Method When No Cooling or Heating is Required" (noCoolHeatSAFMethod) to "None" and clears the NoCoolHeat flow rate fields
void resetSupplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired();

/** Sets the field and switches the noCoolHeatSAFMethod) to "SupplyAirFlowRate" */
bool setSupplyAirFlowRateWhenNoCoolingorHeatingisRequired(double supplyAirFlowRateWhenNoCoolingorHeatingisRequired);

void resetSupplyAirFlowRateWhenNoCoolingorHeatingisRequired();

/** Sets the field and switches the noCoolHeatSAFMethod) to "SupplyAirFlowRate" */
void autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisRequired();

/** Sets the field and switches the noCoolHeatSAFMethod) to "FlowPerFloorArea" */
bool setSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired(double supplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired);

void resetSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired();

/** Sets the field and switches the noCoolHeatSAFMethod) to "FractionOfAutosizedCoolingValue" */
bool setFractionofAutosizedDesignCoolingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired(
double fractionofAutosizedDesignCoolingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired);

void resetFractionofAutosizedDesignCoolingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired();

/** Sets the field and switches the noCoolHeatSAFMethod) to "FractionOfAutosizedHeatingValue" */
bool setFractionofAutosizedDesignHeatingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired(
double fractionofAutosizedDesignHeatingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired);

void resetFractionofAutosizedDesignHeatingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired();

/** Sets the field and switches the noCoolHeatSAFMethod) to "FlowPerCoolingCapacity" */
bool setDesignSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperationWhenNoCoolingorHeatingisRequired(
double designSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperationWhenNoCoolingorHeatingisRequired);

void resetDesignSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperationWhenNoCoolingorHeatingisRequired();

/** Sets the field and switches the noCoolHeatSAFMethod) to "FlowPerHeatingCapacity" */
bool setDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperationWhenNoCoolingorHeatingisRequired(
double designSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperationWhenNoCoolingorHeatingisRequired);

void resetDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperationWhenNoCoolingorHeatingisRequired();
OS_DEPRECATED(3, 7, 0) bool setSupplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired(const std::string& noCoolHeatMethod);

OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRateWhenNoCoolingorHeatingisRequired();
OS_DEPRECATED(3, 7, 0) void resetSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired();
OS_DEPRECATED(3, 7, 0) void resetFractionofAutosizedDesignCoolingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired();
OS_DEPRECATED(3, 7, 0) void resetFractionofAutosizedDesignHeatingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired();
OS_DEPRECATED(3, 7, 0) void resetDesignSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperationWhenNoCoolingorHeatingisRequired();
OS_DEPRECATED(3, 7, 0) void resetDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperationWhenNoCoolingorHeatingisRequired();

// End SAF methods

bool setMaximumSupplyAirTemperature(double maximumSupplyAirTemperature);

Expand Down
32 changes: 15 additions & 17 deletions src/model/AirLoopHVACUnitarySystem_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ namespace model {

boost::optional<double> designSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation() const;

boost::optional<std::string> supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired() const;
std::string supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired() const;

boost::optional<double> supplyAirFlowRateWhenNoCoolingorHeatingisRequired() const;

Expand Down Expand Up @@ -222,7 +222,7 @@ namespace model {

void resetControlType();

bool setControllingZoneorThermostatLocation(const boost::optional<ThermalZone>& thermalZone);
bool setControllingZoneorThermostatLocation(const ThermalZone& thermalZone);

void resetControllingZoneorThermostatLocation();

Expand All @@ -234,11 +234,11 @@ namespace model {

void resetAvailabilitySchedule();

bool setSupplyFan(const boost::optional<HVACComponent>& supplyFan);
bool setSupplyFan(const HVACComponent& supplyFan);

void resetSupplyFan();

bool setFanPlacement(boost::optional<std::string> fanPlacement);
bool setFanPlacement(const std::string& fanPlacement);

void resetFanPlacement();

Expand Down Expand Up @@ -272,7 +272,7 @@ namespace model {

void resetLatentLoadControl();

bool setSupplementalHeatingCoil(const boost::optional<HVACComponent>& supplementalHeatingCoil);
bool setSupplementalHeatingCoil(const HVACComponent& supplementalHeatingCoil);

void resetSupplementalHeatingCoil();

Expand Down Expand Up @@ -318,43 +318,41 @@ namespace model {

void resetDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation();

bool setSupplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired(
boost::optional<std::string> supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired);
bool setSupplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired(const std::string& supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired);

void resetSupplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired();

bool setSupplyAirFlowRateWhenNoCoolingorHeatingisRequired(boost::optional<double> supplyAirFlowRateWhenNoCoolingorHeatingisRequired);
bool setSupplyAirFlowRateWhenNoCoolingorHeatingisRequired(double supplyAirFlowRateWhenNoCoolingorHeatingisRequired);

void resetSupplyAirFlowRateWhenNoCoolingorHeatingisRequired();

void autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisRequired();

bool setSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired(
boost::optional<double> supplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired);
bool setSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired(double supplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired);

void resetSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired();

bool setFractionofAutosizedDesignCoolingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired(
boost::optional<double> fractionofAutosizedDesignCoolingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired);
double fractionofAutosizedDesignCoolingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired);

void resetFractionofAutosizedDesignCoolingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired();

bool setFractionofAutosizedDesignHeatingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired(
boost::optional<double> fractionofAutosizedDesignHeatingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired);
double fractionofAutosizedDesignHeatingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired);

void resetFractionofAutosizedDesignHeatingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired();

bool setDesignSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperationWhenNoCoolingorHeatingisRequired(
boost::optional<double> designSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperationWhenNoCoolingorHeatingisRequired);
double designSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperationWhenNoCoolingorHeatingisRequired);

void resetDesignSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperationWhenNoCoolingorHeatingisRequired();

bool setDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperationWhenNoCoolingorHeatingisRequired(
boost::optional<double> designSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperationWhenNoCoolingorHeatingisRequired);
double designSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperationWhenNoCoolingorHeatingisRequired);

void resetDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperationWhenNoCoolingorHeatingisRequired();

bool setMaximumSupplyAirTemperature(boost::optional<double> maximumSupplyAirTemperature);
bool setMaximumSupplyAirTemperature(double maximumSupplyAirTemperature);

void resetMaximumSupplyAirTemperature();

Expand All @@ -364,7 +362,7 @@ namespace model {

void resetMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation();

bool setOutdoorDryBulbTemperatureSensorNodeName(boost::optional<std::string> outdoorDryBulbTemperatureSensorNodeName);
bool setOutdoorDryBulbTemperatureSensorNodeName(const std::string& outdoorDryBulbTemperatureSensorNodeName);

void resetOutdoorDryBulbTemperatureSensorNodeName();

Expand Down Expand Up @@ -400,7 +398,7 @@ namespace model {

// void resetMaximumTemperatureforHeatRecovery();

bool setDesignSpecificationMultispeedObject(const boost::optional<UnitarySystemPerformanceMultispeed>& unitarySystemPerformace);
bool setDesignSpecificationMultispeedObject(const UnitarySystemPerformanceMultispeed& unitarySystemPerformace);

void resetDesignSpecificationMultispeedObject();

Expand Down
Loading

0 comments on commit e31381d

Please sign in to comment.