K2engineering with Zombie solver(K2)

Hello guys,
@DanielPiker @AndersDeleuran

I am working with the new released K2engineering. I would like to do some form-finding job by combining K2 engineering with Galapagos. However, I found that zombie solver cannot work with the beam component in K2 engineering.

Would you please help me with it?
Thank you so much and I really appreciated that.

This might be one for @c.brandtolsen actually, also uploading your files helps with figuring out what’s wrong.

Thanks, @AndersDeleuran for the instant reply!!!:smiley:
Sure, sure!
The GH file is here. I switch a part of the beam for a different crosssection for the purpose to get a bigger bending stiffness. The result from normal solver seems perfect. However, the result from the zombie solver has no effect on the beam.
K2engineering beam with Zombiesolver.gh (42.5 KB)

Hi, there. By any chance, if you guys have read this problem, would you mind to give me any suggestion or solution on it? I am really urgent to figure this out.
@AndersDeleuran @DanielPiker @c.brandtolsen
Thanks again.

I agree, that is a strange. If the threshold is set to the same for both the live solver and the zombie solver, then I have never experienced that they give different results for the same amount of iterations.
Generally I would set the threshold to 1e-15 for structural analysis but that doesn’t seem to solve it. I also tested the K2E 6 DOF beam example file to see if something had been changed in the zombie solver in the latest release but that seems to work just fine for both solvers. So I’m afraid I cannot answer your question.

Ah, alright, then maybe I have to give up the K2ENG and try K2, because I just test that the zombie solver works normal for the K2 in this same situation.

Thanks anyway for the reply.:slight_smile: @c.brandtolsen

Hello @c.brandtolsen, I tried the Customsolver from the example posted by @AndersDeleuran, it seems to work fine as a zombie solver in my situation.
However, the calculation is super slow even for only 5000 iterations. I guess it will be much faster by C#. I am a greenhand in C#. So if anybody can help me with C# or have some other solutions in python, it will be really helpful!

K2engineering beam with Zombiesolver1.gh (62.9 KB)

Great that it works with a scripted solver. I don’t think that a C# version of the scripted solver will improve the speed much. The 6 DOF beam goal can generally take some time to solve (to a converged level).

It looks like you’re working in just 2D. Are you interested in torsional behaviour of the beam? If not, could you use the bar/rod goal instead? It is a simpler way to simulate beam behaviour with 3 DOF. If you only care about bending in one plane that should be sufficient and quicker.

Can you upload copy/paste just that one component? It might be a really early/dumb implementation with an easy fix.

Edit: Here’s the latest one I could find on my laptop (from Advances in Architectural Geometry 2016):

160907_K2_GHPython_CustomSolvers_02.gh (18.7 KB)

It’s probably not gonna make much of a difference though, but it’s worth a shot. Also, in Rhino 6 GHPython I’ve been referencing the KangarooSolver.dll (that now ships with Grasshopper) like so:

import Grasshopper as gh
import clr

clr.AddReferenceToFileAndPath(gh.Folders.PluginFolder + "Components\KangarooSolver.dll")
import KangarooSolver as ks

ps = ks.PhysicalSystem()

Thanks for the suggestion!
It is true that 3DOF beam with bar/rod goal will be much quicker. However, I am doing a simplified version (for a quicker form feedback) of a very complex bending and torsion active strip structure here. The 2D model is just a start. With local torsion (Here I use the switch of the crosssection deminsion instead), the beam could have bending behavour in the Orthogonal plane as well:)

Thanks for the quick reply!
I just tried the scripted solver you post above. For some reason, it doesn’t work but destructs the model.:pensive:

You’ll need to upload your files, or at least a better screenshot :wink:

For what’s it worth, I extracted the GHPython zombie solver you were using. Pasted it into the file I posted above, and tested it against the zombie solver there. It’s about twice as slow, not entirely sure why. Would have to dig deeper.

I think you’re ultimately right though, a compiled C# solver is probably the way to go here. So perhaps figuring out why the standard K2 zombie solver isn’t working as expected with K2E and the 6DOF goal type is a primary concern.

Hi Anders,

I’m sorry I didn’t mention. Maybe you didn’t notice that I have uploaded the files above with the screen shot.:slight_smile:

But it doesn’t matter, I upload the file again here just in case.
K2engineering beam with Zombiesolver1.gh (61.9 KB)

Ah sorry, I meant your current file with the newer GHPython zombie solver implemented (that isn’t working for you). Afraid I can’t help further right now, as I do not have Rhino 6 or the new K2Engineering on my personal laptop (and I’m off on holiday from now :tropical_drink:).

Yes the file above is with the newer GHpython solver. Anyway, have a great holiday time!:slight_smile: