Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sizing speed up related to reducing the number of warmup days for design days #7567

Merged
merged 10 commits into from
Jan 9, 2020
Merged
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 @@ -251,7 +251,7 @@ \subsubsection{Inputs}\label{inputs-3-034}

\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
24 changes: 20 additions & 4 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,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
Copy link
Contributor

Choose a reason for hiding this comment

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

So the code was already interpreting this input as W, but it was described as a fraction? If so, it appears that the E+ documentation needs to be updated to reflect this.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah if this was described as a fraction in the docs then they need to be changed.

N3 , \field Temperature Convergence Tolerance Value
\units deltaC
\type real
Expand All @@ -511,12 +512,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 +1158,26 @@ 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.
\note TRACE(R) 3D Plus custom feature.
Copy link
Contributor

Choose a reason for hiding this comment

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

@Myoldmopar I think we want to delete this note? And same for 1176.

Copy link
Member

Choose a reason for hiding this comment

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

Right, this should go away

\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.
\note TRACE(R) 3D Plus custom feature.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

missed it here

\type choice
\key FullResetAtBeginEnvironment
\key SuppressAllBeginEnvironmentResets
\default FullResetAtBeginEnvironment

SizingPeriod:WeatherFileDays,
\memo Use a weather file period for design sizing calculations.
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/DataGlobals.cc
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ namespace DataGlobals {

bool BeginDayFlag(false); // True at the start of each day, False after first time step in day
bool BeginEnvrnFlag(false); // True at the start of each environment, False after first time step in environ
bool beginEnvrnWarmStartFlag(false); // Sizing Speed Up
bool BeginHourFlag(false); // True at the start of each hour, False after first time step in hour
bool BeginSimFlag(false); // True until any actual simulation (full or sizing) has begun, False after first time step
bool BeginFullSimFlag(false); // True until full simulation has begun, False after first time step
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/DataGlobals.hh
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ namespace DataGlobals {

extern bool BeginDayFlag; // True at the start of each day, False after first time step in day
extern bool BeginEnvrnFlag; // True at the start of each environment, False after first time step in environ
extern bool beginEnvrnWarmStartFlag; // Sizing Speed Up true if at the start of each environment, would rather retain thermal history and the like.
extern bool BeginHourFlag; // True at the start of each hour, False after first time step in hour
extern bool BeginSimFlag; // True until any actual simulation (full or sizing) has begun, False after first time step
extern bool BeginFullSimFlag; // True until full simulation has begun, False after first time step
Expand Down
6 changes: 3 additions & 3 deletions src/EnergyPlus/DataHeatBalance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ namespace DataHeatBalance {

// Parameters for WarmupDays
int const DefaultMaxNumberOfWarmupDays(25); // Default maximum number of warmup days allowed
int const DefaultMinNumberOfWarmupDays(6); // Default minimum number of warmup days allowed
int const DefaultMinNumberOfWarmupDays(1); // Default minimum number of warmup days allowed

// Parameters for Sky Radiance Distribution
int const Isotropic(0);
Expand Down Expand Up @@ -500,7 +500,7 @@ namespace DataHeatBalance {
bool AnyAirBoundaryGroupedSolar(false); // Construction:AirBoundary with GroupedZones for solar used somewhere

int MaxNumberOfWarmupDays(25); // Maximum number of warmup days allowed
int MinNumberOfWarmupDays(6); // Minimum number of warmup days allowed
int MinNumberOfWarmupDays(1); // Minimum number of warmup days allowed
Real64 CondFDRelaxFactor(1.0); // Relaxation factor, for looping across all the surfaces.
Real64 CondFDRelaxFactorInput(1.0); // Relaxation factor, for looping across all the surfaces, user input value

Expand Down Expand Up @@ -872,7 +872,7 @@ namespace DataHeatBalance {
AnyAirBoundary = false;
AnyAirBoundaryGroupedSolar = false;
MaxNumberOfWarmupDays = 25;
MinNumberOfWarmupDays = 6;
MinNumberOfWarmupDays = 1;
CondFDRelaxFactor = 1.0;
CondFDRelaxFactorInput = 1.0;
ZoneAirSolutionAlgo = Use3rdOrder;
Expand Down
8 changes: 8 additions & 0 deletions src/EnergyPlus/HVACSizingSimulationManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,14 @@ void ManageHVACSizingSimulation(bool &ErrorsFound)
DisplayString("Initializing New Environment Parameters, HVAC Sizing Simulation");

BeginEnvrnFlag = true;
if ((KindOfSim == ksHVACSizeDesignDay) && (WeatherManager::DesDayInput(Environment(Envrn).DesignDayNum).suppressBegEnvReset)) {
// user has input in SizingPeriod:DesignDay directing to skip begin environment rests, for accuracy-with-speed as zones can more
// easily converge fewer warmup days are allowed
DisplayString("Suppressing Initialization of New Environment Parameters");
DataGlobals::beginEnvrnWarmStartFlag = true;
} else {
DataGlobals::beginEnvrnWarmStartFlag = false;
}
EndEnvrnFlag = false;
// EndMonthFlag = false;
WarmupFlag = true;
Expand Down
Loading