Skip to content

Commit

Permalink
Merge pull request #215 from bigladder/add-aerotherm
Browse files Browse the repository at this point in the history
Small changes to address review comments
  • Loading branch information
nealkruis authored Oct 29, 2024
2 parents 83a2bae + 52bdc86 commit 72261c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions src/HPWH.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2572,7 +2572,7 @@ double HPWH::getCompressorMinRuntime(UNITS units /*=UNITS_MIN*/) const
return minimumRuntime;
}

int HPWH::getSizingFractions(double& aquaFract, double& useableFract) const
void HPWH::getSizingFractions(double& aquaFract, double& useableFract) const
{
double aFract = 1.;
double useFract = 1.;
Expand Down Expand Up @@ -2628,8 +2628,6 @@ int HPWH::getSizingFractions(double& aquaFract, double& useableFract) const
{
useableFract = 1. - aquaFract + TOL_MINVALUE;
}

return 0;
}

bool HPWH::isHPWHScalable() const { return canScale; }
Expand Down
2 changes: 1 addition & 1 deletion src/HPWH.hh
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ class HPWH : public Courier::Sender

double getCompressorMinRuntime(UNITS units = UNITS_MIN) const;

int getSizingFractions(double& aquafract, double& percentUseable) const;
void getSizingFractions(double& aquafract, double& percentUseable) const;
/**< returns the fraction of total tank volume from the bottom up where the aquastat is
or the turn on logic for the compressor, and the USEable fraction of storage or 1 minus
where the shut off logic is for the compressor. If the logic spans multiple nodes it
Expand Down
12 changes: 6 additions & 6 deletions test/unit_tests/sizingFractionsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TEST(SizingFractionsTest, TamScalable_SP_SizingFract)
double aquaFrac, useableFrac;
const double aquaFrac_answer = 4. / logicSize;

EXPECT_EQ(hpwh.getSizingFractions(aquaFrac, useableFrac), 0);
hpwh.getSizingFractions(aquaFrac, useableFrac);
EXPECT_NEAR(aquaFrac, aquaFrac_answer, tol);
EXPECT_NEAR(useableFrac, 1. - 1. / logicSize, tol);
}
Expand All @@ -40,7 +40,7 @@ TEST(SizingFractionsTest, Sanden80_SizingFract)
double aquaFrac, useableFrac;
const double aquaFrac_answer = 8. / logicSize;

EXPECT_EQ(hpwh.getSizingFractions(aquaFrac, useableFrac), 0);
hpwh.getSizingFractions(aquaFrac, useableFrac);
EXPECT_NEAR(aquaFrac, aquaFrac_answer, tol);
EXPECT_NEAR(useableFrac, 1. - 1. / logicSize, tol);
}
Expand All @@ -58,7 +58,7 @@ TEST(SizingFractionsTest, ColmacCxV_5_SP_SizingFract)
double aquaFrac, useableFrac;
const double aquaFrac_answer = 4. / logicSize;

EXPECT_EQ(hpwh.getSizingFractions(aquaFrac, useableFrac), 0);
hpwh.getSizingFractions(aquaFrac, useableFrac);
EXPECT_NEAR(aquaFrac, aquaFrac_answer, tol);
EXPECT_NEAR(useableFrac, 1. - 1. / logicSize, tol);
}
Expand All @@ -76,7 +76,7 @@ TEST(SizingFractionsTest, AOSmithHPTU50_SizingFract)
double aquaFrac, useableFrac;
const double aquaFrac_answer = (1. + 2. + 3. + 4.) / 4. / logicSize;

EXPECT_EQ(hpwh.getSizingFractions(aquaFrac, useableFrac), 0);
hpwh.getSizingFractions(aquaFrac, useableFrac);
EXPECT_NEAR(aquaFrac, aquaFrac_answer, tol);
EXPECT_NEAR(useableFrac, 1., tol);
}
Expand All @@ -94,7 +94,7 @@ TEST(SizingFractionsTest, GE_SizingFract)
double aquaFrac, useableFrac;
const double aquaFrac_answer = (1. + 2. + 3. + 4.) / 4. / logicSize;

EXPECT_EQ(hpwh.getSizingFractions(aquaFrac, useableFrac), 0);
hpwh.getSizingFractions(aquaFrac, useableFrac);
EXPECT_NEAR(aquaFrac, aquaFrac_answer, tol);
EXPECT_NEAR(useableFrac, 1., tol);
}
Expand All @@ -112,7 +112,7 @@ TEST(SizingFractionsTest, Stiebel220e_SizingFract)
double aquaFrac, useableFrac;
const double aquaFrac_answer = (5. + 6.) / 2. / logicSize;

EXPECT_EQ(hpwh.getSizingFractions(aquaFrac, useableFrac), 0);
hpwh.getSizingFractions(aquaFrac, useableFrac);
EXPECT_NEAR(aquaFrac, aquaFrac_answer, tol);
EXPECT_NEAR(useableFrac, 1. - 1. / logicSize, tol);
}
Expand Down

0 comments on commit 72261c4

Please sign in to comment.