Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/source/user/fast.farm/InputFiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,14 @@ These are used only if WAT=2.
**WAT_DxDyDz**: [three floats, comma separated]
Distances (in meters) between points in the x, y, and z directions of the WAT_BoxFile
These are used only if WAT=2.
When **WAT=1** the dimensions in each directions are taken as :math:`dx=dy=dz=0.03*\text{RotorDiamRef}`.
When **WAT=1** the dimensions will be set to **[dX_high, dY_high, dZ_high]** if
that is the same for all turbines, otherwise the dimeinaiona will be calculated
using the guidance with :math:`dx=dy=dz=0.03*\text{RotorDiamRef}`.


**WAT_ScaleBox**: [flag]
When set to True, the input turbulence box is scaled so that it has zero mean and unit standard deviation at every node.
DEFAULT is False.
DEFAULT is True.

**WAT_k_Def** [five floats, comma separated] :math:`[k_\text{def}, k_\text{FMin}, k_\text{DMin}, k_\text{DMax}, e]`
Tuning parameters for quasi-steady wake deficit effect in the wake-added
Expand Down
20 changes: 18 additions & 2 deletions glue-codes/fast-farm/src/FAST_Farm_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,23 @@ SUBROUTINE Farm_PrintSum( farm, WD_InputFileData, ErrStat, ErrMsg )
end select
WRITE (UnSum,'(2X,A)') 'Calibrated parameter for wake meandering (-): '//trim(Num2LStr(farm%AWAE%p%C_Meander))

!FIXME: add summary info about WAT
if (farm%p%WAT == 0) then
write (UnSum,'(/,2X,A)') 'Wake added turbulence: off'
else
write (UnSum,'(/,2X,A)') 'Wake-Added Turbulence (WAT):'
write (UnSum,'(4X,A,6(f9.3))') 'WAT_NxNyNz: ',farm%p%WAT_NxNyNz(1:3)
write (UnSum,'(4X,A,6(f9.3))') 'WAT_DxDyDz: ',farm%p%WAT_DxDyDz(1:3)
if (farm%p%WAT_ScaleBox) then
write (UnSum,'(4X,A,A)') 'WAT_ScaleBox: ','.TRUE.'
else
write (UnSum,'(4X,A,A)') 'WAT_ScaleBox: ','.FALSE.'
endif
write (UnSum,'(4X,A)') 'coefficients:'
write (UnSum,'(12X,A)') ' k_c f_min D_min D_max e'
write (UnSum,'(A6,A6,6(f9.3))') '','k_Def', farm%WD%p%WAT_k_Def_k_c, farm%WD%p%WAT_k_Def_FMin, farm%WD%p%WAT_k_Def_DMin, farm%WD%p%WAT_k_Def_DMax, farm%WD%p%WAT_k_Def_Exp
write (UnSum,'(A6,A6,6(f9.3))') '','k_Grad',farm%WD%p%WAT_k_Grad_k_c,farm%WD%p%WAT_k_Grad_FMin,farm%WD%p%WAT_k_Grad_DMin,farm%WD%p%WAT_k_Grad_DMax,farm%WD%p%WAT_k_Grad_Exp
endif


WRITE (UnSum,'(/,A)' ) 'Time Steps'
WRITE (UnSum,'(2X,A)') 'Component Time Step Subcyles'
Expand Down Expand Up @@ -837,7 +853,7 @@ SUBROUTINE Farm_ReadPrimaryFile( InputFile, p, WD_InitInp, AWAE_InitInp, OutList
CALL ReadVar( UnIn, InputFile, p%WAT_BoxFile, 'WAT_BoxFile', "Filepath to the file containing the u-component of the turbulence box (either predefined or user-defined) (quoted string)", ErrStat2, ErrMsg2, UnEc ); if(failed()) return
call ReadAry( UnIn, InputFile, p%WAT_NxNyNz, 3, "WAT_NxNyNz", "Number of points in the x, y, and z directions of the WAT_BoxFile [used only if WAT=2] (m)", ErrStat2, ErrMsg2, UnEc ); if(failed()) return
call ReadAry( UnIn, InputFile, p%WAT_DxDyDz, 3, "WAT_DxDyDz", "Distance (in meters) between points in the x, y, and z directions of the WAT_BoxFile [used only if WAT=2] (m)", ErrStat2, ErrMsg2, UnEc ); if(failed()) return
call ReadVarWDefault( UnIn, InputFile, p%WAT_ScaleBox, "WAT_ScaleBox", "Flag to scale the input turbulence box to zero mean and unit standard deviation at every node", .False., ErrStat2, ErrMsg2, UnEc); if(failed()) return
call ReadVarWDefault( UnIn, InputFile, p%WAT_ScaleBox, "WAT_ScaleBox", "Flag to scale the input turbulence box to zero mean and unit standard deviation at every node", .True., ErrStat2, ErrMsg2, UnEc); if(failed()) return
call ReadAryWDefault( UnIn, InputFile, TmpRAry5, 5, "WAT_k_Def", &
"Calibrated parameters for the influence of the maximum wake deficit on wake-added turbulence (set of 5 parameters: k_Def , DMin, DMax, FMin, Exp) (-) [>=0.0, >=0.0, >DMin, >=0.0 and <=1.0, >=0.0] or DEFAULT [DEFAULT=[0.6, 0.0, 0.0, 2.0, 1.0 ]]", &
(/0.6_ReKi, 0.0_ReKi, 0.0_ReKi, 2.0_ReKi, 1.00_ReKi/), ErrStat2, ErrMsg2, UnEc); if(failed()) return
Expand Down
37 changes: 34 additions & 3 deletions glue-codes/fast-farm/src/FAST_Farm_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,7 @@ SUBROUTINE WAT_init( p, WAT_IfW, AWAE_InitInput, ErrStat, ErrMsg )
call MannLibDims(BoxFileRoot, p%RotorDiamRef, p%WAT_NxNyNz, p%WAT_DxDyDz, ErrStat2, ErrMsg2); if (Failed()) return
write(sDummy, '(3(I8,1X))') p%WAT_NxNyNz
call WrScr(' WAT: NxNyNz set to: '//trim(sDummy)//' (inferred from filename)')
write(sDummy, '(3(F8.3,1X))') p%WAT_DxDyDz
call WrScr(' WAT: DxDyDz set to: '//trim(sDummy)//' (based on rotor diameter)')
call Set_WAT_DxDyDz() ! Use turbine high res deltas if all same
endif
! Sanity check
if (any(p%WAT_NxNyNz<2)) then
Expand Down Expand Up @@ -481,7 +480,7 @@ subroutine MannLibDims(BoxFileRoot,RotorDiamRef,Nxyz,Dxyz,ErrStat3,ErrMsg3)
ErrStat3 = ErrID_None
ErrMsg3 = ""

! Set Dxyz
! Calculate Dxyz based on guidance
Dxyz=real(RotorDiamRef,ReKi)*ScaleFact

! --- Create a string made of digits and "x" only, starting from the end of the filename
Expand Down Expand Up @@ -518,6 +517,38 @@ subroutine MannLibDims(BoxFileRoot,RotorDiamRef,Nxyz,Dxyz,ErrStat3,ErrMsg3)
ErrStat3=ErrID_None
ErrMsg3 =""
end subroutine MannLibDims
subroutine Set_WAT_DxDyDz()
real(ReKi) :: TmpDx,TmpDy,TmpDz
logical :: HResDimsSame
! If Mod_AmbWind<2, we don't read high res discretizations
if (AWAE_InitInput%InputFileData%Mod_AmbWind < 2) then
write(sDummy, '(3(F8.3,1X))') p%WAT_DxDyDz
call WrScr(' WAT: DxDyDz set to: '//trim(sDummy)//' (calculated based on guidance for Mod_AmbWind==1)')
return
endif
! Check if all turbines use the same high res deltas
HResDimsSame = .true.
TmpDx = AWAE_InitInput%InputFileData%dX_high(1)
TmpDy = AWAE_InitInput%InputFileData%dY_high(1)
TmpDz = AWAE_InitInput%InputFileData%dZ_high(1)
do i=2,size(AWAE_InitInput%InputFileData%dX_high)
if (.not. EqualRealNos(TmpDx,AWAE_InitInput%InputFileData%dX_high(i))) HResDimsSame = .false.
if (.not. EqualRealNos(TmpDy,AWAE_InitInput%InputFileData%dY_high(i))) HResDimsSame = .false.
if (.not. EqualRealNos(TmpDz,AWAE_InitInput%InputFileData%dZ_high(i))) HResDimsSame = .false.
enddo
! if all turbines use same high res spacing, use that for WAT spacing
if (HResDimsSame) then
p%WAT_DxDyDz(1) = TmpDx
p%WAT_DxDyDz(2) = TmpDy
p%WAT_DxDyDz(3) = TmpDz
write(sDummy, '(3(F8.3,1X))') p%WAT_DxDyDz
call WrScr(' WAT: DxDyDz set to: '//trim(sDummy)//' (using high res grid resolution)')
! otherwise fall back to calculated values from MannLibDims
else
write(sDummy, '(3(F8.3,1X))') p%WAT_DxDyDz
call WrScr(' WAT: DxDyDz set to: '//trim(sDummy)//' (high res grids are not identical for all turbines, calculated based on guidance instead)')
endif
end subroutine Set_WAT_DxDyDz
end subroutine WAT_init

!> Remove mean from all grid nodes and set standard deviation to 1 at all nodes
Expand Down
Loading