Grasshopper

algorithmic modeling for Rhino

Okay! I shall try to as clear as I can.

I m doing an " Academic" project in the hills of Himalayas; it is a two-phase project:

Phase 1

where I would like to generate barriers, obstructing the water drain routes and optimize the size and shape according to the intensity of these hydrological flows

Phase 2

and then produce building morphology around them through a genetic algorithm that works on sun path and other spatial criteria's.

So my question is, for Phase 1, Besides the usual drain layout simulation over surface and slope gradient analysis. How can I generate a flooding model that takes barriers into account ( that means water is striking walls and changing direction; getting collecting in the corners etc., ), and how can I get force vectors from these flows, that I can use to optimize the size and shape of these barriers.

The problem is that I don't want to be trapped in the CFD world because there is no way ( that I know of) where I can like Ansys or any other CFD software with grasshopper.

Any light on this topic would be appreciated.

Cheers,

Mr A.

Views: 7558

Replies to This Discussion

Well I have a bunch of C# (BTW: are you familiar with that thing?) that do a "similar" job ... working either:

  • on meshes(taken "as they are").
  • or breps
  • or breps converted to meshes (user controls Meshing Parameters) ...

but they are not fast(*) (Rhino is rather very slow in anything that classifies as "solid") and ... the fastest bunny (minimal mesh: ~ 10 times faster than the equivalent Brep "option") fails frequently (accuracy) meaning that you need to raise the mesh "resolution" ... and thus achieving a marginal benefit VS the Brep approach (In plain English: a typical Catch 22 case).

(*) recursion - if required: max reservoir etc etc - is rather problematic (takes ages to finish)

BTW: Minimal mesh fails (accuracy) when this goes into a doughnut (by raising the pocket depth) and you'll need to raise the depth a little bit more  in order to obtain a solution. That makes recursion a handful since you'll need to check some steps further on (say 2 to 10) in order to decide if it's time to reduce the depth (using a smaller step) and then raise it (using an even smaller step) ... blah, blah.

Hi Peter

I appreciate the prompt and detailed response. Firstly No I'm not that familiar with C# ( but willing to learn, I have a couple of months to do so). Secondly, yes I am aware how difficult t is to convert a brep/poly surface into a mesh, and making sure its water tight is super crazy.

I would like to use your scripts in recursion with a genetic algorithm that would construct my walls ( possibly Karamba), and the fitness criteria's like volume of water and forces would be altering calculated and plugged into Octopus for creating recursive solutions. I do have high spec machines in school; I could run the algorithm for days there(not a issue). But the idea is to understand the where the water is traveling by how much and what force, (in your script) is there an option where soil parameters can be added, like absorption rate, can I also control the amount of water coming from rain above, etc.?)

Thanks Peter

Hmm ...

1. Using a CRAY for addressing something it doesn't actually address the problem (in the vast majority of cases - excluding going to Mars): it's just an indication that either smarter code is required and/or // processing and/or (most probably) ... another CAD platform.

2. Since all my stuff is in C# ... what actually you can do with these? (at present phase). If on the other hand you have plans to master via code the mysterious recursion (something calls itself until Armageddon happens and the computer explodes) I could provide several "simple" C# demos on that matter ... but even so you'll need prior some knowledge of the Dark Side.

3. My little sister got a PhD recently on that reservoir design thingy  (The idiot wrote the code but she forgot to mention me - just a smallish mistake, I guess). She did that thesis because I told her that WW3 is gonna happen due to shortage of water (masses soon will be informed on that little detail).

4. Doing all that in real-life is VERY complex especially with regard the dam(s) and especially if they are made using soil instead of concrete. Rhino is not recommended at all since is a surface modeller meaning that a proper solid modeller eats it for breakfast on solid ops/matters (each one on his own game, you know).

5. That said the whole approach in real-life is subject to classic cost-VS-benefit filtering (thus you'll need some BIM umbrella : sister used my favorite [AECOSim] and Generative Components [my primary parametric thingy]).

Anyway ... let me see what I could provide for a start (since some stuff is classified as internal, including the code for that ungrateful girl).  

Okay, I understand what you are saying. I could use a different software for the CFD, but the problem is the transfer of data between various platforms. Since grasshopper is the only parametric software that I know and have a fair control over; I shall you the same for my thesis. I will try get and as much knowledge about the "Dark" side in these four months.

1. For the project, I am not looking at dam breakage or anything that complex. The conditions in the Himalayas are simple, lack of water with occasional cloudbursts here and there. I want to use this cloudburst to my advantage and collect as much water coming down from the steep slope. The problem is that this brings with it a lot of debris. So first I need to build structures to stop the debris flow. I can work with drainage lines with that, but I would need force and volume of water ( for which, I would need to write a script or something else perhaps ( i don't know yet). 

2. The second part is creating morphology for my buildings that would be controlled through simple packing algorithms with conditions of overlaps etc. 

3. This whole setup would be optimized with certain fitness criteria's inside Octopus (evolutionary solver).

Hope the mystery is somewhat clear now. I shall elucidate more ( after I become clearer myself).

I sincerely appreciate your interest and help Peter

Warm Regards,

Mr. A.

Hmm ^ Hmm ...

1. Debris is the least of your concerns ... since it's always advisable (regardless of the Academic aroma [or plaque]) to think things within the real-life perspective: I mean dollars, that is. Anything attempted/made in this ^#$^$# world it's done because it can prove (with a dose of lies) that has some profit on sight (even Paris Hilton did some feasibility study for her involvement in ...er ... hmm... Moto2 racing (Yikes !!!!)).

2. Packing algos ? Mama mia > As you know these are the golden boys these days ... where blob design rains supreme > thus "cheapo" titanium "random" facade panels > ... > min wasted material >  blah, blah. I seriously doubt that you can find anything ... er... realistic out there.

3. To encourage you: I have 4567 C# defs. Despite that it took me 2 months for the thingy required for that ungrateful girl (Mom/Dad said: why moaning so much? had you something better to do? [fair point if we forget the practice of mine]). Sister is back 2 *30 * 4 (min) * 300 E/hour (ultra friendly price) = enough to get a decent NCR Ducati.

All in all: Hercules comes in mind (or Sisyphus).

BTW: Hope that you know this classic old but good thingy (requires Anemone).

Until the Dark Side absorbs you, that is

 I mean this:

Attachments:

Thanks, Peter checking it now.

I'm sure the Dark side is coming my way!

Warm regards,

Mr. A.

BTW:

The bible PlanA: C# In depth (Jon Skeet).
The bible PlanB: C# Step by step (John Sharp).
The bible PlanC: C# 5.0 (J/B Albahari) > my favorite

The reference: C# Language specs  ECMA-334

Also:

C# Fundamentals (Nakov/Kolev & Co)
C# Head First (Stellman/Greene)
C# Language (Jones)

Just about linking programs, you mentioned "Ansys" at the beginning:

http://www.grasshopper3d.com/video/grasshopper-ansys-interface?xg_s...

This said you might be interested in a project done by students of peter trummer in 2006, unfotrunatly I coulnd't find anything in detail only this image (don't know how fare that helps):

Had some similar ideas, but in the desert of new mexico (or so...)

However, I guess if you would like to use fluid dynamics with galapagoss or octopus, you will need to make a really simplified model precise enough to give you correct results but as fast as possible. 

Commands on a simple Model:

1.) If you can work with drainage lines, why not populate the area with starting points, generate drainage lines, and count these. This would give you a direction + a "volume" -> force

2.) You could use a cellular automata based approch, like the one described by Stephen Wolfram in "A New Kind of Science", this should also give you the possibility to get volume and force of the water, plus it would also take into account the influence of water already running down the hill on newly added water...

3.) You could mesh your surface (grid) and assume that water always runs down, then you could use simple graph algorithms to compute the volume + more or less the direction of the flow... . (SpiderWeb)

 http://www.gbl.tuwien.ac.at/Archiv/digital.html?name=SpiderWeb

Whatever model you choose I think it is more a question of what you need it for, if you are trying to develop an architectural concept the precision of the water analysis of a CFD software is most likely irrelevant.

Hi, Richard!

This seems really exciting, although my inspirations are a bit different but on the same lines. The three approaches you elucidated( i just know two of them), will be reading more about the approach by Stephen. Are there any algorithms that can give me the force and volume through graph theory approach or through drainage lines. Drainage lines I can manage with a simple algorithm to find the steepest slope in the cell and move towards, but how to go about volume and force is something I m clueless about. 

As far as spiderWeb goes, I used in my previous term, for visual and shortest route analysis etc; no idea how to use these for this purpose. If you could be kind enough to exemplify.

Thanks a lot for the comment, I shall read up more on cellular automata.

Warm regards,

Mr. A.

Hi,

you can download some old examples from:

http://www.gbl.tuwien.ac.at/Archiv/digital.html?name=SpiderWeb_3.2

if you have used spiderweb before it shouldn't be a problem replacing the old components with the new...

Main idea is to rebuild the graph in such a way that it only contains edges which have a negativ z-direction and than search the graph from each point. this will give you the catchment are for water -> volume direction is the steepest slope at the position (more or less correct...)

@gradiant descent: not as simple please read Andres link + discussion there. but the idea is to make a grid on the surface and count the number of lines running through -> volume and the direction is again the average of directions of the lines.

However this doesn't take into account the momentum of the water, hence pointing at the cellular automata solution, which could be very interesting, however in need for adaptation and therefore not trivial.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service