Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into Post241QuickChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar committed Apr 24, 2024
2 parents 0b206e0 + 140469e commit 424652a
Show file tree
Hide file tree
Showing 236 changed files with 13,260 additions and 14,976 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/epjson.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest] # , macos-latest] # temporarily commenting because it is failing out of nowhere

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions src/EnergyPlus/AirLoopHVACDOAS.cc
Expand Up @@ -545,13 +545,13 @@ namespace AirLoopHVACDOAS {

case ValidEquipListType::FanComponentModel:
thisDOAS.m_FanTypeNum = SimAirServingZones::CompType::Fan_ComponentModel;
Fans::GetFanIndex(state, CompName, thisDOAS.m_FanIndex, errorsFound);
thisDOAS.m_FanIndex = Fans::GetFanIndex(state, CompName);
thisDOAS.FanName = CompName;
if (CompNum == 1) {
thisDOAS.FanBeforeCoolingCoilFlag = true;
}
thisOutsideAirSys.InletNodeNum(CompNum) = Fans::GetFanInletNode(state, typeNameUC, CompName, InletNodeErrFlag);
thisOutsideAirSys.OutletNodeNum(CompNum) = Fans::GetFanOutletNode(state, typeNameUC, CompName, OutletNodeErrFlag);
thisOutsideAirSys.InletNodeNum(CompNum) = Fans::GetFanInletNode(state, thisDOAS.m_FanIndex);
thisOutsideAirSys.OutletNodeNum(CompNum) = Fans::GetFanOutletNode(state, thisDOAS.m_FanIndex);
thisDOAS.m_FanInletNodeNum = thisOutsideAirSys.InletNodeNum(CompNum);
thisDOAS.m_FanOutletNodeNum = thisOutsideAirSys.OutletNodeNum(CompNum);
FanOrder = CompNum;
Expand Down
23 changes: 12 additions & 11 deletions src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Elements.hpp
Expand Up @@ -49,6 +49,7 @@
#define AIRFLOWNETWORK_ELEMENTS_HPP

#include "AirflowNetwork/Properties.hpp"
#include <EnergyPlus/DataHVACGlobals.hh>
#include <EnergyPlus/EPVector.hh>

namespace EnergyPlus {
Expand Down Expand Up @@ -1083,20 +1084,20 @@ namespace AirflowNetwork {
struct ConstantVolumeFan : public AirflowElement // Constant volume fan component
{
// Members
Real64 FlowRate; // Air volume flow rate
Real64 Ctrl; // Control ratio
int FanTypeNum; // Fan type: Constant volume or ONOFF
int FanIndex; // Fan index
int InletNode; // Inlet node number
int OutletNode; // Outlet node number
Real64 MaxAirMassFlowRate; // Max Specified MAss Flow Rate of Damper [kg/s]
int AirLoopNum; // Air loop number
bool FanModelFlag; // True, this fan is FAN:SYSTEMMODEL
Real64 FlowRate; // Air volume flow rate
Real64 Ctrl; // Control ratio
DataHVACGlobals::FanType fanType; // Fan type: Constant volume or ONOFF
int FanIndex; // Fan index
int InletNode; // Inlet node number
int OutletNode; // Outlet node number
Real64 MaxAirMassFlowRate; // Max Specified MAss Flow Rate of Damper [kg/s]
int AirLoopNum; // Air loop number
bool FanModelFlag; // True, this fan is FAN:SYSTEMMODEL

// Default Constructor
ConstantVolumeFan()
: FlowRate(0.0), Ctrl(0.0), FanTypeNum(0), FanIndex(0), InletNode(0), OutletNode(0), MaxAirMassFlowRate(0.0), AirLoopNum(0),
FanModelFlag(false)
: FlowRate(0.0), Ctrl(0.0), fanType(DataHVACGlobals::FanType::Invalid), FanIndex(0), InletNode(0), OutletNode(0), MaxAirMassFlowRate(0.0),
AirLoopNum(0), FanModelFlag(false)
{
}

Expand Down
Expand Up @@ -350,8 +350,8 @@ namespace AirflowNetwork {
int DisSysNumOfTermUnits = 0;
int DisSysNumOfLinks = 0;
int NumOfExtNodes = 0;
Real64 IncAng = 0.0; // Wind incidence angle relative to facade normal (deg)
int SupplyFanType = 0; // Supply air fan type
Real64 IncAng = 0.0; // Wind incidence angle relative to facade normal (deg)
DataHVACGlobals::FanType supplyFanType = DataHVACGlobals::FanType::Invalid; // Supply air fan type
Real64 MaxOnOffFanRunTimeFraction = 0.0; // max Run time fraction for an On/Off fan flow rate among airloops
Real64 CurrentEndTimeLast = 0.0; // last end time
Real64 TimeStepSysLast = 0.0; // last system time step
Expand Down Expand Up @@ -575,7 +575,7 @@ namespace AirflowNetwork {
DisSysNumOfLinks = 0;
NumOfExtNodes = 0;
IncAng = 0.0;
SupplyFanType = 0;
supplyFanType = DataHVACGlobals::FanType::Invalid;
MaxOnOffFanRunTimeFraction = 0.0;
CurrentEndTimeLast = 0.0;
TimeStepSysLast = 0.0;
Expand Down
10 changes: 3 additions & 7 deletions src/EnergyPlus/AirflowNetwork/src/Elements.cpp
Expand Up @@ -697,9 +697,6 @@ namespace AirflowNetwork {
// This subroutine solves airflow for a constant flow rate airflow component -- using standard interface.

// Using/Aliasing
using DataHVACGlobals::FanType_SimpleConstVolume;
using DataHVACGlobals::FanType_SimpleOnOff;
using DataHVACGlobals::FanType_SimpleVAV;
auto &NumPrimaryAirSys = state.dataHVACGlobal->NumPrimaryAirSys;

// SUBROUTINE PARAMETER DEFINITIONS:
Expand All @@ -717,7 +714,7 @@ namespace AirflowNetwork {

int AirLoopNum = state.afn->AirflowNetworkLinkageData(i).AirLoopNum;

if (FanTypeNum == FanType_SimpleOnOff) {
if (fanType == DataHVACGlobals::FanType::OnOff) {
if (state.dataAirLoop->AirLoopAFNInfo(AirLoopNum).LoopFanOperationMode == CycFanCycComp &&
state.dataLoopNodes->Node(InletNode).MassFlowRate == 0.0) {
NF = GenericDuct(0.1, 0.001, LFLAG, PDROP, propN, propM, F, DF);
Expand All @@ -733,7 +730,7 @@ namespace AirflowNetwork {
(1.0 - state.dataAirLoop->AirLoopAFNInfo(AirLoopNum).LoopCompCycRatio);
}
}
} else if (FanTypeNum == FanType_SimpleConstVolume) {
} else if (fanType == DataHVACGlobals::FanType::Constant) {
if (state.dataLoopNodes->Node(InletNode).MassFlowRate > 0.0) {
F[0] = FlowRate * Ctrl;
} else if (NumPrimaryAirSys > 1 && state.dataLoopNodes->Node(InletNode).MassFlowRate <= 0.0) {
Expand All @@ -743,7 +740,7 @@ namespace AirflowNetwork {
if (state.afn->MultiSpeedHPIndicator == 2) {
F[0] = state.dataAirLoop->AirLoopAFNInfo(AirLoopNum).LoopSystemOnMassFlowrate;
}
} else if (FanTypeNum == FanType_SimpleVAV) {
} else if (fanType == DataHVACGlobals::FanType::VAV) {
// Check VAV termals with a damper
SumTermFlow = 0.0;
SumFracSuppLeak = 0.0;
Expand Down Expand Up @@ -3270,7 +3267,6 @@ namespace AirflowNetwork {
// This subroutine solves airflow for a constant flow rate airflow component -- using standard interface.

// Using/Aliasing
using DataHVACGlobals::FanType_SimpleOnOff;
using DataHVACGlobals::VerySmallMassFlow;

// SUBROUTINE PARAMETER DEFINITIONS:
Expand Down

0 comments on commit 424652a

Please sign in to comment.