Skip to content

Commit

Permalink
Merge pull request #10878 from NREL/CppCheck-expm1-FuelCellElectricGe…
Browse files Browse the repository at this point in the history
…nerators

CppCheck expm1 FuelCellElectricGenerators
  • Loading branch information
Myoldmopar authored Jan 9, 2025
2 parents 1812659 + c4ffef7 commit 3bc09c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/EnergyPlus/FuelCellElectricGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3064,7 +3064,7 @@ namespace FuelCellElectricGenerator {
this->ExhaustHX.THXexh =
((1.0 - NdotCpAuxMix / NdotCpWater) / (std::exp(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) - NdotCpAuxMix / NdotCpWater)) *
TauxMix +
((std::exp(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) - 1.0) /
(std::expm1(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) /
(std::exp(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) - NdotCpAuxMix / NdotCpWater)) *
TwaterIn;

Expand Down Expand Up @@ -3109,7 +3109,7 @@ namespace FuelCellElectricGenerator {
this->ExhaustHX.THXexh =
((1.0 - NdotCpAuxMix / NdotCpWater) / (std::exp(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) - NdotCpAuxMix / NdotCpWater)) *
TauxMix +
((std::exp(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) - 1.0) /
(std::expm1(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) /
(std::exp(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) - NdotCpAuxMix / NdotCpWater)) *
TwaterIn;

Expand Down Expand Up @@ -3170,7 +3170,7 @@ namespace FuelCellElectricGenerator {
this->ExhaustHX.THXexh = ((1.0 - NdotCpAuxMix / NdotCpWater) /
(std::exp(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) - NdotCpAuxMix / NdotCpWater)) *
TauxMix +
((std::exp(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) - 1.0) /
(std::expm1(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) /
(std::exp(UAeff * (1.0 / NdotCpAuxMix - 1.0 / NdotCpWater)) - NdotCpAuxMix / NdotCpWater)) *
TwaterIn;

Expand Down

0 comments on commit 3bc09c0

Please sign in to comment.