Skip to content

Commit

Permalink
Merge pull request #10743 from NREL/10742-vertical-blind-warning
Browse files Browse the repository at this point in the history
Vertical blind warning not reported from material get input function
  • Loading branch information
Myoldmopar authored Oct 15, 2024
2 parents 1a9d150 + 6acb0e7 commit ec7398a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2667,41 +2667,41 @@ \subsubsection{Inputs}\label{inputs-24-003}

\paragraph{Field: Slat Width}\label{field-slat-width-1}

The width (m) of the venetian slats.~ Used only for ShadingLayerType = Venetian.
The width (m) of the venetian slats.~ Used only for ShadingLayerType = VenetianHorizontal or VenetianVertical.

\paragraph{Field: Slat Spacing}\label{field-slat-spacing}

The distance (m) between front sides of the venetian slats.~ Used only for ShadingLayerType = Venetian.
The distance (m) between front sides of the venetian slats.~ Used only for ShadingLayerType = VenetianHorizontal or VenetianVertical.

\paragraph{Field: Slat Thickness}\label{field-slat-thickness-1}

The thickness (m) of the venetian slats.~ Used only for ShadingLayerType = Venetian.
The thickness (m) of the venetian slats.~ Used only for ShadingLayerType = VenetianHorizontal or VenetianVertical.

\paragraph{Field: Slat Angle}\label{field-slat-angle-1}

The slat tilt angle (degrees) of the venetian slats.~ Used only for ShadingLayerType = Venetian.~ Range of slat angle is from -90 to 90 degrees.
The slat tilt angle (degrees) of the venetian slats.~ Used only for ShadingLayerType = VenetianHorizontal or VenetianVertical.~ Range of slat angle is from -90 to 90 degrees.

\paragraph{Field: Slat Conductivity}\label{field-slat-conductivity-1}

The conductivity (W/mK) of the venetian slats.~ Used only for ShadingLayerType = Venetian.
The conductivity (W/mK) of the venetian slats.~ Used only for ShadingLayerType = VenetianHorizontal or VenetianVertical.

\paragraph{Field: Slat Curve}\label{field-slat-curve}

The curvature radius (m) of the venetian slats.~ Setting this value to zero means there is no curvature in the slat (it is flat), while a non-zero value is the radius of the slat curve.~ This value cannot be smaller than Slat Width / 2.~ Used only for ShadingLayerType = Venetian.
The curvature radius (m) of the venetian slats.~ Setting this value to zero means there is no curvature in the slat (it is flat), while a non-zero value is the radius of the slat curve.~ This value cannot be smaller than Slat Width / 2.~ Used only for ShadingLayerType = VenetianHorizontal or VenetianVertical.

\begin{figure}[hbtp] % fig 18
\centering
\includegraphics[width=0.9\textwidth, height=0.9\textheight, keepaspectratio=true]{media/image042.png}
\caption{Side view of horizontal venetian blind slats or top view of blinds with vertical slats. Front face of slats is marked with red line. \protect \label{fig:side-view-of-horizontal-venetian-blind-slats}}
\end{figure}

An IDF example for ShadingLayerType = Venetian
An IDF example for ShadingLayerType = VenetianHorizontal

\begin{lstlisting}

WindowMaterial:ComplexShade, !- venetian blind layer
Shade_30001_Layer, !- name
Venetian, !- shading layer type
VenetianHorizontal, !- shading layer type
0.005, !- thickness
160, !- layer conductivity
0.0, !- IR transmittance
Expand Down
57 changes: 12 additions & 45 deletions src/EnergyPlus/Material.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ constexpr std::array<Material::Gas, 10> gases = {

constexpr std::array<std::string_view, (int)EcoRoofCalcMethod::Num> ecoRoofCalcMethodNamesUC = {"SIMPLE", "ADVANCED"};

int GetMaterialNum(EnergyPlusData &state, std::string const &matName)
int GetMaterialNum(EnergyPlusData const &state, std::string const &matName)
{
auto const &s_mat = state.dataMaterial;
auto found = s_mat->materialMap.find(Util::makeUPPER(matName));
Expand Down Expand Up @@ -2496,14 +2496,14 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if
continue;
}

auto const &instances = itInstances.value();
auto itObj = instances.begin();
auto const &instances2 = itInstances.value();
auto itObj = instances2.begin();
// Can't use find here because epJSON keys are not upper-cased
for (; itObj != instances.end(); ++itObj) {
for (; itObj != instances2.end(); ++itObj) {
if (Util::makeUPPER(itObj.key()) == s_ipsc->cAlphaArgs(3)) break;
}

if (itObj == instances.end()) {
if (itObj == instances2.end()) {
ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3));
ErrorsFound = true;
continue;
Expand All @@ -2523,15 +2523,15 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if
continue;
}

auto const &instances = itInstances.value();
auto const &instances3 = itInstances.value();

auto itObj = instances.begin();
auto itObj = instances3.begin();
// Can't use find here because epJSON keys are not upper-cased
for (; itObj != instances.end(); ++itObj) {
for (; itObj != instances3.end(); ++itObj) {
if (Util::makeUPPER(itObj.key()) == s_ipsc->cAlphaArgs(4)) break;
}

if (itObj == instances.end()) {
if (itObj == instances3.end()) {
ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4));
ErrorsFound = true;
continue;
Expand Down Expand Up @@ -2668,45 +2668,12 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if
}

if ((mat->LayerType == TARCOGParams::TARCOGLayerType::VENETBLIND_HORIZ) ||
(mat->LayerType == TARCOGParams::TARCOGLayerType::VENETBLIND_HORIZ)) {
if (s_ipsc->rNumericArgs(11) <= 0.0) {
ErrorsFound = true;
ShowSevereCustomMessage(
state, eoh, format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(11), s_ipsc->rNumericArgs(11)));
}

if (s_ipsc->rNumericArgs(12) <= 0.0) {
ErrorsFound = true;
ShowSevereCustomMessage(
state, eoh, format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(12), s_ipsc->rNumericArgs(12)));
}

if (s_ipsc->rNumericArgs(13) <= 0.0) {
ErrorsFound = true;
ShowSevereCustomMessage(
state, eoh, format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(13), s_ipsc->rNumericArgs(13)));
}

if ((s_ipsc->rNumericArgs(14) < -90.0) || (s_ipsc->rNumericArgs(14) > 90.0)) {
ErrorsFound = true;
ShowSevereCustomMessage(
state,
eoh,
format("{} must be >=-90 and <=90, entered value = {:.2R}", s_ipsc->cNumericFieldNames(14), s_ipsc->rNumericArgs(14)));
}

if (s_ipsc->rNumericArgs(15) <= 0.0) {
ErrorsFound = true;
ShowSevereCustomMessage(
state, eoh, format("{} must be >0, entered value = {:.2R}", s_ipsc->cNumericFieldNames(15), s_ipsc->rNumericArgs(15)));
}

if ((s_ipsc->rNumericArgs(16) < 0.0) ||
((s_ipsc->rNumericArgs(16) > 0.0) && (s_ipsc->rNumericArgs(16) < (s_ipsc->rNumericArgs(11) / 2)))) {
(mat->LayerType == TARCOGParams::TARCOGLayerType::VENETBLIND_VERT)) {
if ((s_ipsc->rNumericArgs(16) > 0.0) && (s_ipsc->rNumericArgs(16) < (s_ipsc->rNumericArgs(11) / 2))) {
ErrorsFound = true;
ShowSevereCustomMessage(state,
eoh,
format("{} must be =0 or greater than SlatWidth/2, entered value = {:.2R}",
format("{} must be = 0 or greater than SlatWidth/2, entered value = {:.2R}",
s_ipsc->cNumericFieldNames(16),
s_ipsc->rNumericArgs(16)));
}
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/Material.hh
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ namespace Material {
~MaterialGlassTC() = default;
};

int GetMaterialNum(EnergyPlusData &state, std::string const &matName);
int GetMaterialNum(EnergyPlusData const &state, std::string const &matName);
MaterialBase *GetMaterial(EnergyPlusData &state, std::string const &matName);

void GetMaterialData(EnergyPlusData &state, bool &errorsFound); // set to true if errors found in input
Expand Down

4 comments on commit ec7398a

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2916 of 2916 tests passed, 0 test warnings)

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.

develop (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2894 of 2894 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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: OK (2098 of 2098 tests passed, 0 test warnings)

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: OK (801 of 801 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.