FF: Curl/Cartesian wake fixes and AWAE VTK wake-plane output#3368
Open
andrew-platt wants to merge 24 commits into
Open
FF: Curl/Cartesian wake fixes and AWAE VTK wake-plane output#3368andrew-platt wants to merge 24 commits into
andrew-platt wants to merge 24 commits into
Conversation
Add Write_Planes_WireFrame and PlaneCorners helper to emit each active wake plane's outline in the global frame using vtk_lines. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This is not complete, but contains some of the info.
The .vtk.series file is not working as expected yet.
The edge points on the wake planes were not getting updated. The loop limits were one point short.
New guidance for calculating with larger safety factors, and different calculation for catesian+curl than polar. Co-authored-by: Regis Thedin <registhedin@gmail.com>
WD: fix smooth tapering from `numDFull` to `numDBuff` for curled wake
- Create modules/awae/src/AWAE_vtk.f90 containing module AWAE_vtk with all wake-plane VTK output routines: PlaneAxes, PlaneCorners, Write_Planes_WireFrame, Write_Planes_Data, Write_WakePlane_Data_File, Write_WakePlane_Series, and Write_NullPlane. - Remove those routines from AWAE_CalcOutput's internal contains block and convert them to standalone module subroutines with explicit arguments (p, u, m, n, t, Tstr) replacing host association. - Move the per-step Write_WakePlane_Series call from AWAE_CalcOutput to AWAE_End, writing series files once at shutdown instead of every output step. Merge the former two-routine pattern (Write_WakePlane_Series + Write_AllWakePlane_Series) into a single Write_WakePlane_Series(p, m). - Extract the inline null-plane block into Write_NullPlane subroutine. - Remove unused variables: FmtStr argument, PlaneNum, fileExists, rootDir from the former Write_WakePlane_Series. - Add AWAE_vtk.f90 to CMakeLists.txt and vs-build project; add 'use AWAE_vtk' to module AWAE. Co-authored-by: GitHub Copilot <175728472+Copilot@users.noreply.github.com>
…s files Add a new routine Write_WireFrame_Series(p) to AWAE_vtk that writes one ParaView .vtk.series index file per turbine for the WakePlanesWireFrame VTK outputs. Called once at shutdown from AWAE_End alongside the existing Write_WakePlane_Series call. Co-authored-by: GitHub Copilot <175728472+Copilot@users.noreply.github.com>
Add Write_DisWind_Series to AWAE_vtk module to generate ParaView .vtk.series index files for Low-resolution disturbed-wind XY, YZ, and XZ output slices. The routine is called from AWAE_End for each valid slice, matching the existing pattern for wake-plane and wireframe series files. Co-authored-by: GitHub Copilot <noreply@github.com>
…dels In WD_CalcOutput, the firstPass branch computed y%Vx_wake (polar) via NearWakeCorrection but never populated y%Vx_wake2 for Cartesian/Curl models. Additionally, the unconditional Cartesian/Curl taper block overwrote y%Vx_wake2 with xd%Vx_wake2 (still zeros) on firstPass, discarding any values set earlier. Changes: - Add Axisymmetric2CartesianVx conversion in the firstPass block of WD_CalcOutput to populate y%Vx_wake2 for Curl/Cartesian models. - Guard the Cartesian/Curl taper block with (.not. OtherState%firstPass) so it does not overwrite the firstPass initialization. - Add Mod_Wake guard and NearWakeCorrection call in InitStatesWithInputs for Cartesian/Curl state initialization. - Remove unused GridTol parameter in AWAE.f90. Co-authored-by: andrew-platt <andy.platt@nrel.gov>
Collaborator
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes several correctness issues in FAST.Farm’s Curl/Cartesian wake handling (initialization, buffer tapering, and edge updates) and refactors/extends AWAE VTK output by introducing a dedicated AWAE_vtk module that adds wake-plane wireframe/data outputs plus ParaView .vtk.series indices.
Changes:
- Fix WakeDynamics initialization/taper behavior for Curl/Cartesian wake models and correct plane edge update loop bounds.
- Refactor AWAE VTK output into a new
AWAE_vtkmodule and add wake-plane wireframe + per-plane structured-grid outputs and.vtk.serieswriters. - Update build/project files and output root naming to include the new VTK module and wake-output subdirectory.
Reviewed changes
Copilot reviewed 9 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vs-build/modules/AWAE.vfproj | Adds AWAE_vtk.f90 to the Visual Studio project. |
| modules/wakedynamics/src/WakeDynamics.f90 | Wake model fixes: initialization, Cartesian plane edge updates, buffer taper behavior, and output field setup. |
| modules/awae/src/AWAE.f90 | Switches to AWAE_vtk, updates VTK root handling, initializes new arrays, and invokes wake-plane VTK writers/series writers. |
| modules/awae/src/AWAE_vtk.f90 | New module implementing wake-plane VTK wireframe/data output and ParaView .vtk.series index generation. |
| modules/awae/src/AWAE_Types.f90 | Adds new VTK-related parameters and misc storage (WakeVTK_StartN), updates pack/unpack/copy/destroy. |
| modules/awae/src/AWAE_Registry.txt | Registry updates for new parameters/misc fields and improved field descriptions. |
| modules/awae/src/AWAE_IO.f90 | Renames VTK output root usage to the new OutFileFFvtkRoot. |
| modules/awae/CMakeLists.txt | Adds AWAE_vtk.f90 to the AWAE library build. |
| glue-codes/fast-farm/src/FAST_Farm_Subs.f90 | Updates MaxNumPlanes sizing logic (different safety factors by wake model). |
| .gitignore | Ignores VS Code workspace and devcontainer/docker-compose files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
I thought this was in the outer context, but apparently not. Not sure how it was still compiling ok during testing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Ready to merge
Feature or improvement description
This PR addresses multiple bugs and adds VTK wake-plane visualization capabilities for FAST.Farm's Curl/Cartesian wake models in the AWAE and WakeDynamics modules.
Bug fixes:
Vx_wake2initialization at T=0 for Curl/Cartesian wake models — thefirstPassbranch inWD_CalcOutputcomputedy%Vx_wake(polar) but never populatedy%Vx_wake2, and the unconditional taper block overwrote it with zeros (update the solution before the convergence criteria control flow #32 taper fix also merged).numDFulltonumDBufffor curled wake.New VTK wake-plane visualization:
AWAE_vtkmodule (AWAE_vtk.f90), replacing inline routines inAWAE_CalcOutput.Write_Planes_WireFrame,PlaneCornershelper).Write_Planes_Data,Write_WakePlane_Data_File)..vtk.seriesfile writers for wireframes, wake-plane data, and disturbed-wind slices for ParaView time-series loading.Other changes:
MaxNumPlanescalculation for Cartesian/Curl models with larger safety factors..gitignorefor VS Code and Docker build configs.Impacted areas of the software
modules/awae/— NewAWAE_vtk.f90module; changes toAWAE.f90,AWAE_IO.f90,AWAE_Registry.txt,AWAE_Types.f90,CMakeLists.txtmodules/wakedynamics/—WakeDynamics.f90(initialization, taper, edge update fixes)glue-codes/fast-farm/—FAST_Farm_Subs.f90(MaxNumPlanes calculation)docs/— FAST.Farm plan (Rev26), wake extent documentationvs-build/modules/—AWAE.vfprojupdated for new source fileAdditional supporting information
The Curl and Cartesian wake models had several initialization and update issues that caused incorrect wake deficit values at startup and incorrect edge values during simulation. The VTK output refactoring moves wake visualization code into a dedicated module for maintainability and adds per-plane data output and ParaView
.vtk.seriesindex files for easier post-processing.Generative AI usage
Substantial portions of the VTK output code and bug fix analysis were developed with AI assistance:
This PR description was generated with AI assistance:
Test results, if applicable
No test result changes. No r-test updates required.