Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  What things are possible for Cable Simulation
#1
Hi all Sonrisa

I've got a few questions regarding some possibilities and things that are not entirely clear to me.
Let me start by explaining the base of our scene:
-------------------------------------------------------------
- We are trying to simulate a cable that's hanging in a crane and moves from point A to point B. 
- The cable has a max length of 190m
- The cable has a min bending diameter of 1.2m
- The cable has a bundled mass of 288 kg/m
-------------------------------------------------------------
I've created the base scene and the cable is attached to a base shape that should act as the starting point of the cable (ObiAttachment) and the end of the cable is attached to its dedicated object (ObiAttachment)
In between this long cable there are support saddles where the cable will rest on, so there is some slack in the cable during the movements. 
At first I made ObiAttachments on these saddles, but after some testing I don't think this will give a good representation of the cable as it will always be pinned to it. 
I'm also not sure how to make sure the minimum bending diameter of the cable is 1.2m, is there any way to control this?

Is there a way we can incorporate the mass of the cable in ObiRope?
I see that we can appoint a mass to each control point of the rope but what does this exactly mean?
If I'm correct, mass in Unity is in kilo's. So if the control points mass is set to 288, does the cable behave as it actually would?

Is there a way to determine the length of a section of the rope?
For instance the part from start to the first saddle, this would be very helpful to the team.
Mabey this is possible if the Saddles are actual control points as well? then there's a reference from point a to b?


Using Unity as a tool for this work is new to us, as you can probably see based on my questions haha. 
But we see good value in it, if we can understand a bit better how to use it for these kinds of situations. 

Thank you in advance for your reply and if you need any additional information please let me know Sonrisa

Kind regards
Reply
#2
(22-12-2022, 04:12 PM)5G_Zendmast Wrote: Hi all Sonrisa

I've got a few questions regarding some possibilities and things that are not entirely clear to me.
Let me start by explaining the base of our scene:
-------------------------------------------------------------
- We are trying to simulate a cable that's hanging in a crane and moves from point A to point B. 

Hi there!

Right off the bat, using a particle-based engine to simulate a 190 meters long cable might not be a good idea, depending on how fine you require the discretization to be. Say you want one particle each 10 cm, that's 1900 particles chained together by distance constraints, which will require a very small timestep if you want some guaranteed maximum stretching threshold.


(22-12-2022, 04:12 PM)5G_Zendmast Wrote: I'm also not sure how to make sure the minimum bending diameter of the cable is 1.2m, is there any way to control this?

You can't directly specify the bending diameter. You can however specify the maximum bending distance for each bend constraint, see:
http://obi.virtualmethodstudio.com/manua...aints.html

It's possible to calculate the bending distance for any given bending diameter: given the rope blueprint's resolution, calculate amount of particles per unit length, and then given the perimeter of the bending diameter, calculate the arc length of 3 particles and bending distance as the distance from the middle of the chord length to the middle particle (hope that made some sense! if not, I can elaborate further)

Note Obi is primarily designed for games, not for engineering solutions, so parameters are often unitless or expressed in a way that's most intuitive for users to understand.

(22-12-2022, 04:12 PM)5G_Zendmast Wrote: Is there a way we can incorporate the mass of the cable in ObiRope?
I see that we can appoint a mass to each control point of the rope but what does this exactly mean?

That's the mass of that control point. Mass values are interpolated across the rope to each individual particle, just like all other properties: thickness, color, etc. This means that if you have a rope with 10 particles in it and all control points have a mass of 280 kg, the total mass of the rope is 280 x 10 = 2800 kg.

(22-12-2022, 04:12 PM)5G_Zendmast Wrote: If I'm correct, mass in Unity is in kilo's.

Correct.

(22-12-2022, 04:12 PM)5G_Zendmast Wrote: So if the control points mass is set to 288, does the cable behave as it actually would?

The mass of an isolated object doesn't affect its behavior in any way, it only affects its behavior when colliding with other objects and how strongly it reacts to external forces. So the cable will behave in exactly the same way regardless of its mass both in the real world as well as any simulation, assuming mass distribution is uniform (that is, all control points have the same mass).

Only when the cable collides against another dynamic object (rigidbody or cable), the mass ratio between both objects determines the result of that collision: heavier object are less affected by collisions against objects lighter than them.

(22-12-2022, 04:12 PM)5G_Zendmast Wrote: Is there a way to determine the length of a section of the rope?
For instance the part from start to the first saddle, this would be very helpful to the team.
Mabey this is possible if the Saddles are actual control points as well? then there's a reference from point a to b?

I'm not entirely sure how the saddles you refer to should work, could you explain a bit more about how they should behave? are these like colliders that the rope should rest/slide on top of?

Using the built-in functions, you can only calculate the length of the entire rope. If you want to calculate the length of a particular section, you first need a way to determine the start/end points of the section. Then, calculate the length of all rope elements between them.


(22-12-2022, 04:12 PM)5G_Zendmast Wrote: Using Unity as a tool for this work is new to us, as you can probably see based on my questions haha. 
But we see good value in it, if we can understand a bit better how to use it for these kinds of situations. 

No worries! rope/cable simulation is actually a quite advanced use case despite how simple it might look at first and if you're new to Unity, all the more reason for it to be a challenge. Let me know if I can be of any help,

kind regards
Reply
#3
Hi Jose, 

Thanks for your quick and extensive reply, much appreciated! Sonrisa
Reading your reply I feel like we have to adjust our expectations of how to use Unity for engineering solutions indeed.

The initial request of the team was to visualize how the cable would swing around certain equipment in the area to check if the max available length of the cable would be sufficient.
But engineers being engineers, a ton of additional information of the cable got shared and requested to be incorporated haha.

I did this by roughly drawing the cables-path with the EditPath, and creating some slack in areas where I want it to be.
Since I don't exactly know how the cable will behave (stretching/compressing) I thought the following would be sufficient to visualize if the length would be okay:
• Draw a cable path with slack in it
• Try to disable any stretching/compression
• Animate the rotation of the crane
• Visually check if the slack (created in its resting position) is enough to bridge the distance of the crane moving.

To check how this movement of the crane affects the cable length I check the values of
• rope.CalculateLength();
• rope.restLength;

The cable extends quite a bit (CalculateLenght in relation to restLength), but I would have expected that, if the cable can't stretch, the movement of the crane would slide the cable over the cable-saddles and reduce the slack in the cable. Yet this only happens to a certain extend. The restLength is 127m whilst the calculateLength() at the end of the crane movement is about 142m, but there is more then enough slack still in the cable.


As you can see I'm struggling on what work method to use to check the approximate length of the cable that we need to do the crane movement. 
An example of a Cable Saddle can be found on the link.

Again, thanks for your quick reply!

Kind regards.
Reply
#4
(23-12-2022, 02:31 PM)5G_Zendmast Wrote: The cable extends quite a bit (CalculateLenght in relation to restLength), but I would have expected that, if the cable can't stretch, the movement of the crane would slide the cable over the cable-saddles and reduce the slack in the cable. Yet this only happens to a certain extend. The restLength is 127m whilst the calculateLength() at the end of the crane movement is about 142m, but there is more then enough slack still in the cable.
...
Try to disable any stretching/compression

Hi!

Such a large difference in rest vs actual length means that your current settings are not enough to simulate such a long rope accurately, this is what I meant by:

Quote:Right off the bat, using a particle-based engine to simulate a 190 meters long cable might not be a good idea, depending on how fine you require the discretization to be. Say you want one particle each 10 cm, that's 1900 particles chained together by distance constraints, which will require a very small timestep if you want some guaranteed maximum stretching threshold.

You can increase the amount of simulation substeps (found in the ObiFixedUpdater component) and/or constraint iterations (found in the ObiSolver component) to increase the overall simulation quality. The manual contains a pretty in-depth explanation of how the engine works and how these parameters affect the results:
http://obi.virtualmethodstudio.com/manua...gence.html

(23-12-2022, 02:31 PM)5G_Zendmast Wrote: As you can see I'm struggling on what work method to use to check the approximate length of the cable that we need to do the crane movement. 
An example of a Cable Saddle can be found on the link.

The saddle can be a simple collider then. To measure distances from the start/end of the rope to the saddle, you can use collision callbacks to determine which particles in the rope are in contact with the saddle.

Once you know the indices of the particles in contact with the saddle, iterate trough the rope's elements accumulating the distance until you find the element references one of the particles touching the saddle. Then, just repeat the same procedure from the other end of the rope.

kind regards,
Reply