Skip to content

Commit

Permalink
Fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanaya-mankad committed Jul 23, 2024
1 parent a087d67 commit 4a83d3d
Show file tree
Hide file tree
Showing 8 changed files with 352 additions and 390 deletions.
4 changes: 2 additions & 2 deletions src/EnergyPlus/Coils/CoilCoolingDX.cc
Original file line number Diff line number Diff line change
Expand Up @@ -657,10 +657,10 @@ void CoilCoolingDX::size(EnergyPlusData &state)
}

void CoilCoolingDX::simulate(EnergyPlusData &state,
HVAC::CoilMode coilMode,
HVAC::CoilMode coilMode,
int const speedNum,
Real64 const speedRatio,
HVAC::FanOp const fanOp,
HVAC::FanOp const fanOp,
bool const singleMode,
Real64 const LoadSHR)
{
Expand Down
9 changes: 7 additions & 2 deletions src/EnergyPlus/Coils/CoilCoolingDX.hh
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ struct CoilCoolingDX
static void reportAllStandardRatings(EnergyPlusData &state);
void instantiateFromInputSpec(EnergyPlusData &state, const CoilCoolingDXInputSpecification &input_data);
void oneTimeInit(EnergyPlusData &state);
void
simulate(EnergyPlusData &state, HVAC::CoilMode coilMode, int speedNum, Real64 speedRatio, HVAC::FanOp const fanOp, bool singleMode, Real64 LoadSHR = -1.0);
void simulate(EnergyPlusData &state,
HVAC::CoilMode coilMode,
int speedNum,
Real64 speedRatio,
HVAC::FanOp const fanOp,
bool singleMode,
Real64 LoadSHR = -1.0);
void setData(int fanIndex, HVAC::FanType fanType, std::string const &fanName, int airLoopNum);
void getFixedData(int &evapInletNodeIndex,
int &evapOutletNodeIndex,
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ void CoilCoolingDXCurveFitOperatingMode::CalcOperatingMode(EnergyPlus::EnergyPlu
}
thisspeed.ambPressure = condInletNode.Press;
thisspeed.AirMassFlow = inletNode.MassFlowRate;
if (fanOp == HVAC::FanOp::Cycling && speedNum == 1) {
if (fanOp == HVAC::FanOp::Cycling && speedNum == 1) {
if (speedRatio > 0.0) {
thisspeed.AirMassFlow = thisspeed.AirMassFlow / speedRatio;
} else {
Expand Down
15 changes: 3 additions & 12 deletions src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -271,16 +271,8 @@ void CoilCoolingDXCurveFitPerformance::simulate(EnergyPlus::EnergyPlusData &stat
SysSubSHR = sensSubRate / totalCoolingRate;
if (LoadSHR < SysSubSHR) {
outletNode.MassFlowRate = inletNode.MassFlowRate;
this->calculate(state,
this->alternateMode2,
inletNode,
outletNode,
speedNum,
speedRatio,
fanOp,
condInletNode,
condOutletNode,
singleMode);
this->calculate(
state, this->alternateMode2, inletNode, outletNode, speedNum, speedRatio, fanOp, condInletNode, condOutletNode, singleMode);
CalcComponentSensibleLatentOutput(outletNode.MassFlowRate,
inletNode.Temp,
inletNode.HumRat,
Expand Down Expand Up @@ -334,8 +326,7 @@ void CoilCoolingDXCurveFitPerformance::simulate(EnergyPlus::EnergyPlusData &stat
}
}
} else if (currentCoilMode == HVAC::CoilMode::Enhanced) {
this->calculate(
state, this->alternateMode, inletNode, outletNode, speedNum, speedRatio, fanOp, condInletNode, condOutletNode, singleMode);
this->calculate(state, this->alternateMode, inletNode, outletNode, speedNum, speedRatio, fanOp, condInletNode, condOutletNode, singleMode);
this->OperatingMode = 2;
this->powerUse = this->alternateMode.OpModePower;
this->RTF = this->alternateMode.OpModeRTF;
Expand Down
228 changes: 115 additions & 113 deletions src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.hh
Original file line number Diff line number Diff line change
Expand Up @@ -60,120 +60,122 @@
namespace EnergyPlus {

// Forward declarations
struct EnergyPlusData;

struct CoilCoolingDXCurveFitPerformanceInputSpecification {
std::string name;
Real64 crankcase_heater_capacity;
Real64 minimum_outdoor_dry_bulb_temperature_for_compressor_operation;
Real64 maximum_outdoor_dry_bulb_temperature_for_crankcase_heater_operation;
Real64 unit_internal_static_air_pressure;
Real64 basin_heater_capacity;
Real64 basin_heater_setpoint_temperature;
std::string basin_heater_operating_schedule_name;
std::string compressor_fuel_type;
std::string base_operating_mode_name;
std::string alternate_operating_mode_name;
std::string alternate_operating_mode2_name;
std::string outdoor_temperature_dependent_crankcase_heater_capacity_curve_name;
std::string capacity_control;
};

struct CoilCoolingDXCurveFitPerformance {
std::string object_name = "Coil:Cooling:DX:CurveFit:Performance";
std::string parentName;

void instantiateFromInputSpec(EnergyPlusData &state,
const CoilCoolingDXCurveFitPerformanceInputSpecification &input_data);

void simulate(EnergyPlusData &state,
const DataLoopNode::NodeData &inletNode,
DataLoopNode::NodeData &outletNode,
HVAC::CoilMode currentCoilMode,
int speedNum,
Real64 speedRatio,
HVAC::FanOp const fanOp,
DataLoopNode::NodeData &condInletNode,
DataLoopNode::NodeData &condOutletNode,
bool singleMode,
Real64 LoadSHR = 0.0);

void calculate(EnergyPlusData &state,
CoilCoolingDXCurveFitOperatingMode &currentMode,
const DataLoopNode::NodeData &inletNode,
DataLoopNode::NodeData &outletNode,
int speedNum,
Real64 speedRatio,
HVAC::FanOp const fanOp,
DataLoopNode::NodeData &condInletNode,
DataLoopNode::NodeData &condOutletNode,
bool singleMode);

void calcStandardRatings210240(EnergyPlusData &state);

CoilCoolingDXCurveFitPerformanceInputSpecification original_input_specs;

CoilCoolingDXCurveFitPerformance() = default;

explicit CoilCoolingDXCurveFitPerformance(EnergyPlusData &state, const std::string &name);

void size(EnergyPlusData &state);

void setOperMode(EnergyPlusData &state, CoilCoolingDXCurveFitOperatingMode &currentMode, int const mode);

std::string name;
Real64 crankcaseHeaterCap = 0.0;
Real64 crankcaseHeaterPower = 0.0;
int crankcaseHeaterCapacityCurveIndex = 0;
Real64 crankcaseHeaterElectricityConsumption = 0.0;
Real64 minOutdoorDrybulb = 0.0;
Real64 maxOutdoorDrybulbForBasin = 0.0;
bool mySizeFlag = true;
Constant::eFuel compressorFuelType = Constant::eFuel::Invalid;
std::string compressorFuelTypeForOutput;
Real64 compressorFuelRate = 0.0;
Real64 compressorFuelConsumption = 0.0;

enum CapControlMethod {
CONTINUOUS,
DISCRETE
};
CapControlMethod capControlMethod = CapControlMethod::DISCRETE;

Real64 evapCondBasinHeatCap = 0.0;
Real64 evapCondBasinHeatSetpoint = 0.0;
int evapCondBasinHeatSchedulIndex = 0;
Real64 basinHeaterElectricityConsumption = 0.0;
Real64 basinHeaterPower = 0.0;
Real64 powerUse = 0.0;
Real64 electricityConsumption = 0.0;
Real64 RTF = 0.0;
bool oneTimeEIOHeaderWrite = true;
Real64 wasteHeatRate = 0.0;
int OperatingMode = 0;
Real64 ModeRatio = 0.0;
Real64 recoveredEnergyRate = 0.0;
Real64 NormalSHR = 0.0;

// standard rating stuff -- for now just 210/240
Real64 standardRatingCoolingCapacity = 0.0; // net cooling capacity of single speed DX cooling coil
Real64 standardRatingSEER = 0.0; // seasonal energy efficiency ratio of single speed DX cooling coil
Real64 standardRatingSEER_Standard = 0.0; // seasonal energy efficiency ratio
Real64 standardRatingEER = 0.0; // energy efficiency ratio of single speed DX cooling coil
Real64 standardRatingIEER = 0.0; // Integrated energy efficiency ratio of single speed DX cooling coil

// standard rating stuff -- for now just 210/240 2023
Real64 standardRatingCoolingCapacity2023 = 0.0; // net cooling capacity of single speed DX cooling coil
Real64 standardRatingSEER2_User = 0.0; // seasonal energy efficiency ratio of single speed DX cooling coil
Real64 standardRatingSEER2_Standard = 0.0;
Real64 standardRatingEER2 = 0.0; // energy efficiency ratio of single speed DX cooling coil
Real64 standardRatingIEER2 = 0.0; // Integrated energy efficiency ratio of singgle speed DX cooling coil | AHRI Std.340/360-2022(IP)

CoilCoolingDXCurveFitOperatingMode normalMode;
HVAC::CoilMode maxAvailCoilMode = HVAC::CoilMode::Normal; // max available coil mode, 0 Normal, 1 Enhanced, 2 SubcoolReheat
CoilCoolingDXCurveFitOperatingMode alternateMode; // enhanced dehumidifcation or Subcool mode
CoilCoolingDXCurveFitOperatingMode alternateMode2; // Reheat mode
struct EnergyPlusData;

struct CoilCoolingDXCurveFitPerformanceInputSpecification
{
std::string name;
Real64 crankcase_heater_capacity;
Real64 minimum_outdoor_dry_bulb_temperature_for_compressor_operation;
Real64 maximum_outdoor_dry_bulb_temperature_for_crankcase_heater_operation;
Real64 unit_internal_static_air_pressure;
Real64 basin_heater_capacity;
Real64 basin_heater_setpoint_temperature;
std::string basin_heater_operating_schedule_name;
std::string compressor_fuel_type;
std::string base_operating_mode_name;
std::string alternate_operating_mode_name;
std::string alternate_operating_mode2_name;
std::string outdoor_temperature_dependent_crankcase_heater_capacity_curve_name;
std::string capacity_control;
};

struct CoilCoolingDXCurveFitPerformance
{
std::string object_name = "Coil:Cooling:DX:CurveFit:Performance";
std::string parentName;

void instantiateFromInputSpec(EnergyPlusData &state, const CoilCoolingDXCurveFitPerformanceInputSpecification &input_data);

void simulate(EnergyPlusData &state,
const DataLoopNode::NodeData &inletNode,
DataLoopNode::NodeData &outletNode,
HVAC::CoilMode currentCoilMode,
int speedNum,
Real64 speedRatio,
HVAC::FanOp const fanOp,
DataLoopNode::NodeData &condInletNode,
DataLoopNode::NodeData &condOutletNode,
bool singleMode,
Real64 LoadSHR = 0.0);

void calculate(EnergyPlusData &state,
CoilCoolingDXCurveFitOperatingMode &currentMode,
const DataLoopNode::NodeData &inletNode,
DataLoopNode::NodeData &outletNode,
int speedNum,
Real64 speedRatio,
HVAC::FanOp const fanOp,
DataLoopNode::NodeData &condInletNode,
DataLoopNode::NodeData &condOutletNode,
bool singleMode);

void calcStandardRatings210240(EnergyPlusData &state);

CoilCoolingDXCurveFitPerformanceInputSpecification original_input_specs;

CoilCoolingDXCurveFitPerformance() = default;

explicit CoilCoolingDXCurveFitPerformance(EnergyPlusData &state, const std::string &name);

void size(EnergyPlusData &state);

void setOperMode(EnergyPlusData &state, CoilCoolingDXCurveFitOperatingMode &currentMode, int const mode);

std::string name;
Real64 crankcaseHeaterCap = 0.0;
Real64 crankcaseHeaterPower = 0.0;
int crankcaseHeaterCapacityCurveIndex = 0;
Real64 crankcaseHeaterElectricityConsumption = 0.0;
Real64 minOutdoorDrybulb = 0.0;
Real64 maxOutdoorDrybulbForBasin = 0.0;
bool mySizeFlag = true;
Constant::eFuel compressorFuelType = Constant::eFuel::Invalid;
std::string compressorFuelTypeForOutput;
Real64 compressorFuelRate = 0.0;
Real64 compressorFuelConsumption = 0.0;

enum CapControlMethod
{
CONTINUOUS,
DISCRETE
};
CapControlMethod capControlMethod = CapControlMethod::DISCRETE;

Real64 evapCondBasinHeatCap = 0.0;
Real64 evapCondBasinHeatSetpoint = 0.0;
int evapCondBasinHeatSchedulIndex = 0;
Real64 basinHeaterElectricityConsumption = 0.0;
Real64 basinHeaterPower = 0.0;
Real64 powerUse = 0.0;
Real64 electricityConsumption = 0.0;
Real64 RTF = 0.0;
bool oneTimeEIOHeaderWrite = true;
Real64 wasteHeatRate = 0.0;
int OperatingMode = 0;
Real64 ModeRatio = 0.0;
Real64 recoveredEnergyRate = 0.0;
Real64 NormalSHR = 0.0;

// standard rating stuff -- for now just 210/240
Real64 standardRatingCoolingCapacity = 0.0; // net cooling capacity of single speed DX cooling coil
Real64 standardRatingSEER = 0.0; // seasonal energy efficiency ratio of single speed DX cooling coil
Real64 standardRatingSEER_Standard = 0.0; // seasonal energy efficiency ratio
Real64 standardRatingEER = 0.0; // energy efficiency ratio of single speed DX cooling coil
Real64 standardRatingIEER = 0.0; // Integrated energy efficiency ratio of single speed DX cooling coil

// standard rating stuff -- for now just 210/240 2023
Real64 standardRatingCoolingCapacity2023 = 0.0; // net cooling capacity of single speed DX cooling coil
Real64 standardRatingSEER2_User = 0.0; // seasonal energy efficiency ratio of single speed DX cooling coil
Real64 standardRatingSEER2_Standard = 0.0;
Real64 standardRatingEER2 = 0.0; // energy efficiency ratio of single speed DX cooling coil
Real64 standardRatingIEER2 = 0.0; // Integrated energy efficiency ratio of singgle speed DX cooling coil | AHRI Std.340/360-2022(IP)

CoilCoolingDXCurveFitOperatingMode normalMode;
HVAC::CoilMode maxAvailCoilMode = HVAC::CoilMode::Normal; // max available coil mode, 0 Normal, 1 Enhanced, 2 SubcoolReheat
CoilCoolingDXCurveFitOperatingMode alternateMode; // enhanced dehumidifcation or Subcool mode
CoilCoolingDXCurveFitOperatingMode alternateMode2; // Reheat mode
};

} // namespace EnergyPlus

Expand Down
Loading

5 comments on commit 4a83d3d

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge-coil-load-ratios (bigladder) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3642 of 3687 tests passed, 188 test warnings)

Messages:\n

  • 211 tests had: ESO small diffs.
  • 206 tests had: EIO diffs.
  • 188 tests had: MTR small diffs.
  • 145 tests had: Table small diffs.
  • 15 tests had: Table big diffs.
  • 38 tests had: Table string diffs.
  • 13 tests had: ERR diffs.
  • 9 tests had: ESO big diffs.
  • 3 tests had: EDD diffs.
  • 4 tests had: MTR big diffs.
  • 1 test had: JSON big diffs.

Failures:\n

regression Test Summary

  • Passed: 766
  • Failed: 45

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge-coil-load-ratios (bigladder) - x86_64-MacOS-10.18-clang-15.0.0: OK (3599 of 3646 tests passed, 182 test warnings)

Messages:\n

  • 206 tests had: EIO diffs.
  • 205 tests had: ESO small diffs.
  • 186 tests had: MTR small diffs.
  • 139 tests had: Table small diffs.
  • 38 tests had: Table string diffs.
  • 1 test had: JSON small diffs.
  • 16 tests had: Table big diffs.
  • 15 tests had: ERR diffs.
  • 11 tests had: ESO big diffs.
  • 3 tests had: EDD diffs.
  • 4 tests had: MTR big diffs.
  • 1 test had: JSON big diffs.

Failures:\n

regression Test Summary

  • Passed: 744
  • Failed: 47

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge-coil-load-ratios (bigladder) - Win64-Windows-10-VisualStudio-16: OK (2853 of 2854 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1565
  • Failed: 1

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge-coil-load-ratios (bigladder) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (2060 of 2062 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1567
  • Subprocess aborted: 1

ZoneUnitarySysTest Test Summary

  • Passed: 27
  • Subprocess aborted: 1

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge-coil-load-ratios (bigladder) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (776 of 795 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 776
  • Failed: 19

Build Badge Test Badge Coverage Badge

Please sign in to comment.