Skip to content

Commit

Permalink
Merge pull request #8511 from NREL/8492_FuellCell_Test
Browse files Browse the repository at this point in the history
#8492 #8513 - Add a FuelCellElectricGenerator Unit Test and do not zero out Constant Skin Loss Rate in Generator:FuelCell:PowerModule
  • Loading branch information
dareumnam authored Mar 2, 2021
2 parents b9bfac2 + 2babab7 commit 3d14610
Show file tree
Hide file tree
Showing 4 changed files with 986 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3238,6 +3238,10 @@ \subsubsection{Outputs}\label{outputs-9-001}
HVAC,Sum, Generator Fuel Cell Model Iteration Count {[]}
\item
HVAC,Sum,Generator Root Solver Iteration Count {[]}
\item
HVAC,Average,Generator Number of Cycles {[]}
\item
HVAC,Average,Generator Power Module Skin Heat Loss Rate {[}W{]}
\end{itemize}

\paragraph{Generator Air Inlet Temperature {[}C{]}}\label{generator-air-inlet-temperature-c}
Expand Down Expand Up @@ -3412,6 +3416,16 @@ \subsubsection{Outputs}\label{outputs-9-001}

This is the flow of condensed water in kmol/s.

\paragraph{Generator Number of Cycles {[]}}\label{generator-number-of-cycles}

This is the number of start-stop cycles that the fuel cell power module has experienced so far.
It is initialized to the value of \hyperref[field-number-of-stops-at-start-of-simulation]{Number of Stops at Start of Simulation} provided in the \hyperref[generatorfuelcellpowermodule]{Generator:FuelCell:PowerModule} object.

\paragraph{Generator Power Module Skin Heat Loss Rate {[}W{]}}\label{generator-power-module-skin-heat-loss-rate-w}

This is the which is the rate of energy lost to the surroundings via the skin of the fuel cell power module.


\subsection{Generator:FuelCell:PowerModule}\label{generatorfuelcellpowermodule}

This object is used to describe the core power module subsystem of the FC. This includes the fuel cell stack, fuel reformer, and whatever ancillary devices are included inside. If the model has multiple FC generators that are of the exact same type, then only one of these objects is needed and all the \hyperref[generatorfuelcell]{Generator:FuelCell} can reference it. The model uses a number of curves to describe operating performance. Input data for specific models of FC are not yet available but will be produced by IEA Annex 42 and should be available in the future.
Expand Down
26 changes: 23 additions & 3 deletions src/EnergyPlus/FuelCellElectricGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ namespace FuelCellElectricGenerator {

state.dataFuelCellElectGen->FuelCell(thisFuelCell).FCPM.NomEff = NumArray(1);
state.dataFuelCellElectGen->FuelCell(thisFuelCell).FCPM.NomPel = NumArray(2);
state.dataFuelCellElectGen->FuelCell(thisFuelCell).FCPM.NumCycles = NumArray(3);
state.dataFuelCellElectGen->FuelCell(thisFuelCell).FCPM.NumCyclesAtStart = NumArray(3);
state.dataFuelCellElectGen->FuelCell(thisFuelCell).FCPM.NumCycles = state.dataFuelCellElectGen->FuelCell(thisFuelCell).FCPM.NumCyclesAtStart;
state.dataFuelCellElectGen->FuelCell(thisFuelCell).FCPM.CyclingDegradRat = NumArray(4);
state.dataFuelCellElectGen->FuelCell(thisFuelCell).FCPM.NumRunHours = NumArray(5);
state.dataFuelCellElectGen->FuelCell(thisFuelCell).FCPM.OperateDegradRat = NumArray(6);
Expand Down Expand Up @@ -1330,6 +1331,20 @@ namespace FuelCellElectricGenerator {
"System",
"Sum",
this->Name);

SetupOutputVariable(state, "Generator Number of Cycles",
OutputProcessor::Unit::None,
this->Report.NumCycles,
"System",
"Average",
this->Name);

SetupOutputVariable(state, "Generator Power Module Skin Heat Loss Rate",
OutputProcessor::Unit::W,
this->Report.FCPMSkinLoss,
"System",
"Average",
this->Name);
}
}

Expand Down Expand Up @@ -3194,7 +3209,7 @@ namespace FuelCellElectricGenerator {
this->AirSup.TairIntoBlower = 0.0;
this->AirSup.QskinLoss = 0.0;
this->AirSup.QintakeRecovery = 0.0;
this->FCPM.NumCycles = 0;
this->FCPM.NumCycles = this->FCPM.NumCyclesAtStart;
this->FCPM.Pel = 0.0;
this->FCPM.PelLastTimeStep = 0.0;
this->FCPM.Eel = 0.0;
Expand Down Expand Up @@ -3340,7 +3355,10 @@ namespace FuelCellElectricGenerator {
cell.AirSup.QskinLoss = 0.0;
cell.WaterSup.QskinLoss = 0.0;
cell.AuxilHeat.QskinLoss = 0.0;
cell.FCPM.QdotSkin = 0.0;
if (cell.FCPM.SkinLossMode != DataGenerators::SkinLoss::ConstantRate) {
// If Constant Skin Loss Rate, then do not zero out
cell.FCPM.QdotSkin = 0.0;
}
cell.Report.SkinLossConvect = 0.0;
cell.Report.SkinLossRadiat = 0.0;
cell.AuxilHeat.QairIntake = 0.0;
Expand Down Expand Up @@ -3484,6 +3502,8 @@ namespace FuelCellElectricGenerator {

this->Report.SeqSubstIterations = this->FCPM.SeqSubstitIter; // number of iterations in FuelCell loop
this->Report.RegulaFalsiIterations = this->FCPM.RegulaFalsiIter; // number of iterations in Tproduct gas solving
this->Report.NumCycles = this->FCPM.NumCycles; // number of start-stop cycles
this->Report.FCPMSkinLoss = this->FCPM.QdotSkin; // Skin loss of power module

this->Report.ACancillariesPower = this->FCPM.PelancillariesAC;
this->Report.ACancillariesEnergy = this->FCPM.PelancillariesAC * DataHVACGlobals::TimeStepSys * DataGlobalConstants::SecInHour;
Expand Down
6 changes: 5 additions & 1 deletion src/EnergyPlus/FuelCellElectricGenerator.hh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ namespace FuelCellElectricGenerator {
int EffCurveID; // pointer to curve for efficiency
Real64 NomEff; // nominal efficiency
Real64 NomPel; // nominal power rate at rating point
int NumCyclesAtStart; // number of start stop cycles at beggining of simulation (user input)
int NumCycles; // number of start stop cycles
Real64 CyclingDegradRat; // rate of degradation from cycles
Real64 NumRunHours; // number of hours of operation
Expand Down Expand Up @@ -437,6 +438,8 @@ namespace FuelCellElectricGenerator {
Real64 ThermalEfficiency;
Real64 OverallEfficiency;
Real64 ExergyEfficiency;
int NumCycles; // Number of start-stop cycles
Real64 FCPMSkinLoss; // Power module skin losses [W]

// Default Constructor
FCReportDataStruct()
Expand All @@ -450,7 +453,8 @@ namespace FuelCellElectricGenerator {
WaterVaporFractExh(0.0), CondensateRate(0.0), SeqSubstIterations(0), RegulaFalsiIterations(0), ACancillariesPower(0.0),
ACancillariesEnergy(0.0), PCUlosses(0.0), DCPowerGen(0.0), DCPowerEff(0.0), ElectEnergyinStorage(0.0), StoredPower(0.0),
StoredEnergy(0.0), DrawnPower(0.0), DrawnEnergy(0.0), SkinLossPower(0.0), SkinLossEnergy(0.0), SkinLossConvect(0.0),
SkinLossRadiat(0.0), ElectEfficiency(0.0), ThermalEfficiency(0.0), OverallEfficiency(0.0), ExergyEfficiency(0.0)
SkinLossRadiat(0.0), ElectEfficiency(0.0), ThermalEfficiency(0.0), OverallEfficiency(0.0), ExergyEfficiency(0.0), NumCycles(0),
FCPMSkinLoss(0.0)
{
}
};
Expand Down
Loading

3 comments on commit 3d14610

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

develop (dareumnam) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (2354 of 2354 tests passed, 0 test warnings)

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

develop (dareumnam) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1610 of 1610 tests passed, 0 test warnings)

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.

develop (dareumnam) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (726 of 727 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 726
  • Timeout: 1

Build Badge Test Badge Coverage Badge

Please sign in to comment.