DIVA 4 for Grasshopper performs daylight simulations and solar radiation simulations for the buildings we design. It's surprisingly fast, powerful, and easy to use. But there's one annoying bug when testing for solar radiation on massing options. The DIVA solar radiation component requires that all surfaces in the Rhino model are facing the correct direction. Even when all faces are correctly oriented, the test grid is identical to the surfaces being tested, which occasionally results in dark stripes when some parts of the grid are barely on the interior of the envelope.
To fix the first issue, all surfaces in the Rhino model must be facing towards the exterior. The surfaces will appear slightly darker in Rhino if they are inside out. Notice the subtle differences in a few of the surfaces between the models below. If the color isn't apparent, use the "Dir" command in Rhino to view the directionality of each surface.
For the coplanar issue, we have to fix this in Grasshopper. Below is the typical script I use for solar radiation. I'm using dynamic pipelines so I can use a slider to add the correct prefix on each layer to load the massing option I want. For example, floors on option 1 are called "1 Floors" in Rhino. Walls on option 2 are called "2 Walls" and so on. This way, I can set the materials once, and change the prefix with a slider to move to different options.
All of those objects with materials assigned go into the Object input in Radiation Map, and as outputs, I'm calculating total floor area, total envelope area, and total radiation, as well as producing the colored grid.
The fix comes right before creating a test grid with the envelope geometry. First, I make a sphere that surrounds the entire building. Next, I find the centroid of every surface of the envelope, and find the vector between that point and the closest point on the sphere. Next, I test to see if any of these vectors are colliding with another surface on the envelope. In other words, I test to see if each surface has a clear path towards the outside of the model, or if it happens to be an inward facing surface.
I move all outward facing surfaces just slightly along their vector, and I move all inward facing surfaces just slightly opposite of their vector. This inflates the model so every grid surface is slightly offset from its original test surface so that there is nothing coplanar between them.
A successful solar radiation test:
The script is available here: DIVA Radiation Surface Offset.gh
Of course, you will need DIVA installed on your computer for those components to work, but if the corrective loop is useful for something else, it can be taken independently. Please try to break it and tell me how it works.