# Kangaroo basics

Daniel, I’m trying to put together a basic Kangaroo example to help students understand Hooke’s law.

I have a 2cm spring which should compress down to 0.468cm under a force of 7.379N
The lower end of the line is fixed with an anchor point.

I think I get the math, however I don’t understand the behaviour of Kangaroo in this situation. The resulting length is right, but it goes below the anchor point. It should be above.

Do I need to apply a load at the upper end of the curve? I’m confused.

Hi Martin,

In your definition it looks like there is no load applied, only a Length goal and an Anchor.
In this case the Strength parameter is actually irrelevant, since all the goals can be satisfied exactly with no conflict.
The relative strengths only really matter when you have goals fighting each other, as it controls in a precise way which one will be more satisfied.

A better example might be have one end fixed, and a load applied to the other end.
Like this:
spring_example.gh (10.2 KB)

3 Likes

Thanks for the clarification, Daniel. I’m still confused. Here’s what I tried:

As mentioned before, I’m trying to simulate a compression of a spring. This works as expected with a load up to 6.4N

Increasing the load to 6.5N, instead of compressing the spring further, it stretches beyond the anchor point.

In my example I want to compress a 2cm spring down to 0.468cm.

I’m working with centimeters and tolerance is set to 0.001

Hi Martin,

Is it clear now why an actual Load goal is needed, not just Length and Anchor?

Since the anchor is acting as a pin support, there’s nothing holding the spring in any particular orientation.
It has an unstable equilibrium position (compressed), and a stable one (flipped round and stretched).
These are both valid equilibrium solutions, and since the first one is unstable, small changes could cause the solver to converge on the second one.
The system you are simulating is a rod balancing on a single point, with an extremely heavy load (relative to the strength of the rod) being suddenly applied on its end. In reality I think this system would always end up in the stretched solution.

1 Like

Thanks Daniel, your explanation makes sense

And it works