-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Phil Ahrenkiel
authored and
Phil Ahrenkiel
committed
Jan 1, 2024
1 parent
1f3f4c0
commit 2b87503
Showing
4 changed files
with
104 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* test UEF calculation | ||
*/ | ||
#include "HPWH.hh" | ||
#include "testUtilityFcts.cc" | ||
|
||
#include <string> | ||
|
||
/* Evaluate UEF based on simulations using standard profiles */ | ||
static bool testCalcUEF(const std::string& sModelName, double& UEF) | ||
{ | ||
HPWH hpwh; | ||
|
||
HPWH::MODELS model = mapStringToPreset(sModelName); | ||
if (hpwh.HPWHinit_presets(model) != 0) | ||
{ | ||
return false; | ||
} | ||
|
||
return hpwh.calcUEF(hpwh.findUsageFromMaximumGPM_Rating(), UEF); | ||
} | ||
|
||
int main(int, char**) | ||
{ | ||
double UEF; | ||
ASSERTTRUE(testCalcUEF("AOSmithHPTS50", UEF)); | ||
ASSERTTRUE(cmpd(UEF, 4.4091)); | ||
|
||
ASSERTTRUE(testCalcUEF("AquaThermAire", UEF)); | ||
ASSERTTRUE(cmpd(UEF, 3.5848)); | ||
|
||
return 0; | ||
} |