Repository navigation
OLAF: fix VTK writing at the last simulation step - #3475
Conversation
|
Thanks to the failed r-test I realized that one condition was not properly handled. The failed test 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 I updated the logic in commit 0873538. For reference, I attach the expected behavior below:
|
There was a problem hiding this comment.
🟡 Changes recommended
Final scheduled grid output remains incorrectly dependent on the wake WrVTK setting and cadence.
1 open finding
What changed in this PR
Fixes OLAF’s final-step VTK scheduling so wake and grid outputs follow their respective schedules.
Changes:
- Limits forced final wake output to
WrVTK=2. - Prevents
forcefrom bypassing grid schedules.
| File | Description |
|---|---|
modules/aerodyn/src/FVW.f90 |
Adjusts final-step wake and grid VTK output logic. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Feature or improvement description
In the OLAF output section, the
WrVTKflag lets the user control visualization output:0: NoVTK1: Write VTK at each time step defined byVTK_fps2: Write VTK at the beginning and end of the simulationSeparately, grid outputs (
nGridOut) are controlled independently, with each grid defining its ownTStart,TEnd, andDTOut.Problems fixed:
1. Setting
WrVTK > 0forced 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 = 1incorrectly forced an extra output at the final step, even though onlyWrVTK = 2should include a start/end write.Changes:
1. Grid outputs (
nGridOut) are now written only according to their own schedule, independent from the wakeWrVTKflag.2.
WrVTK = 1no longer forces an output at the final step.