# 1st and 2nd mode shapes visualization in OpenFAST

**URL:** <https://forums.nlr.gov/t/1st-and-2nd-mode-shapes-visualization-in-openfast/3443>\
**Category:** Computer-Aided Engineering Software Tools\
**Created:** [June 28, 2022, 11:39am UTC](https://forums.nlr.gov/t/1st-and-2nd-mode-shapes-visualization-in-openfast/3443 "2022-06-28T11:39:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mateus.Pereira](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@Mateus.Pereira](https://forums.nlr.gov/u/Mateus.Pereira)\
**Post date:** [June 28, 2022, 11:39am UTC](https://forums.nlr.gov/t/1st-and-2nd-mode-shapes-visualization-in-openfast/3443/1 "2022-06-28T11:39:45Z")

</div>

Hi,  
I am trying to visualize the first 15 modes of a floating wind turbine. I am following the directions presented in [AnalyzeModeShapes.m](https://github.com/OpenFAST/r-test/blob/main/glue-codes/openfast/5MW_Land_ModeShapes/AnalyzeModeShapes.m), but with a different wind turbine model. I was able to replicate the same steps for my model up to line 10. The next command

```auto
system([openFASTexe ' -VTKLin ElastoDyn-Modes.viz']);

```

creates several .vtp files for visualization, but only for modes 3 - 15 (which I can open with ParaView with no problems). No .vtp files are created for modes 1 and 2, and no error messages are printed on the screen. What could possibly be the reason for this?  
Some additional information:

1. Running AnalyzeModeShapes.m for the 5MW\_Land model in r-test generates .vtp files for modes 1-15.
2. Other than a different EDfile, the main differences between the .fst file in r-test (5MW\_Land\_ModeShapes.fst) and the .fst of my model is that CompHydro, CompSub and CompMooring are set to 1, 1, 3, respectively, and the corresponding input files for these solvers are provided.
3. I am able to run time simulations and linearization for my model with no issues
4. I am using the same [ElastoDyn-Modes.viz](https://github.com/OpenFAST/r-test/blob/main/glue-codes/openfast/5MW_Land_ModeShapes/ElastoDyn-Modes.viz) provided in r-test, except for lines 4 and 5 that have been changed to point to the appropriate files for my model.
5. I am using the main branch of r-test and matlab-toolbox  
Any help with this would be appreciated!  
Thanks,  
Mateus

---

<div class="post-metadata">

**Author:** ![Emmanuel.Branlard](https://avatars.discourse-cdn.com/v4/letter/e/e495f1/32.png) [@Emmanuel.Branlard](https://forums.nlr.gov/u/Emmanuel.Branlard)\
**Post date:** [June 28, 2022, 3:38pm UTC](https://forums.nlr.gov/t/1st-and-2nd-mode-shapes-visualization-in-openfast/3443/2 "2022-06-28T15:38:24Z")

</div>

Hi Mateus,

I have never run mode shape visualizations with other than onshore turbines. Can you maybe try to progressively add/remove the HydroDyn/MoorDyn/SubDyn modules, to see if this is an issue with one of the module?

Thanks a lot,

Emmanuel

---

<div class="post-metadata">

**Author:** ![Mateus.Pereira](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@Mateus.Pereira](https://forums.nlr.gov/u/Mateus.Pereira)\
**Post date:** [June 30, 2022, 2:46am UTC](https://forums.nlr.gov/t/1st-and-2nd-mode-shapes-visualization-in-openfast/3443/3 "2022-06-30T02:46:52Z")

</div>

Hi Emmanuel, by progressively adding the modules, I was able to identify the problem arises when the MoorDyn is enabled and the platform has all 6 degrees of freedom (PtfmSgDOF, PtfmSwDOF, PtfmHvDOF, PtfmRDOF, PtfmPDOF, PtfmYDOF). These two modes that are missing are the sway and surge of the platform. Any idea why I can’t visualize them?

---

<div class="post-metadata">

**Author:** ![Bonnie.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/bonnie.jonkman/32/3230_2.png) [@Bonnie.Jonkman](https://forums.nlr.gov/u/Bonnie.Jonkman)\
**Post date:** [June 30, 2022, 9:20am UTC](https://forums.nlr.gov/t/1st-and-2nd-mode-shapes-visualization-in-openfast/3443/4 "2022-06-30T09:20:25Z")

</div>

Do you know what the damped frequencies of those two modes are? There is a check that if the mode shape requires more than 500 vtk files it doesn’t create them. You could remove the lines `if (nt > 500) cycle` and see if that works.

---

<div class="post-metadata">

**Author:** ![Mateus.Pereira](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@Mateus.Pereira](https://forums.nlr.gov/u/Mateus.Pereira)\
**Post date:** [June 30, 2022, 2:46pm UTC](https://forums.nlr.gov/t/1st-and-2nd-mode-shapes-visualization-in-openfast/3443/5 "2022-06-30T14:46:41Z")

</div>

Their frequencies are 0.0323 and 0.032 Hz. I wasn’t aware of this limitation in the number of vtk files. Where do I exactly find the line `if (nt > 500) cycle` ?  
Based on your comment, I also tried to reduce VTK\_fps in the .fst file from 30 to 15 and it solves the problem too.

---

<div class="post-metadata">

**Author:** ![Andy.Platt](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Andy.Platt](https://forums.nlr.gov/u/Andy.Platt)\
**Post date:** [June 30, 2022, 7:20pm UTC](https://forums.nlr.gov/t/1st-and-2nd-mode-shapes-visualization-in-openfast/3443/6 "2022-06-30T19:20:30Z")

</div>

Hi Mateus,

The `if (nt > 500) cycle` statement is hardcoded within OpenFAST (`FAST_Subs.f90`, subroutine `FAST_RestoreForVTKModeShape_T`).

A frequency of ~0.032 Hz requires around 30 seconds for a full mode. At 30 fps, this would require 900 frames. Your reduction to 15 fps is a good method to get around the 500 frame limit for these low frequency modes, but may limit what high frequency modes can be visualized (it is not immediately obvious from the code what the minimum number of frames for a mode shape is).

Cheers,  
Andy
