Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Protect divide by 0 for Terminal Unit with Zone Floor Area = 0 #5568
Pull request overview
Zone floor area must be greater than 0 when AirTerminal:SingleDuct:VAV:Reheat input for Maximum Flow per Zone Floor Area During Reheat is entered as AutoCalculate (#5273).
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
This will not be exhaustively relevant to every PR.
…Size Maximum Flow per Zone Floor Area during Reheat is AutoCalculate
The way this is now may be too restrictive. If floor area = 0, then they get no flow during reheat. If I only set Sys( SysNum ).MaxAirVolFlowRateDuringReheat = 0, and leave Sys( SysNum ).MaxAirVolFractionDuringReheat to calculate it's own value, then MaxAirVolFractionDuringReheat = 0.3 and MaxAirVolFlowRateDuringReheat will wind up as 0.367 since:
The user won't know what is setting the maximum flow during reheat, unless I show a warning, but then there is already a warning in the err file about zone floor area = 0.
I guess this needs more discussion and can wait until after release.
Decided that discussion above dictated what needed to be done here. Since the model uses the max of the Maximum Flow per Zone Floor Area During Reheat and Maximum Flow Fraction During Reheat, they should each size independently and be used to calculate the final Maximum Flow per Zone Floor Area During Reheat. When you think about it, as zone floor area goes to 0, the Maximum Flow Fraction During Reheat becomes the limit. This code does just that.