-
Notifications
You must be signed in to change notification settings - Fork 448
Add AirflowNetwork opening scheduling #11015
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
base: develop
Are you sure you want to change the base?
Conversation
|
May need to go back in here and adjust the schedule further to get closer to the original result, this is changing the results quite a bit. Maybe a Schedule:File that mimics the original behavior?
|
int RAFNNodeNum; // Index of RAFN node number | ||
|
||
// Default Constructor | ||
MultizoneZoneProp() |
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 thought we're not doing constructors this way anymore and we're putting the default values into the declarations. That's much cleaner IMO. Same comment on constructors below.
{ | ||
// Members | ||
std::string ZoneName; // Name of Associated EnergyPlus Thermal Zone | ||
std::string VentControl; // Ventilation Control Mode: "TEMPERATURE", "ENTHALPIC", "CONSTANT", or "NOVENT" |
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.
Why is this a string?
// and moisture levels at each node, and airflow and sensible and latent energy losses | ||
// at each element | ||
|
||
static Real64 square(Real64 x) |
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.
Why add the function call overhead? Will this inline if you add the inline
keyword?
|
||
namespace AirflowNetwork { | ||
|
||
void handle_nonrectangular_surfaces(EquivRec equivalent_rectangle_method, EPVector<DataSurfaces::SurfaceData> Surface, const std::string &surface_name, int surface_number, |
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.
Passing EPVector by value? Not const &
?
void handle_nonrectangular_surfaces(EquivRec equivalent_rectangle_method, EPVector<DataSurfaces::SurfaceData> Surface, const std::string &surface_name, int surface_number, | ||
Real64 &height, Real64 &width, Real64 user_aspect_ratio, EnergyPlusData *state) | ||
{ | ||
if (equivalent_rectangle_method == EquivRec::Height) { |
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.
auto &surf = Surface(surface_number);
shortcut would make this code more readable.
auto const equiv_rect_iter{fields.find("equivalent_rectangle_method")}; | ||
EquivRec equivrec{EquivRec::Height}; | ||
if (equiv_rect_iter != fields.end()) { | ||
// This is guaranteed to work since inputs are validated |
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.
getEnumValue
, not maps.
"\" is an air boundary surface."); | ||
ShowContinueError(m_state, "Ventilation Control Mode = " + Alphas(4) + " is not valid. Resetting to Constant."); | ||
MultizoneSurfaceData(i).VentSurfCtrNum = VentControlType::Const; | ||
ShowContinueError(m_state, "Ventilation Control Mode = " + std::map<VentControlType, std::string> {{VentControlType::Temp, "TEMPERATURE"}, |
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.
Once more. Creating a single-use map and then searching it is slower than just doing the if-else string comparison ladder that was there before.
@@ -5170,6 +4954,20 @@ namespace AirflowNetwork { | |||
} | |||
} | |||
|
|||
// Final linkage validation | |||
for (auto& linkage : AirflowNetworkLinkageData) |
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.
This can be auto const &
.
int LF; | ||
int LT; | ||
int CompNum; | ||
int NF; | ||
int NT; | ||
iComponentTypeNum CompTypeNum; | ||
AirflowElementType CompTypeNum; |
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.
Why remove num
from the type name but not the variable name?
|
||
// The original test was changing the CompTypeNum, as that goes away it's necessaey to actually | ||
// switch out the elements. This is probably an unwise approach. | ||
auto const ye_olde_element = state->afn->AirflowNetworkLinkageData(2).element; |
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.
Since element is a pointer, please declare this as auto const *
.
@jasondegraw @Myoldmopar it has been 30 days since this pull request was last updated. |
@jasondegraw @Myoldmopar it has been 31 days since this pull request was last updated. |
@jasondegraw @Myoldmopar it has been 29 days since this pull request was last updated. |
@jasondegraw @Myoldmopar it has been 30 days since this pull request was last updated. |
@jasondegraw @Myoldmopar it has been 28 days since this pull request was last updated. |
@jasondegraw @Myoldmopar it has been 30 days since this pull request was last updated. |
Pull request overview
This PR builds on previous work done related to linkage scheduling and adds the ability to schedule openings when using the AirflowNetwork feature.
Pull Request Author
Reviewer