Skip to content

Commit

Permalink
fix Cp calculation to use sourceside temp, add MyCp output var for de…
Browse files Browse the repository at this point in the history
…bugging purpose
  • Loading branch information
dareumnam committed Aug 4, 2023
1 parent 62ae824 commit 24963b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/EnergyPlus/PlantLoopHeatPumpEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,13 @@ void EIRPlantLoopHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad)
if (this->waterSource) {
CpSrc = FluidProperties::GetSpecificHeatGlycol(state,
thisSourcePlantLoop.FluidName,
state.dataLoopNodes->Node(this->loadSideNodes.inlet).Temp,
state.dataLoopNodes->Node(this->sourceSideNodes.inlet).Temp,
thisSourcePlantLoop.FluidIndex,
"PLHPEIR::simulate()");
} else if (this->airSource) {
CpSrc = Psychrometrics::PsyCpAirFnW(state.dataEnvrn->OutHumRat);
}
this->sourceSideCp = CpSrc;
Real64 const sourceMCp = this->sourceSideMassFlowRate * CpSrc;
this->sourceSideOutletTemp = this->calcSourceOutletTemp(this->sourceSideInletTemp, this->sourceSideHeatTransfer / sourceMCp);
}
Expand Down Expand Up @@ -1225,6 +1226,13 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state)
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
this->name);
SetupOutputVariable(state,
"MyCp",
OutputProcessor::Unit::J_kgK,
this->sourceSideCp,
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
this->name);

// find this component on the plant
bool thisErrFlag = false;
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/PlantLoopHeatPumpEIR.hh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ namespace EIRPlantLoopHeatPumps {
Real64 sourceSideEnergy = 0.0;
Real64 powerEnergy = 0.0;
bool running = false;
Real64 sourceSideCp = 0.0;

// topology variables
PlantLocation loadSidePlantLoc;
Expand Down

6 comments on commit 24963b4

@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.

PLHPReportingIssue_test (dareumnam) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3484 of 3487 tests passed, 1 test warnings)

Messages:\n

  • 2 tests had: AUD diffs.
  • 2 tests had: RDD diffs.
  • 1 test had: ESO big diffs.

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1439
  • SEGFAULT: 2

regression Test Summary

  • Passed: 791
  • Failed: 1

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.

PLHPReportingIssue_test (dareumnam) - x86_64-MacOS-10.17-clang-13.0.0: OK (3443 of 3446 tests passed, 1 test warnings)

Messages:\n

  • 2 tests had: AUD diffs.
  • 2 tests had: RDD diffs.
  • 1 test had: ESO big diffs.

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1439
  • Failed: 2

regression Test Summary

  • Passed: 771
  • Failed: 1

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.

PLHPReportingIssue_test (dareumnam) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (775 of 776 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 775
  • Failed: 1

Build Badge Test Badge Coverage 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.

PLHPReportingIssue_test (dareumnam) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1896 of 1900 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1437
  • Subprocess aborted: 4

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

PLHPReportingIssue_test (dareumnam) - Win64-Windows-10-VisualStudio-16: OK (2671 of 2673 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1437
  • Failed: 2

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.

PLHPReportingIssue_test (dareumnam) - x86_64-MacOS-10.17-clang-14.0.0: OK (3275 of 3446 tests passed, 602 test warnings)

Messages:\n

  • 771 tests had: AUD diffs.
  • 168 tests had: Table big diffs.
  • 190 tests had: MDD diffs.
  • 194 tests had: MTD diffs.
  • 197 tests had: RDD diffs.
  • 167 tests had: Table small diffs.
  • 1 test had: BND diffs.
  • 28 tests had: EIO diffs.
  • 18 tests had: ERR diffs.
  • 20 tests had: ESO big diffs.
  • 15 tests had: MTR big diffs.
  • 6 tests had: ESO small diffs.
  • 3 tests had: MTR small diffs.
  • 2 tests had: IDF diffs.

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1439
  • Failed: 2

regression Test Summary

  • Passed: 603
  • Failed: 169

Build Badge Test Badge

Please sign in to comment.