-
Notifications
You must be signed in to change notification settings - Fork 396
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
Fix #10826 - Possible Error in Slab #10843
base: develop
Are you sure you want to change the base?
Conversation
@@ -109,7 +109,7 @@ if(BUILD_FORTRAN) | |||
find_program(SLAB_EXE Slab PATHS "${PRODUCT_PATH}" NO_DEFAULT_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH | |||
NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) | |||
message("Executing Slab from ${SLAB_EXE}") | |||
execute_process(COMMAND "${SLAB_EXE}" WORKING_DIRECTORY "${OUTPUT_DIR_PATH}") | |||
execute_process(COMMAND "${SLAB_EXE}" WORKING_DIRECTORY "${OUTPUT_DIR_PATH}" COMMAND_ERROR_IS_FATAL ANY) |
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.
Catch errors if any. This needs cmake 3.19
cmake/RunSimulation.cmake
Outdated
@@ -118,11 +118,12 @@ if(BUILD_FORTRAN) | |||
if("${BASEMENT_RESULT}" GREATER -1) | |||
# Copy files needed for Basement | |||
file(COPY "${SOURCE_DIR}/idd/BasementGHT.idd" DESTINATION "${OUTPUT_DIR_PATH}") | |||
file(COPY "${OUTPUT_DIR_PATH}/in.idf" DESTINATION "${OUTPUT_DIR_PATH}/BasementGHTIn.idf") |
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.
Attempt to get the basement program working (it still isn't)
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'm getting errors such as
IP: IDF line~5384 Did not find “Output:Variable” in list of Objects;
Output:PreprocessorMessage,GroundTempCalc - Basement,Severe,
IP: The IDF file has no records.;
Output:PreprocessorMessage,GroundTempCalc - Basement,Severe,
IP: Other miscellaneous errors found in input;
** ~~~ ** Possible Invalid Numerics or other problems
Output:PreprocessorMessage,GroundTempCalc - Basement,Fatal,```
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.
Oh ok.
EnergyPlus/testfiles/SingleFamilyHouse_HP_Slab.idf
Lines 2623 to 2626 in a119feb
GroundHeatTransfer:Control, | |
gtp_control, !- Name | |
no, !- Run Basement Preprocessor | |
yes; !- Run Slab Preprocessor |
…ays not to Issue an author warning, but maybe we should throw and fix the IDFs?
# This creates GHTIn.idf, and BasementGHTIn.idf IIF the GroundHeatTransfer:Control says to run it! | ||
execute_process(COMMAND "${EXPANDOBJECTS_EXE}" WORKING_DIRECTORY "${OUTPUT_DIR_PATH}" COMMAND_ERROR_IS_FATAL ANY) |
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.
Alright, I found why this wasn't creating that BasementGHTIn.idf... cf #10826 (comment)
cmake/RunSimulation.cmake
Outdated
if(NOT EXISTS "${OUTPUT_DIR_PATH}/BasementGHTIn.idf") | ||
message(AUTHOR_WARNING "Did not find ${OUTPUT_DIR_PATH}/BasementGHTIn.idf, are you sure the GroundHeatTransfer:Control has Run Basement Preprocessor = Yes?") | ||
string(REGEX MATCH "GroundHeatTransfer:Control.*Run Slab Preprocessor" GROUND_HT_CONTROL "${IDF_CONTENT}") | ||
if (GROUND_HT_CONTROL) | ||
message(AUTHOR_WARNING "GROUND_HT_CONTROL=${GROUND_HT_CONTROL}") | ||
endif() | ||
else() | ||
|
||
# Copy files needed for Basement | ||
file(COPY "${SOURCE_DIR}/idd/BasementGHT.idd" DESTINATION "${OUTPUT_DIR_PATH}") |
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 ExpandObjects didn't create that BasementGHTIn.idf, it's because the GroundHeaterTransfer:Control says not to. Not sure if that shouldn't be a FATAL_ERROR instead and we fix the idf. Asked for input from other devs.
In the meantime, issue an AUTHOR_WARNING, and don't call basement on it.
cmake/RunSimulation.cmake
Outdated
# Then copy slab results into the expanded file | ||
file(READ "${OUTPUT_DIR_PATH}/SLABSurfaceTemps.TXT" SLAB_CONTENTS) | ||
file(APPEND "${OUTPUT_DIR_PATH}/expanded.idf" "${SLAB_CONTENTS}") | ||
if(NOT EXISTS "${OUTPUT_DIR_PATH}/GHTin.idf") |
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.
Couldn' understand why decent CI Linux was not finding it, while It was working on mac...
I'm always saying "beware that macOS/Windows have case-insensitive filesystem while Linux is case-sensitive", and I still made that mistake.
…ifcation) These definitely do NOT have a basement anyways
It's a small crawlspace. and cf #10826 (comment)
…asement objects but GroundHT:Control says "No" to run preprocessor This is so we catch unintented developer mistakes in the future (though I doubt Slab/Basement files will be added often)
|
Regressions are just of the IDF type, because I removed some unused basement objects |
@jmarrec it has been 12 days since this pull request was last updated. |
@jmarrec it has been 7 days since this pull request was last updated. |
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.