Direct sunlight hour analysis


#1

Hi

I’m wondering if there is a Dynamo node that can calculate the number of hours of direct sunlight a surface receives. Basically I want it to work like the ‘Sunlight hours analysis’ component found in Ladybug in Grasshopper. All I can currently see in Dynamo is daylighting and solar insolation. I would like to avoid constructing it from scratch if possible. Any thoughts?


#2

anyone?


#3

1st, I think just few in here know about Ladybug, cuz it’s hard to get an opinion. (I’ve got to know about it from you too.)

2nd, after briefly reviewing Ladybug(from bottom link), I suppose most of the functions in Ladybug can be achieved by Vasari & Dynamo.

http://www.grasshopper3d.com/group/ladybug

 

Which particular feature are you looking for?


#4

Ladybug is all open source and its written in Python (https://github.com/mostaphaRoudsari/ladybug). I’m going to try and transcode it into Dynamo unless someone has a better solution. Ladybug’s sunlight hour analysis basically calculates the number of hours a point receives during an analysis period. The workflow is as such:

  • Create an analysis period. This can be somewhat replicated with the sunSettings.StartDateTime (and End nodes). Although the time shown is in UTC which is confusing. But when it reads the current view, it doesn’t pick up the range of dates/times, only the start and end.

  • Calculate the sun vectors. This should be pretty easy as I can get the Altitude and Azimuth direct from Dynamo. It just needs to be tweaked so that it is a range, i.e. from 9am-4pm rather than a single still.

  • An analysis surface needs to be divided, essentially turning it into a mesh. From each vertex (or UV point) a line is drawn along the sun vector. If it intersects with other geometry its in shade. If not, it receives direct sunlight. Repeat for the entire analysis period. Sum the total instances no intersections occur to get the duration of time it is in direct sunlight.

The nodes I see in dynamo seem to be for thermal/energy analysis, not solar. Any whelp would be appreciated. Thanks


#5

Here is an interesting post about Ladybug&Dynamo by Konrad.

But it seems mostly about how to collaborate Ladybug & Dynamo rather than replicate Ladybug in Dynamo. I think it will be the first if you make one. :slight_smile:

In my opinion it looks pretty complicated but must be possible. And your logic totally makes sense.But at the shade analysis part, i’d rather find shade area first(start&end point or curve) than checking entire period. It doesn’t look big difference, but checking all period will take much more time to get accurate result.


#6

I believe there is a solar analysis package on the package manager that should do what you want(seems like you’re already using this, sorry.), I believe the solar analysis nodes perform similarly to the solar analysis that is present in Vasari.

Are you getting unexpected analysis results?

Is it possible to set the analysis for a single instantaneous analysis, as opposed to cumulative etc.

 

 


#7

The Solar Analysis for Dynamo package (0.1.2) doesn’t have direct sunlight. Also strangely, I am using the latest Dynamo daily build and if I go to installed packages it says its installed, but it doesn’t appear in the menu and my old scripts with solar analysis nodes in them doesn’t work/show.

There are very specific solar regulations here in Sydney. Apartments must achieve a min. of 2 or 3 hours of direct sunlight between 9am-3pm on the winter solstice. Ladybug did this perfectly. Set the interval for say 15 mins, so 6 hours x 4 intervals = 24 separate studies. It then stores the accumulative values and returns a coloured mesh with baked vertices.

Konrad’s post looks as though he is running the analysis in Ladybug and then exporting the values to Dynamo to recreate. I want to be able to run the analysis directly in Dynamo. Grasshopper is great for the earlier stages of a project but at some point the Revit model needs to take over which makes Dynamo a better option for analysis


#8

I’ve uploaded some custom nodes in the package manager called ‘BVN’. In there are two nodes to help this issue: SunSettings.TimeZone and SunSettings.GetTimesAndSunDirections.

The OFTB SunSetting.StartDateTime always return the date/time in UTC. This is confusing if you are in another time zone. SunSettings.TimeZone will return the difference which you can then add to TimeSpan.Create to get the true date/time.

And despite having a single day solar day with internal setup, the SunSettings.SunDirection only show the start vector. The SunSettings.GetTimesAndSunDirections returns all vectors. This should make it easier to do sun studies over a given period. Now all I need to do is figure out if its possible to move the sun path in Revit so that it looks correct!

 

Solar

 

 

 

 

 

 

 

Solar2


#9

Hi Paul,

Did you get anywhere with getting sun calcs done with Dynamo?

I’ve started doing simillar thing, but so far I just have a collector of all windows in Living Rooms and struggling a bit with interpreting the results of the raybounce.


#10

Hi,

I’d like to be able to tell, for how many hours a LIVING room receives direct sunlight.

I’ve managed to create a definition that gives me the list of rooms with the name LIVING that receive direct sunlight.

However, I’m having trouble to track back the results to the original sunlight vectors.

Any ideas?

 

Capture

DirectSunlight


#11

Anyone?


#12

Hi Maciej

So you’re working on SEPP65 too? I haven’t had a chance to finish off my script. I’ve been away. Will try to do it in the next week or two.

I would suggest you use the LunchBox room collector node. This will output a bunch of useful information including room boundary and centroid. Might be simpler.


#13

Hi Paul,

 

I’ve only just noticed your response. I’m working on the SEPP65 and get that definition to work(…well… kind of work…)

The biggest problem I’m having is that the RayBounce is either take lots of time to process * (and crashes most of the time) - I’m working on a development of about 400 units and there is a lot overshadowing, so I have to up the number of rays quite a bit to get at least a reasonable approximation of the shadows.

I’m looking to optimize it with Python - I’ll let you know if I’ll get anywhere