Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/NREL/EnergyPlus into #6712
Browse files Browse the repository at this point in the history
…-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer
  • Loading branch information
rraustad committed Sep 13, 2018
2 parents 41e2928 + 5b746f2 commit 4677015
Show file tree
Hide file tree
Showing 21 changed files with 585 additions and 66 deletions.
Expand Up @@ -523,7 +523,8 @@ \subsection{Foundation:Kiva}\label{foundationkiva}
However, multiple floors may exist in the same thermal zone so long as
they reference separate Foundation:Kiva objects.
\item
All foundation wall surfaces must be quadrilateral.
Foundation wall surfaces that are not triangular or quadrilateral may not
translate well into the two-dimensional finite difference context.
\end{itemize}

For each floor surface with ``Foundation'' set as the ``Outside Boundary Condition''
Expand Down Expand Up @@ -583,7 +584,7 @@ \subsection{Foundation:Kiva}\label{foundationkiva}
data\label{fig:surf}}
\end{figure}

The depth of the foundation is defined by the hight of the wall surfaces
The depth of the foundation is defined by the height of the wall surfaces
that reference the Foundation:Kiva boundary condition object. For
slab-on-grade foundations, a depth of zero is implied by having no
associated wall surfaces. Figure \ref{fig:ws} shows a slab-on-grade
Expand All @@ -604,7 +605,7 @@ \subsection{Foundation:Kiva}\label{foundationkiva}
\end{figure}

A walkout basement (with a variable grade along the sides; see Figure
\ref{fig:wo-r}) must be modeled using discrete quadrilateral surfaces of
\ref{fig:wo-r}) is best modeled using discrete quadrilateral surfaces of
stepped height for the walls as shown in Figure \ref{fig:wo-s}.

\begin{figure}
Expand Down
Expand Up @@ -3661,7 +3661,7 @@ \subsection{Coil:Heating:DX:SingleSpeed}\label{coilheatingdxsinglespeed}
\item
The part load fraction correlation (function of part load ratio) is a quadratic or cubic curve with the independent variable being part load ratio (sensible heating load / steady-state heating capacity). The output of this curve is used in combination with the rated EIR and EIR modifier curves to give the effective EIR for a given simulation timestep. The part load fraction correlation accounts for efficiency losses due to compressor cycling.
\item
The defrost energy input ratio (EIR) modifier curve (function of temperature) is a bi-quadratic curve with two independent variables: outdoor air dry-bulb temperature and the heating coil entering air wet-bulb temperature. The output of this curve is multiplied by the heating coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the coil is operating. This curve is only required when a reverse-cycle defrost strategy is specified.
The defrost energy input ratio (EIR) modifier curve (function of temperature) is a bi-quadratic curve with two independent variables: the heating coil entering air wet-bulb temperature (variable x) and the outdoor air dry-bulb temperature (variable y). The output of this curve is multiplied by the heating coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the coil is operating. This curve is only required when a reverse-cycle defrost strategy is specified.
\end{enumerate}

The curves are simply specified by name. Curve inputs are described in the curve manager section of this document (ref. Performance Curves).
Expand Down Expand Up @@ -3742,7 +3742,7 @@ \subsubsection{Inputs}\label{inputs-19-001}

\paragraph{Field: Defrost Energy Input Ratio Function of Temperature Curve Name}\label{field-defrost-energy-input-ratio-function-of-temperature-curve-name}

This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the outdoor air dry-bulb temperature and the wet-bulb temperature of the air entering the indoor coil. The EIR is the inverse of the COP. The output of this curve is multiplied by the coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. This curve is only required when a reverse-cycle defrost strategy is selected. The curve is normalized to a value of 1.0 at the rating point conditions.
This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the wet-bulb temperature of the air entering the indoor coil (variable x) and the outdoor air dry-bulb temperature (variable y). The EIR is the inverse of the COP. The output of this curve is multiplied by the coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. This curve is only required when a reverse-cycle defrost strategy is selected. The curve is normalized to a value of 1.0 at the rating point conditions.

\paragraph{Field: Minimum Outdoor Dry-Bulb Temperature for Compressor Operation}\label{field-minimum-outdoor-dry-bulb-temperature-for-compressor-operation}

Expand Down Expand Up @@ -3910,7 +3910,7 @@ \subsection{Coil:Heating:DX:MultiSpeed}\label{coilheatingdxmultispeed}

The next input defines the minimum outdoor dry-bulb temperature where the compressor will operate. The followed two inputs are related to crankcase heater operation: capacity and maximum outdoor dry-bulb temperature for crankcase heater operation. The next six inputs cover defrost operation: defrost EIR modifier curve, the maximum outdoor dry-bulb temperature for defrost operation, the type of defrost strategy (reverse-cycle or resistive), defrost control (timed or on-demand), the fractional defrost time period (timed defrost control only), and the resistive defrost heater capacity if a resistive defrost strategy is selected. The activation of defrost is dependent on outdoor conditions. The capacity reduction and energy use modification are independent of speed. The defrost EIR modifier is described below:

The defrost energy input ratio (EIR) modifier curve (function of temperature) is a bi-quadratic curve with two independent variables: outdoor air dry-bulb temperature and the heating coil entering air wet-bulb temperature. The output of this curve is multiplied by the heating coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the coil is operating. This curve is only required when a reverse-cycle defrost strategy is specified.
The defrost energy input ratio (EIR) modifier curve (function of temperature) is a bi-quadratic curve with two independent variables: the heating coil entering air wet-bulb temperature (variable x) and the outdoor air dry-bulb temperature (variable y). The output of this curve is multiplied by the heating coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the coil is operating. This curve is only required when a reverse-cycle defrost strategy is specified.

The next input allows the user to choose whether to apply the part load fraction correlation to speeds greater than 1 or not. The following input is the type of fuel.

Expand Down Expand Up @@ -3966,7 +3966,7 @@ \subsubsection{Inputs}\label{inputs-20-001}

\paragraph{Field: Defrost Energy Input Ratio Function of Temperature Curve Name}\label{field-defrost-energy-input-ratio-function-of-temperature-curve-name-1}

This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the outdoor air dry-bulb temperature and the wet-bulb temperature of the air entering the indoor coil. The EIR is the inverse of the COP. The output of this curve is multiplied by the coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. This curve is only required when a reverse-cycle defrost strategy is selected. The curve is normalized to a value of 1.0 at the rating point conditions.
This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the wet-bulb temperature of the air entering the indoor coil (variable x) and the outdoor air dry-bulb temperature (variable y). The EIR is the inverse of the COP. The output of this curve is multiplied by the coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. This curve is only required when a reverse-cycle defrost strategy is selected. The curve is normalized to a value of 1.0 at the rating point conditions.

\paragraph{Field: Maximum Outdoor Dry-Bulb Temperature for Defrost Operation}\label{field-maximum-outdoor-dry-bulb-temperature-for-defrost-operation-1}

Expand Down Expand Up @@ -4310,7 +4310,7 @@ \subsubsection{Inputs}\label{inputs-21-001}

\paragraph{Field: Defrost Energy Input Ratio Function of Temperature Curve Name}\label{field-defrost-energy-input-ratio-function-of-temperature-curve-name-2}

This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the outdoor air dry-bulb temperature and the wet-bulb temperature of the air entering the indoor coil. The EIR is the inverse of the COP. The output of this curve is multiplied by the coil capacity at the maximum speed level, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. This curve is only required when a reverse cycle defrost strategy is selected. The curve is normalized to a value of 1.0 at the rating point conditions.
This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the wet-bulb temperature of the air entering the indoor coil (variable x) and the outdoor air dry-bulb temperature (variable y). The EIR is the inverse of the COP. The output of this curve is multiplied by the coil capacity at the maximum speed level, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. This curve is only required when a reverse cycle defrost strategy is selected. The curve is normalized to a value of 1.0 at the rating point conditions.

\paragraph{Field: Minimum Outdoor Dry-Bulb Temperature for Compressor Operation}\label{field-minimum-outdoor-dry-bulb-temperature-for-compressor-operation-2}

Expand Down
Expand Up @@ -266,7 +266,7 @@ \subsubsection{Inputs}\label{inputs-051}

\paragraph{Field: Defrost Energy Input Ratio Modifier Function of Temperature Curve Name}\label{field-defrost-energy-input-ratio-modifier-function-of-temperature-curve-name}

This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the outdoor air dry-bulb temperature and the weighted average wet-bulb temperature of the air entering the indoor terminal units. The output of this curve is multiplied by the coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. The curve is normalized to a value of 1.0 at the rating point conditions.
This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the weighted average wet-bulb temperature of the air entering the indoor terminal units (variable x) and the outdoor air dry-bulb temperature (variable y). The output of this curve is multiplied by the coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. The curve is normalized to a value of 1.0 at the rating point conditions.

\paragraph{Field: Defrost Time Period Fraction}\label{field-defrost-time-period-fraction-001}

Expand Down Expand Up @@ -887,7 +887,7 @@ \subsubsection{Inputs}\label{inputs-1-048}

\paragraph{Field: Defrost Energy Input Ratio Modifier Function of Temperature Curve Name}\label{field-defrost-energy-input-ratio-modifier-function-of-temperature-curve-name-1}

This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the outdoor air dry-bulb temperature and the weighted average wet-bulb temperature of the air entering the indoor terminal units. The output of this curve is multiplied by the coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. The curve is normalized to a value of 1.0 at the rating point conditions.
This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the weighted average wet-bulb temperature of the air entering the indoor terminal units (variable x) and the outdoor air dry-bulb temperature (variable y). The output of this curve is multiplied by the coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. The curve is normalized to a value of 1.0 at the rating point conditions.

\paragraph{Field: Defrost Time Period Fraction}\label{field-defrost-time-period-fraction-1-000}

Expand Down Expand Up @@ -1361,7 +1361,7 @@ \subsubsection{Inputs}

\paragraph{Field: Defrost Energy Input Ratio Modifier Function of Temperature Curve Name}

This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the outdoor air dry-bulb temperature and the weighted average wet-bulb temperature of the air entering the indoor terminal units. The output of this curve is multiplied by the coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. The curve is normalized to a value of 1.0 at the rating point conditions.
This alpha field defines the name of a bi-quadratic performance curve (ref: Performance Curves) that parameterizes the variation of the energy input ratio (EIR) during reverse-cycle defrost periods as a function of the weighted average wet-bulb temperature of the air entering the indoor terminal units (variable x) and the outdoor air dry-bulb temperature (variable y). The output of this curve is multiplied by the coil capacity, the fractional defrost time period and the runtime fraction of the heating coil to give the defrost power at the specific temperatures at which the indoor and outdoor coils are operating. The curve is normalized to a value of 1.0 at the rating point conditions.

\paragraph{Field: Defrost Time Period Fraction}

Expand Down
48 changes: 48 additions & 0 deletions src/EnergyPlus/DataSurfaces.cc
Expand Up @@ -994,6 +994,54 @@ namespace DataSurfaces {
}
}

Real64 SurfaceData::get_average_height() const
{
if (std::abs(SinTilt) < 1.e-4) {
return 0.0;
}
using Vertex2D = ObjexxFCL::Vector2<Real64>;
using Vertices2D = ObjexxFCL::Array1D<Vertex2D>;
Vertices::size_type const n(Vertex.size());
assert(n >= 3);

Vertices2D v2d(n);

// project onto 2D vertical plane
Real64 xRef = Vertex[0].x;
Real64 yRef = Vertex[0].y;
Real64 const &saz(SinAzim);
Real64 const &caz(CosAzim);
for (Vertices::size_type i = 0; i < n; ++i) {
Vector const &v(Vertex[i]);
v2d[i] = Vertex2D((v.x - xRef)*caz + (v.y - yRef)*saz, v.z);
}

// piecewise linear integration

// Get total width of polygon
Real64 minX(v2d[0].x), maxX(v2d[0].x);
for (Vertices::size_type i = 0; i < n; ++i) {
Vertex2D const &v(v2d[i]);
minX = std::min(minX, v.x);
maxX = std::max(maxX, v.x);
}
Real64 totalWidth = maxX - minX;

Real64 averageHeight = 0.0;
for (Vertices::size_type i = 0; i < n; ++i) {
Vertex2D const &v(v2d[i]);

Vertex2D *v2;
if (i == n - 1) {
v2 = &v2d[0];
} else {
v2 = &v2d[i+1];
}
averageHeight += 0.5*(v.y + v2->y)*(v2->x - v.x)/totalWidth;
}
return std::abs(averageHeight)/SinTilt;
}

// Functions

// Clears the global data in DataSurfaces.
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/DataSurfaces.hh
Expand Up @@ -826,6 +826,8 @@ namespace DataSurfaces {

int getTotLayers() const;

Real64 get_average_height() const;

private: // Methods
// Computed Shape Category
ShapeCat computed_shapeCat() const;
Expand Down
Expand Up @@ -230,9 +230,8 @@ void FiniteDiffGroundTempsModel::getWeatherData()
Environment(NumOfEnvrn).KindOfEnvrn = ksReadAllWeatherData;
RPReadAllWeatherData = true;
WeathSimReq = true;
RunPeriodInput(TotRunPers).startJulianDate = 1; // JulianDay( 1, 1, 0 );
RunPeriodInput(TotRunPers).endJulianDate = 365; // JulianDay( 12, 31, 0 );
RunPeriodInput(TotRunPers).monWeekDay = 0;
// RunPeriod is initialized to be one year of simulation
//RunPeriodInput(TotRunPers).monWeekDay = 0; // Why do this?

SetupEnvironmentTypes();

Expand All @@ -258,10 +257,8 @@ void FiniteDiffGroundTempsModel::getWeatherData()
NumOfWarmupDays = 0;

annualAveAirTemp_num = 0.0;
// Protect against array bounds error
int maxSimDays = min(NumDaysInYear, NumOfDayInEnvrn);

while ((DayOfSim < maxSimDays) || (WarmupFlag)) { // Begin day loop ...
while ((DayOfSim < NumDaysInYear) || (WarmupFlag)) { // Begin day loop ...

++DayOfSim;

Expand Down

8 comments on commit 4677015

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - i386-Windows-7-VisualStudio-14: OK (3009 of 3009 tests passed, 0 test warnings)

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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-MacOS-10.9-clang: OK (2968 of 3009 tests passed, 30 test warnings)

Messages:

  • 15 tests had: Table small diffs.
  • 40 tests had: Table big diffs.
  • 11 tests had: BND diffs.
  • 4 tests had: MTD diffs.
  • 12 tests had: RDD diffs.
  • 7 tests had: ERR diffs.
  • 30 tests had: EIO diffs.
  • 15 tests had: ESO big diffs.
  • 9 tests had: MTR big diffs.
  • 6 tests had: ESO small diffs.
  • 5 tests had: MTR small diffs.

Failures:

regression Test Summary

  • Passed: 590
  • Failed: 41

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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-Linux-Ubuntu-14.04-gcc-4.8: OK (3008 of 3049 tests passed, 31 test warnings)

Messages:

  • 16 tests had: Table small diffs.
  • 40 tests had: Table big diffs.
  • 11 tests had: BND diffs.
  • 4 tests had: MTD diffs.
  • 12 tests had: RDD diffs.
  • 8 tests had: ERR diffs.
  • 31 tests had: EIO diffs.
  • 15 tests had: ESO big diffs.
  • 9 tests had: MTR big diffs.
  • 7 tests had: ESO small diffs.
  • 5 tests had: MTR small diffs.

Failures:

regression Test Summary

  • Passed: 610
  • Failed: 41

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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-UnitTestsCoverage-Debug: OK (1745 of 1745 tests passed, 0 test warnings)

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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - Win64-Windows-7-VisualStudio-14: OK (2968 of 3009 tests passed, 30 test warnings)

Messages:

  • 16 tests had: Table small diffs.
  • 40 tests had: Table big diffs.
  • 11 tests had: BND diffs.
  • 4 tests had: MTD diffs.
  • 12 tests had: RDD diffs.
  • 7 tests had: ERR diffs.
  • 31 tests had: EIO diffs.
  • 15 tests had: ESO big diffs.
  • 9 tests had: MTR big diffs.
  • 6 tests had: ESO small diffs.
  • 5 tests had: MTR small diffs.

Failures:

regression Test Summary

  • Passed: 590
  • Failed: 41

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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-IntegrationCoverage-Debug: OK (2381 of 2381 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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-Linux-Ubuntu-14.04-custom_check: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

Please sign in to comment.