Wave surface visualization

Dear forumers,

From FASTv8_README.pdf, I found that wave surface can be visualized in Paraview (please see below figure).

However, when I use the lastest openfast-main version. It did not output wavesurface.vtk or vtp. So I am unable to animate wave surface in Paraview. Below is my configurations about vtk output in fst file:

---------------------- VISUALIZATION ------------------------------------------
          2   WrVTK           - VTK visualization data output: (switch) {0=none; 1=initialization data only; 2=animation; 3=mode shapes}
          1   VTK_type        - Type of VTK visualization data: (switch) {1=surfaces; 2=basic meshes (lines/points); 3=all meshes (debug)} [unused if WrVTK=0]
true         VTK_fields      - Write mesh fields to VTK data files? (flag) {true/false} [unused if WrVTK=0]
         1   VTK_fps         - Frame rate for VTK output (frames per second){will use closest integer multiple of DT} [used only if WrVTK=2 or WrVTK=3]

Could anyone kindly please share me how to output wave surface (not the wave elevation at origin)?

Regards,
Ran.Tu

1 Like

It looks like you have the correct visualization settings (i.e., the wave is output only when VTK_type=1), though 1 frame per second might be a little coarse. The outstanding hydrodyn pull requests have a bug where wave surfaces aren’t generated, but if you are using the main branch, that shouldn’t be an issue, either.

Can you tell me what kind of waves you are using in your model and what vtk (.vtp) files it actually produces when you run your model?

Dear Bonnie,

I use the 5MW_OC4Semi_WSt_WavesWN example files. And I set the regular wave, please see below:

             1   WaveMod        - Incident wave kinematics model {0: none=still water, 1: regular (periodic), 1P#: regular with user-specified phase, 2: JONSWAP/Pierson-Moskowitz spectrum (irregular), 3: White noise spectrum (irregular), 4: user-defined spectrum from routine UserWaveSpctrm (irregular), 5: Externally generated wave-elevation time series, 6: Externally generated full wave-kinematics time series [option 6 is invalid for PotMod/=0]} (switch)

And after finishing the simulation, in the vtk folder, I get several vtk/vtp files, like:

  • 5MW_OC4Semi_WSt_WavesWN.AD_Blade1.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.AD_Blade1_Reference.vtp
  • 5MW_OC4Semi_WSt_WavesWN.AD_Blade2.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.AD_Blade2_Reference.vtp
  • 5MW_OC4Semi_WSt_WavesWN.AD_Blade3.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.AD_Blade3_Reference.vtp
  • 5MW_OC4Semi_WSt_WavesWN.Blade1Surface.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.Blade2Surface.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.Blade3Surface.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.ED_Hub.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.ED_Hub_Reference.vtp
  • 5MW_OC4Semi_WSt_WavesWN.ED_Nacelle.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.ED_Nacelle_Reference.vtp
  • 5MW_OC4Semi_WSt_WavesWN.ED_TowerLn2Mesh_motion.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.ED_TowerLn2Mesh_motion_Reference.vtp
  • 5MW_OC4Semi_WSt_WavesWN.HD_AllHdroOrigin.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.HD_AllHdroOrigin_Reference.vtp
  • 5MW_OC4Semi_WSt_WavesWN.HD_Morison.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.HD_Morison_Reference.vtp
  • 5MW_OC4Semi_WSt_WavesWN.HubSurface.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.NacelleSurface.00.vtp
  • 5MW_OC4Semi_WSt_WavesWN.SeabedSurface.vtp
  • 5MW_OC4Semi_WSt_WavesWN.StillWaterSurface.vtp
  • 5MW_OC4Semi_WSt_WavesWN.TowerSurface.00.vtp

It seems that 5MW_OC4Semi_WSt_WavesWN.StillWaterSurface.vtp can not animate the wave surface. I am inclined that files like 5MW_OC4Semi_WSt_WavesWN.WaterSurface.00.vtp are used to postprocess wave surface which are of lack.
Do I need to set someting in Hydrodyn.dat?

---------------------- OUTPUT --------------------------------------------------
True             HDSum          - Output a summary file [flag]
False            OutAll         - Output all user-specified member and joint loads (only at each member end, not interior locations) [flag]
             2   OutSwtch       - Output requested channels to: [1=Hydrodyn.out, 2=GlueCode.out, 3=both files]
"E15.7e2"       OutFmt         - Output format for numerical results (quoted string) [not checked for validity!]
"A11"            OutSFmt        - Output format for header strings (quoted string) [not checked for validity!]
---------------------- OUTPUT CHANNELS -----------------------------------------
"Wave1Elev"               - Wave elevation at the platform reference point (0,  0)

Unfortunately, it looks like the wave elevation surface visualization data is not working in the OpenFAST main branch, either. I have recently fixed this in an outstanding pull request, but I can confirm that it is not working as expected in the main (or dev) branches.

Dear @Bonnie.Jonkman ,

Recently I upgrade my OpenFAST version to v3.2.1. However, I am still unable to output the wave surface.

In OpenFAST source code, I find subroutine WrVTK_WaveElev in FAST_Subs.f90. I guess this subroutine is to writes the wave elevation data for a given time step.

It seems that this subroutine will create the .WaveSurface.‘//TRIM(Tstr)//’.vtp file. If it works, after calculation there should have bee a wavesurface.00.vtp in the VTK folder. But I can not find such a file.

In FAST_Subs.f90, line 5746:

   if ( allocated( p_FAST%VTK_Surface%WaveElev ) ) call WrVTK_WaveElev( t_global, p_FAST, y_FAST, HD)

Possibly, p_FAST%VTK_Surface%WaveElev is not allocated and then WrVTK_WaveElev is skipped. Do I need to set up something in the input file, so that p_FAST%VTK_Surface%WaveElev will be allocated?

Is there any debugging tutorials for OpenFAST? Maybe I can learn how to debug OpenFAST by myself.

Regards,
Ran Tu

Unfortunately, that bug isn’t going to be fixed until the pull request (PR) with updated SeaState/HydroDyn features is merged into OpenFAST: Additional features for the new SeaState module and HydroDyn by luwang00 · Pull Request #1008 · OpenFAST/openfast · GitHub. I don’t think that is scheduled for another few releases.

Yes, the problem is caused by the WaveElev array not being allocated (because the HydroDyn module doesn’t fill that array anymore. This is a bug that was likely introduced when HydroDyn had significant changes a year or so ago). I fixed it in the outstanding PR, but it’s not easy to move it to the current code because the SeaState module has been separated from HydroDyn in the new PR.

Thank you, Bonnie. Waiting for this progress. :grinning: