Skip to content

Commit

Permalink
Some renaming and shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
amirroth committed Jun 22, 2023
1 parent 7a6d510 commit f3aed9b
Show file tree
Hide file tree
Showing 21 changed files with 1,391 additions and 1,513 deletions.
36 changes: 18 additions & 18 deletions src/EnergyPlus/AirflowNetwork/src/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4802,7 +4802,7 @@ namespace AirflowNetwork {
n = AirflowNetworkNodeData(i).EPlusZoneNum;
AirflowNetworkNodeData(i).NumOfLinks = 0;
if (n > 0 && AirflowNetworkNodeData(i).RAFNNodeNum > 0) {
m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(n).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirflowNetworkNodeID = i;
m_state.dataRoomAirMod->AFNZoneInfo(n).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirflowNetworkNodeID = i;
for (j = 1; j <= AirflowNetworkNumOfSurfaces; ++j) {
if (AirflowNetworkLinkageData(j).NodeNums[0] == i) {
AirflowNetworkNodeData(i).NumOfLinks = AirflowNetworkNodeData(i).NumOfLinks + 1;
Expand All @@ -4813,21 +4813,21 @@ namespace AirflowNetwork {
}
}
if (AirflowNetworkNodeData(i).RAFNNodeNum > 0) {
for (j = 1; j <= m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(n).NumOfAirNodes; ++j) {
if (m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(n).Node(j).AirflowNetworkNodeID == i) {
m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(n).Node(j).NumOfAirflowLinks = AirflowNetworkNodeData(i).NumOfLinks;
m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(n).Node(j).Link.allocate(AirflowNetworkNodeData(i).NumOfLinks);
for (j = 1; j <= m_state.dataRoomAirMod->AFNZoneInfo(n).NumOfAirNodes; ++j) {
if (m_state.dataRoomAirMod->AFNZoneInfo(n).Node(j).AirflowNetworkNodeID == i) {
m_state.dataRoomAirMod->AFNZoneInfo(n).Node(j).NumOfAirflowLinks = AirflowNetworkNodeData(i).NumOfLinks;
m_state.dataRoomAirMod->AFNZoneInfo(n).Node(j).Link.allocate(AirflowNetworkNodeData(i).NumOfLinks);
k = 1;
for (int m = 1; m <= AirflowNetworkNumOfSurfaces; ++m) {
if (AirflowNetworkLinkageData(m).NodeNums[0] == i) {
m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(n).Node(j).Link(k).AirflowNetworkLinkSimuID = m;
m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(n).Node(j).Link(k).AirflowNetworkLinkageDataID = m;
m_state.dataRoomAirMod->AFNZoneInfo(n).Node(j).Link(k).AirflowNetworkLinkSimuID = m;
m_state.dataRoomAirMod->AFNZoneInfo(n).Node(j).Link(k).AirflowNetworkLinkageDataID = m;
k = k + 1;
if (k > AirflowNetworkNodeData(i).NumOfLinks) break;
}
if (AirflowNetworkLinkageData(m).NodeNums[1] == i) {
m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(n).Node(j).Link(k).AirflowNetworkLinkSimuID = m;
m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(n).Node(j).Link(k).AirflowNetworkLinkageDataID = m;
m_state.dataRoomAirMod->AFNZoneInfo(n).Node(j).Link(k).AirflowNetworkLinkSimuID = m;
m_state.dataRoomAirMod->AFNZoneInfo(n).Node(j).Link(k).AirflowNetworkLinkageDataID = m;
k = k + 1;
if (k > AirflowNetworkNodeData(i).NumOfLinks) break;
}
Expand Down Expand Up @@ -5386,8 +5386,8 @@ namespace AirflowNetwork {
}
if (AirflowNetworkNodeData(i).RAFNNodeNum > 0) {
ZoneNum = AirflowNetworkNodeData(i).EPlusZoneNum;
m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirTemp = 23.0;
m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).HumRat = 0.0;
m_state.dataRoomAirMod->AFNZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirTemp = 23.0;
m_state.dataRoomAirMod->AFNZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).HumRat = 0.0;
}
}

Expand Down Expand Up @@ -5469,13 +5469,13 @@ namespace AirflowNetwork {

if (AirflowNetworkNodeData(i).RAFNNodeNum > 0) {
ZoneNum = AirflowNetworkNodeData(i).EPlusZoneNum;
if (m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(ZoneNum)
if (m_state.dataRoomAirMod->AFNZoneInfo(ZoneNum)
.Node(AirflowNetworkNodeData(i).RAFNNodeNum)
.AirflowNetworkNodeID == i) {
AirflowNetworkNodeSimu(i).TZ =
m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirTemp;
m_state.dataRoomAirMod->AFNZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirTemp;
AirflowNetworkNodeSimu(i).WZ =
m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).HumRat;
m_state.dataRoomAirMod->AFNZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).HumRat;
}
}
}
Expand Down Expand Up @@ -7736,9 +7736,9 @@ namespace AirflowNetwork {
if (AirflowNetworkNodeData(i).RAFNNodeNum > 0 && MA((i - 1) * AirflowNetworkNumOfNodes + i) < 0.9e10) {
MA((i - 1) * AirflowNetworkNumOfNodes + i) = 1.0e10;
ZoneNum = AirflowNetworkNodeData(i).EPlusZoneNum;
if (m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirflowNetworkNodeID ==
if (m_state.dataRoomAirMod->AFNZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirflowNetworkNodeID ==
i) {
MV(i) = m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirTemp * 1.0e10;
MV(i) = m_state.dataRoomAirMod->AFNZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirTemp * 1.0e10;
}
}
}
Expand Down Expand Up @@ -8030,9 +8030,9 @@ namespace AirflowNetwork {
if (AirflowNetworkNodeData(i).RAFNNodeNum > 0 && MA((i - 1) * AirflowNetworkNumOfNodes + i) < 0.9e10) {
MA((i - 1) * AirflowNetworkNumOfNodes + i) = 1.0e10;
ZoneNum = AirflowNetworkNodeData(i).EPlusZoneNum;
if (m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirflowNetworkNodeID ==
if (m_state.dataRoomAirMod->AFNZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).AirflowNetworkNodeID ==
i) {
MV(i) = m_state.dataRoomAirMod->RoomAirflowNetworkZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).HumRat * 1.0e10;
MV(i) = m_state.dataRoomAirMod->AFNZoneInfo(ZoneNum).Node(AirflowNetworkNodeData(i).RAFNNodeNum).HumRat * 1.0e10;
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/EnergyPlus/ConvectionCoefficients.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1981,9 +1981,9 @@ void CalcDetailedHcInForDVModel(EnergyPlusData &state,
}

assert(state.dataRoomAirMod->AirModel.allocated());
if (state.dataRoomAirMod->AirModel(surface.Zone).AirModel == RoomAir::RoomAirModel::UCSDDV ||
state.dataRoomAirMod->AirModel(surface.Zone).AirModel == RoomAir::RoomAirModel::UCSDUFI ||
state.dataRoomAirMod->AirModel(surface.Zone).AirModel == RoomAir::RoomAirModel::UCSDUFE) {
if (state.dataRoomAirMod->AirModel(surface.Zone).AirModel == RoomAir::RoomAirModel::DispVent3Node ||
state.dataRoomAirMod->AirModel(surface.Zone).AirModel == RoomAir::RoomAirModel::UFADInt ||
state.dataRoomAirMod->AirModel(surface.Zone).AirModel == RoomAir::RoomAirModel::UFADExt) {

// Set HConvIn using the proper correlation based on DeltaTemp and CosTiltSurf
if (state.dataSurface->surfIntConv(SurfNum).userModelNum != 0) {
Expand All @@ -1996,7 +1996,7 @@ void CalcDetailedHcInForDVModel(EnergyPlusData &state,
-surface.CosTilt); // negative CosTilt because CosTilt is relative to exterior
}

} else if (state.dataRoomAirMod->AirModel(surface.Zone).AirModel == RoomAir::RoomAirModel::UCSDCV) {
} else if (state.dataRoomAirMod->AirModel(surface.Zone).AirModel == RoomAir::RoomAirModel::CrossVent) {

Hf = 4.3 * Vhc()(surface.Zone);

Expand Down
Loading

5 comments on commit f3aed9b

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HVACGlobals1 (amirroth) - Win64-Windows-10-VisualStudio-16: OK (2663 of 2663 tests passed, 0 test warnings)

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.

HVACGlobals1 (amirroth) - x86_64-MacOS-10.17-clang-13.0.0: OK (3436 of 3436 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.

HVACGlobals1 (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.3: OK (3477 of 3477 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HVACGlobals1 (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.3-UnitTestsCoverage-Debug: OK (1890 of 1890 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.

HVACGlobals1 (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.3-IntegrationCoverage-Debug: OK (776 of 777 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 776
  • Failed: 1

Build Badge Test Badge Coverage Badge

Please sign in to comment.