Skip to content

Commit

Permalink
Merge branch 'develop' into 168168673_Issue7476
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigusse committed Aug 29, 2019
2 parents 76a9587 + 5b9e3c1 commit aee1c45
Show file tree
Hide file tree
Showing 34 changed files with 1,553 additions and 96 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,91 @@
\section{Surface Heat Balance With Moveable Insulation}\label{surface-heat-balance-with-moveable-insulation}
\section{Surface Heat Balances With Moveable Insulation}\label{surface-heat-balances-with-moveable-insulation}

\subsection{Basic Heat Balance Cases}\label{basic-heat-balance-cases}
In EnergyPlus, moveable insulation can be present either on the interior or exterior side of a particular construction. Different heat balances are impacted depending on the location of the moveable insulation. Having moveable insulation on the interior side results in a modified form of the inside surface heat balance equation. Having moveable insulation on the exterior side results in different cases for the outside surface heat balance. Information on the modeling equations for each of these types of moveable insulation are shown in the next several sections.

A heat balance must exist at the outside surface-air interface. The incoming conductive, convective, and radiative fluxes must sum up to zero:
\subsection{Inside Heat Balance with Interior Moveable Insulation}\label{inside-heat-balance-with-interior-moveable-insulation}

There are two different heat balances which must be maintained to model interior moveable insulation. At both the interface between the zone air and the moveable insulation and the interface between the moveable insulation and the surface (wall, roof, etc.), the following general heat balance must be maintained:

\begin{equation}
Conductive + Convective + Radiative = 0
\label{eq:BasicSteadyStateHeatBalanceEquation}
\end{equation}

One significant complication of the inside heat balance is the fact that surfaces within the same zone can interact with each other radiatively. This means that a solution for all surface temperatures must be done at the same time to maintain a radiation heat balance among the surfaces. This requires some iteration of the inside surface heat balance as will be seen in the equations that are shown later in this subsection.

Another complication of the inside heat balance relates to the presense of moveable insulation. When moveable insulation is present, a second heat balance equation is required to determine the temperature at both the air-moveable insulation interface as well as the moveable insulation-surface interface. This sets up a system of two equations with two unknowns: the temperatures at the air-moveable insulation interface and the moveable insulation-surface interface.

Applying the basic steady state heat balance equation at each of these interfaces results in the following two equations:

\begin{equation}
H_c \cdot \left( T_a - T_{mi} \right) + Q_{lw} + H_{mi} \cdot \left( T_i - T_{mi} \right) + I_t \cdot \left( T_{old} - T_{mi} \right) = 0
\label{eq:InsideHBAirMovInsInterface}
\end{equation}

\begin{equation}
H_{mi} \cdot \left( T_{mi} - T_i \right) + Q_{sw} + Q_{cond} = 0
\label{eq:InsideHBMovInsSurfInterface}
\end{equation}

where:

\(H_c\) is the convective heat transfer coefficient between the moveable insulation and the air

\(T_a\) is the zone air temperature

\(T_{mi}\) is the temperature at the interface between the air and the moveable insulation

\(Q_{lw}\) is the long wavelength radiation incident on the interface between the air and the moveable insulation

\(H_{mi}\) is the U-value of the moveable insulation material

\(T_i\) is the temperature at the interface between the moveable insulation and the surface

\(I_t\) is a damping constant for iterating to achieve a stable radiant exchange between zone surfaces

\(T_{old}\) is the previous surface temperature at the last solution iteration

\(Q_{sw}\) is the short wavelength radiation incident on the interface between the moveable insulation and the surface

\(Q_{cond}\) is the conduction heat transfer through the surface.

Equation~\ref{eq:InsideHBAirMovInsInterface} is the heat balance at the air-moveable insulation interface and can be rearranged to solve for the temperature at this interface, T\(_{mi}\). Equation~\ref{eq:InsideHBMovInsSurfInterface} is the heat balance at the moveable insulation-surface interface and provides a second equation for T\(_{mi}\). Both equations leave T\(_{mi}\) as a function of T\(_{i}\) and other known quantities as shown below.

It should be noted that there are some assumptions built into these equations. First, all long wavelength radiation whether from other surfaces or other elements (such as heat sources which add radiation to the zone) is all assumed to be incident at and influence the air-moveable insulation interface. This also means that no long wavelength radiation is transmitted through the moveable insulation to the moveable insulation-surface interface. Second, all short wavelength radiation is assumed to be transmitted through the moveable insulation to the moveable-insulation interface. This is a simplification that is consistent with transparent insulation and assumes that the moveable insulation material itself does not absorb any short wavelength as it passes through it. Third, the term Q\(_{cond}\) includes several terms that all relate to the method for calculating heat conduction through the actual surface to which the moveable insulation is attached. Finally, the moveable insulation material is sufficiently lightweight thermally that it has no thermal mass and it can be treated as an equivalent resistance.

Equation~\ref{eq:InsideHBAirMovInsInterface} can be rearranged to obtain:

\begin{equation}
\left( H_c + H_{mi} + I_t \right) \cdot T_m = H_c \cdot T_a + H_m \cdot T_i + Q_{lw} + I_t \cdot T_{old}
\label{eq:RearrangedHBAirMovIns}
\end{equation}

When Equation~\ref{eq:InsideHBMovInsSurfInterface} is rearranged to solve for \(T_m\) and this is substituted back into Equation~\ref{eq:RearrangedHBAirMovIns}, one obtains a single equation that allows for the solution of \(T_i\). This can then be used to solve for \(T_{mi}\).

The C++ code that is used to solve for \(T_i\) and \(T_{mi}\) for cases where moveable insulation is present on the interior side is shown below.

\begin{lstlisting}
F1 = HMovInsul / (HMovInsul + HConvIn_surf + IterDampConst);

TempSurfIn(SurfNum) = (CTFConstInPart(SurfNum) + QRadSWInAbs(SurfNum) + construct.CTFCross(0) * TH11 +
F1 * (QRadThermInAbs(SurfNum) + HConvIn_surf * RefAirTemp(SurfNum) +
NetLWRadToSurf(SurfNum) + QHTRadSysSurf(SurfNum) +
QCoolingPanelSurf(SurfNum) + QHWBaseboardSurf(SurfNum) +
QSteamBaseboardSurf(SurfNum) + QElecBaseboardSurf(SurfNum) +
QAdditionalHeatSourceInside(SurfNum) +
IterDampConst * TempInsOld(SurfNum)))
/ (construct.CTFInside(0) + HMovInsul - F1 * HMovInsul);

TempSurfInTmp(SurfNum) = (construct.CTFInside(0) * TempSurfIn(SurfNum) +
HMovInsul * TempSurfIn(SurfNum) -
QRadSWInAbs(SurfNum) - CTFConstInPart(SurfNum) -
construct.CTFCross(0) * TH11) / (HMovInsul);
\end{lstlisting}

\subsection{Outside Heat Balance Cases for Exterior Moveable Insulation}\label{outside-heat-balance-cases-for-exterior-moveable-insulation}

Just like at the inside surface-air interface, a heat balance must exist at the outside surface-air interface. The incoming conductive, convective, and radiative fluxes must sum up to zero as shown in Equation~\ref{eq:BasicSteadyStateHeatBalanceEquation}.

In contrast to the internal surface heat balance that treats all surfaces simultaneously, the external thermal balance for each surface is performed independent of all other surfaces. This implies that there is no direct interaction between the individual surfaces.

TARP includes four possible representations for the basic outside surface heat balance. The first two depend on which of the optimal surface conductance algorithms the user selects. The simple outside surface conductance that includes both the convective and thermal interchange between the surface and the environment in a single coefficient, is represented by the thermal network in Figure~\ref{fig:thermal-network-for-simple-outside-surface}. Equation~\ref{eq:BasicSteadyStateHeatBalanceEquation} can also be expressed as:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2403,6 +2403,7 @@ \subsection{Surface Output Variables/Reports}\label{surface-output-variablesrepo
\begin{lstlisting}
Zone,Sum,Surface Inside Face Heat Balance Calculation Iteration Count []
Zone,Average,Surface Inside Face Temperature [C]
Zone,Average,Surface Inside Face Interior Movable Insulation Temperature [C]
Zone,Average,Surface Outside Face Temperature [C]
Zone,Average,Surface Inside Face Adjacent Air Temperature [C]
Zone,Average,Surface Inside Face Convection Heat Transfer Coefficient [W/m2-K]
Expand Down Expand Up @@ -2655,6 +2656,16 @@ \subsubsection{Surface Inside Face Temperature {[}C{]}}\label{surface-inside-fac

This is the temperature of the surface's inside face, in degrees Celsius. Former Name: Prior to version 7.1 this output was called Surface Inside Temperature.

\subsubsection{Surface Inside Face Interior Movable Insulation Temperature {[}C{]}}\label{surface-inside-face-interior-movable-insulation-temperature-c}

This is the temperature of movable insulation installed on the inside of the construction at the movable insulation's inside face (the one facing the zone), in degrees Celsius. This variable is only valid when the surface has movable insulation and the movable insulation is actually scheduled to be present. For surfaces that have no movable insulation or the movable insulation is not scheduled to be present, the value of this variable is set to the Surface Inside Face Temperature. It should be noted that users can limit how often this output variable is generating by using a schedule to control when this output is produced. For example, this user could add the following syntax to an input file that includes movable insulation:

\begin{lstlisting}
Output:Variable,Zone1:WestWall,Surface Inside Face Interior Movable Insulation Temperature,timestep,MovableInsulationSchedule;
\end{lstlisting}

In this example, interior movable insulation is used on the west wall of zone 1 and is only present when the schedule (MovableInsulationSchedule) is greater than zero. Adding this output variable syntax to the input file reports the temperature at the inside face of the interior movable insulation only when the movable insulation is present. The use of the movable insulation schedule in the output variable designation limits when this value shows up in the EnergyPlus output file to when it is actually scheduled to be present. At other times, no value will be reported. The limiting of when the output is generated allows the user to generate useful statistics instead of having those statistics influenced by values for when the movable insulation is not present. If the user does not use the output variable schedule feature, the output for this variable will equal the surface inside face temperature when the movable insulation is not present.

\subsubsection{Surface Outside Face Temperature {[}C{]}}\label{surface-outside-face-temperature-c}

This is the temperature of the surface's outside face, in degrees Celsius. Former Name: Prior to version 7.1, this output was called Surface Outside Temperature.
Expand Down
4 changes: 3 additions & 1 deletion src/EnergyPlus/ChillerElectricEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1839,6 +1839,7 @@ namespace ChillerElectricEIR {

if (PlantFinalSizesOkayToReport) {
if (ChillerIPLVFlagArr(EIRChillNum)) {
Real64 IPLV;
CalcChillerIPLV(ElectricEIRChiller(EIRChillNum).Name,
TypeOf_Chiller_ElectricEIR,
ElectricEIRChiller(EIRChillNum).RefCap,
Expand All @@ -1847,7 +1848,8 @@ namespace ChillerElectricEIR {
ElectricEIRChiller(EIRChillNum).ChillerCapFT,
ElectricEIRChiller(EIRChillNum).ChillerEIRFT,
ElectricEIRChiller(EIRChillNum).ChillerEIRFPLR,
ElectricEIRChiller(EIRChillNum).MinUnloadRat);
ElectricEIRChiller(EIRChillNum).MinUnloadRat,
IPLV);
ChillerIPLVFlagArr(EIRChillNum) = false;
}
// create predefined report
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/ChillerReformulatedEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1567,6 +1567,7 @@ namespace ChillerReformulatedEIR {

if (PlantFinalSizesOkayToReport) {
if (MyFlag(EIRChillNum)) {
Real64 IPLV;
CalcChillerIPLV(ElecReformEIRChiller(EIRChillNum).Name,
TypeOf_Chiller_ElectricReformEIR,
ElecReformEIRChiller(EIRChillNum).RefCap,
Expand All @@ -1576,6 +1577,7 @@ namespace ChillerReformulatedEIR {
ElecReformEIRChiller(EIRChillNum).ChillerEIRFT,
ElecReformEIRChiller(EIRChillNum).ChillerEIRFPLR,
ElecReformEIRChiller(EIRChillNum).MinUnloadRat,
IPLV,
ElecReformEIRChiller(EIRChillNum).EvapVolFlowRate,
ElecReformEIRChiller(EIRChillNum).CDLoopNum,
ElecReformEIRChiller(EIRChillNum).CompPowerToCondenserFrac);
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/DataHeatBalSurface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ namespace DataHeatBalSurface {
Array1D<Real64> TempSource; // Temperature at the source location for each heat transfer surface
Array1D<Real64> TempUserLoc; // Temperature at the user specified location for each heat transfer surface
Array1D<Real64> TempSurfInRep; // Temperature of the Inside Surface for each heat transfer surface
Array1D<Real64> TempSurfInMovInsRep; // Temperature of interior movable insulation on the side facing the zone
// (report)
Array1D<Real64> QConvInReport; // Surface convection heat gain at inside face [J]
Array1D<Real64> QdotConvInRep; // Surface convection heat transfer rate at inside face surface [W]
Expand Down Expand Up @@ -272,6 +273,7 @@ namespace DataHeatBalSurface {
TempSource.deallocate();
TempUserLoc.deallocate();
TempSurfInRep.deallocate();
TempSurfInMovInsRep.deallocate();
QConvInReport.deallocate();
QdotConvInRep.deallocate();
QdotConvInRepPerArea.deallocate();
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/DataHeatBalSurface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ namespace DataHeatBalSurface {
extern Array1D<Real64> TempSource; // Temperature at the source location for each heat transfer surface
extern Array1D<Real64> TempUserLoc; // Temperature at the user specified location for each heat transfer surface
extern Array1D<Real64> TempSurfInRep; // Temperature of the Inside Surface for each heat transfer surface
extern Array1D<Real64> TempSurfInMovInsRep; // Temperature of interior movable insulation on the side facing the zone
// (report)
extern Array1D<Real64> QConvInReport; // Surface convection heat gain at inside face [J]
extern Array1D<Real64> QdotConvInRep; // Surface convection heat transfer rate at inside face surface [W]
Expand Down
12 changes: 12 additions & 0 deletions src/EnergyPlus/DataPhotovoltaics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@ namespace DataPhotovoltaics {
// Object Data
Array1D<PVArrayStruct> PVarray;


void clear_state()
{
NumPVs = 0;
Num1DiodePVModuleTypes = 0;
NumSimplePVModuleTypes = 0;
NumSNLPVModuleTypes = 0;

ShuntResistance = 0;

PVarray.deallocate();
}
// ___________________________________________________________________________

// EnergyPlus V1.2 and beyond include models for photovoltaic calculations called
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/DataPhotovoltaics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ namespace DataPhotovoltaics {
// Object Data
extern Array1D<PVArrayStruct> PVarray;

void clear_state();

} // namespace DataPhotovoltaics

} // namespace EnergyPlus
Expand Down
26 changes: 26 additions & 0 deletions src/EnergyPlus/ElectricPowerServiceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2038,6 +2038,32 @@ GeneratorController::GeneratorController(std::string const &objectName,
ShowContinueError("Invalid availability schedule = " + availSchedName);
ShowContinueError("Schedule was not found ");
errorsFound = true;
} else {
if (generatorType == GeneratorType::pvWatts) {
ShowWarningError(routineName + DataIPShortCuts::cCurrentModuleObject + ", Availability Schedule for Generator:PVWatts '" + objectName + "' will be be ignored (runs all the time).");
} else if (generatorType == GeneratorType::pV) {
// It should only warn if Performance type is SimplePV (DataPhotovoltaics::iSimplePVModel).
// Except you need GetPVInput to have run already etc
// Note: you can't use DataIPShortCuts::cAlphaArgs etc or it'll override what will still need to be processed in
// ElectPowerLoadCenter::ElectPowerLoadCenter after this function is called
int PVNum = inputProcessor->getObjectItemNum(objectType, UtilityRoutines::MakeUPPERCase(objectName));
int NumAlphas; // Number of PV Array parameter alpha names being passed
int NumNums; // Number of PV Array numeric parameters are being passed
int IOStat;
Array1D_string Alphas(5); // Alpha items for object
Array1D<Real64> Numbers(2); // Numeric items for object
inputProcessor->getObjectItem(objectType,
PVNum,
Alphas,
NumAlphas,
Numbers,
NumNums,
IOStat);
if (UtilityRoutines::SameString(Alphas(3), "PhotovoltaicPerformance:Simple")) {
ShowWarningError(routineName + DataIPShortCuts::cCurrentModuleObject + ", Availability Schedule for Generator:Photovoltaics '" + objectName + "' of Type PhotovoltaicPerformance:Simple will be be ignored (runs all the time).");
ShowContinueError("To limit this Generator:Photovoltaic's output, please use the Inverter's availability schedule instead.");
}
}
}
}

Expand Down
Loading

7 comments on commit aee1c45

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

168168673_Issue7476 (Nigusse) - x86_64-Linux-Ubuntu-18.04-cppcheck: 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.

168168673_Issue7476 (Nigusse) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (9 of 9 tests passed, 0 test warnings)

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

168168673_Issue7476 (Nigusse) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (2561 of 2588 tests passed, 614 test warnings)

Messages:\n

  • 533 tests had: EIO diffs.
  • 604 tests had: ESO small diffs.
  • 410 tests had: Table small diffs.
  • 467 tests had: MTR small diffs.
  • 5 tests had: EDD diffs.
  • 15 tests had: ESO big diffs.
  • 8 tests had: MTR big diffs.
  • 18 tests had: Table big diffs.
  • 46 tests had: ZSZ small diffs.
  • 12 tests had: ERR diffs.
  • 14 tests had: SSZ small diffs.
  • 2 tests had: JSON big diffs.

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 804
  • Failed: 4

regression Test Summary

  • Passed: 664
  • Failed: 23

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

168168673_Issue7476 (Nigusse) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1208 of 1212 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 804
  • Failed: 4

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.

168168673_Issue7476 (Nigusse) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (672 of 672 tests passed, 0 test warnings)

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

168168673_Issue7476 (Nigusse) - x86_64-MacOS-10.13-clang: Tests Failed (2201 of 2548 tests passed, 290 test warnings)

Messages:\n

  • 512 tests had: EIO diffs.
  • 598 tests had: ESO small diffs.
  • 340 tests had: Table big diffs.
  • 5 tests had: EDD diffs.
  • 466 tests had: MTR small diffs.
  • 182 tests had: Table small diffs.
  • 17 tests had: ESO big diffs.
  • 8 tests had: MTR big diffs.
  • 31 tests had: ZSZ small diffs.
  • 22 tests had: ERR diffs.
  • 13 tests had: SSZ small diffs.
  • 2 tests had: JSON big diffs.
  • 1 test had: AUD diffs.

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 804
  • Failed: 4

regression Test Summary

  • Passed: 324
  • Failed: 343

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

168168673_Issue7476 (Nigusse) - Win64-Windows-10-VisualStudio-16: Tests Failed (2201 of 2548 tests passed, 293 test warnings)

Messages:\n

  • 518 tests had: EIO diffs.
  • 603 tests had: ESO small diffs.
  • 341 tests had: Table big diffs.
  • 465 tests had: MTR small diffs.
  • 182 tests had: Table small diffs.
  • 5 tests had: EDD diffs.
  • 15 tests had: ESO big diffs.
  • 9 tests had: MTR big diffs.
  • 16 tests had: ERR diffs.
  • 39 tests had: ZSZ small diffs.
  • 9 tests had: SSZ small diffs.
  • 2 tests had: SSZ big diffs.
  • 2 tests had: JSON big diffs.
  • 1 test had: AUD diffs.

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 804
  • Failed: 4

regression Test Summary

  • Passed: 324
  • Failed: 343

Build Badge Test Badge

Please sign in to comment.