Skip to content

Commit

Permalink
Add variable speed cooling coil to AFN
Browse files Browse the repository at this point in the history
  • Loading branch information
lymereJ committed Oct 14, 2024
1 parent b46af9c commit ce81227
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2156,6 +2156,8 @@ \subsubsection{Inputs}\label{inputs-2016-06-16}
\hyperref[coilcoolingdxtwostagewithhumiditycontrolmode]{Coil:Cooling:DX:TwoStageWithHumidityControlMode}
\item
\hyperref[coilcoolingdxmultispeed]{Coil:Cooling:DX:MultiSpeed}
\item
\hyperref[coilcoolingdxvariablespeed]{Coil:Cooling:DX:VariableSpeed}
\item
\hyperref[coilheatingdxmultispeed]{Coil:Heating:DX:MultiSpeed}
\item
Expand Down
1 change: 1 addition & 0 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -26706,6 +26706,7 @@ AirflowNetwork:Distribution:Component:Coil,
\key Coil:Cooling:DX:TwoStageWithHumidityControlMode
\key Coil:Cooling:DX:MultiSpeed
\key Coil:Heating:DX:MultiSpeed
\key Coil:Cooling:DX:VariableSpeed
\key Coil:Heating:Desuperheater
\key Coil:Heating:Electric:MultiStage
\key Coil:Heating:Gas:MultiStage
Expand Down
12 changes: 10 additions & 2 deletions src/EnergyPlus/AirflowNetwork/src/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10530,8 +10530,6 @@ namespace AirflowNetwork {
} else {
ShowSevereError(m_state, "SetDXCoilAirLoopNumber: Could not find Coil \"Name=\"" + DisSysCompCoilData(i).name + "\"");
}
// SetDXCoilAirLoopNumber(DisSysCompCoilData(i).name,
// DisSysCompCoilData(i).AirLoopNum);
}
} else if (SELECT_CASE_var == "COIL:COOLING:DX:SINGLESPEED") {
ValidateComponent(
Expand Down Expand Up @@ -10612,6 +10610,16 @@ namespace AirflowNetwork {
SetDXCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum);
}

} else if (SELECT_CASE_var == "COIL:COOLING:DX:VARIABLESPEED") {
ValidateComponent(
m_state, "Coil:Cooling:DX:VariableSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject);
++MultiSpeedHPIndicator;
if (IsNotOK) {
ErrorsFound = true;
} else {
SetDXCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum);
}

} else if (SELECT_CASE_var == "COIL:HEATING:DX:MULTISPEED") {
ValidateComponent(
m_state, "Coil:Heating:DX:MultiSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject);
Expand Down
64 changes: 64 additions & 0 deletions tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6100,6 +6100,70 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_CheckNumOfFansInAirLoopTest)
EXPECT_TRUE(compare_err_stream(error_string, true));
}

TEST_F(EnergyPlusFixture, AirflowNetwork_ValidateVarSpeedCoolingCoil)
{
std::string const idf_objects = delimited_string({

" Coil:Cooling:DX:VariableSpeed,",
" Super Coil, !- Name",
" Cooling Coil Air Inlet Node_unit1, !- Indoor Air Inlet Node Name",
" Heating Coil Air Inlet Node_unit1, !- Indoor Air Outlet Node Name",
" 1, !- Number of Speeds {dimensionless}",
" 1, !- Nominal Speed Level {dimensionless}",
" autosize, !- Gross Rated Total Cooling Capacity At Selected Nominal Speed Level {W}",
" autosize, !- Rated Air Flow Rate At Selected Nominal Speed Level {m3/s}",
" , !- Nominal Time for Condensate to Begin Leaving the Coil {s}",
" , !- Initial Moisture Evaporation Rate Divided by Steady-State AC Latent Capacity {dimensionless}",
" , !- Maximum Cycling Rate {cycles/hr}",
" , !- Latent Capacity Time Constant {s}",
" , !- Fan Delay Time {s}",
" HPCOOLPLFFPLR, !- Energy Part Load Fraction Curve Name",
" , !- Condenser Air Inlet Node Name",
" AirCooled, !- Condenser Type",
" , !- Evaporative Condenser Pump Rated Power Consumption {W}",
" , !- Crankcase Heater Capacity {W}",
" , !- Crankcase Heater Capacity Function of Temperature Curve Name",
" 10, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater Operation {C}",
" -25, !- Minimum Outdoor Dry-Bulb Temperature for Compressor Operation {C}",
" , !- Supply Water Storage Tank Name",
" , !- Condensate Collection Water Storage Tank Name",
" , !- Basin Heater Capacity {W/K}",
" 2, !- Basin Heater Setpoint Temperature {C}",
" , !- Basin Heater Operating Schedule Name",
" 15000, !- Speed 1 Reference Unit Gross Rated Total Cooling Capacity {W}",
" 0.55, !- Speed 1 Reference Unit Gross Rated Sensible Heat Ratio {dimensionless}",
" 4.3, !- Speed 1 Reference Unit Gross Rated Cooling COP {W/W}",
" 0.05, !- Speed 1 Reference Unit Rated Air Flow Rate {m3/s}",
" , !- 2017 Speed 1 Rated Evaporator Fan Power Per Volume Flow Rate {W/(m3/s)}",
" , !- 2023 Speed 1 Rated Evaporator Fan Power Per Volume Flow Rate {W/(m3/s)}",
" , !- Speed 1 Reference Unit Rated Condenser Air Flow Rate {m3/s}",
" , !- Speed 1 Reference Unit Rated Pad Effectiveness of Evap Precooling {dimensionless}",
" HPCoolingCAPFTemp, !- Speed 1 Total Cooling Capacity Function of Temperature Curve Name",
" HPCoolingCAPFFF, !- Speed 1 Total Cooling Capacity Function of Air Flow Fraction Curve Name",
" HPCoolingEIRFTemp, !- Speed 1 Energy Input Ratio Function of Temperature Curve Name",
" HPCoolingEIRFFF; !- Speed 1 Energy Input Ratio Function of Air Flow Fraction Curve Name",
});

ASSERT_TRUE(process_idf(idf_objects));

state->dataAirSystemsData->PrimaryAirSystems.allocate(1);
state->dataAirSystemsData->PrimaryAirSystems(1).NumBranches = 1;
state->dataAirSystemsData->PrimaryAirSystems(1).Branch.allocate(1);
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).TotalComponents = 1;
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp.allocate(1);
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).TypeOf = "Coil:Cooling:DX:VariableSpeed";
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).Name = "VariableSpeedCoolingCoil";

state->afn->DisSysNumOfCoils = 1;
state->afn->DisSysCompCoilData.allocate(1);
state->afn->DisSysCompCoilData(1).EPlusType = "COIL:COOLING:DX:VARIABLESPEED";
state->afn->DisSysCompCoilData(1).name = "Super Coil";

int num_coils = state->dataInputProcessing->inputProcessor->getNumObjectsFound(*state, "Coil:Cooling:DX:VariableSpeed");

state->afn->validate_distribution();
}

// Missing an AirflowNetwork:Distribution:Node for the Zone Air Node
TEST_F(EnergyPlusFixture, AirflowNetwork_CheckMultiZoneNodes_NoZoneNode)
{
Expand Down

3 comments on commit ce81227

@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.

afn_dx_clg_var_spd_coil (lymereJ) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2917 of 2917 tests passed, 0 test warnings)

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.

afn_dx_clg_var_spd_coil (lymereJ) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: Tests Failed (0 of 0 tests passed, 0 test warnings)

Build Badge Test Badge Coverage 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.

afn_dx_clg_var_spd_coil (lymereJ) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: Tests Failed (0 of 0 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.