Skip to content

Commit

Permalink
Merge branch 'develop' into waterHeaterMixedRefactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchute committed Jan 13, 2020
2 parents 2da2dcc + ba71c79 commit b5ae030
Show file tree
Hide file tree
Showing 246 changed files with 85,630 additions and 447 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ set( CMAKE_VERSION_MAJOR 9 )
set( CMAKE_VERSION_MINOR 3 )
set( CMAKE_VERSION_PATCH 0 )

set( CMAKE_POSITION_INDEPENDENT_CODE ON )

set( PREV_RELEASE_SHA "921312f" )

set( ENERGYPLUS_VERSION "${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}.${CMAKE_VERSION_PATCH}" )
Expand Down Expand Up @@ -181,6 +183,7 @@ ADD_SUBDIRECTORY(third_party/FMI)
ADD_SUBDIRECTORY(third_party/zlib)
ADD_SUBDIRECTORY(third_party/DElight)
ADD_SUBDIRECTORY(third_party/re2)
ADD_SUBDIRECTORY(third_party/fmt-6.1.2 )

ADD_SUBDIRECTORY(scripts/dev/generate_embeddable_epJSON_schema)
IF( NOT APPLE )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,15 @@ \subsubsection{Inputs}\label{inputs-1-024}

If the choice in the Solar Model Indicator field is ASHRAEClearSky or ZhangHuang, then this numeric field should be entered. This value represents the ``clearness'' value for the day. This value, along with the solar position as defined by the Location information and the date entered for the design day, help define the solar radiation values for each hour of the day. Clearness may range from 0.0 to 1.2, where 1.0 represents a clear sky at sea level. Values greater than 1.0 may be used for high altitude locations. Traditionally, one uses 0.0 clearness for Winter Design Days. Note that this ``sky clearness'' does not have the same meaning as output variable ``Site Daylighting Model Sky Clearness''.

\paragraph{Field: Maximum Number Warmup Days}\label{field-max-num-warm-days}

Optional integer number of days for an upper limit on the number of warmup days when running this sizing period. This overrides the global maximum set in the Building object for this particular design day.

\paragraph{Field: Begin Environment Reset Mode}\label{field-beg-env-reset-mode}

Optional choice field to control if zone heat balance history terms should be reset when beginning to run this sizing period. This can reduce the number of warmup days needed to reach zone convergence. The options are \textbf{FullResetAtBeginEnvironment} or \textbf{SuppressThermalResetAtBeginEnvironment}. \textbf{FullResetAtBeginEnvironment} means that at the beginning of the design day warmup the building model's surfaces are set to 23 degrees C, which is the usual starting point for each environment. \textbf{SuppressThermalResetAtBeginEnvironment} means that at the beginning of the design day warmup the building model's surfaces are not reset and will just retain whatever thermal history results they had at the end of the previous design day. The warmup days still proceed as usual but because the initial condition is closer it needs fewer warmup days to reach convergence. This is available to reduce simulation run time when using many design days that are similiar to each other.


IDF Examples:

\begin{lstlisting}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ \subsubsection{Inputs}\label{inputs-3-034}

\paragraph{Warmup Convergence}\label{warmup-convergence}

The following two fields along with the minimum and maximum number of warmup days (also in this object) define the user specified criteria for when EnergyPlus will ``converge'' at each environment (each sizing period or run period set as Yes in the \hyperref[simulationcontrol]{SimulationControl} object). EnergyPlus ``runs'' the first day of the environment (starting with a set of hard-coded initial conditions: temperatures are initialized to 23C and zone humidity ratios are initialized to the outdoor humidity ratio) until the loads/temperature convergence tolerance values are satisfied (next two fields) or until it reaches ``maximum number of warmup days''. Note that setting the convergence tolerance values too loose will cause the program to be satisfied too early and you may not get the results you expect from the actual simulation.
The following two fields along with the minimum and maximum number of warmup days (also in this object) define the user specified criteria for when EnergyPlus will ``converge'' at each environment (each sizing period or run period set as Yes in the \hyperref[simulationcontrol]{SimulationControl} object). At the beginning of a new enviroment the building model is reinitialized so that temperatures are initialized to 23C and zone humidity ratios are initialized to the outdoor humidity ratio (unless this initialization is suppressed using the input field called Begin Environment Reset Mode in the \hyperref[sizingperioddesignday]{SizingPerod:DesignDay} object). EnergyPlus repeatedly ``runs'' the first day of the environment or until it reaches ``maximum number of warmup days'' or the convergence criteria are met. Note that setting the convergence tolerance values too loose will cause the program to be satisfied too early and you may not get the results you expect from the actual simulation. However too tight of a value and the program will repeat the first day too many times leading to excessive simulation run time.

\paragraph{Field: Loads Convergence Tolerance Value}\label{field-loads-convergence-tolerance-value}

This value represents the number at which the loads values must agree before ``convergence'' is reached. Loads tolerance value is a fraction of the load.
This value represents the number at which the loads values must agree before ``convergence'' is reached. Loads tolerance is the change in peak zone heating and cooling loads that are predicted from previous warmup day to the current day, in units of W.

\paragraph{Field: Temperature Convergence Tolerance Value}\label{field-temperature-convergence-tolerance-value}

Expand Down Expand Up @@ -249,9 +249,11 @@ \subsubsection{Inputs}\label{inputs-3-034}

You may be able to increase the Maximum Number of Warmup Days and get convergence, but some anomalous buildings may still not converge. Simulation proceeds for x warmup days until ``convergence'' is reached (see the discussion under the Temperature Convergence Tolerance Value field in this object, just above).

The value in this field is an overall parameter for all types of environments in the simulation. The maximum nmber of warmup days can also be controlled separately for individual designgdays using the input field Maximum Number Warmup Days in the \hyperref[sizingperioddesignday]{SizingPerod:DesignDay} object.

\paragraph{Field: Minimum Number of Warmup Days}\label{field-minimum-number-of-warmup-days}

This field specifies the minimum number of ``warmup'' days before EnergyPlus will check if it has achieved convergence and can thus start simulating the particular environment (design day, annual run) in question. Research into the minimum number of warmup days indicates that 6 warmup days is generally enough on the minimum end of the spectrum to avoid false predictions of convergence and thus to produce enough temperature and flux history to start EnergyPlus simulation. This was based on a study that used the benchmark reference buildings. It also was observed that convergence performance improved when the number of warmup days increased. As a result, the default value for the minimum warmup days has been set to 6. Users should decrease this number only if they have knowledge that a specific file converges more quickly than 6 days. Users may wish to increase the value in certain situations when, based on the output variables described in the Output Details document, it is determined that EnergyPlus has not converged. While this parameter should be less than the previous parameter, a value greater than the value entered in the field ``Maximum Number of Warmup Days'' above may be used when users wish to increase warmup days more than the previous field. In this particular case, the previous field will be automatically reset to the value entered in this field and EnergyPlus will run exactly the number of warmup days specified in this field.
This field specifies the minimum number of ``warmup'' days before EnergyPlus will check if it has achieved convergence and can thus start simulating the particular environment (design day, annual run) in question. Although some older investigations indicated that 6 warmup days is generally enough on the minimum end of the spectrum, current thinking is that the convergence checks (controlled by convergence tolerance values above) can be relied on to determine a minimum number of warm days. An arbitrary high minimum can lead to excessive run times for lightweight buildings that may converge quickly and not need many warmup days. Therefore the default is reduced from 6 to just 1. A value of 6 here will replicate older behavior if field was being left blank. Users may wish to increase the value in certain situations when, based on the output variables described in the Output Details document, it is determined that EnergyPlus has not converged. While this parameter should be less than the previous maximum parameter, a value greater than the value entered in the field ``Maximum Number of Warmup Days'' above may be used when users wish to increase warmup days more than the previous field. In this particular case, the previous field will be automatically reset to the value entered in this field and EnergyPlus will run exactly the number of warmup days specified in this field.

An example from an IDF:

Expand Down
23 changes: 18 additions & 5 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@
! hr
! J/J
! kg/kg
! kg-H2O/kg-air
! kgWater/kgDryAir
! kmol
! kmol/s
Expand Down Expand Up @@ -482,11 +481,12 @@ Building,
\key Urban
\default Suburbs
N2 , \field Loads Convergence Tolerance Value
\note Loads Convergence Tolerance Value is a fraction of load
\note Loads Convergence Tolerance Value is a change in load from one warmup day to the next
\type real
\minimum> 0.0
\maximum .5
\default .04
\units W
N3 , \field Temperature Convergence Tolerance Value
\units deltaC
\type real
Expand All @@ -511,12 +511,14 @@ Building,
N5 ; \field Minimum Number of Warmup Days
\note The minimum number of warmup days that produce enough temperature and flux history
\note to start EnergyPlus simulation for all reference buildings was suggested to be 6.
\note However this can lead to excessive run times as warmup days can be repeated needlessly.
\note For faster execution rely on the convergence criteria to detect when warmup is complete.
\note When this field is greater than the maximum warmup days defined previous field
\note the maximum number of warmup days will be reset to the minimum value entered here.
\note Warmup days will be set to be the value you entered when it is less than the default 6.
\note Warmup days will be set to be the value you entered. The default is 1.
\type integer
\minimum> 0
\default 6
\default 1

ShadowCalculation,
\unique-object
Expand Down Expand Up @@ -1155,13 +1157,24 @@ SizingPeriod:DesignDay,
\minimum 0
\maximum 3
\default 0
N14; \field Sky Clearness
N14, \field Sky Clearness
\note Used if Sky Model Indicator = ASHRAEClearSky or ZhangHuang
\minimum 0.0
\maximum 1.2
\default 0.0
\note 0.0 is totally unclear, 1.0 is totally clear
\type real
N15, \field Maximum Number Warmup Days
\note If used this design day will be run with a custom limit on the maximum number of days that are repeated for warmup.
\note Limiting the number of warmup days can improve run time.
\type integer
A13; \field Begin Environment Reset Mode
\note If used this can control if you want the thermal history to be reset at the beginning of the design day.
\note When using a series of similiar design days, this field can be used to retain warmup state from the previous design day.
\type choice
\key FullResetAtBeginEnvironment
\key SuppressAllBeginEnvironmentResets
\default FullResetAtBeginEnvironment

SizingPeriod:WeatherFileDays,
\memo Use a weather file period for design sizing calculations.
Expand Down
4 changes: 2 additions & 2 deletions src/ConvertInputFormat/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ int main(int argc, const char *argv[])
auto const embeddedEpJSONSchema = EnergyPlus::EmbeddedEpJSONSchema::embeddedEpJSONSchema();
auto schema = json::from_cbor(embeddedEpJSONSchema.first, embeddedEpJSONSchema.second);

auto number_files = files.size();
int number_files = static_cast<int>(files.size());
std::size_t fileCount = 0;

#ifdef _OPENMP
Expand All @@ -501,7 +501,7 @@ int main(int argc, const char *argv[])
shared(files, number_files, fileCount, schema, outputType, outputTypeStr, output_directory)
{
#pragma omp for
for (std::size_t i = 0; i < number_files; ++i) {
for (int i = 0; i < number_files; ++i) {
bool successful = processInput(files[i], schema, outputType, output_directory, outputTypeStr);
#pragma omp atomic
++fileCount;
Expand Down
4 changes: 3 additions & 1 deletion src/EnergyPlus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ SET( SRC
OutAirNodeManager.hh
OutdoorAirUnit.cc
OutdoorAirUnit.hh
OutputFiles.cc
OutputFiles.hh
OutputProcessor.cc
OutputProcessor.hh
OutputReportPredefined.cc
Expand Down Expand Up @@ -677,7 +679,7 @@ endif()
# first we will create a static library of EnergyPlus
# this will be linked statically to create the DLL and also the unit tests
add_library( energypluslib STATIC ${SRC} )
target_link_libraries( energypluslib objexx sqlite bcvtb epexpat epfmiimport re2 DElight libkiva btwxt Windows-CalcEngine airflownetworklib )
target_link_libraries( energypluslib fmt::fmt objexx sqlite bcvtb epexpat epfmiimport re2 DElight libkiva btwxt Windows-CalcEngine airflownetworklib )
add_dependencies( energypluslib GenerateEmbeddedEpJSONSchema )
if(BUILD_GROUND_PLOT)
set_source_files_properties(HeatBalanceKivaManager.cc PROPERTIES COMPILE_DEFINITIONS GROUND_PLOT)
Expand Down
Loading

7 comments on commit b5ae030

@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.

waterHeaterMixedRefactor (mitchute) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (11 of 11 tests passed, 0 test warnings)

Build 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.

waterHeaterMixedRefactor (mitchute) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

waterHeaterMixedRefactor (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (2605 of 2639 tests passed, 67 test warnings)

Messages:\n

  • 98 tests had: MDD diffs.
  • 100 tests had: MTD diffs.
  • 98 tests had: RDD diffs.
  • 16 tests had: EIO diffs.
  • 33 tests had: Table big diffs.
  • 47 tests had: MTR small diffs.
  • 39 tests had: ESO small diffs.
  • 12 tests had: BND diffs.
  • 1 test had: JSON big diffs.
  • 2 tests had: AUD diffs.

Failures:\n

regression Test Summary

  • Passed: 656
  • Failed: 34

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.

waterHeaterMixedRefactor (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1257 of 1257 tests passed, 0 test warnings)

Build Badge Test Badge Coverage 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.

waterHeaterMixedRefactor (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (674 of 675 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 674
  • Timeout: 1

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

waterHeaterMixedRefactor (mitchute) - Win64-Windows-10-VisualStudio-16: OK (2565 of 2599 tests passed, 67 test warnings)

Messages:\n

  • 98 tests had: MDD diffs.
  • 100 tests had: MTD diffs.
  • 98 tests had: RDD diffs.
  • 16 tests had: EIO diffs.
  • 33 tests had: Table big diffs.
  • 40 tests had: ESO small diffs.
  • 46 tests had: MTR small diffs.
  • 12 tests had: BND diffs.
  • 1 test had: JSON big diffs.
  • 2 tests had: AUD diffs.

Failures:\n

regression Test Summary

  • Passed: 636
  • Failed: 34

Build Badge Test Badge

@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.

waterHeaterMixedRefactor (mitchute) - x86_64-MacOS-10.13-clang: Tests Failed (804 of 2598 tests passed, 9 test warnings)

Messages:\n

  • 278 tests had: Table big diffs.
  • 91 tests had: EIO diffs.

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 32
  • Failed: 3
  • notrun: 783

integration Test Summary

  • Passed: 671
  • Failed: 1

regression Test Summary

  • Passed: 26
  • Failed: 644

Build Badge Test Badge

Please sign in to comment.