Skip to content

Commit

Permalink
Merge branch 'develop' into code_comp_eqp
Browse files Browse the repository at this point in the history
  • Loading branch information
lymereJ committed Sep 8, 2021
2 parents 04f6d6e + eb5c6a1 commit 5221c0e
Show file tree
Hide file tree
Showing 50 changed files with 10,511 additions and 2,595 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ target_include_directories(project_options SYSTEM INTERFACE "${kiva_SOURCE_DIR}/
add_subdirectory(scripts/dev/generate_embeddable_epJSON_schema)
set_target_properties(generate_embeddedable_epJSON_schema PROPERTIES FOLDER "Internal")

target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/cpgfunctionEP-0.5)
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/cpgfunctionEP-0.5/include)
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/cpgfunctionEP-0.6)
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/cpgfunctionEP-0.6/include)

if(OPENGL_FOUND)
set(BUILD_PENUMBRA_TESTING
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/ReportCoilSelection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ void ReportCoilSelection::setCoilCoolingCapacity(
auto &c(coilSelectionDataObjs[index]);
// no this is adjusted back to ratings c->coilTotCapAtPeak = TotalCoolingCap;
c->coilCapFTIdealPeak = coilCapFunTempFac;
c->coilTotCapAtPeak = TotalCoolingCap / c->coilCapFTIdealPeak;
c->coilTotCapAtPeak = TotalCoolingCap * c->coilCapFTIdealPeak;
c->capIsAutosized = isAutoSize;
c->minRatio = DXFlowPerCapMinRatio;
c->maxRatio = DXFlowPerCapMaxRatio;
Expand Down Expand Up @@ -1496,7 +1496,7 @@ void ReportCoilSelection::setCoilHeatingCapacity(
auto &c(coilSelectionDataObjs[index]);
c->capIsAutosized = isAutoSize;
c->coilCapFTIdealPeak = coilCapFunTempFac;
c->coilTotCapAtPeak = totalHeatingCap / c->coilCapFTIdealPeak;
c->coilTotCapAtPeak = totalHeatingCap * c->coilCapFTIdealPeak;
c->minRatio = DXFlowPerCapMinRatio;
c->maxRatio = DXFlowPerCapMaxRatio;

Expand Down
19 changes: 14 additions & 5 deletions src/EnergyPlus/ThermalComfort.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2988,6 +2988,7 @@ namespace ThermalComfort {
int j;
bool weathersimulation;
Real64 inavgdrybulb;
int const numHeaderRowsInEpw = 8;

if (initiate) { // not optional on initiate=true. would otherwise check for presence
weathersimulation = wthrsim;
Expand All @@ -3003,14 +3004,22 @@ namespace ThermalComfort {
const bool epwFileExists = FileSystem::fileExists(state.files.inputWeatherFilePath.filePath);
readStat = 0;
if (epwFileExists) {
// determine number of days in year
int DaysInYear;
if (state.dataEnvrn->CurrentYearIsLeapYear) {
DaysInYear = 366;
} else {
DaysInYear = 365;
}

auto epwFile = state.files.inputWeatherFilePath.open(state, "CalcThermalComfortAdaptiveCEN15251");
for (i = 1; i <= 9; ++i) { // Headers
for (i = 1; i <= numHeaderRowsInEpw; ++i) {
epwFile.readLine();
}
jStartDay = state.dataEnvrn->DayOfYear - 1;
calcStartDay = jStartDay - 7;
if (calcStartDay > 0) {
calcStartHr = 24 * (calcStartDay - 1) + 1;
calcStartHr = 24 * calcStartDay + 1;
for (i = 1; i <= calcStartHr - 1; ++i) {
epwFile.readLine();
}
Expand All @@ -3031,9 +3040,9 @@ namespace ThermalComfort {
}
} else { // Do special things for wrapping the epw
calcEndDay = jStartDay;
calcStartDay += 365;
calcStartDay += DaysInYear;
calcEndHr = 24 * calcEndDay;
calcStartHr = 24 * (calcStartDay - 1) + 1;
calcStartHr = 24 * calcStartDay + 1;
for (i = 1; i <= calcEndDay; ++i) {
state.dataThermalComforts->avgDryBulbCEN = 0.0;
for (j = 1; j <= 24; ++j) {
Expand Down Expand Up @@ -3080,7 +3089,7 @@ namespace ThermalComfort {
if (state.dataGlobal->BeginDayFlag && !state.dataThermalComforts->firstDaySet) {
// Update the running average, reset the daily avg
state.dataThermalComforts->runningAverageCEN =
0.2 * state.dataThermalComforts->runningAverageCEN + 0.8 * state.dataThermalComforts->avgDryBulbCEN;
alpha * state.dataThermalComforts->runningAverageCEN + (1.0 - alpha) * state.dataThermalComforts->avgDryBulbCEN;
state.dataThermalComforts->avgDryBulbCEN = 0.0;
}

Expand Down
4 changes: 2 additions & 2 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ set_target_properties(re2 PROPERTIES FOLDER ThirdParty/re2)
add_subdirectory(fmt-8.0.1)
target_compile_definitions(fmt PRIVATE FMT_USE_FULL_CACHE_DRAGONBOX=1)
set_target_properties(fmt PROPERTIES FOLDER ThirdParty/fmt)
add_subdirectory(cpgfunctionEP-0.5)
set_target_properties(cpgfunctionEP PROPERTIES FOLDER ThirdParty/cpgfunctionEP-0.5)
add_subdirectory(cpgfunctionEP-0.6)
set_target_properties(cpgfunctionEP PROPERTIES FOLDER ThirdParty/cpgfunctionEP-0.6)

# Kiva
include(cmake/kiva.cmake)
Expand Down
25 changes: 0 additions & 25 deletions third_party/cpgfunctionEP-0.5/include/cpgfunction/heat_transfer.h

This file was deleted.

Loading

3 comments on commit 5221c0e

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code_comp_eqp (lymereJ) - x86_64-MacOS-10.15-clang-11.0.0: OK (3159 of 3160 tests passed, 0 test warnings)

Messages:\n

  • 1 test had: ESO big diffs.

Failures:\n

regression Test Summary

  • Passed: 730
  • Failed: 1

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code_comp_eqp (lymereJ) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3200 of 3201 tests passed, 0 test warnings)

Messages:\n

  • 1 test had: ESO big diffs.

Failures:\n

regression Test Summary

  • Passed: 750
  • Failed: 1

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code_comp_eqp (lymereJ) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1697 of 1697 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.