Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into hotFix_str_format_…
Browse files Browse the repository at this point in the history
…fatal
  • Loading branch information
Myoldmopar committed Dec 18, 2020
2 parents d458c66 + f04ed6d commit b7bfd0d
Show file tree
Hide file tree
Showing 545 changed files with 22,691 additions and 23,566 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr_labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
check_pr_labels:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ set(RE2_BUILD_TESTING OFF CACHE BOOL "" FORCE)


if( OPENGL_FOUND )
set(BUILD_PENUMBRA_TESTING ${BUILD_TESTING} CACHE BOOL "" FORCE)
set(BUILD_PENUMBRA_TESTING OFF CACHE BOOL "")
endif()

if( BUILD_TESTING )
Expand Down Expand Up @@ -313,7 +313,7 @@ if( BUILD_TESTING )

set_target_properties(btwxt_tests PROPERTIES FOLDER ThirdParty/Btwxt)
set_target_properties(kiva_tests PROPERTIES FOLDER ThirdParty/Kiva)
if( OPENGL_FOUND )
if( OPENGL_FOUND AND BUILD_PENUMBRA_TESTING)
set_target_properties(penumbra_tests PROPERTIES FOLDER ThirdParty/Penumbra)
endif()
endif()
Expand Down
15 changes: 8 additions & 7 deletions src/EnergyPlus/AirLoopHVACDOAS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,22 @@
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

// C++ Headers
#include <string>

// EnergyPlus Headers
#include <EnergyPlus/AirLoopHVACDOAS.hh>
#include <EnergyPlus/BranchNodeConnections.hh>
#include <EnergyPlus/Data/EnergyPlusData.hh>
#include <EnergyPlus/DataAirLoop.hh>
#include <EnergyPlus/DataAirSystems.hh>
#include <EnergyPlus/DataEnvironment.hh>
#include <EnergyPlus/DataGlobals.hh>
#include <EnergyPlus/DataLoopNode.hh>
#include <EnergyPlus/DataSizing.hh>
#include <EnergyPlus/DesiccantDehumidifiers.hh>
#include <EnergyPlus/EvaporativeCoolers.hh>
#include <EnergyPlus/Fans.hh>
#include <EnergyPlus/FluidProperties.hh>
#include <EnergyPlus/General.hh>
#include <EnergyPlus/Data/EnergyPlusData.hh>
#include <EnergyPlus/HVACDXHeatPumpSystem.hh>
#include <EnergyPlus/HVACDXSystem.hh>
#include <EnergyPlus/HVACFan.hh>
Expand All @@ -80,7 +82,6 @@
#include <EnergyPlus/UtilityRoutines.hh>
#include <EnergyPlus/WaterCoils.hh>
#include <EnergyPlus/WeatherManager.hh>
#include <string>

namespace EnergyPlus {

Expand Down Expand Up @@ -814,7 +815,7 @@ namespace AirLoopHVACDOAS {
Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", CompName, ErrorsFound);
rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->HWLoopNum).FluidName,
DataGlobalConstants::HWInitConvTemp(),
DataGlobalConstants::HWInitConvTemp,
DataPlant::PlantLoop(this->HWLoopNum).FluidIndex,
RoutineName);
PlantUtilities::InitComponentNodes(0.0,
Expand All @@ -831,7 +832,7 @@ namespace AirLoopHVACDOAS {
Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water", CompName, ErrorsFound);
rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->CWLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp(),
DataGlobalConstants::CWInitConvTemp,
DataPlant::PlantLoop(this->CWLoopNum).FluidIndex,
RoutineName);
PlantUtilities::InitComponentNodes(0.0,
Expand All @@ -848,7 +849,7 @@ namespace AirLoopHVACDOAS {
Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water:DetailedGeometry", CompName, ErrorsFound);
rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->CWLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp(),
DataGlobalConstants::CWInitConvTemp,
DataPlant::PlantLoop(this->CWLoopNum).FluidIndex,
RoutineName);
PlantUtilities::InitComponentNodes(0.0,
Expand Down
7 changes: 5 additions & 2 deletions src/EnergyPlus/AirLoopHVACDOAS.hh
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,14 @@
#ifndef ENERGYPLUS_AIRLOOPHVACDOAS_HH
#define ENERGYPLUS_AIRLOOPHVACDOAS_HH

#include <EnergyPlus/EnergyPlus.hh>
#include <EnergyPlus/Data/BaseData.hh>
// C++ Headers
#include <string>
#include <vector>

// EnergyPlus Headers
#include <EnergyPlus/Data/BaseData.hh>
#include <EnergyPlus/EnergyPlus.hh>

namespace EnergyPlus {

// Forward declarations
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/AirTerminalUnit.hh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <string>

// EnergyPlus Headers
#include <EnergyPlus/Data/BaseData.hh>
#include <EnergyPlus/EnergyPlus.hh>

namespace EnergyPlus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

#ifndef TOKELVIN
#include "../../../DataGlobals.hh"
#define TOKELVIN(T) (T + DataGlobalConstants::KelvinConv())
#define TOKELVIN(T) (T + DataGlobalConstants::KelvinConv)
#else
// Need a fallback
#endif
Expand Down
14 changes: 7 additions & 7 deletions src/EnergyPlus/AirflowNetwork/src/Elements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,7 @@ namespace AirflowNetwork {
DpZeroOffset = DifLim * 1e-3;
// New definition for opening factors for LVO type 2: opening angle = 90 degrees --> opening factor = 1.0
// should be PIOvr2 in below?
alpha = Fact * DataGlobalConstants::PiOvr2();
alpha = Fact * DataGlobalConstants::PiOvr2;
Real64 const cos_alpha(std::cos(alpha));
Real64 const tan_alpha(std::tan(alpha));
h2 = Axishght * (1.0 - cos_alpha);
Expand Down Expand Up @@ -2502,7 +2502,7 @@ namespace AirflowNetwork {
// ed = Rough / DisSysCompCoilData(CompNum).hydraulicDiameter;
ed = Rough / hydraulicDiameter;

area = square(hydraulicDiameter) * DataGlobalConstants::Pi();
area = square(hydraulicDiameter) * DataGlobalConstants::Pi;
ld = L / hydraulicDiameter;
g = 1.14 - 0.868589 * std::log(ed);
AA1 = g;
Expand Down Expand Up @@ -2661,7 +2661,7 @@ namespace AirflowNetwork {
// ed = Rough / DisSysCompCoilData(CompNum).hydraulicDiameter;
ed = Rough / hydraulicDiameter;

area = square(hydraulicDiameter) * DataGlobalConstants::Pi();
area = square(hydraulicDiameter) * DataGlobalConstants::Pi;
ld = L / hydraulicDiameter;
g = 1.14 - 0.868589 * std::log(ed);
AA1 = g;
Expand Down Expand Up @@ -2813,7 +2813,7 @@ namespace AirflowNetwork {
// FLOW:
// Get component properties
ed = Rough / hydraulicDiameter;
area = pow_2(hydraulicDiameter) * DataGlobalConstants::Pi();
area = pow_2(hydraulicDiameter) * DataGlobalConstants::Pi;
ld = L / hydraulicDiameter;
g = 1.14 - 0.868589 * std::log(ed);
AA1 = g;
Expand Down Expand Up @@ -2978,7 +2978,7 @@ namespace AirflowNetwork {
// FLOW:
// Get component properties
ed = Rough / hydraulicDiameter;
area = pow_2(hydraulicDiameter) * DataGlobalConstants::Pi();
area = pow_2(hydraulicDiameter) * DataGlobalConstants::Pi;
ld = L / hydraulicDiameter;
g = 1.14 - 0.868589 * std::log(ed);
AA1 = g;
Expand Down Expand Up @@ -3125,7 +3125,7 @@ namespace AirflowNetwork {
// FLOW:
// Get component properties
ed = Rough / hydraulicDiameter;
area = pow_2(hydraulicDiameter) * DataGlobalConstants::Pi();
area = pow_2(hydraulicDiameter) * DataGlobalConstants::Pi;
ld = L / hydraulicDiameter;
g = 1.14 - 0.868589 * std::log(ed);
AA1 = g;
Expand Down Expand Up @@ -3512,7 +3512,7 @@ namespace AirflowNetwork {
// Slope = MultizoneCompHorOpeningData(CompNum).Slope;
// DischCoeff = MultizoneCompHorOpeningData(CompNum).DischCoeff;
Cshape = 0.942 * Width / Height;
OpenArea = Width * Height * Fact * std::sin(Slope * DataGlobalConstants::Pi() / 180.0) * (1.0 + std::cos(Slope * DataGlobalConstants::Pi() / 180.0));
OpenArea = Width * Height * Fact * std::sin(Slope * DataGlobalConstants::Pi / 180.0) * (1.0 + std::cos(Slope * DataGlobalConstants::Pi / 180.0));
DH = 4.0 * (Width * Height) / 2.0 / (Width + Height) * Fact;

// Check which zone is higher
Expand Down
14 changes: 7 additions & 7 deletions src/EnergyPlus/AirflowNetwork/src/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ namespace AirflowNetwork {
C = CCF(n) * CEF(n);
} else {
// IF (CCF(N) .EQ. 0.0d0) CCF(N)=TINY(CCF(N)) ! 1.0E-40
if (CCF(n) == 0.0) CCF(n) = DataGlobalConstants::rTinyValue(); // 1.0E-40 (Epsilon)
if (CCF(n) == 0.0) CCF(n) = DataGlobalConstants::rTinyValue; // 1.0E-40 (Epsilon)
PCF(n) = CCF(n);
C = CCF(n);
}
Expand Down Expand Up @@ -1097,11 +1097,11 @@ namespace AirflowNetwork {
if (LFLAG) {
// Initialization by linear relation.
if (PDROP >= 0.0) {
RhoCor = (propN.temperature + DataGlobalConstants::KelvinConv()) / (Tave + DataGlobalConstants::KelvinConv());
RhoCor = (propN.temperature + DataGlobalConstants::KelvinConv) / (Tave + DataGlobalConstants::KelvinConv);
Ctl = std::pow(RhozNorm / propN.density / RhoCor, expn - 1.0) * std::pow(VisczNorm / VisAve, 2.0 * expn - 1.0);
DF[0] = coef * propN.density / propN.viscosity * Ctl;
} else {
RhoCor = (propM.temperature + DataGlobalConstants::KelvinConv()) / (Tave + DataGlobalConstants::KelvinConv());
RhoCor = (propM.temperature + DataGlobalConstants::KelvinConv) / (Tave + DataGlobalConstants::KelvinConv);
Ctl = std::pow(RhozNorm / propM.density / RhoCor, expn - 1.0) * std::pow(VisczNorm / VisAve, 2.0 * expn - 1.0);
DF[0] = coef * propM.density / propM.viscosity * Ctl;
}
Expand All @@ -1111,7 +1111,7 @@ namespace AirflowNetwork {
if (PDROP >= 0.0) {
// Flow in positive direction.
// Laminar flow.
RhoCor = (propN.temperature + DataGlobalConstants::KelvinConv()) / (Tave + DataGlobalConstants::KelvinConv());
RhoCor = (propN.temperature + DataGlobalConstants::KelvinConv) / (Tave + DataGlobalConstants::KelvinConv);
Ctl = std::pow(RhozNorm / propN.density / RhoCor, expn - 1.0) * std::pow(VisczNorm / VisAve, 2.0 * expn - 1.0);
CDM = coef * propN.density / propN.viscosity * Ctl;
FL = CDM * PDROP;
Expand All @@ -1124,7 +1124,7 @@ namespace AirflowNetwork {
} else {
// Flow in negative direction.
// Laminar flow.
RhoCor = (propM.temperature + DataGlobalConstants::KelvinConv()) / (Tave + DataGlobalConstants::KelvinConv());
RhoCor = (propM.temperature + DataGlobalConstants::KelvinConv) / (Tave + DataGlobalConstants::KelvinConv);
Ctl = std::pow(RhozNorm / propM.density / RhoCor, 2.0 * expn - 1.0) * std::pow(VisczNorm / VisAve, 2.0 * expn - 1.0);
CDM = coef * propM.density / propM.viscosity * Ctl;
FL = CDM * PDROP;
Expand Down Expand Up @@ -1198,7 +1198,7 @@ namespace AirflowNetwork {
// FLOW:
// Get component properties
Real64 ed = Rough / Diameter;
Real64 area = Diameter * Diameter * DataGlobalConstants::Pi() / 4.0;
Real64 area = Diameter * Diameter * DataGlobalConstants::Pi / 4.0;
Real64 ld = Length / Diameter;
Real64 g = 1.14 - 0.868589 * std::log(ed);
Real64 AA1 = g;
Expand Down Expand Up @@ -2021,7 +2021,7 @@ namespace AirflowNetwork {
// FLOW:
RhoREF = AIRDENSITY(state, PSea, state.dataEnvrn->OutDryBulbTemp, state.dataEnvrn->OutHumRat);

CONV = state.dataEnvrn->Latitude * 2.0 * DataGlobalConstants::Pi() / 360.0;
CONV = state.dataEnvrn->Latitude * 2.0 * DataGlobalConstants::Pi / 360.0;
G = 9.780373 * (1.0 + 0.0052891 * pow_2(std::sin(CONV)) - 0.0000059 * pow_2(std::sin(2.0 * CONV)));

Hfl = 1.0;
Expand Down
Loading

5 comments on commit b7bfd0d

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

hotFix_str_format_fatal (Myoldmopar) - x86_64-MacOS-10.15-clang-11.0.0: OK (2989 of 2989 tests passed, 0 test warnings)

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

hotFix_str_format_fatal (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3028 of 3029 tests passed, 0 test warnings)

Messages:\n

  • 1 test had: EIO diffs.
  • 1 test had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 735
  • Failed: 1

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.

hotFix_str_format_fatal (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1555 of 1555 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.

hotFix_str_format_fatal (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2245 of 2246 tests passed, 0 test warnings)

Failures:\n

FileSystem Test Summary

  • Passed: 1
  • Failed: 1

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.

hotFix_str_format_fatal (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (721 of 721 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.