Skip to content

OLAF: fix VTK writing at the last simulation step - #3475

Open
RBergua wants to merge 3 commits into
OpenFAST:rc-5.0.1from
RBergua:OLAF_VTK_last_step
Open

RBergua wants to merge 3 commits into
OpenFAST:rc-5.0.1from
RBergua:OLAF_VTK_last_step

Conversation

@RBergua

@RBergua RBergua commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Feature or improvement description
In the OLAF output section, the WrVTK flag lets the user control visualization output:
0: NoVTK
1: Write VTK at each time step defined by VTK_fps
2: Write VTK at the beginning and end of the simulation

Separately, grid outputs (nGridOut) are controlled independently, with each grid defining its own TStart, TEnd, and DTOut.

Problems fixed:
1. Setting WrVTK > 0 forced every grid output to write at the last step, even though grid outputs should only follow their own schedule (TStart/TEnd/DTOut), independent of the wake's final write logic.
2. Setting WrVTK = 1 incorrectly forced an extra output at the final step, even though only WrVTK = 2 should include a start/end write.

Changes:
1. Grid outputs (nGridOut) are now written only according to their own schedule, independent from the wake WrVTK flag.
2. WrVTK = 1 no longer forces an output at the final step.

@RBergua RBergua added this to the v5.0.1 milestone Sep 25, 2026
@RBergua
RBergua marked this pull request as draft September 25, 2026 16:48
@RBergua

RBergua commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks to the failed r-test I realized that one condition is not properly handled at the moment. The failed test ad_Sphere_OLAF uses TMax=2, DT=1, WrVTK= 1, and VTK_fps=1.

From here, we would expect to write VTK outputs at: 0, 1, 2. However, the results at the last step are skipped. The proposed final step catch-up logic was failing when the last VTK_fps would exactly land at TMax for WrVTK= 1.

I updated the logic in commit 0873538. For reference, I attach the expected behavior below:

  1. If TMax=5, DT=0.1, WrVTK= 1, and VTK_fps=1, OLAF will write at instants: 0, 1, 2, 3, 4, 5.
  2. If TMax=5.4, DT=0.1, WrVTK= 1, and VTK_fps=1, OLAF will write at instants: 0, 1, 2, 3, 4, 5.
  3. If TMax=5.4 and WrVTK= 2, OLAF will write at instants: 0, 5.4.

@RBergua
RBergua marked this pull request as ready for review September 26, 2026 12:47
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.

1 participant