Skip to content

Commit

Permalink
Change hpwh model enum.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Ahrenkiel authored and Phil Ahrenkiel committed Nov 20, 2023
1 parent b423655 commit 8bb5807
Show file tree
Hide file tree
Showing 7 changed files with 311 additions and 324 deletions.
8 changes: 4 additions & 4 deletions src/HPWHMain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ bool HPWH::isNewSetpointPossible(double newSetpoint,double& maxAllowedSetpoint,s
returnVal = true;
}
} else if(lowestElementIndex == -1 && !hasACompressor()) { // There are no heat sources here!
if(hpwhModel == MODELS_StorageTank) {
if(hpwhModel == MODELS::StorageTank) {
returnVal = true; // The one pass the storage tank doesn't have any heating elements so sure change the setpoint it does nothing!
} else {
why = "There aren't any heat sources to check the new setpoint against!";
Expand Down Expand Up @@ -1977,7 +1977,7 @@ double HPWH::getLocationTemp_C() const {
return locationTemperature_C;
}

int HPWH::getHPWHModel() const {
HPWH::MODELS HPWH::getHPWHModel() const {
return hpwhModel;
}
int HPWH::getCompressorCoilConfig() const {
Expand Down Expand Up @@ -2811,7 +2811,7 @@ int HPWH::checkInputs() {
int returnVal = 0;
//use a returnVal so that all checks are processed and error messages written

if(getNumHeatSources() <= 0 && hpwhModel != MODELS_StorageTank) {
if(getNumHeatSources() <= 0 && hpwhModel != MODELS::StorageTank) {
if(hpwhVerbosity >= VRB_reluctant) {
msg("You must have at least one HeatSource.\n");
}
Expand Down Expand Up @@ -3515,7 +3515,7 @@ int HPWH::HPWHinit_file(string configFile) {


//take care of the non-input processing
hpwhModel = MODELS_CustomFile;
hpwhModel = MODELS::CustomFile;

tankTemps_C.resize(num_nodes);
resetTankToSetpoint();
Expand Down
5 changes: 2 additions & 3 deletions src/HPWHMain.hh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public:
every x minutes, where x is defined by timer_TOT. */
};

enum MODELS;
enum class MODELS;

///specifies the modes for writing output
///the specified values are used for >= comparisons, so the numerical order is relevant
Expand All @@ -69,7 +69,6 @@ public:
VRB_emetic = 30 /**< print all the things */
};


enum UNITS{
UNITS_C, /**< celsius */
UNITS_F, /**< fahrenheit */
Expand Down Expand Up @@ -499,7 +498,7 @@ public:
/**< get the heat content of the tank, relative to zero celsius
* returns using kilojoules */

int getHPWHModel() const;
MODELS getHPWHModel() const;
/**< get the model number of the HPWHsim model number of the hpwh */

int getCompressorCoilConfig() const;
Expand Down
218 changes: 109 additions & 109 deletions src/HPWHPresets.hh

Large diffs are not rendered by default.

Loading

0 comments on commit 8bb5807

Please sign in to comment.