Skip to content

Commit

Permalink
Merge pull request #36 from energy-plus/CoilRefactorFeb2020Rich
Browse files Browse the repository at this point in the history
Coil refactor feb2020 rich
  • Loading branch information
rraustad committed Feb 25, 2020
2 parents 0efe30b + 2ba1a76 commit 772c535
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/EnergyPlus/Coils/CoilCoolingDX.cc
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ void CoilCoolingDX::getDataAfterSizing(Real64 &_normalModeRatedEvapAirFlowRate,
}

void CoilCoolingDX::size() {
this->performance.parentName = this->name;
this->performance.size();
}

Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ void CoilCoolingDXCurveFitOperatingMode::size()
this->ratedCondAirFlowRate = TempSize;

for (auto &curSpeed : this->speeds) {
curSpeed.parentName = this->parentName;
curSpeed.parentModeRatedGrossTotalCap = this->ratedGrossTotalCap;
curSpeed.parentModeRatedEvapAirFlowRate = this->ratedEvapAirFlowRate;
curSpeed.parentModeRatedCondAirFlowRate = this->ratedCondAirFlowRate;
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.hh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ struct CoilCoolingDXCurveFitOperatingModeInputSpecification
struct CoilCoolingDXCurveFitOperatingMode
{
std::string object_name = "Coil:Cooling:DX:CurveFit:OperatingMode";
std::string parentName;

void instantiateFromInputSpec(CoilCoolingDXCurveFitOperatingModeInputSpecification input_data);
void size();
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ void CoilCoolingDXCurveFitPerformance::simulate(const DataLoopNode::NodeData &in
void CoilCoolingDXCurveFitPerformance::size()
{
if (!DataGlobals::SysSizingCalc && this->mySizeFlag) {
this->normalMode.parentName = this->parentName;
this->normalMode.size();
if (this->hasAlternateMode) {
this->alternateMode.size();
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.hh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class OutputFiles;
struct CoilCoolingDXCurveFitPerformanceInputSpecification
{
std::string name;
std::string parentName;
Real64 crankcase_heater_capacity;
Real64 minimum_outdoor_dry_bulb_temperature_for_compressor_operation;
Real64 maximum_outdoor_dry_bulb_temperature_for_crankcase_heater_operation;
Expand All @@ -77,6 +78,7 @@ struct CoilCoolingDXCurveFitPerformanceInputSpecification
struct CoilCoolingDXCurveFitPerformance
{
std::string object_name = "Coil:Cooling:DX:CurveFit:Performance";
std::string parentName;
void instantiateFromInputSpec(const CoilCoolingDXCurveFitPerformanceInputSpecification &input_data);
void simulate(const DataLoopNode::NodeData &inletNode,
DataLoopNode::NodeData &outletNode,
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ void CoilCoolingDXCurveFitSpeed::size()
Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::StdBaroPress, RatedInletAirTemp, RatedInletAirHumRat, RoutineName);

bool PrintFlag = true;
std::string CompType = this->object_name;
std::string CompName = this->name;
std::string CompType = DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilDX_Cooling);
std::string CompName = this->parentName;

int SizingMethod = DataHVACGlobals::CoolingAirflowSizing;
std::string SizingString = "Rated Air Flow Rate [m3/s]";
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.hh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ struct CoilCoolingDXCurveFitSpeedInputSpecification
struct CoilCoolingDXCurveFitSpeed
{
std::string const object_name = "Coil:Cooling:DX:CurveFit:Speed";
std::string parentName;

CoilCoolingDXCurveFitSpeed() = default;
explicit CoilCoolingDXCurveFitSpeed(const std::string& name);
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ReportCoilSelection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,7 @@ bool ReportCoilSelection::isCompTypeCoil(std::string const &compType // string c
{
// if compType name is one of the coil objects, then return true
bool found(false);
for (int loop = 1; loop < DataHVACGlobals::NumAllCoilTypes; ++loop) {
for (int loop = 1; loop <= DataHVACGlobals::NumAllCoilTypes; ++loop) {
if (UtilityRoutines::SameString(compType, DataHVACGlobals::cAllCoilTypes(loop))) {
found = true;
break;
Expand Down

0 comments on commit 772c535

Please sign in to comment.