Skip to content

Commit

Permalink
Noise: removed TInoise, cleanup of TNO module
Browse files Browse the repository at this point in the history
  • Loading branch information
ebranlard committed Dec 12, 2019
1 parent 0aa6752 commit 11215bd
Show file tree
Hide file tree
Showing 62 changed files with 26 additions and 6,092 deletions.
48 changes: 2 additions & 46 deletions modules/aerodyn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,59 +24,15 @@ set(TNO_SOURCES
)
add_library(TNO ${TNO_SOURCES})

# AeroAcoustics - TINoise
set(FULLGUIDATI_SOURCES
src/AeroAcoustics/TINoise/CDA0.f90
src/AeroAcoustics/TINoise/CDI0.f90
src/AeroAcoustics/TINoise/DETCP.f90
src/AeroAcoustics/TINoise/DETFIELD.f90
src/AeroAcoustics/TINoise/DETSPL.f90
src/AeroAcoustics/TINoise/DETSTR.f90
src/AeroAcoustics/TINoise/FLAT.f90
src/AeroAcoustics/TINoise/FUNCS_LM.f90
src/AeroAcoustics/TINoise/HANK0.f90
src/AeroAcoustics/TINoise/HANK1.f90
src/AeroAcoustics/TINoise/INICON.f90
src/AeroAcoustics/TINoise/odeint.f90
src/AeroAcoustics/TINoise/PRESOUR.f90
src/AeroAcoustics/TINoise/READIN.f90
src/AeroAcoustics/TINoise/RHSINT.f90
src/AeroAcoustics/TINoise/rkck.f90
src/AeroAcoustics/TINoise/rkqs.f90
src/AeroAcoustics/TINoise/SETMATA.f90
src/AeroAcoustics/TINoise/SETMAT.f90
src/AeroAcoustics/TINoise/SETRHSA.f90
src/AeroAcoustics/TINoise/SETRHS.f90
src/AeroAcoustics/TINoise/SOLSEQA.f90
src/AeroAcoustics/TINoise/SOLSEQ.f90
src/AeroAcoustics/TINoise/SPL_E0A.f90
src/AeroAcoustics/TINoise/SPL_E1A.f90
src/AeroAcoustics/TINoise/SPL_EX1.f90
src/AeroAcoustics/TINoise/SPL_EX2.f90
src/AeroAcoustics/TINoise/SPL_EX3.f90
src/AeroAcoustics/TINoise/SPL_EX.f90
src/AeroAcoustics/TINoise/SPL_PA.f90
src/AeroAcoustics/TINoise/SPL_P.f90
src/AeroAcoustics/TINoise/SPL_PPA.f90
src/AeroAcoustics/TINoise/SPL_PP.f90
src/AeroAcoustics/TINoise/STREAM.f90
src/AeroAcoustics/TINoise/TI_Noise.f90
src/AeroAcoustics/TINoise/TINoiseMods.f90
src/AeroAcoustics/TINoise/WAKE.f90
)
add_library(FullGuidati ${FULLGUIDATI_SOURCES})


# AeroAcoustics - Main
set(AEROACOUSTIC_SOURCES
src/AeroAcoustics/AeroAcoustics.f90
src/AeroAcoustics/AeroAcoustics_IO.f90
src/AeroAcoustics_Types.f90
# this target shouldnt depend on airfoilinfo as this creates a circular reference
src/AirfoilInfo_Types.f90
)
add_library(AeroAcoustics ${AEROACOUSTIC_SOURCES})
target_link_libraries(AeroAcoustics nwtclibs FullGuidati TNO)
target_link_libraries(AeroAcoustics nwtclibs TNO)

if (GENERATE_TYPES)
generate_f90_types(src/AeroAcoustics_Registry.txt ${CMAKE_CURRENT_LIST_DIR}/src/AeroAcoustics_Types.f90)
Expand Down Expand Up @@ -128,7 +84,7 @@ set(UA_DRIVER_SOURCES
add_executable(unsteadyaero_driver ${UA_DRIVER_SOURCES})
target_link_libraries(unsteadyaero_driver aerodynlib nwtclibs versioninfolib ${CMAKE_DL_LIBS})

install(TARGETS unsteadyaero_driver aerodyn_driver aerodynlib AeroAcoustics FullGuidati TNO
install(TARGETS unsteadyaero_driver aerodyn_driver aerodynlib AeroAcoustics TNO
EXPORT "${CMAKE_PROJECT_NAME}Libraries"
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
Expand Down
23 changes: 12 additions & 11 deletions modules/aerodyn/src/AeroAcoustics/AeroAcoustics.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2221,11 +2221,10 @@ END SUBROUTINE Simple_Guidati
!================================ Turbulent Boundary Layer Trailing Edge Noise ====================================================!
!=================================================== TNO START ====================================================================!
SUBROUTINE TBLTE_TNO(ALPSTAR,C,U,THETA,PHI,D,R,Cfall,d99all,EdgeVelAll,p,SPLP,SPLS,SPLALPH,SPLTBL,errStat,errMsgn)
USE TNOConstants
USE Atmosphere
USE Wavenumber
USE BLParams
USE AirfoilParams
USE TNOConstants, only: limit, omega ! NOTE: omega is not a constant at all (used in int1 and int2)
USE Atmosphere, only: nu, co, rho
USE BLParams, only: Cf, d99, edgevel
USE AirfoilParams, only: Mach, ISSUCTION
REAL(ReKi), INTENT(IN ) :: ALPSTAR !< AOA (deg)
REAL(ReKi), INTENT(IN ) :: C !< Chord Length (m)
REAL(ReKi), INTENT(IN ) :: U !< Unoise (m/s)
Expand Down Expand Up @@ -2265,6 +2264,7 @@ SUBROUTINE TBLTE_TNO(ALPSTAR,C,U,THETA,PHI,D,R,Cfall,d99all,EdgeVelAll,p,SPLP,SP
INTEGER (4) :: iord (limit)
INTEGER (4) :: last
INTEGER (4) :: n_freq,i_low,i_hi
INTEGER (4) :: i_omega
REAL(kind=4), EXTERNAL :: int2
! Init
n_freq = size(p%FreqList)
Expand All @@ -2277,18 +2277,19 @@ SUBROUTINE TBLTE_TNO(ALPSTAR,C,U,THETA,PHI,D,R,Cfall,d99all,EdgeVelAll,p,SPLP,SP
epsabs = 1e-10 !absolute accuracy
epsrel = 1e-10 !relative accuracy
band_ratio = 2.**(1./3.)
! Reynolds number and mach number
! Module AirfoilParams
Mach = real(U / p%SpdSound)
co = real(p%SpdSound )
! Module Atmosphere
co = real(p%SpdSound)
rho = real(p%AirDens)
nu = real(p%KinVisc)
! Directivity function
CALL DIRECTH(REAL(Mach),THETA,PHI,DBARH,errStat2,errMsg2)
CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsgn, RoutineName )
! Type conversions
! Module BlParams
Cf = real(Cfall )
d99 = real(d99all )
edgevel = real(ABS(EdgeVelAll))
rho = real(p%AirDens)
nu = real(p%KinVisc)

do i_omega = 1,n_freq
omega = 2.*pi*freq(i_omega)
Expand All @@ -2302,7 +2303,7 @@ SUBROUTINE TBLTE_TNO(ALPSTAR,C,U,THETA,PHI,D,R,Cfall,d99all,EdgeVelAll,p,SPLP,SP
write(*,*) 'Suction Cf is less than zero, Cf = ',Cf(1)
write(*,*) 'Using BPM'
ELSE
CALL qk61(int2,a,b,answer,abserr,resabs,resasc)
CALL qk61(int2,a,b,answer,abserr,resabs,resasc) ! TODO add omega as argument
Spectrum = D/(4.*pi*R**2.)*answer
SPL_suction = 10*log10(Spectrum*DBARH/2.e-5/2.e-5)
SPLS(i_omega) = SPL_suction + 10*log10(band_width)
Expand Down
181 changes: 0 additions & 181 deletions modules/aerodyn/src/AeroAcoustics/TINoise/CDA0.f90

This file was deleted.

Loading

0 comments on commit 11215bd

Please sign in to comment.