Hi @arten
Hereās a slight modification that should work better: kangaroo_Test2.gh (16.6 KB)
The strange behaviour you were seeing was because the Angle strength was a couple of orders of magnitude higher than the Length strength.
In general, for simulating something like bending of a thin rod, the axial stiffness (Length) needs to be higher than the bending resistance (Angle). If you think of bending as stretching on one side of the cross section and compression on the other, the amount of material deformation it takes to curve the rod is very small compared to the deformation involved in actually stretching the whole thing axially to change its length. So I donāt think you could ever have a material in real life that was this much harder to bend than it is to stretch.
Like the rest of Grasshopper, Kangaroo isnāt affected by the units of your Rhino doc. If you want to set forces in real life units, you just need to be consistent, so if your Rhino file is in m, your forces should be in N, and Youngās modulus in Pa (see also my reply here).
I donāt think this is relevant here though, since it seems this simulation doesnāt need to be based on actual known numerical strengths. So just choose what works for the effect you want. As a general rule of thumb, keep Length strength higher than Angle strength when simulating bending.
I added the length multiplier just to make it easier to start from the current length as the target length (by making the multiplier 1) and gradually increase it.
Making more subdivisions is tricky to do while the simulation is running. Generally if you want to change the number of particles and what they connect to during simulation it requires scripting.
Iāve also been playing a bit with simulation of liquid blobs:
and hereās an experiment I made with dynamically reconnecting them:
@DanielPiker
It looks AMAZING. It is basically what I was trying to get too. But I donāt want to copy your solution, I want to understand how it works.
My goal is to create a dynamic tool for bubble diagramsā¦ something like this
Hi @DanielPiker thank you for the example you gave I think I starting to understand how it works.
Can I ask a couple of questions:
What the difference between solvers ? Solver, Step Solver and Bouncy
Which one to use in what situation?
What show component does?
4.And most important is why interaction is so slow, or to be more precise why Rhino viewport do not respond while simulation is running?
And I canāt double click on a Boolean Toggle in Grasshopper, I have to click escape to be able to do it.
I have attached two videos with Solver (where rhino is not responding) and Step solver (where viewport works but one mouse click at a time)
Ok did a couple of simple tests just to see when Rhino and Grasshopper starts to have a problem.
With 10 lines starching with Kangaroo length everything works fine
With mesh stretch of 10by10 cells works fine
But as soon as I increase cells num to 25 everything just stops ((
Just to explain a bit better. It looks like while kangaroo is running a simulation rhino and Grasshopper viewports do not respond, only when simulation is finished Rhino and Grasshopper are back to normal. But a s soon as you change something and simulation kicks in all stops and the only way to get control back is to hit āescā multiple times to quite the simulation.
I have attached the video. Watching others simulation videos I think it is only Mac version problem.
@DanielPiker and @dan could you please take a look?
Maybe It just a system setting you have to change?
I hadnāt realised this was happening on Mac. I usually work in Windows, and had only tested smaller simulations on my Macbook. It looks like something strange is going on with the Kangaroo updates blocking Rhino/Grasshopper interaction. Weāll have to look into it. Thanks for the videos and letting us know.
To answer the other question about the different solvers:
āSolverā should usually be the first choice. It updates the output as it is automatically iterating, and tries to converge as fast as possible.
āBouncy Solverā also updates the output as it is automatically iterating, but particles have more momentum, so they bounce around more. This makes it slower to converge, and potentially less stable, but is sometimes preferred for the visual effect, and can make it easier to see what is happening when the regular solver converges too quickly.
āStep Solverā doesnāt iterate automatically like the others, it only takes a step and updates the output when the input updates. The main use for this is creating animations from a slider. If you connect a slider and use Grasshopperās built in animate slider function, it means it will capture one frame for each solver update, which will give a smoother animation than using a screen capture.
āZombie Solverā does all the iterations (either to convergence or reaching the max iterations limit set) before updating the output, so you only see the final result. This makes it behave more like a normal Grasshopper component, and can be useful if you want to include Kangaroo in another looping plugin like Galapagos.
Hi @DanielPiker,
How to slow down the simulation? I am doing a simple particles / gravity sim and it is very fast.
I tried to use Step solver, bout it looks like I doing something wrongā¦
btw watched your lecture at STRELKA , very interesting
Hi,
I was really hope to to use real world numbers?
Lowering the force only works with step solver, donāt understand why it doesnāt work the same way with simple solver?
Hi @arten,
Your simulation only has points falling under gravity, with nothing else resisting it or holding them together, so they will just fall straight down to infinity.
If you want them to be chained together, add Length goals between them. If you want them to hit the floor, add a Floor goal.
With the Bouncy solver and Step solver, you have an option called āIterationsā or āSubIterationsā, which control how many internal iterations the solver takes between updating the output. The default is 10, but if you reduce it to 1 the result will move more slowly.
As I said in my descriptions in my last post, the main intended use of the StepSolver is for slider animations, not interactive display like this. Here Iād normally use the Bouncy Solver.
The simple solver behaves differently because it is trying to reach the final equilibrium solution in as few iterations as possible, not to show the dynamics.
Also - I wrote a longer description of how Kangaroo deals with dynamics in this thread
Hi @DanielPiker Thank you. Everything is clear.
Sorry for so many questions, I found lots of tutorials on Kangaroo 1, but it is a bit different from version 2.