Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into VRFFluidFixCooling…
Browse files Browse the repository at this point in the history
…TUCap
  • Loading branch information
Yujie Xu committed Sep 11, 2024
2 parents 49506c8 + 84646a7 commit f59c122
Show file tree
Hide file tree
Showing 148 changed files with 20,602 additions and 16,673 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
path: ./dist

- name: Deploy on Test PyPi
uses: pypa/gh-action-pypi-publish@v1.9.0
uses: pypa/gh-action-pypi-publish@v1.10.1
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ \subsubsection{SpaceHVAC:ZoneEquipmentMixer Adjustments}\label{space-hvac-zoneeq

After all of the zone HVAC equipment is simulated, the flow rates on the space outlet nodes are set to the space fraction times the zone equipment inlet node flow rate.

\subsubsection{SpaceHVAC:ZoneReturnMixer Adjustments}\label{space-hvac-zoneretmixer-adjustments}
When a SpaceHVAC:ZoneReturnMixer is used, after zone-level return node flow rates are set, the space return node flow rates are set. The space flow rates are set based on the same method used for zones (sum of inlet flows minus sum of exhaust flows). Then the space flow rates are adjusted proportionately so the sum is equal to the previously determined zone-level return node flow rate. Then the conditions on the zone return nodes are set to the combined space outlet node conditions weighted by the space return node flow rates.

\subsection{References}\label{references-043}

Ceylan, H. T., and G. E. Myers. 1980. Long-time Solutions to Heat Conduction Transients with Time-Dependent Inputs. ASME Journal of Heat Transfer, Volume 102, No. 1, pp.~115-120.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ \subsubsection{EndZoneSizingCalc}\label{endzonesizingcalc}

If \emph{heating design air flow method} is \emph{flow/zone}, then \emph{heating design air flow rate} will be used for the design max heating air flow rate. If \emph{heating design air flow method} is \emph{design day}, then the design day calculation will set the design max heating air flow rate. If \emph{heating design air flow method} is \emph{design day with limit}, then the maximum from \emph{heating max flow per area}, \emph{heating max flow} and \emph{heating max flow fraction} will set an upper limit on the design max heating air flow rate. The design max heating air flow rate must always be \textgreater{} = the ventilation requirement. In each case, the outside airflow will be modified based on zone ventilation effectiveness specified in the zone sizing object.

\subsection{Space Sizing}\label{space-sizing}
When ZoneAirHeatBalanceAlgorithm ``Do Space Heat Balance for Sizing'' is ``Yes'', the same sizing calculations described above will be performed for each space that is part of a controlled zone, using the same thermostat setpoints as the parent zone. The space sizing results will be reported the same as zone sizing results (eio, table, and spsz outputs).

\subsection{NonCoincident Zone Sizing}\label{noncoincident-zone-sizing}
Sizing:Zone has an option for ``Type of Space Sum to Use'', ``Coincident'' or ``NonCoincident''. Coincident zone sizing (the default) is always calculated first, with all spaces in the zone lumped together. For ``NonCoincident'' zone sizing, if the zone contains more than one space, the zone sizing results will be overwritten using the sums and averages of the space sizing results. If all spaces for a given load type (heating or cooling) peak on the same design day, then that day will be reported as the zone peak day, otherwise the zone design day will be "N/A". The zone peak time will be determined by scanning the peak zone sequential loads which are calculated by summing the space peak day sequential loads.

\textbf{This concludes the calculation of the zone design flow rates and loads.}

\subsection{Air Terminal Unit Sizing}\label{air-terminal-unit-sizing}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,69 +66,17 @@ \subsubsection{Heat Index}\label{heat-index}
\end{tabular}
\end{table}

The computation of the heat index is a refinement of a result obtained by
Before version 24.2, the computation of the heat index is a refinement of a result obtained by
multiple regression analysis carried out by Lans P. Rothfusz and described in a
1990 National Weather Service (NWS) Technical Attachment (SR 90-23) [4-5]. The
calculation is based on degree Fahrenheit.
1990 National Weather Service (NWS) Technical Attachment (SR 90-23) [4-5].

The regression equation of Rothfusz is
\begin{equation} \label{eq:rm-1}
HI = c_1 + c_2T + c_3R + c_4TR + c_5T^2 + c_6R^2 + c_7T^2R + c_8TR^2 + c_9T^2R^2
\end{equation}

where

HI = heat index (expressed as an apparent temperature in degrees Fahrenheit),

T = ambient dry-bulb temperature (in degrees Fahrenheit),

R = relative humidity (percentage value between 0 and 100),

$c_1$ = -42.379,

$c_2$ = 2.04901523,

$c_3$ = 10.14333127,

$c_4$ = -0.22475541,

$c_5$ = -0.00683783,

$c_6$ = -0.05481717,

$c_7$ = 0.00122874,

$c_8$ = 0.00085282,

$c_9$ = -0.00000199.

If the RH is less than 13\% and the temperature is between 80 and \IP{112}{\fahrenheit}, then
the following adjustment is subtracted from HI:

\begin{equation} \label{eq:rm-2}
HI = (13 - R) / 4 * ((17 - |T - 95|) / 17)^{0.5}
\end{equation}

Otherwise, if the RH is greater than 85\% and the temperature is between 80 and
\IP{87}{\fahrenheit}, then the following adjustment is added to HI:

\begin{equation} \label{eq:rm-3}
HI = (R - 85) / 10 * (87 - T) / 5
\end{equation}

The Rothfusz regression is not appropriate when conditions of temperature and
humidity warrant a heat index value below about \IP{80}{\fahrenheit}. In those cases, a simpler
formula is applied to calculate values consistent with Steadman's results:

\begin{equation} \label{eq:rm-4}
HI = 0.5 * (T + 61.0 + (T - 68.0) * 1.2 + (R * 0.094))
\end{equation}

In practice, the simple formula is computed first based on the temperature and
humidity. If this heat index value is \IP{80}{\fahrenheit} or higher, the full regression
equation along with any adjustment as described above is applied. The Rothfusz
regression is not valid for extreme temperature and relative humidity conditions
beyond the range of data considered by Steadman.
Starting from version 24.2, the heat index calculation adopts the extended heat
index method developed by Lu \& Romps [17]. The previous heat index gives
unrealistic results for very hot and humid or very cold and dry conditions. The
extended index extends the domain of the heat index calculation to all
combinations of temperature and relative humidity and gives a more realistic heat
index for the extreme conditions. The implementation in EnergyPlus is based on
the released Python code by Lu and Romps [18].

The Heat Index Hours (accumulated hours for a space) and Heat Index
OccupantHours (accumulated hours for the sum of all occupants in a space) of
Expand Down Expand Up @@ -516,3 +464,11 @@ \subsection{References}

{[}16{]} ACGIH, Threshold Limit Values (TLVs) and Biological Exposure Indices
(BEIs), 2012. doi:10.1073/pnas.0703993104.

{[}17{]} Lu, Yi-Chuan, and David M. Romps. ``Extending the heat index''. Journal
of Applied Meteorology and Climatology 61, no. 10 (2022): 1367-1383.
doi:10.1073/pnas.0703993104.

{[}18{]} Lu, Yi-Chuan, and David M. Romps. ``Lu and Romps, Extending the heat index, JAMC, 2022'',
Physics of Climate, February 23, 2023.
https://romps.berkeley.edu/papers/pubs-2020-heatindex.html.
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ \subsubsection{Inputs}\label{inputs-1-052-seqsplitter}
\paragraph{Field: Space Fraction Method}\label{field-seqsplitter-space-sizing-basis}

The method used to autosize the space fractions. The choices are: DesignCoolingLoad, DesignHeatingLoad, FloorArea, Volume, and PerimeterLength. The default is DesignCoolingLoad.
For example, if there are 3 Spaces listed below, the Space Output Fractions will be sized to Space1DesignCoolingLoad / Sum(Space1thru3DesignCoolingLoad).
For example, if there are 3 Spaces listed below, the Space 1 Output Fraction will be sized to Space1DesignCoolingLoad / Sum(Space1thru3DesignCoolingLoad). PerimeterLength sums the width of exterior walls in each space.

\paragraph{Field: Space \textless{}x\textgreater{} Name}\label{field-seqsplitter-space-name}

Expand Down Expand Up @@ -547,7 +547,7 @@ \subsubsection{Inputs}\label{inputs-1-052-seqmixer}
\paragraph{Field: Space Fraction Method}\label{field-seqmixer-space-sizing-basis}

The method used to autosize the space fractions. The choices are: DesignCoolingLoad, DesignHeatingLoad, FloorArea, Volume, and PerimeterLength. The default is DesignCoolingLoad.
For example, if there are 3 Spaces listed below, the Space Output Fractions will be sized to Space1DesignCoolingLoad / Sum(Space1thru3DesignCoolingLoad).
For example, if there are 3 Spaces listed below, the Space 1 Output Fraction will be sized to Space1DesignCoolingLoad / Sum(Space1thru3DesignCoolingLoad). PerimeterLength sums the width of exterior walls in each space.

\paragraph{Field: Space \textless{}x\textgreater{} Name}\label{field-seqmixer-space-name}

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/AirflowNetwork/src/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13398,8 +13398,8 @@ namespace AirflowNetwork {
// REFERENCES:
// na

auto &NetworkNumOfLinks = ActualNumOfLinks;
auto &NetworkNumOfNodes = ActualNumOfNodes;
auto &NetworkNumOfLinks = ActualNumOfLinks;

// Argument array dimensioning (these used to be arguments, need to also test newAU and newIK)
EP_SIZE_CHECK(IK, NetworkNumOfNodes + 1);
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ set(SRC
EvaporativeFluidCoolers.hh
ExhaustAirSystemManager.cc
ExhaustAirSystemManager.hh
ExtendedHI.cc
ExtendedHI.hh
ExteriorEnergyUse.cc
ExteriorEnergyUse.hh
ExternalInterface.cc
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerElectricASHRAE205.hh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ struct ChillerElectricASHRAE205Data : BaseGlobalStruct
bool getInputFlag = true;
Array1D<ChillerElectricASHRAE205::ASHRAE205ChillerSpecs> Electric205Chiller;

void init_state([[maybe_unused]] EnergyPlusData &state)
void init_state([[maybe_unused]] EnergyPlusData &state) override
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerElectricEIR.hh
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ struct ChillerElectricEIRData : BaseGlobalStruct
bool getInputFlag = true;
Array1D<ChillerElectricEIR::ElectricEIRChillerSpecs> ElectricEIRChiller;

void init_state([[maybe_unused]] EnergyPlusData &state)
void init_state([[maybe_unused]] EnergyPlusData &state) override
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerExhaustAbsorption.hh
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ struct ChillerExhaustAbsorptionData : BaseGlobalStruct
bool Sim_GetInput = true;
Array1D<ChillerExhaustAbsorption::ExhaustAbsorberSpecs> ExhaustAbsorber;

void init_state([[maybe_unused]] EnergyPlusData &state)
void init_state([[maybe_unused]] EnergyPlusData &state) override
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerGasAbsorption.hh
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ struct ChillerGasAbsorptionData : BaseGlobalStruct
bool getGasAbsorberInputs = true;
Array1D<ChillerGasAbsorption::GasAbsorberSpecs> GasAbsorber;

void init_state([[maybe_unused]] EnergyPlusData &state)
void init_state([[maybe_unused]] EnergyPlusData &state) override
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerIndirectAbsorption.hh
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ struct ChillerIndirectAbsoprtionData : BaseGlobalStruct
bool GetInput = true;
Array1D<ChillerIndirectAbsorption::IndirectAbsorberSpecs> IndirectAbsorber;

void init_state([[maybe_unused]] EnergyPlusData &state)
void init_state([[maybe_unused]] EnergyPlusData &state) override
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChillerReformulatedEIR.hh
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ struct ChillerReformulatedEIRData : BaseGlobalStruct
bool GetInputREIR = true;
Array1D<ChillerReformulatedEIR::ReformulatedEIRChillerSpecs> ElecReformEIRChiller;

void init_state([[maybe_unused]] EnergyPlusData &state)
void init_state([[maybe_unused]] EnergyPlusData &state) override
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/CondenserLoopTowers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ struct CondenserLoopTowersData : BaseGlobalStruct
bool GetInput = true;
Array1D<CondenserLoopTowers::CoolingTower> towers; // dimension to number of machines

void init_state([[maybe_unused]] EnergyPlusData &state)
void init_state([[maybe_unused]] EnergyPlusData &state) override
{
}

Expand Down
44 changes: 21 additions & 23 deletions src/EnergyPlus/Construction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E

// Obtain thermal properties from the Material derived type

auto *thisMaterial = dynamic_cast<Material::MaterialChild *>(state.dataMaterial->Material(CurrentLayer));
auto *thisMaterial = state.dataMaterial->materials(CurrentLayer);
assert(thisMaterial != nullptr);

dl(Layer) = thisMaterial->Thickness;
Expand Down Expand Up @@ -289,7 +289,7 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E
// then use the "exact" approach to model a massless layer
// based on the node equations for the state space method.

if ((Layer == 1) || (Layer == this->TotLayers) || (!state.dataMaterial->Material(this->LayerPoint(Layer))->ROnly)) {
if ((Layer == 1) || (Layer == this->TotLayers) || (!state.dataMaterial->materials(this->LayerPoint(Layer))->ROnly)) {
cp(Layer) = 1.007;
rho(Layer) = 1.1614;
rk(Layer) = 0.0263;
Expand Down Expand Up @@ -928,12 +928,12 @@ void ConstructionProps::calculateTransferFunction(EnergyPlusData &state, bool &E
if (this->CTFTimeStep >= MaxAllowedTimeStep) {
ShowSevereError(state, format("CTF calculation convergence problem for Construction=\"{}\".", this->Name));
ShowContinueError(state, "...with Materials (outside layer to inside)");
ShowContinueError(state, format("(outside)=\"{}\"", state.dataMaterial->Material(this->LayerPoint(1))->Name));
ShowContinueError(state, format("(outside)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(1))->Name));
for (int Layer = 2; Layer <= this->TotLayers; ++Layer) {
if (Layer != this->TotLayers) {
ShowContinueError(state, format("(next)=\"{}\"", state.dataMaterial->Material(this->LayerPoint(Layer))->Name));
ShowContinueError(state, format("(next)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(Layer))->Name));
} else {
ShowContinueError(state, format("(inside)=\"{}\"", state.dataMaterial->Material(this->LayerPoint(Layer))->Name));
ShowContinueError(state, format("(inside)=\"{}\"", state.dataMaterial->materials(this->LayerPoint(Layer))->Name));
}
}
ShowContinueError(state,
Expand Down Expand Up @@ -1875,9 +1875,9 @@ void ConstructionProps::reportTransferFunction(EnergyPlusData &state, int const

for (int I = 1; I <= this->TotLayers; ++I) {
int Layer = this->LayerPoint(I);
auto const *thisMaterial = state.dataMaterial->Material(Layer);
auto const *thisMaterial = state.dataMaterial->materials(Layer);
switch (thisMaterial->group) {
case Material::Group::Air: {
case Material::Group::AirGap: {
static constexpr std::string_view Format_702(" Material:Air,{},{:12.4N}\n");
print(state.files.eio, Format_702, thisMaterial->Name, thisMaterial->Resistance);
} break;
Expand Down Expand Up @@ -1927,8 +1927,8 @@ void ConstructionProps::reportLayers(EnergyPlusData &state)
if (state.dataOutRptPredefined->pdchOpqConsLayCol.size() > 0) {
for (int i = 1; i <= this->TotLayers; ++i) {
int layerIndex = this->LayerPoint(i);
auto &thisMaterial = state.dataMaterial->Material(layerIndex);
OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchOpqConsLayCol[i - 1], this->Name, thisMaterial->Name);
auto const *mat = state.dataMaterial->materials(layerIndex);
OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchOpqConsLayCol[i - 1], this->Name, mat->Name);
}
}
}
Expand All @@ -1942,10 +1942,9 @@ bool ConstructionProps::isGlazingConstruction(EnergyPlusData &state) const
// PURPOSE OF THIS SUBROUTINE:
// Commonly used routine in several places in EnergyPlus which examines if current
// construction is glazing construction
const Material::Group MaterialGroup = state.dataMaterial->Material(LayerPoint(1))->group;
return (MaterialGroup == Material::Group::WindowGlass) || (MaterialGroup == Material::Group::Shade) ||
(MaterialGroup == Material::Group::Screen) || (MaterialGroup == Material::Group::WindowBlind) ||
(MaterialGroup == Material::Group::WindowSimpleGlazing);
const Material::Group group = state.dataMaterial->materials(LayerPoint(1))->group;
return (group == Material::Group::Glass) || (group == Material::Group::Shade) || (group == Material::Group::Screen) ||
(group == Material::Group::Blind) || (group == Material::Group::GlassSimple);
}

Real64 ConstructionProps::setThicknessPerpendicular(EnergyPlusData &state, Real64 userValue)
Expand Down Expand Up @@ -2015,10 +2014,7 @@ void ConstructionProps::setArraysBasedOnMaxSolidWinLayers(EnergyPlusData &state)
{
this->AbsDiff.allocate(state.dataHeatBal->MaxSolidWinLayers);
this->AbsDiffBack.allocate(state.dataHeatBal->MaxSolidWinLayers);
this->BlAbsDiff.allocate(Material::MaxSlatAngs, state.dataHeatBal->MaxSolidWinLayers);
this->BlAbsDiffGnd.allocate(Material::MaxSlatAngs, state.dataHeatBal->MaxSolidWinLayers);
this->BlAbsDiffSky.allocate(Material::MaxSlatAngs, state.dataHeatBal->MaxSolidWinLayers);
this->BlAbsDiffBack.allocate(Material::MaxSlatAngs, state.dataHeatBal->MaxSolidWinLayers);
this->layerSlatBlindDfAbs.allocate(state.dataHeatBal->MaxSolidWinLayers);
this->AbsBeamCoef.allocate(state.dataHeatBal->MaxSolidWinLayers);
this->AbsBeamBackCoef.allocate(state.dataHeatBal->MaxSolidWinLayers);
this->tBareSolCoef.allocate(state.dataHeatBal->MaxSolidWinLayers);
Expand Down Expand Up @@ -2046,12 +2042,14 @@ void ConstructionProps::setArraysBasedOnMaxSolidWinLayers(EnergyPlusData &state)
this->AbsDiff(Layer) = 0.0;
this->AbsDiffBack(Layer) = 0.0;
}
for (int Index = 1; Index <= Material::MaxSlatAngs; ++Index) {
for (int Layer = 1; Layer <= state.dataHeatBal->MaxSolidWinLayers; ++Layer) {
this->BlAbsDiff(Index, Layer) = 0.0;
this->BlAbsDiffGnd(Index, Layer) = 0.0;
this->BlAbsDiffSky(Index, Layer) = 0.0;
this->BlAbsDiffBack(Index, Layer) = 0.0;
for (int Layer = 1; Layer <= state.dataHeatBal->MaxSolidWinLayers; ++Layer) {
auto &slatBlindDfAbs = this->layerSlatBlindDfAbs(Layer);
for (int iSlatAng = 0; iSlatAng < Material::MaxSlatAngs; ++iSlatAng) {
auto &blindDfAbs = slatBlindDfAbs[iSlatAng];
blindDfAbs.Sol.Ft.Df.Abs = 0.0;
blindDfAbs.Sol.Ft.Df.AbsGnd = 0.0;
blindDfAbs.Sol.Ft.Df.AbsGnd = 0.0;
blindDfAbs.Sol.Bk.Df.Abs = 0.0;
}
}
for (int Layer = 1; Layer <= state.dataHeatBal->MaxSolidWinLayers; ++Layer) {
Expand Down
Loading

3 comments on commit f59c122

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

VRFFluidFixCoolingTUCap (Unknown) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2915 of 2915 tests passed, 0 test warnings)

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.

VRFFluidFixCoolingTUCap (Unknown) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: OK (2099 of 2099 tests passed, 0 test warnings)

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

VRFFluidFixCoolingTUCap (Unknown) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: OK (799 of 799 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.