Skip to content

Commit 5a57a68

Browse files
committed
Add variable speed heating coil to AFN
1 parent ce81227 commit 5a57a68

File tree

4 files changed

+60
-15
lines changed

4 files changed

+60
-15
lines changed

doc/input-output-reference/src/overview/group-airflow-network.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,6 +2160,8 @@ \subsubsection{Inputs}\label{inputs-2016-06-16}
21602160
\hyperref[coilcoolingdxvariablespeed]{Coil:Cooling:DX:VariableSpeed}
21612161
\item
21622162
\hyperref[coilheatingdxmultispeed]{Coil:Heating:DX:MultiSpeed}
2163+
\item
2164+
\hyperref[coilheatingdxvariablespeed]{Coil:Heating:DX:VariableSpeed}
21632165
\item
21642166
\hyperref[coilheatingdesuperheater]{Coil:Heating:Desuperheater}
21652167
\end{itemize}

idd/Energy+.idd.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26707,6 +26707,7 @@ AirflowNetwork:Distribution:Component:Coil,
2670726707
\key Coil:Cooling:DX:MultiSpeed
2670826708
\key Coil:Heating:DX:MultiSpeed
2670926709
\key Coil:Cooling:DX:VariableSpeed
26710+
\key Coil:Heating:DX:VariableSpeed
2671026711
\key Coil:Heating:Desuperheater
2671126712
\key Coil:Heating:Electric:MultiStage
2671226713
\key Coil:Heating:Gas:MultiStage

src/EnergyPlus/AirflowNetwork/src/Solver.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10610,6 +10610,16 @@ namespace AirflowNetwork {
1061010610
SetDXCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum);
1061110611
}
1061210612

10613+
} else if (SELECT_CASE_var == "COIL:HEATING:DX:MULTISPEED") {
10614+
ValidateComponent(
10615+
m_state, "Coil:Heating:DX:MultiSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject);
10616+
++MultiSpeedHPIndicator;
10617+
if (IsNotOK) {
10618+
ErrorsFound = true;
10619+
} else {
10620+
SetDXCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum);
10621+
}
10622+
1061310623
} else if (SELECT_CASE_var == "COIL:COOLING:DX:VARIABLESPEED") {
1061410624
ValidateComponent(
1061510625
m_state, "Coil:Cooling:DX:VariableSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject);
@@ -10620,9 +10630,9 @@ namespace AirflowNetwork {
1062010630
SetDXCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum);
1062110631
}
1062210632

10623-
} else if (SELECT_CASE_var == "COIL:HEATING:DX:MULTISPEED") {
10633+
} else if (SELECT_CASE_var == "COIL:HEATING:DX:VARIABLESPEED") {
1062410634
ValidateComponent(
10625-
m_state, "Coil:Heating:DX:MultiSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject);
10635+
m_state, "Coil:Heating:DX:VariableSpeed", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject);
1062610636
++MultiSpeedHPIndicator;
1062710637
if (IsNotOK) {
1062810638
ErrorsFound = true;

tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6100,14 +6100,14 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_CheckNumOfFansInAirLoopTest)
61006100
EXPECT_TRUE(compare_err_stream(error_string, true));
61016101
}
61026102

6103-
TEST_F(EnergyPlusFixture, AirflowNetwork_ValidateVarSpeedCoolingCoil)
6103+
TEST_F(EnergyPlusFixture, AirflowNetwork_ValidateDistCoils)
61046104
{
61056105
std::string const idf_objects = delimited_string({
61066106

61076107
" Coil:Cooling:DX:VariableSpeed,",
6108-
" Super Coil, !- Name",
6109-
" Cooling Coil Air Inlet Node_unit1, !- Indoor Air Inlet Node Name",
6110-
" Heating Coil Air Inlet Node_unit1, !- Indoor Air Outlet Node Name",
6108+
" Super Coil, !- Name",
6109+
" Node_1, !- Indoor Air Inlet Node Name",
6110+
" Node_2, !- Indoor Air Outlet Node Name",
61116111
" 1, !- Number of Speeds {dimensionless}",
61126112
" 1, !- Nominal Speed Level {dimensionless}",
61136113
" autosize, !- Gross Rated Total Cooling Capacity At Selected Nominal Speed Level {W}",
@@ -6130,9 +6130,9 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_ValidateVarSpeedCoolingCoil)
61306130
" , !- Basin Heater Capacity {W/K}",
61316131
" 2, !- Basin Heater Setpoint Temperature {C}",
61326132
" , !- Basin Heater Operating Schedule Name",
6133-
" 15000, !- Speed 1 Reference Unit Gross Rated Total Cooling Capacity {W}",
6134-
" 0.55, !- Speed 1 Reference Unit Gross Rated Sensible Heat Ratio {dimensionless}",
6135-
" 4.3, !- Speed 1 Reference Unit Gross Rated Cooling COP {W/W}",
6133+
" 15000, !- Speed 1 Reference Unit Gross Rated Total Cooling Capacity {W}",
6134+
" 0.55, !- Speed 1 Reference Unit Gross Rated Sensible Heat Ratio {dimensionless}",
6135+
" 4.3, !- Speed 1 Reference Unit Gross Rated Cooling COP {W/W}",
61366136
" 0.05, !- Speed 1 Reference Unit Rated Air Flow Rate {m3/s}",
61376137
" , !- 2017 Speed 1 Rated Evaporator Fan Power Per Volume Flow Rate {W/(m3/s)}",
61386138
" , !- 2023 Speed 1 Rated Evaporator Fan Power Per Volume Flow Rate {W/(m3/s)}",
@@ -6142,24 +6142,56 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_ValidateVarSpeedCoolingCoil)
61426142
" HPCoolingCAPFFF, !- Speed 1 Total Cooling Capacity Function of Air Flow Fraction Curve Name",
61436143
" HPCoolingEIRFTemp, !- Speed 1 Energy Input Ratio Function of Temperature Curve Name",
61446144
" HPCoolingEIRFFF; !- Speed 1 Energy Input Ratio Function of Air Flow Fraction Curve Name",
6145+
"",
6146+
" Coil:Heating:DX:VariableSpeed,",
6147+
" Super Heating Coil, !- Name",
6148+
" Node_1, !- Indoor Air Inlet Node Name",
6149+
" Node_2, !- Indoor Air Outlet Node Name",
6150+
" 1, !- Number of Speeds {dimensionless}",
6151+
" 1, !- Nominal Speed Level {dimensionless}",
6152+
" autosize, !- Rated Heating Capacity At Selected Nominal Speed Level {W}",
6153+
" autosize, !- Rated Air Flow Rate At Selected Nominal Speed Level {m3/s}",
6154+
" HPHEATPLFFPLR, !- Energy Part Load Fraction Curve Name",
6155+
" , !- Defrost Energy Input Ratio Function of Temperature Curve Name",
6156+
" -8, !- Minimum Outdoor Dry-Bulb Temperature for Compressor Operation {C}",
6157+
" , !- Outdoor Dry-Bulb Temperature to Turn On Compressor {C}",
6158+
" 5, !- Maximum Outdoor Dry-Bulb Temperature for Defrost Operation {C}",
6159+
" , !- Crankcase Heater Capacity {W}",
6160+
" , !- Crankcase Heater Capacity Function of Temperature Curve Name",
6161+
" 10, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater Operation {C}",
6162+
" ReverseCycle, !- Defrost Strategy",
6163+
" Timed, !- Defrost Control",
6164+
" 0.058333, !- Defrost Time Period Fraction",
6165+
" , !- Resistive Defrost Heater Capacity {W}",
6166+
" 17500, !- Speed 1 Reference Unit Gross Rated Heating Capacity {W}",
6167+
" 4.5, !- Speed 1 Reference Unit Gross Rated Heating COP {W/W}",
6168+
" 0.05, !- Speed 1 Reference Unit Rated Air Flow Rate {m3/s}",
6169+
" 773.3, !- 2017 Speed 1 Rated Supply Air Fan Power Per Volume Flow Rate {W/(m3/s)}",
6170+
" 934.4, !- 2023 Speed 1 Rated Supply Air Fan Power Per Volume Flow Rate {W/(m3/s)}",
6171+
" HPHeatingCAPFTemp, !- Speed 1 Heating Capacity Function of Temperature Curve Name",
6172+
" HPHeatingCAPFFF, !- Speed 1 Total Heating Capacity Function of Air Flow Fraction Curve Name",
6173+
" HPHeatingEIRFTemp, !- Speed 1 Energy Input Ratio Function of Temperature Curve Name",
6174+
" HPHeatingEIRFFF; !- Speed 1 Energy Input Ratio Function of Air Flow Fraction Curve Name ",
61456175
});
61466176

61476177
ASSERT_TRUE(process_idf(idf_objects));
61486178

61496179
state->dataAirSystemsData->PrimaryAirSystems.allocate(1);
61506180
state->dataAirSystemsData->PrimaryAirSystems(1).NumBranches = 1;
61516181
state->dataAirSystemsData->PrimaryAirSystems(1).Branch.allocate(1);
6152-
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).TotalComponents = 1;
6153-
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp.allocate(1);
6182+
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).TotalComponents = 2;
6183+
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp.allocate(2);
61546184
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).TypeOf = "Coil:Cooling:DX:VariableSpeed";
61556185
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).Name = "VariableSpeedCoolingCoil";
6186+
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).TypeOf = "Coil:Heating:DX:VariableSpeed";
6187+
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).Name = "VariableSpeedHeatingCoil";
61566188

6157-
state->afn->DisSysNumOfCoils = 1;
6158-
state->afn->DisSysCompCoilData.allocate(1);
6189+
state->afn->DisSysNumOfCoils = 2;
6190+
state->afn->DisSysCompCoilData.allocate(2);
61596191
state->afn->DisSysCompCoilData(1).EPlusType = "COIL:COOLING:DX:VARIABLESPEED";
61606192
state->afn->DisSysCompCoilData(1).name = "Super Coil";
6161-
6162-
int num_coils = state->dataInputProcessing->inputProcessor->getNumObjectsFound(*state, "Coil:Cooling:DX:VariableSpeed");
6193+
state->afn->DisSysCompCoilData(2).EPlusType = "COIL:HEATING:DX:VARIABLESPEED";
6194+
state->afn->DisSysCompCoilData(2).name = "Super Heating Coil";
61636195

61646196
state->afn->validate_distribution();
61656197
}

0 commit comments

Comments
 (0)