-
Notifications
You must be signed in to change notification settings - Fork 222
Fix AirLoopHVACUnitarySystem FT issues with UnitarySystemPerformanceMultispeed #5278
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b30c7c3
Add ft test file for UnitarySystemPerformanceMultispeed.
joseph-robertson 132f0ec
Formatting.
joseph-robertson 9c6c1e9
Clean up new test file.
joseph-robertson 40e8dd9
Missed ft in the new test.
joseph-robertson d2ffafc
Create more test scenarios in new ft test file.
joseph-robertson 1a12ffd
Use only multispeed objects.
joseph-robertson a1607fb
Check speed supply air flow ratio fields.
joseph-robertson e96e201
Set values for stage and unitary flow.
joseph-robertson 918b025
Typo.
joseph-robertson c4acaab
Try a fix.
joseph-robertson 4a3deb3
Test with 2 heating stages and 4 cooling stages + Scope test variable…
jmarrec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -456,7 +456,8 @@ namespace energyplus { | |
| boost::optional<model::CoilCoolingDXVariableSpeed> varSpeedDXCooling; | ||
| boost::optional<model::CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit> varSpeedWaterToAirCooling; | ||
|
|
||
| int maxStages = 0; | ||
| int maxHeatingStages = 0; | ||
| int maxCoolingStages = 0; | ||
|
|
||
| if (heatingCoil) { | ||
| multispeedDXHeating = heatingCoil->optionalCast<model::CoilHeatingDXMultiSpeed>(); | ||
|
|
@@ -482,36 +483,36 @@ namespace energyplus { | |
|
|
||
| if (multispeedDXHeating) { | ||
| heatingStages = multispeedDXHeating->stages(); | ||
| maxStages = heatingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxStages); | ||
| maxHeatingStages = heatingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxHeatingStages); | ||
| } else if (varSpeedDXHeating) { | ||
| varHeatingStages = varSpeedDXHeating->speeds(); | ||
| maxStages = varHeatingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxStages); | ||
| maxHeatingStages = varHeatingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxHeatingStages); | ||
| } else if (multistageGasHeating) { | ||
| gasHeatingStages = multistageGasHeating->stages(); | ||
| maxStages = gasHeatingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxStages); | ||
| maxHeatingStages = gasHeatingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxHeatingStages); | ||
| } else if (varSpeedWaterToAirHeating) { | ||
| waterToAirHeatingStages = varSpeedWaterToAirHeating->speeds(); | ||
| maxStages = waterToAirHeatingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxStages); | ||
| maxHeatingStages = waterToAirHeatingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxHeatingStages); | ||
| } else { | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, 1); | ||
| } | ||
|
|
||
| if (multispeedDXCooling) { | ||
| coolingStages = multispeedDXCooling->stages(); | ||
| maxStages = coolingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, maxStages); | ||
| maxCoolingStages = coolingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, maxCoolingStages); | ||
| } else if (varSpeedDXCooling) { | ||
| varCoolingStages = varSpeedDXCooling->speeds(); | ||
| maxStages = varCoolingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, maxStages); | ||
| maxCoolingStages = varCoolingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, maxCoolingStages); | ||
| } else if (varSpeedWaterToAirCooling) { | ||
| waterToAirCoolingStages = varSpeedWaterToAirCooling->speeds(); | ||
| maxStages = waterToAirCoolingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, maxStages); | ||
| maxCoolingStages = waterToAirCoolingStages.size(); | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, maxCoolingStages); | ||
| } else { | ||
| _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, 1); | ||
| } | ||
|
|
@@ -529,7 +530,7 @@ namespace energyplus { | |
| } | ||
| }; | ||
|
|
||
| for (int i = 0; i < maxStages; ++i) { | ||
| for (int i = 0; i < std::max(maxHeatingStages, maxCoolingStages); ++i) { | ||
| auto extensible = _unitarySystemPerformance.pushExtensibleGroup(); | ||
|
|
||
| if (static_cast<unsigned>(i) < heatingStages.size()) { | ||
|
|
@@ -566,7 +567,7 @@ namespace energyplus { | |
| } else { | ||
| extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, "Autosize"); | ||
| } | ||
| } else if (i < 2) { | ||
|
Collaborator
Author
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. Not sure the purpose of the "< 2"...? |
||
| } else { | ||
| extensible.setDouble(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, 1.0); | ||
| } | ||
|
|
||
|
|
@@ -595,7 +596,7 @@ namespace energyplus { | |
| } else { | ||
| extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::CoolingSpeedSupplyAirFlowRatio, "Autosize"); | ||
| } | ||
| } else if (i < 2) { | ||
| } else { | ||
| extensible.setDouble(UnitarySystemPerformance_MultispeedExtensibleFields::CoolingSpeedSupplyAirFlowRatio, 1.0); | ||
| } | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This was overwriting
maxStagesset by heating speeds.