MAP Cable Shape

I’d like to use the MAP C++ libraries (not Python) to determine the initial equilibrium state of a system of cables for an C++ undersea simulation I am developing. I would need to get the shape of the sagging cables, not just the states at the vessel and anchor. After skimming the User’s Guide, it looks like I could place a moderate number of massless Connect nodes along the cables and solve for their positions. Questions:

  1. Would this approach adversely affect the solution? Would the solution be the same as for a system of continuous cables without extra Connect nodes?

  2. Is there a way to get the states of these nodes by some MAP library call within my simulation? Otherwise I’d have to make the simulation parse the the MAP output file, which I’d rather not do.

  3. Or is there a better way to get the cable shapes?


Hi Kurt,

You should be able to use massless connect nodes without issue. A baseline test case was constructed in the fashion described, and the static solution checks out to provide a similar solution for the case without connect nodes (though, I’d still double check the result against a continuous, single line solution to be sure; and let us know if you see something odd). If I understand correctly, the idea behind breaking up the cable into sections is to extract forces along the line? There are some functions in mapapi.c that can help provide a start:

map_get_fairlead_force_3d(…) to get the x,y,z fairlead force components of each line (i.e., sections between ‘connect’ nodes)

These functions can supply the line shape:

x = map_plot_x_array(…) to get an array of points for the x line profile
y = map_plot_y_array(…) to get an array of points for the y line profile
z = map_plot_z_array(…) to get an array of points for the z line profile

i.e., plot(x,y,z) would render the 3d line.

It can get tricky though, because x,y,z will need to be freed when it’s no longer needed, otherwise memory will leak. Although you are not using python, these calls are better exemplified in one of our python driver examples. It’s not distributed with the MAP archive, but can be made available if you feel would be helpful.


Thanks, Marco.

The reason that I need the positions of the connect nodes is so that I can use them to initialize the cable state in another piece of software (Chrono::Engine) that will simulate the cable after t = 0. The cable state consists of the positions of the endpoints of a set of inflexible cable sections that represent the whole cable in Chrono. It sounds like the functions map_plot_*_array() are just what I need, but then are the extra connect nodes even necessary? Maybe these functions return the shape even for a single, continuous cable…?


That’s correct, this is achievable with a single line. If all you require is x,y,z position along the curved surface, then extra connect nodes aren’t needed. You can supply the function with the number of points you need between the fairlead and anchor with the int num_points argument in map_plot-x_array(…). The int i argument is the line number. Hope this helps.

Thank you,

That is perfect, thanks!