Skip to content

Commit

Permalink
more removal of global vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Yujie Xu committed Feb 10, 2025
1 parent 962608f commit 7e51320
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/EnergyPlus/ExtendedHeatIndex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ namespace ExtendedHI {
return 1.0 / (hc + hr);
}

constexpr Real64 Za = 60.6 / 17.4; // Pa m^2/W, mass transfer resistance through air, exposed part of skin
constexpr Real64 Za_bar = 60.6 / 11.6; // Pa m^2/W, mass transfer resistance through air, clothed part of skin
constexpr Real64 Za_un = 60.6 / 12.3; // Pa m^2/W, mass transfer resistance through air, when being naked

constexpr Real64 tol = 1e-8;
constexpr Real64 maxIter = 100;
Real64 find_eqvar_phi(EnergyPlusData &state, Real64 const Ta, Real64 const RH)
Expand All @@ -181,6 +177,7 @@ namespace ExtendedHI {
constexpr Real64 phi_salt = 0.9; // , vapor saturation pressure level of saline solution, steadman1979
constexpr Real64 Tc = 310.; // K , core temperature, steadman1979
Real64 Pc = phi_salt * pvstar(Tc); // , core vapor pressure
constexpr Real64 Za = 60.6 / 17.4; // Pa m^2/W, mass transfer resistance through air, exposed part of skin

Real64 phi = 0.84;
Real64 const Pa = RH * pvstar(Ta);
Expand Down Expand Up @@ -212,6 +209,8 @@ namespace ExtendedHI {
constexpr Real64 Tc = 310.; // K , core temperature, steadman1979
Real64 Pc = phi_salt * pvstar(Tc); // , core vapor pressure
constexpr Real64 r = 124.; // Pa/K , Zf/Rf, steadman1979
constexpr Real64 Za = 60.6 / 17.4; // Pa m^2/W, mass transfer resistance through air, exposed part of skin
constexpr Real64 Za_bar = 60.6 / 11.6; // Pa m^2/W, mass transfer resistance through air, clothed part of skin

Real64 Pa = RH * pvstar(Ta);
constexpr Real64 Rs = 0.0387;
Expand Down Expand Up @@ -277,6 +276,9 @@ namespace ExtendedHI {
constexpr Real64 phi_salt = 0.9; // , vapor saturation pressure level of saline solution, steadman1979
constexpr Real64 Tc = 310.; // K , core temperature, steadman1979
Real64 Pc = phi_salt * pvstar(Tc); // , core vapor pressure
constexpr Real64 Za = 60.6 / 17.4; // Pa m^2/W, mass transfer resistance through air, exposed part of skin
constexpr Real64 Za_bar = 60.6 / 11.6; // Pa m^2/W, mass transfer resistance through air, clothed part of skin
constexpr Real64 Za_un = 60.6 / 12.3; // Pa m^2/W, mass transfer resistance through air, when being naked

Real64 Pa = RH * pvstar(Ta);
constexpr Real64 phi = 0.84;
Expand Down Expand Up @@ -352,6 +354,9 @@ namespace ExtendedHI {
constexpr Real64 phi_salt = 0.9; // , vapor saturation pressure level of saline solution, steadman1979
constexpr Real64 Tc = 310.; // K , core temperature, steadman1979
Real64 Pc = phi_salt * pvstar(Tc); // , core vapor pressure
constexpr Real64 Za = 60.6 / 17.4; // Pa m^2/W, mass transfer resistance through air, exposed part of skin
constexpr Real64 Za_bar = 60.6 / 11.6; // Pa m^2/W, mass transfer resistance through air, clothed part of skin
constexpr Real64 Za_un = 60.6 / 12.3; // Pa m^2/W, mass transfer resistance through air, when being naked

Real64 dTcdt = 0.0;
Real64 const Pa = RH * pvstar(Ta);
Expand Down Expand Up @@ -403,6 +408,9 @@ namespace ExtendedHI {
constexpr Real64 Tc = 310.; // K , core temperature, steadman1979
Real64 Pc = phi_salt * pvstar(Tc); // , core vapor pressure
constexpr Real64 r = 124.; // Pa/K , Zf/Rf, steadman1979
constexpr Real64 Za = 60.6 / 17.4; // Pa m^2/W, mass transfer resistance through air, exposed part of skin
constexpr Real64 Za_bar = 60.6 / 11.6; // Pa m^2/W, mass transfer resistance through air, clothed part of skin
constexpr Real64 Za_un = 60.6 / 12.3; // Pa m^2/W, mass transfer resistance through air, when being naked

Real64 Pa = RH * pvstar(Ta);
Real64 Rs = 0.0387;
Expand Down

3 comments on commit 7e51320

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

extendedHIspeedFix (Unknown) - x86_64-Linux-Ubuntu-24.04-gcc-13.3: OK (2970 of 2970 tests passed, 0 test warnings)

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.

extendedHIspeedFix (Unknown) - x86_64-Linux-Ubuntu-24.04-gcc-13.3-UnitTestsCoverage-RelWithDebInfo: OK (2152 of 2152 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.

extendedHIspeedFix (Unknown) - x86_64-Linux-Ubuntu-24.04-gcc-13.3-IntegrationCoverage-RelWithDebInfo: OK (802 of 802 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.