-
Notifications
You must be signed in to change notification settings - Fork 478
#11567: ZoneHVAC:HybridUnitaryHVAC - Add choice to optimize Supply Temperature #11581
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
base: develop
Are you sure you want to change the base?
Changes from all commits
3f9458a
e82f05f
3aefb26
c4b3c02
677a1c3
19bdac9
56b8e4f
8155a64
03cc514
a20a432
e012f84
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 |
|---|---|---|
|
|
@@ -37641,14 +37641,15 @@ ZoneHVAC:HybridUnitaryHVAC, | |
| \note Select the fuel type associated with field: "System Third Fuel Consumption Lookup Table" in each mode. | ||
| \note If this field is blank, default third fuel type = None. | ||
| \default None | ||
| A18, \field Objective Function to Minimize | ||
| A18, \field Objective Function to Optimize | ||
|
Collaborator
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. I'm pretty sure we don't need a transition rule on this since you're just renaming and not changing the current/default values. |
||
| \type choice | ||
| \key Electricity Use | ||
| \key Second Fuel Use | ||
| \key Third Fuel Use | ||
| \key Water Use | ||
| \note In each time step, controlled variables will be chosen to minimize the selection in this field, subject to constraints. | ||
| \note If this field is blank, the objective function will minimize electricity use. | ||
| \key Supply Temperature | ||
| \note In each time step, controlled variables will be chosen to optimize the selection in this field, subject to constraints. Electricity Use, Second Fuel Use, Third Fuel Use, and Water Use will be minimized. Supply Temperature will be minimized when cooling is required, maximized when heating is required, and electricity use will be minimized when only ventilation is required. | ||
| \note If this field is blank, the default objective function to optimize is Electricity Use. | ||
| \default Electricity Use | ||
| A19, \field Design Specification Outdoor Air Object Name | ||
| \type object-list | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1194,6 +1194,8 @@ namespace HybridEvapCoolingModel { | |
| bool DidWeMeetHumidification = false; | ||
| bool DidWePartlyMeetLoad = false; | ||
| Real64 OptimalSetting_RunFractionTotalFuel = IMPLAUSIBLE_POWER; | ||
| Real64 OptimalSetting_RunFractionSupplyTemperature = | ||
| CoolingRequested ? std::numeric_limits<Real64>::max() : std::numeric_limits<Real64>::lowest(); | ||
|
Collaborator
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. There used to be comments here. I guess that's because you submitted this from a fork? NBD. I see you fixed the issue. |
||
| Real64 Tma; | ||
| Real64 Wma; | ||
| Real64 Hsa; | ||
|
|
@@ -1454,37 +1456,60 @@ namespace HybridEvapCoolingModel { | |
|
|
||
| // Calculate partload fraction required to meet all requirements | ||
| // Fraction can be above 1 meaning its not able to do it completely in a time step | ||
| Real64 PartRuntimeFraction = CalculatePartRuntimeFraction(MinOA_Msa, | ||
| thisSetting.Supply_Air_Ventilation_Volume * state.dataEnvrn->StdRhoAir, | ||
| StepIns.RequestedCoolingLoad, | ||
| StepIns.RequestedHeatingLoad, | ||
| SensibleRoomORZone, | ||
| StepIns.ZoneDehumidificationLoad, | ||
| StepIns.ZoneMoistureLoad, | ||
| latentRoomORZone); | ||
|
|
||
| Real64 RunFractionTotalFuel; | ||
| thisSetting.Runtime_Fraction = CalculatePartRuntimeFraction(MinOA_Msa, | ||
| thisSetting.Supply_Air_Ventilation_Volume * state.dataEnvrn->StdRhoAir, | ||
| StepIns.RequestedCoolingLoad, | ||
| StepIns.RequestedHeatingLoad, | ||
| SensibleRoomORZone, | ||
| StepIns.ZoneDehumidificationLoad, | ||
| StepIns.ZoneMoistureLoad, | ||
| latentRoomORZone); | ||
|
|
||
| Real64 RunFractionTotalFuel(0); | ||
| Real64 RunFractionSupplyTemperature(0); | ||
| switch (ObjectiveFunction) { | ||
| default: | ||
| case ObjectiveFunctionType::ElectricityUse: | ||
| RunFractionTotalFuel = thisSetting.ElectricalPower * PartRuntimeFraction; | ||
| RunFractionTotalFuel = thisSetting.ElectricalPower * thisSetting.Runtime_Fraction; | ||
| break; | ||
| case ObjectiveFunctionType::SecondFuelUse: | ||
| RunFractionTotalFuel = thisSetting.SecondaryFuelConsumptionRate * PartRuntimeFraction; | ||
| RunFractionTotalFuel = thisSetting.SecondaryFuelConsumptionRate * thisSetting.Runtime_Fraction; | ||
| break; | ||
| case ObjectiveFunctionType::ThirdFuelUse: | ||
| RunFractionTotalFuel = thisSetting.ThirdFuelConsumptionRate * PartRuntimeFraction; | ||
| RunFractionTotalFuel = thisSetting.ThirdFuelConsumptionRate * thisSetting.Runtime_Fraction; | ||
| break; | ||
| case ObjectiveFunctionType::WaterUse: | ||
| RunFractionTotalFuel = thisSetting.WaterConsumptionRate * PartRuntimeFraction; | ||
| RunFractionTotalFuel = thisSetting.WaterConsumptionRate * thisSetting.Runtime_Fraction; | ||
| break; | ||
| case ObjectiveFunctionType::SupplyTemperature: | ||
| RunFractionSupplyTemperature = thisSetting.SupplyAirTemperature * thisSetting.Runtime_Fraction; | ||
|
Comment on lines
1198
to
+1485
Collaborator
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. I'm trying to understand how the works. Is this supposed to be multiplied by the RTF here? It looks to me like the supply air temperature for |
||
| break; | ||
| } | ||
| thisSetting.Runtime_Fraction = PartRuntimeFraction; // | ||
|
|
||
| if (Conditioning_load_met && Humidification_load_met) { | ||
| // store best performing mode | ||
| if (RunFractionTotalFuel < OptimalSetting_RunFractionTotalFuel) { | ||
| bool store_best_performing_mode = false; | ||
|
|
||
| if (ObjectiveFunction == ObjectiveFunctionType::SupplyTemperature) { | ||
| if (CoolingRequested && RunFractionSupplyTemperature < OptimalSetting_RunFractionSupplyTemperature) { | ||
| store_best_performing_mode = true; | ||
| OptimalSetting_RunFractionSupplyTemperature = RunFractionSupplyTemperature; | ||
| } | ||
| if (HeatingRequested && RunFractionSupplyTemperature > OptimalSetting_RunFractionSupplyTemperature) { | ||
| store_best_performing_mode = true; | ||
| OptimalSetting_RunFractionSupplyTemperature = RunFractionSupplyTemperature; | ||
| } | ||
| // fall back to ElectricityUse since ventilation-only is just fan operation | ||
| if (!CoolingRequested && !HeatingRequested && VentilationRequested && | ||
| RunFractionTotalFuel < OptimalSetting_RunFractionTotalFuel) { | ||
| store_best_performing_mode = true; | ||
| OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel; | ||
| } | ||
| } else if (RunFractionTotalFuel < OptimalSetting_RunFractionTotalFuel) { | ||
| store_best_performing_mode = true; | ||
| OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel; | ||
| } | ||
|
|
||
| if (store_best_performing_mode) { | ||
| OptimalSetting = thisSetting; | ||
| DidWeMeetLoad = true; | ||
| DidWeMeetHumidification = true; | ||
|
|
@@ -1515,8 +1540,19 @@ namespace HybridEvapCoolingModel { | |
| PreviousMaxiumConditioningOutput = SensibleRoomORZone; | ||
| } | ||
| } | ||
|
|
||
| if (store_best_attempt) { | ||
| OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel; | ||
| if (ObjectiveFunction == ObjectiveFunctionType::SupplyTemperature) { | ||
| if (CoolingRequested || HeatingRequested) { | ||
| OptimalSetting_RunFractionSupplyTemperature = RunFractionSupplyTemperature; | ||
| } | ||
| // fall back to ElectricityUse since ventilation-only is just fan operation | ||
| if (!CoolingRequested && !HeatingRequested && VentilationRequested) { | ||
| OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel; | ||
| } | ||
| } else { | ||
| OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel; | ||
| } | ||
| OptimalSetting = thisSetting; | ||
| DidWePartlyMeetLoad = true; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
I see you are proposing to change this from "minimize" to "optimize," which I presume is due to adding this new option which you probably don't want to "minimize" in the true sense of the word. But now, we have the ambiguity of what you mean by "optimize." Can you add some descriptions of what the expected behavior is for each of the options now?
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.
Correct, the new option will either minimize or maximize the supply temperature (depending on cooling or heating). Everything else will still be minimized. I'll update the .tex and .idd to clarify this.