-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue where simple glazing system had negative absorptance at some incident angles #8001
Conversation
@nealkruis @lgentile it has been 29 days since this pull request was last updated. |
@nealkruis @lgentile it has been 28 days since this pull request was last updated. |
@EnergyArchmage I updated the documentation to clarify the change in the form of the reflectance curve and its coefficients. Please let me know if you have any questions. Otherwise, we're just waiting on results back from the CI... |
src/EnergyPlus/WindowManager.cc
Outdated
|
||
// total absorptance cannot be negative | ||
assert(1 - rfp - tfp >= 0.0); | ||
assert(1 - rbp - tfp >= 0.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this line repeated? copy paste error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You know...just in case the first attempt is a false positive! 😄
...good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, no...it's not the same. The first is the front reflectance rfp
, the second is the back reflectance rbp
. Transmittance is the same in both directions tfp
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reviewed the code and approve this PR. Unfortunately I don't have enough data capacity to download the entire forked repo and so couldn't pull down the branch and do all the usual review things.
@nealkruis Some initial comments. Comparing annual energy use. The difference in site energy for the defect files is roughly 2.5%, for RefBldgFullServiceRestaurantNew2004_Chicago, it's roughly 0.035%. Did you review annual energy results for any other testfiles that use simpleglazing? Just want to be sure this isn't introducing major differences in energy use for more "normal" glazing inputs. |
@mjwitte I made sure that the only files impacted were those with |
@nealkruis I'll review some annual diffs. There are a couple of unit test failures. Also, I'd like to see for a "typical" window from one of the test files (probably one of the Ref* buildings, how the internal window properties change before and after this change. And show some plots of the angular window transmission on a winter day and summer day to see how similar or not the performance is. And how does the plot shown in the original issue look now with this fix? |
Sorry, @mjwitte, I thought I posted these earlier. These are all figures comparing window outputs between the simple and detailed (layer-by-layer) model for the ASHRAE 140 L130AC glazing definition. Each point is one hour from the annual simulation. The x-axis here is angle of incidence (anything less than zero is purely diffuse radiation). One important thing to recognize here is how the frame is characterized in each model. The spectral results in the detailed model do not include the frame (this is why transmittance looks so much higher in this model). The best (and only real apples-to-apples comparison) here is the "Net Window Heat Transfer", which is one of the only outputs that includes the frame effects. Here are the figures before the fix: Here are the figures after the fix: |
@nealkruis See summary of Reference Building Diffs above. RefBldgMediumOfficeNew2004_Chicago has a 10% increase in gas use. Please look at that and provide some justification. Also, there are some major sizing changes (up to 30%) for particular zones in the other reference buildings. We need to understand what's driving that. Otherwise, the annual energy diffs for the other reference buildings are on the order of 1-2%, so that's reasonable. |
@mjwitte I think the gas use variance in the medium office is related to the fact that it uses electric reheat to meet most of the heating demand in the building, and only uses gas for heating in the central VAV system. It could be a small denominator that's inflating the % difference? Other buildings use all gas, or hot water reheat from a gas boiler. The differences on a time step basis are definitely happening when solar gains are offsetting the heating load (as is expected). I'd have to think more about how the heating system works with this building to understand why/how the central heating coils are picking up more of the load during hours with solar gains. Any ideas? Looking at the sizing flow rates, it's clear that the difference is also related to solar gains. Below is the plot for the cooling design air flow rate from the zone sizing run for medium office, bottom perimeter zone 1. It's clear that solar is a large component of the load, and the fix shows a smoother peak that you'd expect from the sun's path relative to the windows in the zone. We know that absorptance in "develop" is less than in "fix" and negative at some incident angles, which will decrease loads somewhat (depending on the relative magnitude of solar transmission). This plot is consistent with what I showed with the net window heat transfer rate in the L130AC building where, depending on the incidence angle, the net window load could be 50% lower in the simple glazing model without the fix. I don't know if that satisfies your concerns or not. I'll keep thinking about the medium office gas use, but I thought I'd share my ideas in the meantime. |
Another strange thing about the medium office results is that the gas central heating is 24 GJ lower and electric reheat heating is 11 GJ higher after the fix. The overall heating loads are not actually changing that much (~1-2%). The total heating energy in this model before this fix was 70% electric and 30% gas. After the fix it is closer to 75%/25%. I still don't have an explanation for why the load is shifting from electric reheat to central gas, but I do think that the shift combined with the small fraction of heating that is met with gas explains why the medium office appears to be an outlier. |
@nealkruis For the zone shown above (bottom perimeter zone 1) that is a huge change in cooling airflow rate. What direction(s) does the glazing face for that zone? I would expect this to cause an increase in reheat energy use due to the higher minimum airflow rate into that zone. There won't be any change to heating sizing, because the winter design days all assume no solar. But what's the change in annual heating load for that zone? The AHUs have a fixed (scheduled) supply air setpoint of 12.8C (55F), so the central gas heating coils are only treating OA load in cold weather. These systems have draw-through fans, so my guess is that the higher fan heat (due to the higher cooling airflow sizing and fixed min VAV flow fractions) is offsetting the heating gas. |
@mjwitte bottom perimeter zone 1 is south facing. It's the summer design day, so I expect the incident angle is pretty low during the peak (maybe its worth plotting incident angle for the design day run?). I think I would expect this fix to have a similar effect on any equator-facing perimeter zone. I think you're right about the fan heat changing the gas load. The difference is pretty constant through out the day, whereas the reheat definitely shows more of the variation we expect from this fix with greater differences in the morning and late afternoon when the sun is at lower angles. |
@mjwitte I added the a sheet ("Comparisons") to google workbook to visualize the impact of the fix on Transmittance, Reflectance, and Aborptance as a function of incident angle for any curve. The inputs are normal transmittance/reflectance and curve letter. For the medium office (and I think most of the reference models), the U-factor is 3.24 and the SHGC is 0.39. This combination results in normal transmittance of 0.304, normal reflectance of 0.4662, and puts us squarely in the average of curves FGHI. Here are plots for each of absolute transmittance/reflectance/absorptance for each of these curves (notice the y-axis scale is changing): I can also add the FGHI average if you want to look at it, but it will be somewhere between F and G (F and H are nearly identical). |
@nealkruis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the unit test needs a fix, there's some minor doc changes as well.
@@ -288,33 +288,97 @@ \subsubsection{Step 6.~ Determine Layer Visible Properties}\label{step-6.-determ | |||
|
|||
\subsubsection{Step 7. Determine Angular Performance}\label{step-7.-determine-angular-performance} | |||
|
|||
The angular properties of windows are important because during energy modeling, the solar incidence angles are usually fairly high.~ Angles of incidence are defined as angles from the normal direction extending out from the window.~ The simple glazing system model includes a range of correlations that are selected based on the values for U and SHGC.~ These were chosen to match the types of windows likely to have such performance levels.~ The matrix of possible combinations of U and SHGC values have been mapped to set of 28 bins shown in the following figure. | |||
The angular properties of windows are important because during energy modeling, the solar incidence angles are usually fairly high.~ Angles of incidence are defined as angles from the normal direction extending out from the window.~ The simple glazing system model includes a range of correlations that are selected based on the values for U and SHGC.~ These were chosen to match the types of windows likely to have such performance levels.~ The matrix of possible combinations of U and SHGC values have been mapped to set of 28 bins shown in the Figure \ref{fig:diagram-of-transmittance-and}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo (that was there before) "mapped to set of 28 bins ..."
|
||
\begin{figure}[hbtp] % fig 74 | ||
\centering | ||
\includegraphics[width=0.9\textwidth, height=0.9\textheight, keepaspectratio=true]{media/image947.png} | ||
\caption{Diagram of Transmittance and Reflectance Correlations Used based on U and SHGC \label{fig:diagram-of-transmittance-and}} | ||
\end{figure} | ||
|
||
There are ten different correlations, A thru J, for both transmission and reflectance.~ The correlations are used in various weighting and interpolation schemes according the figure above.~ The correlations are normalized against the performance at normal incidence.~ EnergyPlus uses these correlations to store the glazing system's angular performance at 10 degree increments and interpolates between them during simulations.~ The model equations use the cosine of the incidence angle, \(\cos (\varphi )\), as the independent variable.~ The correlations have the form: | ||
There are ten different correlations, A thru J, for both transmission and reflectance.~ The correlations are used in various weighting and interpolation schemes according the figure above.~ The correlations are normalized against the performance at normal incidence.~ EnergyPlus uses these correlations to store the glazing system's angular performance at 10 degree increments and interpolates between them during simulations.~ The model equations use the cosine of the incidence angle, \(\cos (\phi )\), as the independent variable.~ The correlations for transmittance has the form: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The correlations for transmittance has the form:" Correlations or hashave ?
Curve & a & b & c & d & e \\ \hline | ||
A - Single: 3mm clear & 1.00 & -0.70 & 2.57 & -3.20 & 1.34 \\ | ||
B - Single: 3mm bronze & 1.00 & -1.87 & 6.51 & -7.86 & 3.23 \\ | ||
C - Single: 6mm bronze & 1.00 & -2.53 & 8.40 & -9.86 & 3.99 \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the code -2.53 is -2.52.
C - Single: 6mm bronze & 1.00 & -2.53 & 8.40 & -9.86 & 3.99 \\ | ||
D - Single: 3mm coated & 1.00 & -1.86 & 6.40 & -7.64 & 3.10 \\ | ||
E - Double: 3mm clear, clear & 1.00 & -1.57 & 5.60 & -6.83 & 2.80 \\ | ||
F - Double: 3mm coated, clear & 1.00 & -3.14 & 10.97 & -13.14 & 5.32 \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the code -3.14 is -3.15. Similar differences on the same coefficient for G and I. Also some minor differences in coefficients c, d, and e for several rows.
FYI, CI did report the unit test failures above on Linux UnitTestsCoverage-Debug. |
@nealkruis It looks like there are still a few issues here. Are you planning on getting this in before release? |
Also, I've confirmed the unit test failure on a local Linux machine. |
I believe this is an important fix and should be a priority.
…On September 18, 2020 12:03:55 PM EDT, Matt Mitchell ***@***.***> wrote:
@nealkruis It looks like there are still a few issues here. Are you
planning on getting this in before release?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#8001 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
@mitchute @mjwitte I plan to resolve this today (sorry for the delay). It may be specific to the unit test where normal trans + refl = 1.0 + floating point inexactness. I will add an epsilon to the floating point comparison. I might also check to make sure users can't input trans + refl > 1.0 + epsilon. I'm hoping there's some code to catch that somewhere. |
Interesting:
I fixed the assertion in to allow for minor floating point precision issues, but this makes me feel a little uneasy about not adding an epsilon to the get input routine as well. |
@nealkruis There are many different checks for various input combinations >1.0 for WindowMaterial:Glazing here and following. If I'm understanding your concern, all of these would need to be modified to allow for an epsilon. I wouldn't touch any of that now, and I don't think it's a problem. If you want to post a new issue to explore this further (post v9.4 release) that's fine, but I wouldn't change anything here. @Myoldmopar Any further thoughts? I'm ready to merge this. |
No, nothing further from me. I'm glad things are working well, and support pushing further changes off until later. |
Pull request overview
Fixes #8000
The formulation of the reflectance curves for the simple glazing method are independent of the transmittance curves and, as a result, the combined transmittance + reflectance can be greater than 1.0 (making absorptance less than zero). Negative absorptance generally only happens at high angles of incidence. Under these conditions, heat will be emitted from the glazing, reducing the cooling load in the respective zones.
The solution implemented reformulates the reflectance curve data into the same formulation that is used for the coated glass angular properties. This can be done algebraically using the original reflectance coefficients for curves A-J. I will also add a final energy balance check to enforce a lower limit on absorptance.
The reformulation of curve values is illustrated in this spreadsheet. This illustrates the conversion from the original reflectance curves to the reformulated curves through two steps: 1) Normalization (to make "New" curves), and 2) accounting for transmittance (to make "New Coefficients" curves). This does not impact the transmittance curves (though, the transmittance curve coefficients have been rounded with negligible impact on results).
Here is an example of glazing optical properties before and after the fix (see details in this comment):
These modifications are described in the engineering documentation.
Diffs are expected in all test files using
WindowMaterial:SimpleGlazingSystem
(currently 52 files).Reference Building Diffs
Most of the files that are showing diffs are the reference buildings (and files based on them). Some key diffs from annual simulations of the base RefBldg* files are shown below.
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.
If feature, test running new feature, try creative ways to break itVerify IDF naming conventions and styles, memos and notes and defaultsIf new idf included, locally check the err file and other outputs