-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
GPU-based Shading Calculations | ||
============================== | ||
|
||
**Neal Kruis, Big Ladder Software, LLC** | ||
|
||
## Justification for New Feature ## | ||
|
||
## Approach ## | ||
|
||
The general approach is to use the Pixel Counting methodology described by Jones et al. In this approach, the building is rendered using OpenGL. Each surface is then viewed from the (parallel projection) perspective of the sun. The number of visible pixels for that surface is a proxy for the projected sunlit surface area. Dividing by the cosign of incidence for that surface gives the total sunlit surface area. | ||
|
||
### Exterior Shading ### | ||
|
||
### Interior Solar Distribution ### | ||
|
||
We will count pixels when viewing the from the perspective of the sun through a window with each internal surface assigned a different color, then use the histogramming functions in OpenGL to report the number of pixels of each color that are visible. | ||
|
||
### Pitfalls ### | ||
|
||
#### Hardware requirements #### | ||
|
||
This approach only works if there are graphics drivers (or emulators) that support OpenGL version 2.1 (or higher) on the machine running the code. This introduces a new hardware requirement for EnergyPlus. If GPU-based shading is requested and the required hardware (or emulated hardware) is not present, EnergyPlus will issue a warning and revert to the CPU-based polygon clipping method. | ||
|
||
#### Transparent shading surfaces #### | ||
|
||
Non-opaque shading surfaces are difficult to characterize under this approach (although, from early testing of SolarShadingTest.idf it doesn't appear to be working properly with the CPU calculations either). | ||
|
||
There are a couple potential solutions to this problem: | ||
|
||
1. We use the perforated approach described by Jones. | ||
2. We introduce transparency to the OpenGL rendering and calculate the color of the pixels returned. | ||
3. We render with and without transparent surfaces to evaluate their impact. | ||
|
||
## Input Output Reference Documentation ## | ||
|
||
See proposed changes in `Energy+.idd.in`. Will draft document once IDD is reviewed. | ||
|
||
## Engineering Reference ## | ||
|
||
Mainly a reference to Jones's papers. | ||
|
||
## References ## | ||
|
||
[Fast computer graphics techniques for calculating direct solar radiation on complex building surfaces](http://dx.doi.org/10.1080/19401493.2011.582154) | ||
|
||
Nathaniel L. Jones, Donald P. Greenberg, and Kevin B. Pratt. Journal of Building Performance Simulation. Volume 5, Issue 5, Pages 300-312. June 26, 2011. | ||
|
||
[Hardware accelerated computation of direct solar radiation through transparent shades and screens](https://nljones.github.io/publications/SB12_TS09b_3_Jones.pdf) | ||
|
||
Nathaniel L. Jones and Donald P. Greenberg. 5th National Conference of the International Building Performance Simulation Association-USA. Madison, Wisconsin. August 1-3, 2012 |
7794e71
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.
penumbra-integration (nealkruis) - x86_64-MacOS-10.13-clang: Tests Failed (1866 of 2408 tests passed, 118 test warnings)
Messages:\n
Failures:\n
EnergyPlusFixture Test Summary
regression Test Summary
7794e71
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.
penumbra-integration (nealkruis) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)
7794e71
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.
penumbra-integration (nealkruis) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (6 of 6 tests passed, 0 test warnings)
7794e71
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.
penumbra-integration (nealkruis) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: Build Failed
7794e71
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.
penumbra-integration (nealkruis) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: Build Failed
7794e71
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.
penumbra-integration (nealkruis) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: Build Failed
7794e71
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.
penumbra-integration (nealkruis) - Win64-Windows-10-VisualStudio-16: Build Failed
Failures:\n
integration Test Summary
regression Test Summary