Water Flow on Surface

Try this one:

among the examples there’s one particle gun, you can use it direct it top-down on your roof and you will see how much particles are falling from your roof and from which side.

1 Like

I have already done this part and yeah even with flexhopper. The point is to represent the liters of water (given the amount of rain fall for a given location) at the point where the flow curves exit the surface. And I want to represent them with vectors. So if we have 10 liters of water, the vector at that point will be 10 meters long. That’s more or less what I miss.

Thank you! You are awesome to me as always. To be clear, I don’t want you to do my work for me. Just point me at a right direction.

you can bake the particles in FlexHopper in real time. simply place as many collectors as you want (to designate the arrows). Then count the points in each collector, divide by the number of collectors and you’ll have a ratio to define the length of the arrows.

1 Like

That could work…

Not sure if this is helpful, but might inspire some ideas:

I recently re-wrote a simple “particle descending down a surface/mesh drainage”-type script (that looks like a similar approach to your first example) for use on a project, and extended it with what is essentially a heat map visualisation of the drain polylines density (second image in the Instagram post):

I basically snap the drainage polyline vertices to the nearest face center in the heat map mesh, and then count how many points are at each face (i.e. how many drain paths flowed through it). Obviously this doesn’t take volume, physics etc into account, but might still be used to differentiate between places of high and low runoff (though in my case, the particles doesn’t actually flow off the terrain, need to add that come to think of it).

My colleague is currently working on implementing the Catchment Modelling Framework within Grasshopper/GHPython. So hopefully there’ll soon be some physically accurate hydrological models as well (I believe this will be made open to the public).


If the mesh vertices are not homogenously distributed will this impact the final result?

(btw this picture is creepy :slight_smile: )

First sort of working test. Still plenty of bugs left, but it’s getting time for me to go home.

The colour in the image is just a straight map from mesh face index into RGB, and since the mesh is fairly small it only shows blue colours.


The mesh (or surface) used for the flow/drainage stage is independent of the heat map analysis/visualisation stage, but of course the two will have to be fairly geometrically close (locally/spatially) in order to be meaningful.


@AndersDeleuran why I am not surprised that any trouble I face, you already have dealth with and discovered a range of solutions :smiley: I imagine working with you is quite the trip. Always a pleasure hear what you have to say and show :slight_smile: Thank you!

1 Like

I had no idea you can achieve it using a method like that. Trying it ASAP! Thank you David!

@davidsmavrov, what was the result with the particles from FlexHopper, I wonder?

Not much different from what I get with the other sollutions. The problem with the direction is solvable. It doesn’t really matter all that much which tool I will use. What I am stuck at is the actual amount of water I will get at a certain rain fall. Then I use a solution very similar to your first post to calculate the pipes needed.

1 Like

Actually at this stage this idea turns out to be pretty clever. No matter which solution one choses to use for the flow paths, their end points tend to collect at the same locations. All one needs to do after that is use Cull Duplicates component, to cull the duplicate points, count the number via the Valance output, then calculate what % of the total amount of points is this. And yeah… pretty neat way to estemate the amount of water you will have at a given collector. Thanks man. For now this works very well :slight_smile:

1 Like

I worked on a project that dealt with this question at the landscape scale. It was called EpiFlow Link to project brief.

The primary metric of concern was peak flow calculated by the “Rational Method” to help size green infrastructure, and predict the impact of development on site hydrology. In that case we spent more time thinking about integrating runoff coefficients and storm size/duration in order to inform storm volumes, but getting the area of the watersheds is a simpler operation.

We aggregated mesh faces that had their flow path terminated in the same location. Using a method like this could tell you drainage area for each of your gutters.


Amazing! Thank you for sharing! Can’t wait till the weekend so I can have a good look at this!

Is what you’ve done here with the RGB index possible with current GH Components?

I’m after a simple colour map showing gradients across a roof? to see where water might pool? I was thinking simply linking the normal vector of a sampled point to a colour map?

What is the simplest way you can see to do this with GH - or even Rhino?

I can see the potential for water volume being calculated - as you say, by following the flow and adding up all the water per minute / or per second multiplied by the volume overall across the entire roof. That would be a very powerful tool for roofing even in this simplistic approach - that would be adequate for validation.

Not really, creating bitmaps is impossible without some scripting or plugin. You can create coloured meshes in vanilla grasshopper, but that’s about it.

Still, creating bitmaps by setting pixels is not that hard in C#, it’s the geometric part of the algorithm which takes up all the code.

Theres a recent development by DTU about stormwater runoff simulation. https://github.com/livestock3d/livestock

1 Like

That sim even takes time into account, nice.

And they have tests and a code of conduct, I’m very impressed.