From 400303659d71bbd846fe391c6477b8ca524d21f6 Mon Sep 17 00:00:00 2001 From: Emmanuel Branlard Date: Thu, 26 Oct 2023 23:32:32 -0600 Subject: [PATCH] UA: output to binary file, removed .UA --- modules/aerodyn/src/UA_Dvr_Subs.f90 | 6 +++--- modules/aerodyn/src/UnsteadyAero.f90 | 3 ++- reg_tests/executeUnsteadyAeroRegressionCase.py | 6 +++--- reg_tests/r-test | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/aerodyn/src/UA_Dvr_Subs.f90 b/modules/aerodyn/src/UA_Dvr_Subs.f90 index 79903a5e40..323f62c52b 100644 --- a/modules/aerodyn/src/UA_Dvr_Subs.f90 +++ b/modules/aerodyn/src/UA_Dvr_Subs.f90 @@ -287,7 +287,7 @@ subroutine ReadDriverInputFile( FileName, InitInp, ErrStat, ErrMsg ) ! --- Triggers call GetRoot(FileName, InitInp%OutRootName) ! OutRootName is inferred from current filename. - InitInp%OutRootName=trim(InitInp%OutRootName)//'.UA' ! For backward compatibility + !InitInp%OutRootName=trim(InitInp%OutRootName)//'.UA' ! For backward compatibility !if (PathIsRelative(InitInp%OutRootName)) InitInp%OutRootName = TRIM(PriPath)//TRIM(InitInp%OutRootName) if (PathIsRelative(InitInp%Airfoil1)) InitInp%Airfoil1 = TRIM(PriPath)//TRIM(InitInp%Airfoil1) if (PathIsRelative(InitInp%AeroTSFile )) InitInp%AeroTSFile = TRIM(PriPath)//TRIM(InitInp%AeroTSFile ) @@ -733,7 +733,7 @@ subroutine Dvr_EndSim(dvr, errStat, errMsg) endif if (out%fileFmt==idFmt_Both .or. out%fileFmt == idFmt_Binary) then call WrScr(' Writing output file: '//trim(out%Root)//'.outb') - call WrBinFAST(trim(out%Root)//'.out', FileFmtID_ChanLen_In, 'AeroDynDriver', out%WriteOutputHdr, out%WriteOutputUnt, (/0.0_DbKi, dvr%p%dt/), out%storage(:,:), errStat2, errMsg2) + call WrBinFAST(trim(out%Root)//'.outb', FileFmtID_ChanLen_In, 'AeroDynDriver', out%WriteOutputHdr, out%WriteOutputUnt, (/0.0_DbKi, dvr%p%dt/), out%storage(:,:), errStat2, errMsg2) call SetErrStat(errStat2, errMsg2, errStat, errMsg, RoutineName) endif end subroutine Dvr_EndSim @@ -1084,7 +1084,7 @@ subroutine WriteAFITables(AFI_Params, OutRootName, UseCm, UA_f_cn) CALL GetNewUnit( unOutFile, ErrStat, ErrMsg ) IF ( ErrStat /= ErrID_None ) RETURN - CALL OpenFOutFile ( unOutFile, trim(OutRootName)//'.UA.Coefs.'//trim(num2lstr(iTab))//'.out', ErrStat, ErrMsg ) + CALL OpenFOutFile ( unOutFile, trim(OutRootName)//'.Coefs.'//trim(num2lstr(iTab))//'.out', ErrStat, ErrMsg ) if (ErrStat >= AbortErrLev) then call WrScr(Trim(ErrMsg)) return diff --git a/modules/aerodyn/src/UnsteadyAero.f90 b/modules/aerodyn/src/UnsteadyAero.f90 index 0204fa5dd6..536d479ff2 100644 --- a/modules/aerodyn/src/UnsteadyAero.f90 +++ b/modules/aerodyn/src/UnsteadyAero.f90 @@ -3624,6 +3624,7 @@ subroutine UA_WriteOutputToFile(t, p, y) end subroutine UA_WriteOutputToFile !============================================================================== +! TODO Somehow merge this content with the unsteady aero driver summary file? subroutine UA_WriteAFIParamsToFile(InitInp, AFInfo, ErrStat, ErrMsg) type(AFI_ParameterType), intent(in ) :: AFInfo(:) ! The airfoil parameter data (for all airfoils) type(UA_InitInputType), intent(in ) :: InitInp ! input data for initialization routine @@ -3703,7 +3704,7 @@ subroutine UA_WriteAFIParamsToFile(InitInp, AFInfo, ErrStat, ErrMsg) CALL GetNewUnit( unOutFile, ErrStat, ErrMsg ) IF ( ErrStat /= ErrID_None ) RETURN - CALL OpenFOutFile ( unOutFile, trim(InitInp%OutRootName)//'.UA.sum', ErrStat2, ErrMsg2 ) + CALL OpenFOutFile ( unOutFile, trim(InitInp%OutRootName)//'.sum', ErrStat2, ErrMsg2 ) call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) if (ErrStat >= AbortErrLev) return diff --git a/reg_tests/executeUnsteadyAeroRegressionCase.py b/reg_tests/executeUnsteadyAeroRegressionCase.py index b8ca227924..ab9e5255a2 100644 --- a/reg_tests/executeUnsteadyAeroRegressionCase.py +++ b/reg_tests/executeUnsteadyAeroRegressionCase.py @@ -90,7 +90,7 @@ # create the local output directory and initialize it with input files -renameDict={'UA'+str(i)+'.UA.out':'UA'+str(i)+'.UA_ref.out' for i in [2,3,4,5,6,7]} +renameDict={'UA'+str(i)+'.outb':'UA'+str(i)+'_ref.outb' for i in [2,3,4,5,6,7]} rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict=renameDict , excludeExt=['.sum']) @@ -116,8 +116,8 @@ def Error(msg): ### Compare output with for dvrf in dvrFiles: simName = os.path.splitext(os.path.basename(dvrf))[0] - localOutFile = os.path.join(testBuildDirectory, simName + '.UA.out') - baselineOutFile = os.path.join(inputsDirectory, simName + '.UA.out') + localOutFile = os.path.join(testBuildDirectory, simName + '.outb') + baselineOutFile = os.path.join(inputsDirectory, simName + '.out') # TODO TODO if not os.path.exists(localOutFile): Error('File does not exist: {}'.format(localOutFile)) diff --git a/reg_tests/r-test b/reg_tests/r-test index b4a065a0aa..c4c8c8fbb8 160000 --- a/reg_tests/r-test +++ b/reg_tests/r-test @@ -1 +1 @@ -Subproject commit b4a065a0aa0512b0f85424134ac627d22d37fba0 +Subproject commit c4c8c8fbb88b70ef26130d0d6314781f90b98396