-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Airflow Network Default Behavior Enhancements #8454
Conversation
This new feature is one of FSEC tasks. Please let me know your comments and concerns. |
@lgu1234 This makes sense to me. |
@jasondegraw I upload Design Document. Please review. Thanks. |
@@ -1659,6 +1659,7 @@ struct AirflowNetworkData : BaseGlobalStruct | |||
Real64 ExhaustFanMassFlowRate = 0.0; // Exhaust fan flow rate used in PressureStat | |||
int PressureSetFlag = 0; // PressureSet flag | |||
Real64 ReliefMassFlowRate = 0.0; // OA Mixer relief node flow rate used in PressureStat | |||
bool AFNDefaultControlFlag = false; // Default simulation control flag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a bool variable to determine whether AFN default object of AirflowNetwork:SimulationControl is needed or not
SimAirNetworkKey = "MultizoneWithoutDistribution"; | ||
state.dataAirflowNetwork->AirflowNetworkSimu.InitFlag = 1; | ||
ShowWarningError(state, RoutineName + CurrentModuleObject + " object is not found "); | ||
ShowContinueError(state, "..The default behaviour values are assigned. Please see details in Input Output Reference."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no AirflowNetwork:SimulationControl object and Number of AirflowNetwork:MultiZone:Zone >= 1 and number of AirflowNetwork:MultiZone:Surface >=2, the default values of AirflowNetwork:SimulationControl are created internally.
state.dataAirflowNetwork->SimulateAirflowNetwork = AirflowNetworkControlSimple; | ||
print(state.files.eio, Format_110); | ||
print(state.files.eio, Format_120, "NoMultizoneOrDistribution"); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, the original code is executed.
"..specified in " + CurrentModuleObject + ' ' + cAlphaFields(1) + " = " + | ||
state.dataAirflowNetwork->AirflowNetworkSimu.AirflowNetworkSimuName); | ||
ErrorsFound = true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If state.dataAirflowNetwork->AFNDefaultControlFlag = false, the original code section to read AirflowNetwork:SimulationControl object is executed.
UtilityRoutines::SameString(state.dataAirflowNetwork->AirflowNetworkSimu.HeightOption, "OpeningHeight"))) { | ||
ShowSevereError(state, RoutineName + CurrentModuleObject + " object, " + cAlphaFields(4) + " = " + Alphas(4) + " is invalid."); | ||
if (!state.dataAirflowNetwork->AFNDefaultControlFlag) { | ||
if (UtilityRoutines::SameString(state.dataAirflowNetwork->AirflowNetworkSimu.WPCCntr, "Input")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If state.dataAirflowNetwork->AFNDefaultControlFlag = false, keep original code execution.
This file is used as a reference for comparison. Both files should have same csv outputs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a couple of small changes to the documentation, looks ready to go to me.
It's a little behind develop. I think it would be all green if develop was merged in. Since it looks otherwise ready, I'll go ahead and do that now. |
Code changes look good, unit test and documentation in place, approved, and CI system all happy. This is good to go in. Thanks @lgu1234 and @jasondegraw ! |
Pull request overview
Although the issue provides two possible options, I would like to propose the logic as show below:
If (NoExist AirflowNetwork:SimulationControl) && (Exist AirflowNetwork:MultiZone:Zone & AirflowNetwork:MultiZone:Surface) Then
Else
End If
The justification is that the objects of AirflowNetwork:MultiZone:Zone and AirflowNetwork:MultiZone:Surface are two main objects for AFN model to work. If both exist, the default of AirflowNetwork:SimulationControl makes sense. Otherwise, it assumes no AFN simulations. Therefore, there is no need to generate any warnings. In addition, the eio provide information below:
The new feature request is GitHub Issue #8010 as AirflowNetwork objects not used without AFN:SimControl object and no error/warning message #8010
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.