Skip to content

Commit

Permalink
Add thermosiphon to Chiller:Electric
Browse files Browse the repository at this point in the history
  • Loading branch information
rraustad committed Jul 10, 2024
1 parent 1f6dfc7 commit 891cb9e
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 17 deletions.
20 changes: 17 additions & 3 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -73968,11 +73968,24 @@ Chiller:Electric,
\note Using this triggers a model more suited to series bundle and chillers with higher temperature heat recovery
\note If this field is not used, the bundles are modeled as being in parallel
\type node
A13; \field End-Use Subcategory
A13, \field End-Use Subcategory
\note Any text may be used here to categorize the end-uses in the ABUPS End Uses by Subcategory table.
\type alpha
\retaincase
\default General
A14, \field Thermosiphon Temperature Difference Curve Name
\type object-list
\object-list UniVariateFunctions
\note quadratic curve = a + b * (Tevap, out - Tcond, in) is typical, other univariate curves may be used
\note Tevap, out = evaporator outlet temperature
\note Tcond, in = condenser inlet temperature
\note If this field is blank the thermosiphon model is disabled.
N26; \field Thermosiphon Minimum Temperature Difference
\type real
\minimum 0.0
\default 0.0
\note Thermosiphon model is disabled below this minimum limit and
\note when the load is greater than calculated using the prevoius field.

Chiller:Absorption:Indirect,
\min-fields 17
Expand Down Expand Up @@ -75307,8 +75320,9 @@ HeatPump:PlantLoop:EIR:Cooling,
A17, \field Thermosiphon Temperature Difference Curve Name
\type object-list
\object-list UniVariateFunctions
\note quadratic curve = a + b * dT is typical, other univariate curves may be used
\note dT = evaporator outlet temperature minus condenser inlet temperature
\note quadratic curve = a + b * (Tevap, out - Tcond, in) is typical, other univariate curves may be used
\note Tevap, out = evaporator outlet temperature
\note Tcond, in = condenser inlet temperature
\note If this field is blank the thermosiphon model is disabled.
N13; \field Thermosiphon Minimum Temperature Difference
\type real
Expand Down
59 changes: 48 additions & 11 deletions src/EnergyPlus/PlantChillers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -595,19 +595,24 @@ namespace PlantChillers {
if (!state.dataIPShortCut->lAlphaFieldBlanks(10)) {
thisChiller.BasinHeaterSchedulePtr = ScheduleManager::GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(10));
if (thisChiller.BasinHeaterSchedulePtr == 0) {
ShowWarningError(state,
format("{}, \"{}\" TRIM(state.dataIPShortCut->cAlphaFieldNames(10)) \"{}\" was not found. Basin heater "
"operation will not be modeled and the simulation continues",
state.dataIPShortCut->cCurrentModuleObject,
thisChiller.Name,
state.dataIPShortCut->cAlphaArgs(10)));
ShowWarningError(
state,
format("{}, \"{}\" {} \"{}\" was not found. Basin heater operation will not be modeled and the simulation continues",
state.dataIPShortCut->cCurrentModuleObject,
thisChiller.Name,
state.dataIPShortCut->cAlphaFieldNames(10),
state.dataIPShortCut->cAlphaArgs(10)));
}
}
if (NumAlphas > 12) {
thisChiller.EndUseSubcategory = state.dataIPShortCut->cAlphaArgs(13);
} else {
thisChiller.EndUseSubcategory = "General";
}
if (!state.dataIPShortCut->lAlphaFieldBlanks(14)) {
thisChiller.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(14)));
}
thisChiller.thermosiphonMinTempDiff = state.dataIPShortCut->rNumericArgs(26);
}

if (ErrorsFound) {
Expand Down Expand Up @@ -705,6 +710,13 @@ namespace PlantChillers {
OutputProcessor::TimeStepType::System,
OutputProcessor::StoreType::Average,
this->Name);
SetupOutputVariable(state,
"Thermosiphon Status",
Constant::Units::None,
this->thermosiphonStatus,
OutputProcessor::TimeStepType::System,
OutputProcessor::StoreType::Average,
this->Name);

// Condenser mass flow and outlet temp are valid for water cooled
if (this->CondenserType == DataPlant::CondenserType::WaterCooled) {
Expand Down Expand Up @@ -1385,6 +1397,7 @@ namespace PlantChillers {
this->EvaporatorEnergy = 0.0;
this->QHeatRecovered = 0.0;
this->ActualCOP = 0.0;
this->thermosiphonStatus = 0;

// calculate end time of current time step
Real64 CurrentEndTime = state.dataGlobal->CurrentTime + state.dataHVACGlobal->SysTimeElapsed;
Expand Down Expand Up @@ -1574,6 +1587,7 @@ namespace PlantChillers {
} else {
OperPartLoadRat = 0.0;
}
this->CyclingRatio = OperPartLoadRat;

Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state,
state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).FluidName,
Expand All @@ -1587,13 +1601,15 @@ namespace PlantChillers {
this->PossibleSubcooling =
DataPlant::CompData::getPlantComponent(state, this->CWPlantLoc).CurOpSchemeType != DataPlant::OpScheme::CompSetPtBased;
this->QEvaporator = AvailChillerCap * OperPartLoadRat;
Real64 FRAC;
Real64 FRAC = 0.0;
if (OperPartLoadRat < this->MinPartLoadRat) {
FRAC = min(1.0, (OperPartLoadRat / this->MinPartLoadRat));
} else {
FRAC = 1.0;
}
this->Power = FracFullLoadPower * FullLoadPowerRat * AvailChillerCap / this->COP * FRAC;
if (this->thermosiphonDisabled(state)) {
this->Power = FracFullLoadPower * FullLoadPowerRat * AvailChillerCap / this->COP * FRAC;
}

// Either set the flow to the Constant value or calculate the flow for the variable volume
if ((this->FlowMode == DataPlant::FlowMode::Constant) || (this->FlowMode == DataPlant::FlowMode::NotModulated)) {
Expand Down Expand Up @@ -1784,16 +1800,17 @@ namespace PlantChillers {
this->EvapOutletTemp = state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp;
}
}

Real64 FRAC;
Real64 FRAC = 0.0;
if (OperPartLoadRat < this->MinPartLoadRat) {
FRAC = min(1.0, (OperPartLoadRat / this->MinPartLoadRat));
} else {
FRAC = 1.0;
}

// Chiller is false loading below PLR = minimum unloading ratio, find PLR used for energy calculation
this->Power = FracFullLoadPower * FullLoadPowerRat * AvailChillerCap / this->COP * FRAC;
if (this->thermosiphonDisabled(state)) {
this->Power = FracFullLoadPower * FullLoadPowerRat * AvailChillerCap / this->COP * FRAC;
}

if (this->EvapMassFlowRate == 0.0) {
this->QEvaporator = 0.0;
Expand Down Expand Up @@ -2120,6 +2137,26 @@ namespace PlantChillers {
this->MyFlag = false;
}
}
bool ElectricChillerSpecs::thermosiphonDisabled(EnergyPlusData &state)
{
if (this->thermosiphonTempCurveIndex > 0) {
this->thermosiphonStatus = 0;
Real64 dT = this->EvapOutletTemp - this->CondInletTemp;
if (dT < this->thermosiphonMinTempDiff) {
return true;
}
Real64 thermosiphonCapFrac = Curve::CurveValue(state, this->thermosiphonTempCurveIndex, dT);
Real64 capFrac = this->CyclingRatio;
if (thermosiphonCapFrac >= capFrac) {
this->thermosiphonStatus = 1;
this->Power = 0.0;
return false;
}
return true;
} else {
return true;
}
}

EngineDrivenChillerSpecs *EngineDrivenChillerSpecs::factory(EnergyPlusData &state, std::string const &chillerName)
{
Expand Down
12 changes: 10 additions & 2 deletions src/EnergyPlus/PlantChillers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ namespace PlantChillers {
Real64 HeatRecInletTemp; // (HeatRecOutletTemp is in base already)
Real64 HeatRecMdot;
Real64 ChillerCondAvgTemp; // the effective condenser temperature for chiller performance [C]
Real64 CyclingRatio = 0.0;

// thermosiphon model
int thermosiphonTempCurveIndex = 0;
Real64 thermosiphonMinTempDiff = 0.0;
int thermosiphonStatus = 0;

// Default Constructor
ElectricChillerSpecs()
Expand Down Expand Up @@ -260,12 +266,14 @@ namespace PlantChillers {
);

void oneTimeInit(EnergyPlusData &state) override;

bool thermosiphonDisabled(EnergyPlusData &state);
};

struct EngineDrivenChillerSpecs : BaseChillerSpecs
{
// temperature at the chiller evaporator side outlet
Constant::eFuel FuelType;
Constant::eFuel FuelType = Constant::eFuel::Invalid;
Array1D<Real64> CapRatCoef; // (EngineDriven RCAVC() ) coeff of cap ratio poly fit
Array1D<Real64> PowerRatCoef; // (EngineDriven ADJEC() ) coeff of power rat poly fit
Array1D<Real64> FullLoadCoef; // (EngineDriven RPWRC() ) coeff of full load poly. fit
Expand Down Expand Up @@ -363,7 +371,7 @@ namespace PlantChillers {
struct GTChillerSpecs : BaseChillerSpecs
{
// Members
Constant::eFuel FuelType;
Constant::eFuel FuelType = Constant::eFuel::Invalid;
Array1D<Real64> CapRatCoef; // (GT RCAVC() ) coeff of cap ratio poly fit
Array1D<Real64> PowerRatCoef; // (GT ADJEC() ) coeff of power rat poly fit
Array1D<Real64> FullLoadCoef; // (GT RPWRC() ) coeff of full load poly. fit
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/PlantLoopHeatPumpEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2234,7 +2234,7 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state)
OutputProcessor::EndUseCat::Cooling,
"Heat Pump");
SetupOutputVariable(state,
"Heat Pump Thermosiphon Status",
"Thermosiphon Status",
Constant::Units::None,
this->thermosiphonStatus,
OutputProcessor::TimeStepType::System,
Expand Down

5 comments on commit 891cb9e

@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: Tests Failed (3223 of 3636 tests passed, 11 test warnings)

Messages:\n

  • 411 tests had: Table big diffs.
  • 6 tests had: ESO big diffs.
  • 216 tests had: AUD diffs.
  • 1 test had: MTD diffs.
  • 213 tests had: RDD diffs.
  • 2 tests had: Table small diffs.
  • 1 test had: ERR diffs.
  • 1 test had: Table string diffs.

Failures:\n

regression Test Summary

  • Passed: 378
  • Failed: 413

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

NFP-Refrigerant-Migration-Decarbonization (rraustad) - Win64-Windows-10-VisualStudio-16: OK (2844 of 2844 tests passed, 0 test warnings)

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: Tests Failed (3264 of 3677 tests passed, 11 test warnings)

Messages:\n

  • 6 tests had: ESO big diffs.
  • 216 tests had: AUD diffs.
  • 1 test had: MTD diffs.
  • 411 tests had: Table big diffs.
  • 213 tests had: RDD diffs.
  • 2 tests had: Table small diffs.
  • 1 test had: ERR diffs.
  • 1 test had: Table string diffs.

Failures:\n

regression Test Summary

  • Passed: 398
  • Failed: 413

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 (2052 of 2052 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 (795 of 795 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.