Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Coil:*:DX:VariableSpeed as valid AirflowNetwork:Distribution:Component:Coil #10791

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2156,8 +2156,12 @@ \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
\hyperref[coilheatingdxvariablespeed]{Coil:Heating:DX:VariableSpeed}
\item
\hyperref[coilheatingdesuperheater]{Coil:Heating:Desuperheater}
\end{itemize}
Expand Down
2 changes: 2 additions & 0 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -26706,6 +26706,8 @@ 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:DX:VariableSpeed
\key Coil:Heating:Desuperheater
\key Coil:Heating:Electric:MultiStage
\key Coil:Heating:Gas:MultiStage
Expand Down
22 changes: 20 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 @@ -10622,6 +10620,26 @@ 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:VARIABLESPEED") {
ValidateComponent(
m_state, "Coil:Heating: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:DESUPERHEATER") {
ValidateComponent(
m_state, "Coil:Heating:Desuperheater", DisSysCompCoilData(i).name, IsNotOK, format(RoutineName) + CurrentModuleObject);
Expand Down
96 changes: 96 additions & 0 deletions tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6100,6 +6100,102 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_CheckNumOfFansInAirLoopTest)
EXPECT_TRUE(compare_err_stream(error_string, true));
}

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

" Coil:Cooling:DX:VariableSpeed,",
" Super Coil, !- Name",
" Node_1, !- Indoor Air Inlet Node Name",
" Node_2, !- 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",
"",
" Coil:Heating:DX:VariableSpeed,",
" Super Heating Coil, !- Name",
" Node_1, !- Indoor Air Inlet Node Name",
" Node_2, !- Indoor Air Outlet Node Name",
" 1, !- Number of Speeds {dimensionless}",
" 1, !- Nominal Speed Level {dimensionless}",
" autosize, !- Rated Heating Capacity At Selected Nominal Speed Level {W}",
" autosize, !- Rated Air Flow Rate At Selected Nominal Speed Level {m3/s}",
" HPHEATPLFFPLR, !- Energy Part Load Fraction Curve Name",
" , !- Defrost Energy Input Ratio Function of Temperature Curve Name",
" -8, !- Minimum Outdoor Dry-Bulb Temperature for Compressor Operation {C}",
" , !- Outdoor Dry-Bulb Temperature to Turn On Compressor {C}",
" 5, !- Maximum Outdoor Dry-Bulb Temperature for Defrost Operation {C}",
" , !- Crankcase Heater Capacity {W}",
" , !- Crankcase Heater Capacity Function of Temperature Curve Name",
" 10, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater Operation {C}",
" ReverseCycle, !- Defrost Strategy",
" Timed, !- Defrost Control",
" 0.058333, !- Defrost Time Period Fraction",
" , !- Resistive Defrost Heater Capacity {W}",
" 17500, !- Speed 1 Reference Unit Gross Rated Heating Capacity {W}",
" 4.5, !- Speed 1 Reference Unit Gross Rated Heating COP {W/W}",
" 0.05, !- Speed 1 Reference Unit Rated Air Flow Rate {m3/s}",
" 773.3, !- 2017 Speed 1 Rated Supply Air Fan Power Per Volume Flow Rate {W/(m3/s)}",
" 934.4, !- 2023 Speed 1 Rated Supply Air Fan Power Per Volume Flow Rate {W/(m3/s)}",
" HPHeatingCAPFTemp, !- Speed 1 Heating Capacity Function of Temperature Curve Name",
" HPHeatingCAPFFF, !- Speed 1 Total Heating Capacity Function of Air Flow Fraction Curve Name",
" HPHeatingEIRFTemp, !- Speed 1 Energy Input Ratio Function of Temperature Curve Name",
" HPHeatingEIRFFF; !- 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 = 2;
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp.allocate(2);
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).TypeOf = "Coil:Cooling:DX:VariableSpeed";
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(1).Name = "VariableSpeedCoolingCoil";
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).TypeOf = "Coil:Heating:DX:VariableSpeed";
state->dataAirSystemsData->PrimaryAirSystems(1).Branch(1).Comp(2).Name = "VariableSpeedHeatingCoil";

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

state->afn->validate_distribution();
}

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