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.05k stars 378 forks source link

AirTerminal:SingleDuct:VAV:Reheat providing cooling when Availability Schedule is Zero #4285

Closed BobHenninger closed 8 years ago

BobHenninger commented 10 years ago

User complains that he is getting mechanical ventilation supplied to zones when the availability schedule for the AirTerminal:SingleDuct:VAV:Reheat is set to 0 for July and August. In the Helpdesk Ticket there is a link to a web site file that I guess shows the results of this but when I try and open the link it says that the file is no longer available. I think the problem is that there should be no cooling available from the AHU for those cases where the availability schedule is 0 (July and August). But when running the file with v8.1 there is still coolling being provided, for example, by system named 0ingresso:Zone1 Single Duct VAV Reheat during July. So if I'm understanding the user's problem correctly this issue is NOT FIXED.

Helpdesk Ticket 8557 User file bsmBLC20130916.idf

mjwitte commented 9 years ago

@wfbuhl @rraustad @EnergyArchmage @Myoldmopar I'm struggling to find a fix for this. The user file has a VAV air handler with about 20 zones on it. During the summer months, most of the VAV terminal units are scheduled off, and only one or two terminal units are supposed to be active. The VAV terminal units check their schedule only on the first hvac iteration and sets max/min available to zero. But sometime during the iterations, only for some timesteps, the airloop is resetting that and the VAV boxes which are supposed to be off start operating at their min flow rate. I tried adding a check of the schedule and reset to zero on later iterations (which is what direct air does), but this causes mass flow imbalances and max iteration errors.

I've tried to trace when the VAV inlet max available gets reset but I can't find it. Can one of you help me understand the airloop mass flow logic to sort this out?

I've also tried to reproduce the problem with a smaller example file and there the VAV terminal units stay off as expected.

Some pertinent code is: https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/SingleDuct.cc#L1647

https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/DirectAirManager.cc#L408

rraustad commented 9 years ago

These lines look suspicious, especially if there are multiple iterations.

line 1680 SingleDuct //Do a check and make sure that the max and min available(control) flow is // between the physical max and min while operating. SysInlet( SysNum ).AirMassFlowRateMaxAvail = min( Sys( SysNum ).AirMassFlowRateMax, Node( InletNode ).MassFlowRateMaxAvail ); SysInlet( SysNum ).AirMassFlowRateMinAvail = min( max( Node( OutletNode ).MassFlowRateMin, Node( InletNode ).MassFlowRateMinAvail ), SysInlet( SysNum ).AirMassFlowRateMaxAvail );

line 4141 //After all of the Oulets are updated the mass flow information needs to be // passed back to the system inlet. Node( InletNode ).MassFlowRate = SysOutlet( SysNum ).AirMassFlowRate; Node( OutletNode ).MassFlowRateMaxAvail = min( SysOutlet( SysNum ).AirMassFlowRateMaxAvail, Node( OutletNode ).MassFlowRateMax ); Node( OutletNode ).MassFlowRateMinAvail = SysOutlet( SysNum ).AirMassFlowRateMinAvail;

Might be able to check the schedule here???

On 2/6/2015 10:08 AM, Michael J. Witte wrote:

@wfbuhl https://github.com/wfbuhl @rraustad https://github.com/rraustad @EnergyArchmage https://github.com/EnergyArchmage @Myoldmopar https://github.com/Myoldmopar I'm struggling to find a fix for this. The user file has a VAV air handler with about 20 zones on it. During the summer months, most of the VAV terminal units are scheduled off, and only one or two terminal units are supposed to be active. The VAV terminal units check their schedule only on the first hvac iteration and sets max/min available to zero. But sometime during the iterations, only for some timesteps, the airloop is resetting that and the VAV boxes which are supposed to be off start operating at their min flow rate. I tried adding a check of the schedule and reset to zero on later iterations (which is what direct air does), but this causes mass flow imbalances and max iteration errors.

I've tried to trace when the VAV inlet max available gets reset but I can't find it. Can one of you help me understand the airloop mass flow logic to sort this out?

I've also tried to reproduce the problem with a smaller example file and there the VAV terminal units stay off as expected.

Some pertinent code is: https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/SingleDuct.cc#L1647

https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/DirectAirManager.cc#L408

— Reply to this email directly or view it on GitHub https://github.com/NREL/EnergyPlus/issues/4285#issuecomment-73250284.

Richard Raustad Florida Solar Energy Center 1679 Clearlake Road Cocoa, FL 32922 Ph: (321)638-1454 http://www.fsec.ucf.edu/en/

Program Director Electric Vehicle Transportation Center http://evtc.fsec.ucf.edu/

mjwitte commented 8 years ago

While working on the link infiltration feature, ran into some max iteration problems. The extra reporting logs show a pattern of six values that repeat. I think I've found the source of the pattern of six values. In HVACManager::SimSelectedEquipment.

                if ( SimZoneEquipment ) {
                    if ( ( IterAir == 1 ) && ( ! FlowMaxAvailAlreadyReset ) ) { // don't do reset if already done in FirstHVACIteration
                        ResetTerminalUnitFlowLimits();
                        FlowResolutionNeeded = true;
                    } else {
                        ResolveAirLoopFlowLimits();
                        FlowResolutionNeeded = false;
                    }

This is within the IterAir loop in SimSelectedEquipment and it fires every time IterAir == 1, because FlowMaxAvailAlreadyReset is being set to false within the IterAir loop - seems like that line should be _out_side the IterAir loop. No, in fact it should be outside this routine. This code was added for CR7781 #2561 on Feb 27, 2010 which stemmed from problems with some terminal units scheduled off for part of the year. https://github.com/NREL/EnergyPlusArchive/commit/c8c4ecb752714b44b8b15de074fad81d9139d685

ResetTerminalUnitFlowLimits resets all the terminal unit inlet node MassFlowRateMaxAvail (and Min) to the hard design flow rates without any regard to schedules or other things that may be varying. This is find during FirstHVACIteration, but looks suspicious here. This probably explains why I couldn't get the VAV terminal unit schedule to stick. Note that IterAir is repeated up to six times (hardwired iteration limit) and then goes back up to the main HVAC iteration loop (HVACManagerIteration whcih is the one that has a user-controlled max that defaults to 20).

rraustad commented 8 years ago

It looks to me as if it should be ( removed the ! ):

if ( ( IterAir == 1 ) && ( FlowMaxAvailAlreadyReset ) ) { // don't do reset if already done in FirstHVACIteration

... given that flag is set to false after this point

MaxAvail = Max on FirstHVACIteration, then MaxAvail = Max on next iteration, then never reset again.

I can't even see why you need that flag since the code would do that anyway with just IterAir=1. Even the comment seems wrong since reset IS done during FirstHVACIteration?

if ( FirstHVACIteration ) { ResetTerminalUnitFlowLimits(); FlowMaxAvailAlreadyReset = true; } else {

So I don't understand this logic. This code seems backwards and skips MaxAvail=Max only on the second iteration (when FirstHVAC=false the first time). Why would that need to be done? It's either clamp it (MaxAvail not reset) or never clamp it (MaxAvail=Max), isn't it?

Is the original defect file still available?

mjwitte commented 8 years ago

@rraustad Yes, I have the original defect file. If you read the thread in #2561 CR7781, you'll see that this was part 2 of the fix to reduce the number of diffs caused by the initial fix. In my link infiltration development version, I've kept the reset call up in the FirstHVACIteration block and removed it from here. Running a test suite to see what kinds of diffs this introduces.

mjwitte commented 8 years ago

@rraustad 7781 defect files added here https://github.com/NREL/EnergyPlusDevSupport/tree/master/DefectFiles/2000s/2561

rraustad commented 8 years ago

Closed via #5159