Separate design and control variables#8530
Conversation
…b.com/NREL/EnergyPlus into Separate-Design-and-Control-Variables Pulling to update local.
…b.com/NREL/EnergyPlus into Separate-Design-and-Control-Variables Updating with online changes
…b.com/NREL/EnergyPlus into Separate-Design-and-Control-Variables
dareumnam
left a comment
There was a problem hiding this comment.
Built and tested a few testfiles locally, runs well.
| SB45, !- Surface 3 Name | ||
| 0.1; !- Fraction of Radiant Energy to Surface 3 | ||
| SPACE4-1 Baseboard, !- Name | ||
| SPACE4-1 Baseboard Design, !- Design_Object_Name |
There was a problem hiding this comment.
SPACE4-1 Baseboard Design is the same as SPACE2-1 Baseboard Design, I think we can use one design object for both baseboards. I think this is one of the main points of this new feature.
There was a problem hiding this comment.
@dareumnam Thanks so much for the review! Will take off the redundant design objects.
| SB45, !- Surface 3 Name | ||
| 0.1; !- Fraction of Radiant Energy to Surface 3 | ||
| SPACE4-1 Baseboard, !- Name | ||
| SPACE4-1 Baseboard Design, !- Design_Object_Name |
There was a problem hiding this comment.
Same here, and idfs below.
There was a problem hiding this comment.
Requested changes were made, thank you! In some IDFs, the design objects were different and were not merged together.
Myoldmopar
left a comment
There was a problem hiding this comment.
@jmythms this is looking really good! I made just a few comments that should be addressed before we merge, but they are pretty minor. Let me know if you have any questions about them. Once they are addressed I'll mark it approved, do a little more testing, and then it can merge.
| POutArgs(14:15) = InArgs(23:24) | ||
| POutArgs(16:19) = InArgs(28:31) | ||
| POutArgs(20) = InArgs(34) | ||
| CALL WriteOutIDFLines(DifLfn,'ZONEHVAC:LOWTEMPERATURERADIANT:VARIABLEFLOW:DESIGN',20,POutArgs,FldNames,FldUnits) |
There was a problem hiding this comment.
@jmythms After transitioning, the new object name looks a bit funny in all caps. I'd change this string, and the similar ones in each block, to just being PascalCase:ObjectName:Style.
| POutArgs(3:4) = InArgs(7:8) | ||
| POutArgs(5:7) = InArgs(11:13) | ||
| CALL WriteOutIDFLines(DifLfn,'ZONEHVAC:BASEBOARD:RADIANTCONVECTIVE:STEAM:DESIGN',7,POutArgs,FldNames,FldUnits) | ||
| nodiff=.false. |
There was a problem hiding this comment.
But after transitioning a baseboard file, I was able to run the file successfully with a clean error file. I did not test every permutation of object, but I'll continue testing a couple more.
idd/Energy+.idd.in
Outdated
| \type real | ||
| \minimum 0.0 | ||
| \default 1.0 | ||
| \note Enter the fraction of auto - sized heating design capacity.Required field when capacity the |
There was a problem hiding this comment.
I see you just copied this note from the previous object, but if you can fix up the spacing it would be nice. Change it to be just autosized, and then a space after the period. Then go through the other notes briefly and see if you spot any other weird spacing or punctuation.
There was a problem hiding this comment.
It's weird that this file/these lines do not show up as outdated.
| extern Array1D<HWBaseboardParams> HWBaseboard; | ||
| extern Array1D<HWBaseboardDesignData> HWBaseboardDesignObject; | ||
| extern Array1D<HWBaseboardNumericFieldData> HWBaseboardNumericFields; | ||
| extern Array1D<HWBaseboardDesignNumericFieldData> HWBaseboardDesignNumericFields; |
There was a problem hiding this comment.
We should follow this up quickly with a PR that moves this to the deglobalized state, but not for today obviously.
|
|
||
| // Default Constructor | ||
| SteamBaseboardDesignData() | ||
| : HeatingCapMethod(0), DesignScaledHeatingCapacity(0.0), Offset(0.0), FracRadiant(0.0), FracDistribPerson(0.0) |
There was a problem hiding this comment.
I know this is how most default constructors are written in EnergyPlus, so I don't want you to change anything for now, but I wanted to point out that I think we should move to initializing right at the declaration. In other words, instead of having to write this initializer list, just set heating method to 0 right where it is declared: int HeatingCapMethod = 0. The compiler is quite smart, and at even just level 1 optimization, gcc will end up with the same assembly code either way. And not that it matters, but in debug builds, the code is much more efficient if you are able to initialize the way I am suggesting. If someone wants to correct me here, I'm open to discussion, this is just what I'm seeing on CompilerExplorer.
|
|
||
| Field 6, previous Field 12 - Fraction Radiant | ||
|
|
||
| Field 7, previous Field 13 - Fraction of Radiant Energy Incident on People |
There was a problem hiding this comment.
Very detailed, would it make it more readable to make each of these
- into
- a
- markdown
- list?
| set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") | ||
| set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") | ||
| set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) | ||
| set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) |
There was a problem hiding this comment.
Hmmm, something went awry here @jmythms . Looks like you accidentally pointed a build folder to the testfiles folder at some point and CMake created these files. The files that need to be plucked back off this branch include:
- testfiles/CMakeFiles/CMakeDirectoryInformation.cmake
- testfiles/CMakeFiles/progress.marks
- testfiles/CTestTestfile.cmake
- testfiles/Makefile
- testfiles/cmake_install.cmake
| @@ -47,103 +52,121 @@ \subsubsection{Inputs}\label{inputs-038} | |||
|
|
|||
| This field is the name of the hot water outlet node for the baseboard heater. | |||
|
|
|||
| \paragraph{Field: Rated AverageWaterTemperature}\label{field-rated-averagewatertemperature} | |||
| \paragraph{Field: Rated Average Water Temperature}\label{field-rated-averagewatertemperature} | |||
| 0.1, !- fraction of radiant energy from heater distributed to surface 5 | ||
| WR-1, !- surface 6 Name | ||
| 0.1; !- fraction of radiant energy from heater distributed to surface 6 | ||
| ZoneHVAC:Baseboard:RadiantConvective:Water:Design, |
@Myoldmopar Thank you very much! I will let you know as soon as it is done. |
| @@ -40712,25 +40712,72 @@ ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, | |||
|
|
|||
| \group Zone HVAC Radiative/Convective Units | |||
|
|
|||
| ZoneHVAC:Baseboard:RadiantConvective:Water:Design, | |||
| \min-fields 7 | |||
There was a problem hiding this comment.
I was not sure of the assignment for min-fields.
My logic for the current assignment was the (alpha+num) fields - just one field in the ConstantFlow and VariableFlow that I thought was optional.
| END IF | ||
| IF (InArgs(34) == Blank) THEN | ||
| CurVarIterator = 19 | ||
| END IF |
There was a problem hiding this comment.
Added logic for removing the last line in the Design objects, if it is blank.
There was a problem hiding this comment.
next time:
CurVarIterator = 19
IF (InArgs(34) /= Blank) THEN
CurVarIterator = 20
POutArgs(CurVarIterator) = InArgs(34)
END IF
|
@Myoldmopar Could you take one more look, when you get the time, please? |
Myoldmopar
left a comment
There was a problem hiding this comment.
Thanks for the final cleanups! This will merge soon. Great work @jmythms
| END IF | ||
| IF (InArgs(34) == Blank) THEN | ||
| CurVarIterator = 19 | ||
| END IF |
There was a problem hiding this comment.
next time:
CurVarIterator = 19
IF (InArgs(34) /= Blank) THEN
CurVarIterator = 20
POutArgs(CurVarIterator) = InArgs(34)
END IF
|
Alright, this one is dropping in first since it needs no other changes. Thanks @jmythms |
Thank you so much! |
Pull request overview
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.