Skip to content

Commit

Permalink
Bug fix for zero cp for liquidgeneric fuel, no IO change version.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcyuan2020 committed Mar 16, 2021
1 parent 2cfd644 commit f3a1e45
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4360,6 +4360,8 @@ \subsubsection{Inputs}\label{inputs-19-000}

This field describes the portion of the compressor electrical power that is lost to the surroundings. The rest of the energy is added to the fuel stream. A heat loss factor of 1.0 indicates that all the heat is lost to the surroundings and no energy is added to the fuel inlet stream.

Note with \emph{LiquidGeneric} fuel type, currently this value would not taken into effect. In this case a heat loss factor of 1.0 is always used for this fuel type.

\paragraph{Field: Fuel Type}\label{field-fuel-type-3}

Choose between GaseousConstituents or LiquidGeneric .
Expand Down
13 changes: 9 additions & 4 deletions src/EnergyPlus/FuelCellElectricGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1549,10 +1549,15 @@ namespace FuelCellElectricGenerator {
if (this->FCPM.NdotFuel <= 0.0) { // just pass through, domain probably collapsed in modeling
state.dataGenerator->FuelSupply(this->FuelSupNum).TfuelIntoFCPM = state.dataGenerator->FuelSupply(this->FuelSupNum).TfuelIntoCompress;
} else {
state.dataGenerator->FuelSupply(this->FuelSupNum).TfuelIntoFCPM =
((1.0 - state.dataGenerator->FuelSupply(this->FuelSupNum).CompPowerLossFactor) *
state.dataGenerator->FuelSupply(this->FuelSupNum).PfuelCompEl / (this->FCPM.NdotFuel * Cp * 1000.0)) +
state.dataGenerator->FuelSupply(this->FuelSupNum).TfuelIntoCompress; // 1000 Cp units mol-> kmol
if (state.dataGenerator->FuelSupply(this->FuelSupNum).NumConstituents == 0) {
state.dataGenerator->FuelSupply(this->FuelSupNum).TfuelIntoFCPM =
state.dataGenerator->FuelSupply(this->FuelSupNum).TfuelIntoCompress;
} else {
state.dataGenerator->FuelSupply(this->FuelSupNum).TfuelIntoFCPM =
((1.0 - state.dataGenerator->FuelSupply(this->FuelSupNum).CompPowerLossFactor) *
state.dataGenerator->FuelSupply(this->FuelSupNum).PfuelCompEl / (this->FCPM.NdotFuel * Cp * 1000.0)) +
state.dataGenerator->FuelSupply(this->FuelSupNum).TfuelIntoCompress; // 1000 Cp units mol-> kmol
}
}
// calc skin losses from fuel compressor
state.dataGenerator->FuelSupply(this->FuelSupNum).QskinLoss =
Expand Down

0 comments on commit f3a1e45

Please sign in to comment.