diff --git a/docs/source/user/aerodyn-aeroacoustics/02-noise-models.rst b/docs/source/user/aerodyn-aeroacoustics/02-noise-models.rst index 56f7faf9e5..8422a63b62 100644 --- a/docs/source/user/aerodyn-aeroacoustics/02-noise-models.rst +++ b/docs/source/user/aerodyn-aeroacoustics/02-noise-models.rst @@ -151,8 +151,8 @@ The formulations of :math:`{\overline{D}}_{h}\ `\ and :math:`{\overline{D}}_{l}` are presented in :numref:`aa-directivity`. The current implementation offers two approaches to estimate -:math:`I_{1}`. The first one is through a user-defined grid of -:math:`I_{1}`; see :numref:`aa-sec-TIgrid`. The second option is to have the code +:math:`I_{1}`. The first one is through a user-defined :math:`I_{1}`. +The second option is to have the code reconstructing :math:`I_{1}` from the turbulent wind grid, where the code computes the airfoil relative position of each blade section, :math:`i`, at every time instant and, given the rotor speed, diff --git a/docs/source/user/aerodyn-aeroacoustics/App-usage.rst b/docs/source/user/aerodyn-aeroacoustics/App-usage.rst index f83c773acb..7d9394bed5 100644 --- a/docs/source/user/aerodyn-aeroacoustics/App-usage.rst +++ b/docs/source/user/aerodyn-aeroacoustics/App-usage.rst @@ -56,12 +56,14 @@ models: - **TICalcMeth** – Integer 1/2: flag to set the calculation method for the incident turbulence intensity. When set to 1, incident turbulence intensity is - defined in a user-defined grid; see :numref:`aa-sec-TIgrid`. When set to - 2, incident turbulence intensity is estimated from the time history of the - incident flow. + user-defined. When set to 2, incident turbulence intensity is + estimated from the time history of the incident flow. -- **TICalcTabFile** – String: name of the text file with the user-defined - turbulence intensity grid; see :numref:`aa-sec-TIgrid`. +- **TI** – Float: user-defined value of :math:`TI`, which is the rotor-incident + turbulence intensity used in the Amiet model. + +- **avgV** – Float: value of the average wind speed used to scale :math:`TI` + and convert it to a blade section incident turbulence intensity. - **Lturb** – Float: value of :math:`L_{turb}` used to estimate the turbulent lengthscale used in the Amiet model. @@ -255,32 +257,5 @@ is shown here: :language: none -.. _aa-sec-TIgrid: - -Turbulence Grid ---------------- - -When the flag **TICalcMeth** is set equal to 1, the grid of turbulence -intensity of the wind :math:`TI` must be defined by the user. This is -done by creating a file called **TIGrid_In.txt**, which mimics a TurbSim -output file and contains a grid of turbulence intensity, which is -defined as a fraction value. The file defines a grid centered at hub -height and oriented with the OpenFAST global inertial frame coordinate -system; see :numref:`aa-fig:ObsRefSys`. A user-defined number of lateral and vertical -points equally spaced by a user-defined number of meters must be -specified. Note that an average wind speed must be defined to convert -the turbulence intensity of the wind to the incident turbulent intensity :math:`I_{1}`. -An example file for a 160 (lateral) by 180 (vertical) meters -grid looks like the following: - - -.. container:: - :name: aa-tab:TIgrid - - .. literalinclude:: example/TIGrid.txt - :linenos: - :language: none - - .. [4] https://github.com/OpenFAST/python-toolbox diff --git a/docs/source/user/aerodyn-aeroacoustics/example/AeroAcousticsInput.dat b/docs/source/user/aerodyn-aeroacoustics/example/AeroAcousticsInput.dat index eebaa51625..4a2bae7582 100644 --- a/docs/source/user/aerodyn-aeroacoustics/example/AeroAcousticsInput.dat +++ b/docs/source/user/aerodyn-aeroacoustics/example/AeroAcousticsInput.dat @@ -8,8 +8,9 @@ False Echo - Echo the input to ".AD.NN.ech"? (flag) ====== Aeroacoustic Models ============================================================================ 2 TIMod - Turbulent Inflow noise model {0: none, 1: Amiet 2: Amiet + Simplified Guidati} (switch) 1 TICalcMeth - Method to estimate turbulence intensity incident to the profile {1: given table, 2: computed on the fly} (switch) [Only used if TIMod!=0] -"TIGrid_InVerify.txt" TICalcTabFile - Name of the file containing the table for incident turbulence intensity (-) [Only used if TiCalcMeth == 1] -0.5 SurfRoughness- Surface roughness value used to estimate the turbulent length scale in Amiet model (m) +0.1 TI - Rotor-incident wind turbulence intensity (-) [Only used if TiCalcMeth == 1] +8 avgV - Average wind speed used to compute the section-incident turbulence intensity (m/s) [Only used if TiCalcMeth == 1] +40 Lturb - Turbulent length scale in Amiet model (m) [Only used if TIMod!=0] 1 TBLTEMod - Turbulent Boundary Layer-Trailing Edge noise calculation {0: none, 1:BPM, 2: TNO} (switch) 1 BLMod - Calculation method for boundary layer properties, {1: BPM, 2: Pretabulated} (switch) 1 TripMod - Boundary layer trip model {0:no trip, 1: heavy trip, 2: light trip} (switch) [Only used if BLMod=1] @@ -18,9 +19,6 @@ False Echo - Echo the input to ".AD.NN.ech"? (flag) True RoundedTip - Logical indicating rounded tip (flag) [Only used if TipMod=1] 1.0 Alprat - Tip lift curve slope (Default = 1.0) [Only used if TipMod=1] 0 BluntMod - Trailing-edge-bluntness – Vortex-shedding model {0:none, 1: BPM} (switch) -"AABlade1.dat" AABlFile(1) - Name of file containing distributed aerodynamic properties for Blade #1 (-) -"AABlade1.dat" AABlFile(2) - Name of file containing distributed aerodynamic properties for Blade #2 (-) -"AABlade1.dat" AABlFile(3) - Name of file containing distributed aerodynamic properties for Blade #3 (-) ====== Observer Input =================================================================== "AA_ObserverLocations.dat" ObserverLocations - Name of file containing all observer locations X Y Z (-) ====== Outputs ==================================================================================== diff --git a/docs/source/user/aerodyn-aeroacoustics/example/TIGrid.txt b/docs/source/user/aerodyn-aeroacoustics/example/TIGrid.txt deleted file mode 100644 index 4f01c54833..0000000000 --- a/docs/source/user/aerodyn-aeroacoustics/example/TIGrid.txt +++ /dev/null @@ -1,13 +0,0 @@ -Average Inflow Wind Speed -8.0 -Total Grid points In Y (lateral), Starts from - radius goes to + radius+ -4 -Total Grid points In Z (vertical), Starts from bottom tip (hub-radius) -3 -Grid spacing In Y (lateral) -40 -Grid spacing In Z (vertical) -60 -0.1200 0.1200 0.1200 0.1200 -0.1100 0.1100 0.1100 0.1100 -0.1000 0.1000 0.1000 0.1000 diff --git a/docs/source/user/api_change.rst b/docs/source/user/api_change.rst index f995d20766..2bc5635830 100644 --- a/docs/source/user/api_change.rst +++ b/docs/source/user/api_change.rst @@ -29,6 +29,8 @@ OpenFAST 15 CompAero\** 2 C OpenFAST 13 CompElast 3 CompElast - Compute structural dynamics (switch) {1=ElastoDyn; 2=ElastoDyn + BeamDyn for blades; 3=Simplified ElastoDyn} AeroDyn 40 IntegrationMethod 3 IntegrationMethod - Switch to indicate which integration method UA uses (1=RK4, 2=AB4, 3=ABM4, 4=BDF2) AeroDyn 140\* BldNd_BlOutNd "All" BldNd_BlOutNd - Specify a portion of the nodes to output. {"ALL", "Tip", "Root", or a list of node numbers} (-) +AeroDyn Aeroacoustics 11\* TI 0.1 TI - Rotor-incident wind turbulence intensity (-) [Only used if TiCalcMeth == 1] +AeroDyn Aeroacoustics 12\* avgV 8 avgV - Average wind speed used to compute the section-incident turbulence intensity (m/s) [Only used if TiCalcMeth == 1] ElastoDyn blade file 15 Removal of the `PitchAxis` input column HydroDyn all Complete restructuring of input file SeaState all New module (split from HydroDyn, so contains some inputs previously found in HydroDyn) diff --git a/modules/aerodyn/src/AeroAcoustics.f90 b/modules/aerodyn/src/AeroAcoustics.f90 index bd2650d49a..968693f6a1 100644 --- a/modules/aerodyn/src/AeroAcoustics.f90 +++ b/modules/aerodyn/src/AeroAcoustics.f90 @@ -177,17 +177,10 @@ subroutine SetParameters( InitInp, InputFileData, p, ErrStat, ErrMsg ) p%SpdSound = InitInp%SpdSound p%HubHeight = InitInp%HubHeight p%Lturb = InputFileData%Lturb - p%dy_turb_in = InputFileData%dy_turb_in - p%dz_turb_in = InputFileData%dz_turb_in p%NrObsLoc = InputFileData%NrObsLoc p%FTitle = InputFileData%FTitle - - IF ((InputFileData%TICalcMeth==1)) THEN - call AllocAry(p%TI_Grid_In,size(InputFileData%TI_Grid_In,1), size(InputFileData%TI_Grid_In,2), 'p%TI_Grid_In', errStat2, errMsg2); if(Failed()) return - p%TI_Grid_In=InputFileData%TI_Grid_In - ENDIF - - p%AvgV=InputFileData%AvgV + p%TI = InputFileData%TI + p%avgV = InputFileData%avgV ! Copy AFInfo into AA module ! TODO Allocate AFInfo and AFindx variables (DONE AND DONE) @@ -733,30 +726,9 @@ subroutine AA_UpdateStates( t, n, m, u, p, xd, errStat, errMsg ) ELSE! interpolate from the user given ti values do i=1,p%NumBlades do j=1,p%NumBlNds - zi_a=ABS(m%LE_Location(3,j,i) - (FLOOR(p%HubHeight-maxval(p%BlSpn(:,1)))) ) /p%dz_turb_in - z0_a=floor(zi_a) - z1_a=ceiling(zi_a) - zd_a=zi_a-z0_a - yi_a=ABS(m%LE_Location(2,j,i) + maxval(p%BlSpn(:,1)) ) /p%dy_turb_in - y0_a=floor(yi_a) - y1_a=ceiling(yi_a) - yd_a=yi_a-y0_a - c00_a=(1.0_ReKi-yd_a)*p%TI_Grid_In(z0_a+1,y0_a+1)+yd_a*p%TI_Grid_In(z0_a+1,y1_a+1) - c10_a=(1.0_ReKi-yd_a)*p%TI_Grid_In(z1_a+1,y0_a+1)+yd_a*p%TI_Grid_In(z1_a+1,y1_a+1) - - ! This is the turbulence intensity of the wind at the location of the blade i at node j - ti_vx = (1.0_ReKi-zd_a)*c00_a+zd_a*c10_a - ! With some velocity triangles, we convert it into the incident turbulence intensity, i.e. the TI used by the Amiet model - U1 = u%Vrel(J,I) - U2 = SQRT((p%AvgV*(1.+ti_vx))**2 + U1**2 - p%AvgV**2) - ! xd%TIVx(j,i)=(U2-U1)/U1 - xd%TIVx(j,i)=p%AvgV*ti_vx/U1 - - - if (i.eq.p%NumBlades) then - if (j.eq.p%NumBlNds) then - endif - endif + ! We scale the incident turbulence intensity by the ratio of average to incident wind speed + ! The scaled TI is used by the Amiet model + xd%TIVx(j,i)=p%TI*p%avgV/u%Vrel(J,I) enddo enddo endif diff --git a/modules/aerodyn/src/AeroAcoustics_IO.f90 b/modules/aerodyn/src/AeroAcoustics_IO.f90 index 28679b5992..7e6affa37e 100644 --- a/modules/aerodyn/src/AeroAcoustics_IO.f90 +++ b/modules/aerodyn/src/AeroAcoustics_IO.f90 @@ -94,10 +94,6 @@ SUBROUTINE ReadInputFiles( InputFileName, AFI, InputFileData, Default_DT, OutFil if (Failed())return endif - IF( (InputFileData%TICalcMeth==1) ) THEN - CALL REadTICalcTables(InputFileName,InputFileData, ErrStat2, ErrMsg2); if(Failed()) return - ENDIF - CONTAINS logical function Failed() call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) @@ -203,7 +199,8 @@ SUBROUTINE ReadPrimaryFile( InputFile, InputFileData, Default_DT, OutFileRoot, U CALL ReadCom( UnIn, InputFile, 'Section Header: Aeroacoustic Models', ErrStat2, ErrMsg2, UnEc ); call check() CALL ReadVar(UnIn,InputFile,InputFileData%IInflow ,"InflowMod" ,"" ,ErrStat2,ErrMsg2,UnEc); call check() CALL ReadVar(UnIn,InputFile,InputFileData%TICalcMeth ,"TICalcMeth" ,"" ,ErrStat2,ErrMsg2,UnEc); call check() - CALL ReadVAr(UnIn,InputFile,InputFileData%TICalcTabFile,"TICalcTabFile","" ,ErrStat2,ErrMsg2,UnEc); call check() + CALL ReadVAr(UnIn,InputFile,InputFileData%TI ,"TI" ,"" ,ErrStat2,ErrMsg2,UnEc); call check() + CALL ReadVAr(UnIn,InputFile,InputFileData%avgV ,"avgV" ,"" ,ErrStat2,ErrMsg2,UnEc); call check() CALL ReadVar(UnIn,InputFile,InputFileData%Lturb ,"Lturb" ,"" ,ErrStat2,ErrMsg2,UnEc); call check() CALL ReadVar(UnIn,InputFile,InputFileData%ITURB ,"TurbMod" ,"" ,ErrStat2,ErrMsg2,UnEc); call check() ! ITURB - TBLTE NOISE CALL ReadVar(UnIn,InputFile,InputFileData%X_BLMethod ,"BLMod" ,"" ,ErrStat2,ErrMsg2,UnEc); call check() @@ -423,66 +420,6 @@ SUBROUTINE Cleanup() END SUBROUTINE Cleanup END SUBROUTINE ReadBLTables !---------------------------------------------------------------------------------------------------------------------------------- -SUBROUTINE ReadTICalcTables(InputFile, InputFileData, ErrStat, ErrMsg) - ! Passed variables - integer(IntKi), intent(out) :: ErrStat ! Error status - character(*), intent(out) :: ErrMsg ! Error message - type(AA_InputFile), intent(inout) :: InputFileData ! All the data in the Noise input file - character(*), intent(in) :: InputFile ! Name of the file containing the primary input data - ! Local variables: - integer(IntKi) :: UnIn ! Unit number for reading file - character(1024) :: FileName ! name of the files containing obesever location - integer(IntKi) :: ErrStat2 ! Temporary Error status - character(ErrMsgLen) :: ErrMsg2 ! Temporary Error message - character(1024) :: PriPath ! Path name of the primary file - character(*), parameter :: RoutineName = 'REadTICalcTables' - integer(IntKi) :: GridY ! - integer(IntKi) :: GridZ ! - integer(IntKi) :: cou1 - ! Initialize some variables: - ErrStat = ErrID_None - ErrMsg = "" - - CALL GetPath( InputFile, PriPath ) ! Input files will be relative to the path where the primary input file is located. - - FileName = TRIM(PriPath)//InputFileData%TICalcTabFile - - CALL GetNewUnit( UnIn, ErrStat2, ErrMsg2); call check() - CALL OpenFInpFile ( UnIn, FileName, ErrStat2, ErrMsg2 ); if(Failed()) return - CALL ReadCom(UnIn, FileName, 'Text Line', ErrStat2, ErrMsg2); call check() - CALL ReadVar(UnIn, FileName, InputFileData%AvgV, 'AvgV', 'Echo flag', ErrStat2, ErrMsg2); call check() - CALL ReadCom(UnIn, FileName, 'Text Line', ErrStat2, ErrMsg2); call check() - CALL ReadVar(UnIn, FileName, GridY, 'GridY', 'Echo flag', ErrStat2, ErrMsg2); call check() - CALL ReadCom(UnIn, FileName, 'Text Line', ErrStat2, ErrMsg2);call check() - CALL ReadVar(UnIn, FileName, GridZ, 'GridZ', 'Echo flag', ErrStat2, ErrMsg2); call check() - CALL ReadCom(UnIn, FileName, 'Text Line', ErrStat2, ErrMsg2); call check() - CALL ReadVar(UnIn, FileName, InputFileData%dy_turb_in, 'InputFileData%dy_turb_in', 'Echo flag', ErrStat2, ErrMsg2); call check() - CALL ReadCom(UnIn, FileName, 'Text Line', ErrStat2, ErrMsg2); call check() - CALL ReadVar(UnIn, FileName, InputFileData%dz_turb_in, 'InputFileData%dz_turb_in', 'Echo flag', ErrStat2, ErrMsg2); call check() - if(Failed()) return - - CALL AllocAry( InputFileData%TI_Grid_In,GridZ,GridY,'InputFileData%TI_Grid_In', ErrStat2, ErrMsg2); - if(Failed()) return - DO cou1=1,size(InputFileData%TI_Grid_In,1) - read(UnIn,*) InputFileData%TI_Grid_In(cou1,:) - ENDDO - !---------------------- END OF FILE ----------------------------------------- - CALL Cleanup( ) - -CONTAINS - logical function Failed() - call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) - Failed = ErrStat >= AbortErrLev - if(Failed) call cleanup() - end function Failed - SUBROUTINE Check() - CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) - END SUBROUTINE Check - SUBROUTINE Cleanup() - IF (UnIn > 0) CLOSE ( UnIn ) - END SUBROUTINE Cleanup -END SUBROUTINE REadTICalcTables -!---------------------------------------------------------------------------------------------------------------------------------- !> This routine validates the inputs from the AeroDyn input files. SUBROUTINE ValidateInputData( InputFileData, NumBl, ErrStat, ErrMsg ) type(AA_InputFile), intent(in) :: InputFileData !< All the data in the AeroDyn input file diff --git a/modules/aerodyn/src/AeroAcoustics_Registry.txt b/modules/aerodyn/src/AeroAcoustics_Registry.txt index a0c314e776..b01f3061dc 100644 --- a/modules/aerodyn/src/AeroAcoustics_Registry.txt +++ b/modules/aerodyn/src/AeroAcoustics_Registry.txt @@ -74,11 +74,11 @@ typedef ^ AA_InputFile ReKi ObsZ typedef ^ AA_InputFile AA_BladePropsType BladeProps {:} - - "blade property information from blade input files" - typedef ^ AA_InputFile IntKi NrOutFile - - - "Nr of output files" - typedef ^ AA_InputFile CHARACTER(1024) AAoutfile {:} - - "AAoutfile for writing output files" - -typedef ^ AA_InputFile CHARACTER(1024) TICalcTabFile - - - "Name of the file containing the table for incident turbulence intensity" - typedef ^ AA_InputFile CHARACTER(1024) FTitle - - - "File Title: the 2nd line of the input file, which contains a description of its contents" - typedef ^ AA_InputFile DBKi AAStart - - - "Time after which to calculate AA" s +typedef ^ AA_InputFile ReKi TI - - - "Average rotor incident turbulence intensity" - +typedef ^ AA_InputFile ReKi avgV - - - "Average wind speed" - typedef ^ AA_InputFile ReKi Lturb - - - "Turbulent lengthscale in Amiet model" - -typedef ^ AA_InputFile ReKi AvgV - - - "Average wind speed to compute incident turbulence intensity" m typedef ^ AA_InputFile ReKi ReListBL {:} - - "" typedef ^ AA_InputFile ReKi AoAListBL {:} - - "" deg typedef ^ AA_InputFile ReKi Pres_DispThick {:}{:}{:} - - "" @@ -89,9 +89,6 @@ typedef ^ AA_InputFile ReKi Pres_Cf typedef ^ AA_InputFile ReKi Suct_Cf {:}{:}{:} - - "" typedef ^ AA_InputFile ReKi Pres_EdgeVelRat {:}{:}{:} - - "" typedef ^ AA_InputFile ReKi Suct_EdgeVelRat {:}{:}{:} - - "" -typedef ^ AA_InputFile ReKi TI_Grid_In {:}{:} - - "" -typedef ^ AA_InputFile ReKi dz_turb_in - - - "" m -typedef ^ AA_InputFile ReKi dy_turb_in - - - "" m # ..... States .................................................................................................................... # Define continuous (differentiable) states here: @@ -184,10 +181,8 @@ typedef ^ ParameterType IntKi total_s typedef ^ ParameterType IntKi AA_Bl_Prcntge - - - "The Percentage of the Blade which the noise is calculated" % typedef ^ ParameterType IntKi startnode - - - "Corersponding node to the noise calculation percentage of the blade" - typedef ^ ParameterType ReKi Lturb - - - "Turbulent lengthscale in Amiet model" m -typedef ^ ParameterType ReKi AvgV - - - "Average wind speed to compute incident turbulence intensity" m -typedef ^ ParameterType ReKi dz_turb_in - - - "" m -typedef ^ ParameterType ReKi dy_turb_in - - - "" m -typedef ^ ParameterType ReKi TI_Grid_In {:}{:} - - "" +typedef ^ ParameterType ReKi avgV - - - "Average wind speed to compute incident turbulence intensity" m +typedef ^ ParameterType ReKi TI - - - "Rotor incident turbulent intensity" typedef ^ ParameterType CHARACTER(1024) FTitle - - - "File Title: the 2nd line of the input file, which contains a description of its contents" - # parameters for output diff --git a/modules/aerodyn/src/AeroAcoustics_Types.f90 b/modules/aerodyn/src/AeroAcoustics_Types.f90 index 5829bb13f3..8fbc988cf8 100644 --- a/modules/aerodyn/src/AeroAcoustics_Types.f90 +++ b/modules/aerodyn/src/AeroAcoustics_Types.f90 @@ -94,11 +94,11 @@ MODULE AeroAcoustics_Types TYPE(AA_BladePropsType) , DIMENSION(:), ALLOCATABLE :: BladeProps !< blade property information from blade input files [-] INTEGER(IntKi) :: NrOutFile = 0_IntKi !< Nr of output files [-] CHARACTER(1024) , DIMENSION(:), ALLOCATABLE :: AAoutfile !< AAoutfile for writing output files [-] - CHARACTER(1024) :: TICalcTabFile !< Name of the file containing the table for incident turbulence intensity [-] CHARACTER(1024) :: FTitle !< File Title: the 2nd line of the input file, which contains a description of its contents [-] REAL(DbKi) :: AAStart = 0.0_R8Ki !< Time after which to calculate AA [s] + REAL(ReKi) :: TI = 0.0_ReKi !< Average rotor incident turbulence intensity [-] + REAL(ReKi) :: avgV = 0.0_ReKi !< Average wind speed [-] REAL(ReKi) :: Lturb = 0.0_ReKi !< Turbulent lengthscale in Amiet model [-] - REAL(ReKi) :: AvgV = 0.0_ReKi !< Average wind speed to compute incident turbulence intensity [m] REAL(ReKi) , DIMENSION(:), ALLOCATABLE :: ReListBL !< [-] REAL(ReKi) , DIMENSION(:), ALLOCATABLE :: AoAListBL !< [deg] REAL(ReKi) , DIMENSION(:,:,:), ALLOCATABLE :: Pres_DispThick !< [-] @@ -109,9 +109,6 @@ MODULE AeroAcoustics_Types REAL(ReKi) , DIMENSION(:,:,:), ALLOCATABLE :: Suct_Cf !< [-] REAL(ReKi) , DIMENSION(:,:,:), ALLOCATABLE :: Pres_EdgeVelRat !< [-] REAL(ReKi) , DIMENSION(:,:,:), ALLOCATABLE :: Suct_EdgeVelRat !< [-] - REAL(ReKi) , DIMENSION(:,:), ALLOCATABLE :: TI_Grid_In !< [-] - REAL(ReKi) :: dz_turb_in = 0.0_ReKi !< [m] - REAL(ReKi) :: dy_turb_in = 0.0_ReKi !< [m] END TYPE AA_InputFile ! ======================= ! ========= AA_ContinuousStateType ======= @@ -212,10 +209,8 @@ MODULE AeroAcoustics_Types INTEGER(IntKi) :: AA_Bl_Prcntge = 0_IntKi !< The Percentage of the Blade which the noise is calculated [%] INTEGER(IntKi) :: startnode = 0_IntKi !< Corersponding node to the noise calculation percentage of the blade [-] REAL(ReKi) :: Lturb = 0.0_ReKi !< Turbulent lengthscale in Amiet model [m] - REAL(ReKi) :: AvgV = 0.0_ReKi !< Average wind speed to compute incident turbulence intensity [m] - REAL(ReKi) :: dz_turb_in = 0.0_ReKi !< [m] - REAL(ReKi) :: dy_turb_in = 0.0_ReKi !< [m] - REAL(ReKi) , DIMENSION(:,:), ALLOCATABLE :: TI_Grid_In !< [-] + REAL(ReKi) :: avgV = 0.0_ReKi !< Average wind speed to compute incident turbulence intensity [m] + REAL(ReKi) :: TI = 0.0_ReKi !< Rotor incident turbulent intensity [-] CHARACTER(1024) :: FTitle !< File Title: the 2nd line of the input file, which contains a description of its contents [-] character(20) :: outFmt !< Format specifier [-] INTEGER(IntKi) :: NrOutFile = 0_IntKi !< Nr of output files [-] @@ -776,11 +771,11 @@ subroutine AA_CopyInputFile(SrcInputFileData, DstInputFileData, CtrlCode, ErrSta end if DstInputFileData%AAoutfile = SrcInputFileData%AAoutfile end if - DstInputFileData%TICalcTabFile = SrcInputFileData%TICalcTabFile DstInputFileData%FTitle = SrcInputFileData%FTitle DstInputFileData%AAStart = SrcInputFileData%AAStart + DstInputFileData%TI = SrcInputFileData%TI + DstInputFileData%avgV = SrcInputFileData%avgV DstInputFileData%Lturb = SrcInputFileData%Lturb - DstInputFileData%AvgV = SrcInputFileData%AvgV if (allocated(SrcInputFileData%ReListBL)) then LB(1:1) = lbound(SrcInputFileData%ReListBL, kind=B8Ki) UB(1:1) = ubound(SrcInputFileData%ReListBL, kind=B8Ki) @@ -901,20 +896,6 @@ subroutine AA_CopyInputFile(SrcInputFileData, DstInputFileData, CtrlCode, ErrSta end if DstInputFileData%Suct_EdgeVelRat = SrcInputFileData%Suct_EdgeVelRat end if - if (allocated(SrcInputFileData%TI_Grid_In)) then - LB(1:2) = lbound(SrcInputFileData%TI_Grid_In, kind=B8Ki) - UB(1:2) = ubound(SrcInputFileData%TI_Grid_In, kind=B8Ki) - if (.not. allocated(DstInputFileData%TI_Grid_In)) then - allocate(DstInputFileData%TI_Grid_In(LB(1):UB(1),LB(2):UB(2)), stat=ErrStat2) - if (ErrStat2 /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating DstInputFileData%TI_Grid_In.', ErrStat, ErrMsg, RoutineName) - return - end if - end if - DstInputFileData%TI_Grid_In = SrcInputFileData%TI_Grid_In - end if - DstInputFileData%dz_turb_in = SrcInputFileData%dz_turb_in - DstInputFileData%dy_turb_in = SrcInputFileData%dy_turb_in end subroutine subroutine AA_DestroyInputFile(InputFileData, ErrStat, ErrMsg) @@ -979,9 +960,6 @@ subroutine AA_DestroyInputFile(InputFileData, ErrStat, ErrMsg) if (allocated(InputFileData%Suct_EdgeVelRat)) then deallocate(InputFileData%Suct_EdgeVelRat) end if - if (allocated(InputFileData%TI_Grid_In)) then - deallocate(InputFileData%TI_Grid_In) - end if end subroutine subroutine AA_PackInputFile(RF, Indata) @@ -1020,11 +998,11 @@ subroutine AA_PackInputFile(RF, Indata) end if call RegPack(RF, InData%NrOutFile) call RegPackAlloc(RF, InData%AAoutfile) - call RegPack(RF, InData%TICalcTabFile) call RegPack(RF, InData%FTitle) call RegPack(RF, InData%AAStart) + call RegPack(RF, InData%TI) + call RegPack(RF, InData%avgV) call RegPack(RF, InData%Lturb) - call RegPack(RF, InData%AvgV) call RegPackAlloc(RF, InData%ReListBL) call RegPackAlloc(RF, InData%AoAListBL) call RegPackAlloc(RF, InData%Pres_DispThick) @@ -1035,9 +1013,6 @@ subroutine AA_PackInputFile(RF, Indata) call RegPackAlloc(RF, InData%Suct_Cf) call RegPackAlloc(RF, InData%Pres_EdgeVelRat) call RegPackAlloc(RF, InData%Suct_EdgeVelRat) - call RegPackAlloc(RF, InData%TI_Grid_In) - call RegPack(RF, InData%dz_turb_in) - call RegPack(RF, InData%dy_turb_in) if (RegCheckErr(RF, RoutineName)) return end subroutine @@ -1083,11 +1058,11 @@ subroutine AA_UnPackInputFile(RF, OutData) end if call RegUnpack(RF, OutData%NrOutFile); if (RegCheckErr(RF, RoutineName)) return call RegUnpackAlloc(RF, OutData%AAoutfile); if (RegCheckErr(RF, RoutineName)) return - call RegUnpack(RF, OutData%TICalcTabFile); if (RegCheckErr(RF, RoutineName)) return call RegUnpack(RF, OutData%FTitle); if (RegCheckErr(RF, RoutineName)) return call RegUnpack(RF, OutData%AAStart); if (RegCheckErr(RF, RoutineName)) return + call RegUnpack(RF, OutData%TI); if (RegCheckErr(RF, RoutineName)) return + call RegUnpack(RF, OutData%avgV); if (RegCheckErr(RF, RoutineName)) return call RegUnpack(RF, OutData%Lturb); if (RegCheckErr(RF, RoutineName)) return - call RegUnpack(RF, OutData%AvgV); if (RegCheckErr(RF, RoutineName)) return call RegUnpackAlloc(RF, OutData%ReListBL); if (RegCheckErr(RF, RoutineName)) return call RegUnpackAlloc(RF, OutData%AoAListBL); if (RegCheckErr(RF, RoutineName)) return call RegUnpackAlloc(RF, OutData%Pres_DispThick); if (RegCheckErr(RF, RoutineName)) return @@ -1098,9 +1073,6 @@ subroutine AA_UnPackInputFile(RF, OutData) call RegUnpackAlloc(RF, OutData%Suct_Cf); if (RegCheckErr(RF, RoutineName)) return call RegUnpackAlloc(RF, OutData%Pres_EdgeVelRat); if (RegCheckErr(RF, RoutineName)) return call RegUnpackAlloc(RF, OutData%Suct_EdgeVelRat); if (RegCheckErr(RF, RoutineName)) return - call RegUnpackAlloc(RF, OutData%TI_Grid_In); if (RegCheckErr(RF, RoutineName)) return - call RegUnpack(RF, OutData%dz_turb_in); if (RegCheckErr(RF, RoutineName)) return - call RegUnpack(RF, OutData%dy_turb_in); if (RegCheckErr(RF, RoutineName)) return end subroutine subroutine AA_CopyContState(SrcContStateData, DstContStateData, CtrlCode, ErrStat, ErrMsg) @@ -2000,21 +1972,8 @@ subroutine AA_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg) DstParamData%AA_Bl_Prcntge = SrcParamData%AA_Bl_Prcntge DstParamData%startnode = SrcParamData%startnode DstParamData%Lturb = SrcParamData%Lturb - DstParamData%AvgV = SrcParamData%AvgV - DstParamData%dz_turb_in = SrcParamData%dz_turb_in - DstParamData%dy_turb_in = SrcParamData%dy_turb_in - if (allocated(SrcParamData%TI_Grid_In)) then - LB(1:2) = lbound(SrcParamData%TI_Grid_In, kind=B8Ki) - UB(1:2) = ubound(SrcParamData%TI_Grid_In, kind=B8Ki) - if (.not. allocated(DstParamData%TI_Grid_In)) then - allocate(DstParamData%TI_Grid_In(LB(1):UB(1),LB(2):UB(2)), stat=ErrStat2) - if (ErrStat2 /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating DstParamData%TI_Grid_In.', ErrStat, ErrMsg, RoutineName) - return - end if - end if - DstParamData%TI_Grid_In = SrcParamData%TI_Grid_In - end if + DstParamData%avgV = SrcParamData%avgV + DstParamData%TI = SrcParamData%TI DstParamData%FTitle = SrcParamData%FTitle DstParamData%outFmt = SrcParamData%outFmt DstParamData%NrOutFile = SrcParamData%NrOutFile @@ -2340,9 +2299,6 @@ subroutine AA_DestroyParam(ParamData, ErrStat, ErrMsg) if (allocated(ParamData%Aweight)) then deallocate(ParamData%Aweight) end if - if (allocated(ParamData%TI_Grid_In)) then - deallocate(ParamData%TI_Grid_In) - end if if (allocated(ParamData%OutParam)) then LB(1:1) = lbound(ParamData%OutParam, kind=B8Ki) UB(1:1) = ubound(ParamData%OutParam, kind=B8Ki) @@ -2468,10 +2424,8 @@ subroutine AA_PackParam(RF, Indata) call RegPack(RF, InData%AA_Bl_Prcntge) call RegPack(RF, InData%startnode) call RegPack(RF, InData%Lturb) - call RegPack(RF, InData%AvgV) - call RegPack(RF, InData%dz_turb_in) - call RegPack(RF, InData%dy_turb_in) - call RegPackAlloc(RF, InData%TI_Grid_In) + call RegPack(RF, InData%avgV) + call RegPack(RF, InData%TI) call RegPack(RF, InData%FTitle) call RegPack(RF, InData%outFmt) call RegPack(RF, InData%NrOutFile) @@ -2573,10 +2527,8 @@ subroutine AA_UnPackParam(RF, OutData) call RegUnpack(RF, OutData%AA_Bl_Prcntge); if (RegCheckErr(RF, RoutineName)) return call RegUnpack(RF, OutData%startnode); if (RegCheckErr(RF, RoutineName)) return call RegUnpack(RF, OutData%Lturb); if (RegCheckErr(RF, RoutineName)) return - call RegUnpack(RF, OutData%AvgV); if (RegCheckErr(RF, RoutineName)) return - call RegUnpack(RF, OutData%dz_turb_in); if (RegCheckErr(RF, RoutineName)) return - call RegUnpack(RF, OutData%dy_turb_in); if (RegCheckErr(RF, RoutineName)) return - call RegUnpackAlloc(RF, OutData%TI_Grid_In); if (RegCheckErr(RF, RoutineName)) return + call RegUnpack(RF, OutData%avgV); if (RegCheckErr(RF, RoutineName)) return + call RegUnpack(RF, OutData%TI); if (RegCheckErr(RF, RoutineName)) return call RegUnpack(RF, OutData%FTitle); if (RegCheckErr(RF, RoutineName)) return call RegUnpack(RF, OutData%outFmt); if (RegCheckErr(RF, RoutineName)) return call RegUnpack(RF, OutData%NrOutFile); if (RegCheckErr(RF, RoutineName)) return diff --git a/reg_tests/r-test b/reg_tests/r-test index f5b6457e8c..8e5ffc8149 160000 --- a/reg_tests/r-test +++ b/reg_tests/r-test @@ -1 +1 @@ -Subproject commit f5b6457e8c763f187cefa30b3cb7d72ad5d725f4 +Subproject commit 8e5ffc814960d350733689c455980109f1d2bacb