Grasshopper

algorithmic modeling for Rhino

I'm wondering if there is a way to get actual force numbers out of kangaroo for individual springs. I have a model of a hanging fabric, for instance, and once it settles into its final shape, I'd like to know the actual tension on the suspending "cables" (which are modeled in Kangaroo as stiff springs).

 

Is there a way to get an actual number like that from the output?

 

Apologies if this is simple and I just can't see it yet.

 

Dave

Views: 12927

Replies to This Discussion

The springs behave like..... springs! So they obey the relationship F = kx (Force = stiffness x extension). The way i've got forces out before is by finding the extension of each of the springs (Final length - initial length) and multiplying by the stiffnesses that were used for the Kangaroo input. To get true forces you have to remember to be consistent with your units (length, stiffness) through the model.

Another handy thing, i've found, is to connect the forces up to the Colour Gradient tool and then into the Custom Geometry preview tool. On some models I've also connected the forces to pipes that are then fitted to the geometry. If you scale the forces and use them as the radius input for the pipes then you can get a visual, real time force output where the pipes, overlaid on the springs, get bigger and change colour as the forces increase.

Here's an example of what Nick describes.

You can colour lines with a custom preview tool for feedback while the simulation is running. I find pipes are generally too slow to render while it is 'live' but can be switched on once equilibrium is reached.

Attachments:

I have a question regarding the stress colors mapping. I am trying to do something similar to this with a mesh. I would like to find a way to map the stresses throughout my mesh but when I try and apply this technique with the color gradient tool and custom geometry my whole mesh changes to just one color. I am using the weaverbird's mesh edges rather than a curve for my length but it's still reading it all as one. Is there any suggestions you could give me for analyzing a mesh's stresses? 

Attachments:

On a similar topic, has anyone managed to create a feedback loop in Kangaroo so that you use the forces to alter the input? What i'm thinking is that you calculate the forces at the output and then use that to change the spring stiffnesses at the input. This would mean that you could get it to optimise member sizes as it runs and would allow you to do some really interesting things. I haven't spent much time investigating it but when i've tried it before Kangaroo has got upset about me connecting input and output data.

I wonder whether there is a way of gating the data back to the input via a timer so that the input and output are never directly connected. Or is it something that would be easy to incorporate into a future version of Kangaroo?

This is indeed a really interesting topic, and one I'd like to explore further.

 

Although people have used some of the various other structural solvers that have now come along to Grasshopper for stress based member sizing etc, one issue that is often not addressed is that if you change the structure based on its stresses, its behaviour then changes and so do the stresses. So it really needs an iterative process.

 

However, it is not just Kangaroo that gets upset about you connecting input and output data - this is a limitation of the whole of Grasshopper. You can sort of work around this by reading and writing to an external data file with the timer, but it is far from ideal.

For now iteration (like the solver of Kangaroo) can only really happen within scripted components. (or through Galapagos -which has some interesting potential here, and I will post some more examples of linking it to Kangaroo soon, but I don't think it is really the ideal optimization technique to use for this in terms of speed and efficiency).

 

I am looking at ways of introducing more elements into Kangaroo which could actually adjust themselves to better deal with forces - not just be deformed by them.


Catenary structures are one very specific example of this, where the neat trick of flipping gravity means that deformation by loads in one orientation corresponds to better configuration for dealing with them in the opposite orientation.

However I am convinced that there are many more such 'tricks' waiting to be discovered that could be applied to much more general structures. The inspirational image I keep coming back to here is that of trabecular bone and the way its structure grows most where needed, ending up following principal stress trajectories:

One simple approach is to start with a dense mesh of members and iteratively remove the least stressed ones (See DR for frames on John Harding's old blog for an example of what I'm talking about), and this is certainly something I could try writing into Kangaroo as an option.

 

But I think there are more powerful approaches where rather than just adding/removing members, the existing members actively adjust their geometry (and ideally topology as well at the same time, though that's maybe a discussion for another time).

I'm still figuring all this out, and I'd be very interested to hear anyone's ideas about how such general methods might work.

 

I had a look at ways of iterating the stiffness this week. You can write to files by streaming the data from the yellow text boxes then read the data back in using the read file component. However, like you say, this seems like a slow way of doing it. I downloaded Ghowl and found the UDP component can transfer data from the Kangaroo output to the input directly every timer step without any problems.

 

What i have been trying to achieve is constant stress in all members. I've been doing this by checking the force at the end of each kangaroo iteration then using a particular stress (that i have inputted in the first place) to calculate the required area of each member. This area then gets fed back the the start using the GHowl UDP link to update the spring stiffnesses for the next iteration.  I would post my file but it apears I seem to be getting some kind of positive feedback and it is unstable as soon as i connect the UDP link. Will post any updates.

 

I don't see why this system couldn't be used for the stress based removal/ addition of members that you're talking about above. You would have to allow Kangaroo to perform several iterations to achieve a stable form before it added or removed members........ in fact maybe thats what i need to do to sort out my problem above.... hmmmm 

 

I also agree that from the different optimisation programs that i've seen/ used, that rely on the addition/ removal of material, they often seem a bit hit and miss as to whether they really get to the 'optimal solution'. You quite oftern have to give them a fairly healthy push in the right direction to achieve what you expect to be the optimal solution..... and i'm not sure that really counts!

Thanks for the input.

That's very interesting to know that it is working with the gHowl iteration like that.

I just posted some demo files on our SmartGeometry cluster site that show how to perform many iterations at one go as you describe:

http://smartgeometry.org/index.php?option=com_community&view=gr...

I also posted there an example of linking this to Galapagos - which is something I'd been meaning to explore more for ages. I've not tried it yet with anything more interesting than adjusting the depth of a truss to minimize total displacement, but I think there's a lot more that could be done.

Yes, I've seen the trick to getting Kangaroo to talk to Galapagos before. I was shown it by James Solly a while ago, who i'm sure was probably pointed in the rght direction by you! Here's a file i posted where i was trying to optimise a mast geometry based on a few variables (using ye olde Kangaroo). http://www.grasshopper3d.com/forum/topics/kangaroo-and-galapagos?xg... I had actually already done a parametric sensitivity study in Excel for the system and was using this as a test of Kangaroo/ Galapagos. It came out with a similar answer, which is reasuring.

 

I see Galapagos as being useful for exactly this sort of problem. Finding an optimal solution (displacement, energy, stress) for a limited number of input variables. Where you are looking at something more complicated, like where you want to vary the input properties or position of every member, then i think you need an iterative solution. Galapagos would take forever to solve it for you.

 

However, i can see potential for simplifying large models down to a handful of variables and leaving Galapagos to find a host of different solutions for you depending on your fitness criteria. The stiffest, the most material efficient, the most compact, the most uniform........

Ah yes, I remember that example you posted now. Nice to hear it matched an answer found by a different method.

I agree about the types of problems suited to GAs, and while there is much more that could be done with them there are also many optimization problems where other techniques seem better suited.

 

For actually iterating the positions of all the nodes of a structure to optimize it, I've been thinking about whether there would be a sensible way to move the points based on stresses.

Of course the regular dynamic simulation mode is moving each of the points based on the sum of all forces acting on them, and if the structure is not moving then they sum to zero, but I'm thinking what other options there might be that would allow you to go beyond just finding this equilibrium and start moving particles into positions where they take forces more directly.

Maybe if one were to look at the tension and compression separately...

At the moment all the forces acting on a particle are calculated and added together as vectors, with no distinction between whether they were generated by a compressed or stretched spring, but perhaps by separating them one could somehow get the nodes to move so that members ended up aligning with principal stress directions...

(I'm imagining something that given the right starting topology could find its own way to the geometry of a solution like the one on page 30 of this paper: http://aerade.cranfield.ac.uk/ara/arc/rm/3303.pdf)

Or maybe there's an even simpler way, to do with just reversing something about how particles react to forces.

It's all a bit vague at the moment, but I feel like there is some sort of very simple yet powerful approach in there somewhere.

That's going to take some reading! I've never seen that method before, and i've certainly never seen it used before. It must have been quite 'out there' in 1962. His structures look very organic, which certainly can't be said of a lot of stuff that came out of the engineering industry in the 60's!

I went to a lecture by a guy called Cengiz Toklu a couple of years ago. He presented the attached paper for his own structural optimization method based on potential energy minimisation. He was proposing using a GA based approach to finding an optimum shape for a structure with a given set of loads. This involved a GA 'Local search' method where each node was displaced (slightly arbitrarily) until an overall mimimum energy solution was found. He intended this to be used as a quick and easy (?) non linear analysis method.

Having just spent some time working on a basic DR solver I thought this seemed like a very backwards way of finding forces/displacements in a structure as he had no real way of knowing whether he had actually found a global or a local solution (the usual GA problem) and didn't have any real direction to the optimisation other than running numerous solutions and comparing 'fitness'. He hadn't heard of DR but didn't think it would rival his method for flexibility when i explained it! The fantastic thing about DR is it's flexibility for non linear situations and it's ability to find a solution for almost anything.

Anyway, it goes to show that there are always more ways to come to the same solution and with these computationally heavy methods you never really know whether the next idea will be much better or worse until you try it out.

I can see what you mean about finding a different way of summing forces or 'steering' nodes. It seems like there should be some way of pointing the nodes in the right direction without GA guesswork but i'm not sure it's necessarily to do with weighting the tension/ compression components. I've no idea how optimal Michell's structures actually are but if you look at them they rely as much on the compression elements as they do on the tension elements. Any weighting system would be unlikely to achieve a symetrical form like he shows.

I'm enjoying this discussion. Thanks for the replies.

Attachments:

I can't find alot of information involving the calculations involving stiffness. Standard value is around 1000 (units?.

However I'm trying to analyse the structure as correct as possible in kangaroo/grasshopper to see difference between Finte Element Methodes (ANSYS,etc). My question is how is stiffness defined of a truss element ? Stiffness is sometimes linked to A * E / L. With A the working surface (units?m²?) of the truss, E the eleasticity modulus (units?N/m²) and L the original length (m?).

Is this a correct assumption ? what is your vision about the stiffness ?

Kind regards

Carlo

 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service