Skip to content

Commit

Permalink
Multiple Airloops - Remove error check, multiple return nodes Part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Jan 10, 2017
1 parent ad8493a commit 646481d
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 39 deletions.
9 changes: 4 additions & 5 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -41532,17 +41532,16 @@ ZoneHVAC:EquipmentConnections,
A5 , \field Zone Air Node Name
\required-field
\type node
A6 , \field Zone Return Air Node Name
\required-field
A6 , \field Zone Return Air Node or NodeList Name
\type node
A7 , \field Zone Return Air Flow Rate Fraction Schedule Name
A7 , \field Zone Return Air Node 1 Flow Rate Fraction Schedule Name
\note This schedule is multiplied times the base return air flow rate.
\note If this field is left blank, the schedule defaults to 1.0 at all times.
\type object-list
\object-list ScheduleNames
A8 ; \field Zone Return Air Flow Rate Basis Node or NodeList Name
A8 ; \field Zone Return Air Node 1 Flow Rate Basis Node or NodeList Name
\note The optional basis node(s) used to calculate the base return air flow
\note rate for this zone. The return air flow rate is the sum of the flow rates
\note rate for the first return air node in this zone. The return air flow rate is the sum of the flow rates
\note at the basis node(s) multiplied by the Zone Return Air Flow Rate Fraction Schedule.
\note If this field is blank, then the base return air flow rate is the total supply
\note inlet flow rate to the zone less the total exhaust node flow rate from the zone.
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/DataAirLoop.hh
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ namespace DataAirLoop {
{
// Members
std::string AirLoopName; // Name of Primary Air System
int NumReturnNodes; // Number of return nodes connected to system
int NumReturnNodes; // Number of return nodes entering primary air system (currently limited to 1 node)
int NumSupplyNodes; // number of supply nodes exiting primary air system
int NumZonesCooled; // number of zones cooled by this primary air system
int NumZonesHeated; // number of zones heated by this primary air system
Array1D_int ZoneEquipReturnNodeNum; // Zone Equip side return air node numbers
Array1D_int ZoneEquipReturnNodeNum; // Zone Equip side return air node numbers (currently limited to 1 node)
Array1D_int ZoneEquipSupplyNodeNum; // Zone equip side supply air node numbers
Array1D_int AirLoopReturnNodeNum; // Air loop side return air node numbers
Array1D_int AirLoopSupplyNodeNum; // Air loop side supply air node numbers
Expand Down
43 changes: 30 additions & 13 deletions src/EnergyPlus/DataZoneEquipment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ namespace DataZoneEquipment {
int IOStat;
std::string InletNodeListName;
std::string ExhaustNodeListName;
std::string ReturnNodeListName;
std::string ReturnFlowBasisNodeListName;
Array1D_string AlphArray;
Array1D< Real64 > NumArray;
Expand Down Expand Up @@ -353,6 +354,7 @@ namespace DataZoneEquipment {

ExhaustNodeListName = "";
InletNodeListName = "";
ReturnNodeListName = "";
ReturnFlowBasisNodeListName = "";

// Look in the input file for zones with air loop and zone equipment attached
Expand Down Expand Up @@ -473,16 +475,7 @@ namespace DataZoneEquipment {
Zone( ZoneEquipConfig( ControlledZoneNum ).ActualZoneNum ).SystemZoneNodeNumber = ZoneEquipConfig( ControlledZoneNum ).ZoneNode;
} // This error already detected and program will be terminated.

ZoneEquipConfig( ControlledZoneNum ).ReturnAirNode = GetOnlySingleNode( AlphArray( 6 ), GetZoneEquipmentDataErrorsFound, CurrentModuleObject, AlphArray( 1 ), NodeType_Air, NodeConnectionType_ZoneReturn, 1, ObjectIsNotParent ); // all return air state variables are
// assigned to this node
if ( ZoneEquipConfig( ControlledZoneNum ).ReturnAirNode != 0 ) {
UniqueNodeError = false;
CheckUniqueNodes( cAlphaFields( 6 ), "NodeName", UniqueNodeError, AlphArray( 6 ), _, AlphArray( 1 ) );
if ( UniqueNodeError ) {
//ShowContinueError( "Occurs for " + trim( cAlphaFields( 1 ) ) + " = " + trim( AlphArray( 1 ) ) );
GetZoneEquipmentDataErrorsFound = true;
}
}
ReturnNodeListName = AlphArray( 6 );
if ( lAlphaBlanks( 7 ) ) {
ZoneEquipConfig( ControlledZoneNum ).ReturnFlowSchedPtrNum = ScheduleAlwaysOn;
} else {
Expand Down Expand Up @@ -729,7 +722,7 @@ namespace DataZoneEquipment {
ZoneEquipConfig( ControlledZoneNum ).AirDistUnitHeat( NodeNum ).OutNode = 0;
}
} else {
ShowContinueError( "Invalid inlet node or NodeList name in ZoneHVAC:EquipmentConnections object, for Zone = " + ZoneEquipConfig( ControlledZoneNum ).ZoneName );
ShowContinueError( "Invalid Zone Air Inlet NOde or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone = " + ZoneEquipConfig( ControlledZoneNum ).ZoneName );
GetZoneEquipmentDataErrorsFound = true;
}

Expand All @@ -751,7 +744,31 @@ namespace DataZoneEquipment {
}
}
} else {
ShowContinueError( "Invalid exhaust node or NodeList name in ZoneHVAC:EquipmentConnections object, for Zone=" + ZoneEquipConfig( ControlledZoneNum ).ZoneName );
ShowContinueError( "Invalid Zone Air Exhaust Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone=" + ZoneEquipConfig( ControlledZoneNum ).ZoneName );
GetZoneEquipmentDataErrorsFound = true;
}

NodeListError = false;
GetNodeNums( ReturnNodeListName, NumNodes, NodeNums, NodeListError, NodeType_Air, "ZoneHVAC:EquipmentConnections", ZoneEquipConfig( ControlledZoneNum ).ZoneName, NodeConnectionType_ZoneReturn, 1, ObjectIsNotParent );

if ( !NodeListError ) {
ZoneEquipConfig( ControlledZoneNum ).NumReturnNodes = NumNodes;

ZoneEquipConfig( ControlledZoneNum ).ReturnNode.allocate( NumNodes );

for ( NodeNum = 1; NodeNum <= NumNodes; ++NodeNum ) {
ZoneEquipConfig( ControlledZoneNum ).ReturnNode( NodeNum ) = NodeNums( NodeNum );
// Save the first return air node number in ReturnAirNode (this wil be removed later)
if ( NodeNum == 1 ) ZoneEquipConfig( ControlledZoneNum ).ReturnAirNode = NodeNums( NodeNum );
UniqueNodeError = false;
CheckUniqueNodes( "Zone Return Air Nodes", "NodeNumber", UniqueNodeError, _, NodeNums( NodeNum ), ZoneEquipConfig( ControlledZoneNum ).ZoneName );
if ( UniqueNodeError ) {
//ShowContinueError( "Occurs for Zone = " + trim( AlphArray( 1 ) ) );
GetZoneEquipmentDataErrorsFound = true;
}
}
} else {
ShowContinueError( "Invalid Zone Return Air Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone=" + ZoneEquipConfig( ControlledZoneNum ).ZoneName );
GetZoneEquipmentDataErrorsFound = true;
}

Expand All @@ -767,7 +784,7 @@ namespace DataZoneEquipment {
ZoneEquipConfig( ControlledZoneNum ).ReturnFlowBasisNode( NodeNum ) = NodeNums( NodeNum );
}
} else {
ShowContinueError( "Invalid return air flow rate basis node or NodeList name in ZoneHVAC:EquipmentConnections object, for Zone=" + ZoneEquipConfig( ControlledZoneNum ).ZoneName );
ShowContinueError( "Invalid Zone Return Air Node 1 Flow Rate Basis Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone=" + ZoneEquipConfig( ControlledZoneNum ).ZoneName );
GetZoneEquipmentDataErrorsFound = true;
}

Expand Down
9 changes: 6 additions & 3 deletions src/EnergyPlus/DataZoneEquipment.hh
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,16 @@ namespace DataZoneEquipment {
int EquipListIndex;
std::string ControlListName;
int ZoneNode;
int ReturnAirNode;
int NumInletNodes;
int NumExhaustNodes;
int ReturnAirNode; // first return node number
int NumInletNodes; // number of inlet nodes
int NumExhaustNodes; // number of exhaust nodes
int NumReturnNodes; // number of return air nodes
int NumReturnFlowBasisNodes; // number of return air flow basis nodes
int ReturnFlowSchedPtrNum; // return air flow fraction schedule pointer
bool FlowError; // flow error flag
Array1D_int InletNode; // zone supply air inlet nodes
Array1D_int ExhaustNode; // zone air exhaust nodes
Array1D_int ReturnNode; // zone return air nodes
Array1D_int ReturnFlowBasisNode; // return air flow basis nodes
int ReturnZonePlenumCondNum; // number of the zone's return air plenum
int AirLoopNum; // the air loop index for this controlled zone
Expand Down Expand Up @@ -364,6 +366,7 @@ namespace DataZoneEquipment {
ReturnAirNode( 0 ),
NumInletNodes( 0 ),
NumExhaustNodes( 0 ),
NumReturnNodes( 0 ),
NumReturnFlowBasisNodes( 0 ),
ReturnFlowSchedPtrNum( 0 ),
FlowError( false ),
Expand Down
16 changes: 0 additions & 16 deletions src/EnergyPlus/ZoneEquipmentManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3048,8 +3048,6 @@ namespace ZoneEquipmentManager {
Real64 LatOutputProvided; // latent output delivered by zone equipment (kg/s)
Real64 AirSysOutput;
Real64 NonAirSysOutput;
static bool ZoneHasAirLoopHVACTerminal( false ); // true if zone has an air loop terminal
static bool ZoneHasAirLoopHVACDirectAir( false ); // true if zone has an uncontrolled air loop terminal
static Array1D_bool DirectAirAndAirTerminalWarningIssued; // only warn once for each zone with problems

// Determine flow rate and temperature of supply air based on type of damper
Expand Down Expand Up @@ -3110,8 +3108,6 @@ namespace ZoneEquipmentManager {
ZoneEquipConfig( ControlledZoneNum ).ZoneExh = 0.0;
ZoneEquipConfig( ControlledZoneNum ).ZoneExhBalanced = 0.0;
ZoneEquipConfig( ControlledZoneNum ).PlenumMassFlow = 0.0;
ZoneHasAirLoopHVACTerminal = false;
ZoneHasAirLoopHVACDirectAir = false;
CurZoneEqNum = ControlledZoneNum;

InitSystemOutputRequired( ActualZoneNum, SysOutputProvided, LatOutputProvided );
Expand Down Expand Up @@ -3210,10 +3206,8 @@ namespace ZoneEquipmentManager {

NonAirSystemResponse( ActualZoneNum ) += NonAirSysOutput;
SysOutputProvided = NonAirSysOutput + AirSysOutput;
ZoneHasAirLoopHVACTerminal = true;
} else if ( SELECT_CASE_var == DirectAir_Num ) { // 'AirTerminal:SingleDuct:Uncontrolled'
SimDirectAir( PrioritySimOrder( EquipTypeNum ).EquipName, ControlledZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList( CurZoneEqNum ).EquipIndex( EquipPtr ) );
ZoneHasAirLoopHVACDirectAir = true;
} else if ( SELECT_CASE_var == VRFTerminalUnit_Num ) { // 'ZoneHVAC:TerminalUnit:VariableRefrigerantFlow'
SimulateVRF( PrioritySimOrder( EquipTypeNum ).EquipName, ControlledZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList( CurZoneEqNum ).EquipIndex( EquipPtr ) );

Expand Down Expand Up @@ -3347,16 +3341,6 @@ namespace ZoneEquipmentManager {

UpdateSystemOutputRequired( ActualZoneNum, SysOutputProvided, LatOutputProvided, EquipTypeNum );

if ( ZoneHasAirLoopHVACTerminal && ZoneHasAirLoopHVACDirectAir ) {
// zone has both AirTerminal:SingleDuct:Uncontrolled and another kind of Air terminal unit which is not supported
if ( ! DirectAirAndAirTerminalWarningIssued( ActualZoneNum ) ) {
ShowSevereError( "In zone \"" + ZoneEquipConfig( ControlledZoneNum ).ZoneName + "\" there are too many air terminals served by AirLoopHVAC systems." );
ShowContinueError( "A single zone cannot have both an AirTerminal:SingleDuct:Uncontrolled and also a second AirTerminal:* object." );

DirectAirAndAirTerminalWarningIssued( ActualZoneNum ) = true;
ErrorFlag = true;
}
}
} // zone loop

AirLoopNum = ZoneEquipConfig( ControlledZoneNum ).AirLoopNum;
Expand Down

8 comments on commit 646481d

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

Beyond1Airloop (mjwitte) - x86_64-Linux-Ubuntu-14.04-gcc-4.8: OK (2389 of 2390 tests passed, 0 test warnings)

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

Beyond1Airloop (mjwitte) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed, 0 test warnings)

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

Beyond1Airloop (mjwitte) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-UnitTestsCoverage-Debug: OK (1205 of 1206 tests passed, 0 test warnings)

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.

Beyond1Airloop (mjwitte) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-IntegrationCoverage-Debug: OK (1781 of 1782 tests passed, 0 test warnings)

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.

Beyond1Airloop (mjwitte) - x86_64-Linux-Ubuntu-14.04-custom_check: OK (0 of 0 tests passed, 0 test warnings)

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

Beyond1Airloop (mjwitte) - i386-Windows-7-VisualStudio-14: OK (2298 of 2356 tests passed, 434 test warnings)

  • 434 tests had: BND diffs.

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.

Beyond1Airloop (mjwitte) - Win64-Windows-7-VisualStudio-14: OK (2298 of 2356 tests passed, 434 test warnings)

  • 434 tests had: BND diffs.

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.

Beyond1Airloop (mjwitte) - x86_64-MacOS-10.9-clang: OK (2292 of 2350 tests passed, 514 test warnings)

  • 514 tests had: AUD diffs.
  • 483 tests had: RDD diffs.
  • 432 tests had: BND diffs.

Build Badge Test Badge

Please sign in to comment.