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)?
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?
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.
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.
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.
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.
Happy to share here. After using openfast current dev version ( I think this dev version is a preliminary version for V4.0), now the wave surface can be succeesfully outputted.