Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualization of HydroDyn Morison mesh and MoorDyn lines #1768

Merged
merged 6 commits into from
Sep 29, 2023

Conversation

andrew-platt
Copy link
Collaborator

@andrew-platt andrew-platt commented Sep 12, 2023

This PR is ready to merge.

Feature or improvement description
Since v2.6 it has not been easily possible to visualize HydroDyn or SubDyn meshes. This PR adds visualization to both the HydroDyn Morrison elements and to the MoorDyn lines. To accomplish this, MoorDyn outputs a line2 mesh when visualization is turned on. HydroDyn creates a new line2 mesh that is mapped from the u%mesh (different number of nodes) when visualization is requested.

It is now possible to quickly visualize the following:

  • Morison elements (surfaces: VTK_Type=1; lines VTK_Type=2)
  • MD lines (lines: VTK_Type=1 and VTK_Type=2)
  • MD rods (surfaces: VTK_Type=1; lines: VTK_Type=2)

Screenshot 2023-09-12 at 3 37 40 PM
Figure: 5MW_OC4Semi test case with large waves. WrVTK=2 and VTK_type=1.

Some features are not currently implemented:

  • MD body visualization
  • MD anchor visualization
  • SubDyn mesh visualization (likely in a later PR)

Related issue, if one exists
#776 -- This PR does not address the SubDyn visualization mentioned there.
#539 -- fully addressed

Impacted areas of the software
MoorDyn, HydroDyn, and a small amount of glue code.

Additional supporting information
During the implementation of the flexible floater option with SubDyn for v2.6, the mesh types were changed from line2 to point meshes. This made it more difficult to use Paraview to visualize the mesh structures.

Test results, if applicable
No tests cases change (we do not generate vtk outputs during test cases due to the amount of data).

@andrew-platt
Copy link
Collaborator Author

andrew-platt commented Sep 12, 2023

One suggested change from @ebranlard that I really like is to modify the way point meshes are handled. Currently point meshes cannot have connectivity information whereas line2 meshes can. However, a line2 mesh is fundamentally different in that it uses distributed loading rather than point loading.

It would be really nice to add a VisConnect flag to the mesh data structure to allow connectivity information and export this for line and surface meshes. This would eliminate the need for a new visualization mesh for HD and SD (MD only has point meshes for the structure connection points, so a new mesh for visualization is required there). I just didn't think about this at the time of implementation (probably forgot a discussion we had half a year ago about this).

@andrew-platt
Copy link
Collaborator Author

Screenshot 2023-09-13 at 10 38 06 AM
Figure: the 5MW_OC4Jckt_DLL_WTurb_WavesIrr_MGrowth test case with Morison elements rendered. Note that since SubDyn is not included, the transition from the jacket to the tower looks rather strange.

Copy link
Contributor

@ebranlard ebranlard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing that.
My only comment would indeed be to try and add a connectivity field to the point mesh for visualization purposes. But this can be done in another pull request.

Copy link
Collaborator

@jjonkman jjonkman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally agree with the approach suggested by Emmanuel, which is what we discussed before. But this is a fine stop-gap solution. Please find only a couple small comments.

Perhaps we can circle back to the approach suggested by Emmanuel when we add support for rectangular members in HydroDyn and SubDyn, which is code development planned in the future. Other changes to this visualization implementation will be required at that point anyway.


! map the motion to the visulization mesh
if (p%VisMeshes) then
!FIXME: error handling is incorrect here (overwrites all previous errors/warnings)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be fixed before merging?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a significant amount of reworking of the error handling in Morison required to really address this. Since there are more HydroDyn changes in the dev and dev-unstable branches, I would rather wait and deal with error handling there instead of introduce potential merge conflicts now.

ErrStat = ErrStat2, &
ErrMess = ErrMsg2, &
TranslationDisp = .TRUE., &
Orientation = .TRUE. )
Copy link
Collaborator

@jjonkman jjonkman Sep 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better if this VisMesh had the same fields as the Morison input point mesh (including velocities and accelerations)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect we don't need the velocities in the VisMesh -- it's pretty rare to use them during visualization and they still exist in the Morison mesh. Switching to adding the connectivity to the point meshes will include that information at that point.

Copy link
Collaborator

@jjonkman jjonkman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for responding. I'm fine with merging this in now.

@andrew-platt andrew-platt merged commit efead48 into OpenFAST:rc-3.5.1 Sep 29, 2023
19 checks passed
@andrew-platt andrew-platt deleted the f/HydroVis branch September 29, 2023 21:29
@andrew-platt andrew-platt mentioned this pull request Oct 19, 2023
19 tasks
@cillianfrawley
Copy link

Dear @andrew-platt,

Could you release the files used to visualise the 5MW test, that I can run in ParaView to visualise the Morison mooring elements and floating platform? I'm having trouble setting this up for my own platform configuration.

Regards,
Cillian

@andrew-platt
Copy link
Collaborator Author

Dear @cillianfrawley,

This feature is available with the OpenFAST version 3.5.1 release. See the release notes page for the executables and links to the input files here: https://github.com/OpenFAST/openfast/releases/tag/v3.5.1

The models above are found in the regression tests as the 5MW_OC4Semi_WSt_WavesWN (https://github.com/OpenFAST/r-test/tree/v3.5.1/glue-codes/openfast/5MW_OC4Semi_WSt_WavesWN) and 5MW_OC4Jckt_DLL_WTurb_WavesIrr_MGrowth (https://github.com/OpenFAST/r-test/tree/v3.5.1/glue-codes/openfast/5MW_OC4Jckt_DLL_WTurb_WavesIrr_MGrowth) cases (note: you will need to compile the necessary controllers or use the downloadable ones with the release on Windows). To use the visualization, simply change the VTK output settings in the .fst files:

  • WrVTK=2
  • VTK_type=1

Regards,

@cillianfrawley
Copy link

Thanks Andy,

I have that partially running, however, I run into the following issue when displaying the .vtp files in Paraview. This might be a question for elsewhere but why does the platform surface not show (I can only display it by clicking the 'point Gaussian' in the drop-down option). Also, I can't display the mooring lines as in your picture.

image

@andrew-platt
Copy link
Collaborator Author

Hi @cillianfrawley,

Are you using version 3.5.1?

3.5.0 and earlier versions could not output the mooring lines or the surfaces of the HydroDyn mesh.

@cillianfrawley
Copy link

Hi @andrew-platt,

Apologies I'm new to GitHub and its file system, V3.5.0 was installed as well as V3.5.1 so I thought I was using the new version but it was running the new files with the old version. All is working great now, thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants