3-phase imagebased recipe

Hi all,

Last month @FrederikRasmussen and I finished our short post-graduate internship at Henning Larsen Architects. During our internship we got the chance to work with Ladybug Tools. A result of this is the following 3PH imagebased recipe. This should not be seen as a final solution for this recipe, and has only been used on two small case models, but we wanted to share it with the Ladybug community – so feel free to make it better or report errors if you decide to test it.

Workflow
Below is an overview of a simple workflow, with the most simple post-processing, i.e. combining the different window group combinations into one image per hour. The only components that are not part of Ladybug Tools are the two grouped in orange. More details on these below.

Components and code changes
The component for the 3PH imagebased recipe is based on the DC component, only with added input for the view matrix. Unlike the gridbased 3PH, the initial DC calculation with regular glazing surfaces is not included. So, if you have a model with both regular glazing and BSDF-files this will not work – only the window groups with BSDFs will be simulated.

3phIBrecipe
The component for generating combined images is based on the existing component of the same name, genImages. The contribution is not split into total, direct, and sun like the DC recipe, and therefore the input _mode_ doesn’t have any function, though it is still there. The inputs hoys_ and blind_states_ should work like usual – just remember that there is no initial DC simulation meaning that the number of blind state IDs should equal the number of window groups.

genimages
The two components will not work without altering some of the code. There is a new Python file for the recipe (imagebased.py). Otherwise, only two Python files are edited, however, these changes should (hopefully) not interfere with workflows for other recipes.

The animation below illustrates different combination of window groups through a day. The combined images were made with the component shown above, however, the falsecolor images below were created externally through Radiance in command prompt.
com-optimize(1)

Download
If you want to test it you can find a download link here. It includes:

A Rhino model, a Grasshopper file (geometry should be internalised), the BSDFs used in this example, Python files, and details about the code changes in a text document.

Notes

  • Since the code has been mostly copy+pasted and edited to fit the recipe, there might be some reduntant code and comments in the Python files.
  • A direct skymatrix will be written and appended to commands.bat though it is not used.
  • Reusing the matrices should work, however, it only checks if the first image (000.hdr) of the view matrix exists. If you for some reason have deleted any of the other 144 images it will not redo the raytracing for that window group. The DC recipe loops through all the images and also checks the file size, which could be included too.
  • Some of the added Python definitions follow a lazy naming convention hence some has been given a “_2” at the end of the existing definition it is based on.
  • The workflow worked well with a fresh HB[+] update from around early December. Right now, I think it will still work if you have updated HB[+] recently.
7 Likes

I remember seeing a post on this by Jakob Strømann-Andersen on Linkedin last month. There aren’t many adopters of the multi-phase simulation methods in design practice, mostly because of how complicated they are setup and analyze. If you guys are up for it, and hopefully if Henning Larsen can sponsor it, you should present this work at the Radiance workshop this year.
I am sure that the folks who are developing these advanced methods at LBNL, as well as those who are still waiting to take the plunge in applying them in design practice, would be interested in learning about your experience.

4 Likes

Hi mikkel,

Thanks for the amazing post. That is what I am trying to find and use, but I tried your file it always showing an error can not import radiance from honeybee. I am guessing that the py files you put in the folder is not compatible with the current version for now, because all the files in the honeybee folder ends with ghuser rather than py files. I have already tried to put the radiance folder in to either my honeybee or HB+ installation folders, both of them are not working.
Would there be any solutions to use your files for a later version 0.06.

Best wishes,
Hao

Hi @David1,

One of the changes from 0.05 to 0.06 is that the honeybee folder changed to honeybee_plus. I changed the sample file so it should work with 0.06 now. It is the same download link as in the main post.

You have to use HB+ for this as it will not work for the newer version.

1 Like

Hi Mikkel,

That part works fine for me but the image based analysis recipe does not work properly, I tried to change line of code from the honeybee to honeyplus but it still does not work.


Also, I have updated all the component from 0.05 to 0.06 of HB+.
3PH_ImageBased_Example.gh (1.2 MB)

Additional question, for those python codes that you shared under the honeybee_plus folder, where should I put those. I see that only those two components highlighted in orange in grasshopper need to be changed, did not sure anywhere else I need to modify the codes to make it work.

If you could help, that would be much appreciated.
Thanks,
Hao

Hi @David1,

You should copy the downloaded honeybee_plus folder to the following location (I assume this is the same for you). Merge with the existing honeybee_plus folder and overwrite the files when it asks you to.

1 Like

Hi Mikkel,

That works, thanks for your help.

1 Like

Hi Mikkel,

One more question, I wasn’t sure is it running properly or not? it is shown in the window like the following:
2

I set the reuse the vmtx and dmtx as false, since I did not run the simulation before and it’s my first time running the simulation. I was not sure is there anything missing or not.

Best wishes,
Hao

Hi @David1,

The oconv warning is fine. Those two files are empty but it does not matter.

Got it. Thanks for your help. Now the file works fine on my end and got the initial results for now.

Hi mikkel,

Sorry for another follow up with you again. I was using the image collection component that you provided doing annual analysis, but the error was showing as below about loading the images. I apparently getting the both image folders for the window group with and without the shade. The problem is about load those into the Combined folder. Could you help me to solve this? I checked the combined folder it loaded the half of the images for the window and somehow stopped.
Here I am using one window group, I just want to load all the without shade images.

Hi @David1,

I am not sure. But that’s a lot of images. That’s why I just combined images for one day in the sample file. Did you check that you did not run out of disk space?

Hi mikkel,

Thanks for your reply.
All the images are saved on C drive and shouldn’t run out of disk space, I still have hundreds left. I am guess it is something wrong for the coding? But not sure, because this particular file I did check it worked fine for one day but not working for annual. Also, after it failed working, it somehow affect other run radiance components. Only the collect image component failed to gather the hdr files into the Combined folder…not sure why it happened.
I also opened other grasshopper files I used for other projects, it seems nothing wrong with my HB and HB+ or other components with radiance.