Skip to content

Commit f5abbd3

Browse files
committed
Merge branch 'develop' of https://github.com/NatLabRockies/EnergyPlus into cppCheck_redundantAssignment
2 parents 9ec0795 + 7c55972 commit f5abbd3

File tree

93 files changed

+943
-688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+943
-688
lines changed

.github/workflows/disabled_test_debug_builds.yml.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Install Dependencies for Linux
3636
run: |
3737
sudo apt-get update
38-
sudo apt-get install libxkbcommon-x11-0 xorg-dev libgl1-mesa-dev lcov gcovr
38+
sudo apt-get install -y libxkbcommon-x11-0 xorg-dev libgl1-mesa-dev lcov gcovr
3939
# https://github.com/actions/runner-images/issues/10025
4040
echo "FC=gfortran-13" >> $GITHUB_ENV
4141

@@ -104,7 +104,7 @@ jobs:
104104
- name: Install Dependencies for Linux
105105
run: |
106106
sudo apt-get update
107-
sudo apt-get install libxkbcommon-x11-0 xorg-dev libgl1-mesa-dev lcov gcovr
107+
sudo apt-get install -y libxkbcommon-x11-0 xorg-dev libgl1-mesa-dev lcov gcovr
108108
# https://github.com/actions/runner-images/issues/10025
109109
echo "FC=gfortran-13" >> $GITHUB_ENV
110110

.github/workflows/release_linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
set -x
6868
echo "Using Apt to install dependencies"
6969
sudo apt-get update
70-
sudo apt-get install texlive texlive-xetex texlive-science libxkbcommon-x11-0 xorg-dev libgl1-mesa-dev patchelf
70+
sudo apt-get install -y texlive texlive-xetex texlive-science libxkbcommon-x11-0 xorg-dev libgl1-mesa-dev patchelf
7171
if [[ "${{ matrix.os }}" == "ubuntu-24.04" ]]; then
7272
# https://github.com/actions/runner-images/issues/10025
7373
echo "FC=gfortran-13" >> $GITHUB_ENV

.github/workflows/test_code_integrity.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ jobs:
191191
192192
- name: Install cppcheck
193193
if: always()
194-
run: sudo apt-get install cppcheck
194+
run: sudo apt-get install -y cppcheck
195195

196196
- name: Run CppCheck
197197
id: cpp_check_run

.github/workflows/test_develop_commits.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
if: ${{ runner.os == 'Linux' }}
8080
run: |
8181
sudo apt-get update
82-
sudo apt-get install libxkbcommon-x11-0 xorg-dev libgl1-mesa-dev
82+
sudo apt-get install -y libxkbcommon-x11-0 xorg-dev libgl1-mesa-dev
8383
if [[ "${{ matrix.os }}" == "ubuntu-24.04" ]]; then
8484
# https://github.com/actions/runner-images/issues/10025
8585
echo "FC=gfortran-13" >> $GITHUB_ENV

doc/engineering-reference/src/simulation-models-encyclopedic-reference-001/coils.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3547,7 +3547,7 @@ \subsubsection{Model Inputs}\label{model-inputs-2}
35473547
A typical part load fraction correlation for a conventional, single-speed DX heating coil (e.g., residential heat pump) would be: PLF = 0.85 + 0.15(PLR).
35483548

35493549
\item
3550-
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.
3550+
The defrost energy input ratio (EIR) 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 represents the defrost power divided by the rated heating capacity (i.e., an energy input ratio, not a modifier applied to a rated EIR). It 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.
35513551

35523552
\begin{equation}
35533553
DefrostEIRTempModFac = \,a + \,b\left( {{T_{wb,i}}} \right)\,\, + \,\,c{\left( {{T_{wb,i}}} \right)^2} + \,\,d\left( {{T_{db,o}}} \right)\,\, + \,\,e{\left( {{T_{db,o}}} \right)^2} + f\left( {{T_{wb,i}}} \right)\left( {{T_{db,o}}} \right)
@@ -3666,7 +3666,7 @@ \subsubsection{Defrost Operation}\label{defrost-operation}
36663666

36673667
\({Q_{cap,defrost}}\) is the capacity of the resistive defrost heating element (W)
36683668

3669-
\emph{DefrostEIRTempModFac} is the energy input ratio modifier curve applicable during defrost
3669+
\emph{DefrostEIRTempModFac} is the defrost energy input ratio (EIR) at the specific operating temperatures. Note: despite the variable name, this value represents an EIR (defrost power / rated capacity), not a modifier applied to a rated EIR
36703670

36713671
\begin{equation}
36723672
RTF = \left( \frac{PLR}{PartLoadFrac} \right) = runtime~fraction~of~the~heating~coil
@@ -4334,7 +4334,7 @@ \subsubsection{Higher Speed Operation}\label{higher-speed-operation-2}
43344334

43354335
\({Q_{total,rated,n}}\) is the capacity of the resistive defrost heating element at Speed n (W)
43364336

4337-
DefrostEIRTempModFac is the defrost energy input ratio (EIR) modifier curve (Ref. Coil:Heating:DX:SingleSpeed).
4337+
DefrostEIRTempModFac is the defrost energy input ratio (EIR) curve value (Ref. Coil:Heating:DX:SingleSpeed). Note: this represents an EIR (defrost power / rated capacity), not a modifier applied to a rated EIR.
43384338

43394339
T\(_{frac,defrost}\) is the fractional defrost time (Ref. Coil:Heating:DX:SingleSpeed).
43404340

@@ -4914,7 +4914,7 @@ \subsubsection{Defrost Operation}\label{defrost-operation-1}
49144914

49154915
The defrost operation of a variable-speed DX heating coil is treated the same as the single-speed DX heating coil, except using the total heating capacity at the max speed level to replace the rated heating capacity of the single-speed DX coil, when a reverse-cycle defrost strategy is specified.
49164916

4917-
We keep the defrost energy input ratio (EIR) modifier curve (function of temperature) as the single speed DX heating coil. It is a biquadratic 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.
4917+
The defrost energy input ratio (EIR) curve (function of temperature) is the same as the single speed DX heating coil. It is a biquadratic curve with two independent variables: outdoor air dry-bulb temperature and the heating coil entering air wet-bulb temperature. The output of this curve represents the defrost power divided by the rated heating capacity (i.e., an energy input ratio, not a modifier applied to a rated EIR). It 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.
49184918

49194919
\begin{equation}
49204920
{\rm{DefrostEIRTempModFac}} = {\rm{a}} + {\rm{b*W}}{{\rm{B}}_{\rm{i}}} + {\rm{c*WB}}_{\rm{i}}^2 + {\rm{d*D}}{{\rm{B}}_{\rm{o}}} + {\rm{e*D}}{{\rm{B}}_{\rm{o}}}^2 + {\rm{f*W}}{{\rm{B}}_{\rm{i}}}{\rm{*D}}{{\rm{B}}_{\rm{o}}}

src/EnergyPlus/AirLoopHVACDOAS.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ namespace AirLoopHVACDOAS {
915915
if (Util::SameString(CompType, "COIL:HEATING:WATER")) {
916916
WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_HeatCoilNum);
917917
Real64 const CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", CompName, ErrorsFound);
918-
rho = state.dataPlnt->PlantLoop(this->HWPlantLoc.loopNum).glycol->getDensity(state, Constant::HWInitConvTemp, RoutineName);
918+
rho = this->HWPlantLoc.loop->glycol->getDensity(state, Constant::HWInitConvTemp, RoutineName);
919919
PlantUtilities::InitComponentNodes(state,
920920
0.0,
921921
CoilMaxVolFlowRate * rho,
@@ -925,7 +925,7 @@ namespace AirLoopHVACDOAS {
925925
if (Util::SameString(CompType, "COIL:COOLING:WATER")) {
926926
WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_CoolCoilNum);
927927
Real64 const CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water", CompName, ErrorsFound);
928-
rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, Constant::CWInitConvTemp, RoutineName);
928+
rho = this->CWPlantLoc.loop->glycol->getDensity(state, Constant::CWInitConvTemp, RoutineName);
929929
PlantUtilities::InitComponentNodes(state,
930930
0.0,
931931
CoilMaxVolFlowRate * rho,
@@ -936,7 +936,7 @@ namespace AirLoopHVACDOAS {
936936
WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_CoolCoilNum);
937937
Real64 const CoilMaxVolFlowRate =
938938
WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water:DetailedGeometry", CompName, ErrorsFound);
939-
rho = state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).glycol->getDensity(state, Constant::CWInitConvTemp, RoutineName);
939+
rho = this->CWPlantLoc.loop->glycol->getDensity(state, Constant::CWInitConvTemp, RoutineName);
940940
PlantUtilities::InitComponentNodes(state,
941941
0.0,
942942
CoilMaxVolFlowRate * rho,

src/EnergyPlus/Boilers.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ void BoilerSpecs::oneTimeInit(EnergyPlusData &state)
491491
void BoilerSpecs::initEachEnvironment(EnergyPlusData &state)
492492
{
493493
static constexpr std::string_view RoutineName("BoilerSpecs::initEachEnvironment");
494-
Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, Constant::HWInitConvTemp, RoutineName);
494+
Real64 const rho = this->plantLoc.loop->glycol->getDensity(state, Constant::HWInitConvTemp, RoutineName);
495495
this->DesMassFlowRate = this->VolFlowRate * rho;
496496

497497
PlantUtilities::InitComponentNodes(state, 0.0, this->DesMassFlowRate, this->BoilerInletNodeNum, this->BoilerOutletNodeNum);
@@ -604,8 +604,8 @@ void BoilerSpecs::SizeBoiler(EnergyPlusData &state)
604604
if (PltSizNum > 0) {
605605
if (state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate >= HVAC::SmallWaterVolFlow) {
606606

607-
Real64 const rho = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getDensity(state, Constant::HWInitConvTemp, RoutineName);
608-
Real64 const Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum).glycol->getSpecificHeat(state, Constant::HWInitConvTemp, RoutineName);
607+
Real64 const rho = this->plantLoc.loop->glycol->getDensity(state, Constant::HWInitConvTemp, RoutineName);
608+
Real64 const Cp = this->plantLoc.loop->glycol->getSpecificHeat(state, Constant::HWInitConvTemp, RoutineName);
609609
tmpNomCap =
610610
Cp * rho * this->SizFac * state.dataSize->PlantSizData(PltSizNum).DeltaT * state.dataSize->PlantSizData(PltSizNum).DesVolFlowRate;
611611
} else {
@@ -791,8 +791,7 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state,
791791
Real64 const TempUpLimitBout = this->TempUpLimitBoilerOut; // C - boiler high temperature limit
792792
Real64 const BoilerMassFlowRateMax = this->DesMassFlowRate; // Max Design Boiler Mass Flow Rate converted from Volume Flow Rate
793793

794-
Real64 Cp = state.dataPlnt->PlantLoop(this->plantLoc.loopNum)
795-
.glycol->getSpecificHeat(state, state.dataLoopNodes->Node(BoilerInletNode).Temp, RoutineName);
794+
Real64 Cp = this->plantLoc.loop->glycol->getSpecificHeat(state, state.dataLoopNodes->Node(BoilerInletNode).Temp, RoutineName);
796795

797796
// If the specified load is 0.0 or the boiler should not run then we leave this subroutine. Before leaving
798797
// if the component control is SERIESACTIVE we set the component flow to inlet flow so that flow resolver

src/EnergyPlus/CTElectricGenerator.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ namespace CTElectricGenerator {
548548
int heatRecInNode = this->HeatRecInletNodeNum;
549549
heatRecInTemp = state.dataLoopNodes->Node(heatRecInNode).Temp;
550550

551-
heatRecCp = state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).glycol->getSpecificHeat(state, heatRecInTemp, RoutineName);
551+
heatRecCp = this->HRPlantLoc.loop->glycol->getSpecificHeat(state, heatRecInTemp, RoutineName);
552552
if (FirstHVACIteration && RunFlag) {
553553
heatRecMdot = this->DesignHeatRecMassFlowRate;
554554
} else {
@@ -800,7 +800,7 @@ namespace CTElectricGenerator {
800800
int HeatRecOutletNode = this->HeatRecOutletNodeNum;
801801

802802
// size mass flow rate
803-
Real64 rho = state.dataPlnt->PlantLoop(this->HRPlantLoc.loopNum).glycol->getDensity(state, Constant::InitConvTemp, RoutineName);
803+
Real64 rho = this->HRPlantLoc.loop->glycol->getDensity(state, Constant::InitConvTemp, RoutineName);
804804

805805
this->DesignHeatRecMassFlowRate = rho * this->DesignHeatRecVolFlowRate;
806806

0 commit comments

Comments
 (0)