# Flooding level simulation

Hi all,

I had tried to simulate the flooding disaster using Kangaroo. But when I search about flooding simulation on Youtube. I found an amazing video about flooding simulation. Hence, I want to ask if there is any idea to achieve this result. (The flooding level can be controlled in gh to check the water level.)

Also, I attach a model including terrain and buildings, in which you can see the river is surrounding the buildings. Let’s discuss this incredible job.

1029_Terrain_City - flooding test - forum.3dm (5.9 MB)

Best,
-HC

2 Likes

That image is from an old video by @fraguada

I don’t think you would want to simulate fluid with particles at all for something at this scale, instead just use intersections with the landscape
1 Like

Hi @DanielPiker,

Yes. This is very old. I think it is possible to color the landscape with different height. Let’s say I extract the contour line of the terrain and then color it with for different height. That’s what I did in GIS software but I am barely new to grasshopper and kind of confusing how to do it in Rhino.

Also, I am wondering how to simulate the flooding with not only considering the sea level but also other factors (retention, etc).

In addition, I am learning to use the Kangaroo solver and it works great for simulating water particles so far. But if I want to handle an urban scale flooding simulation, Kangaroo solver may not be the best answer.

Best,
-HC

@DanielPiker

What I want to simulate with Rhino and Grasshopper (simulate different water-levels with the same terrain). But I have no idea how to do it. Appreciate if there is any idea.

Best,
-HC

It’s pretty much what he said. Set up a horizontal plane at the water elevation you want to simulate, then intersect that plane with the geometry. This gives you the outlines of the flooding region.

Although given the images you posted there will be some extra work involved creating a closed region out of those intersection curves. Which is why it’s important that you explain exactly what sort of outcome you’re looking for. Do you just need an image showing flooding zones? Do you need closed outline regions? Volumes? Areas? And if so, to what sort of accuracy?

1 Like

Here’s a way to provide a visual effect using a vertically moving plane:
flooding.gh (8.2 KB)
1029_Terrain_City.3dm (6.0 MB)

2 Likes

Hi @DavidRutten,

Thanks for the fast response. I want to test the outcome of mitigation plans. For instance, the ground level behind the dam is lower. But after the dam had been built, can the dam stop the water (like the figure below).

If the outcome can evaluate the risk level for different buildings would be great. (maybe color the building with different amount of intersect area?) At this moment, the accuracy could be not very precise that I think only consider the height of water-level is good enough.

(Using the tidal & river flooding simulation to evaluate the outcome of an open dam for the same water level)

Best,
-HC

Are the house shapes important in this scheme, or is it just a single landscape mesh that matters?

Yes, the house shape will be important due to I would like to evaluate the flooding risk in the planning stage. (Could include different shapes in the master plan.)

But do they affect the water flow behaviour? I imagine a house is a lot less reliable as a flooding barrier than an actual dike or dam, and as such ought not be taken into account in the simulation.

What I’m thinking is; it might make sense to convert the landscape mesh into a pixel-height-map, then run the simulation as a sort of bucket-fill algorithm. Each pixel has a colour which translates to a specific elevation, and you assign one or more starting pixels and from there keep colouring adjacent pixels BLUE if they are below the target elevation. That way you’ll only end up with those regions which are below the water level, and connected to your water influx coordinates.

It’s a strictly 2D algorithm though, using bitmaps, so Grasshopper may not be the greatest platform for this. Still, definitely do-able with some custom code. Don’t expect it to be fast though.

2 Likes

Yes, you are right. The building will not affect the water flow in the simulation. Just use to evaluate how serious the flooding risk of different proposal. My idea is the buildings are for quantifying the water resiliency of the master plan.

Okay let’s wade across that submerged bridge when we get to it. First order of business is to find the areas or possibly outlines of the flooded regions.

I am not sure if there is any flood simulation software for Rhino. I had tried one plug-in in InfraWorks but I think do it in Rhino would be more flexible to define different parameters (soil absorption, etc)

There is an existing water area in my terrain. I assume it will flood in the future due to the climate change.

Maybe this is a stupid question. Is it possible to open Rhino 7 file in Rhino 6?

Quick and dirty pixel-based approach. The code is not really usable yet, but I think it proves the concept.
I have to go home now though, it’s my turn to make dinner today…

FloodingAnalysis.gh (10.6 KB)
1029_Terrain_City.3dm (6.0 MB)

ps. to make it work on your machine… find this line in the code:

``````_map.Save("C:\\Users\\David\\Desktop\\Screen Recordings\\Flooded.png");
``````

and replace it with a path which is valid on your computer.

2 Likes

No.

2 Likes

Hi @DavidRutten,

Hope you enjoyed the dinner. I am testing the code now. Thanks!

-HC

The outcome is weird. Please have a look. However, it is amazing to make it possible in a short time!!

PS. I am testing the code with Rhino 6