Multiply surfaceareas with large data collections

Greetings,

I have several data collections with annual irradiance results (8760 h). What I want to do is multiply the data with the associated surfacearea. I managed to create a new data collection with the area values using the duplicate component, creating a dataset with 8760 values for each surfacearea. But this does not scale well when working with many data collections (100 000 +). Is there any elegant way to multiply a singel value to a data collection?

Thanks! :slight_smile:

Hi @TK ,

Good question. The LB Arithmetic Operation component is likely to be your friend here. You can use it to multiply your data collections by a number (in this case the area of your surface). This should provide much better scaling than dumpling lots of data into the Grasshopper UI since all of the data management and multiplication will be done in Python.

Granted, this won’t change the units of the data collection, which I realize could be annoying for some cases. If this ends up being a pain point, I would definitely consider adding a new “LB Area Multiply” component that works as the inverse to the current LB Area Normalize component.

2 Likes

Thank you @chris!

Yes, an inverse to the LB Area Normalize component is what I am looking for. I did try to create a custom “surfacearea” data collection for the corensponding results, but this data still needs to be dublicated with 8760, which is somewhat timeconsuming. Also tested with monthly timestep, but it is not possible to do LB Arithmetic Operation with different time steps (month and hour).

I did check the source code for it, is there any definition for multimplication? :slight_smile:

Hi @TK ,

Ok, I’ll try to add a “LB Area Aggregate” component soon, which will be an inverse to the “LB Area Normalize” component.

I don’t understand what you mean by this:

The “Arithemetic Operation” component works with monthly data collections:

Here is the part of the code where multiplication is defined for data collections:

1 Like

Ok, it was easy enough for me to just add a component that does the area aggregation:

You should now be able to get it with the Versioner and the resulting component will perform the multiplication and the changing of units.

2 Likes

Outstadning @chris, thank you so much! My bad, I had some issues with my datatree structure. Everything is in order :slight_smile: Thanks again!