Skip to content

Commit

Permalink
Organize Villara tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
spahrenk committed Nov 11, 2024
1 parent 9b334f9 commit 608ba63
Show file tree
Hide file tree
Showing 11 changed files with 1,467 additions and 1,531 deletions.
50 changes: 25 additions & 25 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,7 @@ set(yearLargeTestsModels
TamScalable_SP
Scalable_MP
)
set(heatExchangeModelNames
AquaThermAire
)
set(heatExchangeTests
villara_24hr67
)

set(yearLargeTests
testCA_36Unit_CTZ12
)
Expand All @@ -160,6 +155,13 @@ set(stateOfChargeCompressorNames
NyleC25A_SP
)

#
set(Villara_AquaThermAireDir "Villara/AquaThermAire")
set(Villara_AquaThermAireTests
villara_24hr67
)

#
set(BradfordWhiteAeroThermRE2Dir "BradfordWhite/AeroThermRE2H")
set(BradfordWhiteAeroThermRE2HSizes 50 65 80)
set(BradfordWhiteAeroThermRE2H50_Tests
Expand All @@ -175,6 +177,7 @@ set(BradfordWhiteAeroThermRE2H80_Tests
RE2H80_UEF67
)

#
set(LG_APHWC50Dir "LG/LG_APHWC50")
set(LG_APHWC50_Tests
DOE2014_LGC50_24hr50
Expand All @@ -183,11 +186,6 @@ set(LG_APHWC50_Tests
DP_LGC50_HVT
)

set(plotTest File AquaThermAire villara_24hr67)

list(APPEND extendedModelNames ${modelNames} ${heatExchangeModelNames})
list(REMOVE_DUPLICATES extendedModelNames)

cmake_dependent_option(${PROJECT_NAME}_PYTHON_PLOTS "Generate plots using python comparing measured and simulated data" ON "${PROJECT_NAME}_IS_TOP_LEVEL" OFF)

if (${PROJECT_NAME}_PYTHON_PLOTS AND NOT ${PROJECT_NAME}_PYTHON_SETUP)
Expand Down Expand Up @@ -259,12 +257,11 @@ foreach (test ${testNames})
endforeach (model)
endforeach (test)

#Test(s) specifically for heat-exchange models
foreach (test ${heatExchangeTests})
foreach (model ${heatExchangeModelNames})
add_model_test(TEST_NAME "${test}" MODEL_NAME "${model}" SPEC_TYPE "Preset")
add_model_test(TEST_NAME "${test}" MODEL_NAME "${model}" SPEC_TYPE "File")
endforeach (model)
#Test(s) specifically for Villara AquaThermAire model
foreach (test ${Villara_AquaThermAireTests})
set(fullTestName "Villara/AquaThermAire/${test}")
add_model_test(TEST_NAME "${fullTestName}" MODEL_NAME "AquaThermAire" SPEC_TYPE "Preset")
add_model_test(TEST_NAME "${fullTestName}" MODEL_NAME "AquaThermAire" SPEC_TYPE "File")
endforeach (test)

#Test(s) specifically for Bradford White AeroTherm model
Expand All @@ -278,13 +275,15 @@ foreach (size ${BradfordWhiteAeroThermRE2HSizes})
endforeach (test)
endforeach (size)

#Test(s) specifically for LG_APHWC50 model
#Test(s) specifically for LG APHWC50 model
foreach (test ${LG_APHWC50_Tests})
set(fullTestName "${LG_APHWC50Dir}/${test}")
add_model_test(TEST_NAME "${fullTestName}" MODEL_NAME "LG_APHWC50" SPEC_TYPE "Preset")
add_model_test(TEST_NAME "${fullTestName}" MODEL_NAME "LG_APHWC50" SPEC_TYPE "File")
endforeach (test)

add_plot_test(SPEC_TYPE "Preset" MODEL_NAME "AquaThermAire" TEST_NAME "villara_24hr67" )

# Tests for differences between File and Preset versions
function(add_file_test)
set(options)
Expand All @@ -310,11 +309,9 @@ foreach (test ${testNames})
endforeach (model)
endforeach (test)

#Test(s) specifically for heat-exchange models
foreach (test ${heatExchangeTests})
foreach (model ${heatExchangeModelNames})
add_file_test(TEST_NAME "${test}" MODEL_NAME "${model}")
endforeach (model)
#Test(s) specifically for Villara AquaThermAire model
foreach (test ${Villara_AquaThermAireTests})
add_file_test(TEST_NAME "${test}" MODEL_NAME "AquaThermAire")
endforeach (test)

#Test(s) specifically for Bradford White AeroTherm model
Expand Down Expand Up @@ -356,6 +353,11 @@ foreach (test ${testNames})
endforeach (model)
endforeach (test)

#Test(s) specifically for Villara AquaThermAire model
foreach (test ${Villara_AquaThermAireTests})
add_regression_test(TEST_NAME "${test}" MODEL_NAME "AquaThermAire" SPEC_TYPE "Preset")
endforeach (test)

#Test(s) specifically for Bradford White AeroTherm model
foreach (size ${BradfordWhiteAeroThermRE2HSizes})
set(model BradfordWhiteAeroThermRE2H${size})
Expand Down Expand Up @@ -425,8 +427,6 @@ foreach (test ${yearLargeTests})
endforeach (model)
endforeach (test)

add_plot_test(SPEC_TYPE "Preset" MODEL_NAME "AquaThermAire" TEST_NAME "villara_24hr67" )

#Add regression test for yearly file
add_test(NAME "RegressionTest.YearRuns" COMMAND ${CMAKE_COMMAND} -E compare_files "${CMAKE_CURRENT_BINARY_DIR}/output/DHW_YRLY.csv" "${CMAKE_CURRENT_SOURCE_DIR}/ref/DHW_YRLY.csv")

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1,442 changes: 1,442 additions & 0 deletions test/ref/villara_24hr67_Preset_AquaThermAire.csv

Large diffs are not rendered by default.

1,506 changes: 0 additions & 1,506 deletions test/villara_24hr67/measurements.csv

This file was deleted.

0 comments on commit 608ba63

Please sign in to comment.