Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wake-added turbulence in FAST.Farm #1785

Open
wants to merge 60 commits into
base: dev-unstable-pointers
Choose a base branch
from

Conversation

ebranlard
Copy link
Contributor

@ebranlard ebranlard commented Sep 27, 2023

This pull request is ready to be merged

Feature or improvement description
Implementation of the wake-added turbulence into FAST.Farm

Impacted areas of the software
FAST.Farm

Additional supporting information
The feature and input file changes has been documented, but it requires the calibration of its two main constants.
r-tests and additional documentation will follow after the calibration.

The following additional inputs are added to the input file:

--- WAKE-ADDED TURBULENCE ---
0                  WAT                - Switch between wake-added turbulence box options {0: no wake added turbulence, 1: predefined turbulence box, 2: user defined turbulence box} (switch)
"Inflow/WAT/isoturb_1024x32x16.u" WAT_BoxFile  - Filepath to the file containing the u-component of the turbulence box (either predefined or user-defined) (quoted string)
1024, 32, 16       WAT_NxNyNz         - Number of points in the x, y, and z directions of the WAT_BoxFile [used only if WAT=2, derived value if WAT=1] (-)
5.5, 4.0, 4.0      WAT_DxDyDz         - Distance (in meters) between points in the x, y, and z directions of the WAT_BoxFile [used only if WAT=2, derived value if WAT=1] (m)
default            WAT_ScaleBox       - Flag to scale the input turbulence box to zero mean and unit standard deviation at every node [DEFAULT=False] (flag)
0.5                WAT_k_Def          - Calibrated parameter for the influence of the wake deficit in the wake-added turbulence [>=0.0, no upper bound] or DEFAULT [DEFAULT=NONE]
0.5                WAT_k_Grad         - Calibrated parameter for the influence of the radial velocity gradient of the wake deficit in the wake-added turbulence [>=0.0, no upper bound] or DEFAULT [DEFAULT=NONE]
default            WAT_D_BrkDwn       - Downstream distance in rotor diameter after which WAT scaling has reached 100% capacity [>=0] or DEFAULT [DEFAULT=1] (D)

Test results, if applicable
Test results are unchanged.

  • Implement the downstream evolution of kdef and kgrad using eddy viscosity function and 4 input parameters

andrew-platt and others added 30 commits April 25, 2023 12:12
…as a FileInfoType)

Changed some variables for more descriptive meaning
Also added some checks for grid size for AWAE with Mod_AmbWind 2,3 -- really cryptic errors otherwise
Also removed extra whitespace in AWAE.f90
AWAE could trigger a segfault in IfW if there are output channels but no lidar
There isn't any reason to use the full InflowWind_Init when we only want the data for the HAWC format and don't care about lidar or other stuff.
That is one very ugly routine.  I don't even know how it works (not sure how Nxyz(2:3) get set).
@ebranlard ebranlard added this to the v4.0.0 milestone Sep 27, 2023
@ebranlard ebranlard self-assigned this Sep 27, 2023
Copy link
Collaborator

@jjonkman jjonkman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reviewed the documentation part of this PR. Please find my edits and comments below.

docs/source/user/fast.farm/InputFiles.rst Show resolved Hide resolved
docs/source/user/fast.farm/InputFiles.rst Show resolved Hide resolved
docs/source/user/fast.farm/InputFiles.rst Show resolved Hide resolved
docs/source/user/fast.farm/InputFiles.rst Show resolved Hide resolved

**WAT_D_BrkDwn** [float, dimensionless]
Downstream distance in rotor diameter after which WAT scaling has reached 100% capacity.
DEFAULT is 1 (i.e. 1D)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've discussed potentially replacing input WAT_D_BrkDwn with one of the filter functions involved in the eddy viscosity formulation. I would guess F_vShr(x) would make sense because it represents the development of turbulent stresses generated by the wake shear layer, which seems to be what WAT_D_BrkDwn is trying to achieve. The only issue I see is the DEFAULT values of C_vShr_DMin, C_vShr_DMax, C_vShr_FMin, and C_vShr_Exp used to define F_vShr(x) result in a filter function that does not approach unity until 25D. This would impact the calibration of WAT_k_Def and WAT_k_Grad.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be risky to rely on the same inputs indeed.

But it's true that we could use the function EddyFilter, and call it with C_Dmin=0 and C_Dmax = WAT_D_BrkDwn
As for the FMin and the exponent, we could use the values from the input file, but they might represent something a bit different, maybe it's best to hardcode them to say FMin=0 and Exp=1.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should hold off on deciding this until the calibration is further along. I recall thinking before that the calibration may require different values at different downstream distances, which may work well if we have a filter function that is downstream-distance-dependent.

docs/source/user/fast.farm/FFarmTheory.rst Show resolved Hide resolved
docs/source/user/fast.farm/FFarmTheory.rst Show resolved Hide resolved
docs/source/user/fast.farm/FFarmTheory.rst Show resolved Hide resolved
docs/source/user/fast.farm/FFarmTheory.rst Show resolved Hide resolved
docs/source/user/fast.farm/FFarmTheory.rst Show resolved Hide resolved
@andrew-platt
Copy link
Collaborator

andrew-platt commented Nov 30, 2023

For finalizing:

  • implement the k_def and k_grad functions from paper (@ebranlard)
  • Merge in dev-unstable-pointers to resolve conflicts
  • Update all FF test cases to include WAT by default, then regen results
  • User documentation (link to paper for now -- maybe pull in pieces from paper)

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.

None yet

3 participants