Skip to content

Commit 08348b5

Browse files
committed
Move dataEnvrn settings above any functions that call SetOANodeValues.
1 parent 6ca9c26 commit 08348b5

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/EnergyPlus/MixedAir.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4683,7 +4683,7 @@ void CalcOAMixer(EnergyPlusData &state, int const OAMixerNum)
46834683
Psychrometrics::PsyTdbFnHW(state.dataMixedAir->OAMixer(OAMixerNum).MixEnthalpy, state.dataMixedAir->OAMixer(OAMixerNum).MixHumRat);
46844684

46854685
// Check for saturation temperature > dry-bulb temperature and modify temperature at constant enthalpy
4686-
auto T_sat =
4686+
Real64 T_sat =
46874687
Psychrometrics::PsyTsatFnHPb(state, state.dataMixedAir->OAMixer(OAMixerNum).MixEnthalpy, state.dataMixedAir->OAMixer(OAMixerNum).MixPressure);
46884688
if (state.dataMixedAir->OAMixer(OAMixerNum).MixTemp < T_sat) {
46894689
state.dataMixedAir->OAMixer(OAMixerNum).MixTemp = T_sat;

tst/EnergyPlus/unit/PackagedTerminalHeatPump.unit.cc

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3881,6 +3881,14 @@ TEST_F(EnergyPlusFixture, PTACDrawAirfromReturnNodeAndPlenum_Test)
38813881
state->dataZoneEnergyDemand->DeadBandOrSetback.allocate(state->dataGlobal->NumOfZones);
38823882
state->dataZoneEnergyDemand->DeadBandOrSetback = 0.0;
38833883

3884+
state->dataEnvrn->OutDryBulbTemp = 30.0;
3885+
state->dataEnvrn->OutHumRat = 0.0015;
3886+
state->dataEnvrn->OutBaroPress = 101325.0;
3887+
state->dataEnvrn->OutEnthalpy = Psychrometrics::PsyHFnTdbW(30.0, 0.0015);
3888+
state->dataEnvrn->WindSpeed = 4.9;
3889+
state->dataEnvrn->WindDir = 270.0;
3890+
state->dataEnvrn->StdRhoAir = 1.2;
3891+
38843892
ZoneAirLoopEquipmentManager::GetZoneAirLoopEquipment(*state);
38853893
SimAirServingZones::GetAirPathData(*state);
38863894
state->dataSimAirServingZones->GetAirLoopInputFlag = false;
@@ -3902,13 +3910,6 @@ TEST_F(EnergyPlusFixture, PTACDrawAirfromReturnNodeAndPlenum_Test)
39023910
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(i).RemainingOutputReqToCoolSP = -5000.0;
39033911
state->dataZoneEnergyDemand->ZoneSysEnergyDemand(i).RemainingOutputReqToHeatSP = -200.0;
39043912
}
3905-
state->dataEnvrn->OutDryBulbTemp = 30.0;
3906-
state->dataEnvrn->OutHumRat = 0.0015;
3907-
state->dataEnvrn->OutBaroPress = 101325.0;
3908-
state->dataEnvrn->OutEnthalpy = Psychrometrics::PsyHFnTdbW(30.0, 0.0015);
3909-
state->dataEnvrn->WindSpeed = 4.9;
3910-
state->dataEnvrn->WindDir = 270.0;
3911-
state->dataEnvrn->StdRhoAir = 1.2;
39123913
GetZoneAirSetPoints(*state);
39133914
state->dataHeatBalFanSys->TempControlType.allocate(6);
39143915
state->dataHeatBalFanSys->TempControlType = HVAC::ThermostatType::DualSetPointWithDeadBand;
@@ -4009,8 +4010,8 @@ TEST_F(EnergyPlusFixture, PTACDrawAirfromReturnNodeAndPlenum_Test)
40094010
// EXPECT_NEAR(23.153277047505515, state->dataLoopNodes->Node(11).Temp, 0.001);
40104011

40114012
// ATMixer primary air inlet node, or air loop SAT, T = OAT + fan heat
4012-
EXPECT_NEAR(34.2002, state->dataLoopNodes->Node(ATMixer1PriInNode).Temp, 0.001);
4013-
EXPECT_NEAR(0.0003, state->dataLoopNodes->Node(ATMixer1PriInNode).HumRat, 0.001);
4013+
EXPECT_NEAR(31.1803, state->dataLoopNodes->Node(ATMixer1PriInNode).Temp, 0.001);
4014+
EXPECT_NEAR(0.0015, state->dataLoopNodes->Node(ATMixer1PriInNode).HumRat, 0.001);
40144015
EXPECT_NEAR(35169.5566, state->dataLoopNodes->Node(ATMixer1PriInNode).Enthalpy, 0.001);
40154016

40164017
// *** this next test is different from develop, air loop is on, this pri/ret flow was 0 before
@@ -4027,7 +4028,7 @@ TEST_F(EnergyPlusFixture, PTACDrawAirfromReturnNodeAndPlenum_Test)
40274028
// same temperature test as above commented out test (23.15327704750551), now shows 21.2 C
40284029
// how do you mix 2 air streams with T1in=31.18 and T2in=23.15 and get Tout=21.23 ??
40294030
// must be a node enthalpy issue with this unit test?
4030-
EXPECT_NEAR(21.5613, state->dataLoopNodes->Node(ATMixer1AirOutNode).Temp, 0.001);
4031+
EXPECT_NEAR(21.2317, state->dataLoopNodes->Node(ATMixer1AirOutNode).Temp, 0.001);
40314032
EXPECT_NEAR(0.324036, state->dataLoopNodes->Node(ATMixer1AirOutNode).MassFlowRate, 0.001);
40324033

40334034
// mass balance zone 1 ATMixer outlet enthalpy based on pri and sec inlet stream enthalpy

0 commit comments

Comments
 (0)