From e4e813093c17f5efbaf160915dd8a07656e9c857 Mon Sep 17 00:00:00 2001 From: Emmanuel Branlard Date: Thu, 23 Jan 2020 13:32:38 -0700 Subject: [PATCH] Noise: taking stall angle from alpha1 of airfoil info, no more stall level column --- .../src/AeroAcoustics/AeroAcoustics.f90 | 25 +++++++++++++------ .../src/AeroAcoustics/AeroAcoustics_IO.f90 | 4 +-- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/modules/aerodyn/src/AeroAcoustics/AeroAcoustics.f90 b/modules/aerodyn/src/AeroAcoustics/AeroAcoustics.f90 index b52f2c6d0d..1b0351f1af 100644 --- a/modules/aerodyn/src/AeroAcoustics/AeroAcoustics.f90 +++ b/modules/aerodyn/src/AeroAcoustics/AeroAcoustics.f90 @@ -225,7 +225,7 @@ subroutine SetParameters( InitInp, InputFileData, p, ErrStat, ErrMsg ) p%FreqList = (/10.,12.5,16.,20.,25.,31.5,40.,50.,63.,80., & 100.,125.,160.,200.,250.,315.,400.,500.,630.,800., & 1000.,1250.,1600.,2000.,2500.,3150.,4000.,5000.,6300.,8000., & - 10000.,12500.,16000.,20000./) + 10000.,12500.,16000.,20000./) ! TODO this should be fortran parameter CALL AllocAry(p%Aweight, size(p%Freqlist), 'Aweight', ErrStat2, ErrMsg2); if(Failed()) return @@ -245,25 +245,34 @@ subroutine SetParameters( InitInp, InputFileData, p, ErrStat, ErrMsg ) p%ObsX = InputFileData%ObsX p%ObsY = InputFileData%ObsY p%ObsZ = InputFileData%ObsZ + ! + call AllocAry(p%BlAFID, p%NumBlNds, p%numBlades, 'p%BlAFID' , ErrStat2, ErrMsg2); if(Failed()) return + p%BlAFID=InitInp%BlAFID ! Blade Characteristics chord,span,trailing edge angle and thickness,airfoil ID for each segment call AllocAry(p%TEThick ,p%NumBlNds,p%NumBlades,'p%TEThick' ,ErrStat2,ErrMsg2); if(Failed()) return call AllocAry(p%TEAngle ,p%NumBlNds,p%NumBlades,'p%TEAngle' ,ErrStat2,ErrMsg2); if(Failed()) return call AllocAry(p%StallStart,p%NumBlNds,p%NumBlades,'p%StallStart',ErrStat2,ErrMsg2); if(Failed()) return + p%StallStart(:,:) = 0.0_ReKi do i=1,p%NumBlades - p%TEThick(:,i) = InputFileData%BladeProps(i)%TEThick(:) ! - p%TEAngle(:,i) = InputFileData%BladeProps(i)%TEAngle(:) ! - p%StallStart(:,i) = InputFileData%BladeProps(i)%StallStart(:) ! + p%TEThick(:,i) = InputFileData%BladeProps(i)%TEThick(:) ! + p%TEAngle(:,i) = InputFileData%BladeProps(i)%TEAngle(:) ! + do j=1,p%NumBlNds + whichairfoil = p%BlAFID(j,i) + if(p%AFInfo(whichairfoil)%NumTabs /=1 ) then + call SetErrStat(ErrID_Fatal, 'Number of airfoil tables within airfoil file different than 1, which is not supported.', ErrStat2, ErrMsg2, RoutineName ) + if(Failed()) return + endif + p%StallStart(j,i) = p%AFInfo(whichairfoil)%Table(1)%UA_BL%alpha1*180/PI ! approximate stall angle of attack [deg] (alpha1 in [rad]) + enddo end do + call AllocAry(p%BlSpn, p%NumBlNds, p%NumBlades, 'p%BlSpn' , ErrStat2, ErrMsg2); if(Failed()) return call AllocAry(p%BlChord, p%NumBlNds, p%NumBlades, 'p%BlChord', ErrStat2, ErrMsg2); if(Failed()) return - call AllocAry(p%BlAFID, p%NumBlNds, p%numBlades, 'p%BlAFID' , ErrStat2, ErrMsg2); if(Failed()) return call AllocAry(p%AerCent, 2, p%NumBlNds, p%NumBlades, 'p%AerCent', ErrStat2, ErrMsg2); if(Failed()) return - - p%BlSpn = InitInp%BlSpn + p%BlSpn = InitInp%BlSpn p%BlChord = InitInp%BlChord - p%BlAFID=InitInp%BlAFID do j=p%NumBlNds,2,-1 IF ( p%BlSpn(j,1) .lt. p%BlSpn(p%NumBlNds,1)*(100-p%AA_Bl_Prcntge)/100 )THEN ! assuming diff --git a/modules/aerodyn/src/AeroAcoustics/AeroAcoustics_IO.f90 b/modules/aerodyn/src/AeroAcoustics/AeroAcoustics_IO.f90 index f2817abb41..139feb0c4a 100644 --- a/modules/aerodyn/src/AeroAcoustics/AeroAcoustics_IO.f90 +++ b/modules/aerodyn/src/AeroAcoustics/AeroAcoustics_IO.f90 @@ -375,10 +375,10 @@ SUBROUTINE ReadBladeInputs ( AABlFile, BladeKInputFileData, UnEc, ErrStat, ErrMs CALL AllocAry(BladeKInputFileData%TEThick ,BladeKInputFileData%NumBlNds,'TEThick' ,ErrStat2,ErrMsg2); if(Failed()) return CALL AllocAry(BladeKInputFileData%StallStart,BladeKInputFileData%NumBlNds,'StallStart',ErrStat2,ErrMsg2); if(Failed()) return DO I=1,BladeKInputFileData%NumBlNds - READ( UnIn, *, IOStat=IOS ) BladeKInputFileData%TEAngle(I), BladeKInputFileData%TEThick(I) , BladeKInputFileData%StallStart(I) + READ( UnIn, *, IOStat=IOS ) BladeKInputFileData%TEAngle(I), BladeKInputFileData%TEThick(I) CALL CheckIOS( IOS, AABlFile, 'Blade properties row '//TRIM(Num2LStr(I)), NumType, ErrStat2, ErrMsg2); if(Failed()) return IF (UnEc > 0) THEN - WRITE( UnEc, "(6(F9.4,1x),I9)", IOStat=IOS) BladeKInputFileData%TEAngle(I), BladeKInputFileData%TEThick(I), BladeKInputFileData%StallStart(I) + WRITE( UnEc, "(6(F9.4,1x),I9)", IOStat=IOS) BladeKInputFileData%TEAngle(I), BladeKInputFileData%TEThick(I) END IF END DO ! -------------- END OF FILE --------------------------------------------