Ladybug - set Sun/Light Source manually

Hi Guys,

My goal is to get information about the lighting in a room from arduino sensors and simulate the radiation in grasshopper to optimize an experimental freeform.

I was wondering if there is a way in Ladybug/Honeybee to set the light source manually? So without a certain “analysis period” looking for the right position of the sun in the .epw file.

Or is there maybe a better grasshopper plugin for this task?

thank you, Julian

Not sure if I fully understand what are you trying to do but there are several ways to create a light source in Honeybee including generating a dark sky: https://mostapharoudsari.gitbooks.io/honeybee-primer/content/text/c…

Hi Mostapha,

thanks for your fast response. I tried it with creating a “custom lamp” in a “dark sky”. I’m not sure if I figured it out yet but for now my problem is: no matter how much test points I have the “rundaylightanalysis” takes about 50seconds for a result.

Attached you’ll find screenshots, the grasshopper definition and a test surface in rhino.

As i need the results for an iterative optimization process, I wonder if there is an easier and faster way to get the radiance on a surface from a single custom light source?

thanks, Julian



Just in case you wonder. The project is about a physical kinetic model which has 5 lux sensors to evaluate the position of the sun/light source. With this information I want grasshopper to optimize the form of the model to gain maximum solar radiation for example.


test_lux_surface_definition.gh (200 KB)
test_lux_surface_geometry.3dm (116 KB)

Hi Julian,

Here are a few things that you can do:

  1. Make the calculation completely deterministic and get rid of ambient parameters: Looking at your model, I don’t see the geometry being surrounded by anything else (like walls, ceiling etc.). So, specifying ambient parameters in the simulation does not serve any purpose.

  2. Get rid of source subdivision by setting -ds to 0. This will make Radiance assume that your source is a point source ( which seems to be a valid assumption in your case).

  3. Finally, you can cut down the time even more by magnifying the candela value of a single light fixture instead of using the 9 fixtures that you have right now. This is a hack, but will work because that way, even the deterministic part of the calculation will feature only 1 variable instead of 9. You can make this work by increasing the candelaMultiplier of that one source by 9.

I have attached a gh file (which shows the parameters options) as an example. The points I have made above will mostly work for electric lighting only. Daylighting needs different kind of optimization because we are dealing with parallel rays from the sun and not a source with directional distribution like electric lights.

The image below is base-case. Takes the maximum time, using default settings.

This one is with direct-only calculations.

This is the case where a single fixture was used and the candela multiplier was used to magnify it’s brightness 9 times. Took the least amount of time…but as you can there is a perceptible difference between this one and the base-case.

test_lux_surface_definition_Sarith.gh (526 KB)

1 Like

Hi Sarith!

thanks for you very detailed answer. How much time did the optimized calculation took on your system?

For me it still takes more than a minute which is too long to integrate it into an optimization loop.

But would you still say that this method or this plugin is the best way to go?


thanks for your effort, Julian

Do you need the value for all those points? If you need the analysis to be faster just read the value for where you sensor is.

Hi,

yes i need at least some values distributed over the surface. About 10-20 would be enough but the funny thing is: there is no considerable difference between having a grid size of for example 5 or 15…

So still, also with a minimum of points, let’s say 10, the calculation takes far too long

Julian

On my system it took between 1 minute to 30 seconds.

To answer your question about whether this is the right tool for the job, I’d say it is not. If you are running your solution the same way that you’ve shown in the gh file, then you are spending far too much time in doing things in Grasshopper and Rhino for every iteration. The fastest way to run all the iterations would be to set them all up and run them outside Grasshopper in one single sequence and then compare their results inside Grasshopper. This, however, will require a fair amount of scripting/programming.

Hi Sarith,

alright, thank you for your advices. I learned a lot and I’m sure I’ll find the right method

Julian

Hi everyone and sorry for bumping this topic 4 years later,

but all the links are broken, even the pictures :disappointed_relieved:

Or Is there a way how to do this in the actual honeybee(1.3)?

There are plenty of ways to do a custom sky in the LBT plugin. There are several components and even more options available with a few lines of Python and this class of the LBT SDK:

https://www.ladybug.tools/honeybee-radiance/docs/honeybee_radiance.lightsource.sky.cie.html

… or this class:

https://www.ladybug.tools/honeybee-radiance/docs/honeybee_radiance.lightsource.sky.climatebased.html

We don’t have support yet for .ies files of electric lamps in LBT but we’ll add them at some point.

1 Like

Thanks a lot for your answer @chris !
I checked the components and the API.
As far as I understand it is not possible to set a Vector3d as Sundirection using a WEA file.
Is it possible to simulate different theoretical sun positions like in the picture:
grafik

Thanks again for the generosity to taking the time!

Weas are meant to record irradiance data sun-positions for a specific climate and location (it’s why the .wea stands for “weather”). So they really aren’t intended to be an interface for a generic vector input. You can always hack it by creating a location that produces a sun position for a given vector.

What type of study are you trying to run here? Are you still running a sun study here or is this vector meant to represent something else other than a sun position? I ask because there are ways of creating custom modifiers for suns but I wonder if you want to account for the size of the disc of the sun un a study like this or you really want to treat the sun like a point.

1 Like

Hi @chris ,

thanks for the explication!

I want to simulate different sunshades made of glass and foils on a building at a specific location.
The aim is to obtain a factor of which the solar insolation decreases by using the shade.

Since the size of the building is huge( <50km(!) linear sunshade length)the idea was to simulate just one window with the most average exposition possible and interpolate the values.

I hope this makes any sense to you - I would love to hear your expert opinion on this!

Thanks again and have a nice weekend!

50km! Are you modeling the Great Wall of China?

In any case, by “type of study” I meant, “what type of metric are you ultimately trying to get out of the simulation?” Is is direct sun hours? Or is it view factor to the sky or some other surface? Or is it some radiance type metric like illuminance or irradiance?

It sounds like these vectors are still meant to represent sun positions and so you can still use Direct Sun Hours but change the north_ and the location used to make the Wea.

:grinning: it’s like a net made out of triangles. we have about 50k nodes so far.

Sorry I am new to the climate business so I did not understand . I meant the irradiance.

Changing the north sounds like a good idea I wasn’t thinking of.Will try this next week
Thanks for the suggestion!

Have a nice weekend!