Skip to content
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

AirLoopHVACUnitarySystem FT fixes #4864

Merged
merged 10 commits into from
Jun 5, 2023
Merged

Conversation

joseph-robertson
Copy link
Collaborator

Pull request overview

Pull Request Author

  • Model API Changes / Additions
  • Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
  • Model API methods are tested (in src/model/test)
  • EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
  • If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
  • If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes
  • If methods have been deprecated, update rest of code to use the new methods

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified

@joseph-robertson joseph-robertson added component - HVAC component - IDF Translation Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labels Apr 19, 2023
@joseph-robertson joseph-robertson self-assigned this Apr 19, 2023
Copy link
Collaborator Author

@joseph-robertson joseph-robertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are certainly some obvious bugs in the FT, but there are other issues that are less obvious whether they are intentional or not. Definitely need to run this through OS-resources.

@@ -478,13 +482,12 @@ namespace energyplus {
// If it doesn't have one hard set, we check if there's at least one coil that should have speeds
} else if ((coolingCoil
&& ((coolingCoil->iddObjectType() == model::CoilCoolingDXMultiSpeed::iddObjectType())
|| (coolingCoil->iddObjectType() == model::CoilCoolingDXMultiSpeed::iddObjectType())
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repeated CoilCoolingDXMultiSpeed is likely supposed to be CoilCoolingDXVariableSpeed.

|| (coolingCoil->iddObjectType() == model::CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit::iddObjectType())))
|| (heatingCoil
&& ((heatingCoil->iddObjectType() == model::CoilHeatingDXMultiSpeed::iddObjectType())
|| (heatingCoil->iddObjectType() == model::CoilHeatingDXVariableSpeed::iddObjectType())
|| (heatingCoil->iddObjectType() == model::CoilHeatingGasMultiStage::iddObjectType())
|| (heatingCoil->iddObjectType() == model::CoilHeatingDXVariableSpeed::iddObjectType())
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is repeated.

Comment on lines -547 to -551
_unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, coolingStages.size());
int stages = coolingStages.size();
if (stages > maxStages) {
maxStages = stages;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This stages stuff right in here is super confusing, so I just simplified by making it look like the other blocks.

@@ -582,6 +589,14 @@ namespace energyplus {
} else {
extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, "Autosize");
}
} else if (static_cast<unsigned>(i) < varHeatingStages.size()) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add support for missing CoilHeatingDXVariableSpeedSpeedData.

@@ -591,6 +606,14 @@ namespace energyplus {
} else {
extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, "Autosize");
}
} else if (static_cast<unsigned>(i) < waterToAirHeatingStages.size()) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add support for missing CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.

@@ -604,6 +627,22 @@ namespace energyplus {
} else {
extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::CoolingSpeedSupplyAirFlowRatio, "Autosize");
}
} else if (static_cast<unsigned>(i) < varCoolingStages.size()) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add support for missing CoilCoolingDXVariableSpeedSpeedData.

} else {
extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::CoolingSpeedSupplyAirFlowRatio, "Autosize");
}
} else if (static_cast<unsigned>(i) < waterToAirCoolingStages.size()) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add support for missing CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.

@@ -711,3 +717,171 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_AirLoopHVACUnitarySystem_CoilHeating
EXPECT_EQ(1u, workspace.getObjectsByType(IddObjectType::AirLoopHVAC_UnitarySystem).size());
EXPECT_EQ(2u, workspace.getObjectsByType(IddObjectType::Coil_Heating_Electric_MultiStage).size());
}

TEST_F(EnergyPlusFixture, ForwardTranslator_AirLoopHVACUnitarySystem_VSCoils) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-create the scenario brought up in the issue - one in which you'd expect the supply air flow ratios to be "Autosize", and one in which you'd expect them to be doubles.

@joseph-robertson joseph-robertson marked this pull request as ready for review April 20, 2023 15:21
@jmarrec jmarrec force-pushed the airloop-hvac-unitary-sys-ft branch from cbb6c66 to 4cae198 Compare May 31, 2023 09:24
@jmarrec
Copy link
Collaborator

jmarrec commented May 31, 2023

There are certainly some obvious bugs in the FT, but there are other issues that are less obvious whether they are intentional or not. Definitely need to run this through OS-resources.

have you run the reg tests?

@joseph-robertson
Copy link
Collaborator Author

joseph-robertson commented May 31, 2023

@joseph-robertson
Copy link
Collaborator Author

The tests in model_tests.rb all appear to have passed.

@jmarrec jmarrec merged commit 76940af into develop Jun 5, 2023
2 checks passed
@jmarrec jmarrec deleted the airloop-hvac-unitary-sys-ft branch June 5, 2023 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component - HVAC component - IDF Translation Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge.
Projects
None yet
3 participants