AeroAcoustics
module verification: Missing turbine model
#988
Replies: 3 comments 8 replies
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
Also, have you seen this python script? https://github.com/OpenFAST/python-toolbox/blob/dev/pyFAST/aeroacoustics/write_BLfiles.py |
Beta Was this translation helpful? Give feedback.
-
Hi @ptrbortolotti , I managed to compile code on WSL under Windows and dig a bit more into the possible reasons for the above mentioned unexpected behavior. I thus include a check for a single Reynolds number table case, with a related simplified interpolation, and I got rid of the issue. In case you are interested in this adjustment here is the snippet for the DO loop in the subroutine ! special treatment for single Reynolds number table available.
IF (size(p%ReListBL) .eq. 1) THEN
re_flag = .TRUE.
DO loop2=1,size(p%AOAListBL)-1
IF ( (AlphaNoise.le.p%AOAListBL(loop2+1)) &
.and. (AlphaNoise.gt.p%AOAListBL(loop2)) ) THEN
aoadif1=abs(AlphaNoise-p%AOAListBL(loop2+1))
aoadif2=abs(AlphaNoise-p%AOAListBL(loop2))
xx1= p%dstarall1(loop2,1,whichairfoil)
xx2= p%dstarall1(loop2+1,1,whichairfoil)
m%dstarVar(1)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1= p%dstarall2(loop2,1,whichairfoil)
xx2= p%dstarall2(loop2+1,1,whichairfoil)
m%dstarVar(2)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1= p%d99all1(loop2,1,whichairfoil)
xx2= p%d99all1(loop2+1,1,whichairfoil)
m%d99Var(1)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1= p%d99all2(loop2,1,whichairfoil)
xx2= p%d99all2(loop2+1,1,whichairfoil)
m%d99Var(2)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1= p%Cfall1(loop2,1,whichairfoil)
xx2= p%Cfall1(loop2+1,1,whichairfoil)
m%CfVar(1)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1= p%Cfall2(loop2,1,whichairfoil)
xx2= p%Cfall2(loop2+1,1,whichairfoil)
m%CfVar(2)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1= p%EdgeVelRat1(loop2,1,whichairfoil)
xx2= p%EdgeVelRat1(loop2+1,1,whichairfoil)
m%EdgeVelVar(1)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1= p%EdgeVelRat2(loop2,1,whichairfoil)
xx2= p%EdgeVelRat2(loop2+1,1,whichairfoil)
m%EdgeVelVar(2)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
RETURN ! We exit the routine !
ENDIF
IF (loop2 .eq. (size(p%AOAListBL)-1) ) THEN
IF (AlphaNoise .gt. p%AOAListBL(size(p%AOAListBL))) THEN
print*, 'Warning AeroAcoustics Module - Angle of attack (AoA) range is not in the range provided by the user'
print*, 'Station ',whichairfoil
print*, 'Airfoil AoA ', AlphaNoise,' Using the closest AoA ', &
p%AOAListBL(loop2+1)
m%dStarVar (1) = p%dstarall1 (loop2+1,1,whichairfoil)
m%dStarVar (2) = p%dstarall2 (loop2+1,1,whichairfoil)
m%d99Var (1) = p%d99all1 (loop2+1,1,whichairfoil)
m%d99Var (2) = p%d99all2 (loop2+1,1,whichairfoil)
m%CfVar (1) = p%Cfall1 (loop2+1,1,whichairfoil)
m%CfVar (2) = p%Cfall2 (loop2+1,1,whichairfoil)
m%EdgeVelVar(1) = p%EdgeVelRat1(loop2+1,1,whichairfoil)
m%EdgeVelVar(2) = p%EdgeVelRat2(loop2+1,1,whichairfoil)
ELSEIF (AlphaNoise .lt. p%AOAListBL(1)) THEN
print*, 'Warning AeroAcoustics Module - Angle of attack (AoA) range is not in the range provided by the user'
print*, 'Station ',whichairfoil
print*, 'Airfoil AoA ',AlphaNoise,' Using the closest AoA ', &
p%AOAListBL(1)
m%dStarVar(1) = p%dstarall1 (1,1,whichairfoil)
m%dStarVar(2) = p%dstarall2 (1,1,whichairfoil)
m%d99Var(1) = p%d99all1 (1,1,whichairfoil)
m%d99Var(2) = p%d99all2 (1,1,whichairfoil)
m%CfVar(1) = p%Cfall1 (1,1,whichairfoil)
m%CfVar(2) = p%Cfall2 (1,1,whichairfoil)
m%EdgeVelVar(1) = p%EdgeVelRat1(1,1,whichairfoil)
m%EdgeVelVar(2) = p%EdgeVelRat2(1,1,whichairfoil)
ENDIF
ENDIF
ENDDO
ELSE
!
DO loop1=1,size(p%ReListBL)-1
! print*, "Debug - Reynolds table no. ", loop1
IF ( (RC.le.p%ReListBL(loop1+1)) .and. (RC.gt.p%ReListBL(loop1)) ) THEN
! print*, "Debug - Reynolds between tables"
re_flag = .TRUE.
redif1=abs(RC-p%ReListBL(loop1+1))
redif2=abs(RC-p%ReListBL(loop1))
DO loop2=1,size(p%AOAListBL)-1
IF ( (AlphaNoise.le.p%AOAListBL(loop2+1)) .and. (AlphaNoise.gt.p%AOAListBL(loop2)) ) THEN
aoadif1=abs(AlphaNoise-p%AOAListBL(loop2+1))
aoadif2=abs(AlphaNoise-p%AOAListBL(loop2))
xx1=( p%dstarall1(loop2,loop1+1,whichairfoil)*redif2+p%dstarall1(loop2,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
xx2=( p%dstarall1(loop2+1,loop1+1,whichairfoil)*redif2+p%dstarall1(loop2+1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%dstarVar(1)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1=( p%dstarall2(loop2,loop1+1,whichairfoil)*redif2+p%dstarall2(loop2,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
xx2=( p%dstarall2(loop2+1,loop1+1,whichairfoil)*redif2+p%dstarall2(loop2+1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%dstarVar(2)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1=( p%d99all1(loop2,loop1+1,whichairfoil)*redif2+p%d99all1(loop2,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
xx2=( p%d99all1(loop2+1,loop1+1,whichairfoil)*redif2+p%d99all1(loop2+1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%d99Var(1)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1=( p%d99all2(loop2,loop1+1,whichairfoil)*redif2+p%d99all2(loop2,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
xx2=( p%d99all2(loop2+1,loop1+1,whichairfoil)*redif2+p%d99all2(loop2+1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%d99Var(2)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1=( p%Cfall1(loop2,loop1+1,whichairfoil)*redif2+p%Cfall1(loop2,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
xx2=( p%Cfall1(loop2+1,loop1+1,whichairfoil)*redif2+p%Cfall1(loop2+1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%CfVar(1)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1=( p%Cfall2(loop2,loop1+1,whichairfoil)*redif2+p%Cfall2(loop2,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
xx2=( p%Cfall2(loop2+1,loop1+1,whichairfoil)*redif2+p%Cfall2(loop2+1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%CfVar(2)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1=( p%EdgeVelRat1(loop2,loop1+1,whichairfoil)*redif2+p%EdgeVelRat1(loop2,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
xx2=( p%EdgeVelRat1(loop2+1,loop1+1,whichairfoil)*redif2+p%EdgeVelRat1(loop2+1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%EdgeVelVar(1)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
xx1=( p%EdgeVelRat2(loop2,loop1+1,whichairfoil)*redif2+p%EdgeVelRat2(loop2,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
xx2=( p%EdgeVelRat2(loop2+1,loop1+1,whichairfoil)*redif2+p%EdgeVelRat2(loop2+1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%EdgeVelVar(2)=(xx1*aoadif1+xx2*aoadif2) / (aoadif1+aoadif2)
RETURN ! We exit the routine !
ENDIF
IF (loop2 .eq. (size(p%AOAListBL)-1) ) THEN
IF (AlphaNoise .gt. p%AOAListBL(size(p%AOAListBL))) THEN
print*, 'Warning AeroAcoustics Module - Angle of attack (AoA) range is not in the range provided by the user'
print*, 'Station ',whichairfoil
print*, 'Airfoil AoA ',AlphaNoise,' Using the closest AoA ',p%AOAListBL(loop2+1)
m%dStarVar (1) = ( p%dstarall1 (loop2+1,loop1+1,whichairfoil)*redif2 + p%dstarall1 (loop2+1,loop1,whichairfoil)*redif1 )/(redif1+redif2)
m%dStarVar (2) = ( p%dstarall2 (loop2+1,loop1+1,whichairfoil)*redif2 + p%dstarall2 (loop2+1,loop1,whichairfoil)*redif1 )/(redif1+redif2)
m%d99Var (1) = ( p%d99all1 (loop2+1,loop1+1,whichairfoil)*redif2 + p%d99all1 (loop2+1,loop1,whichairfoil)*redif1 )/(redif1+redif2)
m%d99Var (2) = ( p%d99all2 (loop2+1,loop1+1,whichairfoil)*redif2 + p%d99all2 (loop2+1,loop1,whichairfoil)*redif1 )/(redif1+redif2)
m%CfVar (1) = ( p%Cfall1 (loop2+1,loop1+1,whichairfoil)*redif2 + p%Cfall1 (loop2+1,loop1,whichairfoil)*redif1 )/(redif1+redif2)
m%CfVar (2) = ( p%Cfall2 (loop2+1,loop1+1,whichairfoil)*redif2 + p%Cfall2 (loop2+1,loop1,whichairfoil)*redif1 )/(redif1+redif2)
m%EdgeVelVar(1) = ( p%EdgeVelRat1(loop2+1,loop1+1,whichairfoil)*redif2 + p%EdgeVelRat1(loop2+1,loop1,whichairfoil)*redif1 )/(redif1+redif2)
m%EdgeVelVar(2) = ( p%EdgeVelRat2(loop2+1,loop1+1,whichairfoil)*redif2 + p%EdgeVelRat2(loop2+1,loop1,whichairfoil)*redif1 )/(redif1+redif2)
ELSEIF (AlphaNoise .lt. p%AOAListBL(1)) THEN
print*, 'Warning AeroAcoustics Module - Angle of attack (AoA) range is not in the range provided by the user'
print*, 'Station ',whichairfoil
print*, 'Airfoil AoA ',AlphaNoise,' Using the closest AoA ',p%AOAListBL(1)
m%dStarVar(1) = ( p%dstarall1 (1,loop1+1,whichairfoil)*redif2 + p%dstarall1 (1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%dStarVar(2) = ( p%dstarall2 (1,loop1+1,whichairfoil)*redif2 + p%dstarall2 (1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%d99Var(1) = ( p%d99all1 (1,loop1+1,whichairfoil)*redif2 + p%d99all1 (1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%d99Var(2) = ( p%d99all2 (1,loop1+1,whichairfoil)*redif2 + p%d99all2 (1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%CfVar(1) = ( p%Cfall1 (1,loop1+1,whichairfoil)*redif2 + p%Cfall1 (1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%CfVar(2) = ( p%Cfall2 (1,loop1+1,whichairfoil)*redif2 + p%Cfall2 (1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%EdgeVelVar(1) = ( p%EdgeVelRat1(1,loop1+1,whichairfoil)*redif2 + p%EdgeVelRat1(1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
m%EdgeVelVar(2) = ( p%EdgeVelRat2(1,loop1+1,whichairfoil)*redif2 + p%EdgeVelRat2(1,loop1,whichairfoil)*redif1 ) / (redif1+redif2)
ENDIF
ENDIF
ENDDO
ENDIF
ENDDO
ENDIF Maybe you can consider this for a next release. Best regards, Elia |
Beta Was this translation helpful? Give feedback.
-
I would like to reproduce the verification case for the
AeroAcoustics
module as described here.Unfortunately I cannot find the corresponding turbine model input, i.e. the
IEA-3.4-130-RWT
, neither within the regression tests, nor at the IEA task repo.Can anybody point me out to the
OpenFAST
model for such a verification?Thanks in advance for your support!
Beta Was this translation helpful? Give feedback.
All reactions