FloatingArrayDesign / MoorDyn

a lumped-mass mooring line model intended for coupling with floating structure codes
https://moordyn.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
74 stars 42 forks source link

How to visualize lines.out #250

Open luop21 opened 2 months ago

luop21 commented 2 months ago

I am a new user of MoorDyn, anyone know how to visualize lines.out? I want to get a picture

sanguinariojoe commented 2 months ago

I recommend you to save a VTK file and then use Paraview to visualize it.

Otherwise you can use the API to extract the data yourself and plot with matplotlib.

Up to you, really. Try to give it a though, check the tests, and let us know. We can give you further hints if you make your mind

On Wed, 28 Aug 2024, 16:18 luop21, @.***> wrote:

I am a new user of MoorDyn, anyone know how to visualize lines.out? I want to get a picture

— Reply to this email directly, view it on GitHub https://github.com/FloatingArrayDesign/MoorDyn/issues/250, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMXKKENF66O2LL7BZC6IJ3ZTXL2HAVCNFSM6AAAAABNIM2XU2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4TEMRSHE2TCMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

RyanDavies19 commented 2 months ago

@luop21 there's also an option to use MoorPy, although the code is under development. If you are savvy with python you can try working with load and the plot functions. The gist of it is you need to load in the system using https://moorpy.readthedocs.io/en/dev/api.html#moorpy.system.System.load, then for each object in the system load the outfile data (ex: line.loadData(<path to outputs>, "lines", sep = '_')), and then plot using the plot, plot2d, or some variation of the animation function. This will likely require some modification of things on your side.

sanguinariojoe commented 2 months ago

Hey @luop21

Had you taken a look? Do you still need help?