Skip to content

Commit

Permalink
AD/UA: Added back old filter to check r-test results
Browse files Browse the repository at this point in the history
  • Loading branch information
bjonkman committed Nov 3, 2020
1 parent 62d8ca0 commit 3142b2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/aerodyn/src/AirfoilInfo.f90
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ SUBROUTINE ReadAFfile ( AFfile, NumCoefs, InCol_Alfa, InCol_Cl, InCol_Cd, InCol_
CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
p%Table(iTable)%UA_BL%UACutout = p%Table(iTable)%UA_BL%UACutout*D2R

CALL ParseVarWDefault ( FileInfo, CurLine, 'filtCutOff', p%Table(iTable)%UA_BL%filtCutOff, 0.5_ReKi, ErrStat2, ErrMsg2, UnEc )
CALL ParseVarWDefault ( FileInfo, CurLine, 'filtCutOff', p%Table(iTable)%UA_BL%filtCutOff, 20.0_ReKi, ErrStat2, ErrMsg2, UnEc )
CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )

p%ColUAf = NumCoefs + 1 ! column for f_st
Expand Down
2 changes: 1 addition & 1 deletion modules/aerodyn/src/UnsteadyAero.f90
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ subroutine ComputeKelvinChain( i, j, u, p, xd, OtherState, misc, AFInfo, KC, BL_
! This filter is a Simple Infinite Impulse Response Filter
! See https://en.wikipedia.org/wiki/Low-pass_filter#Simple_infinite_impulse_response_filter

dynamicFilterCutoffHz = max( 1.0_ReKi, u%U ) * BL_p%filtCutOff / PI / p%C(i,j)
dynamicFilterCutoffHz = BL_p%filtCutOff !max( 1.0_ReKi, u%U ) * BL_p%filtCutOff / PI / p%C(i,j)
LowPassConst = exp(-2.0_ReKi*PI*p%dt*dynamicFilterCutoffHz) ! from Eqn 1.8 [7]

KC%alpha_filt_cur = LowPassConst*alpha_filt_minus1 + (1.0_ReKi-LowPassConst)*u%alpha ! from eq 1.8 [1: typo in documentation, though]
Expand Down

0 comments on commit 3142b2f

Please sign in to comment.