Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
29d5ffb
AeroAcoustics: fix some error handling
bjonkman Jul 16, 2025
4eefa09
AeroAcoustics: check for unallocated array before using it
bjonkman Jul 16, 2025
f09aa56
AA: use MOVE_ALLOC, remove loops for whole-array initialization to 0
bjonkman Jul 16, 2025
50c5825
AA: change index order for y%PtotalFreq
bjonkman Jul 16, 2025
8368bb9
AA: change index order for y%SumSpecNoiseSep
bjonkman Jul 16, 2025
1e0b5f8
Fix issue from f09aa56d2
bjonkman Jul 16, 2025
e9e99e6
AA: efficiency improvements in BL_Param_Interp
bjonkman Jul 16, 2025
8726804
AA: remove unused y%OutLECoords variable
bjonkman Jul 16, 2025
ccf2c6e
AA: remove unnecessary y%OASPL_Mech variable
bjonkman Jul 16, 2025
f90f06d
AA: remove unused y%SumSpecNoise
bjonkman Jul 16, 2025
0e07ccb
AA: fix formatting for header of *4.out file
bjonkman Jul 17, 2025
ecbc6ec
AA: update names for output files
bjonkman Jul 17, 2025
7d2cc72
AA: Echo file + error handling in input file reading
bjonkman Jul 17, 2025
2a83239
AA: use parameters for readability
bjonkman Jul 17, 2025
5065eab
AA: Add Observer file locations to echo file
bjonkman Jul 17, 2025
b71fd43
AA: fix error in check added in ecbc6e
bjonkman Jul 17, 2025
ca8ab7b
AA: use more MOVE_ALLOC statements
bjonkman Jul 21, 2025
c18da61
AA: check that BL tables are entered in increasing order
bjonkman Jul 21, 2025
5413c95
AA: set minimum value for U
bjonkman Jul 21, 2025
39f66f8
AA: make sure AoA is entered between -180 and 180 deg for interpolation
bjonkman Jul 21, 2025
d0fffdd
AA: remove some unused variables
bjonkman Jul 22, 2025
dffab08
AA: replace multiple IF statements with ELSEIF
bjonkman Jul 22, 2025
5abb34a
AA: fix more if/else statements; update comments; initialize variables
bjonkman Jul 22, 2025
3093d33
AA: more cleanup
bjonkman Jul 22, 2025
1745e32
AA: Update BL_Param_Interp algorithm
bjonkman Jul 22, 2025
2dd30f4
AA cleanup
bjonkman Jul 23, 2025
a8dbfc3
- Removed unnecessary error stat variables from more routines that di…
bjonkman Jul 24, 2025
94e2865
SLATECK: fix INTENT() on return values
bjonkman Jul 29, 2025
f30eb85
AA cleanup + option to put AA in AD WriteOutput instead of separate file
bjonkman Jul 30, 2025
efcebdb
AA: check index for discrete states
bjonkman Jul 30, 2025
dc6dd74
AA: make sure we don't take LOG10(0)
bjonkman Jul 30, 2025
417fd3f
ADI: don't call AD_End more than once
bjonkman Jul 31, 2025
bca975c
AA: minor cleanup
bjonkman Jul 31, 2025
e412d47
AeroAcoustics cleanup
bjonkman Aug 5, 2025
97ea659
Merge remote-tracking branch 'NREL/dev' into b/AeroAcoustics
bjonkman Aug 5, 2025
0a7b93a
AA: mod output channel names
bjonkman Aug 5, 2025
63243f1
AA: add LOG10AA routine
bjonkman Aug 6, 2025
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
12 changes: 7 additions & 5 deletions docs/source/user/aerodyn-aeroacoustics/App-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,22 @@ Finally, the set Outputs contains a few options for the output data:
levels are reported with (True) or without (False) the A-weighting
correction; see :numref:`aa-sec-ModelUsage`.

- **NAAOutFile** – Integer 1/2/3: flag to set the desired output file. When
- **NAAOutFile** – Integer 1/2/3/4: flag to set the desired output file. When
set to 1, a value of overall sound pressure level at every **DT_AA** time
step per observer is printed to file. When set to 2, the first output
is accompanied by a second file where the total sound pressure level
spectrum is printed per time step per observer. When set to
3, the two first outputs are accompanied by a third file where the
3, the two first output files are accompanied by a third file where the
sound pressure level spectrum per noise mechanism is printed per time
step per observer. When set to 4, a fourth file is generated with the
values of overall sound pressure levels per node, per blade,
per observer, and per time step.

- The following line contains the file name used to store the outputs.
The file name is attached with a 1, 2, 3, and 4 flag based on the
**NAAOutFile** options.
- The following line, **AAOutFile**, contains the root name for the files
used to store the outputs. If set to "default", the default output file
root name will be used.
The file name is appended with a 1, 2, 3, and 4 flag based on the
**NAAOutFile** options.

The file must be closed by an END command.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ True RoundedTip - Logical indicating rounded tip (flag) [Only used if
====== Outputs ====================================================================================
False AWeighting - A-weighting Flag (flag)
3 NrOutFile - Number of Output files. 1 for Time Dependent Overall SPL, 2 for both 1 and Frequency and Time Dependent SPL as well, or 3 for both 1 and 2 and Acoustics mechanism dependent, 4 for 1-3 and the overall sound pressure levels per blade per node per observer
"IEA_LB_RWT-AeroAcoustics_" AAOutFile - No Extension needed the resulting file will have .out Name of file containing
"IEA_LB_RWT-AeroAcoustics_" AAOutFile - No Extension needed; the resulting file(s) will end in #.out. Use "Default" to use the default output file name from OpenFAST.
END of input file (the word "END" must appear in the first 3 columns of this last OutList line)
---------------------------------------------------------------------------------------
1,975 changes: 929 additions & 1,046 deletions modules/aerodyn/src/AeroAcoustics.f90

Large diffs are not rendered by default.

805 changes: 394 additions & 411 deletions modules/aerodyn/src/AeroAcoustics_IO.f90

Large diffs are not rendered by default.

76 changes: 25 additions & 51 deletions modules/aerodyn/src/AeroAcoustics_Registry.txt

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions modules/aerodyn/src/AeroAcoustics_TNO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ MODULE TNO
use NWTC_SLATEC ! slatec_qk61 -- which is all that is in that library right now.

implicit none
PRIVATE
PUBLIC :: SPL_integrate

INTEGER, PARAMETER :: TNOKi = ReKi
Expand Down Expand Up @@ -63,8 +64,10 @@ function SPL_integrate(Omega,limits,ISSUCTION, &
! Set module values from input
ISSUCTION_TNO = ISSUCTION
Omega_TNO = real(Omega,TNOKi)

! Mach number of segment
Mach_TNO = real(Mach,TNOKi)

! Atmospheric values
co = real(SpdSound, TNOKi)
rho = real(AirDens, TNOKi)
Expand Down Expand Up @@ -158,10 +161,10 @@ FUNCTION f_int1(x2)
END FUNCTION f_int1


FUNCTION f_int2(k1) ! changed name from 'int2' to avoid conflicts with intrinsic of same name
REAL (TNOKi), intent(in) :: k1
FUNCTION f_int2(k1_in) ! changed name from 'int2' to avoid conflicts with intrinsic of same name
REAL (TNOKi), intent(in) :: k1_in
REAL (TNOKi) :: f_int2
f_int2 = Omega_TNO/co/k1*Pressure(k1)
f_int2 = Omega_TNO/co/k1_in*Pressure(k1_in)
RETURN
END FUNCTION f_int2

Expand Down
672 changes: 152 additions & 520 deletions modules/aerodyn/src/AeroAcoustics_Types.f90

Large diffs are not rendered by default.

124 changes: 91 additions & 33 deletions modules/aerodyn/src/AeroDyn.f90

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions modules/aerodyn/src/AeroDyn_AllBldNdOuts_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ SUBROUTINE AllBldNdOuts_InitOut( InitOut, p, InputFileData, ErrStat, ErrMsg )
! Populate the header an unit lines for all blades and nodes
! First set a counter so we know where in the output array we are in
! NOTE: we populate invalid names as well (some names are not valid outputs for certain configurations). That means we will have zeros in those values.
INDX = p%NumOuts + 1 ! p%NumOuts is the number of outputs from the normal AeroDyn output. The WriteOutput array is sized to p%NumOuts + num(AllBldNdOuts)
INDX = p%NumOuts + p%AA%numOuts + 1 ! The WriteOutput array is sized to p%NumOuts + p%AA%numOuts + AllBldNdOuts

DO IdxChan=1,p%BldNd_NumOuts

Expand Down Expand Up @@ -327,7 +327,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, RotI

! Populate the header an unit lines for all blades and nodes
! First set a counter so we know where in the output array we are in
iOut = p%NumOuts + 1 ! p%NumOuts is the number of outputs from the normal AeroDyn output. The WriteOutput array is sized to p%NumOuts + num(AllBldNdOuts)
iOut = p%NumOuts + p%AA%numOuts + 1 ! p%NumOuts is the number of outputs from the normal AeroDyn output. The WriteOutput array is sized to p%NumOuts + p%AA%numOuts + num(AllBldNdOuts)


! Case to assign output to this channel and populate based on Indx value (this indicates what the channel is)
Expand Down
4 changes: 2 additions & 2 deletions modules/aerodyn/src/AeroDyn_Driver_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -449,17 +449,17 @@ subroutine Init_ADI_ForDriver(iCase, ADI, dvr, FED, dt, needInitIW, errStat, err
! UA does not like changes of dt between cases
if ( .not. EqualRealNos(ADI%p%AD%DT, dt) ) then
call WrScr('Info: dt is changing between cases, AeroDyn will be re-initialized')
call ADI_End( ADI%u(1:1), ADI%p, ADI%x(1), ADI%xd(1), ADI%z(1), ADI%OtherState(1), ADI%y, ADI%m, errStat2, errMsg2); call SetErrStat(errStat2, errMsg2, errStat, errMsg, 'Init_ADI_ForDriver'); if(Failed()) return
!call AD_Dvr_DestroyAeroDyn_Data (AD , errStat2, errMsg2); call SetErrStat(errStat2, errMsg2, errStat, errMsg, RoutineName)
needInit=.true.
endif
if (ADI%p%AD%Wake_Mod == WakeMod_FVW) then
call WrScr('[INFO] OLAF is used, AeroDyn will be re-initialized')
needInit=.true.
endif

if (needInit) then
call ADI_End( ADI%u(1:1), ADI%p, ADI%x(1), ADI%xd(1), ADI%z(1), ADI%OtherState(1), ADI%y, ADI%m, errStat2, errMsg2); call SetErrStat(errStat2, errMsg2, errStat, errMsg, 'Init_ADI_ForDriver'); if(Failed()) return
endif

endif

! if wind profile changed in a combined case, need to re-init
Expand Down
1 change: 0 additions & 1 deletion modules/aerodyn/src/AeroDyn_Inflow.f90
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ subroutine ADI_CalcOutput(t, u, p, x, xd, z, OtherState, y, m, errStat, errMsg)

integer(IntKi) :: errStat2
character(errMsgLen) :: errMsg2
integer(IntKi) :: node
character(*), parameter :: RoutineName = 'ADI_CalcOutput'
integer :: iWT
errStat = ErrID_None
Expand Down
6 changes: 3 additions & 3 deletions modules/nwtc-library/src/NetLib/slatec/NWTC_SLATEC.f90
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ MODULE NWTC_SLATEC


!> Single precision wrapper for the qk61 integration routine from the slatec library
!! Note that the qk61 routine follows -fdefault-real-8 setting, so it is of type ReKi
!! Note that the qk61 routine follows -fdefault-real-4 setting, so it is of type ReKi
subroutine wrap_qk61(func,low,hi,answer,abserr,resabs,resasc)
real(R4Ki), intent(in ) :: low,hi ! integration limits
real(R4Ki), intent( out) :: answer
real(R4Ki), intent(in ) :: abserr,resabs,resasc
real(R4Ki), intent( out) :: abserr,resabs,resasc
real(R4Ki), external :: func ! function
call qk61(func,low,hi,answer,abserr,resabs,resasc)
end subroutine wrap_qk61
Expand All @@ -59,7 +59,7 @@ end subroutine wrap_qk61
subroutine wrap_dqk61(func,low,hi,answer,abserr,resabs,resasc)
real(R8Ki), intent(in ) :: low,hi ! integration limits
real(R8Ki), intent( out) :: answer
real(R8Ki), intent(in ) :: abserr,resabs,resasc
real(R8Ki), intent( out) :: abserr,resabs,resasc
real(R8Ki), external :: func ! function
call dqk61(func,low,hi,answer,abserr,resabs,resasc)
end subroutine wrap_dqk61
Expand Down