From 39a2165b7da5a431d3ba999983a180d33a5ee7d0 Mon Sep 17 00:00:00 2001 From: Roger Bergua Date: Thu, 24 Sep 2026 16:27:13 -0600 Subject: [PATCH 1/3] Only WrVTK=2 enforces final write --- modules/aerodyn/src/FVW.f90 | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/aerodyn/src/FVW.f90 b/modules/aerodyn/src/FVW.f90 index 4df398a6d6..03447840e1 100644 --- a/modules/aerodyn/src/FVW.f90 +++ b/modules/aerodyn/src/FVW.f90 @@ -504,16 +504,11 @@ subroutine FVW_FinalWrite(u, p, x, z, OtherState, m, ErrStat, ErrMsg) ErrStat = ErrID_None ErrMsg = "" ! Place any last minute operations or calculations here: - if (p%WrVTK>0 .and. m%VTKstep Date: Thu, 24 Sep 2026 16:30:06 -0600 Subject: [PATCH 2/3] Decouple grid outputs from WrVTK --- modules/aerodyn/src/FVW.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/aerodyn/src/FVW.f90 b/modules/aerodyn/src/FVW.f90 index 03447840e1..e4a97c86d2 100644 --- a/modules/aerodyn/src/FVW.f90 +++ b/modules/aerodyn/src/FVW.f90 @@ -1612,7 +1612,7 @@ subroutine WriteVTKOutputs(t, force, VTKstep, u, p, x, z, m, ErrStat, ErrMsg) do iGrid=1,p%nGridOut bWithinTime = t>=m%GridOutputs(iGrid)%tStart-p%DTaero/2. .and. t<= m%GridOutputs(iGrid)%tEnd+p%DTaero/2. bTimeToOutput = ( t - m%GridOutputs(iGrid)%tLastOutput) >= m%GridOutputs(iGrid)%DTout - 0.25_DbKi*p%DTaero - bDoGrid(iGrid) = force .or. (bWithinTime .and. bTimeToOutput) + bDoGrid(iGrid) = bWithinTime .and. bTimeToOutput enddo if (any(bDoGrid)) then ! Build the wake segments/tree once and reuse it for all grids below From 0873538dbc5cfb22b50a29f2f7b3eccb91040331 Mon Sep 17 00:00:00 2001 From: Roger Bergua Date: Fri, 25 Sep 2026 11:47:27 -0600 Subject: [PATCH 3/3] OLAF: fix missing VTK output at final time step for WrVTK=1 --- modules/aerodyn/src/FVW.f90 | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/aerodyn/src/FVW.f90 b/modules/aerodyn/src/FVW.f90 index e4a97c86d2..59d0292555 100644 --- a/modules/aerodyn/src/FVW.f90 +++ b/modules/aerodyn/src/FVW.f90 @@ -504,11 +504,18 @@ subroutine FVW_FinalWrite(u, p, x, z, OtherState, m, ErrStat, ErrMsg) ErrStat = ErrID_None ErrMsg = "" ! Place any last minute operations or calculations here: - if (p%WrVTK==2 .and. m%VTKstep0 .and. m%VTKstep= p%DTvtk - 0.25_DbKi*p%DTaero) then + ! WrVTK=1: only write the final step if it wasn't caught yet and it lines up with VTK_fps + call WriteVTKOutputs(t, .true., m%iStep+1, u, p, x, z, m, ErrStat, ErrMsg) + endif m%VTKstep = FINAL_STEP ! We make sure we don't write again endif end subroutine FVW_FinalWrite