NREL / EnergyPlus

EnergyPlus™ is a whole building energy simulation program that engineers, architects, and researchers use to model both energy consumption and water use in buildings.
https://energyplus.net
Other
1.14k stars 392 forks source link

People max/min occupancy appears to be calculated incorrectly if there are multiple People objects in the same zone #8990

Open mjwitte opened 3 years ago

mjwitte commented 3 years ago

Issue overview

Based on reading the code, this appears to be broken, but I haven't produced a defect file to prove this.

The whole max/min people thing in ZoneEquipmentManager::SetUpZoneSizingArrays is broken if there is more than one People object in a zone and the schedules are not the same.

And ZoneMinOccupancy is wrong if there is more than one People object regardless of schedules, because it's multiplying repeatedly by the min schedule value.

A code snippet to illustrate, from SetUpZoneSizingArrays.

        for (PeopleNum = 1; PeopleNum <= state.dataHeatBal->TotPeople; ++PeopleNum) {
            if (state.dataHeatBal->People(PeopleNum).ZonePtr == state.dataSize->FinalZoneSizing(CtrlZoneNum).ActualZoneNum) {
                TotPeopleInZone += (state.dataHeatBal->People(PeopleNum).NumberOfPeople *
                                    state.dataHeatBal->Zone(state.dataSize->FinalZoneSizing(CtrlZoneNum).ActualZoneNum).Multiplier *
                                    state.dataHeatBal->Zone(state.dataSize->FinalZoneSizing(CtrlZoneNum).ActualZoneNum).ListMultiplier);
                SchMax = GetScheduleMaxValue(state, state.dataHeatBal->People(PeopleNum).NumberOfPeoplePtr);
                if (SchMax > 0) {
                    state.dataSize->FinalZoneSizing(CtrlZoneNum).ZonePeakOccupancy = TotPeopleInZone * SchMax;
                } else {
                    state.dataSize->FinalZoneSizing(CtrlZoneNum).ZonePeakOccupancy = TotPeopleInZone;
                }
                ZoneMinOccupancy +=
                    TotPeopleInZone * ScheduleManager::GetScheduleMinValue(state, state.dataHeatBal->People(PeopleNum).NumberOfPeoplePtr);
            }
        }

Details

Some additional details for this issue (if relevant):

Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

matthew-larson commented 3 years ago

I can take a look at this one, unless it's being resolved elsewhere.