From 22fcbddc46e09735af9b94ab61cc09bd334013b5 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 2 Dec 2024 23:22:33 +0100 Subject: [PATCH 1/6] Error when execute_process fails via COMMAND_ERROR_IS_FATAL ANY Added in cmake 3.19, cf https://cmake.org/cmake/help/latest/command/execute_process.html --- CMakeLists.txt | 2 +- cmake/RunSimulation.cmake | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d9416a4470..0dfe8fef252 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.19) # Use ccache if available, has to be before "project()" find_program(CCACHE_PROGRAM NAMES ccache sccache) diff --git a/cmake/RunSimulation.cmake b/cmake/RunSimulation.cmake index acdc8ef61a2..2a80d73db3a 100644 --- a/cmake/RunSimulation.cmake +++ b/cmake/RunSimulation.cmake @@ -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,7 +100,7 @@ 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}") + 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 @@ -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) # 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}") @@ -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") # 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}") + 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}") From 980c1b9157cbb49760b63c4c1673b3928eb17cdc Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Tue, 3 Dec 2024 00:20:26 +0100 Subject: [PATCH 2/6] Do not try to run basement/slab if the GroundHeaterTransfer:Control says not to Issue an author warning, but maybe we should throw and fix the IDFs? --- cmake/RunSimulation.cmake | 60 +++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/cmake/RunSimulation.cmake b/cmake/RunSimulation.cmake index 2a80d73db3a..e4527646485 100644 --- a/cmake/RunSimulation.cmake +++ b/cmake/RunSimulation.cmake @@ -100,33 +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}") + # 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}" 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}") + if(NOT EXISTS "${OUTPUT_DIR_PATH}/GHTin.idf") + 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}") - file(COPY "${OUTPUT_DIR_PATH}/in.idf" DESTINATION "${OUTPUT_DIR_PATH}/BasementGHTIn.idf") - # 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}") + 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}") + # 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") From f131d39cc71fc6d0ff42ac94dd5e9f0ef3532f15 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Tue, 3 Dec 2024 10:35:23 +0100 Subject: [PATCH 3/6] Case sensitivity typo --- cmake/RunSimulation.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/RunSimulation.cmake b/cmake/RunSimulation.cmake index e4527646485..193170ad936 100644 --- a/cmake/RunSimulation.cmake +++ b/cmake/RunSimulation.cmake @@ -104,7 +104,7 @@ if(BUILD_FORTRAN) execute_process(COMMAND "${EXPANDOBJECTS_EXE}" WORKING_DIRECTORY "${OUTPUT_DIR_PATH}" COMMAND_ERROR_IS_FATAL ANY) if("${SLAB_RESULT}" GREATER -1) - if(NOT EXISTS "${OUTPUT_DIR_PATH}/GHTin.idf") + if(NOT EXISTS "${OUTPUT_DIR_PATH}/GHTIn.idf") 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) From 6dbb8ab8ab14b2f7fc0afbc1ae3fa0d9756ebc30 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Tue, 3 Dec 2024 11:00:42 +0100 Subject: [PATCH 4/6] Remove unused Basement objects from SingleFamilyHouse_HP_Slab(Dehumidifcation) These definitely do NOT have a basement anyways --- testfiles/SingleFamilyHouse_HP_Slab.idf | 96 ------------------- ...leFamilyHouse_HP_Slab_Dehumidification.idf | 96 ------------------- 2 files changed, 192 deletions(-) diff --git a/testfiles/SingleFamilyHouse_HP_Slab.idf b/testfiles/SingleFamilyHouse_HP_Slab.idf index 0ee9bbd780d..0a940bdf146 100644 --- a/testfiles/SingleFamilyHouse_HP_Slab.idf +++ b/testfiles/SingleFamilyHouse_HP_Slab.idf @@ -2694,102 +2694,6 @@ 15, !- CLEARANCE: Distance from edge of slab to domain edge {m} 15; !- ZCLEARANCE: Distance from bottom of slab to domain bottom {m} -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:SIMPARAMETERS =========== - - GroundHeatTransfer:Basement:SimParameters, - 0.1, !- F: Multiplier for the ADI solution - 15; !- IYRS: Maximum number of yearly iterations: - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:MATLPROPS =========== - - GroundHeatTransfer:Basement:MatlProps, - 6, !- NMAT: Number of materials in this domain - 2243, !- Density for Foundation Wall {kg/m3} - 2243, !- density for Floor Slab {kg/m3} - 311, !- density for Ceiling {kg/m3} - 1500, !- density for Soil {kg/m3} - 2000, !- density for Gravel {kg/m3} - 449, !- density for Wood {kg/m3} - 880, !- Specific heat for foundation wall {J/kg-K} - 880, !- Specific heat for floor slab {J/kg-K} - 1530, !- Specific heat for ceiling {J/kg-K} - 840, !- Specific heat for soil {J/kg-K} - 720, !- Specific heat for gravel {J/kg-K} - 1530, !- Specific heat for wood {J/kg-K} - 1.4, !- Thermal conductivity for foundation wall {W/m-K} - 1.4, !- Thermal conductivity for floor slab {W/m-K} - 0.09, !- Thermal conductivity for ceiling {W/m-K} - 1.1, !- thermal conductivity for soil {W/m-K} - 1.9, !- thermal conductivity for gravel {W/m-K} - 0.12; !- thermal conductivity for wood {W/m-K} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:INSULATION =========== - - GroundHeatTransfer:Basement:Insulation, - 1.76099742894375e-05, !- REXT: R Value of any exterior insulation {m2-K/W} - True; !- INSFULL: Flag: Is the wall fully insulated? - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:SURFACEPROPS =========== - - GroundHeatTransfer:Basement:SurfaceProps, - 0.16, !- ALBEDO: Surface albedo for No snow conditions - 0.4, !- ALBEDO: Surface albedo for snow conditions - 0.94, !- EPSLN: Surface emissivity No Snow - 0.86, !- EPSLN: Surface emissivity with Snow - 6, !- VEGHT: Surface roughness No snow conditions {cm} - 0.25, !- VEGHT: Surface roughness Snow conditions {cm} - False; !- PET: Flag, Potential evapotranspiration on? - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:BLDGDATA =========== - - GroundHeatTransfer:Basement:BldgData, - 0.200000006162114, !- DWALL: Wall thickness {m} - 0.243828108701145, !- DSLAB: Floor slab thickness {m} - 0.3, !- DGRAVXY: Width of gravel pit beside basement wall {m} - 0.2, !- DGRAVZN: Gravel depth extending above the floor slab {m} - 0.1; !- DGRAVZP: Gravel depth below the floor slab {m} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:INTERIOR =========== - - GroundHeatTransfer:Basement:Interior, - True, !- COND: Flag: Is the basement conditioned? - 0.92, !- HIN: Downward convection only heat transfer coefficient {W/m2-K} - 4.04, !- HIN: Upward convection only heat transfer coefficient {W/m2-K} - 3.08, !- HIN: Horizontal convection only heat transfer coefficient {W/m2-K} - 6.13, !- HIN: Downward combined (convection and radiation) heat transfer coefficient {W/m2-K} - 9.26, !- HIN: Upward combined (convection and radiation) heat transfer coefficient {W/m2-K} - 8.29; !- HIN: Horizontal combined (convection and radiation) heat transfer coefficient {W/m2-K} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:COMBLDG =========== - - GroundHeatTransfer:Basement:ComBldg, - 21, !- January average temperature {C} - 21, !- February average temperature {C} - 21, !- March average temperature {C} - 21, !- April average temperature {C} - 24, !- May average temperature {C} - 24, !- June average temperature {C} - 24, !- July average temperature {C} - 24, !- August average temperature {C} - 24, !- September average temperature {C} - 24, !- October average temperature {C} - 21, !- November average temperature {C} - 21, !- December average temperature {C} - 21; !- Daily variation sine wave amplitude {deltaC} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:EQUIVSLAB =========== - - GroundHeatTransfer:Basement:EquivSlab, - 2.59994805991784, !- APRatio: The area to perimeter ratio for this slab {m} - True; !- EquivSizing: Flag - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:EQUIVAUTOGRID =========== - - GroundHeatTransfer:Basement:EquivAutoGrid, - 15, !- CLEARANCE: Distance from outside of wall to edge of 3-D ground domain {m} - 0.1, !- SlabDepth: Thickness of the floor slab {m} - 1.21914054350572; !- BaseDepth: Depth of the basement wall below grade {m} - !- =========== ALL OBJECTS IN CLASS: PEOPLE =========== People, diff --git a/testfiles/SingleFamilyHouse_HP_Slab_Dehumidification.idf b/testfiles/SingleFamilyHouse_HP_Slab_Dehumidification.idf index 4e82ed6cd03..b4bcbf83ca4 100644 --- a/testfiles/SingleFamilyHouse_HP_Slab_Dehumidification.idf +++ b/testfiles/SingleFamilyHouse_HP_Slab_Dehumidification.idf @@ -2694,102 +2694,6 @@ 15, !- CLEARANCE: Distance from edge of slab to domain edge {m} 15; !- ZCLEARANCE: Distance from bottom of slab to domain bottom {m} -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:SIMPARAMETERS =========== - - GroundHeatTransfer:Basement:SimParameters, - 0.1, !- F: Multiplier for the ADI solution - 15; !- IYRS: Maximum number of yearly iterations: - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:MATLPROPS =========== - - GroundHeatTransfer:Basement:MatlProps, - 6, !- NMAT: Number of materials in this domain - 2243, !- Density for Foundation Wall {kg/m3} - 2243, !- density for Floor Slab {kg/m3} - 311, !- density for Ceiling {kg/m3} - 1500, !- density for Soil {kg/m3} - 2000, !- density for Gravel {kg/m3} - 449, !- density for Wood {kg/m3} - 880, !- Specific heat for foundation wall {J/kg-K} - 880, !- Specific heat for floor slab {J/kg-K} - 1530, !- Specific heat for ceiling {J/kg-K} - 840, !- Specific heat for soil {J/kg-K} - 720, !- Specific heat for gravel {J/kg-K} - 1530, !- Specific heat for wood {J/kg-K} - 1.4, !- Thermal conductivity for foundation wall {W/m-K} - 1.4, !- Thermal conductivity for floor slab {W/m-K} - 0.09, !- Thermal conductivity for ceiling {W/m-K} - 1.1, !- thermal conductivity for soil {W/m-K} - 1.9, !- thermal conductivity for gravel {W/m-K} - 0.12; !- thermal conductivity for wood {W/m-K} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:INSULATION =========== - - GroundHeatTransfer:Basement:Insulation, - 1.76099742894375e-05, !- REXT: R Value of any exterior insulation {m2-K/W} - True; !- INSFULL: Flag: Is the wall fully insulated? - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:SURFACEPROPS =========== - - GroundHeatTransfer:Basement:SurfaceProps, - 0.16, !- ALBEDO: Surface albedo for No snow conditions - 0.4, !- ALBEDO: Surface albedo for snow conditions - 0.94, !- EPSLN: Surface emissivity No Snow - 0.86, !- EPSLN: Surface emissivity with Snow - 6, !- VEGHT: Surface roughness No snow conditions {cm} - 0.25, !- VEGHT: Surface roughness Snow conditions {cm} - False; !- PET: Flag, Potential evapotranspiration on? - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:BLDGDATA =========== - - GroundHeatTransfer:Basement:BldgData, - 0.200000006162114, !- DWALL: Wall thickness {m} - 0.243828108701145, !- DSLAB: Floor slab thickness {m} - 0.3, !- DGRAVXY: Width of gravel pit beside basement wall {m} - 0.2, !- DGRAVZN: Gravel depth extending above the floor slab {m} - 0.1; !- DGRAVZP: Gravel depth below the floor slab {m} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:INTERIOR =========== - - GroundHeatTransfer:Basement:Interior, - True, !- COND: Flag: Is the basement conditioned? - 0.92, !- HIN: Downward convection only heat transfer coefficient {W/m2-K} - 4.04, !- HIN: Upward convection only heat transfer coefficient {W/m2-K} - 3.08, !- HIN: Horizontal convection only heat transfer coefficient {W/m2-K} - 6.13, !- HIN: Downward combined (convection and radiation) heat transfer coefficient {W/m2-K} - 9.26, !- HIN: Upward combined (convection and radiation) heat transfer coefficient {W/m2-K} - 8.29; !- HIN: Horizontal combined (convection and radiation) heat transfer coefficient {W/m2-K} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:COMBLDG =========== - - GroundHeatTransfer:Basement:ComBldg, - 21, !- January average temperature {C} - 21, !- February average temperature {C} - 21, !- March average temperature {C} - 21, !- April average temperature {C} - 24, !- May average temperature {C} - 24, !- June average temperature {C} - 24, !- July average temperature {C} - 24, !- August average temperature {C} - 24, !- September average temperature {C} - 24, !- October average temperature {C} - 21, !- November average temperature {C} - 21, !- December average temperature {C} - 21; !- Daily variation sine wave amplitude {deltaC} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:EQUIVSLAB =========== - - GroundHeatTransfer:Basement:EquivSlab, - 2.59994805991784, !- APRatio: The area to perimeter ratio for this slab {m} - True; !- EquivSizing: Flag - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:EQUIVAUTOGRID =========== - - GroundHeatTransfer:Basement:EquivAutoGrid, - 15, !- CLEARANCE: Distance from outside of wall to edge of 3-D ground domain {m} - 0.1, !- SlabDepth: Thickness of the floor slab {m} - 1.21914054350572; !- BaseDepth: Depth of the basement wall below grade {m} - !- =========== ALL OBJECTS IN CLASS: PEOPLE =========== People, From 62c1d3bb4c270810629095e6d12291774282afdf Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Tue, 3 Dec 2024 11:11:08 +0100 Subject: [PATCH 5/6] Remove the unused basement from the IECC crawlspace model too It's a small crawlspace. and cf https://github.com/NREL/EnergyPlus/issues/10826#issuecomment-2514109031 --- ...US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf | 98 ------------------- 1 file changed, 98 deletions(-) diff --git a/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf b/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf index 5dc92cae8bf..0cfc1a863de 100644 --- a/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf +++ b/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf @@ -4607,104 +4607,6 @@ 15, !- CLEARANCE: Distance from edge of slab to domain edge {m} 15; !- ZCLEARANCE: Distance from bottom of slab to domain bottom {m} -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:SIMPARAMETERS =========== - - GroundHeatTransfer:Basement:SimParameters, - 0.1, !- F: Multiplier for the ADI solution - 15; !- IYRS: Maximum number of yearly iterations: - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:MATLPROPS =========== - - GroundHeatTransfer:Basement:MatlProps, - 6, !- NMAT: Number of materials in this domain - 2243, !- Density for Foundation Wall {kg/m3} - 2243, !- density for Floor Slab {kg/m3} - 311, !- density for Ceiling {kg/m3} - 1500, !- density for Soil {kg/m3} - 2000, !- density for Gravel {kg/m3} - 449, !- density for Wood {kg/m3} - 880, !- Specific heat for foundation wall {J/kg-K} - 880, !- Specific heat for floor slab {J/kg-K} - 1530, !- Specific heat for ceiling {J/kg-K} - 840, !- Specific heat for soil {J/kg-K} - 720, !- Specific heat for gravel {J/kg-K} - 1530, !- Specific heat for wood {J/kg-K} - 1.4, !- Thermal conductivity for foundation wall {W/m-K} - 1.4, !- Thermal conductivity for floor slab {W/m-K} - 0.09, !- Thermal conductivity for ceiling {W/m-K} - 1.1, !- thermal conductivity for soil {W/m-K} - 1.9, !- thermal conductivity for gravel {W/m-K} - 0.12; !- thermal conductivity for wood {W/m-K} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:INSULATION =========== -!- $r_bsmtwall_SI = $r_bsmtwall/5.6786; -!- 0.0001; - - GroundHeatTransfer:Basement:Insulation, - 1.76099742894375e-05, !- REXT: R Value of any exterior insulation {m2-K/W} - True; !- INSFULL: Flag: Is the wall fully insulated? - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:SURFACEPROPS =========== - - GroundHeatTransfer:Basement:SurfaceProps, - 0.16, !- ALBEDO: Surface albedo for No snow conditions - 0.4, !- ALBEDO: Surface albedo for snow conditions - 0.94, !- EPSLN: Surface emissivity No Snow - 0.86, !- EPSLN: Surface emissivity with Snow - 6, !- VEGHT: Surface roughness No snow conditions {cm} - 0.25, !- VEGHT: Surface roughness Snow conditions {cm} - False; !- PET: Flag, Potential evapotranspiration on? - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:BLDGDATA =========== - - GroundHeatTransfer:Basement:BldgData, - 0.200000006162114, !- DWALL: Wall thickness {m} - 0.243828108701145, !- DSLAB: Floor slab thickness {m} - 0.3, !- DGRAVXY: Width of gravel pit beside basement wall {m} - 0.2, !- DGRAVZN: Gravel depth extending above the floor slab {m} - 0.1; !- DGRAVZP: Gravel depth below the floor slab {m} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:INTERIOR =========== - - GroundHeatTransfer:Basement:Interior, - True, !- COND: Flag: Is the basement conditioned? - 0.92, !- HIN: Downward convection only heat transfer coefficient {W/m2-K} - 4.04, !- HIN: Upward convection only heat transfer coefficient {W/m2-K} - 3.08, !- HIN: Horizontal convection only heat transfer coefficient {W/m2-K} - 6.13, !- HIN: Downward combined (convection and radiation) heat transfer coefficient {W/m2-K} - 9.26, !- HIN: Upward combined (convection and radiation) heat transfer coefficient {W/m2-K} - 8.29; !- HIN: Horizontal combined (convection and radiation) heat transfer coefficient {W/m2-K} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:COMBLDG =========== - - GroundHeatTransfer:Basement:ComBldg, - 21, !- January average temperature {C} - 21, !- February average temperature {C} - 21, !- March average temperature {C} - 21, !- April average temperature {C} - 24, !- May average temperature {C} - 24, !- June average temperature {C} - 24, !- July average temperature {C} - 24, !- August average temperature {C} - 24, !- September average temperature {C} - 24, !- October average temperature {C} - 21, !- November average temperature {C} - 21, !- December average temperature {C} - 21; !- Daily variation sine wave amplitude {deltaC} - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:EQUIVSLAB =========== - - GroundHeatTransfer:Basement:EquivSlab, - 2.59994805991784, !- APRatio: The area to perimeter ratio for this slab {m} - True; !- EquivSizing: Flag - -!- =========== ALL OBJECTS IN CLASS: GROUNDHEATTRANSFER:BASEMENT:EQUIVAUTOGRID =========== - - GroundHeatTransfer:Basement:EquivAutoGrid, - 15, !- CLEARANCE: Distance from outside of wall to edge of 3-D ground domain {m} - 0.1, !- SlabDepth: Thickness of the floor slab {m} - 1.21914054350572; !- BaseDepth: Depth of the basement wall below grade {m} - !- Process internal gains from the appliances.template.. ElectricEquipment, From ecc743577e3aa623ed323e3255a22fa9c3cc5586 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Tue, 3 Dec 2024 11:15:15 +0100 Subject: [PATCH 6/6] Optional - throw a fatal error if a file has GroundTemperature Slab/Basement 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) --- cmake/RunSimulation.cmake | 56 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/cmake/RunSimulation.cmake b/cmake/RunSimulation.cmake index 193170ad936..62e5fce2c55 100644 --- a/cmake/RunSimulation.cmake +++ b/cmake/RunSimulation.cmake @@ -105,46 +105,46 @@ if(BUILD_FORTRAN) if("${SLAB_RESULT}" GREATER -1) if(NOT EXISTS "${OUTPUT_DIR_PATH}/GHTIn.idf") - 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}") + message(FATAL_ERROR "Did not find ${OUTPUT_DIR_PATH}/GHTIn.idf, are you sure the GroundHeatTransfer:Control has Run Slab Preprocessor = Yes?\nGROUND_HT_CONTROL=${GROUND_HT_CONTROL}") + else() + message(FATAL_ERROR "Did not find ${OUTPUT_DIR_PATH}/GHTIn.idf, are you sure the GroundHeatTransfer:Control has Run Slab Preprocessor = Yes?") 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() + # 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() if("${BASEMENT_RESULT}" GREATER -1) 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}") + message(FATAL_ERROR "Did not find ${OUTPUT_DIR_PATH}/BasementGHTIn.idf, are you sure the GroundHeatTransfer:Control has Run Basement Preprocessor = Yes?\nGROUND_HT_CONTROL=${GROUND_HT_CONTROL}") + else() + message(FATAL_ERROR "Did not find ${OUTPUT_DIR_PATH}/BasementGHTIn.idf, are you sure the GroundHeatTransfer:Control has Run Basement Preprocessor = Yes?") endif() - else() - - # 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}" 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() + + # 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}" 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() set(IDF_PATH "${OUTPUT_DIR_PATH}/expanded.idf")