Creating a loop with a solver (Grasshopper/Topos)

Hello all,

I’m trying to create a structural topology optimization. I’m using Topos to do this, but Topos optimizes with regards to the volume fraction and I need to optimize with regards to Von Mises. Therefore I want to change the volume fraction depending on the resulting Von Mises (topos gives von mises values).
This means that I need to create a loop in which a starting volume fraction is changed and dependent on the Von mises that the solver gives. I’ve tried to use Hoopsnake to do this, but I’m stuck on getting it to function.

I’m also trying to make the boolean that “starts” the simulation a boolean which is dependent on Von mises, as I want it to keep running iterations automatically until I have a structure with an acceptable Von mises value.

New to Grasshopper so any tips and suggested plug-ins are welcome!

Topology opt.gh (40.9 KB)

Found out that Hoopsnake only works with an outdated Addition/substraction component. For anyone who is having problems using Hoopsnake.
image

1 Like

Thanks, I’ll give it a go

Hi Michael,

So I fiddled a bit with it and I think using Anemone is the right path! However, when I’m trying to create my loop, the solver only runs once and then gives the error message: “Solution exception: Object reference not set to an instance of an object.”

Any ideas on where I’ve made a mistake?

Big thanks for suggesting Anemone!

Topology opt.gh (3.8 MB)

Hey there, interesting stuff here !

I just had a look in your definition and I spotted a small mistake (anemone-wise) in the D1 input (for the end loop component)… You should connect the topos model there I suppose. Otherwise the topos solver would recieve a value instead of a topo model at the anemone iteration 2.

But sadly it doesn’t fix the error message. I think it’s more related to topos not liking to see an updated model into its solver… But I’m certainly not an expert with that plugin !

Topology opt (1).gh (3.8 MB)

Thanks for noticing that, Antoine! And yes I also think it’s interesting, sadly, it would be a lot more interesting if it worked