From 46b5f2ec43e5a0e020f59702bba9a10ae6626f84 Mon Sep 17 00:00:00 2001 From: Emmanuel Branlard Date: Thu, 2 Dec 2021 11:45:59 -0700 Subject: [PATCH 1/6] UA: some states were never updated --- modules/aerodyn/src/UnsteadyAero.f90 | 14 +++++++------- modules/aerodyn/src/UnsteadyAero_Registry.txt | 2 ++ modules/aerodyn/src/UnsteadyAero_Types.f90 | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/modules/aerodyn/src/UnsteadyAero.f90 b/modules/aerodyn/src/UnsteadyAero.f90 index c1e6151630..1c8421c14f 100644 --- a/modules/aerodyn/src/UnsteadyAero.f90 +++ b/modules/aerodyn/src/UnsteadyAero.f90 @@ -348,9 +348,7 @@ subroutine ComputeKelvinChain( i, j, u, p, xd, OtherState, misc, AFInfo, KC, BL_ real(ReKi) :: q_minus1 ! real(ReKi) :: q_f_minus1 real(ReKi) :: Cn_pot_minus1 ! - real(ReKi) :: K3prime_q ! real(ReKi) :: k_mq ! - real(ReKi) :: Kprimeprime_q ! real(ReKi) :: dynamicFilterCutoffHz ! find frequency based on reduced frequency of k = BL_p%filtCutOff real(ReKi) :: LowPassConst @@ -512,19 +510,19 @@ subroutine ComputeKelvinChain( i, j, u, p, xd, OtherState, misc, AFInfo, KC, BL_ KC%Cn_q_circ = 0.0_ReKi end if - K3prime_q = Get_ExpEqn( BL_p%b5*beta_M_Sqrd*KC%ds, 1.0_ReKi, xd%K3prime_q_minus1(i,j), BL_p%A5*(KC%q_f_cur - q_f_minus1), 0.0_ReKi ) ! Eqn 1.26 - KC%Cm_q_circ = -BL_p%C_nalpha*(KC%q_f_cur - K3prime_q)*p%c(i,j)/(16.0_ReKi*beta_M*u%U) ! Eqn 1.25 + KC%K3prime_q = Get_ExpEqn( BL_p%b5*beta_M_Sqrd*KC%ds, 1.0_ReKi, xd%K3prime_q_minus1(i,j), BL_p%A5*(KC%q_f_cur - q_f_minus1), 0.0_ReKi ) ! Eqn 1.26 + KC%Cm_q_circ = -BL_p%C_nalpha*(KC%q_f_cur - KC%K3prime_q)*p%c(i,j)/(16.0_ReKi*beta_M*u%U) ! Eqn 1.25 KC%Cn_pot = KC%Cn_alpha_q_circ + KC%Cn_alpha_q_nc ! Eqn 1.20 [2a] k_mq = 7.0_ReKi / (15.0_ReKi*(1.0_ReKi-M) + 1.5_ReKi * BL_p%C_nalpha * BL_p%A5 * BL_p%b5 * beta_M * M**2) ! Eqn 1.29 [2] ! CHECK THAT DENOM ISN'T ZERO! - Kprimeprime_q = Get_ExpEqn( real(p%dt,ReKi), k_mq**2*T_I , xd%Kprimeprime_q_minus1(i,j) , KC%Kq_f , Kq_f_minus1 ) ! Eqn 1.29 [3] + KC%Kprimeprime_q = Get_ExpEqn( real(p%dt,ReKi), k_mq**2*T_I , xd%Kprimeprime_q_minus1(i,j) , KC%Kq_f , Kq_f_minus1 ) ! Eqn 1.29 [3] ! Compute Cm_q_nc if ( p%UAMod == UA_MinnemaPierce ) then - KC%Cm_q_nc = -1.0_ReKi * KC%Cn_q_nc / 4.0_ReKi - (KC%k_alpha**2) * T_I * (KC%Kq_f - Kprimeprime_q) / (3.0_ReKi*M) ! Eqn 1.31 + KC%Cm_q_nc = -1.0_ReKi * KC%Cn_q_nc / 4.0_ReKi - (KC%k_alpha**2) * T_I * (KC%Kq_f - KC%Kprimeprime_q) / (3.0_ReKi*M) ! Eqn 1.31 else - KC%Cm_q_nc = -7.0_ReKi * (k_mq**2) * T_I * (KC%Kq_f - Kprimeprime_q) / (12.0_ReKi*M) ! Eqn 1.29 [1] + KC%Cm_q_nc = -7.0_ReKi * (k_mq**2) * T_I * (KC%Kq_f - KC%Kprimeprime_q) / (12.0_ReKi*M) ! Eqn 1.29 [1] end if if ( p%UAMod == UA_Gonzalez ) then @@ -2074,6 +2072,8 @@ subroutine UA_UpdateDiscOtherState( i, j, u, p, xd, OtherState, AFInfo, m, ErrSt xd%X4_minus1(i,j) = KC%X4 xd%Kprime_alpha_minus1(i,j) = KC%Kprime_alpha xd%Kprime_q_minus1(i,j) = KC%Kprime_q + xd%K3prime_q_minus1(i,j) = KC%K3prime_q + xd%Kprimeprime_q_minus1(i,j)= KC%Kprimeprime_q xd%Dp_minus1(i,j) = KC%Dp xd%Cn_pot_minus1(i,j) = KC%Cn_pot xd%Cn_prime_minus1(i,j) = KC%Cn_prime diff --git a/modules/aerodyn/src/UnsteadyAero_Registry.txt b/modules/aerodyn/src/UnsteadyAero_Registry.txt index 613b543a81..733a4b46b3 100644 --- a/modules/aerodyn/src/UnsteadyAero_Registry.txt +++ b/modules/aerodyn/src/UnsteadyAero_Registry.txt @@ -69,6 +69,8 @@ typedef ^ UA_KelvinChainType ReKi typedef ^ UA_KelvinChainType ReKi X4 - - - "" - typedef ^ UA_KelvinChainType ReKi Kprime_alpha - - - "" - typedef ^ UA_KelvinChainType ReKi Kprime_q - - - "" - +typedef ^ UA_KelvinChainType ReKi K3prime_q - - - "" - +typedef ^ UA_KelvinChainType ReKi Kprimeprime_q - - - "" - typedef ^ UA_KelvinChainType ReKi Dp - - - "" - typedef ^ UA_KelvinChainType ReKi Cn_pot - - - "" - typedef ^ UA_KelvinChainType ReKi Cc_pot - - - "" - diff --git a/modules/aerodyn/src/UnsteadyAero_Types.f90 b/modules/aerodyn/src/UnsteadyAero_Types.f90 index d970c878be..48c47a9ffd 100644 --- a/modules/aerodyn/src/UnsteadyAero_Types.f90 +++ b/modules/aerodyn/src/UnsteadyAero_Types.f90 @@ -83,6 +83,8 @@ MODULE UnsteadyAero_Types REAL(ReKi) :: X4 !< [-] REAL(ReKi) :: Kprime_alpha !< [-] REAL(ReKi) :: Kprime_q !< [-] + REAL(ReKi) :: K3prime_q !< [-] + REAL(ReKi) :: Kprimeprime_q !< [-] REAL(ReKi) :: Dp !< [-] REAL(ReKi) :: Cn_pot !< [-] REAL(ReKi) :: Cc_pot !< [-] @@ -950,6 +952,8 @@ SUBROUTINE UA_CopyKelvinChainType( SrcKelvinChainTypeData, DstKelvinChainTypeDat DstKelvinChainTypeData%X4 = SrcKelvinChainTypeData%X4 DstKelvinChainTypeData%Kprime_alpha = SrcKelvinChainTypeData%Kprime_alpha DstKelvinChainTypeData%Kprime_q = SrcKelvinChainTypeData%Kprime_q + DstKelvinChainTypeData%K3prime_q = SrcKelvinChainTypeData%K3prime_q + DstKelvinChainTypeData%Kprimeprime_q = SrcKelvinChainTypeData%Kprimeprime_q DstKelvinChainTypeData%Dp = SrcKelvinChainTypeData%Dp DstKelvinChainTypeData%Cn_pot = SrcKelvinChainTypeData%Cn_pot DstKelvinChainTypeData%Cc_pot = SrcKelvinChainTypeData%Cc_pot @@ -1047,6 +1051,8 @@ SUBROUTINE UA_PackKelvinChainType( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, Re_BufSz = Re_BufSz + 1 ! X4 Re_BufSz = Re_BufSz + 1 ! Kprime_alpha Re_BufSz = Re_BufSz + 1 ! Kprime_q + Re_BufSz = Re_BufSz + 1 ! K3prime_q + Re_BufSz = Re_BufSz + 1 ! Kprimeprime_q Re_BufSz = Re_BufSz + 1 ! Dp Re_BufSz = Re_BufSz + 1 ! Cn_pot Re_BufSz = Re_BufSz + 1 ! Cc_pot @@ -1140,6 +1146,10 @@ SUBROUTINE UA_PackKelvinChainType( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, Re_Xferred = Re_Xferred + 1 ReKiBuf(Re_Xferred) = InData%Kprime_q Re_Xferred = Re_Xferred + 1 + ReKiBuf(Re_Xferred) = InData%K3prime_q + Re_Xferred = Re_Xferred + 1 + ReKiBuf(Re_Xferred) = InData%Kprimeprime_q + Re_Xferred = Re_Xferred + 1 ReKiBuf(Re_Xferred) = InData%Dp Re_Xferred = Re_Xferred + 1 ReKiBuf(Re_Xferred) = InData%Cn_pot @@ -1266,6 +1276,10 @@ SUBROUTINE UA_UnPackKelvinChainType( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrSta Re_Xferred = Re_Xferred + 1 OutData%Kprime_q = ReKiBuf(Re_Xferred) Re_Xferred = Re_Xferred + 1 + OutData%K3prime_q = ReKiBuf(Re_Xferred) + Re_Xferred = Re_Xferred + 1 + OutData%Kprimeprime_q = ReKiBuf(Re_Xferred) + Re_Xferred = Re_Xferred + 1 OutData%Dp = ReKiBuf(Re_Xferred) Re_Xferred = Re_Xferred + 1 OutData%Cn_pot = ReKiBuf(Re_Xferred) From 8e98f83800c18a4705dce10273115b71c5a77f65 Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Wed, 20 Apr 2022 18:22:30 -0500 Subject: [PATCH 2/6] Update r-test --- reg_tests/r-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reg_tests/r-test b/reg_tests/r-test index d5dd4299d7..bd815cc8a4 160000 --- a/reg_tests/r-test +++ b/reg_tests/r-test @@ -1 +1 @@ -Subproject commit d5dd4299d7d7d19155a383442ac5788e44b87dc1 +Subproject commit bd815cc8a4f4da9c47f4993c5e19c31e25d28305 From c802114515b10e50f5cba068113b6e928d77e4ce Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Thu, 2 Jun 2022 08:57:23 -0500 Subject: [PATCH 3/6] Run aerodyn automated tests serially --- .github/actions/tests-module-aerodyn/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/tests-module-aerodyn/action.yml b/.github/actions/tests-module-aerodyn/action.yml index 8759e9c58c..7dd9fb5570 100644 --- a/.github/actions/tests-module-aerodyn/action.yml +++ b/.github/actions/tests-module-aerodyn/action.yml @@ -18,7 +18,7 @@ runs: fi if [[ ${{ inputs.test-target }} == "regression" ]] || [[ ${{ inputs.test-target }} == "all" ]]; then - ctest -VV -j7 -R ad_ + ctest -VV -R ad_ # -j7 do not run these tests in parallel due to a bug in accessing shared files fi working-directory: ${{runner.workspace}}/openfast/build From 1896bf35a0c95e04c4bf9a3136330efd4731c568 Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Wed, 6 Jul 2022 12:41:40 -0500 Subject: [PATCH 4/6] Update reg test baselines --- reg_tests/r-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reg_tests/r-test b/reg_tests/r-test index 46a99f2afa..2668c76f40 160000 --- a/reg_tests/r-test +++ b/reg_tests/r-test @@ -1 +1 @@ -Subproject commit 46a99f2afacad3d4e79fad1877492bb829914d17 +Subproject commit 2668c76f4025cad35f98b6136582dec7cff631c3 From 6086a83b03bce03ee4705f33d755cc76c1b5b9a4 Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Wed, 6 Jul 2022 15:13:44 -0500 Subject: [PATCH 5/6] Add a folder to GH Actions artifacts on fail --- .github/workflows/automated-dev-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/automated-dev-tests.yml b/.github/workflows/automated-dev-tests.yml index 007bc4e6c8..5f43cac82d 100644 --- a/.github/workflows/automated-dev-tests.yml +++ b/.github/workflows/automated-dev-tests.yml @@ -491,9 +491,10 @@ jobs: uses: actions/upload-artifact@v2 if: failure() with: - name: c-interface-reg-tests + name: interface-reg-tests path: | ${{runner.workspace}}/openfast/build/reg_tests/glue-codes/openfast-cpp + ${{runner.workspace}}/openfast/build/reg_tests/glue-codes/python ${{runner.workspace}}/openfast/build/reg_tests/modules/hydrodyn ${{runner.workspace}}/openfast/build/reg_tests/modules/inflowwind !${{runner.workspace}}/openfast/build/reg_tests/glue-codes/openfast-cpp/5MW_Baseline From b13727002dfc8d0b5b45ba39f127ab44713b7a13 Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Wed, 6 Jul 2022 16:53:22 -0500 Subject: [PATCH 6/6] Use -O2 (RELWITHDEBINFO) compile setting in tests --- .github/workflows/automated-dev-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/automated-dev-tests.yml b/.github/workflows/automated-dev-tests.yml index 5f43cac82d..a04fc80a2c 100644 --- a/.github/workflows/automated-dev-tests.yml +++ b/.github/workflows/automated-dev-tests.yml @@ -442,7 +442,7 @@ jobs: -DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \ -DCMAKE_CXX_COMPILER:STRING=${{env.CXX_COMPILER}} \ -DCMAKE_C_COMPILER:STRING=${{env.C_COMPILER}} \ - -DCMAKE_BUILD_TYPE:STRING=Debug \ + -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ -DBUILD_OPENFAST_CPP_API:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \