Skip to content

Commit

Permalink
Add severe error for invalid thermosiphon capacity fraction curve name
Browse files Browse the repository at this point in the history
  • Loading branch information
rraustad committed Jul 28, 2024
1 parent 01972c9 commit 0639662
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/EnergyPlus/ChillerElectricEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,11 @@ void GetElectricEIRChillerInput(EnergyPlusData &state)
}
if (!state.dataIPShortCut->lAlphaFieldBlanks(20)) {
thisChiller.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(20)));
if (thisChiller.thermosiphonTempCurveIndex == 0) {
ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name));
ShowContinueError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(20), state.dataIPShortCut->cAlphaArgs(20)));
ErrorsFound = true;
}
}
thisChiller.thermosiphonMinTempDiff = state.dataIPShortCut->rNumericArgs(20);
}
Expand Down
5 changes: 5 additions & 0 deletions src/EnergyPlus/ChillerReformulatedEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,11 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state)
}
if (!state.dataIPShortCut->lAlphaFieldBlanks(19)) {
thisChiller.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(19)));
if (thisChiller.thermosiphonTempCurveIndex == 0) {
ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name));
ShowContinueError(state, format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(19), state.dataIPShortCut->cAlphaArgs(19)));
ErrorsFound = true;
}
}
thisChiller.thermosiphonMinTempDiff = state.dataIPShortCut->rNumericArgs(17);
}
Expand Down
12 changes: 12 additions & 0 deletions src/EnergyPlus/PlantChillers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,12 @@ namespace PlantChillers {
}
if (!state.dataIPShortCut->lAlphaFieldBlanks(14)) {
thisChiller.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(14)));
if (thisChiller.thermosiphonTempCurveIndex == 0) {
ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name));
ShowContinueError(state,
format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14)));
ErrorsFound = true;
}
}
thisChiller.thermosiphonMinTempDiff = state.dataIPShortCut->rNumericArgs(26);
}
Expand Down Expand Up @@ -6547,6 +6553,12 @@ namespace PlantChillers {

if (!state.dataIPShortCut->lAlphaFieldBlanks(9)) {
thisChiller.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(9)));
if (thisChiller.thermosiphonTempCurveIndex == 0) {
ShowSevereError(state, format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name));
ShowContinueError(state,
format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9)));
ErrorsFound = true;
}
}
thisChiller.thermosiphonMinTempDiff = state.dataIPShortCut->rNumericArgs(8);

Expand Down
7 changes: 7 additions & 0 deletions src/EnergyPlus/PlantLoopHeatPumpEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1815,6 +1815,13 @@ void EIRPlantLoopHeatPump::processInputForEIRPLHP(EnergyPlusData &state)
if (thermosiphonTempCurveName != fields.end()) {
thisPLHP.thermosiphonTempCurveIndex =
Curve::GetCurveIndex(state, Util::makeUPPER(thermosiphonTempCurveName.value().get<std::string>()));
if (thisPLHP.thermosiphonTempCurveIndex == 0) {
ShowSevereError(state, format("{} =\"{}\"", state.dataIPShortCut->cCurrentModuleObject, thisPLHP.name));
ShowContinueError(state,
format("Invalid Thermosiphon Capacity Fraction Curve Name = {}",
thermosiphonTempCurveName.value().get<std::string>()));
errorsFound = true;
}
}
thisPLHP.thermosiphonMinTempDiff = state.dataInputProcessing->inputProcessor->getRealFieldValue(
fields, schemaProps, "thermosiphon_minimum_temperature_difference");
Expand Down

5 comments on commit 0639662

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

NFP-Refrigerant-Migration-Decarbonization (rraustad) - Win64-Windows-10-VisualStudio-16: Build Failed

Failures:\n

API Test Summary

  • Failed: 10
  • notrun: 5

ConvertInputFormat Test Summary

  • Failed: 4
  • notrun: 1

integration Test Summary

  • Passed: 2
  • Failed: 793

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

NFP-Refrigerant-Migration-Decarbonization (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3577 of 3697 tests passed, 167 test warnings)

Messages:\n

  • 287 tests had: AUD diffs.
  • 283 tests had: RDD diffs.
  • 123 tests had: Table small diffs.
  • 120 tests had: Table big diffs.
  • 1 test had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: MTD diffs.
  • 1 test had: EIO diffs.
  • 1 test had: ERR diffs.

Failures:\n

regression Test Summary

  • Passed: 692
  • Failed: 120

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

NFP-Refrigerant-Migration-Decarbonization (rraustad) - x86_64-MacOS-10.18-clang-15.0.0: OK (3536 of 3656 tests passed, 167 test warnings)

Messages:\n

  • 287 tests had: AUD diffs.
  • 283 tests had: RDD diffs.
  • 123 tests had: Table small diffs.
  • 120 tests had: Table big diffs.
  • 1 test had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: MTD diffs.
  • 1 test had: EIO diffs.
  • 1 test had: ERR diffs.

Failures:\n

regression Test Summary

  • Passed: 672
  • Failed: 120

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

NFP-Refrigerant-Migration-Decarbonization (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (2070 of 2070 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

NFP-Refrigerant-Migration-Decarbonization (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (796 of 796 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.