Skip to content

Commit

Permalink
Add a ctest for NREL#10847
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Dec 9, 2024
1 parent d6ef6c6 commit 67c6293
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Basement/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,26 @@ if(APPLE AND CPACK_CODESIGNING_DEVELOPPER_ID_APPLICATION)
include("${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/CodeSigning.cmake")
register_install_codesign_target(Basement PreProcess/GrndTempCalc)
endif()

if(BUILD_TESTING)

macro(basement_test GHT_IN_IDF_NAME)
set(TEST_DIR "${PROJECT_BINARY_DIR}/tst/${GHT_IN_IDF_NAME}") # build/src/Basement/tst
set(IDF_FILE "${PROJECT_SOURCE_DIR}/tests/${GHT_IN_IDF_NAME}.idf")

file(MAKE_DIRECTORY ${TEST_DIR})
file(COPY "${PROJECT_SOURCE_DIR}/../../idd/BasementGHT.idd" DESTINATION "${TEST_DIR}")
configure_file("${PROJECT_SOURCE_DIR}/../../weather/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw" "${TEST_DIR}/in.epw" COPYONLY)
configure_file(${IDF_FILE} "${TEST_DIR}/BasementGHTIn.idf" COPYONLY)

set(TEST_NAME "Basement.${GHT_IN_IDF_NAME}")
add_test(NAME "${TEST_NAME}"
COMMAND $<TARGET_FILE:Basement>
WORKING_DIRECTORY ${TEST_DIR}
)
set_tests_properties("${TEST_NAME}" PROPERTIES FAIL_REGULAR_EXPRESSION "Terminated;Error(s) Detected")
endmacro()

basement_test(DynamiGriddingWhenDepthIsHigh)

endif()
77 changes: 77 additions & 0 deletions src/Basement/tests/DynamiGriddingWhenDepthIsHigh.idf
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
SimParameters,
0.1, !- F: Multiplier for the ADI solution
15; !- IYRS: Maximum number of yearly iterations:

MatlProps,
3, !- NMAT: Number of materials in this domain
2500, !- Density for Foundation Wall {kg/m3}
2500, !- density for Floor Slab {kg/m3}
2500, !- 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}
880, !- Specific heat for ceiling {J/kg-K}
2000, !- Specific heat for soil {J/kg-K}
720, !- Specific heat for gravel {J/kg-K}
1530, !- Specific heat for wood {J/kg-K}
2.3, !- Thermal conductivity for foundation wall {W/m-K}
2.3, !- Thermal conductivity for floor slab {W/m-K}
2.3, !- Thermal conductivity for ceiling {W/m-K}
1.5, !- 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}

Insulation,
5, !- REXT: R Value of any exterior insulation {m2-K/W}
True; !- INSFULL: Flag: Is the wall fully insulated?

SurfaceProps,
0.4, !- 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}
True; !- PET: Flag, Potential evapotranspiration on?

BldgData,
0.72, !- DWALL: Wall thickness {m}
0.25, !- 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.3; !- DGRAVZP: Gravel depth below the floor slab {m}

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}

ComBldg,
19.112521, !- January average temperature {C}
19.3265, !- February average temperature {C}
19.639847, !- March average temperature {C}
20.215454, !- April average temperature {C}
20.415274, !- May average temperature {C}
21.524396, !- June average temperature {C}
21.880071, !- July average temperature {C}
21.659116, !- August average temperature {C}
21.114287, !- September average temperature {C}
20.383342, !- October average temperature {C}
19.553359, !- November average temperature {C}
19.233107, !- December average temperature {C}
; !- Daily variation sine wave amplitude {deltaC}

EquivSlab,
20.045326, !- APRatio: The area to perimeter ratio for this slab {m}
TRUE; !- EquivSizing: Flag

EquivAutoGrid,
15, !- CLEARANCE: Distance from outside of wall to edge of 3-D ground domain {m}
0.25, !- SlabDepth: Thickness of the floor slab {m}
10.3; !- BaseDepth: Depth of the basement wall below grade {m}

0 comments on commit 67c6293

Please sign in to comment.