-
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?
Changes from 2 commits
22fcbdd
980c1b9
f131d39
6dbb8ab
62c1d3b
ecc7435
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ if(BUILD_FORTRAN) | |
find_program(PARAMETRIC_EXE ParametricPreprocessor 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) | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${IDF_PATH}" "${OUTPUT_DIR_PATH}") | ||
execute_process(COMMAND "${PARAMETRIC_EXE}" "${IDF_FILE}" WORKING_DIRECTORY "${OUTPUT_DIR_PATH}") | ||
execute_process(COMMAND "${PARAMETRIC_EXE}" "${IDF_FILE}" WORKING_DIRECTORY "${OUTPUT_DIR_PATH}" COMMAND_ERROR_IS_FATAL ANY) | ||
|
||
# this handles the LBuildingAppGRotPar parametric file | ||
if(EXISTS "${OUTPUT_DIR_PATH}/${IDF_NAME}-G000.idf") | ||
|
@@ -100,32 +100,51 @@ if(BUILD_FORTRAN) | |
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${IDF_PATH}" "${OUTPUT_DIR_PATH}/in.idf") | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${EPW_PATH}" "${OUTPUT_DIR_PATH}/in.epw") | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PRODUCT_PATH}/Energy+.idd" "${OUTPUT_DIR_PATH}") | ||
execute_process(COMMAND "${EXPANDOBJECTS_EXE}" WORKING_DIRECTORY "${OUTPUT_DIR_PATH}") | ||
# 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) | ||
|
||
if("${SLAB_RESULT}" GREATER -1) | ||
# Copy files needed for Slab | ||
file(COPY "${SOURCE_DIR}/idd/SlabGHT.idd" DESTINATION "${OUTPUT_DIR_PATH}") | ||
# Find and run slab | ||
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}") | ||
# 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 commentThe 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. |
||
message(AUTHOR_WARNING "Did not find ${OUTPUT_DIR_PATH}/GHTIn.idf, are you sure the GroundHeatTransfer:Control has Run Slab 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 Slab | ||
file(COPY "${SOURCE_DIR}/idd/SlabGHT.idd" DESTINATION "${OUTPUT_DIR_PATH}") | ||
# Find and run slab | ||
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}") | ||
# This creates SLABINP.TXT, SLABSplit Surface Temps.TXT, and SLABSurfaceTemps.TXT | ||
execute_process(COMMAND "${SLAB_EXE}" WORKING_DIRECTORY "${OUTPUT_DIR_PATH}" COMMAND_ERROR_IS_FATAL ANY) | ||
# 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}") | ||
endif() | ||
endif() | ||
|
||
if("${BASEMENT_RESULT}" GREATER -1) | ||
# Copy files needed for Basement | ||
file(COPY "${SOURCE_DIR}/idd/BasementGHT.idd" DESTINATION "${OUTPUT_DIR_PATH}") | ||
# Find and run basement | ||
find_program(BASEMENT_EXE Basement 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 Basement from ${BASEMENT_EXE}") | ||
execute_process(COMMAND "${BASEMENT_EXE}" WORKING_DIRECTORY "${OUTPUT_DIR_PATH}") | ||
# Then copy basement results into the expanded file | ||
file(READ "${OUTPUT_DIR_PATH}/EPObjects.TXT" BASEMENT_CONTENTS) | ||
file(APPEND "${OUTPUT_DIR_PATH}/expanded.idf" "${BASEMENT_CONTENTS}") | ||
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 commentThe 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. |
||
# Find and run basement | ||
find_program(BASEMENT_EXE Basement 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 Basement from ${BASEMENT_EXE}") | ||
execute_process(COMMAND "${BASEMENT_EXE}" WORKING_DIRECTORY "${OUTPUT_DIR_PATH}" COMMAND_ERROR_IS_FATAL ANY) | ||
# Then copy basement results into the expanded file | ||
file(READ "${OUTPUT_DIR_PATH}/EPObjects.TXT" BASEMENT_CONTENTS) | ||
file(APPEND "${OUTPUT_DIR_PATH}/expanded.idf" "${BASEMENT_CONTENTS}") | ||
endif() | ||
endif() | ||
|
||
set(IDF_PATH "${OUTPUT_DIR_PATH}/expanded.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.
Alright, I found why this wasn't creating that BasementGHTIn.idf... cf #10826 (comment)