diff --git a/.github/workflows/automated-dev-tests.yml b/.github/workflows/automated-dev-tests.yml index ef764833d..e46aa61fb 100644 --- a/.github/workflows/automated-dev-tests.yml +++ b/.github/workflows/automated-dev-tests.yml @@ -77,7 +77,7 @@ jobs: run: | cmake --build . --target all - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-all-debug-${{ github.sha }} @@ -160,7 +160,7 @@ jobs: run: | cmake --build . --target regression_test_module_drivers - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-drivers-release-${{ github.sha }} @@ -205,6 +205,7 @@ jobs: -DVARIABLE_TRACKING=OFF \ -DBUILD_FASTFARM:BOOL=ON \ -DBUILD_OPENFAST_CPP_API:BOOL=ON \ + -DBUILD_OPENFAST_CPP_DRIVER:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_TESTING:BOOL=ON \ -DCTEST_PLOT_ERRORS:BOOL=ON \ @@ -214,7 +215,7 @@ jobs: working-directory: ${{runner.workspace}}/openfast/build run: cmake --build . --target openfast_postlib - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-postlib-release-${{ github.sha }} @@ -225,7 +226,7 @@ jobs: needs: build-postlib-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-postlib-release-${{ github.sha }} @@ -250,9 +251,9 @@ jobs: - name: Build OpenFAST C-Interfaces working-directory: ${{runner.workspace}}/openfast/build run: | - cmake --build . --target openfastlib openfast_cpp openfastcpp aerodyn_inflow_c_binding moordyn_c_binding ifw_c_binding hydrodyn_c_binding regression_test_controllers + cmake --build . --target openfastlib openfast_cpp_driver openfastcpp aerodyn_inflow_c_binding moordyn_c_binding ifw_c_binding hydrodyn_c_binding regression_test_controllers - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-interfaces-release-${{ github.sha }} @@ -263,7 +264,7 @@ jobs: needs: build-postlib-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-postlib-release-${{ github.sha }} @@ -290,7 +291,7 @@ jobs: run: | cmake --build . --target openfast - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-openfast-release-${{ github.sha }} @@ -301,7 +302,7 @@ jobs: needs: build-postlib-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-postlib-release-${{ github.sha }} @@ -328,7 +329,7 @@ jobs: run: | cmake --build . --target FAST.Farm - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-fastfarm-release-${{ github.sha }} @@ -403,7 +404,7 @@ jobs: needs: build-drivers-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-drivers-release-${{ github.sha }} @@ -461,7 +462,7 @@ jobs: needs: build-all-debug steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-all-debug-${{ github.sha }} @@ -522,7 +523,7 @@ jobs: needs: build-interfaces-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-interfaces-release-${{ github.sha }} @@ -570,7 +571,7 @@ jobs: needs: build-openfast-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-openfast-release-${{ github.sha }} @@ -623,7 +624,7 @@ jobs: needs: build-openfast-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-openfast-release-${{ github.sha }} @@ -653,7 +654,7 @@ jobs: needs: build-openfast-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-openfast-release-${{ github.sha }} @@ -702,7 +703,7 @@ jobs: needs: build-openfast-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-openfast-release-${{ github.sha }} @@ -752,7 +753,7 @@ jobs: needs: build-openfast-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-openfast-release-${{ github.sha }} @@ -802,7 +803,7 @@ jobs: needs: build-openfast-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-openfast-release-${{ github.sha }} @@ -852,7 +853,7 @@ jobs: needs: build-openfast-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-openfast-release-${{ github.sha }} @@ -902,7 +903,7 @@ jobs: needs: build-openfast-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-openfast-release-${{ github.sha }} @@ -952,7 +953,7 @@ jobs: needs: build-openfast-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-openfast-release-${{ github.sha }} @@ -1001,7 +1002,7 @@ jobs: needs: build-fastfarm-release steps: - name: Cache the workspace - uses: actions/cache@v3.0.4 + uses: actions/cache@v3 with: path: ${{runner.workspace}} key: build-fastfarm-release-${{ github.sha }} diff --git a/.readthedocs.yml b/.readthedocs.yml index 5b54f8b4a..eed597b9c 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,20 +5,20 @@ # Required version: 2 +# select the docker image to use: stable | latest +build: + os: "ubuntu-22.04" + tools: + python: "3.11" + formats: - htmlzip # - pdf # - epub python: - version: 3.7 install: - requirements: docs/requirements.txt - system_packages: true - -# select the docker image to use: stable | latest -build: - image: stable sphinx: builder: html diff --git a/CMakeLists.txt b/CMakeLists.txt index 899e0d357..5b3970a06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,7 @@ option(FPE_TRAP_ENABLED "Enable FPE trap in compiler options" off) option(ORCA_DLL_LOAD "Enable OrcaFlex Library Load" on) option(BUILD_FASTFARM "Enable building FAST.Farm" off) option(BUILD_OPENFAST_CPP_API "Enable building OpenFAST - C++ API" off) +option(BUILD_OPENFAST_CPP_DRIVER "Enable building OpenFAST C++ driver using C++ API" off) option(BUILD_OPENFAST_SIMULINK_API "Enable building OpenFAST for use with Simulink" off) option(OPENMP "Enable OpenMP support" off) option(USE_LOCAL_STATIC_LAPACK "Enable downloading and building static LAPACK and BLAS libs" off) diff --git a/docs/OtherSupporting/OutListParameters.xlsx b/docs/OtherSupporting/OutListParameters.xlsx index af0848d30..6828ce34b 100644 Binary files a/docs/OtherSupporting/OutListParameters.xlsx and b/docs/OtherSupporting/OutListParameters.xlsx differ diff --git a/docs/changelogs/v3.5.1.md b/docs/changelogs/v3.5.1.md new file mode 100644 index 000000000..375da241f --- /dev/null +++ b/docs/changelogs/v3.5.1.md @@ -0,0 +1,133 @@ +**Feature or improvement description** +Pull request to merge `rc-3.5.1` into `main` and create a tagged release for v3.5.1. + +See the milestone and project pages for additional information + + https://github.com/OpenFAST/openfast/milestone/10 + https://github.com/orgs/OpenFAST/projects/4 + +Test results, if applicable +See GitHub Actions + +### Release checklist: +- [ ] Update the documentation version in docs/conf.py +- [ ] Update the versions in docs/source/user/api_change.rst +- [ ] Verify readthedocs builds correctly +- [ ] Create a tag in OpenFAST +- [ ] Create a merge commit in r-test and add a corresponding tag +- [ ] Compile executables for Windows builds + - [ ] FAST_SFunc.mexw64 + - [ ] OpenFAST-Simulink_x64.dll + - [ ] openfast_x64.exe + - [ ] DISCON.dll (x64) + - [ ] AeroDyn_Driver + - [ ] AeroDyn_Inflow_C_Binding + - [ ] BeamDyn_Driver + - [ ] HydroDyn_Driver + - [ ] HydroDyn_C_Binding (x64) + - [ ] InflowWind_Driver + - [ ] IfW_C_Binding (x64) + - [ ] MoorDyn_Driver + - [ ] FAST.Farm (x64) + +# Changelog + +## General + +### Build systems + +#1586 CMake: Remove openfast_cpp target if BUILD_OPENFAST_CPP_API not selected +#1647 Fix adding OpenMP flags to CMAKE_Fortran_FLAGS +#1818 VS-build updates for rc-3.5.1 and other minor updates. Includes truing up some Types files. + + +### Documentation + +#1788 Readthedocs configuration changes + + +## Solvers + +### FAST.Farm + +#1648 Fix bug with Mod_AmbWind=3 -- hub point wasn't shifted. + + +## Module changes + +### AeroDyn + +#1657 AD Driver: stack size for 64 bit solutions (see #1260) +#1658 AD/TailFin: Bug Fix: remove chord in fy (see #1653) +#1659 AD: Adding rtest for TailFin polar-based model +#1679 AD: nodal outputs in different coordinate systems (new feature) +#1700 Remove deleted variables BlFB and BlMB from AeroDyn_AllBldNdOuts_IO + + +### BeamDyn + +#1771 Change BD states to follow the blade root reference frame. Small performance improvements around azimuth=180. +#1796 Resolve BeamDyn initial strain for rotated blade. Backport of #1663 + + +### ElastoDyn + +#1654 fix segfault when BldNd_BladesOut==0 (Also for AeroDyn) + + +### HydroDyn + +#1621 [BugFix] HD wave visualization with 2nd order waves +#1780 [BugFix] AddF0 for multiple potential-flow bodies with NBodyMod/=0 (backport of #1776) +#1768 new feature: Visualization of HydroDyn Morison mesh (also MoorDyn lines) +#1806 fixed some existing bugs with the strip-theory loads and updated the radiation convolution integral to 2nd order + + +### InflowWind + +#1620 [BugFix] ServoDyn inputs for Lidar allocated twice, and a few other minor issues +#1655 [BugFix] InflowWind was not setting InitOut MWS data. +#1748 [BugFix] compute vel avg profile when exceed allowed +#1759 [BugFix] InflowWind Flow Field fails to calculate AvgVel for large wind files when using Intel Compiler +#1769 [BugFix] Add additional modulo in IfW_FlowField to correct error with exhausted field from Grid3D on long simulations (see #1746 and PR #1730) + + +### MAP++ + +#1752 MAP++ linear spring approach improvement (@rbergua) + + +### MoorDyn + +#1768 MoorDyn line visualization (see HydroDyn above) +#1727 MoorDyn updates and bug fixes (naming, catenary solve improvement, output channels, bugs with added mass, rods, and comment typos +#1815 MoorDyn dynamic relaxation and fixed bodies +#1816 Fixed drag coefficient scaling + + +### NWTC-Library + +#1731 Blade Pitch input to ElastoDyn drifts during solution if ServoDyn is not active (improvements to Extrap/Interp routines) + + +### SubDyn + +#1802 Increase SubDyn output to allow NMOutputs up to 99. Backport of features from dev (multiple commits) + + +## Regression tests + +#1581, #1593 Update floating MHK case input files +#1694 Improved linearization file comparison +#1695 AD: adding linearization tests for aerodyn continuous-states model +#1801 Add Mod_AmbWind=3 regression test to the CI + + +## Input file changes + +No input files change with this release, as this only includes minor bugfixes. + +Full list of changes: https://openfast.readthedocs.io/en/main/source/user/api_change.html + +Full input file sets: https://github.com/OpenFAST/r-test/tree/v3.5.1 (example input files from the regression testing) + diff --git a/docs/conf.py b/docs/conf.py index db9ff1e7a..85c5e70a2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -130,7 +130,7 @@ def runDoxygen(sourcfile, doxyfileIn, doxyfileOut): # The short X.Y version. version = u'3.5' # The full version, including alpha/beta/rc tags. -release = u'v3.5.0' +release = u'v3.5.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/user/api_change.rst b/docs/source/user/api_change.rst index eea37f3c9..cfcf7fc2f 100644 --- a/docs/source/user/api_change.rst +++ b/docs/source/user/api_change.rst @@ -9,7 +9,7 @@ The changes are tabulated according to the module input file, line number, and f The line number corresponds to the resulting line number after all changes are implemented. Thus, be sure to implement each in order so that subsequent line numbers are correct. -OpenFAST v3.5.0 to OpenFAST dev +OpenFAST v3.5.1 to OpenFAST dev ---------------------------------- The HydroDyn module was split into HydroDyn and SeaState. This results in a @@ -26,6 +26,16 @@ SeaState all New modu ============================================= ==== ==================== ======================================================================================================================================================================================================== + +OpenFAST v3.5.0 to OpenFAST v3.5.1 +---------------------------------- + +No input files changes were made. Some input files now include additional +output channels: AeroDyn nodal outputs for another coordinate system, new +MoorDyn output names (Connect changed to Point). + + + OpenFAST v3.4.0 to OpenFAST v3.5.0 ---------------------------------- @@ -71,7 +81,7 @@ Added in OpenFAST `3.4.0` ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Module Line Flag Name Example Value ============================================= ==== ================= ======================================================================================================================================================================================================== -FAST.Farm 17 ModWake 1 Mod_Wake - Switch between wake formulations {1:Polar, 2:Curl, 3:Cartesian} (-) (switch) +FAST.Farm 42\* ModWake 1 Mod_Wake - Switch between wake formulations {1:Polar, 2:Curl, 3:Cartesian} (-) (switch) FAST.Farm 67 CurlSection --- CURLED-WAKE PARAMETERS [only used if Mod_Wake=2 or 3] --- FAST.Farm 68 Swirl DEFAULT Swirl - Switch to include swirl velocities in wake (-) (switch) [DEFAULT=True] FAST.Farm 69 k_VortexDecay DEFAULT k_VortexDecay - Vortex decay constant for curl (-) [DEFAULT=0.01] [only used if Mod_Wake=2] diff --git a/docs/source/user/moordyn/index.rst b/docs/source/user/moordyn/index.rst index 52730e521..9306aeaa9 100644 --- a/docs/source/user/moordyn/index.rst +++ b/docs/source/user/moordyn/index.rst @@ -3,10 +3,11 @@ MoorDyn Users Guide ==================== -A standalone C++ version of MoorDyn is also available outside the OpenFAST -repository. The documentation for the C++ version covers the input file format -(`MoorDyn usage `_, specifically the section for V2) +The documentation for MoorDyn is avaible `here `_. It features instructions +for the use of MoorDynF, the module in OpenFAST, and MoorDynC, the standalone C++ code. Input file formats +are described in the `inputs section `_ +(`MoorDyn usage `_, specifically the section for V2), usage of MoorDyn at the FAST.Farm level -(`MoorDyn with FAST.Farm `_), +(`MoorDyn with FAST.Farm `_), and links to publications with the relevant theory. diff --git a/glue-codes/fast-farm/src/FAST_Farm_Subs.f90 b/glue-codes/fast-farm/src/FAST_Farm_Subs.f90 index 144aea863..a18e41de2 100644 --- a/glue-codes/fast-farm/src/FAST_Farm_Subs.f90 +++ b/glue-codes/fast-farm/src/FAST_Farm_Subs.f90 @@ -1995,7 +1995,7 @@ subroutine FARM_MD_Increment(t, n, farm, ErrStat, ErrMsg) ! ----- map MD load outputs to each turbine's substructure ----- (taken from U FullOpt1...) do nt = 1,farm%p%NumTurbines - if (farm%MD%p%nCpldCons(nt) > 0 ) then ! only map loads if MoorDyn has connections to this turbine (currently considering only Point connections <<< ) + if (farm%MD%p%nCpldPoints(nt) > 0 ) then ! only map loads if MoorDyn has connections to this turbine (currently considering only Point connections <<< ) IF (farm%FWrap(nt)%m%Turbine%p_FAST%CompSub == Module_SD) then SubstructureMotion => farm%FWrap(nt)%m%Turbine%SD%y%y3Mesh diff --git a/glue-codes/openfast/CMakeLists.txt b/glue-codes/openfast/CMakeLists.txt index 24dcb4d84..bc2e13233 100644 --- a/glue-codes/openfast/CMakeLists.txt +++ b/glue-codes/openfast/CMakeLists.txt @@ -20,9 +20,6 @@ add_executable(openfast src/FAST_Prog.f90) target_link_libraries(openfast openfastlib_static) set_target_properties(openfast PROPERTIES LINKER_LANGUAGE Fortran) -add_executable(openfast_cpp src/FAST_Prog.cpp src/FastLibAPI.cpp) -target_link_libraries(openfast_cpp openfastlib) - string(TOUPPER ${CMAKE_Fortran_COMPILER_ID} _compiler_id) if (${_compiler_id} STREQUAL "GNU" AND NOT ${VARIABLE_TRACKING}) # With variable tracking enabled, the compile step frequently aborts on large modules and @@ -33,5 +30,15 @@ if (${_compiler_id} STREQUAL "GNU" AND NOT ${VARIABLE_TRACKING}) set_source_files_properties(src/FAST_Prog.f90 PROPERTIES COMPILE_FLAGS "-fno-var-tracking -fno-var-tracking-assignments") endif() -install(TARGETS openfast openfast_cpp +install(TARGETS openfast RUNTIME DESTINATION bin) + +if(BUILD_OPENFAST_CPP_DRIVER) + add_executable(openfast_cpp_driver src/FAST_Prog.cpp src/FastLibAPI.cpp) + target_link_libraries(openfast_cpp_driver openfastlib) + + install(TARGETS openfast_cpp_driver + RUNTIME DESTINATION bin) +endif() + + diff --git a/modules/aerodyn/src/AeroDyn.f90 b/modules/aerodyn/src/AeroDyn.f90 index 748e6ab26..00e1d954c 100644 --- a/modules/aerodyn/src/AeroDyn.f90 +++ b/modules/aerodyn/src/AeroDyn.f90 @@ -3014,6 +3014,8 @@ subroutine DiskAvgValues(p, u, m, x_hat_disk, y_hat_disk, z_hat_disk, Azimuth) ! calculate disk-averaged velocities m%AvgDiskVel = 0.0_ReKi m%AvgDiskVelDist = 0.0_ReKi ! TODO potentially get rid of that in the future + if (p%NumBlades <= 0) return ! The Intel compiler gets array bounds issues in this routine with no blades. + do k=1,p%NumBlades do j=1,p%NumBlNds m%AvgDiskVelDist = m%AvgDiskVelDist + m%DisturbedInflow(:,j,k) diff --git a/modules/aerodyn/src/AeroDyn_Inflow_C_Binding.f90 b/modules/aerodyn/src/AeroDyn_Inflow_C_Binding.f90 index 0b81ec342..0920c4ff5 100644 --- a/modules/aerodyn/src/AeroDyn_Inflow_C_Binding.f90 +++ b/modules/aerodyn/src/AeroDyn_Inflow_C_Binding.f90 @@ -29,6 +29,7 @@ MODULE AeroDyn_Inflow_C_BINDING IMPLICIT NONE + SAVE PUBLIC :: ADI_C_Init !PUBLIC :: ADI_C_ReInit diff --git a/modules/aerodyn/src/FVW_Subs.f90 b/modules/aerodyn/src/FVW_Subs.f90 index bf53755c2..f10b38f0a 100644 --- a/modules/aerodyn/src/FVW_Subs.f90 +++ b/modules/aerodyn/src/FVW_Subs.f90 @@ -1620,6 +1620,7 @@ subroutine FakeGroundEffect(p, x, m, ErrStat, ErrMsg) character(*), intent( out) :: ErrMsg !< Error message if ErrStat /= ErrID_None integer(IntKi) :: iAge, iW, iSpan integer(IntKi) :: nBelow + integer(IntKi) :: nBelowFW real(ReKi) :: GROUND real(ReKi) :: ABOVE_GROUND ErrStat = ErrID_None @@ -1634,6 +1635,7 @@ subroutine FakeGroundEffect(p, x, m, ErrStat, ErrMsg) endif nBelow=0 + nBelowFW=0 do iW = 1,p%nWings do iAge = 1,m%nNW+1 do iSpan = 1,p%W(iW)%nSpan+1 @@ -1647,10 +1649,11 @@ subroutine FakeGroundEffect(p, x, m, ErrStat, ErrMsg) if (m%nFW>0) then do iW = 1,p%nWings do iAge = 1,m%nFW+1 - do iSpan = 1,FWnSpan + do iSpan = 1,FWnSpan+1 if (x%W(iW)%r_FW(3, iSpan, iAge) < GROUND) then x%W(iW)%r_FW(3, iSpan, iAge) = ABOVE_GROUND ! could use m%dxdt nBelow=nBelow+1 + nBelowFW=nBelowFW+1 endif enddo enddo @@ -1659,6 +1662,9 @@ subroutine FakeGroundEffect(p, x, m, ErrStat, ErrMsg) if (nBelow>0) then print*,'[WARN] Check the simulation, some vortices were found below the ground: ',nBelow endif + if (nBelowFW>0) then + print*,'[WARN] Check the simulation, some far-wake vortices were found below the ground: ',nBelowFW + endif end subroutine FakeGroundEffect !> Compute typical aerodynamic outputs based on: diff --git a/modules/awae/src/AWAE.f90 b/modules/awae/src/AWAE.f90 index 602f84cc8..31acc3f67 100644 --- a/modules/awae/src/AWAE.f90 +++ b/modules/awae/src/AWAE.f90 @@ -1040,6 +1040,7 @@ subroutine AWAE_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, InitO IfW_InitInp%FixedWindFileRootName = .true. IfW_InitInp%NumWindPoints = p%NumGrid_low IfW_InitInp%TurbineID = 0 + IfW_InitInp%MHK = MHK_None call InflowWind_Init( IfW_InitInp, m%u_IfW_Low, p%IfW(0), x%IfW(0), xd%IfW(0), z%IfW(0), OtherState%IfW(0), m%y_IfW_Low, m%IfW(0), Interval, IfW_InitOut, ErrStat2, ErrMsg2 ) call SetErrStat ( errStat2, errMsg2, errStat, errMsg, RoutineName ) diff --git a/modules/beamdyn/src/BeamDyn.f90 b/modules/beamdyn/src/BeamDyn.f90 index 9f84c675b..9ec577e57 100644 --- a/modules/beamdyn/src/BeamDyn.f90 +++ b/modules/beamdyn/src/BeamDyn.f90 @@ -50,7 +50,16 @@ MODULE BeamDyn ! states(z) PUBLIC :: BD_GetOP !< Routine to pack the operating point values (for linearization) into arrays + PUBLIC :: BD_UpdateGlobalRef !< update the BeamDyn reference. The reference for the calculations follows u%RootMotionMesh + ! and therefore x%q must be updated from T -> T+DT to include the root motion from T->T+DT + ! The original formulation kept all states in the inertial reference frame. This has been leading to convergence issues + ! when there is a large rotational change from the reference frame (i.e. large turbine yaw, large blade pitch). During + ! the development of the tight coupling algorithm for OpenFAST, we decided to try changing all the states in BeamDyn to + ! follow the moving BladeRootMotion mesh. This requires changing the states after an UpdateStates call to be relative to + ! the new BladeRootMotion mesh orientation and position. + ! Upadate the reference frame after each State update (or use the old method)? + LOGICAL, PARAMETER :: ChangeRefFrame = .true. CONTAINS @@ -109,48 +118,25 @@ SUBROUTINE BD_Init( InitInp, u, p, x, xd, z, OtherState, y, MiscVar, Interval, I CALL DispNVD( BeamDyn_Ver ) - CALL BD_ReadInput(InitInp%InputFile,InputFileData,InitInp%RootName,Interval,ErrStat2,ErrMsg2) - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if + CALL BD_ReadInput(InitInp%InputFile,InputFileData,InitInp%RootName,Interval,ErrStat2,ErrMsg2); if (Failed()) return + CALL BD_ValidateInputData( InitInp, InputFileData, ErrStat2, ErrMsg2 ); if (Failed()) return - CALL BD_ValidateInputData( InitInp, InputFileData, ErrStat2, ErrMsg2 ) - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if + ! The reference frame is set by the root motion mesh initial position + call InitRefFrame( InitInp, OtherState, ErrStat2, ErrMsg2 ); if (Failed()) return ! this routine sets *some* of the parameters (basically the "easy" ones) - call SetParameters(InitInp, InputFileData, p, ErrStat2, ErrMsg2) - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if + call SetParameters(InitInp, InputFileData, p, OtherState, ErrStat2, ErrMsg2); if (Failed()) return ! Temporary GLL point intrinsic coordinates array - CALL BD_GenerateGLL(p%nodes_per_elem,GLL_nodes,ErrStat2,ErrMsg2) - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if + CALL BD_GenerateGLL(p%nodes_per_elem,GLL_nodes,ErrStat2,ErrMsg2); if (Failed()) return ! In the following, trapezoidalpointweight should be generalized to multi-element; likewise for gausspointweight IF(p%quadrature .EQ. GAUSS_QUADRATURE) THEN - CALL BD_GaussPointWeight(p%nqp,p%QPtN,p%QPtWeight,ErrStat2,ErrMsg2) !calculates p%QPtN and p%QPtWeight - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if + CALL BD_GaussPointWeight(p%nqp,p%QPtN,p%QPtWeight,ErrStat2,ErrMsg2); if (Failed()) return !calculates p%QPtN and p%QPtWeight ELSEIF(p%quadrature .EQ. TRAP_QUADRATURE) THEN @@ -159,41 +145,22 @@ SUBROUTINE BD_Init( InitInp, u, p, x, xd, z, OtherState, y, MiscVar, Interval, I ENDIF ! compute physical distances to set positions of p%uuN0 (FE GLL_Nodes) (depends on p%SP_Coef): - call InitializeNodalLocations(InputFileData%member_total,InputFileData%kp_member,InputFileData%kp_coordinate,p,GLL_nodes,ErrStat2,ErrMsg2) - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if + call InitializeNodalLocations(InputFileData%member_total,InputFileData%kp_member,InputFileData%kp_coordinate,p,GLL_nodes,ErrStat2,ErrMsg2); if (Failed()) return ! compute p%Shp, p%ShpDer, and p%Jacobian: CALL BD_InitShpDerJaco( GLL_Nodes, p ) ! set mass and stiffness matrices: p%Stif0_QP and p%Mass0_QP - call InitializeMassStiffnessMatrices(InputFileData, p, ErrStat2,ErrMsg2) - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if + call InitializeMassStiffnessMatrices(InputFileData, p, ErrStat2,ErrMsg2); if (Failed()) return ! Set the initial displacements: p%uu0, p%E10 CALL BD_QuadraturePointDataAt0(p) - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if - -!FIXME: shift mass stiffness matrices here from the keypoint line to the calculated curvature line in p%uu0 -! CALL BD_KMshift2Ref(p) - call Initialize_FEweights(p,GLL_nodes,ErrStat2,ErrMsg2) ! set p%FEweight; needs p%uuN0 and p%uu0 - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + call Initialize_FEweights(p,GLL_nodes,ErrStat2,ErrMsg2); if (Failed()) return ! set p%FEweight; needs p%uuN0 and p%uu0 ! compute blade mass, CG, and IN for summary file: - CALL BD_ComputeBladeMassNew( p, ErrStat2, ErrMsg2 ) !computes p%blade_mass,p%blade_CG,p%blade_IN - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + CALL BD_ComputeBladeMassNew( p, ErrStat2, ErrMsg2 ); if (Failed()) return !computes p%blade_mass,p%blade_CG,p%blade_IN ! Actuator @@ -209,45 +176,19 @@ SUBROUTINE BD_Init( InitInp, u, p, x, xd, z, OtherState, y, MiscVar, Interval, I ! Define and initialize system inputs (set up and initialize input meshes) here: - call Init_u(InitInp, p, u, ErrStat2, ErrMsg2) - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + call Init_u(InitInp, p, OtherState, u, ErrStat2, ErrMsg2); if (Failed()) return - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if + ! allocate and initialize other states: Also sets the GlbRot for the displaced position (needed for x%q initialization) + call Init_OtherStates(u, p, OtherState, ErrStat2, ErrMsg2); if (Failed()) return ! allocate and initialize continuous states (need to do this after initializing inputs): - call Init_ContinuousStates(p, u, x, ErrStat2, ErrMsg2) - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) - - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if - - ! allocate and initialize other states: - call Init_OtherStates(p, OtherState, ErrStat2, ErrMsg2) - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + call Init_ContinuousStates(p, u, x, OtherState, ErrStat2, ErrMsg2); if (Failed()) return ! initialize outputs (need to do this after initializing inputs and parameters (p%nnu0)) - call Init_y(p, u, y, ErrStat2, ErrMsg2) - call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) - - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if - + call Init_y(p, OtherState, u, y, ErrStat2, ErrMsg2); if (Failed()) return ! allocate and initialize misc vars (do this after initializing input and output meshes): - call Init_MiscVars(p, u, y, MiscVar, ErrStat2, ErrMsg2) - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) - if (ErrStat >= AbortErrLev) then - call cleanup() - return - end if - + call Init_MiscVars(p, u, y, MiscVar, ErrStat2, ErrMsg2); if (Failed()) return ! Now that we have the initial conditions, we can run a quasi-steady-state solve @@ -257,8 +198,7 @@ SUBROUTINE BD_Init( InitInp, u, p, x, xd, z, OtherState, y, MiscVar, Interval, I ! This will set m%qp%aaa, OtherState%Acc, x%q, and x%dqdt ! (note that we won't ramp loads as there are no loads provided yet.) ! if this is not successful, it restores the values of x and sets OtherState%Acc=0 - CALL BD_QuasiStatic(u,p,x,OtherState,MiscVar,ErrStat2,ErrMsg2, RampLoad=.false.) - CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + CALL BD_QuasiStatic(u,p,x,OtherState,MiscVar,ErrStat2,ErrMsg2, RampLoad=.false.); if (Failed()) return QuasiStaticInitialized = ErrStat2 == ErrID_None ! We have now run the quasi-static initialization once, so don't run again. ELSE @@ -280,7 +220,7 @@ SUBROUTINE BD_Init( InitInp, u, p, x, xd, z, OtherState, y, MiscVar, Interval, I end if - CALL Set_BldMotion_NoAcc(p, x, MiscVar, y) + CALL Set_BldMotion_NoAcc(p, x, OtherState, MiscVar, y) IF(QuasiStaticInitialized) THEN ! Set the BldMotion mesh acceleration but only if quasistatic succeeded @@ -293,16 +233,14 @@ SUBROUTINE BD_Init( InitInp, u, p, x, xd, z, OtherState, y, MiscVar, Interval, I !................................. ! set initialization outputs - call SetInitOut(p, InitOut, errStat2, errMsg2) - call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + call SetInitOut(p, InitOut, errStat2, errMsg2); if (Failed()) return !............................................... ! Print the summary file if requested: if (InputFileData%SumPrint) then - call BD_PrintSum( p, x, MiscVar, InitInp, ErrStat2, ErrMsg2 ) - call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + call BD_PrintSum( p, x, OtherState, MiscVar, InitInp, ErrStat2, ErrMsg2 ); if (Failed()) return end if !............................................... @@ -316,9 +254,8 @@ SUBROUTINE BD_Init( InitInp, u, p, x, xd, z, OtherState, y, MiscVar, Interval, I !............................................................................................ ! Initialize Jacobian: !............................................................................................ - if (InitInp%Linearize .or. p%CompAeroMaps) then - call Init_Jacobian( p, u, y, MiscVar, InitOut, ErrStat2, ErrMsg2) - call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + if (InitInp%Linearize) then + call Init_Jacobian( p, u, y, MiscVar, InitOut, ErrStat2, ErrMsg2); if (Failed()) return end if @@ -326,10 +263,15 @@ SUBROUTINE BD_Init( InitInp, u, p, x, xd, z, OtherState, y, MiscVar, Interval, I return CONTAINS - SUBROUTINE Cleanup() - if (allocated(GLL_nodes )) deallocate(GLL_nodes ) - CALL BD_DestroyInputFile( InputFileData, ErrStat2, ErrMsg2) - END SUBROUTINE Cleanup + SUBROUTINE Cleanup() + if (allocated(GLL_nodes )) deallocate(GLL_nodes ) + CALL BD_DestroyInputFile( InputFileData, ErrStat2, ErrMsg2) + END SUBROUTINE Cleanup + logical function Failed() + CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + Failed = ErrStat >= AbortErrLev + if (Failed) call Cleanup() + end function Failed END SUBROUTINE BD_Init !----------------------------------------------------------------------------------------------------------------------------------- @@ -888,12 +830,66 @@ subroutine SetInitOut(p, InitOut, ErrStat, ErrMsg) call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) end subroutine SetInitOut + +!----------------------------------------------------------------------------------------------------------------------------------- +!> Set the global rotation information -- stored in OtherStates +subroutine InitRefFrame( InitInp, OtherState, ErrStat, ErrMsg ) + type(BD_InitInputType), intent(in ) :: InitInp !< Input data for initialization routine + type(BD_OtherStateType), intent(inout) :: OtherState !< Global rotations are stored in otherstate + integer(IntKi), intent( out) :: ErrStat !< Error status of the operation + character(*), intent( out) :: ErrMsg !< Error message if ErrStat /= ErrID_None + integer(intKi) :: ErrStat2 ! temporary Error status + character(ErrMsgLen) :: ErrMsg2 ! temporary Error message + character(*), parameter :: RoutineName = 'InitRefFrame' + + ErrStat = ErrID_None + ErrMsg = "" + + ! Global position vector + OtherState%GlbPos = InitInp%GlbPos + + ! Global rotation tensor. What comes from the driver may not be a properly formed + ! DCM (may have roundoff), so recalculate it from the extracted WM parameters. + OtherState%GlbRot = TRANSPOSE(InitInp%GlbRot) ! matrix that now transfers from local to global (FAST's DCMs convert from global to local) + CALL BD_CrvExtractCrv(OtherState%GlbRot,OtherState%Glb_crv, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + if (ErrStat >= AbortErrLev) return + CALL BD_CrvMatrixR(OtherState%Glb_crv,OtherState%GlbRot) ! ensure that the rotation matrix is a DCM in double precision (this should be the same as TRANSPOSE(InitInp%GlbRot)) +end subroutine InitRefFrame + +!----------------------------------------------------------------------------------------------------------------------------------- +!> Set the global rotation information -- stored in OtherStates +!! This only works for u in the global frame!!!! +subroutine SetRefFrame( u, GlbPos, GlbRot, Glb_Crv, ErrStat, ErrMsg ) + type(BD_InputType), intent(in ) :: u !< Inputs + real(R8Ki), intent( out) :: GlbPos(3) + real(R8Ki), intent( out) :: GlbRot(3,3) + real(R8Ki), intent( out) :: Glb_crv(3) + integer(IntKi), intent( out) :: ErrStat !< Error status of the operation + character(*), intent( out) :: ErrMsg !< Error message if ErrStat /= ErrID_None + integer(intKi) :: ErrStat2 ! temporary Error status + character(ErrMsgLen) :: ErrMsg2 ! temporary Error message + character(*), parameter :: RoutineName = 'SetRefFrame' + + ErrStat = ErrID_None + ErrMsg = "" + + ! Calculate new global position, rotation, and WM from root motion. Note that this is similar to the InitRefFrame routine + GlbPos = u%RootMotion%Position(:, 1) + & + u%RootMotion%TranslationDisp(:, 1) + GlbRot = transpose(u%RootMotion%Orientation(:, :, 1)) + CALL BD_CrvExtractCrv(GlbRot, Glb_crv, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + CALL BD_CrvMatrixR(Glb_crv, GlbRot) +end subroutine SetRefFrame + !----------------------------------------------------------------------------------------------------------------------------------- !> This subroutine allocates and initializes most (not all) of the parameters used in BeamDyn. -subroutine SetParameters(InitInp, InputFileData, p, ErrStat, ErrMsg) +subroutine SetParameters(InitInp, InputFileData, p, OtherState, ErrStat, ErrMsg) type(BD_InitInputType), intent(in ) :: InitInp !< Input data for initialization routine type(BD_InputFile), intent(inout) :: InputFileData !< data from the input file [we may need to shift the keypoint to match a MK matrix eta for trap multi-element] type(BD_ParameterType), intent(inout) :: p !< Parameters ! intent(out) only because it changes p%NdIndx + type(BD_OtherStateType), intent(in ) :: OtherState !< Global rotations are stored in otherstate integer(IntKi), intent( out) :: ErrStat !< Error status of the operation character(*), intent( out) :: ErrMsg !< Error message if ErrStat /= ErrID_None @@ -915,20 +911,8 @@ subroutine SetParameters(InitInp, InputFileData, p, ErrStat, ErrMsg) p%CompAeroMaps = InitInp%CompAeroMaps - ! Global position vector - p%GlbPos = InitInp%GlbPos - - - ! Global rotation tensor. What comes from the driver may not be a properly formed - ! DCM (may have roundoff), so recalculate it from the extracted WM parameters. - p%GlbRot = TRANSPOSE(InitInp%GlbRot) ! matrix that now transfers from local to global (FAST's DCMs convert from global to local) - CALL BD_CrvExtractCrv(p%GlbRot,p%Glb_crv, ErrStat2, ErrMsg2) - CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) - if (ErrStat >= AbortErrLev) return - CALL BD_CrvMatrixR(p%Glb_crv,p%GlbRot) ! ensure that the rotation matrix is a DCM in double precision (this should be the same as TRANSPOSE(InitInp%GlbRot)) - - ! Gravity vector - p%gravity = MATMUL(InitInp%gravity,p%GlbRot) + ! Gravity vector -- inertial frame! This must be multiplied by OtherState%GlbRot to get into the BD rotating reference frame + p%gravity = InitInp%gravity !.................... @@ -1191,9 +1175,10 @@ subroutine SetParameters(InitInp, InputFileData, p, ErrStat, ErrMsg) end subroutine SetParameters !----------------------------------------------------------------------------------------------------------------------------------- !> this routine initializes the outputs, y, that are used in the BeamDyn interface for coupling in the FAST framework. -subroutine Init_y( p, u, y, ErrStat, ErrMsg) +subroutine Init_y( p, OtherState, u, y, ErrStat, ErrMsg) type(BD_ParameterType), intent(inout) :: p !< Parameters -- intent(out) only because it changes p%NdIndx + type(BD_OtherStateType), intent(in ) :: OtherState !< Global rotations are stored in otherstate type(BD_InputType), intent(inout) :: u !< Inputs type(BD_OutputType), intent(inout) :: y !< Outputs integer(IntKi), intent( out) :: ErrStat !< Error status of the operation @@ -1261,10 +1246,10 @@ subroutine Init_y( p, u, y, ErrStat, ErrMsg) temp_id = (j-1)*p%dof_node - Pos = p%GlbPos + MATMUL(p%GlbRot,p%uuN0(1:3,j,i)) + Pos = OtherState%GlbPos + MATMUL(OtherState%GlbRot,p%uuN0(1:3,j,i)) ! possible type conversions here: - DCM = BDrot_to_FASTdcm(p%uuN0(4:6,j,i),p) + DCM = BDrot_to_FASTdcm(p%uuN0(4:6,j,i),p,OtherState) ! set the reference position and orientation for each node. temp_id = (i-1)*p%nodes_per_elem+j @@ -1339,10 +1324,11 @@ subroutine Init_y( p, u, y, ErrStat, ErrMsg) end subroutine Init_y !----------------------------------------------------------------------------------------------------------------------------------- !> this routine initializes the inputs, u, that are used in the BeamDyn interface for coupling in the FAST framework. -subroutine Init_u( InitInp, p, u, ErrStat, ErrMsg ) +subroutine Init_u( InitInp, p, OtherState, u, ErrStat, ErrMsg ) type(BD_InitInputType), intent(in ) :: InitInp !< Input data for initialization routine type(BD_ParameterType), intent(in ) :: p !< Parameters + type(BD_OtherStateType), intent(in ) :: OtherState !< Global rotations are stored in otherstate type(BD_InputType), intent(inout) :: u !< Inputs integer(IntKi), intent( out) :: ErrStat !< Error status of the operation character(*), intent( out) :: ErrMsg !< Error message if ErrStat /= ErrID_None @@ -1420,8 +1406,8 @@ subroutine Init_u( InitInp, p, u, ErrStat, ErrMsg ) if (ErrStat>=AbortErrLev) return - DCM = TRANSPOSE(p%GlbRot) - Pos = p%GlbPos + DCM = TRANSPOSE(OtherState%GlbRot) + Pos = OtherState%GlbPos CALL MeshPositionNode ( Mesh = u%RootMotion & , INode = 1 & , Pos = Pos & @@ -1467,11 +1453,11 @@ subroutine Init_u( InitInp, p, u, ErrStat, ErrMsg ) DO i=1,p%elem_total DO j=1,p%nodes_per_elem - POS = p%GlbPos(1:3) + MATMUL(p%GlbRot,p%uuN0(1:3,j,i)) + POS = OtherState%GlbPos(1:3) + MATMUL(OtherState%GlbRot,p%uuN0(1:3,j,i)) ! Note: Here we can use this subroutine to get the DCM. This is under the assumption ! that there is no rotational displacement yet, so x%q is zero - DCM = BDrot_to_FASTdcm(p%uuN0(4:6,j,i),p) + DCM = BDrot_to_FASTdcm(p%uuN0(4:6,j,i),p,OtherState) temp_id = (i-1)*(p%nodes_per_elem-1)+j CALL MeshPositionNode ( Mesh = u%PointLoad & @@ -1524,11 +1510,11 @@ subroutine Init_u( InitInp, p, u, ErrStat, ErrMsg ) DO i=1,p%elem_total DO j=1,p%nqp !NOTE: if we add multi-element to trap, we will need to change this. temp_id = (i-1)*p%nqp + j + p%qp_indx_offset ! Index to a node within element i - Pos(1:3) = p%GlbPos(1:3) + MATMUL(p%GlbRot,p%uu0(1:3,j,i)) + Pos(1:3) = OtherState%GlbPos(1:3) + MATMUL(OtherState%GlbRot,p%uu0(1:3,j,i)) ! Note: Here we can use this subroutine to get the DCM. This is under the assumption ! that there is no rotational displacement yet, so m%qp%uuu is zero - DCM = BDrot_to_FASTdcm(p%uu0(4:6,j,i),p) + DCM = BDrot_to_FASTdcm(p%uu0(4:6,j,i),p,OtherState) CALL MeshPositionNode ( Mesh = u%DistrLoad & ,INode = temp_id & @@ -1543,8 +1529,8 @@ subroutine Init_u( InitInp, p, u, ErrStat, ErrMsg ) ! For Gauss quadrature, an additional node is added to the end. IF (p%quadrature .EQ. GAUSS_QUADRATURE) THEN ! First node - Pos(1:3) = p%GlbPos(1:3) + MATMUL(p%GlbRot,p%uuN0(1:3,1,1)) - DCM = BDrot_to_FASTdcm(p%uuN0(4:6,1,1),p) + Pos(1:3) = OtherState%GlbPos(1:3) + MATMUL(OtherState%GlbRot,p%uuN0(1:3,1,1)) + DCM = BDrot_to_FASTdcm(p%uuN0(4:6,1,1),p,OtherState) CALL MeshPositionNode ( Mesh = u%DistrLoad & ,INode = 1 & ,Pos = Pos & @@ -1554,8 +1540,8 @@ subroutine Init_u( InitInp, p, u, ErrStat, ErrMsg ) CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) ! Last node - Pos(1:3) = p%GlbPos(1:3) + MATMUL(p%GlbRot,p%uuN0(1:3,p%nodes_per_elem,p%elem_total)) - DCM = BDrot_to_FASTdcm(p%uuN0(4:6,p%nodes_per_elem,p%elem_total),p) + Pos(1:3) = OtherState%GlbPos(1:3) + MATMUL(OtherState%GlbRot,p%uuN0(1:3,p%nodes_per_elem,p%elem_total)) + DCM = BDrot_to_FASTdcm(p%uuN0(4:6,p%nodes_per_elem,p%elem_total),p,OtherState) CALL MeshPositionNode ( Mesh = u%DistrLoad & ,INode = NNodes & ,Pos = Pos & @@ -1773,9 +1759,10 @@ subroutine Init_MiscVars( p, u, y, m, ErrStat, ErrMsg ) end subroutine Init_MiscVars !----------------------------------------------------------------------------------------------------------------------------------- !> this subroutine initializes the other states. -subroutine Init_OtherStates( p, OtherState, ErrStat, ErrMsg ) +subroutine Init_OtherStates( u, p, OtherState, ErrStat, ErrMsg ) + type(BD_InputType), intent(in ) :: u !< inputs (need new root location) type(BD_ParameterType), intent(in ) :: p !< Parameters - type(BD_OtherStateType), intent(inout) :: OtherState !< Other states + type(BD_OtherStateType), intent(inout) :: OtherState !< Other states (inout since reference info from GlbRot is stored here) integer(IntKi), intent( out) :: ErrStat !< Error status of the operation character(*), intent( out) :: ErrMsg !< Error message if ErrStat /= ErrID_None @@ -1806,13 +1793,17 @@ subroutine Init_OtherStates( p, OtherState, ErrStat, ErrMsg ) ! BJJ: not sure this should be used in CalcOutput when we are calculating Jacobians (this will alter the operating point of the continuous state) OtherState%RunQuasiStaticInit = .FALSE. + ! set the global position information -- u must be in the global frame for the SetRefFrame routine + call SetRefFrame(u, OtherState%GlbPos, OtherState%GlbRot, OtherState%Glb_Crv, ErrStat2,ErrMsg2); CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + end subroutine Init_OtherStates !----------------------------------------------------------------------------------------------------------------------------------- !> this subroutine initializes the continuous states. -subroutine Init_ContinuousStates( p, u, x, ErrStat, ErrMsg ) +subroutine Init_ContinuousStates( p, u, x, OtherState, ErrStat, ErrMsg ) type(BD_ParameterType), intent(inout) :: p !< Parameters !sets the copy-of-state values type(BD_InputType), intent(inout) :: u !< Inputs !intent(out) because of mesh copy, otherwise not changed type(BD_ContinuousStateType), intent(inout) :: x !< Continuous states + type(BD_OtherStateType), intent(in ) :: OtherState !< Other states (contains refrence frame info) integer(IntKi), intent( out) :: ErrStat !< Error status of the operation character(*), intent( out) :: ErrMsg !< Error message if ErrStat /= ErrID_None @@ -1847,11 +1838,11 @@ subroutine Init_ContinuousStates( p, u, x, ErrStat, ErrMsg ) end if ! convert to BeamDyn-internal system inputs, u_tmp: - CALL BD_InputGlobalLocal(p,u_tmp) + CALL BD_InputGlobalLocal(p,OtherState,u_tmp) ! initialize states, given parameters and initial inputs (in BD coordinates) - CALL BD_CalcIC_Position(u_tmp,p,x, ErrStat2, ErrMsg2) + CALL BD_CalcIC_Position(u_tmp,p,x,OtherState, ErrStat2, ErrMsg2) CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) CALL BD_CalcIC_Velocity(u_tmp,p,x) CALL Cleanup() @@ -1937,17 +1928,22 @@ SUBROUTINE BD_UpdateStates( t, n, u, utimes, p, x, xd, z, OtherState, m, ErrStat INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None - + INTEGER(IntKi) :: ErrStat2 ! Temporary Error status + CHARACTER(ErrMsgLen) :: ErrMsg2 ! Temporary Error message ! Initialize ErrStat - ErrStat = ErrID_None ErrMsg = "" IF(p%analysis_type /= BD_STATIC_ANALYSIS) THEN ! dynamic analysis - CALL BD_GA2( t, n, u, utimes, p, x, xd, z, OtherState, m, ErrStat, ErrMsg ) + CALL BD_GA2( t, n, u, utimes, p, x, xd, z, OtherState, m, ErrStat2, ErrMsg2 ) + call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,''); if (ErrStat >= AbortErrLev) return + + ! change reference frame to root motion at t=T+DT (u(1)%RootMotionMesh) + call BD_UpdateGlobalRef(u(1),p,x,OtherState,ErrStat2,ErrMsg2) + call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,'') ELSE !IF(p%analysis_type == BD_STATIC_ANALYSIS) THEN - CALL BD_Static( t, u, utimes, p, x, OtherState, m, ErrStat, ErrMsg ) + CALL BD_Static( t, u, utimes, p, x, OtherState, m, ErrStat, ErrMsg ) ENDIF END SUBROUTINE BD_UpdateStates @@ -2042,14 +2038,15 @@ SUBROUTINE BD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg, ! convert to BD coordinates and apply boundary conditions - CALL BD_InputGlobalLocal(p,m%u) + CALL BD_InputGlobalLocal(p,OtherState,m%u) ! Copy over the DistrLoads CALL BD_DistrLoadCopy( p, m%u, m ) ! Incorporate boundary conditions (note that we are doing this because the first node isn't really a state. should fix x so we don't need a temp copy here.) - x_tmp%q( 1:3,1) = m%u%RootMotion%TranslationDisp(:,1) - CALL ExtractRelativeRotation(m%u%RootMotion%Orientation(:,:,1),p, x_tmp%q( 4:6,1), ErrStat2, ErrMsg2) + x_tmp%q(1:3,1) = m%u%RootMotion%TranslationDisp(:,1) + & + matmul(m%u%RootMotion%Position(:,1) - OtherState%GlbPos, OtherState%GlbRot) + CALL ExtractRelativeRotation(m%u%RootMotion%Orientation(:,:,1), p, OtherState, x_tmp%q( 4:6,1), ErrStat2, ErrMsg2) CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) if (ErrStat >= AbortErrLev) return x_tmp%dqdt(1:3,1) = m%u%RootMotion%TranslationVel(:,1) @@ -2065,27 +2062,27 @@ SUBROUTINE BD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg, CALL BD_QPDataVelocity( p, x_tmp, m ) ! x%dqdt --> m%qp%vvv, m%qp%vvp ! calculate accelerations and reaction loads (in m%RHS): - CALL BD_CalcForceAcc(m%u, p, m, ErrStat2,ErrMsg2) + CALL BD_CalcForceAcc(m%u, p, OtherState, m, ErrStat2,ErrMsg2) CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) ELSE ! Calculate the elastic forces for the static case. DO nelem=1,p%elem_total - CALL BD_StaticElementMatrix( nelem, p%gravity, p, m ) + CALL BD_StaticElementMatrix( nelem, MATMUL(p%gravity,OtherState%GlbRot), p, m ) ENDDO ENDIF ! Calculate internal forces and moments - CALL BD_InternalForceMoment( x, p, m ) + CALL BD_InternalForceMoment( x_tmp, OtherState, p, m ) ! Transfer the FirstNodeReaction forces to the output ReactionForce - y%ReactionForce%Force(:,1) = MATMUL(p%GlbRot,m%FirstNodeReactionLclForceMoment(1:3)) - y%ReactionForce%Moment(:,1) = MATMUL(p%GlbRot,m%FirstNodeReactionLclForceMoment(4:6)) + y%ReactionForce%Force(:,1) = MATMUL(OtherState%GlbRot,m%FirstNodeReactionLclForceMoment(1:3)) + y%ReactionForce%Moment(:,1) = MATMUL(OtherState%GlbRot,m%FirstNodeReactionLclForceMoment(4:6)) ! set y%BldMotion fields: - CALL Set_BldMotion_Mesh( p, m%u2, x, m, y) + CALL Set_BldMotion_Mesh( p, m%u2, x_tmp, OtherState, m, y) !------------------------------------------------------- ! compute RootMxr and RootMyr for ServoDyn and @@ -2112,7 +2109,7 @@ SUBROUTINE BD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg, y%WriteOutput(p%NumOuts+1:) = 0.0_ReKi ! Now we need to populate the blade node outputs here - call Calc_WriteBldNdOutput( p, m, y, ErrStat2, ErrMsg2 ) ! Call after normal writeoutput. Will just postpend data on here. + call Calc_WriteBldNdOutput( p, OtherState, m, y, ErrStat2, ErrMsg2 ) ! Call after normal writeoutput. Will just postpend data on here. CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) ENDIF end if @@ -2167,7 +2164,7 @@ SUBROUTINE BD_CalcContStateDeriv( t, u, p, x, xd, z, OtherState, m, dxdt, ErrSta ! END Actuator ! convert to BD coordinates and apply boundary conditions - CALL BD_InputGlobalLocal(p,m%u) + CALL BD_InputGlobalLocal(p,OtherState,m%u) ! Copy over the DistrLoads CALL BD_DistrLoadCopy( p, m%u, m ) @@ -2177,11 +2174,13 @@ SUBROUTINE BD_CalcContStateDeriv( t, u, p, x, xd, z, OtherState, m, dxdt, ErrSta CALL BD_CopyContState(x, dxdt, MESH_UPDATECOPY, ErrStat2, ErrMsg2) CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) - dxdt%q( 1:3,1) = m%u%RootMotion%TranslationDisp(:,1) - CALL ExtractRelativeRotation(m%u%RootMotion%Orientation(:,:,1),p, dxdt%q( 4:6,1), ErrStat2, ErrMsg2) + ! Root displacement is relative to the GlbPos at time T, which is simply the difference between + ! the previous root position (GlbPos) and the new extrapolated position (Pos+TransDisp) + dxdt%q(1:3,1) = m%u%RootMotion%TranslationDisp(:,1) + & + matmul(m%u%RootMotion%Position(:,1) - OtherState%GlbPos, OtherState%GlbRot) + CALL ExtractRelativeRotation(m%u%RootMotion%Orientation(:,:,1), p, OtherState, dxdt%q(4:6,1), ErrStat2, ErrMsg2) CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) if (ErrStat >= AbortErrLev) return - !dxdt%q( 4:6,1) = ExtractRelativeRotation(m%u%RootMotion%Orientation(:,:,1),p) dxdt%dqdt(1:3,1) = m%u%RootMotion%TranslationVel(:,1) dxdt%dqdt(4:6,1) = m%u%Rootmotion%RotationVel(:,1) @@ -2193,7 +2192,7 @@ SUBROUTINE BD_CalcContStateDeriv( t, u, p, x, xd, z, OtherState, m, dxdt, ErrSta CALL BD_QPDataVelocity( p, dxdt, m ) ! x%dqdt --> m%qp%vvv, m%qp%vvp ! calculate accelerations and reaction loads (in m%RHS): - CALL BD_CalcForceAcc(m%u, p, m, ErrStat2,ErrMsg2) + CALL BD_CalcForceAcc(m%u, p, OtherState, m, ErrStat2,ErrMsg2) CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) if (ErrStat >= AbortErrLev) return @@ -3211,10 +3210,11 @@ END SUBROUTINE BD_AssembleRHS !----------------------------------------------------------------------------------------------------------------------------------- !> This subroutine total element forces and mass matrices !FIXME: note similarities with BD_ElementMatrixGA2 -SUBROUTINE BD_ElementMatrixAcc( nelem, p, m ) +SUBROUTINE BD_ElementMatrixAcc( nelem, p, OtherState, m ) INTEGER(IntKi), INTENT(IN ) :: nelem !< number of current element TYPE(BD_ParameterType), INTENT(IN ) :: p !< Parameters + TYPE(BD_OtherStateType), INTENT(IN ) :: OtherState !< other states -- includes the orientation TYPE(BD_MiscVarType), INTENT(INOUT) :: m !< Misc/optimization variables CHARACTER(*), PARAMETER :: RoutineName = 'BD_ElementMatrixAcc' @@ -3224,7 +3224,7 @@ SUBROUTINE BD_ElementMatrixAcc( nelem, p, m ) IF(p%damp_flag .NE. 0) THEN CALL BD_DissipativeForce( nelem, p, m, .FALSE. ) ! Calculate dissipative terms on Fc, Fd ENDIF - CALL BD_GravityForce( nelem, p, m, p%gravity ) ! Calculate Fg + CALL BD_GravityForce( nelem, p, m, MATMUL(p%gravity,OtherState%GlbRot) ) ! Calculate Fg CALL BD_GyroForce( nelem, p, m ) ! Calculate Fb (velocity terms from InertialForce with aaa=0) CALL BD_InertialMassMatrix( nelem, p, m ) ! Calculate Mi @@ -3392,7 +3392,7 @@ SUBROUTINE BD_Static(t,u,utimes,p,x,OtherState,m,ErrStat,ErrMsg) ! Transform quantities from global frame to local (blade in BD coords) frame - CALL BD_InputGlobalLocal(p,u_interp) + CALL BD_InputGlobalLocal(p,OtherState,u_interp) ! Incorporate boundary conditions @@ -3420,7 +3420,7 @@ SUBROUTINE BD_Static(t,u,utimes,p,x,OtherState,m,ErrStat,ErrMsg) DO j=1,p%ld_retries CALL BD_DistrLoadCopy( p, u_interp, m, load_test ) ! move the input loads from u_interp into misc vars - gravity_temp(:) = p%gravity(:)*load_test + gravity_temp(:) = MATMUL(p%gravity,OtherState%GlbRot)*load_test CALL BD_StaticSolution(x, gravity_temp, p, m, piter, ErrStat2, ErrMsg2) call SetErrStat(ErrStat2,ErrMsg2,ErrStat, ErrMsg, RoutineName) ! concerned about error reporting @@ -3862,7 +3862,7 @@ SUBROUTINE BD_QuasiStatic(u,p,x,OtherState,m,ErrStat,ErrMsg, RampLoad) ! Transform quantities from global frame to local (blade in BD coords) frame - CALL BD_InputGlobalLocal(p,u_temp) + CALL BD_InputGlobalLocal(p,OtherState,u_temp) ! Incorporate boundary conditions CALL BD_BoundaryGA2(x,p,u_temp,OtherState, ErrStat2, ErrMsg2) @@ -4115,7 +4115,7 @@ SUBROUTINE BD_GenerateQuasiStaticElement( x, OtherState, p, m ) DO nelem=1,p%elem_total - CALL BD_QuasiStaticElementMatrix( nelem, p, m ) + CALL BD_QuasiStaticElementMatrix( nelem, p, OtherState, m ) CALL BD_AssembleStiffK(nelem,p,m%elk,m%StifK) CALL BD_AssembleRHS(nelem,p,m%elf,m%RHS) @@ -4126,10 +4126,11 @@ END SUBROUTINE BD_GenerateQuasiStaticElement !----------------------------------------------------------------------------------------------------------------------------------- -SUBROUTINE BD_QuasiStaticElementMatrix( nelem, p, m ) +SUBROUTINE BD_QuasiStaticElementMatrix( nelem, p, OtherState, m ) INTEGER(IntKi), INTENT(IN ) :: nelem !< current element number TYPE(BD_ParameterType), INTENT(IN ) :: p !< Parameters + TYPE(BD_OtherStateType), INTENT(IN ) :: OtherState !< other states (contains global rotation to get gravity in correct orientation) TYPE(BD_MiscVarType), INTENT(INOUT) :: m !< misc/optimization variables INTEGER(IntKi) :: i @@ -4140,7 +4141,7 @@ SUBROUTINE BD_QuasiStaticElementMatrix( nelem, p, m ) CALL BD_ElasticForce( nelem,p,m,.true. ) ! Calculate Fc, Fd [and Oe, Pe, and Qe for N-R algorithm] - CALL BD_GravityForce( nelem,p,m,p%gravity ) ! Calculate Fg + CALL BD_GravityForce( nelem,p,m,MATMUL(p%gravity,OtherState%GlbRot) ) ! Calculate Fg ! NOTE: we only use Ki (not Gi or Mi as we are not calculating \delta{a} or \delta{v}) CALL BD_InertialForce( nelem,p,m,.true. ) ! Calculate Fi [and Mi, Gi, Ki] @@ -4192,9 +4193,10 @@ END SUBROUTINE BD_QuasiStaticElementMatrix ! nodes along beam axis for the static case. This is more involved than in the dynamic case because m%EFint is not calculated beforehand. ! Nodal forces = K u !FIXME: NOTE: if we go to multiple elements for trap quadrature, we will need to double check this routine. -SUBROUTINE BD_InternalForceMoment( x, p, m ) +SUBROUTINE BD_InternalForceMoment( x, OtherState, p, m ) TYPE(BD_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at t + TYPE(BD_OtherStateType), INTENT(IN ) :: OtherState !< Other states at t (contains blade reference frame) TYPE(BD_ParameterType), INTENT(IN ) :: p !< Parameters TYPE(BD_MiscVarType), INTENT(INOUT) :: m !< misc/optimization variables @@ -4306,8 +4308,8 @@ SUBROUTINE BD_InternalForceMoment( x, p, m ) ! Rotate coords to global reference frame DO i=1,SIZE(m%BldInternalForceFE,DIM=2) - m%BldInternalForceFE(1:3,i) = MATMUL(p%GlbRot,m%BldInternalForceFE(1:3,i)) - m%BldInternalForceFE(4:6,i) = MATMUL(p%GlbRot,m%BldInternalForceFE(4:6,i)) + m%BldInternalForceFE(1:3,i) = MATMUL(OtherState%GlbRot,m%BldInternalForceFE(1:3,i)) + m%BldInternalForceFE(4:6,i) = MATMUL(OtherState%GlbRot,m%BldInternalForceFE(4:6,i)) ENDDO @@ -4420,7 +4422,7 @@ SUBROUTINE BD_GA2(t,n,u,utimes,p,x,xd,z,OtherState,m,ErrStat,ErrMsg) !................ ! Transform quantities from global frame to local (blade) frame - CALL BD_InputGlobalLocal(p,u_interp) + CALL BD_InputGlobalLocal(p,OtherState,u_interp) ! Copy over the DistrLoads CALL BD_DistrLoadCopy( p, u_interp, m ) @@ -4434,7 +4436,7 @@ SUBROUTINE BD_GA2(t,n,u,utimes,p,x,xd,z,OtherState,m,ErrStat,ErrMsg) end if ! initialize the accelerations in OtherState%Acc - CALL BD_InitAcc( u_interp, p, x, m, OtherState%Acc, ErrStat2, ErrMsg2) + CALL BD_InitAcc( u_interp, p, x, OtherState, m, OtherState%Acc, ErrStat2, ErrMsg2) call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName) if (ErrStat >= AbortErrLev) then call cleanup() @@ -4482,7 +4484,7 @@ SUBROUTINE BD_GA2(t,n,u,utimes,p,x,xd,z,OtherState,m,ErrStat,ErrMsg) ENDIF ! Transform quantities from global frame to local (blade in BD coords) frame - CALL BD_InputGlobalLocal(p,u_interp) + CALL BD_InputGlobalLocal(p,OtherState,u_interp) ! Copy over the DistrLoads CALL BD_DistrLoadCopy( p, u_interp, m ) @@ -4603,21 +4605,24 @@ SUBROUTINE BD_BoundaryGA2(x,p,u,OtherState, ErrStat, ErrMsg) INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None - INTEGER(IntKi) :: ErrStat2 ! Temporary Error status - CHARACTER(ErrMsgLen) :: ErrMsg2 ! Temporary Error message + INTEGER(IntKi) :: ErrStat2 ! Temporary Error status + CHARACTER(ErrMsgLen) :: ErrMsg2 ! Temporary Error message CHARACTER(*), PARAMETER :: RoutineName = 'BD_BoundaryGA2' ! Initialize ErrStat ErrStat = ErrID_None ErrMsg = "" + ! NOTE: u is in a BD local frame. So cannot use SetRefFrame routine (note there are differences here) + ! Root displacements - x%q(1:3,1) = u%RootMotion%TranslationDisp(1:3,1) + x%q(1:3,1) = u%RootMotion%TranslationDisp(1:3,1) + & + matmul(u%RootMotion%Position(:,1) - OtherState%GlbPos, OtherState%GlbRot) ! Root rotations - CALL ExtractRelativeRotation(u%RootMotion%Orientation(:,:,1),p, x%q(4:6,1), ErrStat2, ErrMsg2) - CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) - if (ErrStat >= AbortErrLev) return + CALL ExtractRelativeRotation(u%RootMotion%Orientation(:,:,1),p, OtherState, x%q(4:6,1), ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + if (ErrStat >= AbortErrLev) return ! Root velocities/angular velocities and accelerations/angular accelerations x%dqdt(1:3,1) = u%RootMotion%TranslationVel(1:3,1) @@ -4935,7 +4940,7 @@ SUBROUTINE BD_GenerateDynamicElementGA2( x, OtherState, p, m, fact ) DO nelem=1,p%elem_total ! compute m%elk,m%elf,m%elm,m%elg: - CALL BD_ElementMatrixGA2(fact, nelem, p, m ) + CALL BD_ElementMatrixGA2(fact, nelem, p, OtherState, m ) IF(fact) THEN CALL BD_AssembleStiffK(nelem,p,m%elk,m%StifK) @@ -4951,9 +4956,10 @@ END SUBROUTINE BD_GenerateDynamicElementGA2 !----------------------------------------------------------------------------------------------------------------------------------- !FIXME: lots of pieces of BD_ElementMatrixAcc show up in here -SUBROUTINE BD_ElementMatrixGA2( fact, nelem, p, m ) +SUBROUTINE BD_ElementMatrixGA2( fact, nelem, p, OtherState, m ) TYPE(BD_ParameterType), INTENT(IN ) :: p !< Parameters + TYPE(BD_OtherStateType), INTENT(IN ) :: OtherState !< other states (contains global orientation to get gravity in right direction) TYPE(BD_MiscVarType), INTENT(INOUT) :: m !< misc/optimization variables LOGICAL, INTENT(IN ) :: fact !< are we factoring? @@ -4978,7 +4984,7 @@ SUBROUTINE BD_ElementMatrixGA2( fact, nelem, p, m ) CALL BD_DissipativeForce( nelem,p,m,fact ) ! Calculate dissipative terms on Fc, Fd [and Sd, Od, Pd and Qd, betaC, Gd, Xd, Yd for N-R algorithm] ENDIF - CALL BD_GravityForce( nelem, p, m, p%gravity ) + CALL BD_GravityForce( nelem, p, m, MATMUL(p%gravity,OtherState%GlbRot) ) @@ -5147,32 +5153,33 @@ END SUBROUTINE BD_CompTngtStiff !! 4 Point forces/moments !! 5 Distributed forces/moments !! It also transforms the DCM to rotation tensor in the input data structure -SUBROUTINE BD_InputGlobalLocal(p, u) +SUBROUTINE BD_InputGlobalLocal(p, OtherState, u) TYPE(BD_ParameterType), INTENT(IN ):: p + TYPE(BD_OtherStateType),INTENT(IN ):: OtherState !< Other states at t on input; at t+dt on outputs TYPE(BD_InputType), INTENT(INOUT):: u INTEGER(IntKi) :: i !< Generic counter CHARACTER(*), PARAMETER :: RoutineName = 'BD_InputGlobalLocal' ! Transform Root Motion from Global to Local (Blade) frame - u%RootMotion%TranslationDisp(:,1) = MATMUL(u%RootMotion%TranslationDisp(:,1),p%GlbRot) - u%RootMotion%TranslationVel(:,1) = MATMUL(u%RootMotion%TranslationVel( :,1),p%GlbRot) - u%RootMotion%RotationVel(:,1) = MATMUL(u%RootMotion%RotationVel( :,1),p%GlbRot) - u%RootMotion%TranslationAcc(:,1) = MATMUL(u%RootMotion%TranslationAcc( :,1),p%GlbRot) - u%RootMotion%RotationAcc(:,1) = MATMUL(u%RootMotion%RotationAcc( :,1),p%GlbRot) + u%RootMotion%TranslationDisp(:,1) = MATMUL(u%RootMotion%TranslationDisp(:,1),OtherState%GlbRot) + u%RootMotion%TranslationVel(:,1) = MATMUL(u%RootMotion%TranslationVel( :,1),OtherState%GlbRot) + u%RootMotion%RotationVel(:,1) = MATMUL(u%RootMotion%RotationVel( :,1),OtherState%GlbRot) + u%RootMotion%TranslationAcc(:,1) = MATMUL(u%RootMotion%TranslationAcc( :,1),OtherState%GlbRot) + u%RootMotion%RotationAcc(:,1) = MATMUL(u%RootMotion%RotationAcc( :,1),OtherState%GlbRot) ! Transform DCM to Rotation Tensor (RT) u%RootMotion%Orientation(:,:,1) = TRANSPOSE(u%RootMotion%Orientation(:,:,1)) ! matrix that now transfers from local to global (FAST's DCMs convert from global to local) ! Transform Applied Forces from Global to Local (Blade) frame DO i=1,p%node_total - u%PointLoad%Force(1:3,i) = MATMUL(u%PointLoad%Force(:,i),p%GlbRot) - u%PointLoad%Moment(1:3,i) = MATMUL(u%PointLoad%Moment(:,i),p%GlbRot) + u%PointLoad%Force(1:3,i) = MATMUL(u%PointLoad%Force(:,i),OtherState%GlbRot) + u%PointLoad%Moment(1:3,i) = MATMUL(u%PointLoad%Moment(:,i),OtherState%GlbRot) ENDDO ! transform distributed forces and moments DO i=1,u%DistrLoad%Nnodes - u%DistrLoad%Force(1:3,i) = MATMUL(u%DistrLoad%Force(:,i),p%GlbRot) - u%DistrLoad%Moment(1:3,i) = MATMUL(u%DistrLoad%Moment(:,i),p%GlbRot) + u%DistrLoad%Force(1:3,i) = MATMUL(u%DistrLoad%Force(:,i),OtherState%GlbRot) + u%DistrLoad%Moment(1:3,i) = MATMUL(u%DistrLoad%Moment(:,i),OtherState%GlbRot) ENDDO END SUBROUTINE BD_InputGlobalLocal @@ -5226,11 +5233,12 @@ END SUBROUTINE BD_DistrLoadCopy !! The initial displacements/rotations and linear velocities are !! set to the root value; the angular velocities over the beam !! are computed based on rigid body rotation: \omega = v_{root} \times r_{pos} -SUBROUTINE BD_CalcIC_Position( u, p, x, ErrStat, ErrMsg) +SUBROUTINE BD_CalcIC_Position( u, p, x, OtherState, ErrStat, ErrMsg) TYPE(BD_InputType), INTENT(IN ) :: u !< Inputs at t (in BD coordinates) TYPE(BD_ParameterType), INTENT(IN ) :: p !< Parameters TYPE(BD_ContinuousStateType), INTENT(INOUT) :: x !< Continuous states at t + TYPE(BD_OtherStateType), INTENT(IN ) :: OtherState !< Other states (contains reference frame info) INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None @@ -5251,7 +5259,7 @@ SUBROUTINE BD_CalcIC_Position( u, p, x, ErrStat, ErrMsg) ! Since RootMotion%Orientation is the transpose of the absolute orientation in the global frame, ! we need to find the relative change in orientation from the reference. - CALL ExtractRelativeRotation(u%RootMotion%Orientation(:,:,1),p,temp_rv, ErrStat2, ErrMsg2) + CALL ExtractRelativeRotation(u%RootMotion%Orientation(:,:,1), p, OtherState, temp_rv, ErrStat2, ErrMsg2) CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) if (ErrStat >= AbortErrLev) return @@ -5263,10 +5271,10 @@ SUBROUTINE BD_CalcIC_Position( u, p, x, ErrStat, ErrMsg) DO j=k,p%nodes_per_elem ! reference at current root orientation. temp_p0 = MATMUL(u%rootmotion%orientation(:,:,1),p%uuN0(1:3,j,i)) ! Global frame - temp_p0 = MATMUL(temp_p0, p%GlbRot ) ! Into the local frame + temp_p0 = MATMUL(temp_p0, OtherState%GlbRot ) ! Into the local frame ! Add the root displacement (in local frame) to the reference at current root orientation in local frame, ! and subtract the reference to get the displacement. This is equivalent to TranslationDisp in the local frame. - x%q(1:3,temp_id+j) = u%RootMotion%TranslationDisp(1:3,1) + temp_p0 - p%uuN0(1:3,j,i) + x%q(1:3,temp_id+j) = temp_p0 - p%uuN0(1:3,j,i) ENDDO k = 2 ! start j loop at k=2 for remaining elements (i>1) ENDDO @@ -5413,11 +5421,12 @@ END SUBROUTINE BD_CalcCentripAcc !----------------------------------------------------------------------------------------------------------------------------------- !! Routine for computing outputs, used in both loose and tight coupling. -SUBROUTINE BD_InitAcc( u, p, x, m, qdotdot, ErrStat, ErrMsg ) +SUBROUTINE BD_InitAcc( u, p, x, OtherState, m, qdotdot, ErrStat, ErrMsg ) TYPE(BD_InputType), INTENT(IN ) :: u !< Inputs at t (in BD coordinates) TYPE(BD_ParameterType), INTENT(IN ) :: p !< Parameters TYPE(BD_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at t + TYPE(BD_OtherStateType), INTENT(IN ) :: OtherState !< Other states at t TYPE(BD_MiscVarType), INTENT(INOUT) :: m !< Misc/optimization variables REAL(BDKi), INTENT( OUT) :: qdotdot(:,:) !< accelerations INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation @@ -5441,7 +5450,7 @@ SUBROUTINE BD_InitAcc( u, p, x, m, qdotdot, ErrStat, ErrMsg ) CALL BD_QPDataVelocity(p, x, m) ! set misc vars, particularly m%RHS - CALL BD_CalcForceAcc( u, p, m, ErrStat2, ErrMsg2 ) + CALL BD_CalcForceAcc( u, p, OtherState, m, ErrStat2, ErrMsg2 ) CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) ! set accelerations with inputs from the root and BD_CalcForceAcc solution @@ -5525,10 +5534,11 @@ END SUBROUTINE BD_InitAcc !! !! The root reaction force is therefore calculated afterwards as !! \f$ F_\textrm{root} = f_1 - \sum_{i} m_{1,i} a_{i} \f$. -SUBROUTINE BD_CalcForceAcc( u, p, m, ErrStat, ErrMsg ) +SUBROUTINE BD_CalcForceAcc( u, p, OtherState, m, ErrStat, ErrMsg ) TYPE(BD_InputType), INTENT(IN ) :: u !< Inputs at t TYPE(BD_ParameterType), INTENT(IN ) :: p !< Parameters + TYPE(BD_OtherStateType), INTENT(IN ) :: OtherState !< other states (contains ref orientation) TYPE(BD_MiscVarType), INTENT(INOUT) :: m !< Misc/optimization variables INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None @@ -5555,7 +5565,7 @@ SUBROUTINE BD_CalcForceAcc( u, p, m, ErrStat, ErrMsg ) ! Calculate the global mass matrix and force vector for the beam DO nelem=1,p%elem_total - CALL BD_ElementMatrixAcc( nelem, p, m ) ! Calculate m%elm and m%elf + CALL BD_ElementMatrixAcc( nelem, p, OtherState, m ) ! Calculate m%elm and m%elf CALL BD_AssembleStiffK(nelem,p,m%elm, m%MassM) ! Assemble full mass matrix CALL BD_AssembleRHS(nelem,p,m%elf, m%RHS) ! Assemble right hand side force terms ENDDO @@ -5857,7 +5867,7 @@ SUBROUTINE BD_JacobianPInput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrM return end if - call Compute_RelState_Matrix(p, u, x, RelState_x, RelState_xdot) + call Compute_RelState_Matrix(p, u, x, OtherState, RelState_x, RelState_xdot) if ( present(StateRel_x) ) then if (.not. allocated(StateRel_x)) then @@ -6822,6 +6832,96 @@ END SUBROUTINE cleanup END SUBROUTINE BD_WriteMassStiffInFirstNodeFrame !---------------------------------------------------------------------------------------------------------------------------------- +!---------------------------------------------------------------------------------------------------------------------------------- +!> Update the state information to follow the blade rootmotion mesh. +!! - move the state information in x from the previous reference frame at time T (u(2)%rootmotion) to the new reference frame at T+dt (u(1)%rootmation) +!! - the GlbRot, GlbPos, and Glb_crv values are stored as otherstates and updated +subroutine BD_UpdateGlobalRef(u, p, x, OtherState, ErrStat, ErrMsg) + type(BD_InputType), intent(in ) :: u !< Inputs at utimes + type(BD_ParameterType), intent(in ) :: p !< Parameters + type(BD_ContinuousStateType), intent(inout) :: x !< Input: Continuous states at t; + type(BD_OtherStateType), intent(inout) :: OtherState !< Other states: Other states at t; + integer(IntKi), intent( out) :: ErrStat !< Error status of the operation + character(*), intent( out) :: ErrMsg !< Error message if ErrStat /= + + character(*), parameter :: RoutineName = 'BD_UpdateGlobalRef' + integer(IntKi) :: ErrStat2 + character(ErrMsgLen) :: ErrMsg2 ! Temporary Error message + real(R8Ki) :: GlbWM_old(3), GlbWM_new(3), GlbWM_diff(3) + real(R8Ki) :: GlbRot_old(3, 3), GlbRot_new(3, 3), GlbRot_diff(3, 3) + real(R8Ki) :: GlbPos_old(3), GlbPos_new(3) + real(R8Ki) :: pos(3), rot(3), trans_vel(3), rot_vel(3), uuN0(3) + integer(IntKi) :: i, j, temp_id + + ErrStat = ErrID_None + ErrMsg = "" + + ! If reference frame shouldn't be changed, return + if (.not. ChangeRefFrame) return + + ! Save old global position, rotation, and WM + GlbPos_old = OtherState%GlbPos + GlbRot_old = OtherState%GlbRot + GlbWM_old = OtherState%Glb_crv + + ! Calculate new global position, rotation, and WM from root motion -- u must be in the global frame for the SetRefFrame routine + call SetRefFrame(u, OtherState%GlbPos, OtherState%GlbRot, OtherState%Glb_Crv, ErrStat2,ErrMsg2) + CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + if (ErrStat >= AbortErrLev) return + GlbPos_new = OtherState%GlbPos + GlbRot_new = OtherState%GlbRot + GlbWM_new = OtherState%Glb_crv + + ! Calculate differences between old and new reference + call BD_CrvCompose(GlbWM_diff, GlbWM_new, GlbWM_old, FLAG_R1TR2) + call BD_CrvMatrixR(GlbWM_diff, GlbRot_diff) + + do i = 1, p%elem_total + do j = 1, p%nodes_per_elem + + ! The last node of the first element is used as the first node in the second element. + temp_id = (i - 1)*(p%nodes_per_elem - 1) + j + + ! Calculate displacement in terms of new root motion mesh position + x%q(1:3, temp_id) = matmul(transpose(GlbRot_new), & + GlbPos_old - GlbPos_new + & + matmul(GlbRot_old, p%uuN0(1:3, j, i) + x%q(1:3, temp_id)) - & + matmul(GlbRot_new, p%uuN0(1:3, j, i))) + + ! Update the node orientation rotation of the node + call BD_CrvCompose(x%q(4:6, temp_id), GlbWM_diff, x%q(4:6, temp_id), FLAG_R1R2) + + end do + end do + + ! Update the translational velocity + x%dqdt(1:3, :) = matmul(GlbRot_diff, x%dqdt(1:3, :)) + + ! Update the rotational velocity + x%dqdt(4:6, :) = matmul(GlbRot_diff, x%dqdt(4:6, :)) + + ! Update the translational and rotational acceleration for GA2 algorithm + OtherState%acc(1:3, 1) = matmul(u%RootMotion%TranslationAcc(:, 1), GlbRot_new) + OtherState%acc(4:6, 1) = matmul(u%RootMotion%RotationAcc(:, 1), GlbRot_new) + OtherState%acc(1:3, 2:) = matmul(GlbRot_diff, OtherState%acc(1:3, 2:)) + OtherState%acc(4:6, 2:) = matmul(GlbRot_diff, OtherState%acc(4:6, 2:)) + + ! Update the translational and rotational algorithm acceleration for GA2 algorithm + OtherState%xcc(1:3, :) = matmul(GlbRot_diff, OtherState%xcc(1:3, :)) + OtherState%xcc(4:6, :) = matmul(GlbRot_diff, OtherState%xcc(4:6, :)) + + ! Root node is always aligned with root motion mesh + x%q(:, 1) = 0.0_R8Ki + x%dqdt(1:3, 1) = matmul(u%RootMotion%TranslationVel(:, 1), GlbRot_new) + x%dqdt(4:6, 1) = matmul(u%RootMotion%RotationVel(:, 1), GlbRot_new) + +end subroutine + + + + + + !----------------------------------------------------------------------------------------------------------------------------------- END MODULE BeamDyn diff --git a/modules/beamdyn/src/BeamDyn_BldNdOuts_IO.f90 b/modules/beamdyn/src/BeamDyn_BldNdOuts_IO.f90 index 1c420d1fc..d976d8377 100644 --- a/modules/beamdyn/src/BeamDyn_BldNdOuts_IO.f90 +++ b/modules/beamdyn/src/BeamDyn_BldNdOuts_IO.f90 @@ -275,8 +275,9 @@ END SUBROUTINE BldNdOuts_InitOut !---------------------------------------------------------------------------------------------------------------------------------- !> This subroutine populates the headers with the blade node outputs. The iteration cycle is blade:node:channel (channel iterated !! fastest). If this iteration order is changed, it should be changed in the Calc_WriteBldNdOutput routine as well. -SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) +SUBROUTINE Calc_WriteBldNdOutput( p, OtherState, m, y, ErrStat, ErrMsg ) TYPE(BD_ParameterType), INTENT(IN ) :: p ! The module parameters + TYPE(BD_OtherStateType), INTENT(IN ) :: OtherState ! Other states at time t TYPE(BD_MiscVarType), INTENT(INOUT) :: m ! misc variables TYPE(BD_OutputType), INTENT(INOUT) :: y ! outputs INTEGER(IntKi), INTENT( OUT) :: ErrStat ! The error status code @@ -858,7 +859,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(p%GlbRot,m%qp%Fb(1:3,idx_node_in_elem,nelem))) + temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(OtherState%GlbRot,m%qp%Fb(1:3,idx_node_in_elem,nelem))) y%WriteOutput( IdxOutList ) = temp_vec(compIndx) ENDDO CASE (BldNd_MFbxl,BldNd_MFbyl,BldNd_MFbzl) @@ -866,7 +867,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(p%GlbRot,m%qp%Fb(4:6,idx_node_in_elem,nelem))) + temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(OtherState%GlbRot,m%qp%Fb(4:6,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_MFbxl) ! Gyroscopic moment Fc about x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -882,7 +883,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(p%GlbRot,m%qp%Fc(1:3,idx_node_in_elem,nelem))) + temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(OtherState%GlbRot,m%qp%Fc(1:3,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_FFcxl) ! Gyroscopic force Fc x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -897,7 +898,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(p%GlbRot,m%qp%Fc(4:6,idx_node_in_elem,nelem))) + temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(OtherState%GlbRot,m%qp%Fc(4:6,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_MFcxl) ! Gyroscopic moment Fc about x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -913,7 +914,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(p%GlbRot,m%qp%Fd(1:3,idx_node_in_elem,nelem))) + temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(OtherState%GlbRot,m%qp%Fd(1:3,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_FFdxl) ! Gyroscopic force Fc x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -928,7 +929,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(p%GlbRot,m%qp%Fd(4:6,idx_node_in_elem,nelem))) + temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(OtherState%GlbRot,m%qp%Fd(4:6,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_MFdxl) ! Gyroscopic moment Fc about x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -944,7 +945,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(p%GlbRot,m%qp%Fg(1:3,idx_node_in_elem,nelem))) + temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(OtherState%GlbRot,m%qp%Fg(1:3,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_FFgxl) ! Gyroscopic force Fc x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -959,7 +960,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(p%GlbRot,m%qp%Fg(4:6,idx_node_in_elem,nelem))) + temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(OtherState%GlbRot,m%qp%Fg(4:6,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_MFgxl) ! Gyroscopic moment Fc about x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -979,7 +980,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(p%GlbRot,m%qp%Fb(1:3,idx_node_in_elem,nelem))) + temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(OtherState%GlbRot,m%qp%Fb(1:3,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_FFbxr) ! Gyroscopic force Fc x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -994,7 +995,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(p%GlbRot,m%qp%Fb(4:6,idx_node_in_elem,nelem))) + temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(OtherState%GlbRot,m%qp%Fb(4:6,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_MFbxr) ! Gyroscopic moment Fc about x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -1010,7 +1011,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(p%GlbRot,m%qp%Fc(1:3,idx_node_in_elem,nelem))) + temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(OtherState%GlbRot,m%qp%Fc(1:3,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_FFcxr) ! Gyroscopic force Fc x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -1025,7 +1026,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(p%GlbRot,m%qp%Fc(4:6,idx_node_in_elem,nelem))) + temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(OtherState%GlbRot,m%qp%Fc(4:6,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_MFcxr) ! Gyroscopic moment Fc about x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -1041,7 +1042,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(p%GlbRot,m%qp%Fd(1:3,idx_node_in_elem,nelem))) + temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(OtherState%GlbRot,m%qp%Fd(1:3,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_FFdxr) ! Gyroscopic force Fc x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -1056,7 +1057,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(p%GlbRot,m%qp%Fd(4:6,idx_node_in_elem,nelem))) + temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(OtherState%GlbRot,m%qp%Fd(4:6,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_MFdxr) ! Gyroscopic moment Fc about x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -1072,7 +1073,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(p%GlbRot,m%qp%Fg(1:3,idx_node_in_elem,nelem))) + temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(OtherState%GlbRot,m%qp%Fg(1:3,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_FFgxr) ! Gyroscopic force Fc x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -1106,7 +1107,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(p%GlbRot,m%qp%Fi(1:3,idx_node_in_elem,nelem))) + temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(OtherState%GlbRot,m%qp%Fi(1:3,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_FFixl) ! Gyroscopic force Fc x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -1121,7 +1122,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(p%GlbRot,m%qp%Fi(4:6,idx_node_in_elem,nelem))) + temp_vec = MATMUL(y%BldMotion%Orientation(:,:,idx_node), MATMUL(OtherState%GlbRot,m%qp%Fi(4:6,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_MFixl) ! Gyroscopic moment Fc about x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -1139,7 +1140,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(p%GlbRot,m%qp%Fi(1:3,idx_node_in_elem,nelem))) + temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(OtherState%GlbRot,m%qp%Fi(1:3,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_FFixr) ! Gyroscopic force Fc x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) @@ -1154,7 +1155,7 @@ SUBROUTINE Calc_WriteBldNdOutput( p, m, y, ErrStat, ErrMsg ) IdxOutList = p%NumOuts + idx_node + (IdxChan-1)*y%BldMotion%NNodes ! Index to current output nelem = p%OutNd2NdElem(2,idx_node) idx_node_in_elem = p%OutNd2NdElem(1,idx_node) - temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(p%GlbRot,m%qp%Fi(4:6,idx_node_in_elem,nelem))) + temp_vec = MATMUL(m%u2%RootMotion%Orientation(:,:,1), MATMUL(OtherState%GlbRot,m%qp%Fi(4:6,idx_node_in_elem,nelem))) SELECT CASE( p%BldNd_OutParam(IdxChan)%Indx ) ! Indx contains the information on what channel should be output CASE (BldNd_MFixr) ! Gyroscopic moment Fc about x, root frame y%WriteOutput( IdxOutList ) = temp_vec(1) diff --git a/modules/beamdyn/src/BeamDyn_IO.f90 b/modules/beamdyn/src/BeamDyn_IO.f90 index 43c284d8f..2a5ecea0d 100644 --- a/modules/beamdyn/src/BeamDyn_IO.f90 +++ b/modules/beamdyn/src/BeamDyn_IO.f90 @@ -1917,11 +1917,12 @@ SUBROUTINE Calc_WriteOutput( p, AllOuts, y, m, ErrStat, ErrMsg, CalcWriteOutput END SUBROUTINE Calc_WriteOutput !---------------------------------------------------------------------------------------------------------------------------------- !> This routine generates the summary file, which contains a regurgitation of the input data and interpolated flexible body data. -SUBROUTINE BD_PrintSum( p, x, m, InitInp, ErrStat, ErrMsg ) +SUBROUTINE BD_PrintSum( p, x, OtherState, m, InitInp, ErrStat, ErrMsg ) use YAML, only: yaml_write_var, yaml_write_array, yaml_write_list ! passed variables TYPE(BD_ParameterType), INTENT(IN) :: p !< Parameters of the structural dynamics module type(BD_ContinuousStateType), intent(in) :: x !< Continuous states + TYPE(BD_OtherStateType), intent(in ) :: OtherState !< Other states at t TYPE(BD_MiscVarType), INTENT(INout) :: m !< misc/optimization variables TYPE(BD_InitInputType), INTENT(IN ) :: InitInp !< Input data for initialization routine INTEGER(IntKi), INTENT(OUT) :: ErrStat !< error status @@ -1949,15 +1950,15 @@ SUBROUTINE BD_PrintSum( p, x, m, InitInp, ErrStat, ErrMsg ) WRITE (UnSu,'(A)') '#This summary information was generated by '//TRIM( GetNVD(BeamDyn_Ver) ) WRITE (UnSu,'(/,A)') '# --- Main parameters' - call yaml_write_var (UnSu, 'Mass' , p%blade_mass , 'F13.3', ErrStat, ErrMsg, comment='(kg)') - call yaml_write_var (UnSu, 'Length' , p%blade_length , 'F13.3', ErrStat, ErrMsg, comment='(m)') - call yaml_write_list (UnSu, 'CG' , p%blade_CG , 'ES18.5', ErrStat, ErrMsg, comment='Blade center of mass (IEC coords) (m) from blade root') - call yaml_write_array(UnSu, 'JRoot' , p%blade_IN , 'ES18.5', ErrStat, ErrMsg, comment='Blade mass moment of inertia at blade root. NOTE: from mass distribution only, missing some important inertial contributions (see PR#1337)') - call yaml_write_list (UnSu, 'GlbPos' , p%GlbPos , 'ES18.5', ErrStat, ErrMsg, comment='Global position vector (IEC coords) of blade root') - call yaml_write_array(UnSu, 'GlbRot' , p%GlbRot , 'ES18.5', ErrStat, ErrMsg, comment='Global rotation tensor (IEC coords)') - call yaml_write_array(UnSu, 'RootOri' , InitInp%RootOri , 'ES18.5', ErrStat, ErrMsg, comment='Initial blade orientation tensor (relative to global rotation tensor)') - call yaml_write_list (UnSu, 'GlbCrv' , p%Glb_crv , 'ES18.5', ErrStat, ErrMsg, comment='Global rotation WM parameters (IEC coords)') - call yaml_write_list (UnSu, 'Gravity' , p%gravity , 'ES18.5', ErrStat, ErrMsg, comment='Gravity vector (m/s^2) (IEC coords)') + call yaml_write_var (UnSu, 'Mass' , p%blade_mass , 'F13.3', ErrStat, ErrMsg, comment='(kg)') + call yaml_write_var (UnSu, 'Length' , p%blade_length , 'F13.3', ErrStat, ErrMsg, comment='(m)') + call yaml_write_list (UnSu, 'CG' , p%blade_CG , 'ES18.5', ErrStat, ErrMsg, comment='Blade center of mass (IEC coords) (m) from blade root') + call yaml_write_array(UnSu, 'JRoot' , p%blade_IN , 'ES18.5', ErrStat, ErrMsg, comment='Blade mass moment of inertia at blade root. NOTE: from mass distribution only, missing some important inertial contributions (see PR#1337)') + call yaml_write_list (UnSu, 'GlbPos' , OtherState%GlbPos , 'ES18.5', ErrStat, ErrMsg, comment='Global position vector (IEC coords) of blade root at Initialization') + call yaml_write_array(UnSu, 'GlbRot' , OtherState%GlbRot , 'ES18.5', ErrStat, ErrMsg, comment='Global rotation tensor (IEC coords) at Initialization') + call yaml_write_array(UnSu, 'RootOri' , InitInp%RootOri , 'ES18.5', ErrStat, ErrMsg, comment='Initial blade orientation tensor (relative to global rotation tensor)') + call yaml_write_list (UnSu, 'GlbCrv' , OtherState%Glb_crv, 'ES18.5', ErrStat, ErrMsg, comment='Global rotation WM parameters (IEC coords) at Initialization') + call yaml_write_list (UnSu, 'Gravity' , p%gravity , 'ES18.5', ErrStat, ErrMsg, comment='Gravity vector (m/s^2) (IEC coords)') !FIXME:analysis_type IF(p%analysis_type .EQ. BD_STATIC_ANALYSIS) THEN @@ -2559,11 +2560,12 @@ END SUBROUTINE Compute_dX !---------------------------------------------------------------------------------------------------------------------------------- !> This routine uses values of two output types to compute an array of differences. !! Do not change this packing without making sure subroutine beamdyn::init_jacobian is consistant with this routine! -SUBROUTINE Compute_RelState_Matrix(p, u, x, RelState_x, RelState_xdot) +SUBROUTINE Compute_RelState_Matrix(p, u, x, OtherState, RelState_x, RelState_xdot) TYPE(BD_ParameterType) , INTENT(IN ) :: p !< parameters TYPE(BD_InputType) , INTENT(IN ) :: u !< BD inputs TYPE(BD_ContinuousStateType) , INTENT(IN ) :: x !< BD continuous states + TYPE(BD_OtherStateType) , INTENT(IN ) :: OtherState !< Other states at t REAL(R8Ki) , INTENT(INOUT) :: RelState_x(:,:) !< REAL(R8Ki) , INTENT(INOUT) :: RelState_xdot(:,:) !< @@ -2594,7 +2596,7 @@ SUBROUTINE Compute_RelState_Matrix(p, u, x, RelState_x, RelState_xdot) dqdt_index = p%Jac_nx + q_index DisplacedPosition = u%RootMotion%Position(:,1) + u%RootMotion%TranslationDisp(:,1) & - - p%GlbPos - MATMUL(p%GlbRot, p%uuN0(1:3,j,i) + x%q(1:3,node) ) + - OtherState%GlbPos - MATMUL(OtherState%GlbRot, p%uuN0(1:3,j,i) + x%q(1:3,node) ) RotVel = real(u%RootMotion%RotationVel(:,1),R8Ki) RotAcc = real(u%RootMotion%RotationAcc(:,1),R8Ki) diff --git a/modules/beamdyn/src/BeamDyn_Subs.f90 b/modules/beamdyn/src/BeamDyn_Subs.f90 index b0006dafd..519a40e58 100644 --- a/modules/beamdyn/src/BeamDyn_Subs.f90 +++ b/modules/beamdyn/src/BeamDyn_Subs.f90 @@ -623,10 +623,11 @@ END SUBROUTINE BD_TrapezoidalPointWeight !----------------------------------------------------------------------------------------------------------------------------------- !> This routine calculates y%BldMotion%TranslationDisp, y%BldMotion%Orientation, y%BldMotion%TranslationVel, and !! y%BldMotion%RotationVel, which depend only on states (and indirectly, u%RootMotion), and parameters. -SUBROUTINE Set_BldMotion_NoAcc(p, x, m, y) +SUBROUTINE Set_BldMotion_NoAcc(p, x, OtherState, m, y) TYPE(BD_ParameterType), INTENT(IN ) :: p !< Parameters TYPE(BD_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at t + TYPE(BD_OtherStateType), INTENT(IN ) :: OtherState !< Other states at t TYPE(BD_MiscVarType), INTENT(IN ) :: m !< misc/optimization variables TYPE(BD_OutputType), INTENT(INOUT) :: y !< Outputs computed at t (Input only so that mesh con- !! nectivity information does not have to be recalculated) @@ -655,14 +656,15 @@ SUBROUTINE Set_BldMotion_NoAcc(p, x, m, y) ! Calculate the translational displacement of each GLL node in the FAST coordinate system, ! referenced against the DCM of the blade root at T=0. - y%BldMotion%TranslationDisp(1:3,temp_id2) = MATMUL(p%GlbRot,x%q(1:3,temp_id)) + y%BldMotion%TranslationDisp(1:3,temp_id2) = OtherState%GlbPos + matmul(OtherState%GlbRot, p%uuN0(1:3, j, i) + x%q(1:3, temp_id)) - & + y%BldMotion%Position(1:3,temp_id2) !bjj: note differences here compared to BDrot_to_FASTdcm !adp: in BDrot_to_FASTdcm we are assuming that x%q(4:6,:) is zero because there is no rotatinoal displacement yet ! Find the rotation parameter in global coordinates (initial orientation + rotation parameters) ! referenced against the DCM of the blade root at T=0. CALL BD_CrvCompose( cc, x%q(4:6,temp_id), p%uuN0(4:6,j,i), FLAG_R1R2 ) - CALL BD_CrvCompose( cc0, p%Glb_crv, cc, FLAG_R1R2 ) + CALL BD_CrvCompose( cc0, OtherState%Glb_crv, cc, FLAG_R1R2 ) ! Create the DCM from the rotation parameters CALL BD_CrvMatrixR(cc0,temp_R) ! returns temp_R (the transpose of the DCM orientation matrix) @@ -672,11 +674,11 @@ SUBROUTINE Set_BldMotion_NoAcc(p, x, m, y) ! Calculate the translation velocity and store in FAST coordinate system ! referenced against the DCM of the blade root at T=0. - y%BldMotion%TranslationVel(1:3,temp_id2) = MATMUL(p%GlbRot,x%dqdt(1:3,temp_id)) + y%BldMotion%TranslationVel(1:3,temp_id2) = MATMUL(OtherState%GlbRot,x%dqdt(1:3,temp_id)) ! Calculate the rotational velocity and store in FAST coordinate system ! referenced against the DCM of the blade root at T=0. - y%BldMotion%RotationVel(1:3,temp_id2) = MATMUL(p%GlbRot,x%dqdt(4:6,temp_id)) + y%BldMotion%RotationVel(1:3,temp_id2) = MATMUL(OtherState%GlbRot,x%dqdt(4:6,temp_id)) ENDDO ENDDO @@ -689,7 +691,8 @@ SUBROUTINE Set_BldMotion_NoAcc(p, x, m, y) ! Calculate the translational displacement of each quadrature node in the FAST coordinate system, ! referenced against the DCM of the blade root at T=0. - y%BldMotion%TranslationDisp(1:3,temp_id2) = MATMUL(p%GlbRot,m%qp%uuu(1:3,j,i) ) + y%BldMotion%TranslationDisp(1:3,temp_id2) = OtherState%GlbPos + matmul(OtherState%GlbRot, p%uu0(1:3, j, i) + m%qp%uuu(1:3,j,i)) - & + y%BldMotion%Position(1:3,temp_id2) !bjj: note differences here compared to BDrot_to_FASTdcm @@ -697,7 +700,7 @@ SUBROUTINE Set_BldMotion_NoAcc(p, x, m, y) ! Find the rotation parameter in global coordinates (initial orientation + rotation parameters) ! referenced against the DCM of the blade root at T=0. CALL BD_CrvCompose( cc, m%qp%uuu(4:6,j,i), p%uu0(4:6,j,i), FLAG_R1R2 ) - CALL BD_CrvCompose( cc0, p%Glb_crv, cc, FLAG_R1R2 ) + CALL BD_CrvCompose( cc0, OtherState%Glb_crv, cc, FLAG_R1R2 ) CALL BD_CrvMatrixR(cc0,temp_R) ! returns temp_R (the transpose of the DCM orientation matrix) ! Store the DCM for the j'th node of the i'th element (in FAST coordinate system) @@ -705,11 +708,11 @@ SUBROUTINE Set_BldMotion_NoAcc(p, x, m, y) ! Calculate the translation velocity and store in FAST coordinate system ! referenced against the DCM of the blade root at T=0. - y%BldMotion%TranslationVel(1:3,temp_id2) = MATMUL(p%GlbRot,m%qp%vvv(1:3,j,i)) + y%BldMotion%TranslationVel(1:3,temp_id2) = MATMUL(OtherState%GlbRot,m%qp%vvv(1:3,j,i)) ! Calculate the rotational velocity and store in FAST coordinate system ! referenced against the DCM of the blade root at T=0. - y%BldMotion%RotationVel(1:3,temp_id2) = MATMUL(p%GlbRot,m%qp%vvv(4:6,j,i)) + y%BldMotion%RotationVel(1:3,temp_id2) = MATMUL(OtherState%GlbRot,m%qp%vvv(4:6,j,i)) ENDDO ENDDO @@ -723,11 +726,12 @@ SUBROUTINE Set_BldMotion_NoAcc(p, x, m, y) END SUBROUTINE Set_BldMotion_NoAcc !----------------------------------------------------------------------------------------------------------------------------------- !> This routine calculates values for the y%BldMotion mesh. -SUBROUTINE Set_BldMotion_Mesh(p, u, x, m, y) +SUBROUTINE Set_BldMotion_Mesh(p, u, x, OtherState, m, y) TYPE(BD_ParameterType), INTENT(IN ) :: p !< Parameters TYPE(BD_InputType), INTENT(IN ) :: u !< Inputs at t - in the FAST coordinate system (NOT BD) TYPE(BD_ContinuousStateType), INTENT(IN ) :: x !< Continuous states at t + TYPE(BD_OtherStateType), INTENT(IN ) :: OtherState !< Other states at t TYPE(BD_MiscVarType), INTENT(INOUT) :: m !< misc/optimization variables ! intent(out) so that we can update the accelerations here... TYPE(BD_OutputType), INTENT(INOUT) :: y !< Outputs computed at t (Input only so that mesh con- !! nectivity information does not have to be recalculated) @@ -741,7 +745,7 @@ SUBROUTINE Set_BldMotion_Mesh(p, u, x, m, y) ! set positions and velocities (not accelerations) - call Set_BldMotion_NoAcc(p, x, m, y) + call Set_BldMotion_NoAcc(p, x, OtherState, m, y) ! Only need this bit for dynamic cases IF ( p%analysis_type /= BD_STATIC_ANALYSIS ) THEN @@ -762,9 +766,9 @@ SUBROUTINE Set_BldMotion_Mesh(p, u, x, m, y) temp_id = (i-1)*(p%nodes_per_elem-1)+j temp_id2= (i-1)*p%nodes_per_elem+j - y%BldMotion%TranslationAcc(1:3,temp_id2) = MATMUL(p%GlbRot, m%RHS(1:3,temp_id) ) + y%BldMotion%TranslationAcc(1:3,temp_id2) = MATMUL(OtherState%GlbRot, m%RHS(1:3,temp_id) ) - y%BldMotion%RotationAcc(1:3,temp_id2) = MATMUL(p%GlbRot, m%RHS(4:6,temp_id) ) + y%BldMotion%RotationAcc(1:3,temp_id2) = MATMUL(OtherState%GlbRot, m%RHS(4:6,temp_id) ) ENDDO j_start = 1 ENDDO @@ -790,9 +794,9 @@ SUBROUTINE Set_BldMotion_Mesh(p, u, x, m, y) ! Calculate the translational acceleration of each quadrature node in the FAST coordinate system, ! referenced against the DCM of the blade root at T=0. - y%BldMotion%TranslationAcc(1:3,temp_id2) = MATMUL(p%GlbRot,m%qp%aaa(1:3,j,i) ) + y%BldMotion%TranslationAcc(1:3,temp_id2) = MATMUL(OtherState%GlbRot,m%qp%aaa(1:3,j,i) ) - y%BldMotion%RotationAcc(1:3,temp_id2) = MATMUL(p%GlbRot, m%qp%aaa(4:6,j,i) ) + y%BldMotion%RotationAcc(1:3,temp_id2) = MATMUL(OtherState%GlbRot, m%qp%aaa(4:6,j,i) ) ENDDO j_start = 1 ENDDO @@ -835,9 +839,9 @@ SUBROUTINE Set_BldMotion_InitAcc(p, u, OtherState, m, y) temp_id = (i-1)*(p%nodes_per_elem-1)+j temp_id2= (i-1)*p%nodes_per_elem+j - y%BldMotion%TranslationAcc(1:3,temp_id2) = MATMUL(p%GlbRot, OtherState%Acc(1:3,temp_id) ) + y%BldMotion%TranslationAcc(1:3,temp_id2) = MATMUL(OtherState%GlbRot, OtherState%Acc(1:3,temp_id) ) - y%BldMotion%RotationAcc(1:3,temp_id2) = MATMUL(p%GlbRot, OtherState%Acc(4:6,temp_id) ) + y%BldMotion%RotationAcc(1:3,temp_id2) = MATMUL(OtherState%GlbRot, OtherState%Acc(4:6,temp_id) ) ENDDO j_start = 1 ENDDO @@ -853,9 +857,9 @@ SUBROUTINE Set_BldMotion_InitAcc(p, u, OtherState, m, y) ! Calculate the translational acceleration of each quadrature node in the FAST coordinate system, ! referenced against the DCM of the blade root at T=0. - y%BldMotion%TranslationAcc(1:3,temp_id2) = MATMUL(p%GlbRot,m%qp%aaa(1:3,j,i) ) + y%BldMotion%TranslationAcc(1:3,temp_id2) = MATMUL(OtherState%GlbRot,m%qp%aaa(1:3,j,i) ) - y%BldMotion%RotationAcc(1:3,temp_id2) = MATMUL(p%GlbRot, m%qp%aaa(4:6,j,i) ) + y%BldMotion%RotationAcc(1:3,temp_id2) = MATMUL(OtherState%GlbRot, m%qp%aaa(4:6,j,i) ) ENDDO j_start = 1 ENDDO @@ -1096,9 +1100,10 @@ SUBROUTINE BD_ComputeIniNodalCrv(e3, phi, cc, ErrStat, ErrMsg) END SUBROUTINE BD_ComputeIniNodalCrv !----------------------------------------------------------------------------------------------------------------------------------- -SUBROUTINE ExtractRelativeRotation(R, p, rr, ErrStat, ErrMsg) +SUBROUTINE ExtractRelativeRotation(R, p, OtherState, rr, ErrStat, ErrMsg) real(R8Ki), INTENT(in ) :: R(3,3) !< input rotation matrix (transpose of DCM; in BD coords) type(BD_ParameterType), INTENT(in ) :: p !< Parameters + TYPE(BD_OtherStateType),INTENT(IN ) :: OtherState !< Other states at t real(BDKi), INTENT( OUT) :: rr(3) !< W-M parameters of relative rotation INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status of the operation CHARACTER(*), INTENT( OUT) :: ErrMsg !< Error message if ErrStat /= ErrID_None @@ -1118,7 +1123,7 @@ SUBROUTINE ExtractRelativeRotation(R, p, rr, ErrStat, ErrMsg) ! which is the same as operation as ! R(rr) = R(Glb_crv)^T R - ! note that the u%RootMotion mesh does not contain the initial twist, but p%Glb_crv does not have this twist, either. + ! note that the u%RootMotion mesh does not contain the initial twist, but OtherState%Glb_crv does not have this twist, either. ! The relative rotation will be the same in this case. R_BD = R ! possible type conversion (only if BDKi /= R8Ki) @@ -1126,7 +1131,7 @@ SUBROUTINE ExtractRelativeRotation(R, p, rr, ErrStat, ErrMsg) CALL BD_CrvExtractCrv(R_BD,R_WM, ErrStat2, ErrMsg2) CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) if (ErrStat >= AbortErrLev) return - CALL BD_CrvCompose(rr,p%Glb_crv,R_WM,FLAG_R1TR2) ! rr = p%Glb_crv^- composed with R_WM + CALL BD_CrvCompose(rr,OtherState%Glb_crv,R_WM,FLAG_R1TR2) ! rr = OtherState%Glb_crv^- composed with R_WM ! NOTE: the above calculation is not the inverse of what is in Set_BldMotion_NoAcc. The reason is that this ! routine is only looking at RootMotion. The Set_BldMotion_NoAcc routine is looking at the blade motion @@ -1134,9 +1139,10 @@ SUBROUTINE ExtractRelativeRotation(R, p, rr, ErrStat, ErrMsg) END SUBROUTINE ExtractRelativeRotation !----------------------------------------------------------------------------------------------------------------------------------- -FUNCTION BDrot_to_FASTdcm(rr,p) RESULT(dcm) +FUNCTION BDrot_to_FASTdcm(rr,p,OtherState) RESULT(dcm) real(BDKi), intent(in) :: rr(3) !< W-M parameters of relative rotation type(BD_ParameterType), intent(in) :: p !< Parameters + type(BD_OtherStateType),intent(in) :: OtherState !< Other states at t real(BDKi) :: dcm(3,3) !< input rotation matrix (transpose of DCM; in BD coords) @@ -1148,7 +1154,7 @@ FUNCTION BDrot_to_FASTdcm(rr,p) RESULT(dcm) ! are zero, and the expression in Set_BldMotion_NoAcc simplifies to this expression. ! rotate relative W-M rotations to global system? - CALL BD_CrvCompose(temp_CRV2,p%Glb_crv,rr,FLAG_R1R2) !temp_CRV2 = p%Glb_crv composed with rr + CALL BD_CrvCompose(temp_CRV2,OtherState%Glb_crv,rr,FLAG_R1R2) !temp_CRV2 = OtherState%Glb_crv composed with rr ! create rotation matrix from W-M parameters: CALL BD_CrvMatrixR(temp_CRV2,R) ! returns R (rotation matrix, the transpose of the DCM orientation matrix) diff --git a/modules/beamdyn/src/BeamDyn_Types.f90 b/modules/beamdyn/src/BeamDyn_Types.f90 index bb70c195e..c4fcd0772 100644 --- a/modules/beamdyn/src/BeamDyn_Types.f90 +++ b/modules/beamdyn/src/BeamDyn_Types.f90 @@ -148,6 +148,9 @@ MODULE BeamDyn_Types REAL(R8Ki) , DIMENSION(:,:), ALLOCATABLE :: xcc !< Algorithm acceleration in GA2: (1-alpha_m)*xcc_(n+1) = (1-alpha_f)*Acc_(n+1) + alpha_f*Acc_n - alpha_m*xcc_n [-] LOGICAL :: InitAcc = .false. !< flag to determine if accerlerations have been initialized in updateStates [-] LOGICAL :: RunQuasiStaticInit = .false. !< flag to determine if quasi-static solution initialization should be run again (with load inputs) [-] + REAL(R8Ki) , DIMENSION(1:3) :: GlbPos = 0.0_R8Ki !< Position Vector between origins of Global (moving frame) and blade frames (BD coordinates) Follows the RootMotion mesh [-] + REAL(R8Ki) , DIMENSION(1:3,1:3) :: GlbRot = 0.0_R8Ki !< Rotation Tensor between Global (moving frame) and Blade frames (BD coordinates; transfers local to global). Follows the RootMotion mesh [-] + REAL(R8Ki) , DIMENSION(1:3) :: Glb_crv = 0.0_R8Ki !< CRV parameters of GlbRot. Follows the RootMotion mesh [-] END TYPE BD_OtherStateType ! ======================= ! ========= qpParam ======= @@ -165,7 +168,7 @@ MODULE BeamDyn_Types REAL(R8Ki) , DIMENSION(:,:), ALLOCATABLE :: twN0 !< Initial Twist of GLL (FE) nodes (index 1=DOF; index 2=FE nodes; index 3=element) [-] REAL(R8Ki) , DIMENSION(:,:,:), ALLOCATABLE :: Stif0_QP !< Sectional Stiffness Properties at quadrature points (6x6xqp) [-] REAL(R8Ki) , DIMENSION(:,:,:), ALLOCATABLE :: Mass0_QP !< Sectional Mass Properties at quadrature points (6x6xqp) [-] - REAL(R8Ki) , DIMENSION(1:3) :: gravity = 0.0_R8Ki !< Gravitational acceleration [m/s^2] + REAL(R8Ki) , DIMENSION(1:3) :: gravity = 0.0_R8Ki !< Gravitational acceleration -- intertial frame!!! [m/s^2] REAL(R8Ki) , DIMENSION(:), ALLOCATABLE :: segment_eta !< Array stored length ratio of each segment w.r.t. member it lies in [-] REAL(R8Ki) , DIMENSION(:), ALLOCATABLE :: member_eta !< Array stored length ratio of each member w.r.t. entire blade [-] REAL(R8Ki) :: blade_length = 0.0_R8Ki !< Blade Length [-] @@ -174,9 +177,6 @@ MODULE BeamDyn_Types REAL(R8Ki) , DIMENSION(1:3,1:3) :: blade_IN = 0.0_R8Ki !< Blade Length [-] REAL(R8Ki) , DIMENSION(1:6) :: beta = 0.0_R8Ki !< Damping Coefficient [-] REAL(R8Ki) :: tol = 0.0_R8Ki !< Tolerance used in stopping criterion [-] - REAL(R8Ki) , DIMENSION(1:3) :: GlbPos = 0.0_R8Ki !< Initial Position Vector between origins of Global and blade frames (BD coordinates) [-] - REAL(R8Ki) , DIMENSION(1:3,1:3) :: GlbRot = 0.0_R8Ki !< Initial Rotation Tensor between Global and Blade frames (BD coordinates; transfers local to global) [-] - REAL(R8Ki) , DIMENSION(1:3) :: Glb_crv = 0.0_R8Ki !< CRV parameters of GlbRot [-] REAL(R8Ki) , DIMENSION(:), ALLOCATABLE :: QPtN !< Quadrature (QuadPt) point locations in natural frame [-1, 1] [-] REAL(R8Ki) , DIMENSION(:), ALLOCATABLE :: QPtWeight !< Weights at each quadrature point (QuadPt) [-] REAL(R8Ki) , DIMENSION(:,:), ALLOCATABLE :: Shp !< Shape function matrix (index 1 = FE nodes; index 2=quadrature points) [-] @@ -1581,6 +1581,9 @@ subroutine BD_CopyOtherState(SrcOtherStateData, DstOtherStateData, CtrlCode, Err end if DstOtherStateData%InitAcc = SrcOtherStateData%InitAcc DstOtherStateData%RunQuasiStaticInit = SrcOtherStateData%RunQuasiStaticInit + DstOtherStateData%GlbPos = SrcOtherStateData%GlbPos + DstOtherStateData%GlbRot = SrcOtherStateData%GlbRot + DstOtherStateData%Glb_crv = SrcOtherStateData%Glb_crv end subroutine subroutine BD_DestroyOtherState(OtherStateData, ErrStat, ErrMsg) @@ -1615,6 +1618,9 @@ subroutine BD_PackOtherState(Buf, Indata) end if call RegPack(Buf, InData%InitAcc) call RegPack(Buf, InData%RunQuasiStaticInit) + call RegPack(Buf, InData%GlbPos) + call RegPack(Buf, InData%GlbRot) + call RegPack(Buf, InData%Glb_crv) if (RegCheckErr(Buf, RoutineName)) return end subroutine @@ -1658,6 +1664,12 @@ subroutine BD_UnPackOtherState(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%RunQuasiStaticInit) if (RegCheckErr(Buf, RoutineName)) return + call RegUnpack(Buf, OutData%GlbPos) + if (RegCheckErr(Buf, RoutineName)) return + call RegUnpack(Buf, OutData%GlbRot) + if (RegCheckErr(Buf, RoutineName)) return + call RegUnpack(Buf, OutData%Glb_crv) + if (RegCheckErr(Buf, RoutineName)) return end subroutine subroutine BD_CopyqpParam(SrcqpParamData, DstqpParamData, CtrlCode, ErrStat, ErrMsg) @@ -1863,9 +1875,6 @@ subroutine BD_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg) DstParamData%blade_IN = SrcParamData%blade_IN DstParamData%beta = SrcParamData%beta DstParamData%tol = SrcParamData%tol - DstParamData%GlbPos = SrcParamData%GlbPos - DstParamData%GlbRot = SrcParamData%GlbRot - DstParamData%Glb_crv = SrcParamData%Glb_crv if (allocated(SrcParamData%QPtN)) then LB(1:1) = lbound(SrcParamData%QPtN) UB(1:1) = ubound(SrcParamData%QPtN) @@ -2340,9 +2349,6 @@ subroutine BD_PackParam(Buf, Indata) call RegPack(Buf, InData%blade_IN) call RegPack(Buf, InData%beta) call RegPack(Buf, InData%tol) - call RegPack(Buf, InData%GlbPos) - call RegPack(Buf, InData%GlbRot) - call RegPack(Buf, InData%Glb_crv) call RegPack(Buf, allocated(InData%QPtN)) if (allocated(InData%QPtN)) then call RegPackBounds(Buf, 1, lbound(InData%QPtN), ubound(InData%QPtN)) @@ -2617,12 +2623,6 @@ subroutine BD_UnPackParam(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%tol) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%GlbPos) - if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%GlbRot) - if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%Glb_crv) - if (RegCheckErr(Buf, RoutineName)) return if (allocated(OutData%QPtN)) deallocate(OutData%QPtN) call RegUnpack(Buf, IsAllocAssoc) if (RegCheckErr(Buf, RoutineName)) return diff --git a/modules/beamdyn/src/Driver_Beam.f90 b/modules/beamdyn/src/Driver_Beam.f90 index d437714c9..8b1d51d19 100644 --- a/modules/beamdyn/src/Driver_Beam.f90 +++ b/modules/beamdyn/src/Driver_Beam.f90 @@ -137,7 +137,7 @@ PROGRAM BeamDyn_Driver_Program call Init_RotationCenterMesh(DvrData, BD_InitInput, BD_Input(1)%RootMotion, ErrStat, ErrMsg) CALL CheckError() - call CreateMultiPointMeshes(DvrData,BD_InitInput,BD_InitOutput,BD_Parameter, BD_Output, BD_Input(1), ErrStat, ErrMsg) + call CreateMultiPointMeshes(DvrData,BD_InitInput,BD_InitOutput,BD_Parameter,BD_OtherState, BD_Output, BD_Input(1), ErrStat, ErrMsg) call Transfer_MultipointLoads(DvrData, BD_Output, BD_Input(1), ErrStat, ErrMsg) CALL Dvr_InitializeOutputFile(DvrOut,BD_InitOutput,RootName,ErrStat,ErrMsg) diff --git a/modules/beamdyn/src/Driver_Beam_Subs.f90 b/modules/beamdyn/src/Driver_Beam_Subs.f90 index 7d8141b7c..27e535105 100644 --- a/modules/beamdyn/src/Driver_Beam_Subs.f90 +++ b/modules/beamdyn/src/Driver_Beam_Subs.f90 @@ -331,12 +331,13 @@ SUBROUTINE Dvr_WriteOutputLine(t,OutUnit, OutFmt, Output) end subroutine Dvr_WriteOutputLine !---------------------------------------------------------------------------------------------------------------------------------- -subroutine CreateMultiPointMeshes(DvrData,BD_InitInput,BD_InitOutput,BD_Parameter,y, u, ErrStat,ErrMsg) +subroutine CreateMultiPointMeshes(DvrData,BD_InitInput,BD_InitOutput,BD_Parameter,BD_OtherState,y, u, ErrStat,ErrMsg) TYPE(BD_DriverInternalType), INTENT(INOUT) :: DvrData TYPE(BD_InitInputType) , INTENT(IN ) :: BD_InitInput TYPE(BD_InitOutputType) , INTENT(IN ) :: BD_InitOutput TYPE(BD_ParameterType) , INTENT(IN ) :: BD_Parameter + TYPE(BD_OtherStateType) , INTENT(IN ) :: BD_OtherState TYPE(BD_OutputType), INTENT(IN ) :: y TYPE(BD_InputType), INTENT(INOUT) :: u ! sets pointLoad with values from BD driver input file INTEGER(IntKi), INTENT( OUT) :: ErrStat ! Error status of the operation @@ -387,10 +388,10 @@ subroutine CreateMultiPointMeshes(DvrData,BD_InitInput,BD_InitOutput,BD_Paramete CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) if (ErrStat >= AbortErrLev) return - Pos = BD_Parameter%GlbPos + MATMUL(BD_Parameter%GlbRot,temp_POS) + Pos = BD_OtherState%GlbPos + MATMUL(BD_OtherState%GlbRot,temp_POS) - temp_CRV2 = MATMUL(BD_Parameter%GlbRot,temp_CRV) - CALL BD_CrvCompose(temp_CRV,BD_Parameter%Glb_crv,temp_CRV2,FLAG_R1R2) !temp_CRV = p%Glb_crv composed with temp_CRV2 + temp_CRV2 = MATMUL(BD_OtherState%GlbRot,temp_CRV) + CALL BD_CrvCompose(temp_CRV,BD_OtherState%Glb_crv,temp_CRV2,FLAG_R1R2) !temp_CRV = m%Glb_crv composed with temp_CRV2 CALL BD_CrvMatrixR(temp_CRV,TmpDCM) ! returns TmpDCM (the transpose of the DCM orientation matrix) diff --git a/modules/beamdyn/src/Registry_BeamDyn.txt b/modules/beamdyn/src/Registry_BeamDyn.txt index 2c0ca19fd..cd91c26b3 100644 --- a/modules/beamdyn/src/Registry_BeamDyn.txt +++ b/modules/beamdyn/src/Registry_BeamDyn.txt @@ -146,6 +146,10 @@ typedef ^ OtherStateType ^ xcc {:}{:} - - "Algorithm acceler #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ typedef ^ OtherStateType Logical InitAcc - - - "flag to determine if accerlerations have been initialized in updateStates" typedef ^ OtherStateType Logical RunQuasiStaticInit - - - "flag to determine if quasi-static solution initialization should be run again (with load inputs)" - +# reference frame -- this follows the root motion mesh +typedef ^ OtherStateType R8Ki GlbPos {3} - - "Position Vector between origins of Global (moving frame) and blade frames (BD coordinates) Follows the RootMotion mesh" - +typedef ^ OtherStateType R8Ki GlbRot {3}{3} - - "Rotation Tensor between Global (moving frame) and Blade frames (BD coordinates; transfers local to global). Follows the RootMotion mesh" - +typedef ^ OtherStateType R8Ki Glb_crv {3} - - "CRV parameters of GlbRot. Follows the RootMotion mesh" - # Quadrature point info that does not change throughout the simulation @@ -172,7 +176,7 @@ typedef ^ ParameterType R8Ki uuN0 {:}{:}{:} - - typedef ^ ParameterType ^ twN0 {:}{:} - - "Initial Twist of GLL (FE) nodes (index 1=DOF; index 2=FE nodes; index 3=element)" - typedef ^ ParameterType ^ Stif0_QP {:}{:}{:} - - "Sectional Stiffness Properties at quadrature points (6x6xqp)" - typedef ^ ParameterType ^ Mass0_QP {:}{:}{:} - - "Sectional Mass Properties at quadrature points (6x6xqp)" - -typedef ^ ParameterType ^ gravity {3} - - "Gravitational acceleration" m/s^2 +typedef ^ ParameterType ^ gravity {3} - - "Gravitational acceleration -- intertial frame!!!" m/s^2 typedef ^ ParameterType ^ segment_eta {:} - - "Array stored length ratio of each segment w.r.t. member it lies in" - typedef ^ ParameterType ^ member_eta {:} - - "Array stored length ratio of each member w.r.t. entire blade" - typedef ^ ParameterType ^ blade_length - - - "Blade Length" - @@ -181,9 +185,6 @@ typedef ^ ParameterType ^ blade_CG {3} - - typedef ^ ParameterType ^ blade_IN {3}{3} - - "Blade Length" - typedef ^ ParameterType ^ beta {6} - - "Damping Coefficient" - typedef ^ ParameterType ^ tol - - - "Tolerance used in stopping criterion" - -typedef ^ ParameterType ^ GlbPos {3} - - "Initial Position Vector between origins of Global and blade frames (BD coordinates)" - -typedef ^ ParameterType ^ GlbRot {3}{3} - - "Initial Rotation Tensor between Global and Blade frames (BD coordinates; transfers local to global)" - -typedef ^ ParameterType ^ Glb_crv {3} - - "CRV parameters of GlbRot" - typedef ^ ParameterType ^ QPtN {:} - - "Quadrature (QuadPt) point locations in natural frame [-1, 1]" - typedef ^ ParameterType ^ QPtWeight {:} - - "Weights at each quadrature point (QuadPt)" - typedef ^ ParameterType ^ Shp {:}{:} - - "Shape function matrix (index 1 = FE nodes; index 2=quadrature points)" - diff --git a/modules/beamdyn/tests/test_BD_InputGlobalLocal.F90 b/modules/beamdyn/tests/test_BD_InputGlobalLocal.F90 index 255f75f8c..94e56e330 100644 --- a/modules/beamdyn/tests/test_BD_InputGlobalLocal.F90 +++ b/modules/beamdyn/tests/test_BD_InputGlobalLocal.F90 @@ -22,6 +22,7 @@ subroutine test_BD_InputGlobalLocal() integer :: i, totalnodes type(BD_ParameterType) :: parametertype + type(BD_OtherStateType) :: otherstate type(BD_InputType) :: inputtype real(BDKi), dimension(3) :: vectorInit, vectorAfterRotation, rotationaxis integer(IntKi) :: ErrStat @@ -44,7 +45,8 @@ subroutine test_BD_InputGlobalLocal() ! build the parameter type parametertype%node_total = totalnodes - parametertype%GlbRot = calcRotationMatrix(real(Pi, BDKi), rotationaxis) + otherstate=simpleOtherState() + otherstate%GlbRot = calcRotationMatrix(real(Pi, BDKi), rotationaxis) ! build the inputs call AllocAry(inputtype%RootMotion%TranslationDisp, 3, 1, 'TranslationDisp', ErrStat, ErrMsg) @@ -74,10 +76,10 @@ subroutine test_BD_InputGlobalLocal() end do call AllocAry(inputtype%RootMotion%Orientation, 3, 3, totalnodes, 'RootMotion%Orientation', ErrStat, ErrMsg) - inputtype%RootMotion%Orientation(:,:,1) = parametertype%GlbRot + inputtype%RootMotion%Orientation(:,:,1) = otherstate%GlbRot ! call the subroutine to test - call BD_InputGlobalLocal(parametertype, inputtype) + call BD_InputGlobalLocal(parametertype, otherstate, inputtype) ! test the values @assertEqual(vectorAfterRotation, real(inputtype%RootMotion%TranslationDisp(:,1), BDKi), tolerance, testname) @@ -97,6 +99,6 @@ subroutine test_BD_InputGlobalLocal() @assertEqual(vectorAfterRotation, real(inputtype%DistrLoad%Moment(1:3,i), BDKi), tolerance, testname) end do - @assertEqual(transpose(parametertype%GlbRot), inputtype%RootMotion%Orientation(:,:,1), tolerance, testname) + @assertEqual(transpose(otherstate%GlbRot), inputtype%RootMotion%Orientation(:,:,1), tolerance, testname) end subroutine diff --git a/modules/beamdyn/tests/test_ExtractRelativeRotation.F90 b/modules/beamdyn/tests/test_ExtractRelativeRotation.F90 index 25c1c01dc..669d132e5 100644 --- a/modules/beamdyn/tests/test_ExtractRelativeRotation.F90 +++ b/modules/beamdyn/tests/test_ExtractRelativeRotation.F90 @@ -16,6 +16,7 @@ subroutine test_ExtractRelativeRotation() character :: ErrMsg type(BD_ParameterType) :: parametertype + type(BD_OtherStateType) :: otherstate ! initialize NWTC_Num constants call SetConstants() @@ -26,9 +27,10 @@ subroutine test_ExtractRelativeRotation() ! -------------------------------------------------------------------------- testname = "static simple beam under gravity:" + otherstate = simpleOtherState() parametertype = simpleParameterType(1,16,16,0,0) - call ExtractRelativeRotation(identity(), parametertype, rr, ErrStat, ErrMsg) + call ExtractRelativeRotation(identity(), parametertype, otherstate, rr, ErrStat, ErrMsg) @assertEqual((/ 0.0, 0.0, 0.0 /), rr, tolerance, testname) end subroutine diff --git a/modules/beamdyn/tests/test_tools.F90 b/modules/beamdyn/tests/test_tools.F90 index 9224dfceb..b936d3bff 100644 --- a/modules/beamdyn/tests/test_tools.F90 +++ b/modules/beamdyn/tests/test_tools.F90 @@ -91,6 +91,11 @@ function getGravityInZ() getGravityInZ = (/ 0.0, 0.0, -9.806 /) end function + type(BD_OtherStateType) function simpleOtherState() result(otherstate) + ! fixed size arrays + otherstate%Glb_crv = (/ 0.0, 0.0, 0.0 /) + otherstate%GlbRot = identity() + end function type(BD_ParameterType) function simpleParameterType(elem_total, nodes_per_elem, nqp, qp_indx_offset, refine) RESULT(p) integer, intent(in ) :: elem_total @@ -111,10 +116,6 @@ type(BD_ParameterType) function simpleParameterType(elem_total, nodes_per_elem, p%dof_node = 6 - ! fixed size arrays - p%Glb_crv = (/ 0.0, 0.0, 0.0 /) - p%GlbRot = identity() - ! allocate arrays call AllocAry(p%qp%mmm, p%nqp, p%elem_total, 'qp_mmm', ErrStat, ErrMsg) call AllocAry(p%qp%mEta, 3, p%nqp, p%elem_total, 'qp_RR0mEta', ErrStat, ErrMsg) diff --git a/modules/elastodyn/src/ElastoDyn.f90 b/modules/elastodyn/src/ElastoDyn.f90 index 36d7222ce..6c1d93245 100644 --- a/modules/elastodyn/src/ElastoDyn.f90 +++ b/modules/elastodyn/src/ElastoDyn.f90 @@ -597,6 +597,7 @@ SUBROUTINE ED_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) REAL(ReKi) :: MFHydro (NDims,p%TwrNodes) ! Total hydrodynamic + aerodynamic moment per unit length acting on a tower element (body F) at point T. REAL(ReKi) :: MomH0B (NDims,p%NumBl) ! Total moment at the hub (body H) / blade root (point S(0)) due to the blade. + REAL(ReKi) :: gAccE (NDims) ! Gravitational acceleration in the inertia frame (body E for earth) INTEGER(IntKi) :: I ! Generic index INTEGER(IntKi) :: J, J2 ! Loops through nodes / elements @@ -650,6 +651,8 @@ SUBROUTINE ED_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) ! associated with the accelerations one by one: !............................................................................................................................... + gAccE = -p%Gravity * m%CoordSys%z2 + AngAccEB = m%RtHS%AngAccEBt AngAccEH = m%RtHS%AngAccEHt AngAccEN = m%RtHS%AngAccENt @@ -806,6 +809,9 @@ SUBROUTINE ED_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) m%AllOuts( TipALxb(K) ) = DOT_PRODUCT( LinAccES(:,p%TipNode,K), m%CoordSys%n1(K,p%BldNodes,:) ) m%AllOuts( TipALyb(K) ) = DOT_PRODUCT( LinAccES(:,p%TipNode,K), m%CoordSys%n2(K,p%BldNodes,:) ) m%AllOuts( TipALzb(K) ) = DOT_PRODUCT( LinAccES(:,p%TipNode,K), m%CoordSys%n3(K,p%BldNodes,:) ) + m%AllOuts( TipALgxb(K) ) = DOT_PRODUCT( LinAccES(:,p%TipNode,K) - gAccE, m%CoordSys%n1(K,p%BldNodes,:) ) + m%AllOuts( TipALgyb(K) ) = DOT_PRODUCT( LinAccES(:,p%TipNode,K) - gAccE, m%CoordSys%n2(K,p%BldNodes,:) ) + m%AllOuts( TipALgzb(K) ) = DOT_PRODUCT( LinAccES(:,p%TipNode,K) - gAccE, m%CoordSys%n3(K,p%BldNodes,:) ) m%AllOuts( TipRDxb(K) ) = DOT_PRODUCT( m%RtHS%AngPosHM(:,K,p%TipNode), m%CoordSys%j1(K, :) )*R2D m%AllOuts( TipRDyb(K) ) = DOT_PRODUCT( m%RtHS%AngPosHM(:,K,p%TipNode), m%CoordSys%j2(K, :) )*R2D ! There is no sense computing AllOuts( TipRDzc(K) ) here since it is always zero for FAST simulation results. @@ -835,6 +841,10 @@ SUBROUTINE ED_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) m%AllOuts( SpnALyb(I,K) ) = DOT_PRODUCT( LinAccES(:,p%BldGagNd(I),K), m%CoordSys%n2(K,p%BldGagNd(I),:) ) m%AllOuts( SpnALzb(I,K) ) = DOT_PRODUCT( LinAccES(:,p%BldGagNd(I),K), m%CoordSys%n3(K,p%BldGagNd(I),:) ) + m%AllOuts( SpnALgxb(I,K) ) = DOT_PRODUCT( LinAccES(:,p%BldGagNd(I),K) - gAccE, m%CoordSys%n1(K,p%BldGagNd(I),:) ) + m%AllOuts( SpnALgyb(I,K) ) = DOT_PRODUCT( LinAccES(:,p%BldGagNd(I),K) - gAccE, m%CoordSys%n2(K,p%BldGagNd(I),:) ) + m%AllOuts( SpnALgzb(I,K) ) = DOT_PRODUCT( LinAccES(:,p%BldGagNd(I),K) - gAccE, m%CoordSys%n3(K,p%BldGagNd(I),:) ) + rSPS = m%RtHS%rS0S(:,K,p%BldGagNd(I)) - p%RNodes(p%BldGagNd(I))*m%CoordSys%j3(K,:) m%AllOuts( SpnTDxb(I,K) ) = DOT_PRODUCT( rSPS, m%CoordSys%j1(K,:) ) @@ -903,6 +913,9 @@ SUBROUTINE ED_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) m%AllOuts(NcIMUTAxs) = DOT_PRODUCT( LinAccEIMU, m%CoordSys%c1 ) m%AllOuts(NcIMUTAys) = -1.0*DOT_PRODUCT( LinAccEIMU, m%CoordSys%c3 ) m%AllOuts(NcIMUTAzs) = DOT_PRODUCT( LinAccEIMU, m%CoordSys%c2 ) + m%AllOuts(NcIMUTAgxs) = DOT_PRODUCT( LinAccEIMU-gAccE, m%CoordSys%c1 ) + m%AllOuts(NcIMUTAgys) = -1.0*DOT_PRODUCT( LinAccEIMU-gAccE, m%CoordSys%c3 ) + m%AllOuts(NcIMUTAgzs) = DOT_PRODUCT( LinAccEIMU-gAccE, m%CoordSys%c2 ) m%AllOuts(NcIMURVxs) = DOT_PRODUCT( m%RtHS%AngVelER , m%CoordSys%c1 )*R2D m%AllOuts(NcIMURVys) = -1.0*DOT_PRODUCT( m%RtHS%AngVelER , m%CoordSys%c3 )*R2D m%AllOuts(NcIMURVzs) = DOT_PRODUCT( m%RtHS%AngVelER , m%CoordSys%c2 )*R2D @@ -953,6 +966,9 @@ SUBROUTINE ED_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) m%AllOuts(YawBrTAxp) = DOT_PRODUCT( LinAccEO, m%CoordSys%b1 ) m%AllOuts(YawBrTAyp) = -DOT_PRODUCT( LinAccEO, m%CoordSys%b3 ) m%AllOuts(YawBrTAzp) = DOT_PRODUCT( LinAccEO, m%CoordSys%b2 ) + m%AllOuts(YawBrTAgxp) = DOT_PRODUCT( LinAccEO-gAccE, m%CoordSys%b1 ) + m%AllOuts(YawBrTAgyp) = -DOT_PRODUCT( LinAccEO-gAccE, m%CoordSys%b3 ) + m%AllOuts(YawBrTAgzp) = DOT_PRODUCT( LinAccEO-gAccE, m%CoordSys%b2 ) m%AllOuts(YawBrRDxt) = DOT_PRODUCT( m%RtHS%AngPosXB, m%CoordSys%a1 )*R2D m%AllOuts(YawBrRDyt) = -DOT_PRODUCT( m%RtHS%AngPosXB, m%CoordSys%a3 )*R2D ! There is no sense computing m%AllOuts(YawBrRDzt) here since it is always zero for FAST simulation results. @@ -972,6 +988,10 @@ SUBROUTINE ED_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) m%AllOuts( TwHtALyt(I) ) = -1.0*DOT_PRODUCT( LinAccET(:,p%TwrGagNd(I)), m%CoordSys%t3(p%TwrGagNd(I),:) ) m%AllOuts( TwHtALzt(I) ) = DOT_PRODUCT( LinAccET(:,p%TwrGagNd(I)), m%CoordSys%t2(p%TwrGagNd(I),:) ) + m%AllOuts( TwHtALgxt(I) ) = DOT_PRODUCT( LinAccET(:,p%TwrGagNd(I)) - gAccE, m%CoordSys%t1(p%TwrGagNd(I),:) ) + m%AllOuts( TwHtALgyt(I) ) = -1.0*DOT_PRODUCT( LinAccET(:,p%TwrGagNd(I)) - gAccE, m%CoordSys%t3(p%TwrGagNd(I),:) ) + m%AllOuts( TwHtALgzt(I) ) = DOT_PRODUCT( LinAccET(:,p%TwrGagNd(I)) - gAccE, m%CoordSys%t2(p%TwrGagNd(I),:) ) + rTPT = m%RtHS%rT0T(:,p%TwrGagNd(I)) - p%HNodes(p%TwrGagNd(I))*m%CoordSys%a2(:) m%AllOuts( TwHtTDxt(I) ) = DOT_PRODUCT( rTPT, m%CoordSys%a1 ) @@ -1010,9 +1030,15 @@ SUBROUTINE ED_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) m%AllOuts( PtfmTAxt) = DOT_PRODUCT( LinAccEZ, m%CoordSys%a1 ) m%AllOuts( PtfmTAyt) = -DOT_PRODUCT( LinAccEZ, m%CoordSys%a3 ) m%AllOuts( PtfmTAzt) = DOT_PRODUCT( LinAccEZ, m%CoordSys%a2 ) + m%AllOuts( PtfmTAgxt) = DOT_PRODUCT( LinAccEZ - gAccE, m%CoordSys%a1 ) + m%AllOuts( PtfmTAgyt) = -DOT_PRODUCT( LinAccEZ - gAccE, m%CoordSys%a3 ) + m%AllOuts( PtfmTAgzt) = DOT_PRODUCT( LinAccEZ - gAccE, m%CoordSys%a2 ) m%AllOuts( PtfmTAxi) = m%QD2T(DOF_Sg ) m%AllOuts( PtfmTAyi) = m%QD2T(DOF_Sw ) m%AllOuts( PtfmTAzi) = m%QD2T(DOF_Hv ) + m%AllOuts( PtfmTAgxi) = m%QD2T(DOF_Sg ) + m%AllOuts( PtfmTAgyi) = m%QD2T(DOF_Sw ) + m%AllOuts( PtfmTAgzi) = m%QD2T(DOF_Hv ) + p%Gravity m%AllOuts( PtfmRDxi) = x%QT (DOF_R )*R2D m%AllOuts( PtfmRDyi) = x%QT (DOF_P )*R2D m%AllOuts( PtfmRDzi) = x%QT (DOF_Y )*R2D @@ -3925,378 +3951,486 @@ SUBROUTINE SetOutParam(OutList, p, ErrStat, ErrMsg ) CHARACTER(ChanLen) :: OutListTmp ! A string to temporarily hold OutList(I) CHARACTER(*), PARAMETER :: RoutineName = "SetOutParam" - CHARACTER(OutStrLenM1), PARAMETER :: ValidParamAry(981) = (/ & ! This lists the names of the allowed parameters, which must be sorted alphabetically - "AZIMUTH ","BLDPITCH1","BLDPITCH2","BLDPITCH3","BLPITCH1 ","BLPITCH2 ","BLPITCH3 ","GENACCEL ", & - "GENSPEED ","HSSBRTQ ","HSSHFTA ","HSSHFTPWR","HSSHFTTQ ","HSSHFTV ","IPDEFL1 ","IPDEFL2 ", & - "IPDEFL3 ","LSSGAGA ","LSSGAGAXA","LSSGAGAXS","LSSGAGFXA","LSSGAGFXS","LSSGAGFYA","LSSGAGFYS", & - "LSSGAGFZA","LSSGAGFZS","LSSGAGMXA","LSSGAGMXS","LSSGAGMYA","LSSGAGMYS","LSSGAGMZA","LSSGAGMZS", & - "LSSGAGP ","LSSGAGPXA","LSSGAGPXS","LSSGAGV ","LSSGAGVXA","LSSGAGVXS","LSSHFTFXA","LSSHFTFXS", & - "LSSHFTFYA","LSSHFTFYS","LSSHFTFZA","LSSHFTFZS","LSSHFTMXA","LSSHFTMXS","LSSHFTPWR","LSSHFTTQ ", & - "LSSTIPA ","LSSTIPAXA","LSSTIPAXS","LSSTIPMYA","LSSTIPMYS","LSSTIPMZA","LSSTIPMZS","LSSTIPP ", & - "LSSTIPPXA","LSSTIPPXS","LSSTIPV ","LSSTIPVXA","LSSTIPVXS","NACYAW ","NACYAWA ","NACYAWP ", & - "NACYAWV ","NCIMURAXS","NCIMURAYS","NCIMURAZS","NCIMURVXS","NCIMURVYS","NCIMURVZS","NCIMUTAXS", & - "NCIMUTAYS","NCIMUTAZS","NCIMUTVXS","NCIMUTVYS","NCIMUTVZS","OOPDEFL1 ","OOPDEFL2 ","OOPDEFL3 ", & - "PTCHDEFL1","PTCHDEFL2","PTCHDEFL3","PTCHPMZB1","PTCHPMZB2","PTCHPMZB3","PTCHPMZC1","PTCHPMZC2", & - "PTCHPMZC3","PTFMHEAVE","PTFMPITCH","PTFMRAXI ","PTFMRAXT ","PTFMRAYI ","PTFMRAYT ","PTFMRAZI ", & - "PTFMRAZT ","PTFMRDXI ","PTFMRDYI ","PTFMRDZI ","PTFMROLL ","PTFMRVXI ","PTFMRVXT ","PTFMRVYI ", & - "PTFMRVYT ","PTFMRVZI ","PTFMRVZT ","PTFMSURGE","PTFMSWAY ","PTFMTAXI ","PTFMTAXT ","PTFMTAYI ", & - "PTFMTAYT ","PTFMTAZI ","PTFMTAZT ","PTFMTDXI ","PTFMTDXT ","PTFMTDYI ","PTFMTDYT ","PTFMTDZI ", & - "PTFMTDZT ","PTFMTVXI ","PTFMTVXT ","PTFMTVYI ","PTFMTVYT ","PTFMTVZI ","PTFMTVZT ","PTFMYAW ", & - "QD2_B1E1 ","QD2_B1F1 ","QD2_B1F2 ","QD2_B2E1 ","QD2_B2F1 ","QD2_B2F2 ","QD2_B3E1 ","QD2_B3F1 ", & - "QD2_B3F2 ","QD2_DRTR ","QD2_GEAZ ","QD2_HV ","QD2_P ","QD2_R ","QD2_RFRL ","QD2_SG ", & - "QD2_SW ","QD2_TEET ","QD2_TFA1 ","QD2_TFA2 ","QD2_TFRL ","QD2_TSS1 ","QD2_TSS2 ","QD2_Y ", & - "QD2_YAW ","QD_B1E1 ","QD_B1F1 ","QD_B1F2 ","QD_B2E1 ","QD_B2F1 ","QD_B2F2 ","QD_B3E1 ", & - "QD_B3F1 ","QD_B3F2 ","QD_DRTR ","QD_GEAZ ","QD_HV ","QD_P ","QD_R ","QD_RFRL ", & - "QD_SG ","QD_SW ","QD_TEET ","QD_TFA1 ","QD_TFA2 ","QD_TFRL ","QD_TSS1 ","QD_TSS2 ", & - "QD_Y ","QD_YAW ","Q_B1E1 ","Q_B1F1 ","Q_B1F2 ","Q_B2E1 ","Q_B2F1 ","Q_B2F2 ", & - "Q_B3E1 ","Q_B3F1 ","Q_B3F2 ","Q_DRTR ","Q_GEAZ ","Q_HV ","Q_P ","Q_R ", & - "Q_RFRL ","Q_SG ","Q_SW ","Q_TEET ","Q_TFA1 ","Q_TFA2 ","Q_TFRL ","Q_TSS1 ", & - "Q_TSS2 ","Q_Y ","Q_YAW ","RFRLBRM ","ROLLDEFL1","ROLLDEFL2","ROLLDEFL3","ROOTFXB1 ", & - "ROOTFXB2 ","ROOTFXB3 ","ROOTFXC1 ","ROOTFXC2 ","ROOTFXC3 ","ROOTFYB1 ","ROOTFYB2 ","ROOTFYB3 ", & - "ROOTFYC1 ","ROOTFYC2 ","ROOTFYC3 ","ROOTFZB1 ","ROOTFZB2 ","ROOTFZB3 ","ROOTFZC1 ","ROOTFZC2 ", & - "ROOTFZC3 ","ROOTMEDG1","ROOTMEDG2","ROOTMEDG3","ROOTMFLP1","ROOTMFLP2","ROOTMFLP3","ROOTMIP1 ", & - "ROOTMIP2 ","ROOTMIP3 ","ROOTMOOP1","ROOTMOOP2","ROOTMOOP3","ROOTMXB1 ","ROOTMXB2 ","ROOTMXB3 ", & - "ROOTMXC1 ","ROOTMXC2 ","ROOTMXC3 ","ROOTMYB1 ","ROOTMYB2 ","ROOTMYB3 ","ROOTMYC1 ","ROOTMYC2 ", & - "ROOTMYC3 ","ROOTMZB1 ","ROOTMZB2 ","ROOTMZB3 ","ROOTMZC1 ","ROOTMZC2 ","ROOTMZC3 ","ROTACCEL ", & - "ROTFURL ","ROTFURLA ","ROTFURLP ","ROTFURLV ","ROTPWR ","ROTSPEED ","ROTTEETA ","ROTTEETP ", & - "ROTTEETV ","ROTTHRUST","ROTTORQ ","SPN1ALXB1","SPN1ALXB2","SPN1ALXB3","SPN1ALYB1","SPN1ALYB2", & - "SPN1ALYB3","SPN1ALZB1","SPN1ALZB2","SPN1ALZB3","SPN1FLXB1","SPN1FLXB2","SPN1FLXB3","SPN1FLYB1", & - "SPN1FLYB2","SPN1FLYB3","SPN1FLZB1","SPN1FLZB2","SPN1FLZB3","SPN1MLXB1","SPN1MLXB2","SPN1MLXB3", & - "SPN1MLYB1","SPN1MLYB2","SPN1MLYB3","SPN1MLZB1","SPN1MLZB2","SPN1MLZB3","SPN1RDXB1","SPN1RDXB2", & - "SPN1RDXB3","SPN1RDYB1","SPN1RDYB2","SPN1RDYB3","SPN1RDZB1","SPN1RDZB2","SPN1RDZB3","SPN1TDXB1", & - "SPN1TDXB2","SPN1TDXB3","SPN1TDYB1","SPN1TDYB2","SPN1TDYB3","SPN1TDZB1","SPN1TDZB2","SPN1TDZB3", & - "SPN2ALXB1","SPN2ALXB2","SPN2ALXB3","SPN2ALYB1","SPN2ALYB2","SPN2ALYB3","SPN2ALZB1","SPN2ALZB2", & - "SPN2ALZB3","SPN2FLXB1","SPN2FLXB2","SPN2FLXB3","SPN2FLYB1","SPN2FLYB2","SPN2FLYB3","SPN2FLZB1", & - "SPN2FLZB2","SPN2FLZB3","SPN2MLXB1","SPN2MLXB2","SPN2MLXB3","SPN2MLYB1","SPN2MLYB2","SPN2MLYB3", & - "SPN2MLZB1","SPN2MLZB2","SPN2MLZB3","SPN2RDXB1","SPN2RDXB2","SPN2RDXB3","SPN2RDYB1","SPN2RDYB2", & - "SPN2RDYB3","SPN2RDZB1","SPN2RDZB2","SPN2RDZB3","SPN2TDXB1","SPN2TDXB2","SPN2TDXB3","SPN2TDYB1", & - "SPN2TDYB2","SPN2TDYB3","SPN2TDZB1","SPN2TDZB2","SPN2TDZB3","SPN3ALXB1","SPN3ALXB2","SPN3ALXB3", & - "SPN3ALYB1","SPN3ALYB2","SPN3ALYB3","SPN3ALZB1","SPN3ALZB2","SPN3ALZB3","SPN3FLXB1","SPN3FLXB2", & - "SPN3FLXB3","SPN3FLYB1","SPN3FLYB2","SPN3FLYB3","SPN3FLZB1","SPN3FLZB2","SPN3FLZB3","SPN3MLXB1", & - "SPN3MLXB2","SPN3MLXB3","SPN3MLYB1","SPN3MLYB2","SPN3MLYB3","SPN3MLZB1","SPN3MLZB2","SPN3MLZB3", & - "SPN3RDXB1","SPN3RDXB2","SPN3RDXB3","SPN3RDYB1","SPN3RDYB2","SPN3RDYB3","SPN3RDZB1","SPN3RDZB2", & - "SPN3RDZB3","SPN3TDXB1","SPN3TDXB2","SPN3TDXB3","SPN3TDYB1","SPN3TDYB2","SPN3TDYB3","SPN3TDZB1", & - "SPN3TDZB2","SPN3TDZB3","SPN4ALXB1","SPN4ALXB2","SPN4ALXB3","SPN4ALYB1","SPN4ALYB2","SPN4ALYB3", & - "SPN4ALZB1","SPN4ALZB2","SPN4ALZB3","SPN4FLXB1","SPN4FLXB2","SPN4FLXB3","SPN4FLYB1","SPN4FLYB2", & - "SPN4FLYB3","SPN4FLZB1","SPN4FLZB2","SPN4FLZB3","SPN4MLXB1","SPN4MLXB2","SPN4MLXB3","SPN4MLYB1", & - "SPN4MLYB2","SPN4MLYB3","SPN4MLZB1","SPN4MLZB2","SPN4MLZB3","SPN4RDXB1","SPN4RDXB2","SPN4RDXB3", & - "SPN4RDYB1","SPN4RDYB2","SPN4RDYB3","SPN4RDZB1","SPN4RDZB2","SPN4RDZB3","SPN4TDXB1","SPN4TDXB2", & - "SPN4TDXB3","SPN4TDYB1","SPN4TDYB2","SPN4TDYB3","SPN4TDZB1","SPN4TDZB2","SPN4TDZB3","SPN5ALXB1", & - "SPN5ALXB2","SPN5ALXB3","SPN5ALYB1","SPN5ALYB2","SPN5ALYB3","SPN5ALZB1","SPN5ALZB2","SPN5ALZB3", & - "SPN5FLXB1","SPN5FLXB2","SPN5FLXB3","SPN5FLYB1","SPN5FLYB2","SPN5FLYB3","SPN5FLZB1","SPN5FLZB2", & - "SPN5FLZB3","SPN5MLXB1","SPN5MLXB2","SPN5MLXB3","SPN5MLYB1","SPN5MLYB2","SPN5MLYB3","SPN5MLZB1", & - "SPN5MLZB2","SPN5MLZB3","SPN5RDXB1","SPN5RDXB2","SPN5RDXB3","SPN5RDYB1","SPN5RDYB2","SPN5RDYB3", & - "SPN5RDZB1","SPN5RDZB2","SPN5RDZB3","SPN5TDXB1","SPN5TDXB2","SPN5TDXB3","SPN5TDYB1","SPN5TDYB2", & - "SPN5TDYB3","SPN5TDZB1","SPN5TDZB2","SPN5TDZB3","SPN6ALXB1","SPN6ALXB2","SPN6ALXB3","SPN6ALYB1", & - "SPN6ALYB2","SPN6ALYB3","SPN6ALZB1","SPN6ALZB2","SPN6ALZB3","SPN6FLXB1","SPN6FLXB2","SPN6FLXB3", & - "SPN6FLYB1","SPN6FLYB2","SPN6FLYB3","SPN6FLZB1","SPN6FLZB2","SPN6FLZB3","SPN6MLXB1","SPN6MLXB2", & - "SPN6MLXB3","SPN6MLYB1","SPN6MLYB2","SPN6MLYB3","SPN6MLZB1","SPN6MLZB2","SPN6MLZB3","SPN6RDXB1", & - "SPN6RDXB2","SPN6RDXB3","SPN6RDYB1","SPN6RDYB2","SPN6RDYB3","SPN6RDZB1","SPN6RDZB2","SPN6RDZB3", & - "SPN6TDXB1","SPN6TDXB2","SPN6TDXB3","SPN6TDYB1","SPN6TDYB2","SPN6TDYB3","SPN6TDZB1","SPN6TDZB2", & - "SPN6TDZB3","SPN7ALXB1","SPN7ALXB2","SPN7ALXB3","SPN7ALYB1","SPN7ALYB2","SPN7ALYB3","SPN7ALZB1", & - "SPN7ALZB2","SPN7ALZB3","SPN7FLXB1","SPN7FLXB2","SPN7FLXB3","SPN7FLYB1","SPN7FLYB2","SPN7FLYB3", & - "SPN7FLZB1","SPN7FLZB2","SPN7FLZB3","SPN7MLXB1","SPN7MLXB2","SPN7MLXB3","SPN7MLYB1","SPN7MLYB2", & - "SPN7MLYB3","SPN7MLZB1","SPN7MLZB2","SPN7MLZB3","SPN7RDXB1","SPN7RDXB2","SPN7RDXB3","SPN7RDYB1", & - "SPN7RDYB2","SPN7RDYB3","SPN7RDZB1","SPN7RDZB2","SPN7RDZB3","SPN7TDXB1","SPN7TDXB2","SPN7TDXB3", & - "SPN7TDYB1","SPN7TDYB2","SPN7TDYB3","SPN7TDZB1","SPN7TDZB2","SPN7TDZB3","SPN8ALXB1","SPN8ALXB2", & - "SPN8ALXB3","SPN8ALYB1","SPN8ALYB2","SPN8ALYB3","SPN8ALZB1","SPN8ALZB2","SPN8ALZB3","SPN8FLXB1", & - "SPN8FLXB2","SPN8FLXB3","SPN8FLYB1","SPN8FLYB2","SPN8FLYB3","SPN8FLZB1","SPN8FLZB2","SPN8FLZB3", & - "SPN8MLXB1","SPN8MLXB2","SPN8MLXB3","SPN8MLYB1","SPN8MLYB2","SPN8MLYB3","SPN8MLZB1","SPN8MLZB2", & - "SPN8MLZB3","SPN8RDXB1","SPN8RDXB2","SPN8RDXB3","SPN8RDYB1","SPN8RDYB2","SPN8RDYB3","SPN8RDZB1", & - "SPN8RDZB2","SPN8RDZB3","SPN8TDXB1","SPN8TDXB2","SPN8TDXB3","SPN8TDYB1","SPN8TDYB2","SPN8TDYB3", & - "SPN8TDZB1","SPN8TDZB2","SPN8TDZB3","SPN9ALXB1","SPN9ALXB2","SPN9ALXB3","SPN9ALYB1","SPN9ALYB2", & - "SPN9ALYB3","SPN9ALZB1","SPN9ALZB2","SPN9ALZB3","SPN9FLXB1","SPN9FLXB2","SPN9FLXB3","SPN9FLYB1", & - "SPN9FLYB2","SPN9FLYB3","SPN9FLZB1","SPN9FLZB2","SPN9FLZB3","SPN9MLXB1","SPN9MLXB2","SPN9MLXB3", & - "SPN9MLYB1","SPN9MLYB2","SPN9MLYB3","SPN9MLZB1","SPN9MLZB2","SPN9MLZB3","SPN9RDXB1","SPN9RDXB2", & - "SPN9RDXB3","SPN9RDYB1","SPN9RDYB2","SPN9RDYB3","SPN9RDZB1","SPN9RDZB2","SPN9RDZB3","SPN9TDXB1", & - "SPN9TDXB2","SPN9TDXB3","SPN9TDYB1","SPN9TDYB2","SPN9TDYB3","SPN9TDZB1","SPN9TDZB2","SPN9TDZB3", & - "TAILFURL ","TAILFURLA","TAILFURLP","TAILFURLV","TEETAYA ","TEETDEFL ","TEETPYA ","TEETVYA ", & - "TFRLBRM ","TIP2TWR1 ","TIP2TWR2 ","TIP2TWR3 ","TIPALXB1 ","TIPALXB2 ","TIPALXB3 ","TIPALYB1 ", & - "TIPALYB2 ","TIPALYB3 ","TIPALZB1 ","TIPALZB2 ","TIPALZB3 ","TIPCLRNC1","TIPCLRNC2","TIPCLRNC3", & - "TIPDXB1 ","TIPDXB2 ","TIPDXB3 ","TIPDXC1 ","TIPDXC2 ","TIPDXC3 ","TIPDYB1 ","TIPDYB2 ", & - "TIPDYB3 ","TIPDYC1 ","TIPDYC2 ","TIPDYC3 ","TIPDZB1 ","TIPDZB2 ","TIPDZB3 ","TIPDZC1 ", & - "TIPDZC2 ","TIPDZC3 ","TIPRDXB1 ","TIPRDXB2 ","TIPRDXB3 ","TIPRDYB1 ","TIPRDYB2 ","TIPRDYB3 ", & - "TIPRDZB1 ","TIPRDZB2 ","TIPRDZB3 ","TIPRDZC1 ","TIPRDZC2 ","TIPRDZC3 ","TTDSPAX ","TTDSPFA ", & - "TTDSPPTCH","TTDSPROLL","TTDSPSS ","TTDSPTWST","TWHT1ALXT","TWHT1ALYT","TWHT1ALZT","TWHT1FLXT", & - "TWHT1FLYT","TWHT1FLZT","TWHT1MLXT","TWHT1MLYT","TWHT1MLZT","TWHT1RDXT","TWHT1RDYT","TWHT1RDZT", & - "TWHT1RPXI","TWHT1RPYI","TWHT1RPZI","TWHT1TDXT","TWHT1TDYT","TWHT1TDZT","TWHT1TPXI","TWHT1TPYI", & - "TWHT1TPZI","TWHT2ALXT","TWHT2ALYT","TWHT2ALZT","TWHT2FLXT","TWHT2FLYT","TWHT2FLZT","TWHT2MLXT", & - "TWHT2MLYT","TWHT2MLZT","TWHT2RDXT","TWHT2RDYT","TWHT2RDZT","TWHT2RPXI","TWHT2RPYI","TWHT2RPZI", & - "TWHT2TDXT","TWHT2TDYT","TWHT2TDZT","TWHT2TPXI","TWHT2TPYI","TWHT2TPZI","TWHT3ALXT","TWHT3ALYT", & - "TWHT3ALZT","TWHT3FLXT","TWHT3FLYT","TWHT3FLZT","TWHT3MLXT","TWHT3MLYT","TWHT3MLZT","TWHT3RDXT", & - "TWHT3RDYT","TWHT3RDZT","TWHT3RPXI","TWHT3RPYI","TWHT3RPZI","TWHT3TDXT","TWHT3TDYT","TWHT3TDZT", & - "TWHT3TPXI","TWHT3TPYI","TWHT3TPZI","TWHT4ALXT","TWHT4ALYT","TWHT4ALZT","TWHT4FLXT","TWHT4FLYT", & - "TWHT4FLZT","TWHT4MLXT","TWHT4MLYT","TWHT4MLZT","TWHT4RDXT","TWHT4RDYT","TWHT4RDZT","TWHT4RPXI", & - "TWHT4RPYI","TWHT4RPZI","TWHT4TDXT","TWHT4TDYT","TWHT4TDZT","TWHT4TPXI","TWHT4TPYI","TWHT4TPZI", & - "TWHT5ALXT","TWHT5ALYT","TWHT5ALZT","TWHT5FLXT","TWHT5FLYT","TWHT5FLZT","TWHT5MLXT","TWHT5MLYT", & - "TWHT5MLZT","TWHT5RDXT","TWHT5RDYT","TWHT5RDZT","TWHT5RPXI","TWHT5RPYI","TWHT5RPZI","TWHT5TDXT", & - "TWHT5TDYT","TWHT5TDZT","TWHT5TPXI","TWHT5TPYI","TWHT5TPZI","TWHT6ALXT","TWHT6ALYT","TWHT6ALZT", & - "TWHT6FLXT","TWHT6FLYT","TWHT6FLZT","TWHT6MLXT","TWHT6MLYT","TWHT6MLZT","TWHT6RDXT","TWHT6RDYT", & - "TWHT6RDZT","TWHT6RPXI","TWHT6RPYI","TWHT6RPZI","TWHT6TDXT","TWHT6TDYT","TWHT6TDZT","TWHT6TPXI", & - "TWHT6TPYI","TWHT6TPZI","TWHT7ALXT","TWHT7ALYT","TWHT7ALZT","TWHT7FLXT","TWHT7FLYT","TWHT7FLZT", & - "TWHT7MLXT","TWHT7MLYT","TWHT7MLZT","TWHT7RDXT","TWHT7RDYT","TWHT7RDZT","TWHT7RPXI","TWHT7RPYI", & - "TWHT7RPZI","TWHT7TDXT","TWHT7TDYT","TWHT7TDZT","TWHT7TPXI","TWHT7TPYI","TWHT7TPZI","TWHT8ALXT", & - "TWHT8ALYT","TWHT8ALZT","TWHT8FLXT","TWHT8FLYT","TWHT8FLZT","TWHT8MLXT","TWHT8MLYT","TWHT8MLZT", & - "TWHT8RDXT","TWHT8RDYT","TWHT8RDZT","TWHT8RPXI","TWHT8RPYI","TWHT8RPZI","TWHT8TDXT","TWHT8TDYT", & - "TWHT8TDZT","TWHT8TPXI","TWHT8TPYI","TWHT8TPZI","TWHT9ALXT","TWHT9ALYT","TWHT9ALZT","TWHT9FLXT", & - "TWHT9FLYT","TWHT9FLZT","TWHT9MLXT","TWHT9MLYT","TWHT9MLZT","TWHT9RDXT","TWHT9RDYT","TWHT9RDZT", & - "TWHT9RPXI","TWHT9RPYI","TWHT9RPZI","TWHT9TDXT","TWHT9TDYT","TWHT9TDZT","TWHT9TPXI","TWHT9TPYI", & - "TWHT9TPZI","TWRBSFXT ","TWRBSFYT ","TWRBSFZT ","TWRBSMXT ","TWRBSMYT ","TWRBSMZT ","TWRCLRNC1", & - "TWRCLRNC2","TWRCLRNC3","TWRTPTDXI","TWRTPTDYI","TWRTPTDZI","TWSTDEFL1","TWSTDEFL2","TWSTDEFL3", & - "YAWACCEL ","YAWAZN ","YAWAZP ","YAWBRFXN ","YAWBRFXP ","YAWBRFYN ","YAWBRFYP ","YAWBRFZN ", & - "YAWBRFZP ","YAWBRMXN ","YAWBRMXP ","YAWBRMYN ","YAWBRMYP ","YAWBRMZN ","YAWBRMZP ","YAWBRRAXP", & - "YAWBRRAYP","YAWBRRAZP","YAWBRRDXT","YAWBRRDYT","YAWBRRDZT","YAWBRRVXP","YAWBRRVYP","YAWBRRVZP", & - "YAWBRTAXP","YAWBRTAYP","YAWBRTAZP","YAWBRTDXI","YAWBRTDXP","YAWBRTDXT","YAWBRTDYI","YAWBRTDYP", & - "YAWBRTDYT","YAWBRTDZI","YAWBRTDZP","YAWBRTDZT","YAWBRTVXP","YAWBRTVYP","YAWBRTVZP","YAWPOS ", & - "YAWPZN ","YAWPZP ","YAWRATE ","YAWVZN ","YAWVZP "/) - INTEGER(IntKi), PARAMETER :: ParamIndxAry(981) = (/ & ! This lists the index into AllOuts(:) of the allowed parameters ValidParamAry(:) - LSSTipPxa , PtchPMzc1 , PtchPMzc2 , PtchPMzc3 , PtchPMzc1 , PtchPMzc2 , PtchPMzc3 , HSShftA , & - HSShftV , HSSBrTq , HSShftA , HSShftPwr , HSShftTq , HSShftV , TipDyc1 , TipDyc2 , & - TipDyc3 , LSSGagAxa , LSSGagAxa , LSSGagAxa , LSShftFxa , LSShftFxa , LSShftFya , LSShftFys , & - LSShftFza , LSShftFzs , LSShftMxa , LSShftMxa , LSSGagMya , LSSGagMys , LSSGagMza , LSSGagMzs , & - LSSGagPxa , LSSGagPxa , LSSGagPxa , LSSGagVxa , LSSGagVxa , LSSGagVxa , LSShftFxa , LSShftFxa , & - LSShftFya , LSShftFys , LSShftFza , LSShftFzs , LSShftMxa , LSShftMxa , RotPwr , LSShftMxa , & - LSSTipAxa , LSSTipAxa , LSSTipAxa , LSSTipMya , LSSTipMys , LSSTipMza , LSSTipMzs , LSSTipPxa , & - LSSTipPxa , LSSTipPxa , LSSTipVxa , LSSTipVxa , LSSTipVxa , YawPzn , YawAzn , YawPzn , & - YawVzn , NcIMURAxs , NcIMURAys , NcIMURAzs , NcIMURVxs , NcIMURVys , NcIMURVzs , NcIMUTAxs , & - NcIMUTAys , NcIMUTAzs , NcIMUTVxs , NcIMUTVys , NcIMUTVzs , TipDxc1 , TipDxc2 , TipDxc3 , & - TipRDyb1 , TipRDyb2 , TipRDyb3 , PtchPMzc1 , PtchPMzc2 , PtchPMzc3 , PtchPMzc1 , PtchPMzc2 , & - PtchPMzc3 , PtfmTDzi , PtfmRDyi , PtfmRAxi , PtfmRAxt , PtfmRAyi , PtfmRAyt , PtfmRAzi , & - PtfmRAzt , PtfmRDxi , PtfmRDyi , PtfmRDzi , PtfmRDxi , PtfmRVxi , PtfmRVxt , PtfmRVyi , & - PtfmRVyt , PtfmRVzi , PtfmRVzt , PtfmTDxi , PtfmTDyi , PtfmTAxi , PtfmTAxt , PtfmTAyi , & - PtfmTAyt , PtfmTAzi , PtfmTAzt , PtfmTDxi , PtfmTDxt , PtfmTDyi , PtfmTDyt , PtfmTDzi , & - PtfmTDzt , PtfmTVxi , PtfmTVxt , PtfmTVyi , PtfmTVyt , PtfmTVzi , PtfmTVzt , PtfmRDzi , & - QD2_B1E1 , QD2_B1F1 , QD2_B1F2 , QD2_B2E1 , QD2_B2F1 , QD2_B2F2 , QD2_B3E1 , QD2_B3F1 , & - QD2_B3F2 , QD2_DrTr , QD2_GeAz , QD2_Hv , QD2_P , QD2_R , QD2_RFrl , QD2_Sg , & - QD2_Sw , QD2_Teet , QD2_TFA1 , QD2_TFA2 , QD2_TFrl , QD2_TSS1 , QD2_TSS2 , QD2_Y , & - QD2_Yaw , QD_B1E1 , QD_B1F1 , QD_B1F2 , QD_B2E1 , QD_B2F1 , QD_B2F2 , QD_B3E1 , & - QD_B3F1 , QD_B3F2 , QD_DrTr , QD_GeAz , QD_Hv , QD_P , QD_R , QD_RFrl , & - QD_Sg , QD_Sw , QD_Teet , QD_TFA1 , QD_TFA2 , QD_TFrl , QD_TSS1 , QD_TSS2 , & - QD_Y , QD_Yaw , Q_B1E1 , Q_B1F1 , Q_B1F2 , Q_B2E1 , Q_B2F1 , Q_B2F2 , & - Q_B3E1 , Q_B3F1 , Q_B3F2 , Q_DrTr , Q_GeAz , Q_Hv , Q_P , Q_R , & - Q_RFrl , Q_Sg , Q_Sw , Q_Teet , Q_TFA1 , Q_TFA2 , Q_TFrl , Q_TSS1 , & - Q_TSS2 , Q_Y , Q_Yaw , RFrlBrM , TipRDxb1 , TipRDxb2 , TipRDxb3 , RootFxb1 , & - RootFxb2 , RootFxb3 , RootFxc1 , RootFxc2 , RootFxc3 , RootFyb1 , RootFyb2 , RootFyb3 , & - RootFyc1 , RootFyc2 , RootFyc3 , RootFzc1 , RootFzc2 , RootFzc3 , RootFzc1 , RootFzc2 , & - RootFzc3 , RootMxb1 , RootMxb2 , RootMxb3 , RootMyb1 , RootMyb2 , RootMyb3 , RootMxc1 , & - RootMxc2 , RootMxc3 , RootMyc1 , RootMyc2 , RootMyc3 , RootMxb1 , RootMxb2 , RootMxb3 , & - RootMxc1 , RootMxc2 , RootMxc3 , RootMyb1 , RootMyb2 , RootMyb3 , RootMyc1 , RootMyc2 , & - RootMyc3 , RootMzc1 , RootMzc2 , RootMzc3 , RootMzc1 , RootMzc2 , RootMzc3 , LSSTipAxa , & - RotFurlP , RotFurlA , RotFurlP , RotFurlV , RotPwr , LSSTipVxa , TeetAya , TeetPya , & - TeetVya , LSShftFxa , LSShftMxa , Spn1ALxb1 , Spn1ALxb2 , Spn1ALxb3 , Spn1ALyb1 , Spn1ALyb2 , & - Spn1ALyb3 , Spn1ALzb1 , Spn1ALzb2 , Spn1ALzb3 , Spn1FLxb1 , Spn1FLxb2 , Spn1FLxb3 , Spn1FLyb1 , & - Spn1FLyb2 , Spn1FLyb3 , Spn1FLzb1 , Spn1FLzb2 , Spn1FLzb3 , Spn1MLxb1 , Spn1MLxb2 , Spn1MLxb3 , & - Spn1MLyb1 , Spn1MLyb2 , Spn1MLyb3 , Spn1MLzb1 , Spn1MLzb2 , Spn1MLzb3 , Spn1RDxb1 , Spn1RDxb2 , & - Spn1RDxb3 , Spn1RDyb1 , Spn1RDyb2 , Spn1RDyb3 , Spn1RDzb1 , Spn1RDzb2 , Spn1RDzb3 , Spn1TDxb1 , & - Spn1TDxb2 , Spn1TDxb3 , Spn1TDyb1 , Spn1TDyb2 , Spn1TDyb3 , Spn1TDzb1 , Spn1TDzb2 , Spn1TDzb3 , & - Spn2ALxb1 , Spn2ALxb2 , Spn2ALxb3 , Spn2ALyb1 , Spn2ALyb2 , Spn2ALyb3 , Spn2ALzb1 , Spn2ALzb2 , & - Spn2ALzb3 , Spn2FLxb1 , Spn2FLxb2 , Spn2FLxb3 , Spn2FLyb1 , Spn2FLyb2 , Spn2FLyb3 , Spn2FLzb1 , & - Spn2FLzb2 , Spn2FLzb3 , Spn2MLxb1 , Spn2MLxb2 , Spn2MLxb3 , Spn2MLyb1 , Spn2MLyb2 , Spn2MLyb3 , & - Spn2MLzb1 , Spn2MLzb2 , Spn2MLzb3 , Spn2RDxb1 , Spn2RDxb2 , Spn2RDxb3 , Spn2RDyb1 , Spn2RDyb2 , & - Spn2RDyb3 , Spn2RDzb1 , Spn2RDzb2 , Spn2RDzb3 , Spn2TDxb1 , Spn2TDxb2 , Spn2TDxb3 , Spn2TDyb1 , & - Spn2TDyb2 , Spn2TDyb3 , Spn2TDzb1 , Spn2TDzb2 , Spn2TDzb3 , Spn3ALxb1 , Spn3ALxb2 , Spn3ALxb3 , & - Spn3ALyb1 , Spn3ALyb2 , Spn3ALyb3 , Spn3ALzb1 , Spn3ALzb2 , Spn3ALzb3 , Spn3FLxb1 , Spn3FLxb2 , & - Spn3FLxb3 , Spn3FLyb1 , Spn3FLyb2 , Spn3FLyb3 , Spn3FLzb1 , Spn3FLzb2 , Spn3FLzb3 , Spn3MLxb1 , & - Spn3MLxb2 , Spn3MLxb3 , Spn3MLyb1 , Spn3MLyb2 , Spn3MLyb3 , Spn3MLzb1 , Spn3MLzb2 , Spn3MLzb3 , & - Spn3RDxb1 , Spn3RDxb2 , Spn3RDxb3 , Spn3RDyb1 , Spn3RDyb2 , Spn3RDyb3 , Spn3RDzb1 , Spn3RDzb2 , & - Spn3RDzb3 , Spn3TDxb1 , Spn3TDxb2 , Spn3TDxb3 , Spn3TDyb1 , Spn3TDyb2 , Spn3TDyb3 , Spn3TDzb1 , & - Spn3TDzb2 , Spn3TDzb3 , Spn4ALxb1 , Spn4ALxb2 , Spn4ALxb3 , Spn4ALyb1 , Spn4ALyb2 , Spn4ALyb3 , & - Spn4ALzb1 , Spn4ALzb2 , Spn4ALzb3 , Spn4FLxb1 , Spn4FLxb2 , Spn4FLxb3 , Spn4FLyb1 , Spn4FLyb2 , & - Spn4FLyb3 , Spn4FLzb1 , Spn4FLzb2 , Spn4FLzb3 , Spn4MLxb1 , Spn4MLxb2 , Spn4MLxb3 , Spn4MLyb1 , & - Spn4MLyb2 , Spn4MLyb3 , Spn4MLzb1 , Spn4MLzb2 , Spn4MLzb3 , Spn4RDxb1 , Spn4RDxb2 , Spn4RDxb3 , & - Spn4RDyb1 , Spn4RDyb2 , Spn4RDyb3 , Spn4RDzb1 , Spn4RDzb2 , Spn4RDzb3 , Spn4TDxb1 , Spn4TDxb2 , & - Spn4TDxb3 , Spn4TDyb1 , Spn4TDyb2 , Spn4TDyb3 , Spn4TDzb1 , Spn4TDzb2 , Spn4TDzb3 , Spn5ALxb1 , & - Spn5ALxb2 , Spn5ALxb3 , Spn5ALyb1 , Spn5ALyb2 , Spn5ALyb3 , Spn5ALzb1 , Spn5ALzb2 , Spn5ALzb3 , & - Spn5FLxb1 , Spn5FLxb2 , Spn5FLxb3 , Spn5FLyb1 , Spn5FLyb2 , Spn5FLyb3 , Spn5FLzb1 , Spn5FLzb2 , & - Spn5FLzb3 , Spn5MLxb1 , Spn5MLxb2 , Spn5MLxb3 , Spn5MLyb1 , Spn5MLyb2 , Spn5MLyb3 , Spn5MLzb1 , & - Spn5MLzb2 , Spn5MLzb3 , Spn5RDxb1 , Spn5RDxb2 , Spn5RDxb3 , Spn5RDyb1 , Spn5RDyb2 , Spn5RDyb3 , & - Spn5RDzb1 , Spn5RDzb2 , Spn5RDzb3 , Spn5TDxb1 , Spn5TDxb2 , Spn5TDxb3 , Spn5TDyb1 , Spn5TDyb2 , & - Spn5TDyb3 , Spn5TDzb1 , Spn5TDzb2 , Spn5TDzb3 , Spn6ALxb1 , Spn6ALxb2 , Spn6ALxb3 , Spn6ALyb1 , & - Spn6ALyb2 , Spn6ALyb3 , Spn6ALzb1 , Spn6ALzb2 , Spn6ALzb3 , Spn6FLxb1 , Spn6FLxb2 , Spn6FLxb3 , & - Spn6FLyb1 , Spn6FLyb2 , Spn6FLyb3 , Spn6FLzb1 , Spn6FLzb2 , Spn6FLzb3 , Spn6MLxb1 , Spn6MLxb2 , & - Spn6MLxb3 , Spn6MLyb1 , Spn6MLyb2 , Spn6MLyb3 , Spn6MLzb1 , Spn6MLzb2 , Spn6MLzb3 , Spn6RDxb1 , & - Spn6RDxb2 , Spn6RDxb3 , Spn6RDyb1 , Spn6RDyb2 , Spn6RDyb3 , Spn6RDzb1 , Spn6RDzb2 , Spn6RDzb3 , & - Spn6TDxb1 , Spn6TDxb2 , Spn6TDxb3 , Spn6TDyb1 , Spn6TDyb2 , Spn6TDyb3 , Spn6TDzb1 , Spn6TDzb2 , & - Spn6TDzb3 , Spn7ALxb1 , Spn7ALxb2 , Spn7ALxb3 , Spn7ALyb1 , Spn7ALyb2 , Spn7ALyb3 , Spn7ALzb1 , & - Spn7ALzb2 , Spn7ALzb3 , Spn7FLxb1 , Spn7FLxb2 , Spn7FLxb3 , Spn7FLyb1 , Spn7FLyb2 , Spn7FLyb3 , & - Spn7FLzb1 , Spn7FLzb2 , Spn7FLzb3 , Spn7MLxb1 , Spn7MLxb2 , Spn7MLxb3 , Spn7MLyb1 , Spn7MLyb2 , & - Spn7MLyb3 , Spn7MLzb1 , Spn7MLzb2 , Spn7MLzb3 , Spn7RDxb1 , Spn7RDxb2 , Spn7RDxb3 , Spn7RDyb1 , & - Spn7RDyb2 , Spn7RDyb3 , Spn7RDzb1 , Spn7RDzb2 , Spn7RDzb3 , Spn7TDxb1 , Spn7TDxb2 , Spn7TDxb3 , & - Spn7TDyb1 , Spn7TDyb2 , Spn7TDyb3 , Spn7TDzb1 , Spn7TDzb2 , Spn7TDzb3 , Spn8ALxb1 , Spn8ALxb2 , & - Spn8ALxb3 , Spn8ALyb1 , Spn8ALyb2 , Spn8ALyb3 , Spn8ALzb1 , Spn8ALzb2 , Spn8ALzb3 , Spn8FLxb1 , & - Spn8FLxb2 , Spn8FLxb3 , Spn8FLyb1 , Spn8FLyb2 , Spn8FLyb3 , Spn8FLzb1 , Spn8FLzb2 , Spn8FLzb3 , & - Spn8MLxb1 , Spn8MLxb2 , Spn8MLxb3 , Spn8MLyb1 , Spn8MLyb2 , Spn8MLyb3 , Spn8MLzb1 , Spn8MLzb2 , & - Spn8MLzb3 , Spn8RDxb1 , Spn8RDxb2 , Spn8RDxb3 , Spn8RDyb1 , Spn8RDyb2 , Spn8RDyb3 , Spn8RDzb1 , & - Spn8RDzb2 , Spn8RDzb3 , Spn8TDxb1 , Spn8TDxb2 , Spn8TDxb3 , Spn8TDyb1 , Spn8TDyb2 , Spn8TDyb3 , & - Spn8TDzb1 , Spn8TDzb2 , Spn8TDzb3 , Spn9ALxb1 , Spn9ALxb2 , Spn9ALxb3 , Spn9ALyb1 , Spn9ALyb2 , & - Spn9ALyb3 , Spn9ALzb1 , Spn9ALzb2 , Spn9ALzb3 , Spn9FLxb1 , Spn9FLxb2 , Spn9FLxb3 , Spn9FLyb1 , & - Spn9FLyb2 , Spn9FLyb3 , Spn9FLzb1 , Spn9FLzb2 , Spn9FLzb3 , Spn9MLxb1 , Spn9MLxb2 , Spn9MLxb3 , & - Spn9MLyb1 , Spn9MLyb2 , Spn9MLyb3 , Spn9MLzb1 , Spn9MLzb2 , Spn9MLzb3 , Spn9RDxb1 , Spn9RDxb2 , & - Spn9RDxb3 , Spn9RDyb1 , Spn9RDyb2 , Spn9RDyb3 , Spn9RDzb1 , Spn9RDzb2 , Spn9RDzb3 , Spn9TDxb1 , & - Spn9TDxb2 , Spn9TDxb3 , Spn9TDyb1 , Spn9TDyb2 , Spn9TDyb3 , Spn9TDzb1 , Spn9TDzb2 , Spn9TDzb3 , & - TailFurlP , TailFurlA , TailFurlP , TailFurlV , TeetAya , TeetPya , TeetPya , TeetVya , & - TFrlBrM , TipClrnc1 , TipClrnc2 , TipClrnc3 , TipALxb1 , TipALxb2 , TipALxb3 , TipALyb1 , & - TipALyb2 , TipALyb3 , TipALzb1 , TipALzb2 , TipALzb3 , TipClrnc1 , TipClrnc2 , TipClrnc3 , & - TipDxb1 , TipDxb2 , TipDxb3 , TipDxc1 , TipDxc2 , TipDxc3 , TipDyb1 , TipDyb2 , & - TipDyb3 , TipDyc1 , TipDyc2 , TipDyc3 , TipDzc1 , TipDzc2 , TipDzc3 , TipDzc1 , & - TipDzc2 , TipDzc3 , TipRDxb1 , TipRDxb2 , TipRDxb3 , TipRDyb1 , TipRDyb2 , TipRDyb3 , & - TipRDzc1 , TipRDzc2 , TipRDzc3 , TipRDzc1 , TipRDzc2 , TipRDzc3 , YawBrTDzt , YawBrTDxt , & - YawBrRDyt , YawBrRDxt , YawBrTDyt , YawBrRDzt , TwHt1ALxt , TwHt1ALyt , TwHt1ALzt , TwHt1FLxt , & - TwHt1FLyt , TwHt1FLzt , TwHt1MLxt , TwHt1MLyt , TwHt1MLzt , TwHt1RDxt , TwHt1RDyt , TwHt1RDzt , & - TwHt1RPxi , TwHt1RPyi , TwHt1RPzi , TwHt1TDxt , TwHt1TDyt , TwHt1TDzt , TwHt1TPxi , TwHt1TPyi , & - TwHt1TPzi , TwHt2ALxt , TwHt2ALyt , TwHt2ALzt , TwHt2FLxt , TwHt2FLyt , TwHt2FLzt , TwHt2MLxt , & - TwHt2MLyt , TwHt2MLzt , TwHt2RDxt , TwHt2RDyt , TwHt2RDzt , TwHt2RPxi , TwHt2RPyi , TwHt2RPzi , & - TwHt2TDxt , TwHt2TDyt , TwHt2TDzt , TwHt2TPxi , TwHt2TPyi , TwHt2TPzi , TwHt3ALxt , TwHt3ALyt , & - TwHt3ALzt , TwHt3FLxt , TwHt3FLyt , TwHt3FLzt , TwHt3MLxt , TwHt3MLyt , TwHt3MLzt , TwHt3RDxt , & - TwHt3RDyt , TwHt3RDzt , TwHt3RPxi , TwHt3RPyi , TwHt3RPzi , TwHt3TDxt , TwHt3TDyt , TwHt3TDzt , & - TwHt3TPxi , TwHt3TPyi , TwHt3TPzi , TwHt4ALxt , TwHt4ALyt , TwHt4ALzt , TwHt4FLxt , TwHt4FLyt , & - TwHt4FLzt , TwHt4MLxt , TwHt4MLyt , TwHt4MLzt , TwHt4RDxt , TwHt4RDyt , TwHt4RDzt , TwHt4RPxi , & - TwHt4RPyi , TwHt4RPzi , TwHt4TDxt , TwHt4TDyt , TwHt4TDzt , TwHt4TPxi , TwHt4TPyi , TwHt4TPzi , & - TwHt5ALxt , TwHt5ALyt , TwHt5ALzt , TwHt5FLxt , TwHt5FLyt , TwHt5FLzt , TwHt5MLxt , TwHt5MLyt , & - TwHt5MLzt , TwHt5RDxt , TwHt5RDyt , TwHt5RDzt , TwHt5RPxi , TwHt5RPyi , TwHt5RPzi , TwHt5TDxt , & - TwHt5TDyt , TwHt5TDzt , TwHt5TPxi , TwHt5TPyi , TwHt5TPzi , TwHt6ALxt , TwHt6ALyt , TwHt6ALzt , & - TwHt6FLxt , TwHt6FLyt , TwHt6FLzt , TwHt6MLxt , TwHt6MLyt , TwHt6MLzt , TwHt6RDxt , TwHt6RDyt , & - TwHt6RDzt , TwHt6RPxi , TwHt6RPyi , TwHt6RPzi , TwHt6TDxt , TwHt6TDyt , TwHt6TDzt , TwHt6TPxi , & - TwHt6TPyi , TwHt6TPzi , TwHt7ALxt , TwHt7ALyt , TwHt7ALzt , TwHt7FLxt , TwHt7FLyt , TwHt7FLzt , & - TwHt7MLxt , TwHt7MLyt , TwHt7MLzt , TwHt7RDxt , TwHt7RDyt , TwHt7RDzt , TwHt7RPxi , TwHt7RPyi , & - TwHt7RPzi , TwHt7TDxt , TwHt7TDyt , TwHt7TDzt , TwHt7TPxi , TwHt7TPyi , TwHt7TPzi , TwHt8ALxt , & - TwHt8ALyt , TwHt8ALzt , TwHt8FLxt , TwHt8FLyt , TwHt8FLzt , TwHt8MLxt , TwHt8MLyt , TwHt8MLzt , & - TwHt8RDxt , TwHt8RDyt , TwHt8RDzt , TwHt8RPxi , TwHt8RPyi , TwHt8RPzi , TwHt8TDxt , TwHt8TDyt , & - TwHt8TDzt , TwHt8TPxi , TwHt8TPyi , TwHt8TPzi , TwHt9ALxt , TwHt9ALyt , TwHt9ALzt , TwHt9FLxt , & - TwHt9FLyt , TwHt9FLzt , TwHt9MLxt , TwHt9MLyt , TwHt9MLzt , TwHt9RDxt , TwHt9RDyt , TwHt9RDzt , & - TwHt9RPxi , TwHt9RPyi , TwHt9RPzi , TwHt9TDxt , TwHt9TDyt , TwHt9TDzt , TwHt9TPxi , TwHt9TPyi , & - TwHt9TPzi , TwrBsFxt , TwrBsFyt , TwrBsFzt , TwrBsMxt , TwrBsMyt , TwrBsMzt , TipClrnc1 , & - TipClrnc2 , TipClrnc3 , TwrTpTDxi , TwrTpTDyi , TwrTpTDzi , TipRDzc1 , TipRDzc2 , TipRDzc3 , & - YawAzn , YawAzn , YawAzn , YawBrFxn , YawBrFxp , YawBrFyn , YawBrFyp , YawBrFzn , & - YawBrFzn , YawBrMxn , YawBrMxp , YawBrMyn , YawBrMyp , YawBrMzn , YawBrMzn , YawBrRAxp , & - YawBrRAyp , YawBrRAzp , YawBrRDxt , YawBrRDyt , YawBrRDzt , YawBrRVxp , YawBrRVyp , YawBrRVzp , & - YawBrTAxp , YawBrTAyp , YawBrTAzp , TwrTpTDxi , YawBrTDxp , YawBrTDxt , TwrTpTDyi , YawBrTDyp , & - YawBrTDyt , TwrTpTDzi , YawBrTDzp , YawBrTDzt , YawBrTVxp , YawBrTVyp , YawBrTVzp , YawPzn , & - YawPzn , YawPzn , YawVzn , YawVzn , YawVzn /) - CHARACTER(ChanLen), PARAMETER :: ParamUnitsAry(981) = (/ & ! This lists the units corresponding to the allowed parameters - "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg/s^2)", & - "(rpm) ","(kN-m) ","(deg/s^2)","(kW) ","(kN-m) ","(rpm) ","(m) ","(m) ", & - "(m) ","(deg/s^2)","(deg/s^2)","(deg/s^2)","(kN) ","(kN) ","(kN) ","(kN) ", & - "(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(deg) ","(deg) ","(deg) ","(rpm) ","(rpm) ","(rpm) ","(kN) ","(kN) ", & - "(kN) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kW) ","(kN-m) ", & - "(deg/s^2)","(deg/s^2)","(deg/s^2)","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ", & - "(deg) ","(deg) ","(rpm) ","(rpm) ","(rpm) ","(deg) ","(deg/s^2)","(deg) ", & - "(deg/s) ","(deg/s^2)","(deg/s^2)","(deg/s^2)","(deg/s) ","(deg/s) ","(deg/s) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(m/s) ","(m/s) ","(m/s) ","(m) ","(m) ","(m) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(m) ","(deg) ","(deg/s^2)","(deg/s^2)","(deg/s^2)","(deg/s^2)","(deg/s^2)", & - "(deg/s^2)","(deg) ","(deg) ","(deg) ","(deg) ","(deg/s) ","(deg/s) ","(deg/s) ", & - "(deg/s) ","(deg/s) ","(deg/s) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(deg) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(rad/s^2)","(rad/s^2)","(m/s^2) ","(rad/s^2)","(rad/s^2)","(rad/s^2)","(m/s^2) ", & - "(m/s^2) ","(rad/s^2)","(m/s^2) ","(m/s^2) ","(rad/s^2)","(m/s^2) ","(m/s^2) ","(rad/s^2)", & - "(rad/s^2)","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ", & - "(m/s) ","(m/s) ","(rad/s) ","(rad/s) ","(m/s) ","(rad/s) ","(rad/s) ","(rad/s) ", & - "(m/s) ","(m/s) ","(rad/s) ","(m/s) ","(m/s) ","(rad/s) ","(m/s) ","(m/s) ", & - "(rad/s) ","(rad/s) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(m) ","(rad) ","(rad) ","(m) ","(rad) ","(rad) ", & - "(rad) ","(m) ","(m) ","(rad) ","(m) ","(m) ","(rad) ","(m) ", & - "(m) ","(rad) ","(rad) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(kN) ", & - "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & - "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & - "(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg/s^2)", & - "(deg) ","(deg/s^2)","(deg) ","(deg/s) ","(kW) ","(rpm) ","(deg/s^2)","(deg) ", & - "(deg/s) ","(kN) ","(kN-m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN) ", & - "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & - "(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ", & - "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & - "(kN) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & - "(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ", & - "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & - "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & - "(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ", & - "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN) ", & - "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(deg) ","(deg/s^2)","(deg) ","(deg/s) ","(deg/s^2)","(deg) ","(deg) ","(deg/s) ", & - "(kN-m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ", & - "(deg) ","(deg) ","(m) ","(deg) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ", & - "(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN-m) ", & - "(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & - "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ", & - "(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ", & - "(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ", & - "(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & - "(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ", & - "(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m/s^2) ", & - "(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ", & - "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ", & - "(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ", & - "(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m) ","(deg) ","(deg) ","(deg) ", & - "(deg/s^2)","(deg/s^2)","(deg/s^2)","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & - "(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg/s^2)", & - "(deg/s^2)","(deg/s^2)","(deg) ","(deg) ","(deg) ","(deg/s) ","(deg/s) ","(deg/s) ", & - "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m) ","(m) ","(m) ","(m) ","(m) ", & - "(m) ","(m) ","(m) ","(m) ","(m/s) ","(m/s) ","(m/s) ","(deg) ", & - "(deg) ","(deg) ","(deg/s) ","(deg/s) ","(deg/s) "/) + CHARACTER(OutStrLenM1), PARAMETER :: ValidParamAry(1110) = (/ & ! This lists the names of the allowed parameters, which must be sorted alphabetically + "AZIMUTH ","BLDPITCH1 ","BLDPITCH2 ","BLDPITCH3 ","BLPITCH1 ","BLPITCH2 ","BLPITCH3 ", & + "GENACCEL ","GENSPEED ","HSSBRTQ ","HSSHFTA ","HSSHFTPWR ","HSSHFTTQ ","HSSHFTV ", & + "IPDEFL1 ","IPDEFL2 ","IPDEFL3 ","LSSGAGA ","LSSGAGAXA ","LSSGAGAXS ","LSSGAGFXA ", & + "LSSGAGFXS ","LSSGAGFYA ","LSSGAGFYS ","LSSGAGFZA ","LSSGAGFZS ","LSSGAGMXA ","LSSGAGMXS ", & + "LSSGAGMYA ","LSSGAGMYS ","LSSGAGMZA ","LSSGAGMZS ","LSSGAGP ","LSSGAGPXA ","LSSGAGPXS ", & + "LSSGAGV ","LSSGAGVXA ","LSSGAGVXS ","LSSHFTFXA ","LSSHFTFXS ","LSSHFTFYA ","LSSHFTFYS ", & + "LSSHFTFZA ","LSSHFTFZS ","LSSHFTMXA ","LSSHFTMXS ","LSSHFTPWR ","LSSHFTTQ ","LSSTIPA ", & + "LSSTIPAXA ","LSSTIPAXS ","LSSTIPMYA ","LSSTIPMYS ","LSSTIPMZA ","LSSTIPMZS ","LSSTIPP ", & + "LSSTIPPXA ","LSSTIPPXS ","LSSTIPV ","LSSTIPVXA ","LSSTIPVXS ","NACYAW ","NACYAWA ", & + "NACYAWP ","NACYAWV ","NCIMURAXS ","NCIMURAYS ","NCIMURAZS ","NCIMURVXS ","NCIMURVYS ", & + "NCIMURVZS ","NCIMUTAGXS","NCIMUTAGYS","NCIMUTAGZS","NCIMUTAXS ","NCIMUTAYS ","NCIMUTAZS ", & + "NCIMUTVXS ","NCIMUTVYS ","NCIMUTVZS ","OOPDEFL1 ","OOPDEFL2 ","OOPDEFL3 ","PTCHDEFL1 ", & + "PTCHDEFL2 ","PTCHDEFL3 ","PTCHPMZB1 ","PTCHPMZB2 ","PTCHPMZB3 ","PTCHPMZC1 ","PTCHPMZC2 ", & + "PTCHPMZC3 ","PTFMHEAVE ","PTFMPITCH ","PTFMRAXI ","PTFMRAXT ","PTFMRAYI ","PTFMRAYT ", & + "PTFMRAZI ","PTFMRAZT ","PTFMRDXI ","PTFMRDYI ","PTFMRDZI ","PTFMROLL ","PTFMRVXI ", & + "PTFMRVXT ","PTFMRVYI ","PTFMRVYT ","PTFMRVZI ","PTFMRVZT ","PTFMSURGE ","PTFMSWAY ", & + "PTFMTAGXI ","PTFMTAGXT ","PTFMTAGYI ","PTFMTAGYT ","PTFMTAGZI ","PTFMTAGZT ","PTFMTAXI ", & + "PTFMTAXT ","PTFMTAYI ","PTFMTAYT ","PTFMTAZI ","PTFMTAZT ","PTFMTDXI ","PTFMTDXT ", & + "PTFMTDYI ","PTFMTDYT ","PTFMTDZI ","PTFMTDZT ","PTFMTVXI ","PTFMTVXT ","PTFMTVYI ", & + "PTFMTVYT ","PTFMTVZI ","PTFMTVZT ","PTFMYAW ","QD2_B1E1 ","QD2_B1F1 ","QD2_B1F2 ", & + "QD2_B2E1 ","QD2_B2F1 ","QD2_B2F2 ","QD2_B3E1 ","QD2_B3F1 ","QD2_B3F2 ","QD2_DRTR ", & + "QD2_GEAZ ","QD2_HV ","QD2_P ","QD2_R ","QD2_RFRL ","QD2_SG ","QD2_SW ", & + "QD2_TEET ","QD2_TFA1 ","QD2_TFA2 ","QD2_TFRL ","QD2_TSS1 ","QD2_TSS2 ","QD2_Y ", & + "QD2_YAW ","QD_B1E1 ","QD_B1F1 ","QD_B1F2 ","QD_B2E1 ","QD_B2F1 ","QD_B2F2 ", & + "QD_B3E1 ","QD_B3F1 ","QD_B3F2 ","QD_DRTR ","QD_GEAZ ","QD_HV ","QD_P ", & + "QD_R ","QD_RFRL ","QD_SG ","QD_SW ","QD_TEET ","QD_TFA1 ","QD_TFA2 ", & + "QD_TFRL ","QD_TSS1 ","QD_TSS2 ","QD_Y ","QD_YAW ","Q_B1E1 ","Q_B1F1 ", & + "Q_B1F2 ","Q_B2E1 ","Q_B2F1 ","Q_B2F2 ","Q_B3E1 ","Q_B3F1 ","Q_B3F2 ", & + "Q_DRTR ","Q_GEAZ ","Q_HV ","Q_P ","Q_R ","Q_RFRL ","Q_SG ", & + "Q_SW ","Q_TEET ","Q_TFA1 ","Q_TFA2 ","Q_TFRL ","Q_TSS1 ","Q_TSS2 ", & + "Q_Y ","Q_YAW ","RFRLBRM ","ROLLDEFL1 ","ROLLDEFL2 ","ROLLDEFL3 ","ROOTFXB1 ", & + "ROOTFXB2 ","ROOTFXB3 ","ROOTFXC1 ","ROOTFXC2 ","ROOTFXC3 ","ROOTFYB1 ","ROOTFYB2 ", & + "ROOTFYB3 ","ROOTFYC1 ","ROOTFYC2 ","ROOTFYC3 ","ROOTFZB1 ","ROOTFZB2 ","ROOTFZB3 ", & + "ROOTFZC1 ","ROOTFZC2 ","ROOTFZC3 ","ROOTMEDG1 ","ROOTMEDG2 ","ROOTMEDG3 ","ROOTMFLP1 ", & + "ROOTMFLP2 ","ROOTMFLP3 ","ROOTMIP1 ","ROOTMIP2 ","ROOTMIP3 ","ROOTMOOP1 ","ROOTMOOP2 ", & + "ROOTMOOP3 ","ROOTMXB1 ","ROOTMXB2 ","ROOTMXB3 ","ROOTMXC1 ","ROOTMXC2 ","ROOTMXC3 ", & + "ROOTMYB1 ","ROOTMYB2 ","ROOTMYB3 ","ROOTMYC1 ","ROOTMYC2 ","ROOTMYC3 ","ROOTMZB1 ", & + "ROOTMZB2 ","ROOTMZB3 ","ROOTMZC1 ","ROOTMZC2 ","ROOTMZC3 ","ROTACCEL ","ROTFURL ", & + "ROTFURLA ","ROTFURLP ","ROTFURLV ","ROTPWR ","ROTSPEED ","ROTTEETA ","ROTTEETP ", & + "ROTTEETV ","ROTTHRUST ","ROTTORQ ","SPN1ALGXB1","SPN1ALGXB2","SPN1ALGXB3","SPN1ALGYB1", & + "SPN1ALGYB2","SPN1ALGYB3","SPN1ALGZB1","SPN1ALGZB2","SPN1ALGZB3","SPN1ALXB1 ","SPN1ALXB2 ", & + "SPN1ALXB3 ","SPN1ALYB1 ","SPN1ALYB2 ","SPN1ALYB3 ","SPN1ALZB1 ","SPN1ALZB2 ","SPN1ALZB3 ", & + "SPN1FLXB1 ","SPN1FLXB2 ","SPN1FLXB3 ","SPN1FLYB1 ","SPN1FLYB2 ","SPN1FLYB3 ","SPN1FLZB1 ", & + "SPN1FLZB2 ","SPN1FLZB3 ","SPN1MLXB1 ","SPN1MLXB2 ","SPN1MLXB3 ","SPN1MLYB1 ","SPN1MLYB2 ", & + "SPN1MLYB3 ","SPN1MLZB1 ","SPN1MLZB2 ","SPN1MLZB3 ","SPN1RDXB1 ","SPN1RDXB2 ","SPN1RDXB3 ", & + "SPN1RDYB1 ","SPN1RDYB2 ","SPN1RDYB3 ","SPN1RDZB1 ","SPN1RDZB2 ","SPN1RDZB3 ","SPN1TDXB1 ", & + "SPN1TDXB2 ","SPN1TDXB3 ","SPN1TDYB1 ","SPN1TDYB2 ","SPN1TDYB3 ","SPN1TDZB1 ","SPN1TDZB2 ", & + "SPN1TDZB3 ","SPN2ALGXB1","SPN2ALGXB2","SPN2ALGXB3","SPN2ALGYB1","SPN2ALGYB2","SPN2ALGYB3", & + "SPN2ALGZB1","SPN2ALGZB2","SPN2ALGZB3","SPN2ALXB1 ","SPN2ALXB2 ","SPN2ALXB3 ","SPN2ALYB1 ", & + "SPN2ALYB2 ","SPN2ALYB3 ","SPN2ALZB1 ","SPN2ALZB2 ","SPN2ALZB3 ","SPN2FLXB1 ","SPN2FLXB2 ", & + "SPN2FLXB3 ","SPN2FLYB1 ","SPN2FLYB2 ","SPN2FLYB3 ","SPN2FLZB1 ","SPN2FLZB2 ","SPN2FLZB3 ", & + "SPN2MLXB1 ","SPN2MLXB2 ","SPN2MLXB3 ","SPN2MLYB1 ","SPN2MLYB2 ","SPN2MLYB3 ","SPN2MLZB1 ", & + "SPN2MLZB2 ","SPN2MLZB3 ","SPN2RDXB1 ","SPN2RDXB2 ","SPN2RDXB3 ","SPN2RDYB1 ","SPN2RDYB2 ", & + "SPN2RDYB3 ","SPN2RDZB1 ","SPN2RDZB2 ","SPN2RDZB3 ","SPN2TDXB1 ","SPN2TDXB2 ","SPN2TDXB3 ", & + "SPN2TDYB1 ","SPN2TDYB2 ","SPN2TDYB3 ","SPN2TDZB1 ","SPN2TDZB2 ","SPN2TDZB3 ","SPN3ALGXB1", & + "SPN3ALGXB2","SPN3ALGXB3","SPN3ALGYB1","SPN3ALGYB2","SPN3ALGYB3","SPN3ALGZB1","SPN3ALGZB2", & + "SPN3ALGZB3","SPN3ALXB1 ","SPN3ALXB2 ","SPN3ALXB3 ","SPN3ALYB1 ","SPN3ALYB2 ","SPN3ALYB3 ", & + "SPN3ALZB1 ","SPN3ALZB2 ","SPN3ALZB3 ","SPN3FLXB1 ","SPN3FLXB2 ","SPN3FLXB3 ","SPN3FLYB1 ", & + "SPN3FLYB2 ","SPN3FLYB3 ","SPN3FLZB1 ","SPN3FLZB2 ","SPN3FLZB3 ","SPN3MLXB1 ","SPN3MLXB2 ", & + "SPN3MLXB3 ","SPN3MLYB1 ","SPN3MLYB2 ","SPN3MLYB3 ","SPN3MLZB1 ","SPN3MLZB2 ","SPN3MLZB3 ", & + "SPN3RDXB1 ","SPN3RDXB2 ","SPN3RDXB3 ","SPN3RDYB1 ","SPN3RDYB2 ","SPN3RDYB3 ","SPN3RDZB1 ", & + "SPN3RDZB2 ","SPN3RDZB3 ","SPN3TDXB1 ","SPN3TDXB2 ","SPN3TDXB3 ","SPN3TDYB1 ","SPN3TDYB2 ", & + "SPN3TDYB3 ","SPN3TDZB1 ","SPN3TDZB2 ","SPN3TDZB3 ","SPN4ALGXB1","SPN4ALGXB2","SPN4ALGXB3", & + "SPN4ALGYB1","SPN4ALGYB2","SPN4ALGYB3","SPN4ALGZB1","SPN4ALGZB2","SPN4ALGZB3","SPN4ALXB1 ", & + "SPN4ALXB2 ","SPN4ALXB3 ","SPN4ALYB1 ","SPN4ALYB2 ","SPN4ALYB3 ","SPN4ALZB1 ","SPN4ALZB2 ", & + "SPN4ALZB3 ","SPN4FLXB1 ","SPN4FLXB2 ","SPN4FLXB3 ","SPN4FLYB1 ","SPN4FLYB2 ","SPN4FLYB3 ", & + "SPN4FLZB1 ","SPN4FLZB2 ","SPN4FLZB3 ","SPN4MLXB1 ","SPN4MLXB2 ","SPN4MLXB3 ","SPN4MLYB1 ", & + "SPN4MLYB2 ","SPN4MLYB3 ","SPN4MLZB1 ","SPN4MLZB2 ","SPN4MLZB3 ","SPN4RDXB1 ","SPN4RDXB2 ", & + "SPN4RDXB3 ","SPN4RDYB1 ","SPN4RDYB2 ","SPN4RDYB3 ","SPN4RDZB1 ","SPN4RDZB2 ","SPN4RDZB3 ", & + "SPN4TDXB1 ","SPN4TDXB2 ","SPN4TDXB3 ","SPN4TDYB1 ","SPN4TDYB2 ","SPN4TDYB3 ","SPN4TDZB1 ", & + "SPN4TDZB2 ","SPN4TDZB3 ","SPN5ALGXB1","SPN5ALGXB2","SPN5ALGXB3","SPN5ALGYB1","SPN5ALGYB2", & + "SPN5ALGYB3","SPN5ALGZB1","SPN5ALGZB2","SPN5ALGZB3","SPN5ALXB1 ","SPN5ALXB2 ","SPN5ALXB3 ", & + "SPN5ALYB1 ","SPN5ALYB2 ","SPN5ALYB3 ","SPN5ALZB1 ","SPN5ALZB2 ","SPN5ALZB3 ","SPN5FLXB1 ", & + "SPN5FLXB2 ","SPN5FLXB3 ","SPN5FLYB1 ","SPN5FLYB2 ","SPN5FLYB3 ","SPN5FLZB1 ","SPN5FLZB2 ", & + "SPN5FLZB3 ","SPN5MLXB1 ","SPN5MLXB2 ","SPN5MLXB3 ","SPN5MLYB1 ","SPN5MLYB2 ","SPN5MLYB3 ", & + "SPN5MLZB1 ","SPN5MLZB2 ","SPN5MLZB3 ","SPN5RDXB1 ","SPN5RDXB2 ","SPN5RDXB3 ","SPN5RDYB1 ", & + "SPN5RDYB2 ","SPN5RDYB3 ","SPN5RDZB1 ","SPN5RDZB2 ","SPN5RDZB3 ","SPN5TDXB1 ","SPN5TDXB2 ", & + "SPN5TDXB3 ","SPN5TDYB1 ","SPN5TDYB2 ","SPN5TDYB3 ","SPN5TDZB1 ","SPN5TDZB2 ","SPN5TDZB3 ", & + "SPN6ALGXB1","SPN6ALGXB2","SPN6ALGXB3","SPN6ALGYB1","SPN6ALGYB2","SPN6ALGYB3","SPN6ALGZB1", & + "SPN6ALGZB2","SPN6ALGZB3","SPN6ALXB1 ","SPN6ALXB2 ","SPN6ALXB3 ","SPN6ALYB1 ","SPN6ALYB2 ", & + "SPN6ALYB3 ","SPN6ALZB1 ","SPN6ALZB2 ","SPN6ALZB3 ","SPN6FLXB1 ","SPN6FLXB2 ","SPN6FLXB3 ", & + "SPN6FLYB1 ","SPN6FLYB2 ","SPN6FLYB3 ","SPN6FLZB1 ","SPN6FLZB2 ","SPN6FLZB3 ","SPN6MLXB1 ", & + "SPN6MLXB2 ","SPN6MLXB3 ","SPN6MLYB1 ","SPN6MLYB2 ","SPN6MLYB3 ","SPN6MLZB1 ","SPN6MLZB2 ", & + "SPN6MLZB3 ","SPN6RDXB1 ","SPN6RDXB2 ","SPN6RDXB3 ","SPN6RDYB1 ","SPN6RDYB2 ","SPN6RDYB3 ", & + "SPN6RDZB1 ","SPN6RDZB2 ","SPN6RDZB3 ","SPN6TDXB1 ","SPN6TDXB2 ","SPN6TDXB3 ","SPN6TDYB1 ", & + "SPN6TDYB2 ","SPN6TDYB3 ","SPN6TDZB1 ","SPN6TDZB2 ","SPN6TDZB3 ","SPN7ALGXB1","SPN7ALGXB2", & + "SPN7ALGXB3","SPN7ALGYB1","SPN7ALGYB2","SPN7ALGYB3","SPN7ALGZB1","SPN7ALGZB2","SPN7ALGZB3", & + "SPN7ALXB1 ","SPN7ALXB2 ","SPN7ALXB3 ","SPN7ALYB1 ","SPN7ALYB2 ","SPN7ALYB3 ","SPN7ALZB1 ", & + "SPN7ALZB2 ","SPN7ALZB3 ","SPN7FLXB1 ","SPN7FLXB2 ","SPN7FLXB3 ","SPN7FLYB1 ","SPN7FLYB2 ", & + "SPN7FLYB3 ","SPN7FLZB1 ","SPN7FLZB2 ","SPN7FLZB3 ","SPN7MLXB1 ","SPN7MLXB2 ","SPN7MLXB3 ", & + "SPN7MLYB1 ","SPN7MLYB2 ","SPN7MLYB3 ","SPN7MLZB1 ","SPN7MLZB2 ","SPN7MLZB3 ","SPN7RDXB1 ", & + "SPN7RDXB2 ","SPN7RDXB3 ","SPN7RDYB1 ","SPN7RDYB2 ","SPN7RDYB3 ","SPN7RDZB1 ","SPN7RDZB2 ", & + "SPN7RDZB3 ","SPN7TDXB1 ","SPN7TDXB2 ","SPN7TDXB3 ","SPN7TDYB1 ","SPN7TDYB2 ","SPN7TDYB3 ", & + "SPN7TDZB1 ","SPN7TDZB2 ","SPN7TDZB3 ","SPN8ALGXB1","SPN8ALGXB2","SPN8ALGXB3","SPN8ALGYB1", & + "SPN8ALGYB2","SPN8ALGYB3","SPN8ALGZB1","SPN8ALGZB2","SPN8ALGZB3","SPN8ALXB1 ","SPN8ALXB2 ", & + "SPN8ALXB3 ","SPN8ALYB1 ","SPN8ALYB2 ","SPN8ALYB3 ","SPN8ALZB1 ","SPN8ALZB2 ","SPN8ALZB3 ", & + "SPN8FLXB1 ","SPN8FLXB2 ","SPN8FLXB3 ","SPN8FLYB1 ","SPN8FLYB2 ","SPN8FLYB3 ","SPN8FLZB1 ", & + "SPN8FLZB2 ","SPN8FLZB3 ","SPN8MLXB1 ","SPN8MLXB2 ","SPN8MLXB3 ","SPN8MLYB1 ","SPN8MLYB2 ", & + "SPN8MLYB3 ","SPN8MLZB1 ","SPN8MLZB2 ","SPN8MLZB3 ","SPN8RDXB1 ","SPN8RDXB2 ","SPN8RDXB3 ", & + "SPN8RDYB1 ","SPN8RDYB2 ","SPN8RDYB3 ","SPN8RDZB1 ","SPN8RDZB2 ","SPN8RDZB3 ","SPN8TDXB1 ", & + "SPN8TDXB2 ","SPN8TDXB3 ","SPN8TDYB1 ","SPN8TDYB2 ","SPN8TDYB3 ","SPN8TDZB1 ","SPN8TDZB2 ", & + "SPN8TDZB3 ","SPN9ALGXB1","SPN9ALGXB2","SPN9ALGXB3","SPN9ALGYB1","SPN9ALGYB2","SPN9ALGYB3", & + "SPN9ALGZB1","SPN9ALGZB2","SPN9ALGZB3","SPN9ALXB1 ","SPN9ALXB2 ","SPN9ALXB3 ","SPN9ALYB1 ", & + "SPN9ALYB2 ","SPN9ALYB3 ","SPN9ALZB1 ","SPN9ALZB2 ","SPN9ALZB3 ","SPN9FLXB1 ","SPN9FLXB2 ", & + "SPN9FLXB3 ","SPN9FLYB1 ","SPN9FLYB2 ","SPN9FLYB3 ","SPN9FLZB1 ","SPN9FLZB2 ","SPN9FLZB3 ", & + "SPN9MLXB1 ","SPN9MLXB2 ","SPN9MLXB3 ","SPN9MLYB1 ","SPN9MLYB2 ","SPN9MLYB3 ","SPN9MLZB1 ", & + "SPN9MLZB2 ","SPN9MLZB3 ","SPN9RDXB1 ","SPN9RDXB2 ","SPN9RDXB3 ","SPN9RDYB1 ","SPN9RDYB2 ", & + "SPN9RDYB3 ","SPN9RDZB1 ","SPN9RDZB2 ","SPN9RDZB3 ","SPN9TDXB1 ","SPN9TDXB2 ","SPN9TDXB3 ", & + "SPN9TDYB1 ","SPN9TDYB2 ","SPN9TDYB3 ","SPN9TDZB1 ","SPN9TDZB2 ","SPN9TDZB3 ","TAILFURL ", & + "TAILFURLA ","TAILFURLP ","TAILFURLV ","TEETAYA ","TEETDEFL ","TEETPYA ","TEETVYA ", & + "TFRLBRM ","TIP2TWR1 ","TIP2TWR2 ","TIP2TWR3 ","TIPALGXB1 ","TIPALGXB2 ","TIPALGXB3 ", & + "TIPALGYB1 ","TIPALGYB2 ","TIPALGYB3 ","TIPALGZB1 ","TIPALGZB2 ","TIPALGZB3 ","TIPALXB1 ", & + "TIPALXB2 ","TIPALXB3 ","TIPALYB1 ","TIPALYB2 ","TIPALYB3 ","TIPALZB1 ","TIPALZB2 ", & + "TIPALZB3 ","TIPCLRNC1 ","TIPCLRNC2 ","TIPCLRNC3 ","TIPDXB1 ","TIPDXB2 ","TIPDXB3 ", & + "TIPDXC1 ","TIPDXC2 ","TIPDXC3 ","TIPDYB1 ","TIPDYB2 ","TIPDYB3 ","TIPDYC1 ", & + "TIPDYC2 ","TIPDYC3 ","TIPDZB1 ","TIPDZB2 ","TIPDZB3 ","TIPDZC1 ","TIPDZC2 ", & + "TIPDZC3 ","TIPRDXB1 ","TIPRDXB2 ","TIPRDXB3 ","TIPRDYB1 ","TIPRDYB2 ","TIPRDYB3 ", & + "TIPRDZB1 ","TIPRDZB2 ","TIPRDZB3 ","TIPRDZC1 ","TIPRDZC2 ","TIPRDZC3 ","TTDSPAX ", & + "TTDSPFA ","TTDSPPTCH ","TTDSPROLL ","TTDSPSS ","TTDSPTWST ","TWHT1ALGXT","TWHT1ALGYT", & + "TWHT1ALGZT","TWHT1ALXT ","TWHT1ALYT ","TWHT1ALZT ","TWHT1FLXT ","TWHT1FLYT ","TWHT1FLZT ", & + "TWHT1MLXT ","TWHT1MLYT ","TWHT1MLZT ","TWHT1RDXT ","TWHT1RDYT ","TWHT1RDZT ","TWHT1RPXI ", & + "TWHT1RPYI ","TWHT1RPZI ","TWHT1TDXT ","TWHT1TDYT ","TWHT1TDZT ","TWHT1TPXI ","TWHT1TPYI ", & + "TWHT1TPZI ","TWHT2ALGXT","TWHT2ALGYT","TWHT2ALGZT","TWHT2ALXT ","TWHT2ALYT ","TWHT2ALZT ", & + "TWHT2FLXT ","TWHT2FLYT ","TWHT2FLZT ","TWHT2MLXT ","TWHT2MLYT ","TWHT2MLZT ","TWHT2RDXT ", & + "TWHT2RDYT ","TWHT2RDZT ","TWHT2RPXI ","TWHT2RPYI ","TWHT2RPZI ","TWHT2TDXT ","TWHT2TDYT ", & + "TWHT2TDZT ","TWHT2TPXI ","TWHT2TPYI ","TWHT2TPZI ","TWHT3ALGXT","TWHT3ALGYT","TWHT3ALGZT", & + "TWHT3ALXT ","TWHT3ALYT ","TWHT3ALZT ","TWHT3FLXT ","TWHT3FLYT ","TWHT3FLZT ","TWHT3MLXT ", & + "TWHT3MLYT ","TWHT3MLZT ","TWHT3RDXT ","TWHT3RDYT ","TWHT3RDZT ","TWHT3RPXI ","TWHT3RPYI ", & + "TWHT3RPZI ","TWHT3TDXT ","TWHT3TDYT ","TWHT3TDZT ","TWHT3TPXI ","TWHT3TPYI ","TWHT3TPZI ", & + "TWHT4ALGXT","TWHT4ALGYT","TWHT4ALGZT","TWHT4ALXT ","TWHT4ALYT ","TWHT4ALZT ","TWHT4FLXT ", & + "TWHT4FLYT ","TWHT4FLZT ","TWHT4MLXT ","TWHT4MLYT ","TWHT4MLZT ","TWHT4RDXT ","TWHT4RDYT ", & + "TWHT4RDZT ","TWHT4RPXI ","TWHT4RPYI ","TWHT4RPZI ","TWHT4TDXT ","TWHT4TDYT ","TWHT4TDZT ", & + "TWHT4TPXI ","TWHT4TPYI ","TWHT4TPZI ","TWHT5ALGXT","TWHT5ALGYT","TWHT5ALGZT","TWHT5ALXT ", & + "TWHT5ALYT ","TWHT5ALZT ","TWHT5FLXT ","TWHT5FLYT ","TWHT5FLZT ","TWHT5MLXT ","TWHT5MLYT ", & + "TWHT5MLZT ","TWHT5RDXT ","TWHT5RDYT ","TWHT5RDZT ","TWHT5RPXI ","TWHT5RPYI ","TWHT5RPZI ", & + "TWHT5TDXT ","TWHT5TDYT ","TWHT5TDZT ","TWHT5TPXI ","TWHT5TPYI ","TWHT5TPZI ","TWHT6ALGXT", & + "TWHT6ALGYT","TWHT6ALGZT","TWHT6ALXT ","TWHT6ALYT ","TWHT6ALZT ","TWHT6FLXT ","TWHT6FLYT ", & + "TWHT6FLZT ","TWHT6MLXT ","TWHT6MLYT ","TWHT6MLZT ","TWHT6RDXT ","TWHT6RDYT ","TWHT6RDZT ", & + "TWHT6RPXI ","TWHT6RPYI ","TWHT6RPZI ","TWHT6TDXT ","TWHT6TDYT ","TWHT6TDZT ","TWHT6TPXI ", & + "TWHT6TPYI ","TWHT6TPZI ","TWHT7ALGXT","TWHT7ALGYT","TWHT7ALGZT","TWHT7ALXT ","TWHT7ALYT ", & + "TWHT7ALZT ","TWHT7FLXT ","TWHT7FLYT ","TWHT7FLZT ","TWHT7MLXT ","TWHT7MLYT ","TWHT7MLZT ", & + "TWHT7RDXT ","TWHT7RDYT ","TWHT7RDZT ","TWHT7RPXI ","TWHT7RPYI ","TWHT7RPZI ","TWHT7TDXT ", & + "TWHT7TDYT ","TWHT7TDZT ","TWHT7TPXI ","TWHT7TPYI ","TWHT7TPZI ","TWHT8ALGXT","TWHT8ALGYT", & + "TWHT8ALGZT","TWHT8ALXT ","TWHT8ALYT ","TWHT8ALZT ","TWHT8FLXT ","TWHT8FLYT ","TWHT8FLZT ", & + "TWHT8MLXT ","TWHT8MLYT ","TWHT8MLZT ","TWHT8RDXT ","TWHT8RDYT ","TWHT8RDZT ","TWHT8RPXI ", & + "TWHT8RPYI ","TWHT8RPZI ","TWHT8TDXT ","TWHT8TDYT ","TWHT8TDZT ","TWHT8TPXI ","TWHT8TPYI ", & + "TWHT8TPZI ","TWHT9ALGXT","TWHT9ALGYT","TWHT9ALGZT","TWHT9ALXT ","TWHT9ALYT ","TWHT9ALZT ", & + "TWHT9FLXT ","TWHT9FLYT ","TWHT9FLZT ","TWHT9MLXT ","TWHT9MLYT ","TWHT9MLZT ","TWHT9RDXT ", & + "TWHT9RDYT ","TWHT9RDZT ","TWHT9RPXI ","TWHT9RPYI ","TWHT9RPZI ","TWHT9TDXT ","TWHT9TDYT ", & + "TWHT9TDZT ","TWHT9TPXI ","TWHT9TPYI ","TWHT9TPZI ","TWRBSFXT ","TWRBSFYT ","TWRBSFZT ", & + "TWRBSMXT ","TWRBSMYT ","TWRBSMZT ","TWRCLRNC1 ","TWRCLRNC2 ","TWRCLRNC3 ","TWRTPTDXI ", & + "TWRTPTDYI ","TWRTPTDZI ","TWSTDEFL1 ","TWSTDEFL2 ","TWSTDEFL3 ","YAWACCEL ","YAWAZN ", & + "YAWAZP ","YAWBRFXN ","YAWBRFXP ","YAWBRFYN ","YAWBRFYP ","YAWBRFZN ","YAWBRFZP ", & + "YAWBRMXN ","YAWBRMXP ","YAWBRMYN ","YAWBRMYP ","YAWBRMZN ","YAWBRMZP ","YAWBRRAXP ", & + "YAWBRRAYP ","YAWBRRAZP ","YAWBRRDXT ","YAWBRRDYT ","YAWBRRDZT ","YAWBRRVXP ","YAWBRRVYP ", & + "YAWBRRVZP ","YAWBRTAGXP","YAWBRTAGYP","YAWBRTAGZP","YAWBRTAXP ","YAWBRTAYP ","YAWBRTAZP ", & + "YAWBRTDXI ","YAWBRTDXP ","YAWBRTDXT ","YAWBRTDYI ","YAWBRTDYP ","YAWBRTDYT ","YAWBRTDZI ", & + "YAWBRTDZP ","YAWBRTDZT ","YAWBRTVXP ","YAWBRTVYP ","YAWBRTVZP ","YAWPOS ","YAWPZN ", & + "YAWPZP ","YAWRATE ","YAWVZN ","YAWVZP "/) + INTEGER(IntKi), PARAMETER :: ParamIndxAry(1110) = (/ & ! This lists the index into AllOuts(:) of the allowed parameters ValidParamAry(:) + LSSTipPxa , PtchPMzc1 , PtchPMzc2 , PtchPMzc3 , PtchPMzc1 , PtchPMzc2 , PtchPMzc3 , & + HSShftA , HSShftV , HSSBrTq , HSShftA , HSShftPwr , HSShftTq , HSShftV , & + TipDyc1 , TipDyc2 , TipDyc3 , LSSGagAxa , LSSGagAxa , LSSGagAxa , LSShftFxa , & + LSShftFxa , LSShftFya , LSShftFys , LSShftFza , LSShftFzs , LSShftMxa , LSShftMxa , & + LSSGagMya , LSSGagMys , LSSGagMza , LSSGagMzs , LSSGagPxa , LSSGagPxa , LSSGagPxa , & + LSSGagVxa , LSSGagVxa , LSSGagVxa , LSShftFxa , LSShftFxa , LSShftFya , LSShftFys , & + LSShftFza , LSShftFzs , LSShftMxa , LSShftMxa , RotPwr , LSShftMxa , LSSTipAxa , & + LSSTipAxa , LSSTipAxa , LSSTipMya , LSSTipMys , LSSTipMza , LSSTipMzs , LSSTipPxa , & + LSSTipPxa , LSSTipPxa , LSSTipVxa , LSSTipVxa , LSSTipVxa , YawPzn , YawAzn , & + YawPzn , YawVzn , NcIMURAxs , NcIMURAys , NcIMURAzs , NcIMURVxs , NcIMURVys , & + NcIMURVzs , NcIMUTAgxs , NcIMUTAgys , NcIMUTAgzs , NcIMUTAxs , NcIMUTAys , NcIMUTAzs , & + NcIMUTVxs , NcIMUTVys , NcIMUTVzs , TipDxc1 , TipDxc2 , TipDxc3 , TipRDyb1 , & + TipRDyb2 , TipRDyb3 , PtchPMzc1 , PtchPMzc2 , PtchPMzc3 , PtchPMzc1 , PtchPMzc2 , & + PtchPMzc3 , PtfmTDzi , PtfmRDyi , PtfmRAxi , PtfmRAxt , PtfmRAyi , PtfmRAyt , & + PtfmRAzi , PtfmRAzt , PtfmRDxi , PtfmRDyi , PtfmRDzi , PtfmRDxi , PtfmRVxi , & + PtfmRVxt , PtfmRVyi , PtfmRVyt , PtfmRVzi , PtfmRVzt , PtfmTDxi , PtfmTDyi , & + PtfmTAgxi , PtfmTAgxt , PtfmTAgyi , PtfmTAgyt , PtfmTAgzi , PtfmTAgzt , PtfmTAxi , & + PtfmTAxt , PtfmTAyi , PtfmTAyt , PtfmTAzi , PtfmTAzt , PtfmTDxi , PtfmTDxt , & + PtfmTDyi , PtfmTDyt , PtfmTDzi , PtfmTDzt , PtfmTVxi , PtfmTVxt , PtfmTVyi , & + PtfmTVyt , PtfmTVzi , PtfmTVzt , PtfmRDzi , QD2_B1E1 , QD2_B1F1 , QD2_B1F2 , & + QD2_B2E1 , QD2_B2F1 , QD2_B2F2 , QD2_B3E1 , QD2_B3F1 , QD2_B3F2 , QD2_DrTr , & + QD2_GeAz , QD2_Hv , QD2_P , QD2_R , QD2_RFrl , QD2_Sg , QD2_Sw , & + QD2_Teet , QD2_TFA1 , QD2_TFA2 , QD2_TFrl , QD2_TSS1 , QD2_TSS2 , QD2_Y , & + QD2_Yaw , QD_B1E1 , QD_B1F1 , QD_B1F2 , QD_B2E1 , QD_B2F1 , QD_B2F2 , & + QD_B3E1 , QD_B3F1 , QD_B3F2 , QD_DrTr , QD_GeAz , QD_Hv , QD_P , & + QD_R , QD_RFrl , QD_Sg , QD_Sw , QD_Teet , QD_TFA1 , QD_TFA2 , & + QD_TFrl , QD_TSS1 , QD_TSS2 , QD_Y , QD_Yaw , Q_B1E1 , Q_B1F1 , & + Q_B1F2 , Q_B2E1 , Q_B2F1 , Q_B2F2 , Q_B3E1 , Q_B3F1 , Q_B3F2 , & + Q_DrTr , Q_GeAz , Q_Hv , Q_P , Q_R , Q_RFrl , Q_Sg , & + Q_Sw , Q_Teet , Q_TFA1 , Q_TFA2 , Q_TFrl , Q_TSS1 , Q_TSS2 , & + Q_Y , Q_Yaw , RFrlBrM , TipRDxb1 , TipRDxb2 , TipRDxb3 , RootFxb1 , & + RootFxb2 , RootFxb3 , RootFxc1 , RootFxc2 , RootFxc3 , RootFyb1 , RootFyb2 , & + RootFyb3 , RootFyc1 , RootFyc2 , RootFyc3 , RootFzc1 , RootFzc2 , RootFzc3 , & + RootFzc1 , RootFzc2 , RootFzc3 , RootMxb1 , RootMxb2 , RootMxb3 , RootMyb1 , & + RootMyb2 , RootMyb3 , RootMxc1 , RootMxc2 , RootMxc3 , RootMyc1 , RootMyc2 , & + RootMyc3 , RootMxb1 , RootMxb2 , RootMxb3 , RootMxc1 , RootMxc2 , RootMxc3 , & + RootMyb1 , RootMyb2 , RootMyb3 , RootMyc1 , RootMyc2 , RootMyc3 , RootMzc1 , & + RootMzc2 , RootMzc3 , RootMzc1 , RootMzc2 , RootMzc3 , LSSTipAxa , RotFurlP , & + RotFurlA , RotFurlP , RotFurlV , RotPwr , LSSTipVxa , TeetAya , TeetPya , & + TeetVya , LSShftFxa , LSShftMxa , Spn1ALgxb1 , Spn1ALgxb2 , Spn1ALgxb3 , Spn1ALgyb1 , & + Spn1ALgyb2 , Spn1ALgyb3 , Spn1ALgzb1 , Spn1ALgzb2 , Spn1ALgzb3 , Spn1ALxb1 , Spn1ALxb2 , & + Spn1ALxb3 , Spn1ALyb1 , Spn1ALyb2 , Spn1ALyb3 , Spn1ALzb1 , Spn1ALzb2 , Spn1ALzb3 , & + Spn1FLxb1 , Spn1FLxb2 , Spn1FLxb3 , Spn1FLyb1 , Spn1FLyb2 , Spn1FLyb3 , Spn1FLzb1 , & + Spn1FLzb2 , Spn1FLzb3 , Spn1MLxb1 , Spn1MLxb2 , Spn1MLxb3 , Spn1MLyb1 , Spn1MLyb2 , & + Spn1MLyb3 , Spn1MLzb1 , Spn1MLzb2 , Spn1MLzb3 , Spn1RDxb1 , Spn1RDxb2 , Spn1RDxb3 , & + Spn1RDyb1 , Spn1RDyb2 , Spn1RDyb3 , Spn1RDzb1 , Spn1RDzb2 , Spn1RDzb3 , Spn1TDxb1 , & + Spn1TDxb2 , Spn1TDxb3 , Spn1TDyb1 , Spn1TDyb2 , Spn1TDyb3 , Spn1TDzb1 , Spn1TDzb2 , & + Spn1TDzb3 , Spn2ALgxb1 , Spn2ALgxb2 , Spn2ALgxb3 , Spn2ALgyb1 , Spn2ALgyb2 , Spn2ALgyb3 , & + Spn2ALgzb1 , Spn2ALgzb2 , Spn2ALgzb3 , Spn2ALxb1 , Spn2ALxb2 , Spn2ALxb3 , Spn2ALyb1 , & + Spn2ALyb2 , Spn2ALyb3 , Spn2ALzb1 , Spn2ALzb2 , Spn2ALzb3 , Spn2FLxb1 , Spn2FLxb2 , & + Spn2FLxb3 , Spn2FLyb1 , Spn2FLyb2 , Spn2FLyb3 , Spn2FLzb1 , Spn2FLzb2 , Spn2FLzb3 , & + Spn2MLxb1 , Spn2MLxb2 , Spn2MLxb3 , Spn2MLyb1 , Spn2MLyb2 , Spn2MLyb3 , Spn2MLzb1 , & + Spn2MLzb2 , Spn2MLzb3 , Spn2RDxb1 , Spn2RDxb2 , Spn2RDxb3 , Spn2RDyb1 , Spn2RDyb2 , & + Spn2RDyb3 , Spn2RDzb1 , Spn2RDzb2 , Spn2RDzb3 , Spn2TDxb1 , Spn2TDxb2 , Spn2TDxb3 , & + Spn2TDyb1 , Spn2TDyb2 , Spn2TDyb3 , Spn2TDzb1 , Spn2TDzb2 , Spn2TDzb3 , Spn3ALgxb1 , & + Spn3ALgxb2 , Spn3ALgxb3 , Spn3ALgyb1 , Spn3ALgyb2 , Spn3ALgyb3 , Spn3ALgzb1 , Spn3ALgzb2 , & + Spn3ALgzb3 , Spn3ALxb1 , Spn3ALxb2 , Spn3ALxb3 , Spn3ALyb1 , Spn3ALyb2 , Spn3ALyb3 , & + Spn3ALzb1 , Spn3ALzb2 , Spn3ALzb3 , Spn3FLxb1 , Spn3FLxb2 , Spn3FLxb3 , Spn3FLyb1 , & + Spn3FLyb2 , Spn3FLyb3 , Spn3FLzb1 , Spn3FLzb2 , Spn3FLzb3 , Spn3MLxb1 , Spn3MLxb2 , & + Spn3MLxb3 , Spn3MLyb1 , Spn3MLyb2 , Spn3MLyb3 , Spn3MLzb1 , Spn3MLzb2 , Spn3MLzb3 , & + Spn3RDxb1 , Spn3RDxb2 , Spn3RDxb3 , Spn3RDyb1 , Spn3RDyb2 , Spn3RDyb3 , Spn3RDzb1 , & + Spn3RDzb2 , Spn3RDzb3 , Spn3TDxb1 , Spn3TDxb2 , Spn3TDxb3 , Spn3TDyb1 , Spn3TDyb2 , & + Spn3TDyb3 , Spn3TDzb1 , Spn3TDzb2 , Spn3TDzb3 , Spn4ALgxb1 , Spn4ALgxb2 , Spn4ALgxb3 , & + Spn4ALgyb1 , Spn4ALgyb2 , Spn4ALgyb3 , Spn4ALgzb1 , Spn4ALgzb2 , Spn4ALgzb3 , Spn4ALxb1 , & + Spn4ALxb2 , Spn4ALxb3 , Spn4ALyb1 , Spn4ALyb2 , Spn4ALyb3 , Spn4ALzb1 , Spn4ALzb2 , & + Spn4ALzb3 , Spn4FLxb1 , Spn4FLxb2 , Spn4FLxb3 , Spn4FLyb1 , Spn4FLyb2 , Spn4FLyb3 , & + Spn4FLzb1 , Spn4FLzb2 , Spn4FLzb3 , Spn4MLxb1 , Spn4MLxb2 , Spn4MLxb3 , Spn4MLyb1 , & + Spn4MLyb2 , Spn4MLyb3 , Spn4MLzb1 , Spn4MLzb2 , Spn4MLzb3 , Spn4RDxb1 , Spn4RDxb2 , & + Spn4RDxb3 , Spn4RDyb1 , Spn4RDyb2 , Spn4RDyb3 , Spn4RDzb1 , Spn4RDzb2 , Spn4RDzb3 , & + Spn4TDxb1 , Spn4TDxb2 , Spn4TDxb3 , Spn4TDyb1 , Spn4TDyb2 , Spn4TDyb3 , Spn4TDzb1 , & + Spn4TDzb2 , Spn4TDzb3 , Spn5ALgxb1 , Spn5ALgxb2 , Spn5ALgxb3 , Spn5ALgyb1 , Spn5ALgyb2 , & + Spn5ALgyb3 , Spn5ALgzb1 , Spn5ALgzb2 , Spn5ALgzb3 , Spn5ALxb1 , Spn5ALxb2 , Spn5ALxb3 , & + Spn5ALyb1 , Spn5ALyb2 , Spn5ALyb3 , Spn5ALzb1 , Spn5ALzb2 , Spn5ALzb3 , Spn5FLxb1 , & + Spn5FLxb2 , Spn5FLxb3 , Spn5FLyb1 , Spn5FLyb2 , Spn5FLyb3 , Spn5FLzb1 , Spn5FLzb2 , & + Spn5FLzb3 , Spn5MLxb1 , Spn5MLxb2 , Spn5MLxb3 , Spn5MLyb1 , Spn5MLyb2 , Spn5MLyb3 , & + Spn5MLzb1 , Spn5MLzb2 , Spn5MLzb3 , Spn5RDxb1 , Spn5RDxb2 , Spn5RDxb3 , Spn5RDyb1 , & + Spn5RDyb2 , Spn5RDyb3 , Spn5RDzb1 , Spn5RDzb2 , Spn5RDzb3 , Spn5TDxb1 , Spn5TDxb2 , & + Spn5TDxb3 , Spn5TDyb1 , Spn5TDyb2 , Spn5TDyb3 , Spn5TDzb1 , Spn5TDzb2 , Spn5TDzb3 , & + Spn6ALgxb1 , Spn6ALgxb2 , Spn6ALgxb3 , Spn6ALgyb1 , Spn6ALgyb2 , Spn6ALgyb3 , Spn6ALgzb1 , & + Spn6ALgzb2 , Spn6ALgzb3 , Spn6ALxb1 , Spn6ALxb2 , Spn6ALxb3 , Spn6ALyb1 , Spn6ALyb2 , & + Spn6ALyb3 , Spn6ALzb1 , Spn6ALzb2 , Spn6ALzb3 , Spn6FLxb1 , Spn6FLxb2 , Spn6FLxb3 , & + Spn6FLyb1 , Spn6FLyb2 , Spn6FLyb3 , Spn6FLzb1 , Spn6FLzb2 , Spn6FLzb3 , Spn6MLxb1 , & + Spn6MLxb2 , Spn6MLxb3 , Spn6MLyb1 , Spn6MLyb2 , Spn6MLyb3 , Spn6MLzb1 , Spn6MLzb2 , & + Spn6MLzb3 , Spn6RDxb1 , Spn6RDxb2 , Spn6RDxb3 , Spn6RDyb1 , Spn6RDyb2 , Spn6RDyb3 , & + Spn6RDzb1 , Spn6RDzb2 , Spn6RDzb3 , Spn6TDxb1 , Spn6TDxb2 , Spn6TDxb3 , Spn6TDyb1 , & + Spn6TDyb2 , Spn6TDyb3 , Spn6TDzb1 , Spn6TDzb2 , Spn6TDzb3 , Spn7ALgxb1 , Spn7ALgxb2 , & + Spn7ALgxb3 , Spn7ALgyb1 , Spn7ALgyb2 , Spn7ALgyb3 , Spn7ALgzb1 , Spn7ALgzb2 , Spn7ALgzb3 , & + Spn7ALxb1 , Spn7ALxb2 , Spn7ALxb3 , Spn7ALyb1 , Spn7ALyb2 , Spn7ALyb3 , Spn7ALzb1 , & + Spn7ALzb2 , Spn7ALzb3 , Spn7FLxb1 , Spn7FLxb2 , Spn7FLxb3 , Spn7FLyb1 , Spn7FLyb2 , & + Spn7FLyb3 , Spn7FLzb1 , Spn7FLzb2 , Spn7FLzb3 , Spn7MLxb1 , Spn7MLxb2 , Spn7MLxb3 , & + Spn7MLyb1 , Spn7MLyb2 , Spn7MLyb3 , Spn7MLzb1 , Spn7MLzb2 , Spn7MLzb3 , Spn7RDxb1 , & + Spn7RDxb2 , Spn7RDxb3 , Spn7RDyb1 , Spn7RDyb2 , Spn7RDyb3 , Spn7RDzb1 , Spn7RDzb2 , & + Spn7RDzb3 , Spn7TDxb1 , Spn7TDxb2 , Spn7TDxb3 , Spn7TDyb1 , Spn7TDyb2 , Spn7TDyb3 , & + Spn7TDzb1 , Spn7TDzb2 , Spn7TDzb3 , Spn8ALgxb1 , Spn8ALgxb2 , Spn8ALgxb3 , Spn8ALgyb1 , & + Spn8ALgyb2 , Spn8ALgyb3 , Spn8ALgzb1 , Spn8ALgzb2 , Spn8ALgzb3 , Spn8ALxb1 , Spn8ALxb2 , & + Spn8ALxb3 , Spn8ALyb1 , Spn8ALyb2 , Spn8ALyb3 , Spn8ALzb1 , Spn8ALzb2 , Spn8ALzb3 , & + Spn8FLxb1 , Spn8FLxb2 , Spn8FLxb3 , Spn8FLyb1 , Spn8FLyb2 , Spn8FLyb3 , Spn8FLzb1 , & + Spn8FLzb2 , Spn8FLzb3 , Spn8MLxb1 , Spn8MLxb2 , Spn8MLxb3 , Spn8MLyb1 , Spn8MLyb2 , & + Spn8MLyb3 , Spn8MLzb1 , Spn8MLzb2 , Spn8MLzb3 , Spn8RDxb1 , Spn8RDxb2 , Spn8RDxb3 , & + Spn8RDyb1 , Spn8RDyb2 , Spn8RDyb3 , Spn8RDzb1 , Spn8RDzb2 , Spn8RDzb3 , Spn8TDxb1 , & + Spn8TDxb2 , Spn8TDxb3 , Spn8TDyb1 , Spn8TDyb2 , Spn8TDyb3 , Spn8TDzb1 , Spn8TDzb2 , & + Spn8TDzb3 , Spn9ALgxb1 , Spn9ALgxb2 , Spn9ALgxb3 , Spn9ALgyb1 , Spn9ALgyb2 , Spn9ALgyb3 , & + Spn9ALgzb1 , Spn9ALgzb2 , Spn9ALgzb3 , Spn9ALxb1 , Spn9ALxb2 , Spn9ALxb3 , Spn9ALyb1 , & + Spn9ALyb2 , Spn9ALyb3 , Spn9ALzb1 , Spn9ALzb2 , Spn9ALzb3 , Spn9FLxb1 , Spn9FLxb2 , & + Spn9FLxb3 , Spn9FLyb1 , Spn9FLyb2 , Spn9FLyb3 , Spn9FLzb1 , Spn9FLzb2 , Spn9FLzb3 , & + Spn9MLxb1 , Spn9MLxb2 , Spn9MLxb3 , Spn9MLyb1 , Spn9MLyb2 , Spn9MLyb3 , Spn9MLzb1 , & + Spn9MLzb2 , Spn9MLzb3 , Spn9RDxb1 , Spn9RDxb2 , Spn9RDxb3 , Spn9RDyb1 , Spn9RDyb2 , & + Spn9RDyb3 , Spn9RDzb1 , Spn9RDzb2 , Spn9RDzb3 , Spn9TDxb1 , Spn9TDxb2 , Spn9TDxb3 , & + Spn9TDyb1 , Spn9TDyb2 , Spn9TDyb3 , Spn9TDzb1 , Spn9TDzb2 , Spn9TDzb3 , TailFurlP , & + TailFurlA , TailFurlP , TailFurlV , TeetAya , TeetPya , TeetPya , TeetVya , & + TFrlBrM , TipClrnc1 , TipClrnc2 , TipClrnc3 , TipALgxb1 , TipALgxb2 , TipALgxb3 , & + TipALgyb1 , TipALgyb2 , TipALgyb3 , TipALgzb1 , TipALgzb2 , TipALgzb3 , TipALxb1 , & + TipALxb2 , TipALxb3 , TipALyb1 , TipALyb2 , TipALyb3 , TipALzb1 , TipALzb2 , & + TipALzb3 , TipClrnc1 , TipClrnc2 , TipClrnc3 , TipDxb1 , TipDxb2 , TipDxb3 , & + TipDxc1 , TipDxc2 , TipDxc3 , TipDyb1 , TipDyb2 , TipDyb3 , TipDyc1 , & + TipDyc2 , TipDyc3 , TipDzc1 , TipDzc2 , TipDzc3 , TipDzc1 , TipDzc2 , & + TipDzc3 , TipRDxb1 , TipRDxb2 , TipRDxb3 , TipRDyb1 , TipRDyb2 , TipRDyb3 , & + TipRDzc1 , TipRDzc2 , TipRDzc3 , TipRDzc1 , TipRDzc2 , TipRDzc3 , YawBrTDzt , & + YawBrTDxt , YawBrRDyt , YawBrRDxt , YawBrTDyt , YawBrRDzt , TwHt1ALgxt , TwHt1ALgyt , & + TwHt1ALgzt , TwHt1ALxt , TwHt1ALyt , TwHt1ALzt , TwHt1FLxt , TwHt1FLyt , TwHt1FLzt , & + TwHt1MLxt , TwHt1MLyt , TwHt1MLzt , TwHt1RDxt , TwHt1RDyt , TwHt1RDzt , TwHt1RPxi , & + TwHt1RPyi , TwHt1RPzi , TwHt1TDxt , TwHt1TDyt , TwHt1TDzt , TwHt1TPxi , TwHt1TPyi , & + TwHt1TPzi , TwHt2ALgxt , TwHt2ALgyt , TwHt2ALgzt , TwHt2ALxt , TwHt2ALyt , TwHt2ALzt , & + TwHt2FLxt , TwHt2FLyt , TwHt2FLzt , TwHt2MLxt , TwHt2MLyt , TwHt2MLzt , TwHt2RDxt , & + TwHt2RDyt , TwHt2RDzt , TwHt2RPxi , TwHt2RPyi , TwHt2RPzi , TwHt2TDxt , TwHt2TDyt , & + TwHt2TDzt , TwHt2TPxi , TwHt2TPyi , TwHt2TPzi , TwHt3ALgxt , TwHt3ALgyt , TwHt3ALgzt , & + TwHt3ALxt , TwHt3ALyt , TwHt3ALzt , TwHt3FLxt , TwHt3FLyt , TwHt3FLzt , TwHt3MLxt , & + TwHt3MLyt , TwHt3MLzt , TwHt3RDxt , TwHt3RDyt , TwHt3RDzt , TwHt3RPxi , TwHt3RPyi , & + TwHt3RPzi , TwHt3TDxt , TwHt3TDyt , TwHt3TDzt , TwHt3TPxi , TwHt3TPyi , TwHt3TPzi , & + TwHt4ALgxt , TwHt4ALgyt , TwHt4ALgzt , TwHt4ALxt , TwHt4ALyt , TwHt4ALzt , TwHt4FLxt , & + TwHt4FLyt , TwHt4FLzt , TwHt4MLxt , TwHt4MLyt , TwHt4MLzt , TwHt4RDxt , TwHt4RDyt , & + TwHt4RDzt , TwHt4RPxi , TwHt4RPyi , TwHt4RPzi , TwHt4TDxt , TwHt4TDyt , TwHt4TDzt , & + TwHt4TPxi , TwHt4TPyi , TwHt4TPzi , TwHt5ALgxt , TwHt5ALgyt , TwHt5ALgzt , TwHt5ALxt , & + TwHt5ALyt , TwHt5ALzt , TwHt5FLxt , TwHt5FLyt , TwHt5FLzt , TwHt5MLxt , TwHt5MLyt , & + TwHt5MLzt , TwHt5RDxt , TwHt5RDyt , TwHt5RDzt , TwHt5RPxi , TwHt5RPyi , TwHt5RPzi , & + TwHt5TDxt , TwHt5TDyt , TwHt5TDzt , TwHt5TPxi , TwHt5TPyi , TwHt5TPzi , TwHt6ALgxt , & + TwHt6ALgyt , TwHt6ALgzt , TwHt6ALxt , TwHt6ALyt , TwHt6ALzt , TwHt6FLxt , TwHt6FLyt , & + TwHt6FLzt , TwHt6MLxt , TwHt6MLyt , TwHt6MLzt , TwHt6RDxt , TwHt6RDyt , TwHt6RDzt , & + TwHt6RPxi , TwHt6RPyi , TwHt6RPzi , TwHt6TDxt , TwHt6TDyt , TwHt6TDzt , TwHt6TPxi , & + TwHt6TPyi , TwHt6TPzi , TwHt7ALgxt , TwHt7ALgyt , TwHt7ALgzt , TwHt7ALxt , TwHt7ALyt , & + TwHt7ALzt , TwHt7FLxt , TwHt7FLyt , TwHt7FLzt , TwHt7MLxt , TwHt7MLyt , TwHt7MLzt , & + TwHt7RDxt , TwHt7RDyt , TwHt7RDzt , TwHt7RPxi , TwHt7RPyi , TwHt7RPzi , TwHt7TDxt , & + TwHt7TDyt , TwHt7TDzt , TwHt7TPxi , TwHt7TPyi , TwHt7TPzi , TwHt8ALgxt , TwHt8ALgyt , & + TwHt8ALgzt , TwHt8ALxt , TwHt8ALyt , TwHt8ALzt , TwHt8FLxt , TwHt8FLyt , TwHt8FLzt , & + TwHt8MLxt , TwHt8MLyt , TwHt8MLzt , TwHt8RDxt , TwHt8RDyt , TwHt8RDzt , TwHt8RPxi , & + TwHt8RPyi , TwHt8RPzi , TwHt8TDxt , TwHt8TDyt , TwHt8TDzt , TwHt8TPxi , TwHt8TPyi , & + TwHt8TPzi , TwHt9ALgxt , TwHt9ALgyt , TwHt9ALgzt , TwHt9ALxt , TwHt9ALyt , TwHt9ALzt , & + TwHt9FLxt , TwHt9FLyt , TwHt9FLzt , TwHt9MLxt , TwHt9MLyt , TwHt9MLzt , TwHt9RDxt , & + TwHt9RDyt , TwHt9RDzt , TwHt9RPxi , TwHt9RPyi , TwHt9RPzi , TwHt9TDxt , TwHt9TDyt , & + TwHt9TDzt , TwHt9TPxi , TwHt9TPyi , TwHt9TPzi , TwrBsFxt , TwrBsFyt , TwrBsFzt , & + TwrBsMxt , TwrBsMyt , TwrBsMzt , TipClrnc1 , TipClrnc2 , TipClrnc3 , TwrTpTDxi , & + TwrTpTDyi , TwrTpTDzi , TipRDzc1 , TipRDzc2 , TipRDzc3 , YawAzn , YawAzn , & + YawAzn , YawBrFxn , YawBrFxp , YawBrFyn , YawBrFyp , YawBrFzn , YawBrFzn , & + YawBrMxn , YawBrMxp , YawBrMyn , YawBrMyp , YawBrMzn , YawBrMzn , YawBrRAxp , & + YawBrRAyp , YawBrRAzp , YawBrRDxt , YawBrRDyt , YawBrRDzt , YawBrRVxp , YawBrRVyp , & + YawBrRVzp , YawBrTAgxp , YawBrTAgyp , YawBrTAgzp , YawBrTAxp , YawBrTAyp , YawBrTAzp , & + TwrTpTDxi , YawBrTDxp , YawBrTDxt , TwrTpTDyi , YawBrTDyp , YawBrTDyt , TwrTpTDzi , & + YawBrTDzp , YawBrTDzt , YawBrTVxp , YawBrTVyp , YawBrTVzp , YawPzn , YawPzn , & + YawPzn , YawVzn , YawVzn , YawVzn /) + CHARACTER(ChanLen), PARAMETER :: ParamUnitsAry(1110) = (/ & ! This lists the units corresponding to the allowed parameters + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg/s^2)","(rpm) ","(kN-m) ","(deg/s^2)","(kW) ","(kN-m) ","(rpm) ", & + "(m) ","(m) ","(m) ","(deg/s^2)","(deg/s^2)","(deg/s^2)","(kN) ", & + "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ", & + "(rpm) ","(rpm) ","(rpm) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kW) ","(kN-m) ","(deg/s^2)", & + "(deg/s^2)","(deg/s^2)","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ", & + "(deg) ","(deg) ","(rpm) ","(rpm) ","(rpm) ","(deg) ","(deg/s^2)", & + "(deg) ","(deg/s) ","(deg/s^2)","(deg/s^2)","(deg/s^2)","(deg/s) ","(deg/s) ", & + "(deg/s) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s) ","(m/s) ","(m/s) ","(m) ","(m) ","(m) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(m) ","(deg) ","(deg/s^2)","(deg/s^2)","(deg/s^2)","(deg/s^2)", & + "(deg/s^2)","(deg/s^2)","(deg) ","(deg) ","(deg) ","(deg) ","(deg/s) ", & + "(deg/s) ","(deg/s) ","(deg/s) ","(deg/s) ","(deg/s) ","(m) ","(m) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m/s) ","(m/s) ","(m/s) ", & + "(m/s) ","(m/s) ","(m/s) ","(deg) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(rad/s^2)", & + "(rad/s^2)","(m/s^2) ","(rad/s^2)","(rad/s^2)","(rad/s^2)","(m/s^2) ","(m/s^2) ", & + "(rad/s^2)","(m/s^2) ","(m/s^2) ","(rad/s^2)","(m/s^2) ","(m/s^2) ","(rad/s^2)", & + "(rad/s^2)","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ", & + "(m/s) ","(m/s) ","(m/s) ","(rad/s) ","(rad/s) ","(m/s) ","(rad/s) ", & + "(rad/s) ","(rad/s) ","(m/s) ","(m/s) ","(rad/s) ","(m/s) ","(m/s) ", & + "(rad/s) ","(m/s) ","(m/s) ","(rad/s) ","(rad/s) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(rad) ","(rad) ","(m) ","(rad) ","(rad) ","(rad) ","(m) ", & + "(m) ","(rad) ","(m) ","(m) ","(rad) ","(m) ","(m) ", & + "(rad) ","(rad) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(kN) ", & + "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg/s^2)","(deg) ", & + "(deg/s^2)","(deg) ","(deg/s) ","(kW) ","(rpm) ","(deg/s^2)","(deg) ", & + "(deg/s) ","(kN) ","(kN-m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ", & + "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ", & + "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ", & + "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ", & + "(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(deg) ", & + "(deg/s^2)","(deg) ","(deg/s) ","(deg/s^2)","(deg) ","(deg) ","(deg/s) ", & + "(kN-m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ", & + "(m) ","(deg) ","(deg) ","(m) ","(deg) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN-m) ", & + "(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ", & + "(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ", & + "(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ", & + "(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m/s^2) ","(m/s^2) ", & + "(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(kN) ","(kN) ","(kN) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(deg) ","(deg) ","(deg) ","(deg) ", & + "(deg) ","(deg) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(kN) ","(kN) ","(kN) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg) ", & + "(deg) ","(deg) ","(deg) ","(deg) ","(deg) ","(m) ","(m) ", & + "(m) ","(m) ","(m) ","(m) ","(kN) ","(kN) ","(kN) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(deg) ","(deg) ","(deg) ","(deg/s^2)","(deg/s^2)", & + "(deg/s^2)","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ","(kN) ", & + "(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(kN-m) ","(deg/s^2)", & + "(deg/s^2)","(deg/s^2)","(deg) ","(deg) ","(deg) ","(deg/s) ","(deg/s) ", & + "(deg/s) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ","(m/s^2) ", & + "(m) ","(m) ","(m) ","(m) ","(m) ","(m) ","(m) ", & + "(m) ","(m) ","(m/s) ","(m/s) ","(m/s) ","(deg) ","(deg) ", & + "(deg) ","(deg/s) ","(deg/s) ","(deg/s) "/) ! Initialize values @@ -4324,6 +4458,9 @@ SUBROUTINE SetOutParam(OutList, p, ErrStat, ErrMsg ) InvalidOutput( TipALxb( I) ) = .TRUE. InvalidOutput( TipALyb( I) ) = .TRUE. InvalidOutput( TipALzb( I) ) = .TRUE. + InvalidOutput( TipALgxb( I) ) = .TRUE. + InvalidOutput( TipALgyb( I) ) = .TRUE. + InvalidOutput( TipALgzb( I) ) = .TRUE. InvalidOutput( TipRDxb( I) ) = .TRUE. InvalidOutput( TipRDyb( I) ) = .TRUE. InvalidOutput( TipRDzc( I) ) = .TRUE. @@ -4348,6 +4485,10 @@ SUBROUTINE SetOutParam(OutList, p, ErrStat, ErrMsg ) InvalidOutput( SpnALyb(:,I) ) = .TRUE. InvalidOutput( SpnALzb(:,I) ) = .TRUE. + InvalidOutput( SpnALgxb(:,I) ) = .TRUE. + InvalidOutput( SpnALgyb(:,I) ) = .TRUE. + InvalidOutput( SpnALgzb(:,I) ) = .TRUE. + InvalidOutput( SpnTDxb(:,I) ) = .TRUE. InvalidOutput( SpnTDyb(:,I) ) = .TRUE. InvalidOutput( SpnTDzb(:,I) ) = .TRUE. @@ -4377,6 +4518,10 @@ SUBROUTINE SetOutParam(OutList, p, ErrStat, ErrMsg ) InvalidOutput( SpnALyb(J,I) ) = .TRUE. InvalidOutput( SpnALzb(J,I) ) = .TRUE. + InvalidOutput( SpnALgxb(J,I) ) = .TRUE. + InvalidOutput( SpnALgyb(J,I) ) = .TRUE. + InvalidOutput( SpnALgzb(J,I) ) = .TRUE. + InvalidOutput( SpnTDxb(J,I) ) = .TRUE. InvalidOutput( SpnTDyb(J,I) ) = .TRUE. InvalidOutput( SpnTDzb(J,I) ) = .TRUE. @@ -4408,6 +4553,10 @@ SUBROUTINE SetOutParam(OutList, p, ErrStat, ErrMsg ) InvalidOutput( TwHtALyt(J) ) = .TRUE. InvalidOutput( TwHtALzt(J) ) = .TRUE. + InvalidOutput( TwHtALgxt(J) ) = .TRUE. + InvalidOutput( TwHtALgyt(J) ) = .TRUE. + InvalidOutput( TwHtALgzt(J) ) = .TRUE. + InvalidOutput( TwHtTDxt(J) ) = .TRUE. InvalidOutput( TwHtTDyt(J) ) = .TRUE. InvalidOutput( TwHtTDzt(J) ) = .TRUE. diff --git a/modules/elastodyn/src/ElastoDyn_IO.f90 b/modules/elastodyn/src/ElastoDyn_IO.f90 index 286ab30aa..e2be81b8a 100644 --- a/modules/elastodyn/src/ElastoDyn_IO.f90 +++ b/modules/elastodyn/src/ElastoDyn_IO.f90 @@ -116,993 +116,1122 @@ MODULE ElastoDyn_Parameters ! Blade 1 Tip Motions: - INTEGER(IntKi), PARAMETER :: TipDxc1 = 1 - INTEGER(IntKi), PARAMETER :: TipDyc1 = 2 - INTEGER(IntKi), PARAMETER :: TipDzc1 = 3 - INTEGER(IntKi), PARAMETER :: TipDxb1 = 4 - INTEGER(IntKi), PARAMETER :: TipDyb1 = 5 - INTEGER(IntKi), PARAMETER :: TipALxb1 = 6 - INTEGER(IntKi), PARAMETER :: TipALyb1 = 7 - INTEGER(IntKi), PARAMETER :: TipALzb1 = 8 - INTEGER(IntKi), PARAMETER :: TipRDxb1 = 9 - INTEGER(IntKi), PARAMETER :: TipRDyb1 = 10 - INTEGER(IntKi), PARAMETER :: TipRDzc1 = 11 - INTEGER(IntKi), PARAMETER :: TipClrnc1 = 12 + INTEGER(IntKi), PARAMETER :: TipDxc1 = 1 + INTEGER(IntKi), PARAMETER :: TipDyc1 = 2 + INTEGER(IntKi), PARAMETER :: TipDzc1 = 3 + INTEGER(IntKi), PARAMETER :: TipDxb1 = 4 + INTEGER(IntKi), PARAMETER :: TipDyb1 = 5 + INTEGER(IntKi), PARAMETER :: TipALxb1 = 6 + INTEGER(IntKi), PARAMETER :: TipALyb1 = 7 + INTEGER(IntKi), PARAMETER :: TipALzb1 = 8 + INTEGER(IntKi), PARAMETER :: TipALgxb1 = 9 + INTEGER(IntKi), PARAMETER :: TipALgyb1 = 10 + INTEGER(IntKi), PARAMETER :: TipALgzb1 = 11 + INTEGER(IntKi), PARAMETER :: TipRDxb1 = 12 + INTEGER(IntKi), PARAMETER :: TipRDyb1 = 13 + INTEGER(IntKi), PARAMETER :: TipRDzc1 = 14 + INTEGER(IntKi), PARAMETER :: TipClrnc1 = 15 ! Blade 2 Tip Motions: - INTEGER(IntKi), PARAMETER :: TipDxc2 = 13 - INTEGER(IntKi), PARAMETER :: TipDyc2 = 14 - INTEGER(IntKi), PARAMETER :: TipDzc2 = 15 - INTEGER(IntKi), PARAMETER :: TipDxb2 = 16 - INTEGER(IntKi), PARAMETER :: TipDyb2 = 17 - INTEGER(IntKi), PARAMETER :: TipALxb2 = 18 - INTEGER(IntKi), PARAMETER :: TipALyb2 = 19 - INTEGER(IntKi), PARAMETER :: TipALzb2 = 20 - INTEGER(IntKi), PARAMETER :: TipRDxb2 = 21 - INTEGER(IntKi), PARAMETER :: TipRDyb2 = 22 - INTEGER(IntKi), PARAMETER :: TipRDzc2 = 23 - INTEGER(IntKi), PARAMETER :: TipClrnc2 = 24 + INTEGER(IntKi), PARAMETER :: TipDxc2 = 16 + INTEGER(IntKi), PARAMETER :: TipDyc2 = 17 + INTEGER(IntKi), PARAMETER :: TipDzc2 = 18 + INTEGER(IntKi), PARAMETER :: TipDxb2 = 19 + INTEGER(IntKi), PARAMETER :: TipDyb2 = 20 + INTEGER(IntKi), PARAMETER :: TipALxb2 = 21 + INTEGER(IntKi), PARAMETER :: TipALyb2 = 22 + INTEGER(IntKi), PARAMETER :: TipALzb2 = 23 + INTEGER(IntKi), PARAMETER :: TipALgxb2 = 24 + INTEGER(IntKi), PARAMETER :: TipALgyb2 = 25 + INTEGER(IntKi), PARAMETER :: TipALgzb2 = 26 + INTEGER(IntKi), PARAMETER :: TipRDxb2 = 27 + INTEGER(IntKi), PARAMETER :: TipRDyb2 = 28 + INTEGER(IntKi), PARAMETER :: TipRDzc2 = 29 + INTEGER(IntKi), PARAMETER :: TipClrnc2 = 30 ! Blade 3 Tip Motions: - INTEGER(IntKi), PARAMETER :: TipDxc3 = 25 - INTEGER(IntKi), PARAMETER :: TipDyc3 = 26 - INTEGER(IntKi), PARAMETER :: TipDzc3 = 27 - INTEGER(IntKi), PARAMETER :: TipDxb3 = 28 - INTEGER(IntKi), PARAMETER :: TipDyb3 = 29 - INTEGER(IntKi), PARAMETER :: TipALxb3 = 30 - INTEGER(IntKi), PARAMETER :: TipALyb3 = 31 - INTEGER(IntKi), PARAMETER :: TipALzb3 = 32 - INTEGER(IntKi), PARAMETER :: TipRDxb3 = 33 - INTEGER(IntKi), PARAMETER :: TipRDyb3 = 34 - INTEGER(IntKi), PARAMETER :: TipRDzc3 = 35 - INTEGER(IntKi), PARAMETER :: TipClrnc3 = 36 + INTEGER(IntKi), PARAMETER :: TipDxc3 = 31 + INTEGER(IntKi), PARAMETER :: TipDyc3 = 32 + INTEGER(IntKi), PARAMETER :: TipDzc3 = 33 + INTEGER(IntKi), PARAMETER :: TipDxb3 = 34 + INTEGER(IntKi), PARAMETER :: TipDyb3 = 35 + INTEGER(IntKi), PARAMETER :: TipALxb3 = 36 + INTEGER(IntKi), PARAMETER :: TipALyb3 = 37 + INTEGER(IntKi), PARAMETER :: TipALzb3 = 38 + INTEGER(IntKi), PARAMETER :: TipALgxb3 = 39 + INTEGER(IntKi), PARAMETER :: TipALgyb3 = 40 + INTEGER(IntKi), PARAMETER :: TipALgzb3 = 41 + INTEGER(IntKi), PARAMETER :: TipRDxb3 = 42 + INTEGER(IntKi), PARAMETER :: TipRDyb3 = 43 + INTEGER(IntKi), PARAMETER :: TipRDzc3 = 44 + INTEGER(IntKi), PARAMETER :: TipClrnc3 = 45 ! Blade 1 Local Span Motions: - INTEGER(IntKi), PARAMETER :: Spn1ALxb1 = 37 - INTEGER(IntKi), PARAMETER :: Spn1ALyb1 = 38 - INTEGER(IntKi), PARAMETER :: Spn1ALzb1 = 39 - INTEGER(IntKi), PARAMETER :: Spn2ALxb1 = 40 - INTEGER(IntKi), PARAMETER :: Spn2ALyb1 = 41 - INTEGER(IntKi), PARAMETER :: Spn2ALzb1 = 42 - INTEGER(IntKi), PARAMETER :: Spn3ALxb1 = 43 - INTEGER(IntKi), PARAMETER :: Spn3ALyb1 = 44 - INTEGER(IntKi), PARAMETER :: Spn3ALzb1 = 45 - INTEGER(IntKi), PARAMETER :: Spn4ALxb1 = 46 - INTEGER(IntKi), PARAMETER :: Spn4ALyb1 = 47 - INTEGER(IntKi), PARAMETER :: Spn4ALzb1 = 48 - INTEGER(IntKi), PARAMETER :: Spn5ALxb1 = 49 - INTEGER(IntKi), PARAMETER :: Spn5ALyb1 = 50 - INTEGER(IntKi), PARAMETER :: Spn5ALzb1 = 51 - INTEGER(IntKi), PARAMETER :: Spn6ALxb1 = 52 - INTEGER(IntKi), PARAMETER :: Spn6ALyb1 = 53 - INTEGER(IntKi), PARAMETER :: Spn6ALzb1 = 54 - INTEGER(IntKi), PARAMETER :: Spn7ALxb1 = 55 - INTEGER(IntKi), PARAMETER :: Spn7ALyb1 = 56 - INTEGER(IntKi), PARAMETER :: Spn7ALzb1 = 57 - INTEGER(IntKi), PARAMETER :: Spn8ALxb1 = 58 - INTEGER(IntKi), PARAMETER :: Spn8ALyb1 = 59 - INTEGER(IntKi), PARAMETER :: Spn8ALzb1 = 60 - INTEGER(IntKi), PARAMETER :: Spn9ALxb1 = 61 - INTEGER(IntKi), PARAMETER :: Spn9ALyb1 = 62 - INTEGER(IntKi), PARAMETER :: Spn9ALzb1 = 63 - INTEGER(IntKi), PARAMETER :: Spn1TDxb1 = 64 - INTEGER(IntKi), PARAMETER :: Spn1TDyb1 = 65 - INTEGER(IntKi), PARAMETER :: Spn1TDzb1 = 66 - INTEGER(IntKi), PARAMETER :: Spn2TDxb1 = 67 - INTEGER(IntKi), PARAMETER :: Spn2TDyb1 = 68 - INTEGER(IntKi), PARAMETER :: Spn2TDzb1 = 69 - INTEGER(IntKi), PARAMETER :: Spn3TDxb1 = 70 - INTEGER(IntKi), PARAMETER :: Spn3TDyb1 = 71 - INTEGER(IntKi), PARAMETER :: Spn3TDzb1 = 72 - INTEGER(IntKi), PARAMETER :: Spn4TDxb1 = 73 - INTEGER(IntKi), PARAMETER :: Spn4TDyb1 = 74 - INTEGER(IntKi), PARAMETER :: Spn4TDzb1 = 75 - INTEGER(IntKi), PARAMETER :: Spn5TDxb1 = 76 - INTEGER(IntKi), PARAMETER :: Spn5TDyb1 = 77 - INTEGER(IntKi), PARAMETER :: Spn5TDzb1 = 78 - INTEGER(IntKi), PARAMETER :: Spn6TDxb1 = 79 - INTEGER(IntKi), PARAMETER :: Spn6TDyb1 = 80 - INTEGER(IntKi), PARAMETER :: Spn6TDzb1 = 81 - INTEGER(IntKi), PARAMETER :: Spn7TDxb1 = 82 - INTEGER(IntKi), PARAMETER :: Spn7TDyb1 = 83 - INTEGER(IntKi), PARAMETER :: Spn7TDzb1 = 84 - INTEGER(IntKi), PARAMETER :: Spn8TDxb1 = 85 - INTEGER(IntKi), PARAMETER :: Spn8TDyb1 = 86 - INTEGER(IntKi), PARAMETER :: Spn8TDzb1 = 87 - INTEGER(IntKi), PARAMETER :: Spn9TDxb1 = 88 - INTEGER(IntKi), PARAMETER :: Spn9TDyb1 = 89 - INTEGER(IntKi), PARAMETER :: Spn9TDzb1 = 90 - INTEGER(IntKi), PARAMETER :: Spn1RDxb1 = 91 - INTEGER(IntKi), PARAMETER :: Spn1RDyb1 = 92 - INTEGER(IntKi), PARAMETER :: Spn1RDzb1 = 93 - INTEGER(IntKi), PARAMETER :: Spn2RDxb1 = 94 - INTEGER(IntKi), PARAMETER :: Spn2RDyb1 = 95 - INTEGER(IntKi), PARAMETER :: Spn2RDzb1 = 96 - INTEGER(IntKi), PARAMETER :: Spn3RDxb1 = 97 - INTEGER(IntKi), PARAMETER :: Spn3RDyb1 = 98 - INTEGER(IntKi), PARAMETER :: Spn3RDzb1 = 99 - INTEGER(IntKi), PARAMETER :: Spn4RDxb1 = 100 - INTEGER(IntKi), PARAMETER :: Spn4RDyb1 = 101 - INTEGER(IntKi), PARAMETER :: Spn4RDzb1 = 102 - INTEGER(IntKi), PARAMETER :: Spn5RDxb1 = 103 - INTEGER(IntKi), PARAMETER :: Spn5RDyb1 = 104 - INTEGER(IntKi), PARAMETER :: Spn5RDzb1 = 105 - INTEGER(IntKi), PARAMETER :: Spn6RDxb1 = 106 - INTEGER(IntKi), PARAMETER :: Spn6RDyb1 = 107 - INTEGER(IntKi), PARAMETER :: Spn6RDzb1 = 108 - INTEGER(IntKi), PARAMETER :: Spn7RDxb1 = 109 - INTEGER(IntKi), PARAMETER :: Spn7RDyb1 = 110 - INTEGER(IntKi), PARAMETER :: Spn7RDzb1 = 111 - INTEGER(IntKi), PARAMETER :: Spn8RDxb1 = 112 - INTEGER(IntKi), PARAMETER :: Spn8RDyb1 = 113 - INTEGER(IntKi), PARAMETER :: Spn8RDzb1 = 114 - INTEGER(IntKi), PARAMETER :: Spn9RDxb1 = 115 - INTEGER(IntKi), PARAMETER :: Spn9RDyb1 = 116 - INTEGER(IntKi), PARAMETER :: Spn9RDzb1 = 117 + INTEGER(IntKi), PARAMETER :: Spn1ALxb1 = 46 + INTEGER(IntKi), PARAMETER :: Spn1ALyb1 = 47 + INTEGER(IntKi), PARAMETER :: Spn1ALzb1 = 48 + INTEGER(IntKi), PARAMETER :: Spn2ALxb1 = 49 + INTEGER(IntKi), PARAMETER :: Spn2ALyb1 = 50 + INTEGER(IntKi), PARAMETER :: Spn2ALzb1 = 51 + INTEGER(IntKi), PARAMETER :: Spn3ALxb1 = 52 + INTEGER(IntKi), PARAMETER :: Spn3ALyb1 = 53 + INTEGER(IntKi), PARAMETER :: Spn3ALzb1 = 54 + INTEGER(IntKi), PARAMETER :: Spn4ALxb1 = 55 + INTEGER(IntKi), PARAMETER :: Spn4ALyb1 = 56 + INTEGER(IntKi), PARAMETER :: Spn4ALzb1 = 57 + INTEGER(IntKi), PARAMETER :: Spn5ALxb1 = 58 + INTEGER(IntKi), PARAMETER :: Spn5ALyb1 = 59 + INTEGER(IntKi), PARAMETER :: Spn5ALzb1 = 60 + INTEGER(IntKi), PARAMETER :: Spn6ALxb1 = 61 + INTEGER(IntKi), PARAMETER :: Spn6ALyb1 = 62 + INTEGER(IntKi), PARAMETER :: Spn6ALzb1 = 63 + INTEGER(IntKi), PARAMETER :: Spn7ALxb1 = 64 + INTEGER(IntKi), PARAMETER :: Spn7ALyb1 = 65 + INTEGER(IntKi), PARAMETER :: Spn7ALzb1 = 66 + INTEGER(IntKi), PARAMETER :: Spn8ALxb1 = 67 + INTEGER(IntKi), PARAMETER :: Spn8ALyb1 = 68 + INTEGER(IntKi), PARAMETER :: Spn8ALzb1 = 69 + INTEGER(IntKi), PARAMETER :: Spn9ALxb1 = 70 + INTEGER(IntKi), PARAMETER :: Spn9ALyb1 = 71 + INTEGER(IntKi), PARAMETER :: Spn9ALzb1 = 72 + INTEGER(IntKi), PARAMETER :: Spn1ALgxb1 = 73 + INTEGER(IntKi), PARAMETER :: Spn1ALgyb1 = 74 + INTEGER(IntKi), PARAMETER :: Spn1ALgzb1 = 75 + INTEGER(IntKi), PARAMETER :: Spn2ALgxb1 = 76 + INTEGER(IntKi), PARAMETER :: Spn2ALgyb1 = 77 + INTEGER(IntKi), PARAMETER :: Spn2ALgzb1 = 78 + INTEGER(IntKi), PARAMETER :: Spn3ALgxb1 = 79 + INTEGER(IntKi), PARAMETER :: Spn3ALgyb1 = 80 + INTEGER(IntKi), PARAMETER :: Spn3ALgzb1 = 81 + INTEGER(IntKi), PARAMETER :: Spn4ALgxb1 = 82 + INTEGER(IntKi), PARAMETER :: Spn4ALgyb1 = 83 + INTEGER(IntKi), PARAMETER :: Spn4ALgzb1 = 84 + INTEGER(IntKi), PARAMETER :: Spn5ALgxb1 = 85 + INTEGER(IntKi), PARAMETER :: Spn5ALgyb1 = 86 + INTEGER(IntKi), PARAMETER :: Spn5ALgzb1 = 87 + INTEGER(IntKi), PARAMETER :: Spn6ALgxb1 = 88 + INTEGER(IntKi), PARAMETER :: Spn6ALgyb1 = 89 + INTEGER(IntKi), PARAMETER :: Spn6ALgzb1 = 90 + INTEGER(IntKi), PARAMETER :: Spn7ALgxb1 = 91 + INTEGER(IntKi), PARAMETER :: Spn7ALgyb1 = 92 + INTEGER(IntKi), PARAMETER :: Spn7ALgzb1 = 93 + INTEGER(IntKi), PARAMETER :: Spn8ALgxb1 = 94 + INTEGER(IntKi), PARAMETER :: Spn8ALgyb1 = 95 + INTEGER(IntKi), PARAMETER :: Spn8ALgzb1 = 96 + INTEGER(IntKi), PARAMETER :: Spn9ALgxb1 = 97 + INTEGER(IntKi), PARAMETER :: Spn9ALgyb1 = 98 + INTEGER(IntKi), PARAMETER :: Spn9ALgzb1 = 99 + INTEGER(IntKi), PARAMETER :: Spn1TDxb1 = 100 + INTEGER(IntKi), PARAMETER :: Spn1TDyb1 = 101 + INTEGER(IntKi), PARAMETER :: Spn1TDzb1 = 102 + INTEGER(IntKi), PARAMETER :: Spn2TDxb1 = 103 + INTEGER(IntKi), PARAMETER :: Spn2TDyb1 = 104 + INTEGER(IntKi), PARAMETER :: Spn2TDzb1 = 105 + INTEGER(IntKi), PARAMETER :: Spn3TDxb1 = 106 + INTEGER(IntKi), PARAMETER :: Spn3TDyb1 = 107 + INTEGER(IntKi), PARAMETER :: Spn3TDzb1 = 108 + INTEGER(IntKi), PARAMETER :: Spn4TDxb1 = 109 + INTEGER(IntKi), PARAMETER :: Spn4TDyb1 = 110 + INTEGER(IntKi), PARAMETER :: Spn4TDzb1 = 111 + INTEGER(IntKi), PARAMETER :: Spn5TDxb1 = 112 + INTEGER(IntKi), PARAMETER :: Spn5TDyb1 = 113 + INTEGER(IntKi), PARAMETER :: Spn5TDzb1 = 114 + INTEGER(IntKi), PARAMETER :: Spn6TDxb1 = 115 + INTEGER(IntKi), PARAMETER :: Spn6TDyb1 = 116 + INTEGER(IntKi), PARAMETER :: Spn6TDzb1 = 117 + INTEGER(IntKi), PARAMETER :: Spn7TDxb1 = 118 + INTEGER(IntKi), PARAMETER :: Spn7TDyb1 = 119 + INTEGER(IntKi), PARAMETER :: Spn7TDzb1 = 120 + INTEGER(IntKi), PARAMETER :: Spn8TDxb1 = 121 + INTEGER(IntKi), PARAMETER :: Spn8TDyb1 = 122 + INTEGER(IntKi), PARAMETER :: Spn8TDzb1 = 123 + INTEGER(IntKi), PARAMETER :: Spn9TDxb1 = 124 + INTEGER(IntKi), PARAMETER :: Spn9TDyb1 = 125 + INTEGER(IntKi), PARAMETER :: Spn9TDzb1 = 126 + INTEGER(IntKi), PARAMETER :: Spn1RDxb1 = 127 + INTEGER(IntKi), PARAMETER :: Spn1RDyb1 = 128 + INTEGER(IntKi), PARAMETER :: Spn1RDzb1 = 129 + INTEGER(IntKi), PARAMETER :: Spn2RDxb1 = 130 + INTEGER(IntKi), PARAMETER :: Spn2RDyb1 = 131 + INTEGER(IntKi), PARAMETER :: Spn2RDzb1 = 132 + INTEGER(IntKi), PARAMETER :: Spn3RDxb1 = 133 + INTEGER(IntKi), PARAMETER :: Spn3RDyb1 = 134 + INTEGER(IntKi), PARAMETER :: Spn3RDzb1 = 135 + INTEGER(IntKi), PARAMETER :: Spn4RDxb1 = 136 + INTEGER(IntKi), PARAMETER :: Spn4RDyb1 = 137 + INTEGER(IntKi), PARAMETER :: Spn4RDzb1 = 138 + INTEGER(IntKi), PARAMETER :: Spn5RDxb1 = 139 + INTEGER(IntKi), PARAMETER :: Spn5RDyb1 = 140 + INTEGER(IntKi), PARAMETER :: Spn5RDzb1 = 141 + INTEGER(IntKi), PARAMETER :: Spn6RDxb1 = 142 + INTEGER(IntKi), PARAMETER :: Spn6RDyb1 = 143 + INTEGER(IntKi), PARAMETER :: Spn6RDzb1 = 144 + INTEGER(IntKi), PARAMETER :: Spn7RDxb1 = 145 + INTEGER(IntKi), PARAMETER :: Spn7RDyb1 = 146 + INTEGER(IntKi), PARAMETER :: Spn7RDzb1 = 147 + INTEGER(IntKi), PARAMETER :: Spn8RDxb1 = 148 + INTEGER(IntKi), PARAMETER :: Spn8RDyb1 = 149 + INTEGER(IntKi), PARAMETER :: Spn8RDzb1 = 150 + INTEGER(IntKi), PARAMETER :: Spn9RDxb1 = 151 + INTEGER(IntKi), PARAMETER :: Spn9RDyb1 = 152 + INTEGER(IntKi), PARAMETER :: Spn9RDzb1 = 153 ! Blade 2 Local Span Motions: - INTEGER(IntKi), PARAMETER :: Spn1ALxb2 = 118 - INTEGER(IntKi), PARAMETER :: Spn1ALyb2 = 119 - INTEGER(IntKi), PARAMETER :: Spn1ALzb2 = 120 - INTEGER(IntKi), PARAMETER :: Spn2ALxb2 = 121 - INTEGER(IntKi), PARAMETER :: Spn2ALyb2 = 122 - INTEGER(IntKi), PARAMETER :: Spn2ALzb2 = 123 - INTEGER(IntKi), PARAMETER :: Spn3ALxb2 = 124 - INTEGER(IntKi), PARAMETER :: Spn3ALyb2 = 125 - INTEGER(IntKi), PARAMETER :: Spn3ALzb2 = 126 - INTEGER(IntKi), PARAMETER :: Spn4ALxb2 = 127 - INTEGER(IntKi), PARAMETER :: Spn4ALyb2 = 128 - INTEGER(IntKi), PARAMETER :: Spn4ALzb2 = 129 - INTEGER(IntKi), PARAMETER :: Spn5ALxb2 = 130 - INTEGER(IntKi), PARAMETER :: Spn5ALyb2 = 131 - INTEGER(IntKi), PARAMETER :: Spn5ALzb2 = 132 - INTEGER(IntKi), PARAMETER :: Spn6ALxb2 = 133 - INTEGER(IntKi), PARAMETER :: Spn6ALyb2 = 134 - INTEGER(IntKi), PARAMETER :: Spn6ALzb2 = 135 - INTEGER(IntKi), PARAMETER :: Spn7ALxb2 = 136 - INTEGER(IntKi), PARAMETER :: Spn7ALyb2 = 137 - INTEGER(IntKi), PARAMETER :: Spn7ALzb2 = 138 - INTEGER(IntKi), PARAMETER :: Spn8ALxb2 = 139 - INTEGER(IntKi), PARAMETER :: Spn8ALyb2 = 140 - INTEGER(IntKi), PARAMETER :: Spn8ALzb2 = 141 - INTEGER(IntKi), PARAMETER :: Spn9ALxb2 = 142 - INTEGER(IntKi), PARAMETER :: Spn9ALyb2 = 143 - INTEGER(IntKi), PARAMETER :: Spn9ALzb2 = 144 - INTEGER(IntKi), PARAMETER :: Spn1TDxb2 = 145 - INTEGER(IntKi), PARAMETER :: Spn1TDyb2 = 146 - INTEGER(IntKi), PARAMETER :: Spn1TDzb2 = 147 - INTEGER(IntKi), PARAMETER :: Spn2TDxb2 = 148 - INTEGER(IntKi), PARAMETER :: Spn2TDyb2 = 149 - INTEGER(IntKi), PARAMETER :: Spn2TDzb2 = 150 - INTEGER(IntKi), PARAMETER :: Spn3TDxb2 = 151 - INTEGER(IntKi), PARAMETER :: Spn3TDyb2 = 152 - INTEGER(IntKi), PARAMETER :: Spn3TDzb2 = 153 - INTEGER(IntKi), PARAMETER :: Spn4TDxb2 = 154 - INTEGER(IntKi), PARAMETER :: Spn4TDyb2 = 155 - INTEGER(IntKi), PARAMETER :: Spn4TDzb2 = 156 - INTEGER(IntKi), PARAMETER :: Spn5TDxb2 = 157 - INTEGER(IntKi), PARAMETER :: Spn5TDyb2 = 158 - INTEGER(IntKi), PARAMETER :: Spn5TDzb2 = 159 - INTEGER(IntKi), PARAMETER :: Spn6TDxb2 = 160 - INTEGER(IntKi), PARAMETER :: Spn6TDyb2 = 161 - INTEGER(IntKi), PARAMETER :: Spn6TDzb2 = 162 - INTEGER(IntKi), PARAMETER :: Spn7TDxb2 = 163 - INTEGER(IntKi), PARAMETER :: Spn7TDyb2 = 164 - INTEGER(IntKi), PARAMETER :: Spn7TDzb2 = 165 - INTEGER(IntKi), PARAMETER :: Spn8TDxb2 = 166 - INTEGER(IntKi), PARAMETER :: Spn8TDyb2 = 167 - INTEGER(IntKi), PARAMETER :: Spn8TDzb2 = 168 - INTEGER(IntKi), PARAMETER :: Spn9TDxb2 = 169 - INTEGER(IntKi), PARAMETER :: Spn9TDyb2 = 170 - INTEGER(IntKi), PARAMETER :: Spn9TDzb2 = 171 - INTEGER(IntKi), PARAMETER :: Spn1RDxb2 = 172 - INTEGER(IntKi), PARAMETER :: Spn1RDyb2 = 173 - INTEGER(IntKi), PARAMETER :: Spn1RDzb2 = 174 - INTEGER(IntKi), PARAMETER :: Spn2RDxb2 = 175 - INTEGER(IntKi), PARAMETER :: Spn2RDyb2 = 176 - INTEGER(IntKi), PARAMETER :: Spn2RDzb2 = 177 - INTEGER(IntKi), PARAMETER :: Spn3RDxb2 = 178 - INTEGER(IntKi), PARAMETER :: Spn3RDyb2 = 179 - INTEGER(IntKi), PARAMETER :: Spn3RDzb2 = 180 - INTEGER(IntKi), PARAMETER :: Spn4RDxb2 = 181 - INTEGER(IntKi), PARAMETER :: Spn4RDyb2 = 182 - INTEGER(IntKi), PARAMETER :: Spn4RDzb2 = 183 - INTEGER(IntKi), PARAMETER :: Spn5RDxb2 = 184 - INTEGER(IntKi), PARAMETER :: Spn5RDyb2 = 185 - INTEGER(IntKi), PARAMETER :: Spn5RDzb2 = 186 - INTEGER(IntKi), PARAMETER :: Spn6RDxb2 = 187 - INTEGER(IntKi), PARAMETER :: Spn6RDyb2 = 188 - INTEGER(IntKi), PARAMETER :: Spn6RDzb2 = 189 - INTEGER(IntKi), PARAMETER :: Spn7RDxb2 = 190 - INTEGER(IntKi), PARAMETER :: Spn7RDyb2 = 191 - INTEGER(IntKi), PARAMETER :: Spn7RDzb2 = 192 - INTEGER(IntKi), PARAMETER :: Spn8RDxb2 = 193 - INTEGER(IntKi), PARAMETER :: Spn8RDyb2 = 194 - INTEGER(IntKi), PARAMETER :: Spn8RDzb2 = 195 - INTEGER(IntKi), PARAMETER :: Spn9RDxb2 = 196 - INTEGER(IntKi), PARAMETER :: Spn9RDyb2 = 197 - INTEGER(IntKi), PARAMETER :: Spn9RDzb2 = 198 + INTEGER(IntKi), PARAMETER :: Spn1ALxb2 = 154 + INTEGER(IntKi), PARAMETER :: Spn1ALyb2 = 155 + INTEGER(IntKi), PARAMETER :: Spn1ALzb2 = 156 + INTEGER(IntKi), PARAMETER :: Spn2ALxb2 = 157 + INTEGER(IntKi), PARAMETER :: Spn2ALyb2 = 158 + INTEGER(IntKi), PARAMETER :: Spn2ALzb2 = 159 + INTEGER(IntKi), PARAMETER :: Spn3ALxb2 = 160 + INTEGER(IntKi), PARAMETER :: Spn3ALyb2 = 161 + INTEGER(IntKi), PARAMETER :: Spn3ALzb2 = 162 + INTEGER(IntKi), PARAMETER :: Spn4ALxb2 = 163 + INTEGER(IntKi), PARAMETER :: Spn4ALyb2 = 164 + INTEGER(IntKi), PARAMETER :: Spn4ALzb2 = 165 + INTEGER(IntKi), PARAMETER :: Spn5ALxb2 = 166 + INTEGER(IntKi), PARAMETER :: Spn5ALyb2 = 167 + INTEGER(IntKi), PARAMETER :: Spn5ALzb2 = 168 + INTEGER(IntKi), PARAMETER :: Spn6ALxb2 = 169 + INTEGER(IntKi), PARAMETER :: Spn6ALyb2 = 170 + INTEGER(IntKi), PARAMETER :: Spn6ALzb2 = 171 + INTEGER(IntKi), PARAMETER :: Spn7ALxb2 = 172 + INTEGER(IntKi), PARAMETER :: Spn7ALyb2 = 173 + INTEGER(IntKi), PARAMETER :: Spn7ALzb2 = 174 + INTEGER(IntKi), PARAMETER :: Spn8ALxb2 = 175 + INTEGER(IntKi), PARAMETER :: Spn8ALyb2 = 176 + INTEGER(IntKi), PARAMETER :: Spn8ALzb2 = 177 + INTEGER(IntKi), PARAMETER :: Spn9ALxb2 = 178 + INTEGER(IntKi), PARAMETER :: Spn9ALyb2 = 179 + INTEGER(IntKi), PARAMETER :: Spn9ALzb2 = 180 + INTEGER(IntKi), PARAMETER :: Spn1ALgxb2 = 181 + INTEGER(IntKi), PARAMETER :: Spn1ALgyb2 = 182 + INTEGER(IntKi), PARAMETER :: Spn1ALgzb2 = 183 + INTEGER(IntKi), PARAMETER :: Spn2ALgxb2 = 184 + INTEGER(IntKi), PARAMETER :: Spn2ALgyb2 = 185 + INTEGER(IntKi), PARAMETER :: Spn2ALgzb2 = 186 + INTEGER(IntKi), PARAMETER :: Spn3ALgxb2 = 187 + INTEGER(IntKi), PARAMETER :: Spn3ALgyb2 = 188 + INTEGER(IntKi), PARAMETER :: Spn3ALgzb2 = 189 + INTEGER(IntKi), PARAMETER :: Spn4ALgxb2 = 190 + INTEGER(IntKi), PARAMETER :: Spn4ALgyb2 = 191 + INTEGER(IntKi), PARAMETER :: Spn4ALgzb2 = 192 + INTEGER(IntKi), PARAMETER :: Spn5ALgxb2 = 193 + INTEGER(IntKi), PARAMETER :: Spn5ALgyb2 = 194 + INTEGER(IntKi), PARAMETER :: Spn5ALgzb2 = 195 + INTEGER(IntKi), PARAMETER :: Spn6ALgxb2 = 196 + INTEGER(IntKi), PARAMETER :: Spn6ALgyb2 = 197 + INTEGER(IntKi), PARAMETER :: Spn6ALgzb2 = 198 + INTEGER(IntKi), PARAMETER :: Spn7ALgxb2 = 199 + INTEGER(IntKi), PARAMETER :: Spn7ALgyb2 = 200 + INTEGER(IntKi), PARAMETER :: Spn7ALgzb2 = 201 + INTEGER(IntKi), PARAMETER :: Spn8ALgxb2 = 202 + INTEGER(IntKi), PARAMETER :: Spn8ALgyb2 = 203 + INTEGER(IntKi), PARAMETER :: Spn8ALgzb2 = 204 + INTEGER(IntKi), PARAMETER :: Spn9ALgxb2 = 205 + INTEGER(IntKi), PARAMETER :: Spn9ALgyb2 = 206 + INTEGER(IntKi), PARAMETER :: Spn9ALgzb2 = 207 + INTEGER(IntKi), PARAMETER :: Spn1TDxb2 = 208 + INTEGER(IntKi), PARAMETER :: Spn1TDyb2 = 209 + INTEGER(IntKi), PARAMETER :: Spn1TDzb2 = 210 + INTEGER(IntKi), PARAMETER :: Spn2TDxb2 = 211 + INTEGER(IntKi), PARAMETER :: Spn2TDyb2 = 212 + INTEGER(IntKi), PARAMETER :: Spn2TDzb2 = 213 + INTEGER(IntKi), PARAMETER :: Spn3TDxb2 = 214 + INTEGER(IntKi), PARAMETER :: Spn3TDyb2 = 215 + INTEGER(IntKi), PARAMETER :: Spn3TDzb2 = 216 + INTEGER(IntKi), PARAMETER :: Spn4TDxb2 = 217 + INTEGER(IntKi), PARAMETER :: Spn4TDyb2 = 218 + INTEGER(IntKi), PARAMETER :: Spn4TDzb2 = 219 + INTEGER(IntKi), PARAMETER :: Spn5TDxb2 = 220 + INTEGER(IntKi), PARAMETER :: Spn5TDyb2 = 221 + INTEGER(IntKi), PARAMETER :: Spn5TDzb2 = 222 + INTEGER(IntKi), PARAMETER :: Spn6TDxb2 = 223 + INTEGER(IntKi), PARAMETER :: Spn6TDyb2 = 224 + INTEGER(IntKi), PARAMETER :: Spn6TDzb2 = 225 + INTEGER(IntKi), PARAMETER :: Spn7TDxb2 = 226 + INTEGER(IntKi), PARAMETER :: Spn7TDyb2 = 227 + INTEGER(IntKi), PARAMETER :: Spn7TDzb2 = 228 + INTEGER(IntKi), PARAMETER :: Spn8TDxb2 = 229 + INTEGER(IntKi), PARAMETER :: Spn8TDyb2 = 230 + INTEGER(IntKi), PARAMETER :: Spn8TDzb2 = 231 + INTEGER(IntKi), PARAMETER :: Spn9TDxb2 = 232 + INTEGER(IntKi), PARAMETER :: Spn9TDyb2 = 233 + INTEGER(IntKi), PARAMETER :: Spn9TDzb2 = 234 + INTEGER(IntKi), PARAMETER :: Spn1RDxb2 = 235 + INTEGER(IntKi), PARAMETER :: Spn1RDyb2 = 236 + INTEGER(IntKi), PARAMETER :: Spn1RDzb2 = 237 + INTEGER(IntKi), PARAMETER :: Spn2RDxb2 = 238 + INTEGER(IntKi), PARAMETER :: Spn2RDyb2 = 239 + INTEGER(IntKi), PARAMETER :: Spn2RDzb2 = 240 + INTEGER(IntKi), PARAMETER :: Spn3RDxb2 = 241 + INTEGER(IntKi), PARAMETER :: Spn3RDyb2 = 242 + INTEGER(IntKi), PARAMETER :: Spn3RDzb2 = 243 + INTEGER(IntKi), PARAMETER :: Spn4RDxb2 = 244 + INTEGER(IntKi), PARAMETER :: Spn4RDyb2 = 245 + INTEGER(IntKi), PARAMETER :: Spn4RDzb2 = 246 + INTEGER(IntKi), PARAMETER :: Spn5RDxb2 = 247 + INTEGER(IntKi), PARAMETER :: Spn5RDyb2 = 248 + INTEGER(IntKi), PARAMETER :: Spn5RDzb2 = 249 + INTEGER(IntKi), PARAMETER :: Spn6RDxb2 = 250 + INTEGER(IntKi), PARAMETER :: Spn6RDyb2 = 251 + INTEGER(IntKi), PARAMETER :: Spn6RDzb2 = 252 + INTEGER(IntKi), PARAMETER :: Spn7RDxb2 = 253 + INTEGER(IntKi), PARAMETER :: Spn7RDyb2 = 254 + INTEGER(IntKi), PARAMETER :: Spn7RDzb2 = 255 + INTEGER(IntKi), PARAMETER :: Spn8RDxb2 = 256 + INTEGER(IntKi), PARAMETER :: Spn8RDyb2 = 257 + INTEGER(IntKi), PARAMETER :: Spn8RDzb2 = 258 + INTEGER(IntKi), PARAMETER :: Spn9RDxb2 = 259 + INTEGER(IntKi), PARAMETER :: Spn9RDyb2 = 260 + INTEGER(IntKi), PARAMETER :: Spn9RDzb2 = 261 ! Blade 3 Local Span Motions: - INTEGER(IntKi), PARAMETER :: Spn1ALxb3 = 199 - INTEGER(IntKi), PARAMETER :: Spn1ALyb3 = 200 - INTEGER(IntKi), PARAMETER :: Spn1ALzb3 = 201 - INTEGER(IntKi), PARAMETER :: Spn2ALxb3 = 202 - INTEGER(IntKi), PARAMETER :: Spn2ALyb3 = 203 - INTEGER(IntKi), PARAMETER :: Spn2ALzb3 = 204 - INTEGER(IntKi), PARAMETER :: Spn3ALxb3 = 205 - INTEGER(IntKi), PARAMETER :: Spn3ALyb3 = 206 - INTEGER(IntKi), PARAMETER :: Spn3ALzb3 = 207 - INTEGER(IntKi), PARAMETER :: Spn4ALxb3 = 208 - INTEGER(IntKi), PARAMETER :: Spn4ALyb3 = 209 - INTEGER(IntKi), PARAMETER :: Spn4ALzb3 = 210 - INTEGER(IntKi), PARAMETER :: Spn5ALxb3 = 211 - INTEGER(IntKi), PARAMETER :: Spn5ALyb3 = 212 - INTEGER(IntKi), PARAMETER :: Spn5ALzb3 = 213 - INTEGER(IntKi), PARAMETER :: Spn6ALxb3 = 214 - INTEGER(IntKi), PARAMETER :: Spn6ALyb3 = 215 - INTEGER(IntKi), PARAMETER :: Spn6ALzb3 = 216 - INTEGER(IntKi), PARAMETER :: Spn7ALxb3 = 217 - INTEGER(IntKi), PARAMETER :: Spn7ALyb3 = 218 - INTEGER(IntKi), PARAMETER :: Spn7ALzb3 = 219 - INTEGER(IntKi), PARAMETER :: Spn8ALxb3 = 220 - INTEGER(IntKi), PARAMETER :: Spn8ALyb3 = 221 - INTEGER(IntKi), PARAMETER :: Spn8ALzb3 = 222 - INTEGER(IntKi), PARAMETER :: Spn9ALxb3 = 223 - INTEGER(IntKi), PARAMETER :: Spn9ALyb3 = 224 - INTEGER(IntKi), PARAMETER :: Spn9ALzb3 = 225 - INTEGER(IntKi), PARAMETER :: Spn1TDxb3 = 226 - INTEGER(IntKi), PARAMETER :: Spn1TDyb3 = 227 - INTEGER(IntKi), PARAMETER :: Spn1TDzb3 = 228 - INTEGER(IntKi), PARAMETER :: Spn2TDxb3 = 229 - INTEGER(IntKi), PARAMETER :: Spn2TDyb3 = 230 - INTEGER(IntKi), PARAMETER :: Spn2TDzb3 = 231 - INTEGER(IntKi), PARAMETER :: Spn3TDxb3 = 232 - INTEGER(IntKi), PARAMETER :: Spn3TDyb3 = 233 - INTEGER(IntKi), PARAMETER :: Spn3TDzb3 = 234 - INTEGER(IntKi), PARAMETER :: Spn4TDxb3 = 235 - INTEGER(IntKi), PARAMETER :: Spn4TDyb3 = 236 - INTEGER(IntKi), PARAMETER :: Spn4TDzb3 = 237 - INTEGER(IntKi), PARAMETER :: Spn5TDxb3 = 238 - INTEGER(IntKi), PARAMETER :: Spn5TDyb3 = 239 - INTEGER(IntKi), PARAMETER :: Spn5TDzb3 = 240 - INTEGER(IntKi), PARAMETER :: Spn6TDxb3 = 241 - INTEGER(IntKi), PARAMETER :: Spn6TDyb3 = 242 - INTEGER(IntKi), PARAMETER :: Spn6TDzb3 = 243 - INTEGER(IntKi), PARAMETER :: Spn7TDxb3 = 244 - INTEGER(IntKi), PARAMETER :: Spn7TDyb3 = 245 - INTEGER(IntKi), PARAMETER :: Spn7TDzb3 = 246 - INTEGER(IntKi), PARAMETER :: Spn8TDxb3 = 247 - INTEGER(IntKi), PARAMETER :: Spn8TDyb3 = 248 - INTEGER(IntKi), PARAMETER :: Spn8TDzb3 = 249 - INTEGER(IntKi), PARAMETER :: Spn9TDxb3 = 250 - INTEGER(IntKi), PARAMETER :: Spn9TDyb3 = 251 - INTEGER(IntKi), PARAMETER :: Spn9TDzb3 = 252 - INTEGER(IntKi), PARAMETER :: Spn1RDxb3 = 253 - INTEGER(IntKi), PARAMETER :: Spn1RDyb3 = 254 - INTEGER(IntKi), PARAMETER :: Spn1RDzb3 = 255 - INTEGER(IntKi), PARAMETER :: Spn2RDxb3 = 256 - INTEGER(IntKi), PARAMETER :: Spn2RDyb3 = 257 - INTEGER(IntKi), PARAMETER :: Spn2RDzb3 = 258 - INTEGER(IntKi), PARAMETER :: Spn3RDxb3 = 259 - INTEGER(IntKi), PARAMETER :: Spn3RDyb3 = 260 - INTEGER(IntKi), PARAMETER :: Spn3RDzb3 = 261 - INTEGER(IntKi), PARAMETER :: Spn4RDxb3 = 262 - INTEGER(IntKi), PARAMETER :: Spn4RDyb3 = 263 - INTEGER(IntKi), PARAMETER :: Spn4RDzb3 = 264 - INTEGER(IntKi), PARAMETER :: Spn5RDxb3 = 265 - INTEGER(IntKi), PARAMETER :: Spn5RDyb3 = 266 - INTEGER(IntKi), PARAMETER :: Spn5RDzb3 = 267 - INTEGER(IntKi), PARAMETER :: Spn6RDxb3 = 268 - INTEGER(IntKi), PARAMETER :: Spn6RDyb3 = 269 - INTEGER(IntKi), PARAMETER :: Spn6RDzb3 = 270 - INTEGER(IntKi), PARAMETER :: Spn7RDxb3 = 271 - INTEGER(IntKi), PARAMETER :: Spn7RDyb3 = 272 - INTEGER(IntKi), PARAMETER :: Spn7RDzb3 = 273 - INTEGER(IntKi), PARAMETER :: Spn8RDxb3 = 274 - INTEGER(IntKi), PARAMETER :: Spn8RDyb3 = 275 - INTEGER(IntKi), PARAMETER :: Spn8RDzb3 = 276 - INTEGER(IntKi), PARAMETER :: Spn9RDxb3 = 277 - INTEGER(IntKi), PARAMETER :: Spn9RDyb3 = 278 - INTEGER(IntKi), PARAMETER :: Spn9RDzb3 = 279 + INTEGER(IntKi), PARAMETER :: Spn1ALxb3 = 262 + INTEGER(IntKi), PARAMETER :: Spn1ALyb3 = 263 + INTEGER(IntKi), PARAMETER :: Spn1ALzb3 = 264 + INTEGER(IntKi), PARAMETER :: Spn2ALxb3 = 265 + INTEGER(IntKi), PARAMETER :: Spn2ALyb3 = 266 + INTEGER(IntKi), PARAMETER :: Spn2ALzb3 = 267 + INTEGER(IntKi), PARAMETER :: Spn3ALxb3 = 268 + INTEGER(IntKi), PARAMETER :: Spn3ALyb3 = 269 + INTEGER(IntKi), PARAMETER :: Spn3ALzb3 = 270 + INTEGER(IntKi), PARAMETER :: Spn4ALxb3 = 271 + INTEGER(IntKi), PARAMETER :: Spn4ALyb3 = 272 + INTEGER(IntKi), PARAMETER :: Spn4ALzb3 = 273 + INTEGER(IntKi), PARAMETER :: Spn5ALxb3 = 274 + INTEGER(IntKi), PARAMETER :: Spn5ALyb3 = 275 + INTEGER(IntKi), PARAMETER :: Spn5ALzb3 = 276 + INTEGER(IntKi), PARAMETER :: Spn6ALxb3 = 277 + INTEGER(IntKi), PARAMETER :: Spn6ALyb3 = 278 + INTEGER(IntKi), PARAMETER :: Spn6ALzb3 = 279 + INTEGER(IntKi), PARAMETER :: Spn7ALxb3 = 280 + INTEGER(IntKi), PARAMETER :: Spn7ALyb3 = 281 + INTEGER(IntKi), PARAMETER :: Spn7ALzb3 = 282 + INTEGER(IntKi), PARAMETER :: Spn8ALxb3 = 283 + INTEGER(IntKi), PARAMETER :: Spn8ALyb3 = 284 + INTEGER(IntKi), PARAMETER :: Spn8ALzb3 = 285 + INTEGER(IntKi), PARAMETER :: Spn9ALxb3 = 286 + INTEGER(IntKi), PARAMETER :: Spn9ALyb3 = 287 + INTEGER(IntKi), PARAMETER :: Spn9ALzb3 = 288 + INTEGER(IntKi), PARAMETER :: Spn1ALgxb3 = 289 + INTEGER(IntKi), PARAMETER :: Spn1ALgyb3 = 290 + INTEGER(IntKi), PARAMETER :: Spn1ALgzb3 = 291 + INTEGER(IntKi), PARAMETER :: Spn2ALgxb3 = 292 + INTEGER(IntKi), PARAMETER :: Spn2ALgyb3 = 293 + INTEGER(IntKi), PARAMETER :: Spn2ALgzb3 = 294 + INTEGER(IntKi), PARAMETER :: Spn3ALgxb3 = 295 + INTEGER(IntKi), PARAMETER :: Spn3ALgyb3 = 296 + INTEGER(IntKi), PARAMETER :: Spn3ALgzb3 = 297 + INTEGER(IntKi), PARAMETER :: Spn4ALgxb3 = 298 + INTEGER(IntKi), PARAMETER :: Spn4ALgyb3 = 299 + INTEGER(IntKi), PARAMETER :: Spn4ALgzb3 = 300 + INTEGER(IntKi), PARAMETER :: Spn5ALgxb3 = 301 + INTEGER(IntKi), PARAMETER :: Spn5ALgyb3 = 302 + INTEGER(IntKi), PARAMETER :: Spn5ALgzb3 = 303 + INTEGER(IntKi), PARAMETER :: Spn6ALgxb3 = 304 + INTEGER(IntKi), PARAMETER :: Spn6ALgyb3 = 305 + INTEGER(IntKi), PARAMETER :: Spn6ALgzb3 = 306 + INTEGER(IntKi), PARAMETER :: Spn7ALgxb3 = 307 + INTEGER(IntKi), PARAMETER :: Spn7ALgyb3 = 308 + INTEGER(IntKi), PARAMETER :: Spn7ALgzb3 = 309 + INTEGER(IntKi), PARAMETER :: Spn8ALgxb3 = 310 + INTEGER(IntKi), PARAMETER :: Spn8ALgyb3 = 311 + INTEGER(IntKi), PARAMETER :: Spn8ALgzb3 = 312 + INTEGER(IntKi), PARAMETER :: Spn9ALgxb3 = 313 + INTEGER(IntKi), PARAMETER :: Spn9ALgyb3 = 314 + INTEGER(IntKi), PARAMETER :: Spn9ALgzb3 = 315 + INTEGER(IntKi), PARAMETER :: Spn1TDxb3 = 316 + INTEGER(IntKi), PARAMETER :: Spn1TDyb3 = 317 + INTEGER(IntKi), PARAMETER :: Spn1TDzb3 = 318 + INTEGER(IntKi), PARAMETER :: Spn2TDxb3 = 319 + INTEGER(IntKi), PARAMETER :: Spn2TDyb3 = 320 + INTEGER(IntKi), PARAMETER :: Spn2TDzb3 = 321 + INTEGER(IntKi), PARAMETER :: Spn3TDxb3 = 322 + INTEGER(IntKi), PARAMETER :: Spn3TDyb3 = 323 + INTEGER(IntKi), PARAMETER :: Spn3TDzb3 = 324 + INTEGER(IntKi), PARAMETER :: Spn4TDxb3 = 325 + INTEGER(IntKi), PARAMETER :: Spn4TDyb3 = 326 + INTEGER(IntKi), PARAMETER :: Spn4TDzb3 = 327 + INTEGER(IntKi), PARAMETER :: Spn5TDxb3 = 328 + INTEGER(IntKi), PARAMETER :: Spn5TDyb3 = 329 + INTEGER(IntKi), PARAMETER :: Spn5TDzb3 = 330 + INTEGER(IntKi), PARAMETER :: Spn6TDxb3 = 331 + INTEGER(IntKi), PARAMETER :: Spn6TDyb3 = 332 + INTEGER(IntKi), PARAMETER :: Spn6TDzb3 = 333 + INTEGER(IntKi), PARAMETER :: Spn7TDxb3 = 334 + INTEGER(IntKi), PARAMETER :: Spn7TDyb3 = 335 + INTEGER(IntKi), PARAMETER :: Spn7TDzb3 = 336 + INTEGER(IntKi), PARAMETER :: Spn8TDxb3 = 337 + INTEGER(IntKi), PARAMETER :: Spn8TDyb3 = 338 + INTEGER(IntKi), PARAMETER :: Spn8TDzb3 = 339 + INTEGER(IntKi), PARAMETER :: Spn9TDxb3 = 340 + INTEGER(IntKi), PARAMETER :: Spn9TDyb3 = 341 + INTEGER(IntKi), PARAMETER :: Spn9TDzb3 = 342 + INTEGER(IntKi), PARAMETER :: Spn1RDxb3 = 343 + INTEGER(IntKi), PARAMETER :: Spn1RDyb3 = 344 + INTEGER(IntKi), PARAMETER :: Spn1RDzb3 = 345 + INTEGER(IntKi), PARAMETER :: Spn2RDxb3 = 346 + INTEGER(IntKi), PARAMETER :: Spn2RDyb3 = 347 + INTEGER(IntKi), PARAMETER :: Spn2RDzb3 = 348 + INTEGER(IntKi), PARAMETER :: Spn3RDxb3 = 349 + INTEGER(IntKi), PARAMETER :: Spn3RDyb3 = 350 + INTEGER(IntKi), PARAMETER :: Spn3RDzb3 = 351 + INTEGER(IntKi), PARAMETER :: Spn4RDxb3 = 352 + INTEGER(IntKi), PARAMETER :: Spn4RDyb3 = 353 + INTEGER(IntKi), PARAMETER :: Spn4RDzb3 = 354 + INTEGER(IntKi), PARAMETER :: Spn5RDxb3 = 355 + INTEGER(IntKi), PARAMETER :: Spn5RDyb3 = 356 + INTEGER(IntKi), PARAMETER :: Spn5RDzb3 = 357 + INTEGER(IntKi), PARAMETER :: Spn6RDxb3 = 358 + INTEGER(IntKi), PARAMETER :: Spn6RDyb3 = 359 + INTEGER(IntKi), PARAMETER :: Spn6RDzb3 = 360 + INTEGER(IntKi), PARAMETER :: Spn7RDxb3 = 361 + INTEGER(IntKi), PARAMETER :: Spn7RDyb3 = 362 + INTEGER(IntKi), PARAMETER :: Spn7RDzb3 = 363 + INTEGER(IntKi), PARAMETER :: Spn8RDxb3 = 364 + INTEGER(IntKi), PARAMETER :: Spn8RDyb3 = 365 + INTEGER(IntKi), PARAMETER :: Spn8RDzb3 = 366 + INTEGER(IntKi), PARAMETER :: Spn9RDxb3 = 367 + INTEGER(IntKi), PARAMETER :: Spn9RDyb3 = 368 + INTEGER(IntKi), PARAMETER :: Spn9RDzb3 = 369 ! Blade Pitch Motions: - INTEGER(IntKi), PARAMETER :: PtchPMzc1 = 280 - INTEGER(IntKi), PARAMETER :: PtchPMzc2 = 281 - INTEGER(IntKi), PARAMETER :: PtchPMzc3 = 282 + INTEGER(IntKi), PARAMETER :: PtchPMzc1 = 370 + INTEGER(IntKi), PARAMETER :: PtchPMzc2 = 371 + INTEGER(IntKi), PARAMETER :: PtchPMzc3 = 372 ! Teeter Motions: - INTEGER(IntKi), PARAMETER :: TeetPya = 283 - INTEGER(IntKi), PARAMETER :: TeetVya = 284 - INTEGER(IntKi), PARAMETER :: TeetAya = 285 + INTEGER(IntKi), PARAMETER :: TeetPya = 373 + INTEGER(IntKi), PARAMETER :: TeetVya = 374 + INTEGER(IntKi), PARAMETER :: TeetAya = 375 ! Shaft Motions: - INTEGER(IntKi), PARAMETER :: LSSTipPxa = 286 - INTEGER(IntKi), PARAMETER :: LSSTipVxa = 287 - INTEGER(IntKi), PARAMETER :: LSSTipAxa = 288 - INTEGER(IntKi), PARAMETER :: LSSGagPxa = 289 - INTEGER(IntKi), PARAMETER :: LSSGagVxa = 290 - INTEGER(IntKi), PARAMETER :: LSSGagAxa = 291 - INTEGER(IntKi), PARAMETER :: HSShftV = 292 - INTEGER(IntKi), PARAMETER :: HSShftA = 293 + INTEGER(IntKi), PARAMETER :: LSSTipPxa = 376 + INTEGER(IntKi), PARAMETER :: LSSTipVxa = 377 + INTEGER(IntKi), PARAMETER :: LSSTipAxa = 378 + INTEGER(IntKi), PARAMETER :: LSSGagPxa = 379 + INTEGER(IntKi), PARAMETER :: LSSGagVxa = 380 + INTEGER(IntKi), PARAMETER :: LSSGagAxa = 381 + INTEGER(IntKi), PARAMETER :: HSShftV = 382 + INTEGER(IntKi), PARAMETER :: HSShftA = 383 ! Nacelle IMU Motions: - INTEGER(IntKi), PARAMETER :: NcIMUTVxs = 294 - INTEGER(IntKi), PARAMETER :: NcIMUTVys = 295 - INTEGER(IntKi), PARAMETER :: NcIMUTVzs = 296 - INTEGER(IntKi), PARAMETER :: NcIMUTAxs = 297 - INTEGER(IntKi), PARAMETER :: NcIMUTAys = 298 - INTEGER(IntKi), PARAMETER :: NcIMUTAzs = 299 - INTEGER(IntKi), PARAMETER :: NcIMURVxs = 300 - INTEGER(IntKi), PARAMETER :: NcIMURVys = 301 - INTEGER(IntKi), PARAMETER :: NcIMURVzs = 302 - INTEGER(IntKi), PARAMETER :: NcIMURAxs = 303 - INTEGER(IntKi), PARAMETER :: NcIMURAys = 304 - INTEGER(IntKi), PARAMETER :: NcIMURAzs = 305 + INTEGER(IntKi), PARAMETER :: NcIMUTVxs = 384 + INTEGER(IntKi), PARAMETER :: NcIMUTVys = 385 + INTEGER(IntKi), PARAMETER :: NcIMUTVzs = 386 + INTEGER(IntKi), PARAMETER :: NcIMUTAxs = 387 + INTEGER(IntKi), PARAMETER :: NcIMUTAys = 388 + INTEGER(IntKi), PARAMETER :: NcIMUTAzs = 389 + INTEGER(IntKi), PARAMETER :: NcIMUTAgxs = 390 + INTEGER(IntKi), PARAMETER :: NcIMUTAgys = 391 + INTEGER(IntKi), PARAMETER :: NcIMUTAgzs = 392 + INTEGER(IntKi), PARAMETER :: NcIMURVxs = 393 + INTEGER(IntKi), PARAMETER :: NcIMURVys = 394 + INTEGER(IntKi), PARAMETER :: NcIMURVzs = 395 + INTEGER(IntKi), PARAMETER :: NcIMURAxs = 396 + INTEGER(IntKi), PARAMETER :: NcIMURAys = 397 + INTEGER(IntKi), PARAMETER :: NcIMURAzs = 398 ! Rotor-Furl Motions: - INTEGER(IntKi), PARAMETER :: RotFurlP = 306 - INTEGER(IntKi), PARAMETER :: RotFurlV = 307 - INTEGER(IntKi), PARAMETER :: RotFurlA = 308 + INTEGER(IntKi), PARAMETER :: RotFurlP = 399 + INTEGER(IntKi), PARAMETER :: RotFurlV = 400 + INTEGER(IntKi), PARAMETER :: RotFurlA = 401 ! Tail-Furl Motions: - INTEGER(IntKi), PARAMETER :: TailFurlP = 309 - INTEGER(IntKi), PARAMETER :: TailFurlV = 310 - INTEGER(IntKi), PARAMETER :: TailFurlA = 311 + INTEGER(IntKi), PARAMETER :: TailFurlP = 402 + INTEGER(IntKi), PARAMETER :: TailFurlV = 403 + INTEGER(IntKi), PARAMETER :: TailFurlA = 404 ! Nacelle Yaw Motions: - INTEGER(IntKi), PARAMETER :: YawPzn = 312 - INTEGER(IntKi), PARAMETER :: YawVzn = 313 - INTEGER(IntKi), PARAMETER :: YawAzn = 314 + INTEGER(IntKi), PARAMETER :: YawPzn = 405 + INTEGER(IntKi), PARAMETER :: YawVzn = 406 + INTEGER(IntKi), PARAMETER :: YawAzn = 407 ! Tower-Top / Yaw Bearing Motions: - INTEGER(IntKi), PARAMETER :: TwrTpTDxi = 315 - INTEGER(IntKi), PARAMETER :: TwrTpTDyi = 316 - INTEGER(IntKi), PARAMETER :: TwrTpTDzi = 317 - INTEGER(IntKi), PARAMETER :: YawBrTDxp = 318 - INTEGER(IntKi), PARAMETER :: YawBrTDyp = 319 - INTEGER(IntKi), PARAMETER :: YawBrTDzp = 320 - INTEGER(IntKi), PARAMETER :: YawBrTDxt = 321 - INTEGER(IntKi), PARAMETER :: YawBrTDyt = 322 - INTEGER(IntKi), PARAMETER :: YawBrTDzt = 323 - INTEGER(IntKi), PARAMETER :: YawBrTVxp = 324 - INTEGER(IntKi), PARAMETER :: YawBrTVyp = 325 - INTEGER(IntKi), PARAMETER :: YawBrTVzp = 326 - INTEGER(IntKi), PARAMETER :: YawBrTAxp = 327 - INTEGER(IntKi), PARAMETER :: YawBrTAyp = 328 - INTEGER(IntKi), PARAMETER :: YawBrTAzp = 329 - INTEGER(IntKi), PARAMETER :: YawBrRDxt = 330 - INTEGER(IntKi), PARAMETER :: YawBrRDyt = 331 - INTEGER(IntKi), PARAMETER :: YawBrRDzt = 332 - INTEGER(IntKi), PARAMETER :: YawBrRVxp = 333 - INTEGER(IntKi), PARAMETER :: YawBrRVyp = 334 - INTEGER(IntKi), PARAMETER :: YawBrRVzp = 335 - INTEGER(IntKi), PARAMETER :: YawBrRAxp = 336 - INTEGER(IntKi), PARAMETER :: YawBrRAyp = 337 - INTEGER(IntKi), PARAMETER :: YawBrRAzp = 338 + INTEGER(IntKi), PARAMETER :: TwrTpTDxi = 408 + INTEGER(IntKi), PARAMETER :: TwrTpTDyi = 409 + INTEGER(IntKi), PARAMETER :: TwrTpTDzi = 410 + INTEGER(IntKi), PARAMETER :: YawBrTDxp = 411 + INTEGER(IntKi), PARAMETER :: YawBrTDyp = 412 + INTEGER(IntKi), PARAMETER :: YawBrTDzp = 413 + INTEGER(IntKi), PARAMETER :: YawBrTDxt = 414 + INTEGER(IntKi), PARAMETER :: YawBrTDyt = 415 + INTEGER(IntKi), PARAMETER :: YawBrTDzt = 416 + INTEGER(IntKi), PARAMETER :: YawBrTVxp = 417 + INTEGER(IntKi), PARAMETER :: YawBrTVyp = 418 + INTEGER(IntKi), PARAMETER :: YawBrTVzp = 419 + INTEGER(IntKi), PARAMETER :: YawBrTAxp = 420 + INTEGER(IntKi), PARAMETER :: YawBrTAyp = 421 + INTEGER(IntKi), PARAMETER :: YawBrTAzp = 422 + INTEGER(IntKi), PARAMETER :: YawBrTAgxp = 423 + INTEGER(IntKi), PARAMETER :: YawBrTAgyp = 424 + INTEGER(IntKi), PARAMETER :: YawBrTAgzp = 425 + INTEGER(IntKi), PARAMETER :: YawBrRDxt = 426 + INTEGER(IntKi), PARAMETER :: YawBrRDyt = 427 + INTEGER(IntKi), PARAMETER :: YawBrRDzt = 428 + INTEGER(IntKi), PARAMETER :: YawBrRVxp = 429 + INTEGER(IntKi), PARAMETER :: YawBrRVyp = 430 + INTEGER(IntKi), PARAMETER :: YawBrRVzp = 431 + INTEGER(IntKi), PARAMETER :: YawBrRAxp = 432 + INTEGER(IntKi), PARAMETER :: YawBrRAyp = 433 + INTEGER(IntKi), PARAMETER :: YawBrRAzp = 434 ! Local Tower Motions: - INTEGER(IntKi), PARAMETER :: TwHt1ALxt = 339 - INTEGER(IntKi), PARAMETER :: TwHt1ALyt = 340 - INTEGER(IntKi), PARAMETER :: TwHt1ALzt = 341 - INTEGER(IntKi), PARAMETER :: TwHt2ALxt = 342 - INTEGER(IntKi), PARAMETER :: TwHt2ALyt = 343 - INTEGER(IntKi), PARAMETER :: TwHt2ALzt = 344 - INTEGER(IntKi), PARAMETER :: TwHt3ALxt = 345 - INTEGER(IntKi), PARAMETER :: TwHt3ALyt = 346 - INTEGER(IntKi), PARAMETER :: TwHt3ALzt = 347 - INTEGER(IntKi), PARAMETER :: TwHt4ALxt = 348 - INTEGER(IntKi), PARAMETER :: TwHt4ALyt = 349 - INTEGER(IntKi), PARAMETER :: TwHt4ALzt = 350 - INTEGER(IntKi), PARAMETER :: TwHt5ALxt = 351 - INTEGER(IntKi), PARAMETER :: TwHt5ALyt = 352 - INTEGER(IntKi), PARAMETER :: TwHt5ALzt = 353 - INTEGER(IntKi), PARAMETER :: TwHt6ALxt = 354 - INTEGER(IntKi), PARAMETER :: TwHt6ALyt = 355 - INTEGER(IntKi), PARAMETER :: TwHt6ALzt = 356 - INTEGER(IntKi), PARAMETER :: TwHt7ALxt = 357 - INTEGER(IntKi), PARAMETER :: TwHt7ALyt = 358 - INTEGER(IntKi), PARAMETER :: TwHt7ALzt = 359 - INTEGER(IntKi), PARAMETER :: TwHt8ALxt = 360 - INTEGER(IntKi), PARAMETER :: TwHt8ALyt = 361 - INTEGER(IntKi), PARAMETER :: TwHt8ALzt = 362 - INTEGER(IntKi), PARAMETER :: TwHt9ALxt = 363 - INTEGER(IntKi), PARAMETER :: TwHt9ALyt = 364 - INTEGER(IntKi), PARAMETER :: TwHt9ALzt = 365 - INTEGER(IntKi), PARAMETER :: TwHt1TDxt = 366 - INTEGER(IntKi), PARAMETER :: TwHt1TDyt = 367 - INTEGER(IntKi), PARAMETER :: TwHt1TDzt = 368 - INTEGER(IntKi), PARAMETER :: TwHt2TDxt = 369 - INTEGER(IntKi), PARAMETER :: TwHt2TDyt = 370 - INTEGER(IntKi), PARAMETER :: TwHt2TDzt = 371 - INTEGER(IntKi), PARAMETER :: TwHt3TDxt = 372 - INTEGER(IntKi), PARAMETER :: TwHt3TDyt = 373 - INTEGER(IntKi), PARAMETER :: TwHt3TDzt = 374 - INTEGER(IntKi), PARAMETER :: TwHt4TDxt = 375 - INTEGER(IntKi), PARAMETER :: TwHt4TDyt = 376 - INTEGER(IntKi), PARAMETER :: TwHt4TDzt = 377 - INTEGER(IntKi), PARAMETER :: TwHt5TDxt = 378 - INTEGER(IntKi), PARAMETER :: TwHt5TDyt = 379 - INTEGER(IntKi), PARAMETER :: TwHt5TDzt = 380 - INTEGER(IntKi), PARAMETER :: TwHt6TDxt = 381 - INTEGER(IntKi), PARAMETER :: TwHt6TDyt = 382 - INTEGER(IntKi), PARAMETER :: TwHt6TDzt = 383 - INTEGER(IntKi), PARAMETER :: TwHt7TDxt = 384 - INTEGER(IntKi), PARAMETER :: TwHt7TDyt = 385 - INTEGER(IntKi), PARAMETER :: TwHt7TDzt = 386 - INTEGER(IntKi), PARAMETER :: TwHt8TDxt = 387 - INTEGER(IntKi), PARAMETER :: TwHt8TDyt = 388 - INTEGER(IntKi), PARAMETER :: TwHt8TDzt = 389 - INTEGER(IntKi), PARAMETER :: TwHt9TDxt = 390 - INTEGER(IntKi), PARAMETER :: TwHt9TDyt = 391 - INTEGER(IntKi), PARAMETER :: TwHt9TDzt = 392 - INTEGER(IntKi), PARAMETER :: TwHt1RDxt = 393 - INTEGER(IntKi), PARAMETER :: TwHt1RDyt = 394 - INTEGER(IntKi), PARAMETER :: TwHt1RDzt = 395 - INTEGER(IntKi), PARAMETER :: TwHt2RDxt = 396 - INTEGER(IntKi), PARAMETER :: TwHt2RDyt = 397 - INTEGER(IntKi), PARAMETER :: TwHt2RDzt = 398 - INTEGER(IntKi), PARAMETER :: TwHt3RDxt = 399 - INTEGER(IntKi), PARAMETER :: TwHt3RDyt = 400 - INTEGER(IntKi), PARAMETER :: TwHt3RDzt = 401 - INTEGER(IntKi), PARAMETER :: TwHt4RDxt = 402 - INTEGER(IntKi), PARAMETER :: TwHt4RDyt = 403 - INTEGER(IntKi), PARAMETER :: TwHt4RDzt = 404 - INTEGER(IntKi), PARAMETER :: TwHt5RDxt = 405 - INTEGER(IntKi), PARAMETER :: TwHt5RDyt = 406 - INTEGER(IntKi), PARAMETER :: TwHt5RDzt = 407 - INTEGER(IntKi), PARAMETER :: TwHt6RDxt = 408 - INTEGER(IntKi), PARAMETER :: TwHt6RDyt = 409 - INTEGER(IntKi), PARAMETER :: TwHt6RDzt = 410 - INTEGER(IntKi), PARAMETER :: TwHt7RDxt = 411 - INTEGER(IntKi), PARAMETER :: TwHt7RDyt = 412 - INTEGER(IntKi), PARAMETER :: TwHt7RDzt = 413 - INTEGER(IntKi), PARAMETER :: TwHt8RDxt = 414 - INTEGER(IntKi), PARAMETER :: TwHt8RDyt = 415 - INTEGER(IntKi), PARAMETER :: TwHt8RDzt = 416 - INTEGER(IntKi), PARAMETER :: TwHt9RDxt = 417 - INTEGER(IntKi), PARAMETER :: TwHt9RDyt = 418 - INTEGER(IntKi), PARAMETER :: TwHt9RDzt = 419 - INTEGER(IntKi), PARAMETER :: TwHt1TPxi = 420 - INTEGER(IntKi), PARAMETER :: TwHt1TPyi = 421 - INTEGER(IntKi), PARAMETER :: TwHt1TPzi = 422 - INTEGER(IntKi), PARAMETER :: TwHt2TPxi = 423 - INTEGER(IntKi), PARAMETER :: TwHt2TPyi = 424 - INTEGER(IntKi), PARAMETER :: TwHt2TPzi = 425 - INTEGER(IntKi), PARAMETER :: TwHt3TPxi = 426 - INTEGER(IntKi), PARAMETER :: TwHt3TPyi = 427 - INTEGER(IntKi), PARAMETER :: TwHt3TPzi = 428 - INTEGER(IntKi), PARAMETER :: TwHt4TPxi = 429 - INTEGER(IntKi), PARAMETER :: TwHt4TPyi = 430 - INTEGER(IntKi), PARAMETER :: TwHt4TPzi = 431 - INTEGER(IntKi), PARAMETER :: TwHt5TPxi = 432 - INTEGER(IntKi), PARAMETER :: TwHt5TPyi = 433 - INTEGER(IntKi), PARAMETER :: TwHt5TPzi = 434 - INTEGER(IntKi), PARAMETER :: TwHt6TPxi = 435 - INTEGER(IntKi), PARAMETER :: TwHt6TPyi = 436 - INTEGER(IntKi), PARAMETER :: TwHt6TPzi = 437 - INTEGER(IntKi), PARAMETER :: TwHt7TPxi = 438 - INTEGER(IntKi), PARAMETER :: TwHt7TPyi = 439 - INTEGER(IntKi), PARAMETER :: TwHt7TPzi = 440 - INTEGER(IntKi), PARAMETER :: TwHt8TPxi = 441 - INTEGER(IntKi), PARAMETER :: TwHt8TPyi = 442 - INTEGER(IntKi), PARAMETER :: TwHt8TPzi = 443 - INTEGER(IntKi), PARAMETER :: TwHt9TPxi = 444 - INTEGER(IntKi), PARAMETER :: TwHt9TPyi = 445 - INTEGER(IntKi), PARAMETER :: TwHt9TPzi = 446 - INTEGER(IntKi), PARAMETER :: TwHt1RPxi = 447 - INTEGER(IntKi), PARAMETER :: TwHt1RPyi = 448 - INTEGER(IntKi), PARAMETER :: TwHt1RPzi = 449 - INTEGER(IntKi), PARAMETER :: TwHt2RPxi = 450 - INTEGER(IntKi), PARAMETER :: TwHt2RPyi = 451 - INTEGER(IntKi), PARAMETER :: TwHt2RPzi = 452 - INTEGER(IntKi), PARAMETER :: TwHt3RPxi = 453 - INTEGER(IntKi), PARAMETER :: TwHt3RPyi = 454 - INTEGER(IntKi), PARAMETER :: TwHt3RPzi = 455 - INTEGER(IntKi), PARAMETER :: TwHt4RPxi = 456 - INTEGER(IntKi), PARAMETER :: TwHt4RPyi = 457 - INTEGER(IntKi), PARAMETER :: TwHt4RPzi = 458 - INTEGER(IntKi), PARAMETER :: TwHt5RPxi = 459 - INTEGER(IntKi), PARAMETER :: TwHt5RPyi = 460 - INTEGER(IntKi), PARAMETER :: TwHt5RPzi = 461 - INTEGER(IntKi), PARAMETER :: TwHt6RPxi = 462 - INTEGER(IntKi), PARAMETER :: TwHt6RPyi = 463 - INTEGER(IntKi), PARAMETER :: TwHt6RPzi = 464 - INTEGER(IntKi), PARAMETER :: TwHt7RPxi = 465 - INTEGER(IntKi), PARAMETER :: TwHt7RPyi = 466 - INTEGER(IntKi), PARAMETER :: TwHt7RPzi = 467 - INTEGER(IntKi), PARAMETER :: TwHt8RPxi = 468 - INTEGER(IntKi), PARAMETER :: TwHt8RPyi = 469 - INTEGER(IntKi), PARAMETER :: TwHt8RPzi = 470 - INTEGER(IntKi), PARAMETER :: TwHt9RPxi = 471 - INTEGER(IntKi), PARAMETER :: TwHt9RPyi = 472 - INTEGER(IntKi), PARAMETER :: TwHt9RPzi = 473 + INTEGER(IntKi), PARAMETER :: TwHt1ALxt = 435 + INTEGER(IntKi), PARAMETER :: TwHt1ALyt = 436 + INTEGER(IntKi), PARAMETER :: TwHt1ALzt = 437 + INTEGER(IntKi), PARAMETER :: TwHt2ALxt = 438 + INTEGER(IntKi), PARAMETER :: TwHt2ALyt = 439 + INTEGER(IntKi), PARAMETER :: TwHt2ALzt = 440 + INTEGER(IntKi), PARAMETER :: TwHt3ALxt = 441 + INTEGER(IntKi), PARAMETER :: TwHt3ALyt = 442 + INTEGER(IntKi), PARAMETER :: TwHt3ALzt = 443 + INTEGER(IntKi), PARAMETER :: TwHt4ALxt = 444 + INTEGER(IntKi), PARAMETER :: TwHt4ALyt = 445 + INTEGER(IntKi), PARAMETER :: TwHt4ALzt = 446 + INTEGER(IntKi), PARAMETER :: TwHt5ALxt = 447 + INTEGER(IntKi), PARAMETER :: TwHt5ALyt = 448 + INTEGER(IntKi), PARAMETER :: TwHt5ALzt = 449 + INTEGER(IntKi), PARAMETER :: TwHt6ALxt = 450 + INTEGER(IntKi), PARAMETER :: TwHt6ALyt = 451 + INTEGER(IntKi), PARAMETER :: TwHt6ALzt = 452 + INTEGER(IntKi), PARAMETER :: TwHt7ALxt = 453 + INTEGER(IntKi), PARAMETER :: TwHt7ALyt = 454 + INTEGER(IntKi), PARAMETER :: TwHt7ALzt = 455 + INTEGER(IntKi), PARAMETER :: TwHt8ALxt = 456 + INTEGER(IntKi), PARAMETER :: TwHt8ALyt = 457 + INTEGER(IntKi), PARAMETER :: TwHt8ALzt = 458 + INTEGER(IntKi), PARAMETER :: TwHt9ALxt = 459 + INTEGER(IntKi), PARAMETER :: TwHt9ALyt = 460 + INTEGER(IntKi), PARAMETER :: TwHt9ALzt = 461 + INTEGER(IntKi), PARAMETER :: TwHt1ALgxt = 462 + INTEGER(IntKi), PARAMETER :: TwHt1ALgyt = 463 + INTEGER(IntKi), PARAMETER :: TwHt1ALgzt = 464 + INTEGER(IntKi), PARAMETER :: TwHt2ALgxt = 465 + INTEGER(IntKi), PARAMETER :: TwHt2ALgyt = 466 + INTEGER(IntKi), PARAMETER :: TwHt2ALgzt = 467 + INTEGER(IntKi), PARAMETER :: TwHt3ALgxt = 468 + INTEGER(IntKi), PARAMETER :: TwHt3ALgyt = 469 + INTEGER(IntKi), PARAMETER :: TwHt3ALgzt = 470 + INTEGER(IntKi), PARAMETER :: TwHt4ALgxt = 471 + INTEGER(IntKi), PARAMETER :: TwHt4ALgyt = 472 + INTEGER(IntKi), PARAMETER :: TwHt4ALgzt = 473 + INTEGER(IntKi), PARAMETER :: TwHt5ALgxt = 474 + INTEGER(IntKi), PARAMETER :: TwHt5ALgyt = 475 + INTEGER(IntKi), PARAMETER :: TwHt5ALgzt = 476 + INTEGER(IntKi), PARAMETER :: TwHt6ALgxt = 477 + INTEGER(IntKi), PARAMETER :: TwHt6ALgyt = 478 + INTEGER(IntKi), PARAMETER :: TwHt6ALgzt = 479 + INTEGER(IntKi), PARAMETER :: TwHt7ALgxt = 480 + INTEGER(IntKi), PARAMETER :: TwHt7ALgyt = 481 + INTEGER(IntKi), PARAMETER :: TwHt7ALgzt = 482 + INTEGER(IntKi), PARAMETER :: TwHt8ALgxt = 483 + INTEGER(IntKi), PARAMETER :: TwHt8ALgyt = 484 + INTEGER(IntKi), PARAMETER :: TwHt8ALgzt = 485 + INTEGER(IntKi), PARAMETER :: TwHt9ALgxt = 486 + INTEGER(IntKi), PARAMETER :: TwHt9ALgyt = 487 + INTEGER(IntKi), PARAMETER :: TwHt9ALgzt = 488 + INTEGER(IntKi), PARAMETER :: TwHt1TDxt = 489 + INTEGER(IntKi), PARAMETER :: TwHt1TDyt = 490 + INTEGER(IntKi), PARAMETER :: TwHt1TDzt = 491 + INTEGER(IntKi), PARAMETER :: TwHt2TDxt = 492 + INTEGER(IntKi), PARAMETER :: TwHt2TDyt = 493 + INTEGER(IntKi), PARAMETER :: TwHt2TDzt = 494 + INTEGER(IntKi), PARAMETER :: TwHt3TDxt = 495 + INTEGER(IntKi), PARAMETER :: TwHt3TDyt = 496 + INTEGER(IntKi), PARAMETER :: TwHt3TDzt = 497 + INTEGER(IntKi), PARAMETER :: TwHt4TDxt = 498 + INTEGER(IntKi), PARAMETER :: TwHt4TDyt = 499 + INTEGER(IntKi), PARAMETER :: TwHt4TDzt = 500 + INTEGER(IntKi), PARAMETER :: TwHt5TDxt = 501 + INTEGER(IntKi), PARAMETER :: TwHt5TDyt = 502 + INTEGER(IntKi), PARAMETER :: TwHt5TDzt = 503 + INTEGER(IntKi), PARAMETER :: TwHt6TDxt = 504 + INTEGER(IntKi), PARAMETER :: TwHt6TDyt = 505 + INTEGER(IntKi), PARAMETER :: TwHt6TDzt = 506 + INTEGER(IntKi), PARAMETER :: TwHt7TDxt = 507 + INTEGER(IntKi), PARAMETER :: TwHt7TDyt = 508 + INTEGER(IntKi), PARAMETER :: TwHt7TDzt = 509 + INTEGER(IntKi), PARAMETER :: TwHt8TDxt = 510 + INTEGER(IntKi), PARAMETER :: TwHt8TDyt = 511 + INTEGER(IntKi), PARAMETER :: TwHt8TDzt = 512 + INTEGER(IntKi), PARAMETER :: TwHt9TDxt = 513 + INTEGER(IntKi), PARAMETER :: TwHt9TDyt = 514 + INTEGER(IntKi), PARAMETER :: TwHt9TDzt = 515 + INTEGER(IntKi), PARAMETER :: TwHt1RDxt = 516 + INTEGER(IntKi), PARAMETER :: TwHt1RDyt = 517 + INTEGER(IntKi), PARAMETER :: TwHt1RDzt = 518 + INTEGER(IntKi), PARAMETER :: TwHt2RDxt = 519 + INTEGER(IntKi), PARAMETER :: TwHt2RDyt = 520 + INTEGER(IntKi), PARAMETER :: TwHt2RDzt = 521 + INTEGER(IntKi), PARAMETER :: TwHt3RDxt = 522 + INTEGER(IntKi), PARAMETER :: TwHt3RDyt = 523 + INTEGER(IntKi), PARAMETER :: TwHt3RDzt = 524 + INTEGER(IntKi), PARAMETER :: TwHt4RDxt = 525 + INTEGER(IntKi), PARAMETER :: TwHt4RDyt = 526 + INTEGER(IntKi), PARAMETER :: TwHt4RDzt = 527 + INTEGER(IntKi), PARAMETER :: TwHt5RDxt = 528 + INTEGER(IntKi), PARAMETER :: TwHt5RDyt = 529 + INTEGER(IntKi), PARAMETER :: TwHt5RDzt = 530 + INTEGER(IntKi), PARAMETER :: TwHt6RDxt = 531 + INTEGER(IntKi), PARAMETER :: TwHt6RDyt = 532 + INTEGER(IntKi), PARAMETER :: TwHt6RDzt = 533 + INTEGER(IntKi), PARAMETER :: TwHt7RDxt = 534 + INTEGER(IntKi), PARAMETER :: TwHt7RDyt = 535 + INTEGER(IntKi), PARAMETER :: TwHt7RDzt = 536 + INTEGER(IntKi), PARAMETER :: TwHt8RDxt = 537 + INTEGER(IntKi), PARAMETER :: TwHt8RDyt = 538 + INTEGER(IntKi), PARAMETER :: TwHt8RDzt = 539 + INTEGER(IntKi), PARAMETER :: TwHt9RDxt = 540 + INTEGER(IntKi), PARAMETER :: TwHt9RDyt = 541 + INTEGER(IntKi), PARAMETER :: TwHt9RDzt = 542 + INTEGER(IntKi), PARAMETER :: TwHt1TPxi = 543 + INTEGER(IntKi), PARAMETER :: TwHt1TPyi = 544 + INTEGER(IntKi), PARAMETER :: TwHt1TPzi = 545 + INTEGER(IntKi), PARAMETER :: TwHt2TPxi = 546 + INTEGER(IntKi), PARAMETER :: TwHt2TPyi = 547 + INTEGER(IntKi), PARAMETER :: TwHt2TPzi = 548 + INTEGER(IntKi), PARAMETER :: TwHt3TPxi = 549 + INTEGER(IntKi), PARAMETER :: TwHt3TPyi = 550 + INTEGER(IntKi), PARAMETER :: TwHt3TPzi = 551 + INTEGER(IntKi), PARAMETER :: TwHt4TPxi = 552 + INTEGER(IntKi), PARAMETER :: TwHt4TPyi = 553 + INTEGER(IntKi), PARAMETER :: TwHt4TPzi = 554 + INTEGER(IntKi), PARAMETER :: TwHt5TPxi = 555 + INTEGER(IntKi), PARAMETER :: TwHt5TPyi = 556 + INTEGER(IntKi), PARAMETER :: TwHt5TPzi = 557 + INTEGER(IntKi), PARAMETER :: TwHt6TPxi = 558 + INTEGER(IntKi), PARAMETER :: TwHt6TPyi = 559 + INTEGER(IntKi), PARAMETER :: TwHt6TPzi = 560 + INTEGER(IntKi), PARAMETER :: TwHt7TPxi = 561 + INTEGER(IntKi), PARAMETER :: TwHt7TPyi = 562 + INTEGER(IntKi), PARAMETER :: TwHt7TPzi = 563 + INTEGER(IntKi), PARAMETER :: TwHt8TPxi = 564 + INTEGER(IntKi), PARAMETER :: TwHt8TPyi = 565 + INTEGER(IntKi), PARAMETER :: TwHt8TPzi = 566 + INTEGER(IntKi), PARAMETER :: TwHt9TPxi = 567 + INTEGER(IntKi), PARAMETER :: TwHt9TPyi = 568 + INTEGER(IntKi), PARAMETER :: TwHt9TPzi = 569 + INTEGER(IntKi), PARAMETER :: TwHt1RPxi = 570 + INTEGER(IntKi), PARAMETER :: TwHt1RPyi = 571 + INTEGER(IntKi), PARAMETER :: TwHt1RPzi = 572 + INTEGER(IntKi), PARAMETER :: TwHt2RPxi = 573 + INTEGER(IntKi), PARAMETER :: TwHt2RPyi = 574 + INTEGER(IntKi), PARAMETER :: TwHt2RPzi = 575 + INTEGER(IntKi), PARAMETER :: TwHt3RPxi = 576 + INTEGER(IntKi), PARAMETER :: TwHt3RPyi = 577 + INTEGER(IntKi), PARAMETER :: TwHt3RPzi = 578 + INTEGER(IntKi), PARAMETER :: TwHt4RPxi = 579 + INTEGER(IntKi), PARAMETER :: TwHt4RPyi = 580 + INTEGER(IntKi), PARAMETER :: TwHt4RPzi = 581 + INTEGER(IntKi), PARAMETER :: TwHt5RPxi = 582 + INTEGER(IntKi), PARAMETER :: TwHt5RPyi = 583 + INTEGER(IntKi), PARAMETER :: TwHt5RPzi = 584 + INTEGER(IntKi), PARAMETER :: TwHt6RPxi = 585 + INTEGER(IntKi), PARAMETER :: TwHt6RPyi = 586 + INTEGER(IntKi), PARAMETER :: TwHt6RPzi = 587 + INTEGER(IntKi), PARAMETER :: TwHt7RPxi = 588 + INTEGER(IntKi), PARAMETER :: TwHt7RPyi = 589 + INTEGER(IntKi), PARAMETER :: TwHt7RPzi = 590 + INTEGER(IntKi), PARAMETER :: TwHt8RPxi = 591 + INTEGER(IntKi), PARAMETER :: TwHt8RPyi = 592 + INTEGER(IntKi), PARAMETER :: TwHt8RPzi = 593 + INTEGER(IntKi), PARAMETER :: TwHt9RPxi = 594 + INTEGER(IntKi), PARAMETER :: TwHt9RPyi = 595 + INTEGER(IntKi), PARAMETER :: TwHt9RPzi = 596 ! Platform Motions: - INTEGER(IntKi), PARAMETER :: PtfmTDxt = 474 - INTEGER(IntKi), PARAMETER :: PtfmTDyt = 475 - INTEGER(IntKi), PARAMETER :: PtfmTDzt = 476 - INTEGER(IntKi), PARAMETER :: PtfmTDxi = 477 - INTEGER(IntKi), PARAMETER :: PtfmTDyi = 478 - INTEGER(IntKi), PARAMETER :: PtfmTDzi = 479 - INTEGER(IntKi), PARAMETER :: PtfmTVxt = 480 - INTEGER(IntKi), PARAMETER :: PtfmTVyt = 481 - INTEGER(IntKi), PARAMETER :: PtfmTVzt = 482 - INTEGER(IntKi), PARAMETER :: PtfmTVxi = 483 - INTEGER(IntKi), PARAMETER :: PtfmTVyi = 484 - INTEGER(IntKi), PARAMETER :: PtfmTVzi = 485 - INTEGER(IntKi), PARAMETER :: PtfmTAxt = 486 - INTEGER(IntKi), PARAMETER :: PtfmTAyt = 487 - INTEGER(IntKi), PARAMETER :: PtfmTAzt = 488 - INTEGER(IntKi), PARAMETER :: PtfmTAxi = 489 - INTEGER(IntKi), PARAMETER :: PtfmTAyi = 490 - INTEGER(IntKi), PARAMETER :: PtfmTAzi = 491 - INTEGER(IntKi), PARAMETER :: PtfmRDxi = 492 - INTEGER(IntKi), PARAMETER :: PtfmRDyi = 493 - INTEGER(IntKi), PARAMETER :: PtfmRDzi = 494 - INTEGER(IntKi), PARAMETER :: PtfmRVxt = 495 - INTEGER(IntKi), PARAMETER :: PtfmRVyt = 496 - INTEGER(IntKi), PARAMETER :: PtfmRVzt = 497 - INTEGER(IntKi), PARAMETER :: PtfmRVxi = 498 - INTEGER(IntKi), PARAMETER :: PtfmRVyi = 499 - INTEGER(IntKi), PARAMETER :: PtfmRVzi = 500 - INTEGER(IntKi), PARAMETER :: PtfmRAxt = 501 - INTEGER(IntKi), PARAMETER :: PtfmRAyt = 502 - INTEGER(IntKi), PARAMETER :: PtfmRAzt = 503 - INTEGER(IntKi), PARAMETER :: PtfmRAxi = 504 - INTEGER(IntKi), PARAMETER :: PtfmRAyi = 505 - INTEGER(IntKi), PARAMETER :: PtfmRAzi = 506 + INTEGER(IntKi), PARAMETER :: PtfmTDxt = 597 + INTEGER(IntKi), PARAMETER :: PtfmTDyt = 598 + INTEGER(IntKi), PARAMETER :: PtfmTDzt = 599 + INTEGER(IntKi), PARAMETER :: PtfmTDxi = 600 + INTEGER(IntKi), PARAMETER :: PtfmTDyi = 601 + INTEGER(IntKi), PARAMETER :: PtfmTDzi = 602 + INTEGER(IntKi), PARAMETER :: PtfmTVxt = 603 + INTEGER(IntKi), PARAMETER :: PtfmTVyt = 604 + INTEGER(IntKi), PARAMETER :: PtfmTVzt = 605 + INTEGER(IntKi), PARAMETER :: PtfmTVxi = 606 + INTEGER(IntKi), PARAMETER :: PtfmTVyi = 607 + INTEGER(IntKi), PARAMETER :: PtfmTVzi = 608 + INTEGER(IntKi), PARAMETER :: PtfmTAxt = 609 + INTEGER(IntKi), PARAMETER :: PtfmTAyt = 610 + INTEGER(IntKi), PARAMETER :: PtfmTAzt = 611 + INTEGER(IntKi), PARAMETER :: PtfmTAgxt = 612 + INTEGER(IntKi), PARAMETER :: PtfmTAgyt = 613 + INTEGER(IntKi), PARAMETER :: PtfmTAgzt = 614 + INTEGER(IntKi), PARAMETER :: PtfmTAxi = 615 + INTEGER(IntKi), PARAMETER :: PtfmTAyi = 616 + INTEGER(IntKi), PARAMETER :: PtfmTAzi = 617 + INTEGER(IntKi), PARAMETER :: PtfmTAgxi = 618 + INTEGER(IntKi), PARAMETER :: PtfmTAgyi = 619 + INTEGER(IntKi), PARAMETER :: PtfmTAgzi = 620 + INTEGER(IntKi), PARAMETER :: PtfmRDxi = 621 + INTEGER(IntKi), PARAMETER :: PtfmRDyi = 622 + INTEGER(IntKi), PARAMETER :: PtfmRDzi = 623 + INTEGER(IntKi), PARAMETER :: PtfmRVxt = 624 + INTEGER(IntKi), PARAMETER :: PtfmRVyt = 625 + INTEGER(IntKi), PARAMETER :: PtfmRVzt = 626 + INTEGER(IntKi), PARAMETER :: PtfmRVxi = 627 + INTEGER(IntKi), PARAMETER :: PtfmRVyi = 628 + INTEGER(IntKi), PARAMETER :: PtfmRVzi = 629 + INTEGER(IntKi), PARAMETER :: PtfmRAxt = 630 + INTEGER(IntKi), PARAMETER :: PtfmRAyt = 631 + INTEGER(IntKi), PARAMETER :: PtfmRAzt = 632 + INTEGER(IntKi), PARAMETER :: PtfmRAxi = 633 + INTEGER(IntKi), PARAMETER :: PtfmRAyi = 634 + INTEGER(IntKi), PARAMETER :: PtfmRAzi = 635 ! Blade 1 Root Loads: - INTEGER(IntKi), PARAMETER :: RootFxc1 = 507 - INTEGER(IntKi), PARAMETER :: RootFyc1 = 508 - INTEGER(IntKi), PARAMETER :: RootFzc1 = 509 - INTEGER(IntKi), PARAMETER :: RootFxb1 = 510 - INTEGER(IntKi), PARAMETER :: RootFyb1 = 511 - INTEGER(IntKi), PARAMETER :: RootMxc1 = 512 - INTEGER(IntKi), PARAMETER :: RootMyc1 = 513 - INTEGER(IntKi), PARAMETER :: RootMzc1 = 514 - INTEGER(IntKi), PARAMETER :: RootMxb1 = 515 - INTEGER(IntKi), PARAMETER :: RootMyb1 = 516 + INTEGER(IntKi), PARAMETER :: RootFxc1 = 636 + INTEGER(IntKi), PARAMETER :: RootFyc1 = 637 + INTEGER(IntKi), PARAMETER :: RootFzc1 = 638 + INTEGER(IntKi), PARAMETER :: RootFxb1 = 639 + INTEGER(IntKi), PARAMETER :: RootFyb1 = 640 + INTEGER(IntKi), PARAMETER :: RootMxc1 = 641 + INTEGER(IntKi), PARAMETER :: RootMyc1 = 642 + INTEGER(IntKi), PARAMETER :: RootMzc1 = 643 + INTEGER(IntKi), PARAMETER :: RootMxb1 = 644 + INTEGER(IntKi), PARAMETER :: RootMyb1 = 645 ! Blade 2 Root Loads: - INTEGER(IntKi), PARAMETER :: RootFxc2 = 517 - INTEGER(IntKi), PARAMETER :: RootFyc2 = 518 - INTEGER(IntKi), PARAMETER :: RootFzc2 = 519 - INTEGER(IntKi), PARAMETER :: RootFxb2 = 520 - INTEGER(IntKi), PARAMETER :: RootFyb2 = 521 - INTEGER(IntKi), PARAMETER :: RootMxc2 = 522 - INTEGER(IntKi), PARAMETER :: RootMyc2 = 523 - INTEGER(IntKi), PARAMETER :: RootMzc2 = 524 - INTEGER(IntKi), PARAMETER :: RootMxb2 = 525 - INTEGER(IntKi), PARAMETER :: RootMyb2 = 526 + INTEGER(IntKi), PARAMETER :: RootFxc2 = 646 + INTEGER(IntKi), PARAMETER :: RootFyc2 = 647 + INTEGER(IntKi), PARAMETER :: RootFzc2 = 648 + INTEGER(IntKi), PARAMETER :: RootFxb2 = 649 + INTEGER(IntKi), PARAMETER :: RootFyb2 = 650 + INTEGER(IntKi), PARAMETER :: RootMxc2 = 651 + INTEGER(IntKi), PARAMETER :: RootMyc2 = 652 + INTEGER(IntKi), PARAMETER :: RootMzc2 = 653 + INTEGER(IntKi), PARAMETER :: RootMxb2 = 654 + INTEGER(IntKi), PARAMETER :: RootMyb2 = 655 ! Blade 3 Root Loads: - INTEGER(IntKi), PARAMETER :: RootFxc3 = 527 - INTEGER(IntKi), PARAMETER :: RootFyc3 = 528 - INTEGER(IntKi), PARAMETER :: RootFzc3 = 529 - INTEGER(IntKi), PARAMETER :: RootFxb3 = 530 - INTEGER(IntKi), PARAMETER :: RootFyb3 = 531 - INTEGER(IntKi), PARAMETER :: RootMxc3 = 532 - INTEGER(IntKi), PARAMETER :: RootMyc3 = 533 - INTEGER(IntKi), PARAMETER :: RootMzc3 = 534 - INTEGER(IntKi), PARAMETER :: RootMxb3 = 535 - INTEGER(IntKi), PARAMETER :: RootMyb3 = 536 + INTEGER(IntKi), PARAMETER :: RootFxc3 = 656 + INTEGER(IntKi), PARAMETER :: RootFyc3 = 657 + INTEGER(IntKi), PARAMETER :: RootFzc3 = 658 + INTEGER(IntKi), PARAMETER :: RootFxb3 = 659 + INTEGER(IntKi), PARAMETER :: RootFyb3 = 660 + INTEGER(IntKi), PARAMETER :: RootMxc3 = 661 + INTEGER(IntKi), PARAMETER :: RootMyc3 = 662 + INTEGER(IntKi), PARAMETER :: RootMzc3 = 663 + INTEGER(IntKi), PARAMETER :: RootMxb3 = 664 + INTEGER(IntKi), PARAMETER :: RootMyb3 = 665 ! Blade 1 Local Span Loads: - INTEGER(IntKi), PARAMETER :: Spn1MLxb1 = 537 - INTEGER(IntKi), PARAMETER :: Spn1MLyb1 = 538 - INTEGER(IntKi), PARAMETER :: Spn1MLzb1 = 539 - INTEGER(IntKi), PARAMETER :: Spn2MLxb1 = 540 - INTEGER(IntKi), PARAMETER :: Spn2MLyb1 = 541 - INTEGER(IntKi), PARAMETER :: Spn2MLzb1 = 542 - INTEGER(IntKi), PARAMETER :: Spn3MLxb1 = 543 - INTEGER(IntKi), PARAMETER :: Spn3MLyb1 = 544 - INTEGER(IntKi), PARAMETER :: Spn3MLzb1 = 545 - INTEGER(IntKi), PARAMETER :: Spn4MLxb1 = 546 - INTEGER(IntKi), PARAMETER :: Spn4MLyb1 = 547 - INTEGER(IntKi), PARAMETER :: Spn4MLzb1 = 548 - INTEGER(IntKi), PARAMETER :: Spn5MLxb1 = 549 - INTEGER(IntKi), PARAMETER :: Spn5MLyb1 = 550 - INTEGER(IntKi), PARAMETER :: Spn5MLzb1 = 551 - INTEGER(IntKi), PARAMETER :: Spn6MLxb1 = 552 - INTEGER(IntKi), PARAMETER :: Spn6MLyb1 = 553 - INTEGER(IntKi), PARAMETER :: Spn6MLzb1 = 554 - INTEGER(IntKi), PARAMETER :: Spn7MLxb1 = 555 - INTEGER(IntKi), PARAMETER :: Spn7MLyb1 = 556 - INTEGER(IntKi), PARAMETER :: Spn7MLzb1 = 557 - INTEGER(IntKi), PARAMETER :: Spn8MLxb1 = 558 - INTEGER(IntKi), PARAMETER :: Spn8MLyb1 = 559 - INTEGER(IntKi), PARAMETER :: Spn8MLzb1 = 560 - INTEGER(IntKi), PARAMETER :: Spn9MLxb1 = 561 - INTEGER(IntKi), PARAMETER :: Spn9MLyb1 = 562 - INTEGER(IntKi), PARAMETER :: Spn9MLzb1 = 563 - INTEGER(IntKi), PARAMETER :: Spn1FLxb1 = 564 - INTEGER(IntKi), PARAMETER :: Spn1FLyb1 = 565 - INTEGER(IntKi), PARAMETER :: Spn1FLzb1 = 566 - INTEGER(IntKi), PARAMETER :: Spn2FLxb1 = 567 - INTEGER(IntKi), PARAMETER :: Spn2FLyb1 = 568 - INTEGER(IntKi), PARAMETER :: Spn2FLzb1 = 569 - INTEGER(IntKi), PARAMETER :: Spn3FLxb1 = 570 - INTEGER(IntKi), PARAMETER :: Spn3FLyb1 = 571 - INTEGER(IntKi), PARAMETER :: Spn3FLzb1 = 572 - INTEGER(IntKi), PARAMETER :: Spn4FLxb1 = 573 - INTEGER(IntKi), PARAMETER :: Spn4FLyb1 = 574 - INTEGER(IntKi), PARAMETER :: Spn4FLzb1 = 575 - INTEGER(IntKi), PARAMETER :: Spn5FLxb1 = 576 - INTEGER(IntKi), PARAMETER :: Spn5FLyb1 = 577 - INTEGER(IntKi), PARAMETER :: Spn5FLzb1 = 578 - INTEGER(IntKi), PARAMETER :: Spn6FLxb1 = 579 - INTEGER(IntKi), PARAMETER :: Spn6FLyb1 = 580 - INTEGER(IntKi), PARAMETER :: Spn6FLzb1 = 581 - INTEGER(IntKi), PARAMETER :: Spn7FLxb1 = 582 - INTEGER(IntKi), PARAMETER :: Spn7FLyb1 = 583 - INTEGER(IntKi), PARAMETER :: Spn7FLzb1 = 584 - INTEGER(IntKi), PARAMETER :: Spn8FLxb1 = 585 - INTEGER(IntKi), PARAMETER :: Spn8FLyb1 = 586 - INTEGER(IntKi), PARAMETER :: Spn8FLzb1 = 587 - INTEGER(IntKi), PARAMETER :: Spn9FLxb1 = 588 - INTEGER(IntKi), PARAMETER :: Spn9FLyb1 = 589 - INTEGER(IntKi), PARAMETER :: Spn9FLzb1 = 590 + INTEGER(IntKi), PARAMETER :: Spn1MLxb1 = 666 + INTEGER(IntKi), PARAMETER :: Spn1MLyb1 = 667 + INTEGER(IntKi), PARAMETER :: Spn1MLzb1 = 668 + INTEGER(IntKi), PARAMETER :: Spn2MLxb1 = 669 + INTEGER(IntKi), PARAMETER :: Spn2MLyb1 = 670 + INTEGER(IntKi), PARAMETER :: Spn2MLzb1 = 671 + INTEGER(IntKi), PARAMETER :: Spn3MLxb1 = 672 + INTEGER(IntKi), PARAMETER :: Spn3MLyb1 = 673 + INTEGER(IntKi), PARAMETER :: Spn3MLzb1 = 674 + INTEGER(IntKi), PARAMETER :: Spn4MLxb1 = 675 + INTEGER(IntKi), PARAMETER :: Spn4MLyb1 = 676 + INTEGER(IntKi), PARAMETER :: Spn4MLzb1 = 677 + INTEGER(IntKi), PARAMETER :: Spn5MLxb1 = 678 + INTEGER(IntKi), PARAMETER :: Spn5MLyb1 = 679 + INTEGER(IntKi), PARAMETER :: Spn5MLzb1 = 680 + INTEGER(IntKi), PARAMETER :: Spn6MLxb1 = 681 + INTEGER(IntKi), PARAMETER :: Spn6MLyb1 = 682 + INTEGER(IntKi), PARAMETER :: Spn6MLzb1 = 683 + INTEGER(IntKi), PARAMETER :: Spn7MLxb1 = 684 + INTEGER(IntKi), PARAMETER :: Spn7MLyb1 = 685 + INTEGER(IntKi), PARAMETER :: Spn7MLzb1 = 686 + INTEGER(IntKi), PARAMETER :: Spn8MLxb1 = 687 + INTEGER(IntKi), PARAMETER :: Spn8MLyb1 = 688 + INTEGER(IntKi), PARAMETER :: Spn8MLzb1 = 689 + INTEGER(IntKi), PARAMETER :: Spn9MLxb1 = 690 + INTEGER(IntKi), PARAMETER :: Spn9MLyb1 = 691 + INTEGER(IntKi), PARAMETER :: Spn9MLzb1 = 692 + INTEGER(IntKi), PARAMETER :: Spn1FLxb1 = 693 + INTEGER(IntKi), PARAMETER :: Spn1FLyb1 = 694 + INTEGER(IntKi), PARAMETER :: Spn1FLzb1 = 695 + INTEGER(IntKi), PARAMETER :: Spn2FLxb1 = 696 + INTEGER(IntKi), PARAMETER :: Spn2FLyb1 = 697 + INTEGER(IntKi), PARAMETER :: Spn2FLzb1 = 698 + INTEGER(IntKi), PARAMETER :: Spn3FLxb1 = 699 + INTEGER(IntKi), PARAMETER :: Spn3FLyb1 = 700 + INTEGER(IntKi), PARAMETER :: Spn3FLzb1 = 701 + INTEGER(IntKi), PARAMETER :: Spn4FLxb1 = 702 + INTEGER(IntKi), PARAMETER :: Spn4FLyb1 = 703 + INTEGER(IntKi), PARAMETER :: Spn4FLzb1 = 704 + INTEGER(IntKi), PARAMETER :: Spn5FLxb1 = 705 + INTEGER(IntKi), PARAMETER :: Spn5FLyb1 = 706 + INTEGER(IntKi), PARAMETER :: Spn5FLzb1 = 707 + INTEGER(IntKi), PARAMETER :: Spn6FLxb1 = 708 + INTEGER(IntKi), PARAMETER :: Spn6FLyb1 = 709 + INTEGER(IntKi), PARAMETER :: Spn6FLzb1 = 710 + INTEGER(IntKi), PARAMETER :: Spn7FLxb1 = 711 + INTEGER(IntKi), PARAMETER :: Spn7FLyb1 = 712 + INTEGER(IntKi), PARAMETER :: Spn7FLzb1 = 713 + INTEGER(IntKi), PARAMETER :: Spn8FLxb1 = 714 + INTEGER(IntKi), PARAMETER :: Spn8FLyb1 = 715 + INTEGER(IntKi), PARAMETER :: Spn8FLzb1 = 716 + INTEGER(IntKi), PARAMETER :: Spn9FLxb1 = 717 + INTEGER(IntKi), PARAMETER :: Spn9FLyb1 = 718 + INTEGER(IntKi), PARAMETER :: Spn9FLzb1 = 719 ! Blade 2 Local Span Loads: - INTEGER(IntKi), PARAMETER :: Spn1MLxb2 = 591 - INTEGER(IntKi), PARAMETER :: Spn1MLyb2 = 592 - INTEGER(IntKi), PARAMETER :: Spn1MLzb2 = 593 - INTEGER(IntKi), PARAMETER :: Spn2MLxb2 = 594 - INTEGER(IntKi), PARAMETER :: Spn2MLyb2 = 595 - INTEGER(IntKi), PARAMETER :: Spn2MLzb2 = 596 - INTEGER(IntKi), PARAMETER :: Spn3MLxb2 = 597 - INTEGER(IntKi), PARAMETER :: Spn3MLyb2 = 598 - INTEGER(IntKi), PARAMETER :: Spn3MLzb2 = 599 - INTEGER(IntKi), PARAMETER :: Spn4MLxb2 = 600 - INTEGER(IntKi), PARAMETER :: Spn4MLyb2 = 601 - INTEGER(IntKi), PARAMETER :: Spn4MLzb2 = 602 - INTEGER(IntKi), PARAMETER :: Spn5MLxb2 = 603 - INTEGER(IntKi), PARAMETER :: Spn5MLyb2 = 604 - INTEGER(IntKi), PARAMETER :: Spn5MLzb2 = 605 - INTEGER(IntKi), PARAMETER :: Spn6MLxb2 = 606 - INTEGER(IntKi), PARAMETER :: Spn6MLyb2 = 607 - INTEGER(IntKi), PARAMETER :: Spn6MLzb2 = 608 - INTEGER(IntKi), PARAMETER :: Spn7MLxb2 = 609 - INTEGER(IntKi), PARAMETER :: Spn7MLyb2 = 610 - INTEGER(IntKi), PARAMETER :: Spn7MLzb2 = 611 - INTEGER(IntKi), PARAMETER :: Spn8MLxb2 = 612 - INTEGER(IntKi), PARAMETER :: Spn8MLyb2 = 613 - INTEGER(IntKi), PARAMETER :: Spn8MLzb2 = 614 - INTEGER(IntKi), PARAMETER :: Spn9MLxb2 = 615 - INTEGER(IntKi), PARAMETER :: Spn9MLyb2 = 616 - INTEGER(IntKi), PARAMETER :: Spn9MLzb2 = 617 - INTEGER(IntKi), PARAMETER :: Spn1FLxb2 = 618 - INTEGER(IntKi), PARAMETER :: Spn1FLyb2 = 619 - INTEGER(IntKi), PARAMETER :: Spn1FLzb2 = 620 - INTEGER(IntKi), PARAMETER :: Spn2FLxb2 = 621 - INTEGER(IntKi), PARAMETER :: Spn2FLyb2 = 622 - INTEGER(IntKi), PARAMETER :: Spn2FLzb2 = 623 - INTEGER(IntKi), PARAMETER :: Spn3FLxb2 = 624 - INTEGER(IntKi), PARAMETER :: Spn3FLyb2 = 625 - INTEGER(IntKi), PARAMETER :: Spn3FLzb2 = 626 - INTEGER(IntKi), PARAMETER :: Spn4FLxb2 = 627 - INTEGER(IntKi), PARAMETER :: Spn4FLyb2 = 628 - INTEGER(IntKi), PARAMETER :: Spn4FLzb2 = 629 - INTEGER(IntKi), PARAMETER :: Spn5FLxb2 = 630 - INTEGER(IntKi), PARAMETER :: Spn5FLyb2 = 631 - INTEGER(IntKi), PARAMETER :: Spn5FLzb2 = 632 - INTEGER(IntKi), PARAMETER :: Spn6FLxb2 = 633 - INTEGER(IntKi), PARAMETER :: Spn6FLyb2 = 634 - INTEGER(IntKi), PARAMETER :: Spn6FLzb2 = 635 - INTEGER(IntKi), PARAMETER :: Spn7FLxb2 = 636 - INTEGER(IntKi), PARAMETER :: Spn7FLyb2 = 637 - INTEGER(IntKi), PARAMETER :: Spn7FLzb2 = 638 - INTEGER(IntKi), PARAMETER :: Spn8FLxb2 = 639 - INTEGER(IntKi), PARAMETER :: Spn8FLyb2 = 640 - INTEGER(IntKi), PARAMETER :: Spn8FLzb2 = 641 - INTEGER(IntKi), PARAMETER :: Spn9FLxb2 = 642 - INTEGER(IntKi), PARAMETER :: Spn9FLyb2 = 643 - INTEGER(IntKi), PARAMETER :: Spn9FLzb2 = 644 + INTEGER(IntKi), PARAMETER :: Spn1MLxb2 = 720 + INTEGER(IntKi), PARAMETER :: Spn1MLyb2 = 721 + INTEGER(IntKi), PARAMETER :: Spn1MLzb2 = 722 + INTEGER(IntKi), PARAMETER :: Spn2MLxb2 = 723 + INTEGER(IntKi), PARAMETER :: Spn2MLyb2 = 724 + INTEGER(IntKi), PARAMETER :: Spn2MLzb2 = 725 + INTEGER(IntKi), PARAMETER :: Spn3MLxb2 = 726 + INTEGER(IntKi), PARAMETER :: Spn3MLyb2 = 727 + INTEGER(IntKi), PARAMETER :: Spn3MLzb2 = 728 + INTEGER(IntKi), PARAMETER :: Spn4MLxb2 = 729 + INTEGER(IntKi), PARAMETER :: Spn4MLyb2 = 730 + INTEGER(IntKi), PARAMETER :: Spn4MLzb2 = 731 + INTEGER(IntKi), PARAMETER :: Spn5MLxb2 = 732 + INTEGER(IntKi), PARAMETER :: Spn5MLyb2 = 733 + INTEGER(IntKi), PARAMETER :: Spn5MLzb2 = 734 + INTEGER(IntKi), PARAMETER :: Spn6MLxb2 = 735 + INTEGER(IntKi), PARAMETER :: Spn6MLyb2 = 736 + INTEGER(IntKi), PARAMETER :: Spn6MLzb2 = 737 + INTEGER(IntKi), PARAMETER :: Spn7MLxb2 = 738 + INTEGER(IntKi), PARAMETER :: Spn7MLyb2 = 739 + INTEGER(IntKi), PARAMETER :: Spn7MLzb2 = 740 + INTEGER(IntKi), PARAMETER :: Spn8MLxb2 = 741 + INTEGER(IntKi), PARAMETER :: Spn8MLyb2 = 742 + INTEGER(IntKi), PARAMETER :: Spn8MLzb2 = 743 + INTEGER(IntKi), PARAMETER :: Spn9MLxb2 = 744 + INTEGER(IntKi), PARAMETER :: Spn9MLyb2 = 745 + INTEGER(IntKi), PARAMETER :: Spn9MLzb2 = 746 + INTEGER(IntKi), PARAMETER :: Spn1FLxb2 = 747 + INTEGER(IntKi), PARAMETER :: Spn1FLyb2 = 748 + INTEGER(IntKi), PARAMETER :: Spn1FLzb2 = 749 + INTEGER(IntKi), PARAMETER :: Spn2FLxb2 = 750 + INTEGER(IntKi), PARAMETER :: Spn2FLyb2 = 751 + INTEGER(IntKi), PARAMETER :: Spn2FLzb2 = 752 + INTEGER(IntKi), PARAMETER :: Spn3FLxb2 = 753 + INTEGER(IntKi), PARAMETER :: Spn3FLyb2 = 754 + INTEGER(IntKi), PARAMETER :: Spn3FLzb2 = 755 + INTEGER(IntKi), PARAMETER :: Spn4FLxb2 = 756 + INTEGER(IntKi), PARAMETER :: Spn4FLyb2 = 757 + INTEGER(IntKi), PARAMETER :: Spn4FLzb2 = 758 + INTEGER(IntKi), PARAMETER :: Spn5FLxb2 = 759 + INTEGER(IntKi), PARAMETER :: Spn5FLyb2 = 760 + INTEGER(IntKi), PARAMETER :: Spn5FLzb2 = 761 + INTEGER(IntKi), PARAMETER :: Spn6FLxb2 = 762 + INTEGER(IntKi), PARAMETER :: Spn6FLyb2 = 763 + INTEGER(IntKi), PARAMETER :: Spn6FLzb2 = 764 + INTEGER(IntKi), PARAMETER :: Spn7FLxb2 = 765 + INTEGER(IntKi), PARAMETER :: Spn7FLyb2 = 766 + INTEGER(IntKi), PARAMETER :: Spn7FLzb2 = 767 + INTEGER(IntKi), PARAMETER :: Spn8FLxb2 = 768 + INTEGER(IntKi), PARAMETER :: Spn8FLyb2 = 769 + INTEGER(IntKi), PARAMETER :: Spn8FLzb2 = 770 + INTEGER(IntKi), PARAMETER :: Spn9FLxb2 = 771 + INTEGER(IntKi), PARAMETER :: Spn9FLyb2 = 772 + INTEGER(IntKi), PARAMETER :: Spn9FLzb2 = 773 ! Blade 3 Local Span Loads: - INTEGER(IntKi), PARAMETER :: Spn1MLxb3 = 645 - INTEGER(IntKi), PARAMETER :: Spn1MLyb3 = 646 - INTEGER(IntKi), PARAMETER :: Spn1MLzb3 = 647 - INTEGER(IntKi), PARAMETER :: Spn2MLxb3 = 648 - INTEGER(IntKi), PARAMETER :: Spn2MLyb3 = 649 - INTEGER(IntKi), PARAMETER :: Spn2MLzb3 = 650 - INTEGER(IntKi), PARAMETER :: Spn3MLxb3 = 651 - INTEGER(IntKi), PARAMETER :: Spn3MLyb3 = 652 - INTEGER(IntKi), PARAMETER :: Spn3MLzb3 = 653 - INTEGER(IntKi), PARAMETER :: Spn4MLxb3 = 654 - INTEGER(IntKi), PARAMETER :: Spn4MLyb3 = 655 - INTEGER(IntKi), PARAMETER :: Spn4MLzb3 = 656 - INTEGER(IntKi), PARAMETER :: Spn5MLxb3 = 657 - INTEGER(IntKi), PARAMETER :: Spn5MLyb3 = 658 - INTEGER(IntKi), PARAMETER :: Spn5MLzb3 = 659 - INTEGER(IntKi), PARAMETER :: Spn6MLxb3 = 660 - INTEGER(IntKi), PARAMETER :: Spn6MLyb3 = 661 - INTEGER(IntKi), PARAMETER :: Spn6MLzb3 = 662 - INTEGER(IntKi), PARAMETER :: Spn7MLxb3 = 663 - INTEGER(IntKi), PARAMETER :: Spn7MLyb3 = 664 - INTEGER(IntKi), PARAMETER :: Spn7MLzb3 = 665 - INTEGER(IntKi), PARAMETER :: Spn8MLxb3 = 666 - INTEGER(IntKi), PARAMETER :: Spn8MLyb3 = 667 - INTEGER(IntKi), PARAMETER :: Spn8MLzb3 = 668 - INTEGER(IntKi), PARAMETER :: Spn9MLxb3 = 669 - INTEGER(IntKi), PARAMETER :: Spn9MLyb3 = 670 - INTEGER(IntKi), PARAMETER :: Spn9MLzb3 = 671 - INTEGER(IntKi), PARAMETER :: Spn1FLxb3 = 672 - INTEGER(IntKi), PARAMETER :: Spn1FLyb3 = 673 - INTEGER(IntKi), PARAMETER :: Spn1FLzb3 = 674 - INTEGER(IntKi), PARAMETER :: Spn2FLxb3 = 675 - INTEGER(IntKi), PARAMETER :: Spn2FLyb3 = 676 - INTEGER(IntKi), PARAMETER :: Spn2FLzb3 = 677 - INTEGER(IntKi), PARAMETER :: Spn3FLxb3 = 678 - INTEGER(IntKi), PARAMETER :: Spn3FLyb3 = 679 - INTEGER(IntKi), PARAMETER :: Spn3FLzb3 = 680 - INTEGER(IntKi), PARAMETER :: Spn4FLxb3 = 681 - INTEGER(IntKi), PARAMETER :: Spn4FLyb3 = 682 - INTEGER(IntKi), PARAMETER :: Spn4FLzb3 = 683 - INTEGER(IntKi), PARAMETER :: Spn5FLxb3 = 684 - INTEGER(IntKi), PARAMETER :: Spn5FLyb3 = 685 - INTEGER(IntKi), PARAMETER :: Spn5FLzb3 = 686 - INTEGER(IntKi), PARAMETER :: Spn6FLxb3 = 687 - INTEGER(IntKi), PARAMETER :: Spn6FLyb3 = 688 - INTEGER(IntKi), PARAMETER :: Spn6FLzb3 = 689 - INTEGER(IntKi), PARAMETER :: Spn7FLxb3 = 690 - INTEGER(IntKi), PARAMETER :: Spn7FLyb3 = 691 - INTEGER(IntKi), PARAMETER :: Spn7FLzb3 = 692 - INTEGER(IntKi), PARAMETER :: Spn8FLxb3 = 693 - INTEGER(IntKi), PARAMETER :: Spn8FLyb3 = 694 - INTEGER(IntKi), PARAMETER :: Spn8FLzb3 = 695 - INTEGER(IntKi), PARAMETER :: Spn9FLxb3 = 696 - INTEGER(IntKi), PARAMETER :: Spn9FLyb3 = 697 - INTEGER(IntKi), PARAMETER :: Spn9FLzb3 = 698 + INTEGER(IntKi), PARAMETER :: Spn1MLxb3 = 774 + INTEGER(IntKi), PARAMETER :: Spn1MLyb3 = 775 + INTEGER(IntKi), PARAMETER :: Spn1MLzb3 = 776 + INTEGER(IntKi), PARAMETER :: Spn2MLxb3 = 777 + INTEGER(IntKi), PARAMETER :: Spn2MLyb3 = 778 + INTEGER(IntKi), PARAMETER :: Spn2MLzb3 = 779 + INTEGER(IntKi), PARAMETER :: Spn3MLxb3 = 780 + INTEGER(IntKi), PARAMETER :: Spn3MLyb3 = 781 + INTEGER(IntKi), PARAMETER :: Spn3MLzb3 = 782 + INTEGER(IntKi), PARAMETER :: Spn4MLxb3 = 783 + INTEGER(IntKi), PARAMETER :: Spn4MLyb3 = 784 + INTEGER(IntKi), PARAMETER :: Spn4MLzb3 = 785 + INTEGER(IntKi), PARAMETER :: Spn5MLxb3 = 786 + INTEGER(IntKi), PARAMETER :: Spn5MLyb3 = 787 + INTEGER(IntKi), PARAMETER :: Spn5MLzb3 = 788 + INTEGER(IntKi), PARAMETER :: Spn6MLxb3 = 789 + INTEGER(IntKi), PARAMETER :: Spn6MLyb3 = 790 + INTEGER(IntKi), PARAMETER :: Spn6MLzb3 = 791 + INTEGER(IntKi), PARAMETER :: Spn7MLxb3 = 792 + INTEGER(IntKi), PARAMETER :: Spn7MLyb3 = 793 + INTEGER(IntKi), PARAMETER :: Spn7MLzb3 = 794 + INTEGER(IntKi), PARAMETER :: Spn8MLxb3 = 795 + INTEGER(IntKi), PARAMETER :: Spn8MLyb3 = 796 + INTEGER(IntKi), PARAMETER :: Spn8MLzb3 = 797 + INTEGER(IntKi), PARAMETER :: Spn9MLxb3 = 798 + INTEGER(IntKi), PARAMETER :: Spn9MLyb3 = 799 + INTEGER(IntKi), PARAMETER :: Spn9MLzb3 = 800 + INTEGER(IntKi), PARAMETER :: Spn1FLxb3 = 801 + INTEGER(IntKi), PARAMETER :: Spn1FLyb3 = 802 + INTEGER(IntKi), PARAMETER :: Spn1FLzb3 = 803 + INTEGER(IntKi), PARAMETER :: Spn2FLxb3 = 804 + INTEGER(IntKi), PARAMETER :: Spn2FLyb3 = 805 + INTEGER(IntKi), PARAMETER :: Spn2FLzb3 = 806 + INTEGER(IntKi), PARAMETER :: Spn3FLxb3 = 807 + INTEGER(IntKi), PARAMETER :: Spn3FLyb3 = 808 + INTEGER(IntKi), PARAMETER :: Spn3FLzb3 = 809 + INTEGER(IntKi), PARAMETER :: Spn4FLxb3 = 810 + INTEGER(IntKi), PARAMETER :: Spn4FLyb3 = 811 + INTEGER(IntKi), PARAMETER :: Spn4FLzb3 = 812 + INTEGER(IntKi), PARAMETER :: Spn5FLxb3 = 813 + INTEGER(IntKi), PARAMETER :: Spn5FLyb3 = 814 + INTEGER(IntKi), PARAMETER :: Spn5FLzb3 = 815 + INTEGER(IntKi), PARAMETER :: Spn6FLxb3 = 816 + INTEGER(IntKi), PARAMETER :: Spn6FLyb3 = 817 + INTEGER(IntKi), PARAMETER :: Spn6FLzb3 = 818 + INTEGER(IntKi), PARAMETER :: Spn7FLxb3 = 819 + INTEGER(IntKi), PARAMETER :: Spn7FLyb3 = 820 + INTEGER(IntKi), PARAMETER :: Spn7FLzb3 = 821 + INTEGER(IntKi), PARAMETER :: Spn8FLxb3 = 822 + INTEGER(IntKi), PARAMETER :: Spn8FLyb3 = 823 + INTEGER(IntKi), PARAMETER :: Spn8FLzb3 = 824 + INTEGER(IntKi), PARAMETER :: Spn9FLxb3 = 825 + INTEGER(IntKi), PARAMETER :: Spn9FLyb3 = 826 + INTEGER(IntKi), PARAMETER :: Spn9FLzb3 = 827 ! Hub and Rotor Loads: - INTEGER(IntKi), PARAMETER :: LSShftFxa = 699 - INTEGER(IntKi), PARAMETER :: LSShftFya = 700 - INTEGER(IntKi), PARAMETER :: LSShftFza = 701 - INTEGER(IntKi), PARAMETER :: LSShftFys = 702 - INTEGER(IntKi), PARAMETER :: LSShftFzs = 703 - INTEGER(IntKi), PARAMETER :: LSShftMxa = 704 - INTEGER(IntKi), PARAMETER :: LSSTipMya = 705 - INTEGER(IntKi), PARAMETER :: LSSTipMza = 706 - INTEGER(IntKi), PARAMETER :: LSSTipMys = 707 - INTEGER(IntKi), PARAMETER :: LSSTipMzs = 708 - INTEGER(IntKi), PARAMETER :: RotPwr = 709 + INTEGER(IntKi), PARAMETER :: LSShftFxa = 828 + INTEGER(IntKi), PARAMETER :: LSShftFya = 829 + INTEGER(IntKi), PARAMETER :: LSShftFza = 830 + INTEGER(IntKi), PARAMETER :: LSShftFys = 831 + INTEGER(IntKi), PARAMETER :: LSShftFzs = 832 + INTEGER(IntKi), PARAMETER :: LSShftMxa = 833 + INTEGER(IntKi), PARAMETER :: LSSTipMya = 834 + INTEGER(IntKi), PARAMETER :: LSSTipMza = 835 + INTEGER(IntKi), PARAMETER :: LSSTipMys = 836 + INTEGER(IntKi), PARAMETER :: LSSTipMzs = 837 + INTEGER(IntKi), PARAMETER :: RotPwr = 838 ! Shaft Strain Gage Loads: - INTEGER(IntKi), PARAMETER :: LSSGagMya = 710 - INTEGER(IntKi), PARAMETER :: LSSGagMza = 711 - INTEGER(IntKi), PARAMETER :: LSSGagMys = 712 - INTEGER(IntKi), PARAMETER :: LSSGagMzs = 713 + INTEGER(IntKi), PARAMETER :: LSSGagMya = 839 + INTEGER(IntKi), PARAMETER :: LSSGagMza = 840 + INTEGER(IntKi), PARAMETER :: LSSGagMys = 841 + INTEGER(IntKi), PARAMETER :: LSSGagMzs = 842 ! High-Speed Shaft Loads: - INTEGER(IntKi), PARAMETER :: HSShftTq = 714 - INTEGER(IntKi), PARAMETER :: HSSBrTq = 715 - INTEGER(IntKi), PARAMETER :: HSShftPwr = 716 + INTEGER(IntKi), PARAMETER :: HSShftTq = 843 + INTEGER(IntKi), PARAMETER :: HSSBrTq = 844 + INTEGER(IntKi), PARAMETER :: HSShftPwr = 845 ! Rotor-Furl Bearing Loads: - INTEGER(IntKi), PARAMETER :: RFrlBrM = 717 + INTEGER(IntKi), PARAMETER :: RFrlBrM = 846 ! Tail-Furl Bearing Loads: - INTEGER(IntKi), PARAMETER :: TFrlBrM = 718 + INTEGER(IntKi), PARAMETER :: TFrlBrM = 847 ! Tower-Top / Yaw Bearing Loads: - INTEGER(IntKi), PARAMETER :: YawBrFxn = 719 - INTEGER(IntKi), PARAMETER :: YawBrFyn = 720 - INTEGER(IntKi), PARAMETER :: YawBrFzn = 721 - INTEGER(IntKi), PARAMETER :: YawBrFxp = 722 - INTEGER(IntKi), PARAMETER :: YawBrFyp = 723 - INTEGER(IntKi), PARAMETER :: YawBrMxn = 724 - INTEGER(IntKi), PARAMETER :: YawBrMyn = 725 - INTEGER(IntKi), PARAMETER :: YawBrMzn = 726 - INTEGER(IntKi), PARAMETER :: YawBrMxp = 727 - INTEGER(IntKi), PARAMETER :: YawBrMyp = 728 + INTEGER(IntKi), PARAMETER :: YawBrFxn = 848 + INTEGER(IntKi), PARAMETER :: YawBrFyn = 849 + INTEGER(IntKi), PARAMETER :: YawBrFzn = 850 + INTEGER(IntKi), PARAMETER :: YawBrFxp = 851 + INTEGER(IntKi), PARAMETER :: YawBrFyp = 852 + INTEGER(IntKi), PARAMETER :: YawBrMxn = 853 + INTEGER(IntKi), PARAMETER :: YawBrMyn = 854 + INTEGER(IntKi), PARAMETER :: YawBrMzn = 855 + INTEGER(IntKi), PARAMETER :: YawBrMxp = 856 + INTEGER(IntKi), PARAMETER :: YawBrMyp = 857 ! Tower Base Loads: - INTEGER(IntKi), PARAMETER :: TwrBsFxt = 729 - INTEGER(IntKi), PARAMETER :: TwrBsFyt = 730 - INTEGER(IntKi), PARAMETER :: TwrBsFzt = 731 - INTEGER(IntKi), PARAMETER :: TwrBsMxt = 732 - INTEGER(IntKi), PARAMETER :: TwrBsMyt = 733 - INTEGER(IntKi), PARAMETER :: TwrBsMzt = 734 + INTEGER(IntKi), PARAMETER :: TwrBsFxt = 858 + INTEGER(IntKi), PARAMETER :: TwrBsFyt = 859 + INTEGER(IntKi), PARAMETER :: TwrBsFzt = 860 + INTEGER(IntKi), PARAMETER :: TwrBsMxt = 861 + INTEGER(IntKi), PARAMETER :: TwrBsMyt = 862 + INTEGER(IntKi), PARAMETER :: TwrBsMzt = 863 ! Local Tower Loads: - INTEGER(IntKi), PARAMETER :: TwHt1MLxt = 735 - INTEGER(IntKi), PARAMETER :: TwHt1MLyt = 736 - INTEGER(IntKi), PARAMETER :: TwHt1MLzt = 737 - INTEGER(IntKi), PARAMETER :: TwHt2MLxt = 738 - INTEGER(IntKi), PARAMETER :: TwHt2MLyt = 739 - INTEGER(IntKi), PARAMETER :: TwHt2MLzt = 740 - INTEGER(IntKi), PARAMETER :: TwHt3MLxt = 741 - INTEGER(IntKi), PARAMETER :: TwHt3MLyt = 742 - INTEGER(IntKi), PARAMETER :: TwHt3MLzt = 743 - INTEGER(IntKi), PARAMETER :: TwHt4MLxt = 744 - INTEGER(IntKi), PARAMETER :: TwHt4MLyt = 745 - INTEGER(IntKi), PARAMETER :: TwHt4MLzt = 746 - INTEGER(IntKi), PARAMETER :: TwHt5MLxt = 747 - INTEGER(IntKi), PARAMETER :: TwHt5MLyt = 748 - INTEGER(IntKi), PARAMETER :: TwHt5MLzt = 749 - INTEGER(IntKi), PARAMETER :: TwHt6MLxt = 750 - INTEGER(IntKi), PARAMETER :: TwHt6MLyt = 751 - INTEGER(IntKi), PARAMETER :: TwHt6MLzt = 752 - INTEGER(IntKi), PARAMETER :: TwHt7MLxt = 753 - INTEGER(IntKi), PARAMETER :: TwHt7MLyt = 754 - INTEGER(IntKi), PARAMETER :: TwHt7MLzt = 755 - INTEGER(IntKi), PARAMETER :: TwHt8MLxt = 756 - INTEGER(IntKi), PARAMETER :: TwHt8MLyt = 757 - INTEGER(IntKi), PARAMETER :: TwHt8MLzt = 758 - INTEGER(IntKi), PARAMETER :: TwHt9MLxt = 759 - INTEGER(IntKi), PARAMETER :: TwHt9MLyt = 760 - INTEGER(IntKi), PARAMETER :: TwHt9MLzt = 761 - INTEGER(IntKi), PARAMETER :: TwHt1FLxt = 762 - INTEGER(IntKi), PARAMETER :: TwHt1FLyt = 763 - INTEGER(IntKi), PARAMETER :: TwHt1FLzt = 764 - INTEGER(IntKi), PARAMETER :: TwHt2FLxt = 765 - INTEGER(IntKi), PARAMETER :: TwHt2FLyt = 766 - INTEGER(IntKi), PARAMETER :: TwHt2FLzt = 767 - INTEGER(IntKi), PARAMETER :: TwHt3FLxt = 768 - INTEGER(IntKi), PARAMETER :: TwHt3FLyt = 769 - INTEGER(IntKi), PARAMETER :: TwHt3FLzt = 770 - INTEGER(IntKi), PARAMETER :: TwHt4FLxt = 771 - INTEGER(IntKi), PARAMETER :: TwHt4FLyt = 772 - INTEGER(IntKi), PARAMETER :: TwHt4FLzt = 773 - INTEGER(IntKi), PARAMETER :: TwHt5FLxt = 774 - INTEGER(IntKi), PARAMETER :: TwHt5FLyt = 775 - INTEGER(IntKi), PARAMETER :: TwHt5FLzt = 776 - INTEGER(IntKi), PARAMETER :: TwHt6FLxt = 777 - INTEGER(IntKi), PARAMETER :: TwHt6FLyt = 778 - INTEGER(IntKi), PARAMETER :: TwHt6FLzt = 779 - INTEGER(IntKi), PARAMETER :: TwHt7FLxt = 780 - INTEGER(IntKi), PARAMETER :: TwHt7FLyt = 781 - INTEGER(IntKi), PARAMETER :: TwHt7FLzt = 782 - INTEGER(IntKi), PARAMETER :: TwHt8FLxt = 783 - INTEGER(IntKi), PARAMETER :: TwHt8FLyt = 784 - INTEGER(IntKi), PARAMETER :: TwHt8FLzt = 785 - INTEGER(IntKi), PARAMETER :: TwHt9FLxt = 786 - INTEGER(IntKi), PARAMETER :: TwHt9FLyt = 787 - INTEGER(IntKi), PARAMETER :: TwHt9FLzt = 788 + INTEGER(IntKi), PARAMETER :: TwHt1MLxt = 864 + INTEGER(IntKi), PARAMETER :: TwHt1MLyt = 865 + INTEGER(IntKi), PARAMETER :: TwHt1MLzt = 866 + INTEGER(IntKi), PARAMETER :: TwHt2MLxt = 867 + INTEGER(IntKi), PARAMETER :: TwHt2MLyt = 868 + INTEGER(IntKi), PARAMETER :: TwHt2MLzt = 869 + INTEGER(IntKi), PARAMETER :: TwHt3MLxt = 870 + INTEGER(IntKi), PARAMETER :: TwHt3MLyt = 871 + INTEGER(IntKi), PARAMETER :: TwHt3MLzt = 872 + INTEGER(IntKi), PARAMETER :: TwHt4MLxt = 873 + INTEGER(IntKi), PARAMETER :: TwHt4MLyt = 874 + INTEGER(IntKi), PARAMETER :: TwHt4MLzt = 875 + INTEGER(IntKi), PARAMETER :: TwHt5MLxt = 876 + INTEGER(IntKi), PARAMETER :: TwHt5MLyt = 877 + INTEGER(IntKi), PARAMETER :: TwHt5MLzt = 878 + INTEGER(IntKi), PARAMETER :: TwHt6MLxt = 879 + INTEGER(IntKi), PARAMETER :: TwHt6MLyt = 880 + INTEGER(IntKi), PARAMETER :: TwHt6MLzt = 881 + INTEGER(IntKi), PARAMETER :: TwHt7MLxt = 882 + INTEGER(IntKi), PARAMETER :: TwHt7MLyt = 883 + INTEGER(IntKi), PARAMETER :: TwHt7MLzt = 884 + INTEGER(IntKi), PARAMETER :: TwHt8MLxt = 885 + INTEGER(IntKi), PARAMETER :: TwHt8MLyt = 886 + INTEGER(IntKi), PARAMETER :: TwHt8MLzt = 887 + INTEGER(IntKi), PARAMETER :: TwHt9MLxt = 888 + INTEGER(IntKi), PARAMETER :: TwHt9MLyt = 889 + INTEGER(IntKi), PARAMETER :: TwHt9MLzt = 890 + INTEGER(IntKi), PARAMETER :: TwHt1FLxt = 891 + INTEGER(IntKi), PARAMETER :: TwHt1FLyt = 892 + INTEGER(IntKi), PARAMETER :: TwHt1FLzt = 893 + INTEGER(IntKi), PARAMETER :: TwHt2FLxt = 894 + INTEGER(IntKi), PARAMETER :: TwHt2FLyt = 895 + INTEGER(IntKi), PARAMETER :: TwHt2FLzt = 896 + INTEGER(IntKi), PARAMETER :: TwHt3FLxt = 897 + INTEGER(IntKi), PARAMETER :: TwHt3FLyt = 898 + INTEGER(IntKi), PARAMETER :: TwHt3FLzt = 899 + INTEGER(IntKi), PARAMETER :: TwHt4FLxt = 900 + INTEGER(IntKi), PARAMETER :: TwHt4FLyt = 901 + INTEGER(IntKi), PARAMETER :: TwHt4FLzt = 902 + INTEGER(IntKi), PARAMETER :: TwHt5FLxt = 903 + INTEGER(IntKi), PARAMETER :: TwHt5FLyt = 904 + INTEGER(IntKi), PARAMETER :: TwHt5FLzt = 905 + INTEGER(IntKi), PARAMETER :: TwHt6FLxt = 906 + INTEGER(IntKi), PARAMETER :: TwHt6FLyt = 907 + INTEGER(IntKi), PARAMETER :: TwHt6FLzt = 908 + INTEGER(IntKi), PARAMETER :: TwHt7FLxt = 909 + INTEGER(IntKi), PARAMETER :: TwHt7FLyt = 910 + INTEGER(IntKi), PARAMETER :: TwHt7FLzt = 911 + INTEGER(IntKi), PARAMETER :: TwHt8FLxt = 912 + INTEGER(IntKi), PARAMETER :: TwHt8FLyt = 913 + INTEGER(IntKi), PARAMETER :: TwHt8FLzt = 914 + INTEGER(IntKi), PARAMETER :: TwHt9FLxt = 915 + INTEGER(IntKi), PARAMETER :: TwHt9FLyt = 916 + INTEGER(IntKi), PARAMETER :: TwHt9FLzt = 917 ! Internal Degrees of Freedom: - INTEGER(IntKi), PARAMETER :: Q_B1E1 = 789 - INTEGER(IntKi), PARAMETER :: Q_B2E1 = 790 - INTEGER(IntKi), PARAMETER :: Q_B3E1 = 791 - INTEGER(IntKi), PARAMETER :: Q_B1F1 = 792 - INTEGER(IntKi), PARAMETER :: Q_B2F1 = 793 - INTEGER(IntKi), PARAMETER :: Q_B3F1 = 794 - INTEGER(IntKi), PARAMETER :: Q_B1F2 = 795 - INTEGER(IntKi), PARAMETER :: Q_B2F2 = 796 - INTEGER(IntKi), PARAMETER :: Q_B3F2 = 797 - INTEGER(IntKi), PARAMETER :: Q_Teet = 798 - INTEGER(IntKi), PARAMETER :: Q_DrTr = 799 - INTEGER(IntKi), PARAMETER :: Q_GeAz = 800 - INTEGER(IntKi), PARAMETER :: Q_RFrl = 801 - INTEGER(IntKi), PARAMETER :: Q_TFrl = 802 - INTEGER(IntKi), PARAMETER :: Q_Yaw = 803 - INTEGER(IntKi), PARAMETER :: Q_TFA1 = 804 - INTEGER(IntKi), PARAMETER :: Q_TSS1 = 805 - INTEGER(IntKi), PARAMETER :: Q_TFA2 = 806 - INTEGER(IntKi), PARAMETER :: Q_TSS2 = 807 - INTEGER(IntKi), PARAMETER :: Q_Sg = 808 - INTEGER(IntKi), PARAMETER :: Q_Sw = 809 - INTEGER(IntKi), PARAMETER :: Q_Hv = 810 - INTEGER(IntKi), PARAMETER :: Q_R = 811 - INTEGER(IntKi), PARAMETER :: Q_P = 812 - INTEGER(IntKi), PARAMETER :: Q_Y = 813 - INTEGER(IntKi), PARAMETER :: QD_B1E1 = 814 - INTEGER(IntKi), PARAMETER :: QD_B2E1 = 815 - INTEGER(IntKi), PARAMETER :: QD_B3E1 = 816 - INTEGER(IntKi), PARAMETER :: QD_B1F1 = 817 - INTEGER(IntKi), PARAMETER :: QD_B2F1 = 818 - INTEGER(IntKi), PARAMETER :: QD_B3F1 = 819 - INTEGER(IntKi), PARAMETER :: QD_B1F2 = 820 - INTEGER(IntKi), PARAMETER :: QD_B2F2 = 821 - INTEGER(IntKi), PARAMETER :: QD_B3F2 = 822 - INTEGER(IntKi), PARAMETER :: QD_Teet = 823 - INTEGER(IntKi), PARAMETER :: QD_DrTr = 824 - INTEGER(IntKi), PARAMETER :: QD_GeAz = 825 - INTEGER(IntKi), PARAMETER :: QD_RFrl = 826 - INTEGER(IntKi), PARAMETER :: QD_TFrl = 827 - INTEGER(IntKi), PARAMETER :: QD_Yaw = 828 - INTEGER(IntKi), PARAMETER :: QD_TFA1 = 829 - INTEGER(IntKi), PARAMETER :: QD_TSS1 = 830 - INTEGER(IntKi), PARAMETER :: QD_TFA2 = 831 - INTEGER(IntKi), PARAMETER :: QD_TSS2 = 832 - INTEGER(IntKi), PARAMETER :: QD_Sg = 833 - INTEGER(IntKi), PARAMETER :: QD_Sw = 834 - INTEGER(IntKi), PARAMETER :: QD_Hv = 835 - INTEGER(IntKi), PARAMETER :: QD_R = 836 - INTEGER(IntKi), PARAMETER :: QD_P = 837 - INTEGER(IntKi), PARAMETER :: QD_Y = 838 - INTEGER(IntKi), PARAMETER :: QD2_B1E1 = 839 - INTEGER(IntKi), PARAMETER :: QD2_B2E1 = 840 - INTEGER(IntKi), PARAMETER :: QD2_B3E1 = 841 - INTEGER(IntKi), PARAMETER :: QD2_B1F1 = 842 - INTEGER(IntKi), PARAMETER :: QD2_B2F1 = 843 - INTEGER(IntKi), PARAMETER :: QD2_B3F1 = 844 - INTEGER(IntKi), PARAMETER :: QD2_B1F2 = 845 - INTEGER(IntKi), PARAMETER :: QD2_B2F2 = 846 - INTEGER(IntKi), PARAMETER :: QD2_B3F2 = 847 - INTEGER(IntKi), PARAMETER :: QD2_Teet = 848 - INTEGER(IntKi), PARAMETER :: QD2_DrTr = 849 - INTEGER(IntKi), PARAMETER :: QD2_GeAz = 850 - INTEGER(IntKi), PARAMETER :: QD2_RFrl = 851 - INTEGER(IntKi), PARAMETER :: QD2_TFrl = 852 - INTEGER(IntKi), PARAMETER :: QD2_Yaw = 853 - INTEGER(IntKi), PARAMETER :: QD2_TFA1 = 854 - INTEGER(IntKi), PARAMETER :: QD2_TSS1 = 855 - INTEGER(IntKi), PARAMETER :: QD2_TFA2 = 856 - INTEGER(IntKi), PARAMETER :: QD2_TSS2 = 857 - INTEGER(IntKi), PARAMETER :: QD2_Sg = 858 - INTEGER(IntKi), PARAMETER :: QD2_Sw = 859 - INTEGER(IntKi), PARAMETER :: QD2_Hv = 860 - INTEGER(IntKi), PARAMETER :: QD2_R = 861 - INTEGER(IntKi), PARAMETER :: QD2_P = 862 - INTEGER(IntKi), PARAMETER :: QD2_Y = 863 + INTEGER(IntKi), PARAMETER :: Q_B1E1 = 918 + INTEGER(IntKi), PARAMETER :: Q_B2E1 = 919 + INTEGER(IntKi), PARAMETER :: Q_B3E1 = 920 + INTEGER(IntKi), PARAMETER :: Q_B1F1 = 921 + INTEGER(IntKi), PARAMETER :: Q_B2F1 = 922 + INTEGER(IntKi), PARAMETER :: Q_B3F1 = 923 + INTEGER(IntKi), PARAMETER :: Q_B1F2 = 924 + INTEGER(IntKi), PARAMETER :: Q_B2F2 = 925 + INTEGER(IntKi), PARAMETER :: Q_B3F2 = 926 + INTEGER(IntKi), PARAMETER :: Q_Teet = 927 + INTEGER(IntKi), PARAMETER :: Q_DrTr = 928 + INTEGER(IntKi), PARAMETER :: Q_GeAz = 929 + INTEGER(IntKi), PARAMETER :: Q_RFrl = 930 + INTEGER(IntKi), PARAMETER :: Q_TFrl = 931 + INTEGER(IntKi), PARAMETER :: Q_Yaw = 932 + INTEGER(IntKi), PARAMETER :: Q_TFA1 = 933 + INTEGER(IntKi), PARAMETER :: Q_TSS1 = 934 + INTEGER(IntKi), PARAMETER :: Q_TFA2 = 935 + INTEGER(IntKi), PARAMETER :: Q_TSS2 = 936 + INTEGER(IntKi), PARAMETER :: Q_Sg = 937 + INTEGER(IntKi), PARAMETER :: Q_Sw = 938 + INTEGER(IntKi), PARAMETER :: Q_Hv = 939 + INTEGER(IntKi), PARAMETER :: Q_R = 940 + INTEGER(IntKi), PARAMETER :: Q_P = 941 + INTEGER(IntKi), PARAMETER :: Q_Y = 942 + INTEGER(IntKi), PARAMETER :: QD_B1E1 = 943 + INTEGER(IntKi), PARAMETER :: QD_B2E1 = 944 + INTEGER(IntKi), PARAMETER :: QD_B3E1 = 945 + INTEGER(IntKi), PARAMETER :: QD_B1F1 = 946 + INTEGER(IntKi), PARAMETER :: QD_B2F1 = 947 + INTEGER(IntKi), PARAMETER :: QD_B3F1 = 948 + INTEGER(IntKi), PARAMETER :: QD_B1F2 = 949 + INTEGER(IntKi), PARAMETER :: QD_B2F2 = 950 + INTEGER(IntKi), PARAMETER :: QD_B3F2 = 951 + INTEGER(IntKi), PARAMETER :: QD_Teet = 952 + INTEGER(IntKi), PARAMETER :: QD_DrTr = 953 + INTEGER(IntKi), PARAMETER :: QD_GeAz = 954 + INTEGER(IntKi), PARAMETER :: QD_RFrl = 955 + INTEGER(IntKi), PARAMETER :: QD_TFrl = 956 + INTEGER(IntKi), PARAMETER :: QD_Yaw = 957 + INTEGER(IntKi), PARAMETER :: QD_TFA1 = 958 + INTEGER(IntKi), PARAMETER :: QD_TSS1 = 959 + INTEGER(IntKi), PARAMETER :: QD_TFA2 = 960 + INTEGER(IntKi), PARAMETER :: QD_TSS2 = 961 + INTEGER(IntKi), PARAMETER :: QD_Sg = 962 + INTEGER(IntKi), PARAMETER :: QD_Sw = 963 + INTEGER(IntKi), PARAMETER :: QD_Hv = 964 + INTEGER(IntKi), PARAMETER :: QD_R = 965 + INTEGER(IntKi), PARAMETER :: QD_P = 966 + INTEGER(IntKi), PARAMETER :: QD_Y = 967 + INTEGER(IntKi), PARAMETER :: QD2_B1E1 = 968 + INTEGER(IntKi), PARAMETER :: QD2_B2E1 = 969 + INTEGER(IntKi), PARAMETER :: QD2_B3E1 = 970 + INTEGER(IntKi), PARAMETER :: QD2_B1F1 = 971 + INTEGER(IntKi), PARAMETER :: QD2_B2F1 = 972 + INTEGER(IntKi), PARAMETER :: QD2_B3F1 = 973 + INTEGER(IntKi), PARAMETER :: QD2_B1F2 = 974 + INTEGER(IntKi), PARAMETER :: QD2_B2F2 = 975 + INTEGER(IntKi), PARAMETER :: QD2_B3F2 = 976 + INTEGER(IntKi), PARAMETER :: QD2_Teet = 977 + INTEGER(IntKi), PARAMETER :: QD2_DrTr = 978 + INTEGER(IntKi), PARAMETER :: QD2_GeAz = 979 + INTEGER(IntKi), PARAMETER :: QD2_RFrl = 980 + INTEGER(IntKi), PARAMETER :: QD2_TFrl = 981 + INTEGER(IntKi), PARAMETER :: QD2_Yaw = 982 + INTEGER(IntKi), PARAMETER :: QD2_TFA1 = 983 + INTEGER(IntKi), PARAMETER :: QD2_TSS1 = 984 + INTEGER(IntKi), PARAMETER :: QD2_TFA2 = 985 + INTEGER(IntKi), PARAMETER :: QD2_TSS2 = 986 + INTEGER(IntKi), PARAMETER :: QD2_Sg = 987 + INTEGER(IntKi), PARAMETER :: QD2_Sw = 988 + INTEGER(IntKi), PARAMETER :: QD2_Hv = 989 + INTEGER(IntKi), PARAMETER :: QD2_R = 990 + INTEGER(IntKi), PARAMETER :: QD2_P = 991 + INTEGER(IntKi), PARAMETER :: QD2_Y = 992 ! The maximum number of output channels which can be output by the code. - INTEGER(IntKi), PARAMETER :: MaxOutPts = 863 + INTEGER(IntKi), PARAMETER :: MaxOutPts = 992 !End of code generated by Matlab script ! =================================================================================================== @@ -1115,6 +1244,9 @@ MODULE ElastoDyn_Parameters INTEGER, PARAMETER :: TipALxb(3) = (/TipALxb1, TipALxb2, TipALxb3/) INTEGER, PARAMETER :: TipALyb(3) = (/TipALyb1, TipALyb2, TipALyb3/) INTEGER, PARAMETER :: TipALzb(3) = (/TipALzb1, TipALzb2, TipALzb3/) +INTEGER, PARAMETER :: TipALgxb(3) = (/TipALgxb1, TipALgxb2, TipALgxb3/) +INTEGER, PARAMETER :: TipALgyb(3) = (/TipALgyb1, TipALgyb2, TipALgyb3/) +INTEGER, PARAMETER :: TipALgzb(3) = (/TipALgzb1, TipALgzb2, TipALgzb3/) INTEGER, PARAMETER :: TipRDxb(3) = (/TipRDxb1, TipRDxb2, TipRDxb3/) INTEGER, PARAMETER :: TipRDyb(3) = (/TipRDyb1, TipRDyb2, TipRDyb3/) INTEGER, PARAMETER :: TipRDzc(3) = (/TipRDzc1, TipRDzc2, TipRDzc3/) @@ -1148,6 +1280,22 @@ MODULE ElastoDyn_Parameters Spn1ALzb3,Spn2ALzb3,Spn3ALzb3,Spn4ALzb3,Spn5ALzb3,Spn6ALzb3,Spn7ALzb3,Spn8ALzb3,Spn9ALzb3 & /), (/9, 3/) ) +INTEGER, PARAMETER :: SpnALgxb(9, 3) = RESHAPE( (/ & + Spn1ALgxb1,Spn2ALgxb1,Spn3ALgxb1,Spn4ALgxb1,Spn5ALgxb1,Spn6ALgxb1,Spn7ALgxb1,Spn8ALgxb1,Spn9ALgxb1, & + Spn1ALgxb2,Spn2ALgxb2,Spn3ALgxb2,Spn4ALgxb2,Spn5ALgxb2,Spn6ALgxb2,Spn7ALgxb2,Spn8ALgxb2,Spn9ALgxb2, & + Spn1ALgxb3,Spn2ALgxb3,Spn3ALgxb3,Spn4ALgxb3,Spn5ALgxb3,Spn6ALgxb3,Spn7ALgxb3,Spn8ALgxb3,Spn9ALgxb3 & + /), (/9, 3/) ) +INTEGER, PARAMETER :: SpnALgyb(9, 3) = RESHAPE( (/ & + Spn1ALgyb1,Spn2ALgyb1,Spn3ALgyb1,Spn4ALgyb1,Spn5ALgyb1,Spn6ALgyb1,Spn7ALgyb1,Spn8ALgyb1,Spn9ALgyb1, & + Spn1ALgyb2,Spn2ALgyb2,Spn3ALgyb2,Spn4ALgyb2,Spn5ALgyb2,Spn6ALgyb2,Spn7ALgyb2,Spn8ALgyb2,Spn9ALgyb2, & + Spn1ALgyb3,Spn2ALgyb3,Spn3ALgyb3,Spn4ALgyb3,Spn5ALgyb3,Spn6ALgyb3,Spn7ALgyb3,Spn8ALgyb3,Spn9ALgyb3 & + /), (/9, 3/) ) +INTEGER, PARAMETER :: SpnALgzb(9, 3) = RESHAPE( (/ & + Spn1ALgzb1,Spn2ALgzb1,Spn3ALgzb1,Spn4ALgzb1,Spn5ALgzb1,Spn6ALgzb1,Spn7ALgzb1,Spn8ALgzb1,Spn9ALgzb1, & + Spn1ALgzb2,Spn2ALgzb2,Spn3ALgzb2,Spn4ALgzb2,Spn5ALgzb2,Spn6ALgzb2,Spn7ALgzb2,Spn8ALgzb2,Spn9ALgzb2, & + Spn1ALgzb3,Spn2ALgzb3,Spn3ALgzb3,Spn4ALgzb3,Spn5ALgzb3,Spn6ALgzb3,Spn7ALgzb3,Spn8ALgzb3,Spn9ALgzb3 & + /), (/9, 3/) ) + INTEGER, PARAMETER :: SpnFLxb(9,3) = RESHAPE( (/ & Spn1FLxb1,Spn2FLxb1,Spn3FLxb1,Spn4FLxb1,Spn5FLxb1,Spn6FLxb1,Spn7FLxb1,Spn8FLxb1,Spn9FLxb1, & Spn1FLxb2,Spn2FLxb2,Spn3FLxb2,Spn4FLxb2,Spn5FLxb2,Spn6FLxb2,Spn7FLxb2,Spn8FLxb2,Spn9FLxb2, & @@ -1220,6 +1368,13 @@ MODULE ElastoDyn_Parameters INTEGER, PARAMETER :: TwHtALzt(9) = (/ & TwHt1ALzt,TwHt2ALzt,TwHt3ALzt,TwHt4ALzt,TwHt5ALzt,TwHt6ALzt,TwHt7ALzt,TwHt8ALzt,TwHt9ALzt /) +INTEGER, PARAMETER :: TwHtALgxt(9) = (/ & + TwHt1ALgxt,TwHt2ALgxt,TwHt3ALgxt,TwHt4ALgxt,TwHt5ALgxt,TwHt6ALgxt,TwHt7ALgxt,TwHt8ALgxt,TwHt9ALgxt /) +INTEGER, PARAMETER :: TwHtALgyt(9) = (/ & + TwHt1ALgyt,TwHt2ALgyt,TwHt3ALgyt,TwHt4ALgyt,TwHt5ALgyt,TwHt6ALgyt,TwHt7ALgyt,TwHt8ALgyt,TwHt9ALgyt /) +INTEGER, PARAMETER :: TwHtALgzt(9) = (/ & + TwHt1ALgzt,TwHt2ALgzt,TwHt3ALgzt,TwHt4ALgzt,TwHt5ALgzt,TwHt6ALgzt,TwHt7ALgzt,TwHt8ALgzt,TwHt9ALgzt /) + INTEGER, PARAMETER :: TwHtMLxt(9) = (/ & TwHt1MLxt,TwHt2MLxt,TwHt3MLxt,TwHt4MLxt,TwHt5MLxt,TwHt6MLxt,TwHt7MLxt,TwHt8MLxt,TwHt9MLxt /) INTEGER, PARAMETER :: TwHtMLyt(9) = (/ & diff --git a/modules/hydrodyn/src/HydroDyn.f90 b/modules/hydrodyn/src/HydroDyn.f90 index ba95f2d4e..3aedc321d 100644 --- a/modules/hydrodyn/src/HydroDyn.f90 +++ b/modules/hydrodyn/src/HydroDyn.f90 @@ -263,6 +263,10 @@ SUBROUTINE HydroDyn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, I ! Set summary unit number in Morison initialization input data InputFileData%Morison%UnSum = InputFileData%UnSum + ! Were visualization meshes requested? + p%VisMeshes = InitInp%VisMeshes + + ! Now call each sub-module's *_Init subroutine ! to fully initialize each sub-module based on the necessary initialization data @@ -595,7 +599,10 @@ SUBROUTINE HydroDyn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, I InputFileData%Morison%WaveStMod = InitInp%WaveStMod InputFileData%Morison%WaveField => InitInp%WaveField - ! Initialize the Morison Element Calculations + ! Were visualization meshes requested? + InputFileData%Morison%VisMeshes = p%VisMeshes + + ! Initialize the Morison Element Calculations CALL Morison_Init(InputFileData%Morison, u%Morison, p%Morison, x%Morison, xd%Morison, z%Morison, OtherState%Morison, & y%Morison, m%Morison, Interval, InitOut%Morison, ErrStat2, ErrMsg2 ) CALL SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName) diff --git a/modules/hydrodyn/src/HydroDyn.txt b/modules/hydrodyn/src/HydroDyn.txt index 203c2d819..7404e94a7 100644 --- a/modules/hydrodyn/src/HydroDyn.txt +++ b/modules/hydrodyn/src/HydroDyn.txt @@ -78,6 +78,7 @@ typedef ^ ^ ReKi typedef ^ ^ DbKi TMax - - - "Supplied by Driver: The total simulation time" "(sec)" typedef ^ ^ ReKi PtfmLocationX - - - "Supplied by Driver: X coordinate of platform location in the wave field" "m" typedef ^ ^ ReKi PtfmLocationY - - - "Supplied by Driver: Y coordinate of platform location in the wave field" "m" +typedef ^ ^ logical VisMeshes - .false. - "Output visualization meshes" - # typedef ^ ^ INTEGER NStepWave - 0 - "Total number of frequency components = total number of time steps in the incident wave" - typedef ^ ^ INTEGER NStepWave2 - 0 - "NStepWave / 2" - @@ -196,6 +197,7 @@ typedef ^ ^ R8Ki typedef ^ ^ R8Ki dx {:} - - "vector that determines size of perturbation for x (continuous states)" - typedef ^ ^ Integer Jac_ny - - - "number of outputs in jacobian matrix" - typedef ^ ParameterType LOGICAL PointsToSeaState - .TRUE. - "Flag that determines if the data contains pointers to SeaState module or if new copies (from restart)" - +typedef ^ ^ logical VisMeshes - .false. - "Output visualization meshes" - # # # ..... Inputs .................................................................................................................... diff --git a/modules/hydrodyn/src/HydroDyn_Types.f90 b/modules/hydrodyn/src/HydroDyn_Types.f90 index e70472aac..8f650ed9a 100644 --- a/modules/hydrodyn/src/HydroDyn_Types.f90 +++ b/modules/hydrodyn/src/HydroDyn_Types.f90 @@ -95,6 +95,7 @@ MODULE HydroDyn_Types REAL(DbKi) :: TMax = 0.0_R8Ki !< Supplied by Driver: The total simulation time [(sec)] REAL(ReKi) :: PtfmLocationX = 0.0_ReKi !< Supplied by Driver: X coordinate of platform location in the wave field [m] REAL(ReKi) :: PtfmLocationY = 0.0_ReKi !< Supplied by Driver: Y coordinate of platform location in the wave field [m] + LOGICAL :: VisMeshes = .false. !< Output visualization meshes [-] INTEGER(IntKi) :: NStepWave = 0 !< Total number of frequency components = total number of time steps in the incident wave [-] INTEGER(IntKi) :: NStepWave2 = 0 !< NStepWave / 2 [-] REAL(SiKi) :: RhoXg = 0.0_R4Ki !< = WtrDens*Gravity [-] @@ -215,6 +216,7 @@ MODULE HydroDyn_Types REAL(R8Ki) , DIMENSION(:), ALLOCATABLE :: dx !< vector that determines size of perturbation for x (continuous states) [-] INTEGER(IntKi) :: Jac_ny = 0_IntKi !< number of outputs in jacobian matrix [-] LOGICAL :: PointsToSeaState = .TRUE. !< Flag that determines if the data contains pointers to SeaState module or if new copies (from restart) [-] + LOGICAL :: VisMeshes = .false. !< Output visualization meshes [-] END TYPE HydroDyn_ParameterType ! ======================= ! ========= HydroDyn_InputType ======= @@ -906,6 +908,7 @@ subroutine HydroDyn_CopyInitInput(SrcInitInputData, DstInitInputData, CtrlCode, DstInitInputData%TMax = SrcInitInputData%TMax DstInitInputData%PtfmLocationX = SrcInitInputData%PtfmLocationX DstInitInputData%PtfmLocationY = SrcInitInputData%PtfmLocationY + DstInitInputData%VisMeshes = SrcInitInputData%VisMeshes DstInitInputData%NStepWave = SrcInitInputData%NStepWave DstInitInputData%NStepWave2 = SrcInitInputData%NStepWave2 DstInitInputData%RhoXg = SrcInitInputData%RhoXg @@ -990,6 +993,7 @@ subroutine HydroDyn_PackInitInput(Buf, Indata) call RegPack(Buf, InData%TMax) call RegPack(Buf, InData%PtfmLocationX) call RegPack(Buf, InData%PtfmLocationY) + call RegPack(Buf, InData%VisMeshes) call RegPack(Buf, InData%NStepWave) call RegPack(Buf, InData%NStepWave2) call RegPack(Buf, InData%RhoXg) @@ -1062,6 +1066,8 @@ subroutine HydroDyn_UnPackInitInput(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%PtfmLocationY) if (RegCheckErr(Buf, RoutineName)) return + call RegUnpack(Buf, OutData%VisMeshes) + if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%NStepWave) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%NStepWave2) @@ -2345,6 +2351,7 @@ subroutine HydroDyn_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, Err end if DstParamData%Jac_ny = SrcParamData%Jac_ny DstParamData%PointsToSeaState = SrcParamData%PointsToSeaState + DstParamData%VisMeshes = SrcParamData%VisMeshes end subroutine subroutine HydroDyn_DestroyParam(ParamData, ErrStat, ErrMsg) @@ -2512,6 +2519,7 @@ subroutine HydroDyn_PackParam(Buf, Indata) end if call RegPack(Buf, InData%Jac_ny) call RegPack(Buf, InData%PointsToSeaState) + call RegPack(Buf, InData%VisMeshes) if (RegCheckErr(Buf, RoutineName)) return end subroutine @@ -2738,6 +2746,8 @@ subroutine HydroDyn_UnPackParam(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%PointsToSeaState) if (RegCheckErr(Buf, RoutineName)) return + call RegUnpack(Buf, OutData%VisMeshes) + if (RegCheckErr(Buf, RoutineName)) return end subroutine subroutine HydroDyn_CopyInput(SrcInputData, DstInputData, CtrlCode, ErrStat, ErrMsg) diff --git a/modules/hydrodyn/src/Morison.f90 b/modules/hydrodyn/src/Morison.f90 index 2f9f06f78..cdd6f6396 100644 --- a/modules/hydrodyn/src/Morison.f90 +++ b/modules/hydrodyn/src/Morison.f90 @@ -1933,6 +1933,7 @@ SUBROUTINE Morison_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, In p%WaveDisp = InitInp%WaveDisp p%AMMod = InitInp%AMMod p%WaveStMod = InitInp%WaveStMod + p%VisMeshes = InitInp%VisMeshes ! visualization mesh for morison elements ! Only compute added-mass force up to the free surface if wave stretching is enabled IF ( p%WaveStMod .EQ. 0_IntKi ) THEN @@ -2241,6 +2242,12 @@ SUBROUTINE Morison_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, In call SetErrStat( errStat2, errMsg2, errStat, errMsg, RoutineName ) if ( errStat >= AbortErrLev ) return + ! visualization Line2 mesh + if (p%VisMeshes) then + call VisMeshSetup(u,p,y,m,InitOut,ErrStat2,ErrMsg2); call SetErrStat( ErrStat2, ErrMsg2, errStat, errMsg, 'Morison_Init' ) + if ( errStat >= AbortErrLev ) return + endif + ! We will call CalcOutput to compute the loads for the initial reference position ! Then we can use the computed load components in the Summary File ! NOTE: Morison module has no states, otherwise we could no do this. GJH @@ -2261,7 +2268,111 @@ SUBROUTINE Morison_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, In ! END SUBROUTINE END SUBROUTINE Morison_Init + + !---------------------------------------------------------------------------------------------------------------------------------- +subroutine VisMeshSetup(u,p,y,m,InitOut,ErrStat,ErrMsg) + type(Morison_InputType), intent(inout) :: u + type(Morison_ParameterType), intent(in ) :: p + type(Morison_OutputType), intent(inout) :: y + type(Morison_MiscVarType), intent(inout) :: m + type(Morison_InitOutputType), intent(inout) :: InitOut + integer(IntKi), intent( out) :: ErrStat + character(*), intent( out) :: ErrMsg + + integer(IntKi) :: TotNodes ! total nodes in all elements (may differ from p%NNodes due to overlaps) + integer(IntKi) :: TotElems ! total number of elements + integer(IntKi) :: NdIdx, iMem, iNd, NdNum ! indexing + real(ReKi) :: NdPos(3),Pos1(3),Pos2(3) + real(R8Ki) :: MemberOrient(3,3) + real(R8Ki) :: Theta(3) ! Euler rotations + integer(IntKi) :: ErrStat2 + character(ErrMsgLen) :: ErrMsg2 + character(*), parameter :: RoutineName = 'VisMeshSetup' + + ErrStat = ErrID_None + ErrMsg = "" + + ! Total number of nodes = sum of all member nodes + ! Total number of elements = sum of all member elements + TotNodes=0 + TotElems=0 + do iMem=1,size(p%Members) + TotElems = TotElems + p%Members(iMem)%NElements + TotNodes = TotNodes + size(p%Members(iMem)%NodeIndx) + enddo + + ! Storage for the radius associated with each node + call AllocAry( InitOut%MorisonVisRad, TotNodes, 'MorisonVisRad', ErrStat2, ErrMsg2) + if (Failed()) return + + call MeshCreate( BlankMesh = y%VisMesh, & + IOS = COMPONENT_OUTPUT, & + Nnodes = TotNodes, & + ErrStat = ErrStat2, & + ErrMess = ErrMsg2, & + TranslationDisp = .TRUE., & + Orientation = .TRUE. ) + if (Failed()) return + + ! Position the nodes + NdNum=0 ! node number in y%VisMesh + do iMem=1,size(p%Members) + +!FIXME:MemberOrient This is not correct for non-circular or curved members + ! calculate an orientation using yaw-pitch-roll sequence with roll defined as zero (insufficient info) + Pos1=u%Mesh%Position(:,p%Members(iMem)%NodeIndx(1)) ! start node position of member + Pos2=u%Mesh%Position(:,p%Members(iMem)%NodeIndx(size(p%Members(iMem)%NodeIndx))) ! end node position of member + Theta(1) = 0.0_R8Ki ! roll (assumed since insufficient info) + Theta(2) = acos(real((Pos2(3)-Pos1(3))/norm2(Pos2-Pos1),R8Ki)) ! pitch + Theta(3) = atan2(real(Pos2(2)-Pos1(2),R8Ki),real(Pos2(1)-Pos1(1),R8Ki)) ! yaw + MemberOrient=EulerConstructZYX(Theta) ! yaw-pitch-roll sequence + + ! Set mesh postion, orientation, and radius + do iNd=1,size(p%Members(iMem)%NodeIndx) + NdNum=NdNum+1 ! node number in y%VisMesh + NdIdx = p%Members(iMem)%NodeIndx(iNd) ! node number in u%Mesh + NdPos = u%Mesh%Position(:,NdIdx) ! node position + call MeshPositionNode (y%VisMesh, NdNum, u%Mesh%Position(:,NdIdx), ErrStat2, ErrMsg2, Orient=MemberOrient) + if (Failed()) return + InitOut%MorisonVisRad(NdNum) = p%Members(iMem)%RMG(iNd) ! radius (including marine growth) for visualization + enddo + enddo + + ! make elements (line nodes start at 0 index, so N+1 total nodes) + NdNum=0 ! node number in y%VisMesh + do iMem=1,size(p%Members) + do iNd=1,size(p%Members(iMem)%NodeIndx) + NdNum=NdNum+1 ! node number in y%VisMesh + if (iNd==1) cycle + call MeshConstructElement ( Mesh = y%VisMesh, & + Xelement = ELEMENT_LINE2, & + P1=NdNum-1, P2=NdNum, & ! nodes to connect + errStat = ErrStat2, & + ErrMess = ErrMsg2 ) + if (Failed()) return + enddo + enddo + + ! commit the assembled mesh + call MeshCommit ( y%VisMesh, ErrStat2, ErrMsg2) + if (Failed()) return + + ! map the mesh to u%Mesh + call MeshMapCreate( u%Mesh, y%VisMesh, m%VisMeshMap, ErrStat2, ErrMsg2 ) + if (Failed()) return + +contains + logical function Failed() + CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + Failed = ErrStat >= AbortErrLev + !if (Failed) then + ! call FailCleanup() + !endif + end function Failed +end subroutine VisMeshSetup + + SUBROUTINE RodrigMat(a, R, errStat, errMsg) ! calculates rotation matrix R to rotate unit vertical vector to direction of input vector a @@ -3514,6 +3625,14 @@ SUBROUTINE Morison_CalcOutput( Time, u, p, x, xd, z, OtherState, y, m, errStat, ! Map calculated results into the y%WriteOutput Array CALL MrsnOut_MapOutputs(y, p, u, m) + + ! map the motion to the visulization mesh + if (p%VisMeshes) then + !FIXME: error handling is incorrect here (overwrites all previous errors/warnings) + call Transfer_Point_to_Line2( u%Mesh, y%VisMesh, m%VisMeshMap, ErrStat, ErrMsg ) + endif + + CONTAINS SUBROUTINE GetDisplacedNodePosition( forceDisplaced, pos ) diff --git a/modules/hydrodyn/src/Morison.txt b/modules/hydrodyn/src/Morison.txt index 41be828b7..38dc16137 100644 --- a/modules/hydrodyn/src/Morison.txt +++ b/modules/hydrodyn/src/Morison.txt @@ -276,10 +276,12 @@ typedef ^ ^ INTEGER typedef ^ ^ INTEGER WaveStMod - - - "" - typedef ^ ^ SiKi MCFD - - - "Diameter of the MacCamy-Fuchs member." - typedef ^ ^ SeaSt_WaveFieldType *WaveField - - - "Pointer to SeaState wave field" - +typedef ^ ^ logical VisMeshes - .false. - "Output visualization meshes" - # # # Define outputs from the initialization routine here: # +typedef ^ InitOutputType SiKi MorisonVisRad {:} - - "radius of node (for FAST visualization)" (m) typedef ^ InitOutputType CHARACTER(ChanLen) WriteOutputHdr {:} - - "User-requested Output channel names" - typedef ^ ^ CHARACTER(ChanLen) WriteOutputUnt {:} - - "" - # @@ -327,6 +329,7 @@ typedef ^ ^ ReKi typedef ^ ^ ReKi V_rel_n {:} - - "Normal relative flow velocity at joints" m/s typedef ^ ^ ReKi V_rel_n_HiPass {:} - - "High-pass filtered normal relative flow velocity at joints" m/s typedef ^ ^ INTEGER LastIndWave - - - "Last time index used in the wave kinematics arrays" - +typedef ^ ^ MeshMapType VisMeshMap - - - "Mesh mapping for visualization mesh" - # ..... Parameters ................................................................................................................ # Define parameters here: @@ -362,6 +365,7 @@ typedef ^ ^ OutParmType typedef ^ ^ INTEGER NumOuts - - - "" - typedef ^ ^ INTEGER WaveStMod - - - "" - typedef ^ ^ SeaSt_WaveFieldType *WaveField - - - "SeaState wave field" - +typedef ^ ^ logical VisMeshes - .false. - "Output visualization meshes" - # # # ..... Inputs .................................................................................................................... @@ -373,4 +377,5 @@ typedef ^ InputType MeshType # ..... Outputs ................................................................................................................... # Define outputs that are contained on the mesh here: typedef ^ OutputType MeshType Mesh - - - "Loads on each node output mesh" - +typedef ^ ^ MeshType VisMesh - - - "Line mesh for visualization" - typedef ^ ^ ReKi WriteOutput {:} - - "" - diff --git a/modules/hydrodyn/src/Morison_Types.f90 b/modules/hydrodyn/src/Morison_Types.f90 index e5e8242fd..4afa3ffc6 100644 --- a/modules/hydrodyn/src/Morison_Types.f90 +++ b/modules/hydrodyn/src/Morison_Types.f90 @@ -339,10 +339,12 @@ MODULE Morison_Types INTEGER(IntKi) :: WaveStMod = 0_IntKi !< [-] REAL(SiKi) :: MCFD = 0.0_R4Ki !< Diameter of the MacCamy-Fuchs member. [-] TYPE(SeaSt_WaveFieldType) , POINTER :: WaveField => NULL() !< Pointer to SeaState wave field [-] + LOGICAL :: VisMeshes = .false. !< Output visualization meshes [-] END TYPE Morison_InitInputType ! ======================= ! ========= Morison_InitOutputType ======= TYPE, PUBLIC :: Morison_InitOutputType + REAL(SiKi) , DIMENSION(:), ALLOCATABLE :: MorisonVisRad !< radius of node (for FAST visualization) [(m)] CHARACTER(ChanLen) , DIMENSION(:), ALLOCATABLE :: WriteOutputHdr !< User-requested Output channel names [-] CHARACTER(ChanLen) , DIMENSION(:), ALLOCATABLE :: WriteOutputUnt !< [-] END TYPE Morison_InitOutputType @@ -390,6 +392,7 @@ MODULE Morison_Types REAL(ReKi) , DIMENSION(:), ALLOCATABLE :: V_rel_n !< Normal relative flow velocity at joints [m/s] REAL(ReKi) , DIMENSION(:), ALLOCATABLE :: V_rel_n_HiPass !< High-pass filtered normal relative flow velocity at joints [m/s] INTEGER(IntKi) :: LastIndWave = 0_IntKi !< Last time index used in the wave kinematics arrays [-] + TYPE(MeshMapType) :: VisMeshMap !< Mesh mapping for visualization mesh [-] END TYPE Morison_MiscVarType ! ======================= ! ========= Morison_ParameterType ======= @@ -424,6 +427,7 @@ MODULE Morison_Types INTEGER(IntKi) :: NumOuts = 0_IntKi !< [-] INTEGER(IntKi) :: WaveStMod = 0_IntKi !< [-] TYPE(SeaSt_WaveFieldType) , POINTER :: WaveField => NULL() !< SeaState wave field [-] + LOGICAL :: VisMeshes = .false. !< Output visualization meshes [-] END TYPE Morison_ParameterType ! ======================= ! ========= Morison_InputType ======= @@ -434,6 +438,7 @@ MODULE Morison_Types ! ========= Morison_OutputType ======= TYPE, PUBLIC :: Morison_OutputType TYPE(MeshType) :: Mesh !< Loads on each node output mesh [-] + TYPE(MeshType) :: VisMesh !< Line mesh for visualization [-] REAL(ReKi) , DIMENSION(:), ALLOCATABLE :: WriteOutput !< [-] END TYPE Morison_OutputType ! ======================= @@ -3722,6 +3727,7 @@ subroutine Morison_CopyInitInput(SrcInitInputData, DstInitInputData, CtrlCode, E DstInitInputData%WaveStMod = SrcInitInputData%WaveStMod DstInitInputData%MCFD = SrcInitInputData%MCFD DstInitInputData%WaveField => SrcInitInputData%WaveField + DstInitInputData%VisMeshes = SrcInitInputData%VisMeshes end subroutine subroutine Morison_DestroyInitInput(InitInputData, ErrStat, ErrMsg) @@ -3998,6 +4004,7 @@ subroutine Morison_PackInitInput(Buf, Indata) call SeaSt_WaveField_PackSeaSt_WaveFieldType(Buf, InData%WaveField) end if end if + call RegPack(Buf, InData%VisMeshes) if (RegCheckErr(Buf, RoutineName)) return end subroutine @@ -4289,6 +4296,8 @@ subroutine Morison_UnPackInitInput(Buf, OutData) else OutData%WaveField => null() end if + call RegUnpack(Buf, OutData%VisMeshes) + if (RegCheckErr(Buf, RoutineName)) return end subroutine subroutine Morison_CopyInitOutput(SrcInitOutputData, DstInitOutputData, CtrlCode, ErrStat, ErrMsg) @@ -4302,6 +4311,18 @@ subroutine Morison_CopyInitOutput(SrcInitOutputData, DstInitOutputData, CtrlCode character(*), parameter :: RoutineName = 'Morison_CopyInitOutput' ErrStat = ErrID_None ErrMsg = '' + if (allocated(SrcInitOutputData%MorisonVisRad)) then + LB(1:1) = lbound(SrcInitOutputData%MorisonVisRad) + UB(1:1) = ubound(SrcInitOutputData%MorisonVisRad) + if (.not. allocated(DstInitOutputData%MorisonVisRad)) then + allocate(DstInitOutputData%MorisonVisRad(LB(1):UB(1)), stat=ErrStat2) + if (ErrStat2 /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating DstInitOutputData%MorisonVisRad.', ErrStat, ErrMsg, RoutineName) + return + end if + end if + DstInitOutputData%MorisonVisRad = SrcInitOutputData%MorisonVisRad + end if if (allocated(SrcInitOutputData%WriteOutputHdr)) then LB(1:1) = lbound(SrcInitOutputData%WriteOutputHdr) UB(1:1) = ubound(SrcInitOutputData%WriteOutputHdr) @@ -4335,6 +4356,9 @@ subroutine Morison_DestroyInitOutput(InitOutputData, ErrStat, ErrMsg) character(*), parameter :: RoutineName = 'Morison_DestroyInitOutput' ErrStat = ErrID_None ErrMsg = '' + if (allocated(InitOutputData%MorisonVisRad)) then + deallocate(InitOutputData%MorisonVisRad) + end if if (allocated(InitOutputData%WriteOutputHdr)) then deallocate(InitOutputData%WriteOutputHdr) end if @@ -4348,6 +4372,11 @@ subroutine Morison_PackInitOutput(Buf, Indata) type(Morison_InitOutputType), intent(in) :: InData character(*), parameter :: RoutineName = 'Morison_PackInitOutput' if (Buf%ErrStat >= AbortErrLev) return + call RegPack(Buf, allocated(InData%MorisonVisRad)) + if (allocated(InData%MorisonVisRad)) then + call RegPackBounds(Buf, 1, lbound(InData%MorisonVisRad), ubound(InData%MorisonVisRad)) + call RegPack(Buf, InData%MorisonVisRad) + end if call RegPack(Buf, allocated(InData%WriteOutputHdr)) if (allocated(InData%WriteOutputHdr)) then call RegPackBounds(Buf, 1, lbound(InData%WriteOutputHdr), ubound(InData%WriteOutputHdr)) @@ -4369,6 +4398,20 @@ subroutine Morison_UnPackInitOutput(Buf, OutData) integer(IntKi) :: stat logical :: IsAllocAssoc if (Buf%ErrStat /= ErrID_None) return + if (allocated(OutData%MorisonVisRad)) deallocate(OutData%MorisonVisRad) + call RegUnpack(Buf, IsAllocAssoc) + if (RegCheckErr(Buf, RoutineName)) return + if (IsAllocAssoc) then + call RegUnpackBounds(Buf, 1, LB, UB) + if (RegCheckErr(Buf, RoutineName)) return + allocate(OutData%MorisonVisRad(LB(1):UB(1)),stat=stat) + if (stat /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%MorisonVisRad.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + return + end if + call RegUnpack(Buf, OutData%MorisonVisRad) + if (RegCheckErr(Buf, RoutineName)) return + end if if (allocated(OutData%WriteOutputHdr)) deallocate(OutData%WriteOutputHdr) call RegUnpack(Buf, IsAllocAssoc) if (RegCheckErr(Buf, RoutineName)) return @@ -4591,7 +4634,7 @@ subroutine Morison_UnPackOtherState(Buf, OutData) end subroutine subroutine Morison_CopyMisc(SrcMiscData, DstMiscData, CtrlCode, ErrStat, ErrMsg) - type(Morison_MiscVarType), intent(in) :: SrcMiscData + type(Morison_MiscVarType), intent(inout) :: SrcMiscData type(Morison_MiscVarType), intent(inout) :: DstMiscData integer(IntKi), intent(in ) :: CtrlCode integer(IntKi), intent( out) :: ErrStat @@ -4848,6 +4891,9 @@ subroutine Morison_CopyMisc(SrcMiscData, DstMiscData, CtrlCode, ErrStat, ErrMsg) DstMiscData%V_rel_n_HiPass = SrcMiscData%V_rel_n_HiPass end if DstMiscData%LastIndWave = SrcMiscData%LastIndWave + call NWTC_Library_CopyMeshMapType(SrcMiscData%VisMeshMap, DstMiscData%VisMeshMap, CtrlCode, ErrStat2, ErrMsg2) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + if (ErrStat >= AbortErrLev) return end subroutine subroutine Morison_DestroyMisc(MiscData, ErrStat, ErrMsg) @@ -4927,6 +4973,8 @@ subroutine Morison_DestroyMisc(MiscData, ErrStat, ErrMsg) if (allocated(MiscData%V_rel_n_HiPass)) then deallocate(MiscData%V_rel_n_HiPass) end if + call NWTC_Library_DestroyMeshMapType(MiscData%VisMeshMap, ErrStat2, ErrMsg2) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) end subroutine subroutine Morison_PackMisc(Buf, Indata) @@ -5041,6 +5089,7 @@ subroutine Morison_PackMisc(Buf, Indata) call RegPack(Buf, InData%V_rel_n_HiPass) end if call RegPack(Buf, InData%LastIndWave) + call NWTC_Library_PackMeshMapType(Buf, InData%VisMeshMap) if (RegCheckErr(Buf, RoutineName)) return end subroutine @@ -5336,6 +5385,7 @@ subroutine Morison_UnPackMisc(Buf, OutData) end if call RegUnpack(Buf, OutData%LastIndWave) if (RegCheckErr(Buf, RoutineName)) return + call NWTC_Library_UnpackMeshMapType(Buf, OutData%VisMeshMap) ! VisMeshMap end subroutine subroutine Morison_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg) @@ -5551,6 +5601,7 @@ subroutine Morison_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrM DstParamData%NumOuts = SrcParamData%NumOuts DstParamData%WaveStMod = SrcParamData%WaveStMod DstParamData%WaveField => SrcParamData%WaveField + DstParamData%VisMeshes = SrcParamData%VisMeshes end subroutine subroutine Morison_DestroyParam(ParamData, ErrStat, ErrMsg) @@ -5749,6 +5800,7 @@ subroutine Morison_PackParam(Buf, Indata) call SeaSt_WaveField_PackSeaSt_WaveFieldType(Buf, InData%WaveField) end if end if + call RegPack(Buf, InData%VisMeshes) if (RegCheckErr(Buf, RoutineName)) return end subroutine @@ -6013,6 +6065,8 @@ subroutine Morison_UnPackParam(Buf, OutData) else OutData%WaveField => null() end if + call RegUnpack(Buf, OutData%VisMeshes) + if (RegCheckErr(Buf, RoutineName)) return end subroutine subroutine Morison_CopyInput(SrcInputData, DstInputData, CtrlCode, ErrStat, ErrMsg) @@ -6076,6 +6130,9 @@ subroutine Morison_CopyOutput(SrcOutputData, DstOutputData, CtrlCode, ErrStat, E call MeshCopy(SrcOutputData%Mesh, DstOutputData%Mesh, CtrlCode, ErrStat2, ErrMsg2 ) call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) if (ErrStat >= AbortErrLev) return + call MeshCopy(SrcOutputData%VisMesh, DstOutputData%VisMesh, CtrlCode, ErrStat2, ErrMsg2 ) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + if (ErrStat >= AbortErrLev) return if (allocated(SrcOutputData%WriteOutput)) then LB(1:1) = lbound(SrcOutputData%WriteOutput) UB(1:1) = ubound(SrcOutputData%WriteOutput) @@ -6101,6 +6158,8 @@ subroutine Morison_DestroyOutput(OutputData, ErrStat, ErrMsg) ErrMsg = '' call MeshDestroy( OutputData%Mesh, ErrStat2, ErrMsg2) call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + call MeshDestroy( OutputData%VisMesh, ErrStat2, ErrMsg2) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) if (allocated(OutputData%WriteOutput)) then deallocate(OutputData%WriteOutput) end if @@ -6112,6 +6171,7 @@ subroutine Morison_PackOutput(Buf, Indata) character(*), parameter :: RoutineName = 'Morison_PackOutput' if (Buf%ErrStat >= AbortErrLev) return call MeshPack(Buf, InData%Mesh) + call MeshPack(Buf, InData%VisMesh) call RegPack(Buf, allocated(InData%WriteOutput)) if (allocated(InData%WriteOutput)) then call RegPackBounds(Buf, 1, lbound(InData%WriteOutput), ubound(InData%WriteOutput)) @@ -6129,6 +6189,7 @@ subroutine Morison_UnPackOutput(Buf, OutData) logical :: IsAllocAssoc if (Buf%ErrStat /= ErrID_None) return call MeshUnpack(Buf, OutData%Mesh) ! Mesh + call MeshUnpack(Buf, OutData%VisMesh) ! VisMesh if (allocated(OutData%WriteOutput)) deallocate(OutData%WriteOutput) call RegUnpack(Buf, IsAllocAssoc) if (RegCheckErr(Buf, RoutineName)) return @@ -6400,6 +6461,8 @@ SUBROUTINE Morison_Output_ExtrapInterp1(y1, y2, tin, y_out, tin_out, ErrStat, Er CALL MeshExtrapInterp1(y1%Mesh, y2%Mesh, tin, y_out%Mesh, tin_out, ErrStat2, ErrMsg2) CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) + CALL MeshExtrapInterp1(y1%VisMesh, y2%VisMesh, tin, y_out%VisMesh, tin_out, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) IF (ALLOCATED(y_out%WriteOutput) .AND. ALLOCATED(y1%WriteOutput)) THEN y_out%WriteOutput = a1*y1%WriteOutput + a2*y2%WriteOutput END IF ! check if allocated @@ -6462,6 +6525,8 @@ SUBROUTINE Morison_Output_ExtrapInterp2(y1, y2, y3, tin, y_out, tin_out, ErrStat a3 = (t_out - t(1))*(t_out - t(2))/((t(3) - t(1))*(t(3) - t(2))) CALL MeshExtrapInterp2(y1%Mesh, y2%Mesh, y3%Mesh, tin, y_out%Mesh, tin_out, ErrStat2, ErrMsg2) CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) + CALL MeshExtrapInterp2(y1%VisMesh, y2%VisMesh, y3%VisMesh, tin, y_out%VisMesh, tin_out, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) IF (ALLOCATED(y_out%WriteOutput) .AND. ALLOCATED(y1%WriteOutput)) THEN y_out%WriteOutput = a1*y1%WriteOutput + a2*y2%WriteOutput + a3*y3%WriteOutput END IF ! check if allocated diff --git a/modules/moordyn/README.md b/modules/moordyn/README.md index 8a7aaeff0..1042d2a07 100644 --- a/modules/moordyn/README.md +++ b/modules/moordyn/README.md @@ -16,12 +16,10 @@ The Fortran implementation of MoorDyn, which has been developed following the FAST Modularization Framework, is included as a module in OpenFAST. -For the C++ implementation of MoorDyn, see http://www.matt-hall.ca/moordyn. -"MoorDyn C" can be compiled as a dynamically-linked library and features -simpler functions for easy coupling with models or scripts coded in C/C++, -Fortran, Matlab/Simulink, etc. It has recently been integrated into WEC-Sim. +For the C++ implementation of MoorDyn, see https://github.com/FloatingArrayDesign/MoorDyn. +"MoorDynC" is more adaptable to unique use cases and couplings. It can be compiled as a dynamically-linked library or wrapped for use in Python (as a module), Fortran, and Matlab. It features simpler functions for easy coupling with models or scripts coded in C/C++, Fortran, Matlab/Simulink, etc. An example of this coupling is it’s integration into WEC-Sim. -Both forms of MoorDyn feature the same underlying mooring model, use similar +Both forms of MoorDyn feature the same underlying mooring model, use the same input and output conventions, and are being updated and improved in parallel. They follow the same version numbering, with a "C" or "F" suffix for differentiation. diff --git a/modules/moordyn/src/MoorDyn.f90 b/modules/moordyn/src/MoorDyn.f90 index f7b840968..ea63f639c 100644 --- a/modules/moordyn/src/MoorDyn.f90 +++ b/modules/moordyn/src/MoorDyn.f90 @@ -34,7 +34,7 @@ MODULE MoorDyn PRIVATE - TYPE(ProgDesc), PARAMETER :: MD_ProgDesc = ProgDesc( 'MoorDyn', 'v2.0.0', '2022-12-08' ) + TYPE(ProgDesc), PARAMETER :: MD_ProgDesc = ProgDesc( 'MoorDyn', 'v2.0.0', '2023-09-18' ) INTEGER(IntKi), PARAMETER :: wordy = 0 ! verbosity level. >1 = more console output @@ -163,7 +163,7 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er InitOut%Ver = MD_ProgDesc CALL WrScr(' This is MoorDyn v2, with significant input file changes from v1.') - CALL WrScr(' Copyright: (C) 2022 National Renewable Energy Laboratory, (C) 2019 Matt Hall') + CALL WrScr(' Copyright: (C) 2023 National Renewable Energy Laboratory, (C) 2019 Matt Hall') !--------------------------------------------------------------------------------------------- @@ -193,6 +193,7 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er p%mu_kA = 0.0_DbKi p%mc = 1.0_DbKi p%cv = 200.0_DbKi + p%VisMeshes = InitInp%VisMeshes ! Visualization meshes requested by glue code DepthValue = "" ! Start off as empty string, to only be filled if MD setting is specified (otherwise InitInp%WtrDepth is used) ! DepthValue and InitInp%WtrDepth are processed later by setupBathymetry. WaterKinValue = "" @@ -213,13 +214,13 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er ! allocate some parameter arrays that are for each turbine (size 1 if regular OpenFAST use) allocate( p%nCpldBodies( p%nTurbines)) allocate( p%nCpldRods ( p%nTurbines)) - allocate( p%nCpldCons ( p%nTurbines)) + allocate( p%nCpldPoints ( p%nTurbines)) allocate( p%TurbineRefPos(3, p%nTurbines)) ! initialize the arrays (to zero, except for passed in farm turbine reference positions) p%nCpldBodies = 0 p%nCpldRods = 0 - p%nCpldCons = 0 + p%nCpldPoints = 0 if (InitInp%FarmSize > 0) then p%TurbineRefPos = InitInp%TurbineRefPos ! copy over turbine reference positions for later use @@ -345,7 +346,7 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er ! find how many elements of this type there are Line = NextLine(i) DO while (INDEX(Line, "---") == 0) ! while we DON'T find another header line - p%nConnects = p%nConnects + 1 + p%nPoints = p%nPoints + 1 Line = NextLine(i) END DO @@ -361,7 +362,7 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er Line = NextLine(i) END DO - else if (INDEX(Line, "CONTROL") > 0) then ! if failure conditions header + else if (INDEX(Line, "CONTROL") > 0) then ! if control conditions header IF (wordy > 1) print *, " Reading control channels: "; @@ -482,13 +483,13 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er end do - p%nConnectsExtra = p%nConnects + 2*p%nLines ! set maximum number of connections, accounting for possible detachment of each line end and a connection for that + p%nPointsExtra = p%nPoints + 2*p%nLines ! set maximum number of points, accounting for possible detachment of each line end and a point for that IF (wordy > 0) print *, " Identified ", p%nLineTypes , "LineTypes in input file." IF (wordy > 0) print *, " Identified ", p%nRodTypes , "RodTypes in input file." IF (wordy > 0) print *, " Identified ", p%nBodies , "Bodies in input file." IF (wordy > 0) print *, " Identified ", p%nRods , "Rods in input file." - IF (wordy > 0) print *, " Identified ", p%nConnects , "Connections in input file." + IF (wordy > 0) print *, " Identified ", p%nPoints , "Points in input file." IF (wordy > 0) print *, " Identified ", p%nLines , "Lines in input file." IF (wordy > 0) print *, " Identified ", nOpts , "Options in input file." @@ -534,7 +535,7 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er ALLOCATE(m%BodyList( p%nBodies ), STAT = ErrStat2 ); if(AllocateFailed("BodyList" )) return ALLOCATE(m%RodList( p%nRods ), STAT = ErrStat2 ); if(AllocateFailed("RodList" )) return - ALLOCATE(m%ConnectList( p%nConnects ), STAT = ErrStat2 ); if(AllocateFailed("ConnectList" )) return + ALLOCATE(m%PointList( p%nPoints ), STAT = ErrStat2 ); if(AllocateFailed("PointList" )) return ALLOCATE(m%LineList( p%nLines ), STAT = ErrStat2 ); if(AllocateFailed("LineList" )) return ALLOCATE(m%FailList( p%nFails ), STAT = ErrStat2 ); if(AllocateFailed("FailList" )) return @@ -543,16 +544,16 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er ! Allocate associated index arrays (note: some are allocated larger than will be used, for simplicity) ALLOCATE(m%BodyStateIs1(p%nBodies ), m%BodyStateIsN(p%nBodies ), STAT=ErrStat2); if(AllocateFailed("BodyStateIs1/N")) return ALLOCATE(m%RodStateIs1(p%nRods ), m%RodStateIsN(p%nRods ), STAT=ErrStat2); if(AllocateFailed("RodStateIs1/N" )) return - ALLOCATE(m%ConStateIs1(p%nConnects), m%ConStateIsN(p%nConnects), STAT=ErrStat2); if(AllocateFailed("ConStateIs1/N" )) return + ALLOCATE(m%PointStateIs1(p%nPoints), m%PointStateIsN(p%nPoints), STAT=ErrStat2); if(AllocateFailed("PointStateIs1/N" )) return ALLOCATE(m%LineStateIs1(p%nLines) , m%LineStateIsN(p%nLines) , STAT=ErrStat2); if(AllocateFailed("LineStateIs1/N")) return ALLOCATE(m%FreeBodyIs( p%nBodies ), STAT=ErrStat2); if(AllocateFailed("FreeBodyIs")) return ALLOCATE(m%FreeRodIs( p%nRods ), STAT=ErrStat2); if(AllocateFailed("FreeRodIs")) return - ALLOCATE(m%FreeConIs( p%nConnects), STAT=ErrStat2); if(AllocateFailed("FreeConnectIs")) return + ALLOCATE(m%FreePointIs( p%nPoints), STAT=ErrStat2); if(AllocateFailed("FreePointIs")) return ALLOCATE(m%CpldBodyIs(p%nBodies , p%nTurbines), STAT=ErrStat2); if(AllocateFailed("CpldBodyIs")) return ALLOCATE(m%CpldRodIs( p%nRods , p%nTurbines), STAT=ErrStat2); if(AllocateFailed("CpldRodIs")) return - ALLOCATE(m%CpldConIs(p%nConnects, p%nTurbines), STAT=ErrStat2); if(AllocateFailed("CpldConnectIs")) return + ALLOCATE(m%CpldPointIs(p%nPoints, p%nTurbines), STAT=ErrStat2); if(AllocateFailed("CpldPointIs")) return ! ---------------------- now go through again and process file contents -------------------- @@ -824,6 +825,7 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er if ((let1 == "ANCHOR") .or. (let1 == "FIXED") .or. (let1 == "FIX")) then ! if a fixed body (this would just be used if someone wanted to temporarly fix a body that things were attached to) m%BodyList(l)%typeNum = 1 + m%BodyList(l)%r6 = tempArray ! set initial body position and orientation else if ((let1 == "COUPLED") .or. (let1 == "VESSEL") .or. (let1 == "CPLD") .or. (let1 == "VES")) then ! if a coupled body @@ -930,8 +932,8 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er CALL Body_AddRod(m%GroundBody, l, tempArray) ! add rod l to Ground body - else if ((let1 == "PINNED") .or. (let1 == "PIN")) then - m%RodList(l)%typeNum = 1 + else if ((let1 == "PINNED") .or. (let1 == "PIN")) then + m%RodList(l)%typeNum = 1 CALL Body_AddRod(m%GroundBody, l, tempArray) ! add rod l to Ground body p%nFreeRods=p%nFreeRods+1 ! add this pinned rod to the free list because it is half free @@ -1081,7 +1083,7 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er Line = NextLine(i) ! process each point - DO l = 1,p%nConnects + DO l = 1,p%nPoints !read into a line Line = NextLine(i) @@ -1095,9 +1097,9 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er ! parse out entries: PointID Attachment X Y Z M V CdA Ca IF (ErrStat2 == 0) THEN - READ(Line,*,IOSTAT=ErrStat2) m%ConnectList(l)%IdNum, tempString1, tempArray(1), & - tempArray(2), tempString4, m%ConnectList(l)%conM, & - m%ConnectList(l)%conV, m%ConnectList(l)%conCdA, m%ConnectList(l)%conCa + READ(Line,*,IOSTAT=ErrStat2) m%PointList(l)%IdNum, tempString1, tempArray(1), & + tempArray(2), tempString4, m%PointList(l)%pointM, & + m%PointList(l)%pointV, m%PointList(l)%pointCdA, m%PointList(l)%pointCa CALL Conv2UC(tempString4) ! convert to uppercase so that matching is not case-sensitive @@ -1111,9 +1113,9 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er end if ! not used - m%ConnectList(l)%conFX = 0.0_DbKi - m%ConnectList(l)%conFY = 0.0_DbKi - m%ConnectList(l)%conFZ = 0.0_DbKi + m%PointList(l)%pointFX = 0.0_DbKi + m%PointList(l)%pointFY = 0.0_DbKi + m%PointList(l)%pointFZ = 0.0_DbKi END IF @@ -1121,59 +1123,59 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er IF ( ErrStat2 /= 0 ) THEN CALL WrScr(' Unable to parse Point '//trim(Num2LStr(l))//' row in input file.') ! Specific screen output because errors likely CALL WrScr(' Ensure row has all 9 columns, including CdA and Ca.') ! to be caused by non-updated input file formats. - CALL SetErrStat( ErrID_Fatal, 'Failed to read connects.' , ErrStat, ErrMsg, RoutineName ) ! would be nice to specify which line <<<<<<<<< + CALL SetErrStat( ErrID_Fatal, 'Failed to read points.' , ErrStat, ErrMsg, RoutineName ) ! would be nice to specify which line <<<<<<<<< CALL CleanUp() RETURN END IF - m%ConnectList(l)%r = tempArray(1:3) ! set initial, or reference, node position (for coupled or child objects, this will be the local reference location about the parent) + m%PointList(l)%r = tempArray(1:3) ! set initial, or reference, node position (for coupled or child objects, this will be the local reference location about the parent) - !----------- process connection type ----------------- + !----------- process point type ----------------- call DecomposeString(tempString1, let1, num1, let2, num2, let3) if ((let1 == "ANCHOR") .or. (let1 == "FIXED") .or. (let1 == "FIX")) then - m%ConnectList(l)%typeNum = 1 + m%PointList(l)%typeNum = 1 - !m%ConnectList(l)%r = tempArray(1:3) ! set initial node position + !m%PointList(l)%r = tempArray(1:3) ! set initial node position - CALL Body_AddConnect(m%GroundBody, l, tempArray(1:3)) ! add connection l to Ground body + CALL Body_AddPoint(m%GroundBody, l, tempArray(1:3)) ! add point l to Ground body else if (let1 == "BODY") then ! attached to a body if (len_trim(num1) > 0) then READ(num1, *) J ! convert to int, representing parent body index if ((J <= p%nBodies) .and. (J > 0)) then - m%ConnectList(l)%typeNum = 1 + m%PointList(l)%typeNum = 1 - CALL Body_AddConnect(m%BodyList(J), l, tempArray(1:3)) ! add connection l to Ground body + CALL Body_AddPoint(m%BodyList(J), l, tempArray(1:3)) ! add point l to Ground body else - CALL SetErrStat( ErrID_Fatal, "Body ID out of bounds for Connection "//trim(Num2LStr(l))//".", ErrStat, ErrMsg, RoutineName ) + CALL SetErrStat( ErrID_Fatal, "Body ID out of bounds for Point "//trim(Num2LStr(l))//".", ErrStat, ErrMsg, RoutineName ) return end if else - CALL SetErrStat( ErrID_Fatal, "No number provided for Connection "//trim(Num2LStr(l))//" Body attachment.", ErrStat, ErrMsg, RoutineName ) + CALL SetErrStat( ErrID_Fatal, "No number provided for Point "//trim(Num2LStr(l))//" Body attachment.", ErrStat, ErrMsg, RoutineName ) return end if else if ((let1 == "VESSEL") .or. (let1 == "VES") .or. (let1 == "COUPLED") .or. (let1 == "CPLD")) then ! if a fairlead, add to list and add - m%ConnectList(l)%typeNum = -1 - p%nCpldCons(1)=p%nCpldCons(1)+1 - m%CpldConIs(p%nCpldCons(1),1) = l + m%PointList(l)%typeNum = -1 + p%nCpldPoints(1)=p%nCpldPoints(1)+1 + m%CpldPointIs(p%nCpldPoints(1),1) = l - else if ((let1 == "CONNECT") .or. (let1 == "CON") .or. (let1 == "FREE")) then - m%ConnectList(l)%typeNum = 0 + else if ((let1 == "POINT") .or. (let1 == "P") .or. (let1 == "FREE")) then + m%PointList(l)%typeNum = 0 - p%nFreeCons=p%nFreeCons+1 ! add this pinned rod to the free list because it is half free + p%nFreePoints=p%nFreePoints+1 ! add this pinned rod to the free list because it is half free - m%ConStateIs1(p%nFreeCons) = Nx+1 - m%ConStateIsN(p%nFreeCons) = Nx+6 - Nx = Nx + 6 ! add 12 state variables for free Connection + m%PointStateIs1(p%nFreePoints) = Nx+1 + m%PointStateIsN(p%nFreePoints) = Nx+6 + Nx = Nx + 6 ! add 12 state variables for free Point - m%FreeConIs(p%nFreeCons) = l + m%FreePointIs(p%nFreePoints) = l - !m%ConnectList(l)%r = tempArray(1:3) ! set initial node position + !m%PointList(l)%r = tempArray(1:3) ! set initial node position else if ((let1 == "TURBINE") .or. (let1 == "T")) then ! turbine-coupled in FAST.Farm case @@ -1182,50 +1184,50 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er if ((J <= p%nTurbines) .and. (J > 0)) then - m%ConnectList(l)%TypeNum = -1 ! set as coupled type - p%nCpldCons(J) = p%nCpldCons(J) + 1 ! increment counter for the appropriate turbine - m%CpldConIs(p%nCpldCons(J),J) = l - CALL WrScr(' added connection '//TRIM(int2lstr(l))//' as fairlead for turbine '//trim(int2lstr(J))) + m%PointList(l)%TypeNum = -1 ! set as coupled type + p%nCpldPoints(J) = p%nCpldPoints(J) + 1 ! increment counter for the appropriate turbine + m%CpldPointIs(p%nCpldPoints(J),J) = l + CALL WrScr(' added point '//TRIM(int2lstr(l))//' as fairlead for turbine '//trim(int2lstr(J))) else - CALL SetErrStat( ErrID_Fatal, "Turbine ID out of bounds for Connection "//trim(Num2LStr(l))//".", ErrStat, ErrMsg, RoutineName ) + CALL SetErrStat( ErrID_Fatal, "Turbine ID out of bounds for Point "//trim(Num2LStr(l))//".", ErrStat, ErrMsg, RoutineName ) return end if else - CALL SetErrStat( ErrID_Fatal, "No number provided for Connection "//trim(Num2LStr(l))//" Turbine attachment.", ErrStat, ErrMsg, RoutineName ) + CALL SetErrStat( ErrID_Fatal, "No number provided for Point "//trim(Num2LStr(l))//" Turbine attachment.", ErrStat, ErrMsg, RoutineName ) return end if else - CALL SetErrStat( ErrID_Fatal, "Unidentified Type/BodyID for Connection "//trim(Num2LStr(l))//": "//trim(tempString1), ErrStat, ErrMsg, RoutineName ) + CALL SetErrStat( ErrID_Fatal, "Unidentified Type/BodyID for Point "//trim(Num2LStr(l))//": "//trim(tempString1), ErrStat, ErrMsg, RoutineName ) return end if ! set initial velocity to zero - m%ConnectList(l)%rd(1) = 0.0_DbKi - m%ConnectList(l)%rd(2) = 0.0_DbKi - m%ConnectList(l)%rd(3) = 0.0_DbKi + m%PointList(l)%rd(1) = 0.0_DbKi + m%PointList(l)%rd(2) = 0.0_DbKi + m%PointList(l)%rd(3) = 0.0_DbKi !also set number of attached lines to zero initially - m%ConnectList(l)%nAttached = 0 + m%PointList(l)%nAttached = 0 ! check for sequential IdNums - IF ( m%ConnectList(l)%IdNum .NE. l ) THEN - CALL SetErrStat( ErrID_Fatal, 'Connection numbers must be sequential starting from 1.', ErrStat, ErrMsg, RoutineName ) + IF ( m%PointList(l)%IdNum .NE. l ) THEN + CALL SetErrStat( ErrID_Fatal, 'Point numbers must be sequential starting from 1.', ErrStat, ErrMsg, RoutineName ) CALL CleanUp() RETURN END IF IF ( ErrStat2 /= 0 ) THEN - CALL SetErrStat( ErrID_Fatal, 'Failed to read data for Connection '//trim(Num2LStr(l)), ErrStat, ErrMsg, RoutineName ) + CALL SetErrStat( ErrID_Fatal, 'Failed to read data for Point '//trim(Num2LStr(l)), ErrStat, ErrMsg, RoutineName ) CALL CleanUp() RETURN END IF - IF (wordy > 0) print *, "Set up Point ", l, " of type ", m%ConnectList(l)%typeNum + IF (wordy > 0) print *, "Set up Point ", l, " of type ", m%PointList(l)%typeNum END DO ! l = 1,p%nRods @@ -1305,17 +1307,17 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er return end if else - CALL SetErrStat( ErrID_Fatal, "Error: rod connection ID out of bounds for line "//trim(Num2LStr(l))//" end A attachment.", ErrStat, ErrMsg, RoutineName ) + CALL SetErrStat( ErrID_Fatal, "Error: rod point ID out of bounds for line "//trim(Num2LStr(l))//" end A attachment.", ErrStat, ErrMsg, RoutineName ) return end if - ! if J starts with a "C" or "Con" or goes straight ot the number then it's attached to a Connection - else if ((len_trim(let1)==0) .or. (let1 == "C") .or. (let1 == "CON")) then + ! if J starts with a "P" or "Point" or goes straight ot the number then it's attached to a Point + else if ((len_trim(let1)==0) .or. (let1 == "P") .or. (let1 == "POINT")) then - if ((J <= p%nConnects) .and. (J > 0)) then - CALL Connect_AddLine(m%ConnectList(J), l, 0) ! add line l (end A, denoted by 0) to connection J + if ((J <= p%nPoints) .and. (J > 0)) then + CALL Point_AddLine(m%PointList(J), l, 0) ! add line l (end A, denoted by 0) to point J else - CALL SetErrStat( ErrID_Fatal, "Error: connection out of bounds for line "//trim(Num2LStr(l))//" end A attachment.", ErrStat, ErrMsg, RoutineName ) + CALL SetErrStat( ErrID_Fatal, "Error: point out of bounds for line "//trim(Num2LStr(l))//" end A attachment.", ErrStat, ErrMsg, RoutineName ) return end if @@ -1350,13 +1352,13 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er return end if - ! if J starts with a "C" or "Con" or goes straight ot the number then it's attached to a Connection - else if ((len_trim(let1)==0) .or. (let1 == "C") .or. (let1 == "CON")) then + ! if J starts with a "P" or "Point" or goes straight ot the number then it's attached to a Point + else if ((len_trim(let1)==0) .or. (let1 == "P") .or. (let1 == "POINT")) then - if ((J <= p%nConnects) .and. (J > 0)) then - CALL Connect_AddLine(m%ConnectList(J), l, 1) ! add line l (end B, denoted by 1) to connection J + if ((J <= p%nPoints) .and. (J > 0)) then + CALL Point_AddLine(m%PointList(J), l, 1) ! add line l (end B, denoted by 1) to point J else - CALL SetErrStat( ErrID_Fatal, "Error: connection out of bounds for line "//trim(Num2LStr(l))//" end B attachment.", ErrStat, ErrMsg, RoutineName ) + CALL SetErrStat( ErrID_Fatal, "Error: point out of bounds for line "//trim(Num2LStr(l))//" end B attachment.", ErrStat, ErrMsg, RoutineName ) return end if @@ -1563,35 +1565,35 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er !------------------------------------------------------------------------------------------------- - ! Connect mooring system together and make necessary allocations + ! Point mooring system together and make necessary allocations !------------------------------------------------------------------------------------------------- CALL WrNr(' Created mooring system: ' ) -! p%NAnchs = 0 ! this is the number of "fixed" type Connections. <<<<<<<<<<<<<< +! p%NAnchs = 0 ! this is the number of "fixed" type Points. <<<<<<<<<<<<<< - CALL WrScr(trim(Num2LStr(p%nLines))//' lines, '//trim(Num2LStr(p%NConnects))//' points, '//trim(Num2LStr(p%nRods))//' rods, '//trim(Num2LStr(p%nBodies))//' bodies.') + CALL WrScr(trim(Num2LStr(p%nLines))//' lines, '//trim(Num2LStr(p%NPoints))//' points, '//trim(Num2LStr(p%nRods))//' rods, '//trim(Num2LStr(p%nBodies))//' bodies.') ! ! now go back through and record the fairlead Id numbers (this >>>WAS<<< all the "connecting" that's required) <<<< ! J = 1 ! counter for fairlead number - ! K = 1 ! counter for connect number - ! DO I = 1,p%NConnects - ! IF (m%ConnectList(I)%typeNum == 1) THEN - ! m%CpldConIs(J) = I ! if a vessel connection, add ID to list + ! K = 1 ! counter for point number + ! DO I = 1,p%NPoints + ! IF (m%PointList(I)%typeNum == 1) THEN + ! m%CpldPointIs(J) = I ! if a vessel point, add ID to list ! J = J + 1 - ! ELSE IF (m%ConnectList(I)%typeNum == 2) THEN - ! m%FreeConIs(K) = I ! if a connect connection, add ID to list + ! ELSE IF (m%PointList(I)%typeNum == 2) THEN + ! m%FreePointIs(K) = I ! if a point, add ID to list ! K = K + 1 ! END IF ! END DO IF (wordy > 1) print *, "nLineTypes = ",p%nLineTypes IF (wordy > 1) print *, "nRodTypes = ",p%nRodTypes - IF (wordy > 1) print *, "nConnects = ",p%nConnects - IF (wordy > 1) print *, "nConnectsExtra = ",p%nConnectsExtra + IF (wordy > 1) print *, "nPoints = ",p%nPoints + IF (wordy > 1) print *, "nPointsExtra = ",p%nPointsExtra IF (wordy > 1) print *, "nBodies = ",p%nBodies IF (wordy > 1) print *, "nRods = ",p%nRods IF (wordy > 1) print *, "nLines = ",p%nLines @@ -1599,15 +1601,15 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er IF (wordy > 1) print *, "nFails = ",p%nFails IF (wordy > 1) print *, "nFreeBodies = ",p%nFreeBodies IF (wordy > 1) print *, "nFreeRods = ",p%nFreeRods - IF (wordy > 1) print *, "nFreeCons = ",p%nFreeCons + IF (wordy > 1) print *, "nFreePoints = ",p%nFreePoints IF (wordy > 1) print *, "nCpldBodies = ",p%nCpldBodies IF (wordy > 1) print *, "nCpldRods = ",p%nCpldRods - IF (wordy > 1) print *, "nCpldCons = ",p%nCpldCons + IF (wordy > 1) print *, "nCpldPoints = ",p%nCpldPoints IF (wordy > 1) print *, "NConns = ",p%NConns IF (wordy > 1) print *, "NAnchs = ",p%NAnchs - IF (wordy > 2) print *, "FreeConIs are ", m%FreeConIs - IF (wordy > 2) print *, "CpldConIs are ", m%CpldConIs + IF (wordy > 2) print *, "FreePointIs are ", m%FreePointIs + IF (wordy > 2) print *, "CpldPointIs are ", m%CpldPointIs ! write system description to log file @@ -1625,10 +1627,10 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er - ! ! allocate list of starting and ending state vector indices for each free connection - ! ALLOCATE ( m%ConStateIs1(p%nFreeCons), m%ConStateIsN(p%nFreeCons), STAT = ErrStat ) + ! ! allocate list of starting and ending state vector indices for each free point + ! ALLOCATE ( m%PointStateIs1(p%nFreePoints), m%PointStateIsN(p%nFreePoints), STAT = ErrStat ) ! IF ( ErrStat /= ErrID_None ) THEN - ! CALL CheckError(ErrID_Fatal, ' Error allocating ConStateIs array.') + ! CALL CheckError(ErrID_Fatal, ' Error allocating PointStateIs array.') ! RETURN ! END IF ! @@ -1647,13 +1649,13 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er ! ! Free Bodies... ! ! Free Rods... ! - ! ! Free Connections... - ! DO l = 1, p%nFreeCons + ! ! Free Points... + ! DO l = 1, p%nFreePoints ! J = J + 1 ! assign start index - ! m%ConStateIs1(l) = J + ! m%PointStateIs1(l) = J ! ! J = J + 5 ! assign end index (5 entries further, since nodes have 2*3 states) - ! m%ConStateIsN(l) = J + ! m%PointStateIsN(l) = J ! END DO ! ! ! Lines @@ -1702,11 +1704,11 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er ! m%GroundBody%OrMat = EulerConstruct( m%GroundBody%r6(4:6) ) ! make sure it's OrMat is set up <<< need to check this approach ! ! first set/update the kinematics of all the fixed things (>>>> eventually do this by using a ground body <<<<) - ! ! only doing connections so far - ! DO J = 1,p%nConnects - ! if (m%ConnectList(J)%typeNum == 1) then + ! ! only doing points so far + ! DO J = 1,p%nPoints + ! if (m%PointList(J)%typeNum == 1) then ! ! set the attached line endpoint positions: - ! CALL Connect_SetKinematics(m%ConnectList(J), m%ConnectList(J)%r, (/0.0_DbKi,0.0_DbKi,0.0_DbKi/), 0.0_DbKi, m%LineList) + ! CALL Point_SetKinematics(m%PointList(J), m%PointList(J)%r, (/0.0_DbKi,0.0_DbKi,0.0_DbKi/), 0.0_DbKi, m%LineList) ! end if ! END DO @@ -1717,12 +1719,14 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er ALLOCATE ( u%CoupledKinematics(p%nTurbines), STAT = ErrStat2 ) IF ( ErrStat2 /= ErrID_None ) THEN - CALL CheckError(ErrID_Fatal, ' Error allocating CoupledKinematics input array.') + ErrMsg2 = ' Error allocating CoupledKinematics input array.' + CALL CheckError(ErrID_Fatal, ErrMsg2) RETURN END IF ALLOCATE ( y%CoupledLoads(p%nTurbines), STAT = ErrStat2 ) IF ( ErrStat2 /= ErrID_None ) THEN - CALL CheckError(ErrID_Fatal, ' Error allocating CoupledLoads output array.') + ErrMsg2 = ' Error allocating CoupledLoads output array.' + CALL CheckError(ErrID_Fatal, ErrMsg2) RETURN END IF @@ -1735,7 +1739,7 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er IF (ErrStat >= AbortErrLev) RETURN ! count number of coupling nodes needed for the mesh of this turbine - K = p%nCpldBodies(iTurb) + p%nCpldRods(iTurb) + p%nCpldCons(iTurb) + K = p%nCpldBodies(iTurb) + p%nCpldRods(iTurb) + p%nCpldPoints(iTurb) if (K == 0) K = 1 ! Always have at least one node (it will be a dummy node if no fairleads are attached) ! create input mesh for fairlead kinematics @@ -1749,7 +1753,7 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er CALL CheckError( ErrStat2, ErrMsg2 ) IF (ErrStat >= AbortErrLev) RETURN - ! note: in MoorDyn-F v2, the points in the mesh correspond in order to all the coupled bodies, then rods, then connections + ! note: in MoorDyn-F v2, the points in the mesh correspond in order to all the coupled bodies, then rods, then points ! >>> make sure all coupled objects have been offset correctly by the PtfmInit values, including if it's a farm situation -- below or where the objects are first created <<<< @@ -1808,11 +1812,11 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er CALL Rod_SetKinematics(m%RodList(m%CpldRodIs(l,iTurb)), REAL(rRef,R8Ki), m%zeros6, m%zeros6, 0.0_DbKi, m) END DO - DO l = 1,p%nCpldCons(iTurb) ! keeping this one simple for now, positioning at whatever is specified by glue code <<< + DO l = 1,p%nCpldPoints(iTurb) ! keeping this one simple for now, positioning at whatever is specified by glue code <<< J = J + 1 ! set reference position as per input file <<< what about turbine positions in array? - rRef(1:3) = m%ConnectList(m%CpldConIs(l,iTurb))%r + rRef(1:3) = m%PointList(m%CpldPointIs(l,iTurb))%r CALL MeshPositionNode(u%CoupledKinematics(iTurb), J, rRef(1:3), ErrStat2, ErrMsg2) ! calculate initial point relative position, adjusted due to initial platform rotations and translations <<< could convert to array math @@ -1821,13 +1825,13 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er u%CoupledKinematics(iTurb)%TranslationDisp(3,J) = InitInp%PtfmInit(3,iTurb) + OrMat(1,3)*rRef(1) + OrMat(2,3)*rRef(2) + OrMat(3,3)*rRef(3) - rRef(3) ! set absolute initial positions in MoorDyn - m%ConnectList(m%CpldConIs(l,iTurb))%r = u%CoupledKinematics(iTurb)%Position(:,J) + u%CoupledKinematics(iTurb)%TranslationDisp(:,J) + p%TurbineRefPos(:,iTurb) + m%PointList(m%CpldPointIs(l,iTurb))%r = u%CoupledKinematics(iTurb)%Position(:,J) + u%CoupledKinematics(iTurb)%TranslationDisp(:,J) + p%TurbineRefPos(:,iTurb) CALL MeshConstructElement(u%CoupledKinematics(iTurb), ELEMENT_POINT, ErrStat2, ErrMsg2, J) ! lastly, do this to set the attached line endpoint positions: rRefDub = rRef(1:3) - CALL Connect_SetKinematics(m%ConnectList(m%CpldConIs(l,iTurb)), rRefDub, m%zeros6(1:3), m%zeros6(1:3), 0.0_DbKi, m) + CALL Point_SetKinematics(m%PointList(m%CpldPointIs(l,iTurb)), rRefDub, m%zeros6(1:3), m%zeros6(1:3), 0.0_DbKi, m) END DO CALL CheckError( ErrStat2, ErrMsg2 ) @@ -1943,14 +1947,21 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er CALL Body_Initialize(m%BodyList(m%FreeBodyIs(l)), x%states(m%BodyStateIs1(l) : m%BodyStateIsN(l)), m) END DO + ! Set up points, lines, and rods attached to a fixed body + DO l = 1,p%nBodies + IF (m%BodyList(l)%typeNum == 1) THEN + CALL Body_InitializeUnfree(m%BodyList(l), m) + ENDIF + END DO + ! Go through independent (including pinned) Rods and write the coordinates to the state vector DO l = 1,p%nFreeRods CALL Rod_Initialize(m%RodList(m%FreeRodIs(l)), x%states(m%RodStateIs1(l):m%RodStateIsN(l)), m) END DO - ! Go through independent connections (Connects) and write the coordinates to the state vector and set positions of attached line ends - DO l = 1, p%nFreeCons - CALL Connect_Initialize(m%ConnectList(m%FreeConIs(l)), x%states(m%ConStateIs1(l) : m%conStateIsN(l)), m) + ! Go through independent points (Points) and write the coordinates to the state vector and set positions of attached line ends + DO l = 1, p%nFreePoints + CALL Point_Initialize(m%PointList(m%FreePointIs(l)), x%states(m%PointStateIs1(l) : m%pointStateIsN(l)), m) END DO @@ -1959,17 +1970,16 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er N = m%LineList(l)%N ! for convenience - ! ! set end node positions and velocities from connect objects - ! m%LineList(l)%r(:,N) = m%ConnectList(m%LineList(l)%FairConnect)%r - ! m%LineList(l)%r(:,0) = m%ConnectList(m%LineList(l)%AnchConnect)%r + ! ! set end node positions and velocities from point objects + ! m%LineList(l)%r(:,N) = m%PointList(m%LineList(l)%FairPoint)%r + ! m%LineList(l)%r(:,0) = m%PointList(m%LineList(l)%AnchPoint)%r ! m%LineList(l)%rd(:,N) = (/ 0.0, 0.0, 0.0 /) ! set anchor end velocities to zero ! m%LineList(l)%rd(:,0) = (/ 0.0, 0.0, 0.0 /) ! set fairlead end velocities to zero ! set initial line internal node positions using quasi-static model or straight-line interpolation from anchor to fairlead - CALL Line_Initialize( m%LineList(l), m%LineTypeList(m%LineList(l)%PropsIdNum), p%rhoW , ErrStat2, ErrMsg2) + CALL Line_Initialize( m%LineList(l), m%LineTypeList(m%LineList(l)%PropsIdNum), p, ErrStat2, ErrMsg2) CALL CheckError( ErrStat2, ErrMsg2 ) IF (ErrStat >= AbortErrLev) RETURN - !IF (ErrStat >= ErrId_Warn) CALL WrScr(" Note: Catenary pre-solver was unsuccessful for one or more lines so started with linear node spacing instead.") ! make this statement more accurate IF (wordy > 2) print *, "Line ", l, " with NumSegs =", N IF (wordy > 2) print *, "its states range from index ", m%LineStateIs1(l), " to ", m%LineStateIsN(l) @@ -2039,9 +2049,9 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er END DO write(p%UnLog, '(A)' ) " Points:" - DO l = 1,p%nFreeCons + DO l = 1,p%nFreePoints write(p%UnLog, '(A)' ) " Point"//trim(num2lstr(l))//":" - ! m%ConnectList(l) + ! m%PointList(l) END DO write(p%UnLog, '(A)' ) " Lines:" @@ -2063,9 +2073,23 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er CALL WrScr(" Finalizing initial conditions using dynamic relaxation."//NewLine) ! newline because next line writes over itself ! boost drag coefficient of each line type <<<<<<<< does this actually do anything or do lines hold these coefficients??? - DO I = 1, p%nLineTypes - m%LineTypeList(I)%Cdn = m%LineTypeList(I)%Cdn * InputFileDat%CdScaleIC - m%LineTypeList(I)%Cdt = m%LineTypeList(I)%Cdt * InputFileDat%CdScaleIC ! <<<<< need to update this to apply to all objects' drag + DO I = 1, p%nLines + m%LineList(I)%Cdn = m%LineList(I)%Cdn * InputFileDat%CdScaleIC + m%LineList(I)%Cdt = m%LineList(I)%Cdt * InputFileDat%CdScaleIC + END DO + + DO I = 1, p%nBodies + m%BodyList(I)%bodyCdA = m%BodyList(I)%bodyCdA * InputFileDat%CdScaleIC + END Do + + DO I =1, p%nRods + m%RodList(I)%Cdn = m%RodList(I)%Cdn * InputFileDat%CdScaleIC + m%RodList(I)%Cdt = m%RodList(I)%Cdt * InputFileDat%CdScaleIC + m%RodList(I)%CdEnd = m%RodList(I)%CdEnd * InputFileDat%CdScaleIC + END Do + + DO I = 1, p%nPoints + m%PointList(I)%pointCdA = m%PointList(I)%pointCdA * InputFileDat%CdScaleIC END DO ! allocate array holding 10 latest fairlead tensions @@ -2082,6 +2106,8 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er END DO END DO + ! dtIC set to fraction of input so convergence is over dtIC + InputFileDat%dtIC = InputFileDat%dtIC / 10 ! round dt to integer number of time steps NdtM = ceiling(InputFileDat%dtIC/p%dtM0) ! get number of mooring time steps to do based on desired time step size @@ -2153,8 +2179,8 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er ! check for non-convergence DO l = 1, p%nLines - DO K = 1,9 - IF ( abs( FairTensIC(l,K)/FairTensIC(l,K+1) - 1.0 ) > InputFileDat%threshIC ) THEN + DO K = 2,10 + IF ( abs( FairTensIC(l,1)/FairTensIC(l,K) - 1.0 ) > InputFileDat%threshIC ) THEN Converged = 0 EXIT END IF @@ -2164,12 +2190,18 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er END DO IF (Converged == 1) THEN ! if we made it with all cases satisfying the threshold + CALL WrScr('') ! serves as line break from write over command in previous printed line CALL WrScr(' Fairlead tensions converged to '//trim(Num2LStr(100.0*InputFileDat%threshIC))//'% after '//trim(Num2LStr(t))//' seconds.') + DO l = 1, p%nLines + CALL WrScr(' Fairlead tension: '//trim(Num2LStr(FairTensIC(l,1)))) + CALL WrScr(' Fairlead forces: '//trim(Num2LStr(m%LineList(l)%Fnet(1, m%LineList(l)%N)))//', '//trim(Num2LStr(m%LineList(l)%Fnet(2, m%LineList(l)%N)))//', '//trim(Num2LStr(m%LineList(l)%Fnet(3, m%LineList(l)%N)))) + ENDDO EXIT ! break out of the time stepping loop END IF END IF IF (I == ceiling(InputFileDat%TMaxIC/InputFileDat%dtIC) ) THEN + CALL WrScr('') ! serves as line break from write over command in previous printed line CALL WrScr(' Fairlead tensions did not converge within TMaxIC='//trim(Num2LStr(InputFileDat%TMaxIC))//' seconds.') !ErrStat = ErrID_Warn !ErrMsg = ' MD_Init: ran dynamic convergence to TMaxIC without convergence' @@ -2182,9 +2214,23 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er CALL MD_DestroyInput( u_array(1), ErrStat2, ErrMsg2 ) ! UNboost drag coefficient of each line type <<< - DO I = 1, p%nLineTypes - m%LineTypeList(I)%Cdn = m%LineTypeList(I)%Cdn / InputFileDat%CdScaleIC - m%LineTypeList(I)%Cdt = m%LineTypeList(I)%Cdt / InputFileDat%CdScaleIC + DO I = 1, p%nLines + m%LineList(I)%Cdn = m%LineList(I)%Cdn / InputFileDat%CdScaleIC + m%LineList(I)%Cdt = m%LineList(I)%Cdt / InputFileDat%CdScaleIC + END DO + + DO I = 1, p%nBodies + m%BodyList(I)%bodyCdA = m%BodyList(I)%bodyCdA / InputFileDat%CdScaleIC + END Do + + DO I =1, p%nRods + m%RodList(I)%Cdn = m%RodList(I)%Cdn / InputFileDat%CdScaleIC + m%RodList(I)%Cdt = m%RodList(I)%Cdt / InputFileDat%CdScaleIC + m%RodList(I)%CdEnd = m%RodList(I)%CdEnd / InputFileDat%CdScaleIC + END Do + + DO I = 1, p%nPoints + m%PointList(I)%pointCdA = m%PointList(I)%pointCdA / InputFileDat%CdScaleIC END DO end if ! InputFileDat%TMaxIC > 0 @@ -2206,6 +2252,19 @@ SUBROUTINE MD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er ! TODO: add feature for automatic water depth increase based on max anchor depth! + + !-------------------------------------------------- + ! initialize line visualization meshes if needed + if (p%VisMeshes) then + if (p%NLines > 0) then + call VisLinesMesh_Init(p,m,y,ErrStat2,ErrMsg2); if(Failed()) return + endif + if (p%NRods > 0) then + call VisRodsMesh_Init(p,m,y,ErrStat2,ErrMsg2); if(Failed()) return + endif + endif + + CONTAINS @@ -2232,7 +2291,7 @@ SUBROUTINE CheckError(ErrID,Msg) ! Passed arguments INTEGER(IntKi), INTENT(IN) :: ErrID ! The error identifier (ErrStat) - CHARACTER(*), INTENT(IN) :: Msg ! The error message (ErrMsg) + CHARACTER(*), INTENT(INOUT) :: Msg ! The error message (ErrMsg) INTEGER(IntKi) :: ErrStat3 ! The error identifier (ErrStat) CHARACTER(1024) :: ErrMsg3 ! The error message (ErrMsg) @@ -2245,16 +2304,18 @@ SUBROUTINE CheckError(ErrID,Msg) ErrMsg = TRIM(ErrMsg)//' MD_Init:'//TRIM(Msg) ErrStat = MAX(ErrStat, ErrID) + Msg = "" ! Reset the error message now that it has been logged into ErrMsg + ! Clean up if we're going to return on error: close files, deallocate local arrays IF ( ErrStat >= AbortErrLev ) THEN - IF (ALLOCATED(m%CpldConIs )) DEALLOCATE(m%CpldConIs ) - IF (ALLOCATED(m%FreeConIs )) DEALLOCATE(m%FreeConIs ) + IF (ALLOCATED(m%CpldPointIs )) DEALLOCATE(m%CpldPointIs ) + IF (ALLOCATED(m%FreePointIs )) DEALLOCATE(m%FreePointIs ) IF (ALLOCATED(m%LineStateIs1 )) DEALLOCATE(m%LineStateIs1 ) IF (ALLOCATED(m%LineStateIsN )) DEALLOCATE(m%LineStateIsN ) - IF (ALLOCATED(m%ConStateIs1 )) DEALLOCATE(m%ConStateIs1 ) - IF (ALLOCATED(m%ConStateIsN )) DEALLOCATE(m%ConStateIsN ) + IF (ALLOCATED(m%PointStateIs1 )) DEALLOCATE(m%PointStateIs1 ) + IF (ALLOCATED(m%PointStateIsN )) DEALLOCATE(m%PointStateIsN ) IF (ALLOCATED(x%states )) DEALLOCATE(x%states ) IF (ALLOCATED(FairTensIC )) DEALLOCATE(FairTensIC ) @@ -2337,10 +2398,10 @@ SUBROUTINE MD_UpdateStates( t, n, u, t_array, p, x, xd, z, other, m, ErrStat, Er ! ! ! ! go through fairleads and apply motions from driver -! DO I = 1, p%nCpldCons +! DO I = 1, p%nCpldPoints ! DO J = 1,3 -! m%ConnectList(m%CpldConIs(I))%r(J) = u_interp%PtFairleadDisplacement%Position(J,I) + u_interp%PtFairleadDisplacement%TranslationDisp(J,I) -! m%ConnectList(m%CpldConIs(I))%rd(J) = u_interp%PtFairleadDisplacement%TranslationVel(J,I) ! is this right? <<< +! m%PointList(m%CpldPointIs(I))%r(J) = u_interp%PtFairleadDisplacement%Position(J,I) + u_interp%PtFairleadDisplacement%TranslationDisp(J,I) +! m%PointList(m%CpldPointIs(I))%rd(J) = u_interp%PtFairleadDisplacement%TranslationVel(J,I) ! is this right? <<< ! END DO ! END DO ! @@ -2477,10 +2538,10 @@ SUBROUTINE MD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) ! below updated to make sure outputs are current (based on provided x and u) - similar to what's in UpdateStates ! ! go through fairleads and apply motions from driver - ! DO I = 1, p%nCpldCons + ! DO I = 1, p%nCpldPoints ! DO J = 1,3 - ! m%ConnectList(m%CpldConIs(I))%r(J) = u%CoupledKinematics%Position(J,I) + u%CoupledKinematics%TranslationDisp(J,I) - ! m%ConnectList(m%CpldConIs(I))%rd(J) = u%CoupledKinematics%TranslationVel(J,I) ! is this right? <<< + ! m%PointList(m%CpldPointIs(I))%r(J) = u%CoupledKinematics%Position(J,I) + u%CoupledKinematics%TranslationDisp(J,I) + ! m%PointList(m%CpldPointIs(I))%rd(J) = u%CoupledKinematics%TranslationVel(J,I) ! is this right? <<< ! END DO ! END DO @@ -2507,11 +2568,11 @@ SUBROUTINE MD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) ! END DO ! END DO ! ! Point reference point coordinates - ! DO I = 1, p%nConnects + ! DO I = 1, p%nPoints ! J = J + 1 - ! m%ConnectList(I)%U = u%U(:,J) - ! m%ConnectList(I)%Ud = u%Ud(:,J) - ! m%ConnectList(I)%zeta = u%zeta(J) + ! m%PointList(I)%U = u%U(:,J) + ! m%PointList(I)%Ud = u%Ud(:,J) + ! m%PointList(I)%zeta = u%zeta(J) ! END DO ! ! Line internal node coordinates ! DO I = 1, p%nLines @@ -2530,10 +2591,10 @@ SUBROUTINE MD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) ! call CalcContStateDeriv in order to run model and calculate dynamics with provided x and u CALL MD_CalcContStateDeriv( t, u, p, x, xd, z, other, m, m%xdTemp, ErrStat, ErrMsg ) - ! ! assign net force on fairlead Connects to the fairlead force output mesh - ! DO i = 1, p%nCpldCons + ! ! assign net force on fairlead Points to the fairlead force output mesh + ! DO i = 1, p%nCpldPoints ! DO J=1,3 - ! y%PtFairleadLoad%Force(J,I) = m%ConnectList(m%CpldConIs(I))%Fnet(J) + ! y%PtFairleadLoad%Force(J,I) = m%PointList(m%CpldPointIs(I))%Fnet(J) ! END DO ! END DO @@ -2556,9 +2617,9 @@ SUBROUTINE MD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) y%CoupledLoads(iTurb)%Moment(:,J) = F6net(4:6) END DO - DO l = 1,p%nCpldCons(iTurb) + DO l = 1,p%nCpldPoints(iTurb) J = J + 1 - CALL Connect_GetCoupledForce(m%ConnectList(m%CpldConIs(l,iTurb)), F6net(1:3), m, p) + CALL Point_GetCoupledForce(m%PointList(m%CpldPointIs(l,iTurb)), F6net(1:3), m, p) y%CoupledLoads(iTurb)%Force(:,J) = F6net(1:3) END DO @@ -2580,9 +2641,9 @@ SUBROUTINE MD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) ! END DO ! END DO ! ! Point reference point coordinates - ! DO I = 1, p%nConnects + ! DO I = 1, p%nPoints ! J = J + 1 - ! y%rAll(:,J) = m%ConnectList(I)%r + ! y%rAll(:,J) = m%PointList(I)%r ! END DO ! ! Line internal node coordinates ! DO I = 1, p%nLines @@ -2605,6 +2666,20 @@ SUBROUTINE MD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) ! IF ( ErrStat >= AbortErrLev ) RETURN + !-------------------------------------------------- + ! update line visualization meshes if needed + if (p%VisMeshes) then + if (p%NLines > 0) then + call VisLinesMesh_Update(p,m,y,ErrStat2,ErrMsg2) + call CheckError(ErrStat2, ErrMsg2) + if ( ErrStat >= AbortErrLev ) return + endif + if (p%NRods > 0) then + call VisRodsMesh_Update(p,m,y,ErrStat2,ErrMsg2) + call CheckError(ErrStat2, ErrMsg2) + if ( ErrStat >= AbortErrLev ) return + endif + endif CONTAINS @@ -2684,21 +2759,21 @@ SUBROUTINE MD_CalcContStateDeriv( t, u, p, x, xd, z, other, m, dxdt, ErrStat, Er IF ( ErrStat >= AbortErrLev ) RETURN END IF - ! clear connection force and mass values updateFairlead( t ); <<<< manually set anchored connection stuff for now here + !GroundBody->updateFairlead( t ); <<<< manually set anchored point stuff for now here r6_in = 0.0_DbKi v6_in = 0.0_DbKi CALL Body_SetKinematics(m%GroundBody, r6_in, v6_in, m%zeros6, t, m) @@ -2741,13 +2816,13 @@ SUBROUTINE MD_CalcContStateDeriv( t, u, p, x, xd, z, other, m, dxdt, ErrStat, Er END DO ! any coupled points (type -1) - DO l = 1, p%nCpldCons(iTurb) + DO l = 1, p%nCpldPoints(iTurb) J = J + 1 r_in = u%CoupledKinematics(iTurb)%Position(:,J) + u%CoupledKinematics(iTurb)%TranslationDisp(:,J) + p%TurbineRefPos(:,iTurb) rd_in = u%CoupledKinematics(iTurb)%TranslationVel(:,J) a_in(1:3) = u%CoupledKinematics(iTurb)%TranslationAcc(:,J) - CALL Connect_SetKinematics(m%ConnectList(m%CpldConIs(l,iTurb)), r_in, rd_in, a_in, t, m) + CALL Point_SetKinematics(m%PointList(m%CpldPointIs(l,iTurb)), r_in, rd_in, a_in, t, m) !print "(f8.5, f12.6, f12.6, f8.4, f8.4, f8.4, f8.4)", t, r_in(1), r_in(3), rd_in(1), rd_in(3), a_in(1), a_in(3) @@ -2816,11 +2891,11 @@ SUBROUTINE MD_CalcContStateDeriv( t, u, p, x, xd, z, other, m, dxdt, ErrStat, Er ! END DO ! END DO ! ! Point reference point coordinates - ! DO I = 1, p%nConnects + ! DO I = 1, p%nPoints ! J = J + 1 - ! m%ConnectList(I)%U = u%U(:,J) - ! m%ConnectList(I)%Ud = u%Ud(:,J) - ! m%ConnectList(I)%zeta = u%zeta(J) + ! m%PointList(I)%U = u%U(:,J) + ! m%PointList(I)%Ud = u%Ud(:,J) + ! m%PointList(I)%zeta = u%zeta(J) ! END DO ! ! Line internal node coordinates ! DO I = 1, p%nLines @@ -2837,7 +2912,7 @@ SUBROUTINE MD_CalcContStateDeriv( t, u, p, x, xd, z, other, m, dxdt, ErrStat, Er ! independent or semi-independent things with their own states... - ! give Bodies latest state variables (kinematics will also be assigned to dependent connections and rods, and thus line ends) + ! give Bodies latest state variables (kinematics will also be assigned to dependent points and rods, and thus line ends) DO l = 1,p%nFreeBodies CALL Body_SetState(m%BodyList(m%FreeBodyIs(l)), x%states(m%BodyStateIs1(l):m%BodyStateIsN(l)), t, m) END DO @@ -2847,11 +2922,11 @@ SUBROUTINE MD_CalcContStateDeriv( t, u, p, x, xd, z, other, m, dxdt, ErrStat, Er CALL Rod_SetState(m%RodList(m%FreeRodIs(l)), x%states(m%RodStateIs1(l):m%RodStateIsN(l)), t, m) END DO - ! give Connects (independent connections) latest state variable values (kinematics will also be assigned to attached line ends) - DO l = 1,p%nFreeCons - ! Print *, "calling SetState for free connection, con#", m%FreeConIs(l), " with state range: ", m%ConStateIs1(l), "-", m%ConStateIsN(l) + ! give Points (independent points) latest state variable values (kinematics will also be assigned to attached line ends) + DO l = 1,p%nFreePoints + ! Print *, "calling SetState for free point, point#", m%FreePointIs(l), " with state range: ", m%PointStateIs1(l), "-", m%PointStateIsN(l) !K=K+1 - CALL Connect_SetState(m%ConnectList(m%FreeConIs(l)), x%states(m%ConStateIs1(l):m%ConStateIsN(l)), t, m) + CALL Point_SetState(m%PointList(m%FreePointIs(l)), x%states(m%PointStateIs1(l):m%PointStateIsN(l)), t, m) END DO ! give Lines latest state variable values for internal nodes @@ -2861,15 +2936,15 @@ SUBROUTINE MD_CalcContStateDeriv( t, u, p, x, xd, z, other, m, dxdt, ErrStat, Er ! calculate dynamics of free objects (will also calculate forces (doRHS()) from any child/dependent objects)... - ! calculate line dynamics (and calculate line forces and masses attributed to connections) + ! calculate line dynamics (and calculate line forces and masses attributed to points) DO l = 1,p%nLines CALL Line_GetStateDeriv(m%LineList(l), dxdt%states(m%LineStateIs1(l):m%LineStateIsN(l)), m, p) !dt might also be passed for fancy friction models END DO - ! calculate connect dynamics (including contributions from attached lines - ! as well as hydrodynamic forces etc. on connect object itself if applicable) - DO l = 1,p%nFreeCons - CALL Connect_GetStateDeriv(m%ConnectList(m%FreeConIs(l)), dxdt%states(m%ConStateIs1(l):m%ConStateIsN(l)), m, p) + ! calculate point dynamics (including contributions from attached lines + ! as well as hydrodynamic forces etc. on point object itself if applicable) + DO l = 1,p%nFreePoints + CALL Point_GetStateDeriv(m%PointList(m%FreePointIs(l)), dxdt%states(m%PointStateIs1(l):m%PointStateIsN(l)), m, p) END DO ! calculate dynamics of independent Rods @@ -2888,12 +2963,12 @@ SUBROUTINE MD_CalcContStateDeriv( t, u, p, x, xd, z, other, m, dxdt, ErrStat, Er ! note: can do this in any order since there are no dependencies among coupled objects DO iTurb = 1,p%nTurbines - DO l = 1,p%nCpldCons(iTurb) + DO l = 1,p%nCpldPoints(iTurb) ! >>>>>>>> here we should pass along accelerations and include inertial loads in the calculation!!! <<>> below should no longer be necessary thanks to using ExtrapInterp of u(:) within the mooring time stepping loop.. <<< ! ! update Fairlead positions by integrating velocity and last position (do this AFTER the processing of the time step rather than before) - ! DO J = 1, p%nCpldCons + ! DO J = 1, p%nCpldPoints ! DO K = 1, 3 - ! m%ConnectList(m%CpldConIs(J))%r(K) = m%ConnectList(m%CpldConIs(J))%r(K) + m%ConnectList(m%CpldConIs(J))%rd(K)*dtM + ! m%PointList(m%CpldPointIs(J))%r(K) = m%PointList(m%CpldPointIs(J))%r(K) + m%PointList(m%CpldPointIs(J))%rd(K)*dtM ! END DO ! END DO @@ -3181,7 +3256,7 @@ END SUBROUTINE TimeStep !-------------------------------------------------------------- -! Connection-Specific Subroutines +! Point-Specific Subroutines !-------------------------------------------------------------- @@ -3776,16 +3851,16 @@ SUBROUTINE Init_Jacobian_x() end if END DO - ! Free Connnections - DO l = 1,p%nFreeCons ! Point m%ConnectList(m%FreeConIs(l)) - ! corresponds to state indices: (m%ConStateIs1(l)+3:m%ConStateIs1(l)+5) + ! Free Points + DO l = 1,p%nFreePoints ! Point m%PointList(m%FreePointIs(l)) + ! corresponds to state indices: (m%PointStateIs1(l)+3:m%PointStateIs1(l)+5) p%dx(idx+1:idx+3) = dl_slack_min ! point displacement [m] - InitOut%LinNames_x(idx+1) = 'Point '//trim(num2lstr(m%FreeConIs(l)))//' Px, m' - InitOut%LinNames_x(idx+2) = 'Point '//trim(num2lstr(m%FreeConIs(l)))//' Py, m' - InitOut%LinNames_x(idx+3) = 'Point '//trim(num2lstr(m%FreeConIs(l)))//' Pz, m' - p%dxIdx_map2_xStateIdx(idx+1) = m%ConStateIs1(l)+3 ! x%state index for Px - p%dxIdx_map2_xStateIdx(idx+2) = m%ConStateIs1(l)+4 ! x%state index for Py - p%dxIdx_map2_xStateIdx(idx+3) = m%ConStateIs1(l)+5 ! x%state index for Pz + InitOut%LinNames_x(idx+1) = 'Point '//trim(num2lstr(m%FreePointIs(l)))//' Px, m' + InitOut%LinNames_x(idx+2) = 'Point '//trim(num2lstr(m%FreePointIs(l)))//' Py, m' + InitOut%LinNames_x(idx+3) = 'Point '//trim(num2lstr(m%FreePointIs(l)))//' Pz, m' + p%dxIdx_map2_xStateIdx(idx+1) = m%PointStateIs1(l)+3 ! x%state index for Px + p%dxIdx_map2_xStateIdx(idx+2) = m%PointStateIs1(l)+4 ! x%state index for Py + p%dxIdx_map2_xStateIdx(idx+3) = m%PointStateIs1(l)+5 ! x%state index for Pz idx = idx + 3 END DO @@ -3860,16 +3935,16 @@ SUBROUTINE Init_Jacobian_x() end if END DO - ! Free Connnections - DO l = 1,p%nFreeCons ! Point m%ConnectList(m%FreeConIs(l)) - ! corresponds to state indices: (m%ConStateIs1(l):m%ConStateIs1(l)+2) + ! Free Points + DO l = 1,p%nFreePoints ! Point m%PointList(m%FreePointIs(l)) + ! corresponds to state indices: (m%PointStateIs1(l):m%PointStateIs1(l)+2) p%dx(idx+1:idx+3) = 0.1 ! point translational velocity [m/s] - InitOut%LinNames_x(idx+1) = 'Point '//trim(num2lstr(m%FreeConIs(l)))//' Vx, m/s' - InitOut%LinNames_x(idx+2) = 'Point '//trim(num2lstr(m%FreeConIs(l)))//' Vy, m/s' - InitOut%LinNames_x(idx+3) = 'Point '//trim(num2lstr(m%FreeConIs(l)))//' Vz, m/s' - p%dxIdx_map2_xStateIdx(idx+1) = m%ConStateIs1(l)+0 ! x%state index for Vx - p%dxIdx_map2_xStateIdx(idx+2) = m%ConStateIs1(l)+1 ! x%state index for Vy - p%dxIdx_map2_xStateIdx(idx+3) = m%ConStateIs1(l)+2 ! x%state index for Vz + InitOut%LinNames_x(idx+1) = 'Point '//trim(num2lstr(m%FreePointIs(l)))//' Vx, m/s' + InitOut%LinNames_x(idx+2) = 'Point '//trim(num2lstr(m%FreePointIs(l)))//' Vy, m/s' + InitOut%LinNames_x(idx+3) = 'Point '//trim(num2lstr(m%FreePointIs(l)))//' Vz, m/s' + p%dxIdx_map2_xStateIdx(idx+1) = m%PointStateIs1(l)+0 ! x%state index for Vx + p%dxIdx_map2_xStateIdx(idx+2) = m%PointStateIs1(l)+1 ! x%state index for Vy + p%dxIdx_map2_xStateIdx(idx+3) = m%PointStateIs1(l)+2 ! x%state index for Vz idx = idx + 3 END DO diff --git a/modules/moordyn/src/MoorDyn_Body.f90 b/modules/moordyn/src/MoorDyn_Body.f90 index 5547b91d4..74fe1ec60 100644 --- a/modules/moordyn/src/MoorDyn_Body.f90 +++ b/modules/moordyn/src/MoorDyn_Body.f90 @@ -25,7 +25,7 @@ MODULE MoorDyn_Body USE NWTC_Library USE MoorDyn_Misc !USE MoorDyn_Line, only : Line_SetEndKinematics, Line_GetEndStuff - USE MoorDyn_Point, only : Connect_SetKinematics, Connect_GetNetForceAndMass + USE MoorDyn_Point, only : Point_SetKinematics, Point_GetNetForceAndMass USE MoorDyn_Rod, only : Rod_Initialize, Rod_SetKinematics, Rod_GetNetForceAndMass IMPLICIT NONE @@ -43,7 +43,7 @@ MODULE MoorDyn_Body PUBLIC :: Body_GetStateDeriv PUBLIC :: Body_DoRHS PUBLIC :: Body_GetCoupledForce - PUBLIC :: Body_AddConnect + PUBLIC :: Body_AddPoint PUBLIC :: Body_AddRod @@ -84,12 +84,13 @@ SUBROUTINE Body_Setup( Body, tempArray, p, ErrStat, ErrMsg) CALL TranslateMass6to6DOF(Body%rCG, Mtemp, Body%M0) ! account for potential CG offset <<< is the direction right? <<< DO J=1,3 - Body%M0(J,J) = Body%M0(J,J) + Body%BodyV*Body%BodyCa(J) ! add added mass in each direction about ref point (so only diagonals) <<< eventually expand to multi D + Body%M0(J,J) = Body%M0(J,J) + Body%BodyV*Body%BodyCa(J)* p%rhow ! add added mass in each direction about ref point (so only diagonals) <<< eventually expand to multi D END DO ! --------------- if this is an independent body (not coupled) ---------- ! set initial position and orientation of body from input file - Body%r6 = tempArray + Body%r6(1:3) = tempArray(1:3) + Body%r6(4:6) = tempArray(4:6) * (pi/180) ! calculate orientation matrix based on latest angles !RotMat(r6[3], r6[4], r6[5], OrMat); @@ -137,7 +138,7 @@ END SUBROUTINE Body_Setup ! if (m%RodList(Body%attachedR(l))%typeNum == 2) CALL Rod_Initialize(m%RodList(Body%attachedR(l)), dummyStates, m%LineList) ! END DO ! -! ! Note: Connections don't need any initialization +! ! Note: Points don't need any initialization ! ! END SUBROUTINE Body_InitializeUnfree ! !-------------------------------------------------------------- @@ -160,7 +161,7 @@ SUBROUTINE Body_Initialize(Body, states, m) states(1:6 ) = Body%v6 - ! set positions of any dependent connections and rods now (before they are initialized) + ! set positions of any dependent points and rods now (before they are initialized) CALL Body_SetDependentKin(Body, 0.0_DbKi, m) ! If any Rod is fixed to the body (not pinned), initialize it now because otherwise it won't be initialized @@ -168,7 +169,7 @@ SUBROUTINE Body_Initialize(Body, states, m) if (m%RodList(Body%attachedR(l))%typeNum == 2) CALL Rod_Initialize(m%RodList(Body%attachedR(l)), dummyStates, m) END DO - ! Note: Connections don't need any initialization + ! Note: Points don't need any initialization END SUBROUTINE Body_Initialize !-------------------------------------------------------------- @@ -184,7 +185,7 @@ SUBROUTINE Body_InitializeUnfree(Body, m) REAL(DbKi) :: dummyStates(12) ! dummy vector to mimic states when initializing a rigidly attached rod - ! set positions of any dependent connections and rods now (before they are initialized) + ! set positions of any dependent points and rods now (before they are initialized) CALL Body_SetDependentKin(Body, 0.0_DbKi, m) ! If any Rod is fixed to the body (not pinned), initialize it now because otherwise it won't be initialized @@ -192,7 +193,7 @@ SUBROUTINE Body_InitializeUnfree(Body, m) if (m%RodList(Body%attachedR(l))%typeNum == 2) CALL Rod_Initialize(m%RodList(Body%attachedR(l)), dummyStates, m) END DO - ! Note: Connections don't need any initialization + ! Note: Points don't need any initialization END SUBROUTINE Body_InitializeUnfree !-------------------------------------------------------------- @@ -209,7 +210,7 @@ SUBROUTINE Body_SetKinematics(Body, r_in, v_in, a_in, t, m) Real(DbKi), INTENT(IN ) :: v_in(6) ! 6-DOF velocity Real(DbKi), INTENT(IN ) :: a_in(6) ! 6-DOF acceleration (only used for coupled rods) Real(DbKi), INTENT(IN ) :: t ! instantaneous time - TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects (for simplicity, since Bodies deal with Rods and Connections) + TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects (for simplicity, since Bodies deal with Rods and Points) ! INTEGER(IntKi) :: l @@ -262,26 +263,26 @@ SUBROUTINE Body_SetState(Body, X, t, m) Body%v6 = X(1:6) ! get velocities - ! set positions of any dependent connections and rods + ! set positions of any dependent points and rods CALL Body_SetDependentKin(Body, t, m) END SUBROUTINE Body_SetState !-------------------------------------------------------------- - ! set the states (positions and velocities) of any connects or rods that are part of this body + ! set the states (positions and velocities) of any points or rods that are part of this body ! also computes the orientation matrix (never skip this sub!) !-------------------------------------------------------------- SUBROUTINE Body_SetDependentKin(Body, t, m) Type(MD_Body), INTENT(INOUT) :: Body ! the Bodyion object REAL(DbKi), INTENT(IN ) :: t - TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects (for simplicity, since Bodies deal with Rods and Connections) + TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects (for simplicity, since Bodies deal with Rods and Points) INTEGER(IntKi) :: l ! index of attached objects - Real(DbKi) :: rConnect(3) - Real(DbKi) :: rdConnect(3) + Real(DbKi) :: rPoint(3) + Real(DbKi) :: rdPoint(3) Real(DbKi) :: rRod(6) Real(DbKi) :: vRod(6) Real(DbKi) :: aRod(6) @@ -292,15 +293,15 @@ SUBROUTINE Body_SetDependentKin(Body, t, m) !CALL SmllRotTrans('', Body%r6(4), Body%r6(5), Body%r6(6), Body%TransMat, '', ErrStat2, ErrMsg2) Body%OrMat = TRANSPOSE( EulerConstruct( Body%r6(4:6) ) ) ! full Euler angle approach <<<< need to check order - ! set kinematics of any dependent connections + ! set kinematics of any dependent points do l = 1,Body%nAttachedC - CALL transformKinematics(Body%rConnectRel(:,l), Body%r6, Body%OrMat, Body%v6, rConnect, rdConnect) !<<< should double check this function + CALL transformKinematics(Body%rPointRel(:,l), Body%r6, Body%OrMat, Body%v6, rPoint, rdPoint) !<<< should double check this function ! >>> need to add acceleration terms here too? <<< - ! pass above to the connection and get it to calculate the forces - CALL Connect_SetKinematics( m%ConnectList(Body%attachedC(l)), rConnect, rdConnect, m%zeros6(1:3), t, m) + ! pass above to the point and get it to calculate the forces + CALL Point_SetKinematics( m%PointList(Body%attachedC(l)), rPoint, rdPoint, m%zeros6(1:3), t, m) end do ! set kinematics of any dependent Rods @@ -424,11 +425,11 @@ SUBROUTINE Body_DoRHS(Body, m, p) - ! Get contributions from any dependent connections + ! Get contributions from any dependent points do l = 1,Body%nAttachedC - ! get net force and mass from Connection on body ref point (global orientation) - CALL Connect_GetNetForceAndMass( m%ConnectList(Body%attachedC(l)), Body%r6(1:3), F6_i, M6_i, m, p) + ! get net force and mass from Point on body ref point (global orientation) + CALL Point_GetNetForceAndMass( m%PointList(Body%attachedC(l)), Body%r6(1:3), F6_i, M6_i, m, p) if (ABS(F6_i(5)) > 1.0E12) then print *, "Warning: extreme pitch moment from body-attached Point ", l @@ -488,33 +489,33 @@ END SUBROUTINE Body_GetCoupledForce - ! this function handles assigning a connection to a body + ! this function handles assigning a point to a body !-------------------------------------------------------------- - SUBROUTINE Body_AddConnect(Body, connectID, coords) + SUBROUTINE Body_AddPoint(Body, pointID, coords) - Type(MD_Body), INTENT(INOUT) :: Body ! the Connection object - Integer(IntKi), INTENT(IN ) :: connectID + Type(MD_Body), INTENT(INOUT) :: Body ! the Point object + Integer(IntKi), INTENT(IN ) :: pointID REAL(DbKi), INTENT(IN ) :: coords(3) - IF (wordy > 0) Print*, "C", connectID, "->B", Body%IdNum + IF (wordy > 0) Print*, "P", pointID, "->B", Body%IdNum IF(Body%nAttachedC < 30) THEN ! this is currently just a maximum imposed by a fixed array size. could be improved. - Body%nAttachedC = Body%nAttachedC + 1 ! increment the number connected - Body%AttachedC(Body%nAttachedC) = connectID - Body%rConnectRel(:,Body%nAttachedC) = coords ! store relative position of connect on body + Body%nAttachedC = Body%nAttachedC + 1 ! increment the number pointed + Body%AttachedC(Body%nAttachedC) = pointID + Body%rPointRel(:,Body%nAttachedC) = coords ! store relative position of point on body ELSE Print*, "too many Points attached to Body ", Body%IdNum, " in MoorDyn!" END IF - END SUBROUTINE Body_AddConnect + END SUBROUTINE Body_AddPoint ! this function handles assigning a rod to a body !-------------------------------------------------------------- SUBROUTINE Body_AddRod(Body, rodID, coords) - Type(MD_Body), INTENT(INOUT) :: Body ! the Connection object + Type(MD_Body), INTENT(INOUT) :: Body ! the Point object Integer(IntKi), INTENT(IN ) :: rodID REAL(DbKi), INTENT(IN ) :: coords(6) ! positions of rod ends A and B relative to body diff --git a/modules/moordyn/src/MoorDyn_Driver.f90 b/modules/moordyn/src/MoorDyn_Driver.f90 index dbf8a4b01..2f76811f9 100644 --- a/modules/moordyn/src/MoorDyn_Driver.f90 +++ b/modules/moordyn/src/MoorDyn_Driver.f90 @@ -248,7 +248,7 @@ PROGRAM MoorDyn_Driver endif do iTurb = 1, MD_p%nTurbines - ncIn = ncIn + MD_p%nCpldBodies(iTurb)*6 + MD_p%nCpldRods(iTurb)*6 + MD_p%nCpldCons(iTurb)*3 + ncIn = ncIn + MD_p%nCpldBodies(iTurb)*6 + MD_p%nCpldRods(iTurb)*6 + MD_p%nCpldPoints(iTurb)*3 end do call WrScr('MoorDyn has '//trim(num2lstr(ncIn))//' coupled DOFs and/or active-tensioned inputs.') @@ -518,7 +518,7 @@ PROGRAM MoorDyn_Driver END DO ! any coupled points (type -1) - DO l = 1, MD_p%nCpldCons(iTurb) + DO l = 1, MD_p%nCpldPoints(iTurb) MD_u(1)%CoupledKinematics(iTurb)%TranslationDisp(:,K) = r_in(i, J:J+2) - MD_u(1)%CoupledKinematics(iTurb)%Position(:,K) - MD_p%TurbineRefPos(:,iTurb) MD_u(1)%CoupledKinematics(iTurb)%TranslationVel( :,K) = rd_in(i, J:J+2) @@ -607,7 +607,7 @@ PROGRAM MoorDyn_Driver END DO ! any coupled points (type -1) - DO l = 1, MD_p%nCpldCons(iTurb) + DO l = 1, MD_p%nCpldPoints(iTurb) MD_u(1)%CoupledKinematics(iTurb)%TranslationDisp(:,K) = r_in(i, J:J+2) - MD_u(1)%CoupledKinematics(iTurb)%Position(:,K) - MD_p%TurbineRefPos(:,iTurb) MD_u(1)%CoupledKinematics(iTurb)%TranslationVel( :,K) = rd_in(i, J:J+2) diff --git a/modules/moordyn/src/MoorDyn_IO.f90 b/modules/moordyn/src/MoorDyn_IO.f90 index 5adde74ab..271d9791d 100644 --- a/modules/moordyn/src/MoorDyn_IO.f90 +++ b/modules/moordyn/src/MoorDyn_IO.f90 @@ -42,12 +42,12 @@ MODULE MoorDyn_IO ! Each output channel is described by the following fields: ! Name - (string) what appears at the top of the output column ! Units - (string) selected from UnitList (see below) based on index QType - ! OType - (int) the type of object the output is from. 1=line, 2=connect (0=invalid) - ! ObjID - (int) the ID number of the line or connect + ! OType - (int) the type of object the output is from. 1=line, 2=point (0=invalid) + ! ObjID - (int) the ID number of the line or point ! QType - (int) the type of quantity to output. 0=tension, 1=x pos, etc. see the parameters below ! NodeID - (int) the ID number of the node of the output quantity - ! These are the "OTypes": 1=Line, 2=Connect, 3=Rod, 4=Body + ! These are the "OTypes": 1=Line, 2=point, 3=Rod, 4=Body ! Indices for computing output channels: - customized for the MD_OutParmType approach ! these are the "QTypes" @@ -55,32 +55,43 @@ MODULE MoorDyn_IO INTEGER, PARAMETER :: PosX = 1 INTEGER, PARAMETER :: PosY = 2 INTEGER, PARAMETER :: PosZ = 3 - INTEGER, PARAMETER :: VelX = 4 - INTEGER, PARAMETER :: VelY = 5 - INTEGER, PARAMETER :: VelZ = 6 - INTEGER, PARAMETER :: AccX = 7 - INTEGER, PARAMETER :: AccY = 8 - INTEGER, PARAMETER :: AccZ = 9 - INTEGER, PARAMETER :: Ten = 10 - INTEGER, PARAMETER :: FX = 11 - INTEGER, PARAMETER :: FY = 12 - INTEGER, PARAMETER :: FZ = 13 - INTEGER, PARAMETER :: MX = 14 - INTEGER, PARAMETER :: MY = 15 - INTEGER, PARAMETER :: MZ = 16 - INTEGER, PARAMETER :: Pitch = 17 - INTEGER, PARAMETER :: Roll = 18 - INTEGER, PARAMETER :: Yaw = 19 - INTEGER, PARAMETER :: Sub = 20 + INTEGER, PARAMETER :: RotX = 4 + INTEGER, PARAMETER :: RotY = 5 + INTEGER, PARAMETER :: RotZ = 6 + INTEGER, PARAMETER :: VelX = 7 + INTEGER, PARAMETER :: VelY = 8 + INTEGER, PARAMETER :: VelZ = 9 + INTEGER, PARAMETER :: RVelX = 10 + INTEGER, PARAMETER :: RVelY = 11 + INTEGER, PARAMETER :: RVelZ = 12 + INTEGER, PARAMETER :: AccX = 13 + INTEGER, PARAMETER :: AccY = 14 + INTEGER, PARAMETER :: AccZ = 15 + INTEGER, PARAMETER :: RAccX = 16 + INTEGER, PARAMETER :: RAccY = 17 + INTEGER, PARAMETER :: RAccZ = 18 + INTEGER, PARAMETER :: Ten = 19 + INTEGER, PARAMETER :: FX = 20 + INTEGER, PARAMETER :: FY = 21 + INTEGER, PARAMETER :: FZ = 22 + INTEGER, PARAMETER :: MX = 23 + INTEGER, PARAMETER :: MY = 24 + INTEGER, PARAMETER :: MZ = 25 + INTEGER, PARAMETER :: Sub = 26 + INTEGER, PARAMETER :: TenA = 27 + INTEGER, PARAMETER :: TenB = 28 + ! List of units corresponding to the quantities parameters for QTypes - CHARACTER(ChanLen), PARAMETER :: UnitList(0:20) = (/ & + CHARACTER(ChanLen), PARAMETER :: UnitList(0:26) = (/ & "(s) ","(m) ","(m) ","(m) ", & + "(deg) ","(deg) ","(deg) ", & "(m/s) ","(m/s) ","(m/s) ", & + "(deg/s) ","(deg/s) ","(deg/s) ", & "(m/s2) ","(m/s2) ","(m/s2) ", & + "(deg/s2) ","(deg/s2) ","(deg/s2) ", & "(N) ","(N) ","(N) ","(N) ", & - "(Nm) ","(Nm) ","(Nm) ", & - "(deg) ","(deg) ","(deg) ","(frac) "/) + "(Nm) ","(Nm) ","(Nm) ","(frac) "/) CHARACTER(28), PARAMETER :: OutPFmt = "( I4, 3X,A 10,1 X, A10 )" ! Output format parameter output list. CHARACTER(28), PARAMETER :: OutSFmt = "ES10.3E2" @@ -89,9 +100,9 @@ MODULE MoorDyn_IO ! output naming scheme is as ! examples: ! FairTen1, AnchTen1 - ! Con1pX - ! Con3vY (connection 3, y velocity) - ! L2N4pX (line 2, node 4, x position) + ! POINT1PX + ! P3VY (Point 3, y velocity) + ! L2N4PX (line 2, node 4, x position) ! --------------------------------------------------------------------------------------------------------- @@ -415,7 +426,7 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg ) CHARACTER(ChanLen) :: OutListTmp ! A string to temporarily hold OutList(I), the name of each output channel CHARACTER(ChanLen) :: qVal ! quantity type string to match to list of valid options - INTEGER :: oID ! ID number of connect or line object + INTEGER :: oID ! ID number of point or line object INTEGER :: nID ! ID number of node object ! INTEGER :: i1,i2,i3,i4 ! indices of start of numbers or letters in OutListTmp string, for parsing @@ -510,6 +521,16 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg ) ! more general case ELSE + ! object number + IF (num1/=" ") THEN + READ (num1,*) oID + p%OutParam(I)%ObjID = oID ! line or point ID number + ELSE + CALL DenoteInvalidOutput(p%OutParam(I)) ! flag as invalid + CALL WrScr('Warning: invalid output specifier '//trim(OutListTmp)//'. Object ID missing.') + CYCLE + END IF + ! what object type? ! Line case @@ -519,23 +540,46 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg ) IF (num2/=" ") THEN READ (num2,*) nID ! node or segment ID p%OutParam(I)%NodeID = nID + qVal = let3 ! quantity type string + ELSE IF (let2 == 'TENA' .OR. let2 == 'TA' .OR. let2(1:2) == 'NA') THEN + p%OutParam(I)%NodeID = 0 + IF (let2(1:2) == 'NA') THEN + let2 = let2(3:) + END IF + qVal = let2 + ELSE IF (let2 == 'TENB' .OR. let2 == 'TB' .OR. let2(1:2) == 'NB') THEN + p%OutParam(I)%NodeID = m%LineList(p%OutParam(I)%ObjID)%N + IF (let2(1:2) == 'NB') THEN + let2 = let2(3:) + END IF + qVal = let2 + ELSE IF (num2 == ' ') THEN + p%OutParam(I)%NodeID = 0 + qVal = let2 ELSE CALL DenoteInvalidOutput(p%OutParam(I)) ! flag as invalid - CALL WrScr('Warning: invalid output specifier '//trim(OutListTmp)//'. Line ID or Node ID missing.') + CALL WrScr('Warning: invalid output specifier '//trim(OutListTmp)//'. Line ID or Node ID missing or incorrect tension flag.') CYCLE END IF - qVal = let3 ! quantity type string - ! Connect case - ELSE IF (let1(1:1) == 'C') THEN ! Look for C?xxx or Con?xxx - p%OutParam(I)%OType = 2 ! Connect object type + ! Point case + ELSE IF (let1(1:1) == 'P') THEN ! Look for P?xxx or Point?xxx + p%OutParam(I)%OType = 2 ! Point object type qVal = let2 ! quantity type string ! Rod case ELSE IF (let1(1:1) == 'R') THEN ! Look for R?xxx or Rod?xxx p%OutParam(I)%OType = 3 ! Rod object type - IF (LEN_TRIM(let3)== 0) THEN ! No third character cluster indicates this is a whole-rod channel - p%OutParam(I)%NodeID = 0 + IF (LEN_TRIM(let3)== 0) THEN ! No third character cluster indicates this is a whole-rod channel or endpoint + IF (let2(1:2) == 'NA') THEN + p%OutParam(I)%NodeID = 0 + let2 = let2(3:) + ELSE IF (let2(1:2) == 'NB') THEN + p%OutParam(I)%NodeID = m%RodList(p%OutParam(I)%ObjID)%N + let2 = let2(3:) + ELSE + p%OutParam(I)%NodeID = -1 + END IF qVal = let2 ! quantity type string ELSE IF (num2/=" ") THEN READ (num2,*) nID ! rod node ID @@ -561,16 +605,6 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg ) CYCLE END IF - ! object number - IF (num1/=" ") THEN - READ (num1,*) oID - p%OutParam(I)%ObjID = oID ! line or connect ID number - ELSE - CALL DenoteInvalidOutput(p%OutParam(I)) ! flag as invalid - CALL WrScr('Warning: invalid output specifier '//trim(OutListTmp)//'. Object ID missing.') - CYCLE - END IF - ! which kind of quantity? IF (qVal == 'PX') THEN p%OutParam(I)%QType = PosX @@ -581,6 +615,15 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg ) ELSE IF (qVal == 'PZ') THEN p%OutParam(I)%QType = PosZ p%OutParam(I)%Units = UnitList(PosZ) + ELSE IF (qVal == 'RX') THEN + p%OutParam(I)%QType = RotX + p%OutParam(I)%Units = UnitList(RotX) + ELSE IF (qVal == 'RY') THEN + p%OutParam(I)%QType = RotY + p%OutParam(I)%Units = UnitList(RotY) + ELSE IF (qVal == 'RZ') THEN + p%OutParam(I)%QType = RotZ + p%OutParam(I)%Units = UnitList(RotZ) ELSE IF (qVal == 'VX') THEN p%OutParam(I)%QType = VelX p%OutParam(I)%Units = UnitList(VelX) @@ -590,6 +633,15 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg ) ELSE IF (qVal == 'VZ') THEN p%OutParam(I)%QType = VelZ p%OutParam(I)%Units = UnitList(VelZ) + ELSE IF (qVal == 'RVX') THEN + p%OutParam(I)%QType = RVelX + p%OutParam(I)%Units = UnitList(RVelX) + ELSE IF (qVal == 'RVY') THEN + p%OutParam(I)%QType = RVelY + p%OutParam(I)%Units = UnitList(RVelY) + ELSE IF (qVal == 'RVZ') THEN + p%OutParam(I)%QType = RVelZ + p%OutParam(I)%Units = UnitList(RVelZ) ELSE IF (qVal == 'AX') THEN p%OutParam(I)%QType = AccX p%OutParam(I)%Units = UnitList(AccX) @@ -599,9 +651,24 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg ) ELSE IF (qVal == 'AZ') THEN p%OutParam(I)%QType = AccZ p%OutParam(I)%Units = UnitList(AccZ) - ELSE IF ((qVal == 'T') .or. (qVal == 'TEN')) THEN + ELSE IF (qVal == 'RAX') THEN + p%OutParam(I)%QType = RAccX + p%OutParam(I)%Units = UnitList(RAccX) + ELSE IF (qVal == 'RAY') THEN ! fixed typo Nov 24 + p%OutParam(I)%QType = RAccY + p%OutParam(I)%Units = UnitList(RAccY) + ELSE IF (qVal == 'RAZ') THEN + p%OutParam(I)%QType = RAccZ + p%OutParam(I)%Units = UnitList(RAccZ) + ELSE IF ((qVal == 'T') .OR. (qVal == 'TEN')) THEN p%OutParam(I)%QType = Ten p%OutParam(I)%Units = UnitList(Ten) + ELSE IF ((qVal == 'TA') .OR. (qVal == 'TENA')) THEN + p%OutParam(I)%QType = TenA + p%OutParam(I)%Units = UnitList(Ten) + ELSE IF ((qVal == 'TB') .OR. (qVal == 'TENB')) THEN + p%OutParam(I)%QType = TenB + p%OutParam(I)%Units = UnitList(Ten) ELSE IF (qVal == 'FX') THEN p%OutParam(I)%QType = FX p%OutParam(I)%Units = UnitList(FX) @@ -611,15 +678,15 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg ) ELSE IF (qVal == 'FZ') THEN p%OutParam(I)%QType = FZ p%OutParam(I)%Units = UnitList(FZ) ! <<<< should add moments as well <<<< - ELSE IF (qVal == 'ROLL') THEN - p%OutParam(I)%QType = Roll - p%OutParam(I)%Units = UnitList(Roll) - ELSE IF (qVal == 'PITCH') THEN - p%OutParam(I)%QType = Pitch - p%OutParam(I)%Units = UnitList(Pitch) - ELSE IF (qVal == 'YAW') THEN - p%OutParam(I)%QType = Yaw - p%OutParam(I)%Units = UnitList(Yaw) + ELSE IF (qVal == 'MX') THEN + p%OutParam(I)%QType = MX + p%OutParam(I)%Units = UnitList(MX) + ELSE IF (qVal == 'MY') THEN + p%OutParam(I)%QType = MY + p%OutParam(I)%Units = UnitList(MY) + ELSE IF (qVal == 'MZ') THEN + p%OutParam(I)%QType = MZ + p%OutParam(I)%Units = UnitList(MZ) ! <<<< should add moments as well <<<< ELSE IF (qVal == 'SUB') THEN p%OutParam(I)%QType = Sub p%OutParam(I)%Units = UnitList(Sub) @@ -646,9 +713,9 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg ) CALL DenoteInvalidOutput(p%OutParam(I)) ! flag as invalid END IF - ELSE IF (p%OutParam(I)%OType==2) THEN ! Connect - IF (p%OutParam(I)%ObjID > p%NConnects) THEN - CALL WrScr('Warning: output Connect index excedes number of Connects in requested output '//trim(OutListTmp)//'.') + ELSE IF (p%OutParam(I)%OType==2) THEN ! point + IF (p%OutParam(I)%ObjID > p%NPoints) THEN + CALL WrScr('Warning: output point index excedes number of points in requested output '//trim(OutListTmp)//'.') CALL DenoteInvalidOutput(p%OutParam(I)) ! flag as invalid END IF @@ -660,8 +727,8 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg ) IF (p%OutParam(I)%NodeID > m%RodList(p%OutParam(I)%ObjID)%N) THEN CALL WrScr('Warning: output node index excedes number of nodes in requested output '//trim(OutListTmp)//'.') CALL DenoteInvalidOutput(p%OutParam(I)) ! flag as invalid - ELSE IF (p%OutParam(I)%NodeID < 0) THEN - CALL WrScr('Warning: output node index is less than zero in requested output '//trim(OutListTmp)//'.') + ELSE IF (p%OutParam(I)%NodeID < -1) THEN + CALL WrScr('Warning: output node index is less than -1 in requested output '//trim(OutListTmp)//'.') CALL DenoteInvalidOutput(p%OutParam(I)) ! flag as invalid END IF @@ -1287,87 +1354,142 @@ SUBROUTINE MDIO_WriteOutputs( Time, p, m, y, ErrStat, ErrMsg ) y%WriteOutput(I) = m%LineList(p%OutParam(I)%ObjID)%rd(2,p%OutParam(I)%NodeID) ! y velocity CASE (VelZ) y%WriteOutput(I) = m%LineList(p%OutParam(I)%ObjID)%rd(3,p%OutParam(I)%NodeID) ! z velocity + CASE (FX) + y%WriteOutput(I) = m%LineList(p%OutParam(I)%ObjID)%Fnet(1,p%OutParam(I)%NodeID) ! node force in x + CASE (FY) + y%WriteOutput(I) = m%LineList(p%OutParam(I)%ObjID)%Fnet(2,p%OutParam(I)%NodeID) ! node force in y + CASE (FZ) + y%WriteOutput(I) = m%LineList(p%OutParam(I)%ObjID)%Fnet(3,p%OutParam(I)%NodeID) ! node force in z CASE (Ten) y%WriteOutput(I) = Line_GetNodeTen(m%LineList(p%OutParam(I)%ObjID), p%OutParam(I)%NodeID, p) ! this is actually the segment tension ( 1 < NodeID < N ) Should deal with properly! - + CASE (TenA) + y%WriteOutput(I) = Line_GetNodeTen(m%LineList(p%OutParam(I)%ObjID), 0, p) + CASE (TenB) + y%WriteOutput(I) = Line_GetNodeTen(m%LineList(p%OutParam(I)%ObjID), m%LineList(p%OutParam(I)%ObjID)%N, p) CASE DEFAULT y%WriteOutput(I) = 0.0_ReKi ErrStat = ErrID_Warn ErrMsg = ' Unsupported output quantity '//TRIM(p%OutParam(I)%Name)//' requested from Line '//TRIM(Num2Lstr(p%OutParam(I)%ObjID))//'.' END SELECT - ELSE IF (p%OutParam(I)%OType == 2) THEN ! if dealing with a Connect output + ELSE IF (p%OutParam(I)%OType == 2) THEN ! if dealing with a Point output SELECT CASE (p%OutParam(I)%QType) CASE (PosX) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%r(1) ! x position + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%r(1) ! x position CASE (PosY) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%r(2) ! y position + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%r(2) ! y position CASE (PosZ) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%r(3) ! z position + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%r(3) ! z position CASE (VelX) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%rd(1) ! x velocity + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%rd(1) ! x velocity CASE (VelY) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%rd(2) ! y velocity + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%rd(2) ! y velocity CASE (VelZ) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%rd(3) ! z velocity + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%rd(3) ! z velocity CASE (AccX) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%a(1) ! x acceleration + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%a(1) ! x acceleration CASE (AccY) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%a(2) ! y acceleration + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%a(2) ! y acceleration CASE (AccZ) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%a(3) ! z acceleration + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%a(3) ! z acceleration CASE (Ten) - y%WriteOutput(I) = TwoNorm(m%ConnectList(p%OutParam(I)%ObjID)%Fnet) ! total force magnitude on a connect (used eg. for fairlead and anchor tensions) + y%WriteOutput(I) = sqrt(m%PointList(p%OutParam(I)%ObjID)%Fnet(1)**2 + m%PointList(p%OutParam(I)%ObjID)%Fnet(2)**2 + m%PointList(p%OutParam(I)%ObjID)%Fnet(3)**2) ! total force magnitude on a point (used eg. for fairlead and anchor tensions) CASE (FX) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%Fnet(1) ! total force in x - added Nov 24 + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%Fnet(1) ! total force in x - added Nov 24 CASE (FY) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%Fnet(2) ! total force in y + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%Fnet(2) ! total force in y CASE (FZ) - y%WriteOutput(I) = m%ConnectList(p%OutParam(I)%ObjID)%Fnet(3) ! total force in z + y%WriteOutput(I) = m%PointList(p%OutParam(I)%ObjID)%Fnet(3) ! total force in z CASE DEFAULT y%WriteOutput(I) = 0.0_ReKi ErrStat = ErrID_Warn - ErrMsg = ' Unsupported output quantity '//TRIM(p%OutParam(I)%Name)//' requested from Connection '//TRIM(Num2Lstr(p%OutParam(I)%ObjID))//'.' + ErrMsg = ' Unsupported output quantity '//TRIM(p%OutParam(I)%Name)//' requested from Point '//TRIM(Num2Lstr(p%OutParam(I)%ObjID))//'.' END SELECT ELSE IF (p%OutParam(I)%OType == 3) THEN ! if dealing with a Rod output - SELECT CASE (p%OutParam(I)%QType) - CASE (PosX) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%r(1,p%OutParam(I)%NodeID) ! x position - CASE (PosY) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%r(2,p%OutParam(I)%NodeID) ! y position - CASE (PosZ) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%r(3,p%OutParam(I)%NodeID) ! z position - CASE (VelX) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%rd(1,p%OutParam(I)%NodeID) ! x velocity - CASE (VelY) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%rd(2,p%OutParam(I)%NodeID) ! y velocity - CASE (VelZ) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%rd(3,p%OutParam(I)%NodeID) ! z velocity - CASE (AccX) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%a6(1) ! x acceleration <<< should this become distributed for each node? - CASE (AccY) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%a6(2) ! y acceleration - CASE (AccZ) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%a6(3) ! z acceleration - CASE (FX) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%F6net(1) ! total force in x - added Nov 24 - CASE (FY) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%F6net(2) ! total force in y - CASE (FZ) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%F6net(3) ! total force in z - CASE (Roll) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%roll*180.0/pi ! rod roll - CASE (Pitch) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%pitch*180.0/pi ! rod pitch - CASE (Sub) - y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%h0 / m%RodList(p%OutParam(I)%ObjID)%UnstrLen ! rod submergence - CASE DEFAULT - y%WriteOutput(I) = 0.0_ReKi - ErrStat = ErrID_Warn - ErrMsg = ' Unsupported output quantity '//TRIM(p%OutParam(I)%Name)//' requested from Rod '//TRIM(Num2Lstr(p%OutParam(I)%ObjID))//'.' - END SELECT + IF (p%OutParam(I)%NodeID == -1) THEN ! if whole rod outputs or node 0 (aka end A) + SELECT CASE (p%OutParam(I)%QType) + CASE (PosX) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%r6(1) ! x position + CASE (PosY) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%r6(2) ! y position + CASE (PosZ) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%r6(3) ! z position + CASE (RotX) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%roll*180.0/pi ! rod roll + CASE (RotY) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%pitch*180.0/pi ! rod pitch + CASE (VelX) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%v6(1) ! x velocity + CASE (VelY) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%v6(2) ! y velocity + CASE (VelZ) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%v6(3) ! z velocity + CASE (RVelX) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%v6(4)*180.0/pi ! rx velocity + CASE (RVelY) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%v6(5)*180.0/pi ! ry velocity + CASE (AccX) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%a6(1) ! x acceleration <<< should this become distributed for each node? + CASE (AccY) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%a6(2) ! y acceleration + CASE (AccZ) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%a6(3) ! z acceleration + CASE (RAccX) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%a6(4)*180.0/pi ! rx acceleration <<< should this become distributed for each node? + CASE (RAccY) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%a6(5)*180.0/pi ! ry acceleration + CASE (FX) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%F6net(1) ! total force in x - added Nov 24 + CASE (FY) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%F6net(2) ! total force in y + CASE (FZ) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%F6net(3) ! total force in z + CASE (MX) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%F6net(4) ! total force in x - added Nov 24 + CASE (MY) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%F6net(5) ! total force in y + CASE (MZ) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%F6net(6) ! total force in z + CASE (Sub) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%h0 / m%RodList(p%OutParam(I)%ObjID)%UnstrLen ! rod submergence + CASE (TenA) + y%WriteOutput(I) = sqrt(m%RodList(p%OutParam(I)%ObjID)%FextA(1)**2 + m%RodList(p%OutParam(I)%ObjID)%FextA(2)**2 + m%RodList(p%OutParam(I)%ObjID)%FextA(3)**2)! external forces on end A + CASE (TenB) + y%WriteOutput(I) = sqrt(m%RodList(p%OutParam(I)%ObjID)%FextB(1)**2 + m%RodList(p%OutParam(I)%ObjID)%FextB(2)**2 + m%RodList(p%OutParam(I)%ObjID)%FextB(3)**2) ! external forces on end B + CASE DEFAULT + y%WriteOutput(I) = 0.0_ReKi + ErrStat = ErrID_Warn + ErrMsg = ' Unsupported output quantity for whole rod'//TRIM(p%OutParam(I)%Name)//' requested from Rod '//TRIM(Num2Lstr(p%OutParam(I)%ObjID))//'.' + END SELECT + + ELSE ! if rod node outputs + SELECT CASE (p%OutParam(I)%QType) + CASE (PosX) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%r(1,p%OutParam(I)%NodeID) ! x position + CASE (PosY) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%r(2,p%OutParam(I)%NodeID) ! y position + CASE (PosZ) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%r(3,p%OutParam(I)%NodeID) ! z position + CASE (VelX) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%rd(1,p%OutParam(I)%NodeID) ! x velocity + CASE (VelY) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%rd(2,p%OutParam(I)%NodeID) ! y velocity + CASE (VelZ) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%rd(3,p%OutParam(I)%NodeID) ! z velocity + CASE (FX) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%Fnet(1,p%OutParam(I)%NodeID) ! node force in x + CASE (FY) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%Fnet(2,p%OutParam(I)%NodeID) ! node force in y + CASE (FZ) + y%WriteOutput(I) = m%RodList(p%OutParam(I)%ObjID)%Fnet(3,p%OutParam(I)%NodeID) ! node force in z + CASE DEFAULT + y%WriteOutput(I) = 0.0_ReKi + ErrStat = ErrID_Warn + ErrMsg = ' Unsupported output quantity for rod nodes '//TRIM(p%OutParam(I)%Name)//' requested from Rod '//TRIM(Num2Lstr(p%OutParam(I)%ObjID))//'.' + END SELECT + END IF ELSE IF (p%OutParam(I)%OType == 4) THEN ! if dealing with a Body output SELECT CASE (p%OutParam(I)%QType) @@ -1377,24 +1499,50 @@ SUBROUTINE MDIO_WriteOutputs( Time, p, m, y, ErrStat, ErrMsg ) y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%r6(2) ! y position CASE (PosZ) y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%r6(3) ! z position + CASE (RotX) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%r6(4)*180.0/pi ! roll + CASE (RotY) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%r6(5)*180.0/pi ! pitch + CASE (RotZ) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%r6(6)*180.0/pi ! yaw CASE (VelX) y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%v6(1) ! x velocity CASE (VelY) y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%v6(2) ! y velocity CASE (VelZ) y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%v6(3) ! z velocity + CASE (RVelX) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%v6(4)*180.0/pi ! rx velocity + CASE (RVelY) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%v6(5)*180.0/pi ! ry velocity + CASE (RVelZ) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%v6(6)*180.0/pi ! rz velocity + CASE (AccX) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%a6(1) ! x acceleration + CASE (AccY) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%a6(2) ! y acceleration + CASE (AccZ) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%a6(3) ! z acceleration + CASE (RAccX) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%a6(4)*180.0/pi ! rx acceleration + CASE (RAccY) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%a6(5)*180.0/pi ! ry acceleration + CASE (RAccZ) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%a6(6)*180.0/pi ! rz acceleration CASE (FX) y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%F6net(1) ! total force in x - added Nov 24 CASE (FY) y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%F6net(2) ! total force in y CASE (FZ) y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%F6net(3) ! total force in z - CASE (Roll) - y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%r6(4)*180.0/pi ! roll - CASE (Pitch) - y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%r6(5)*180.0/pi ! pitch - CASE (Yaw) - y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%r6(6)*180.0/pi ! yaw + CASE (TEN) + y%WriteOutput(I) = sqrt(m%BodyList(p%OutParam(I)%ObjID)%F6net(1)**2 + m%BodyList(p%OutParam(I)%ObjID)%F6net(2)**2 + m%BodyList(p%OutParam(I)%ObjID)%F6net(3)**2) + CASE (MX) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%F6net(4) ! total moment in x - added Nov 24 + CASE (MY) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%F6net(5) ! total moment in y + CASE (MZ) + y%WriteOutput(I) = m%BodyList(p%OutParam(I)%ObjID)%F6net(6) ! total moment in z CASE DEFAULT y%WriteOutput(I) = 0.0_ReKi ErrStat = ErrID_Warn diff --git a/modules/moordyn/src/MoorDyn_Line.f90 b/modules/moordyn/src/MoorDyn_Line.f90 index abb2935ef..37f406486 100644 --- a/modules/moordyn/src/MoorDyn_Line.f90 +++ b/modules/moordyn/src/MoorDyn_Line.f90 @@ -39,7 +39,8 @@ MODULE MoorDyn_Line PUBLIC :: Line_GetEndStuff PUBLIC :: Line_GetEndSegmentInfo PUBLIC :: Line_SetEndOrientation - + public :: VisLinesMesh_Init + public :: VisLinesMesh_Update CONTAINS @@ -242,14 +243,14 @@ END SUBROUTINE SetupLine !----------------------------------------------------------------------------------------======= - SUBROUTINE Line_Initialize (Line, LineProp, rhoW, ErrStat, ErrMsg) + SUBROUTINE Line_Initialize (Line, LineProp, p, ErrStat, ErrMsg) ! calculate initial profile of the line using quasi-static model - TYPE(MD_Line), INTENT(INOUT) :: Line ! the single line object of interest - TYPE(MD_LineProp), INTENT(INOUT) :: LineProp ! the single line property set for the line of interest - REAL(DbKi), INTENT(IN) :: rhoW - INTEGER, INTENT( INOUT ) :: ErrStat ! returns a non-zero value when an error occurs - CHARACTER(*), INTENT( INOUT ) :: ErrMsg ! Error message if ErrStat /= ErrID_None + TYPE(MD_Line), INTENT(INOUT) :: Line ! the single line object of interest + TYPE(MD_LineProp), INTENT(INOUT) :: LineProp ! the single line property set for the line of interest + TYPE(MD_ParameterType), INTENT(IN ) :: p ! Parameters + INTEGER, INTENT( INOUT ) :: ErrStat ! returns a non-zero value when an error occurs + CHARACTER(*), INTENT( INOUT ) :: ErrMsg ! Error message if ErrStat /= ErrID_None REAL(DbKi) :: COSPhi ! Cosine of the angle between the xi-axis of the inertia frame and the X-axis of the local coordinate system of the current mooring line (-) REAL(DbKi) :: SINPhi ! Sine of the angle between the xi-axis of the inertia frame and the X-axis of the local coordinate system of the current mooring line (-) @@ -263,7 +264,7 @@ SUBROUTINE Line_Initialize (Line, LineProp, rhoW, ErrStat, ErrMsg) CHARACTER(ErrMsgLen) :: ErrMsg2 ! Error message if ErrStat2 /= ErrID_None REAL(DbKi) :: WetWeight REAL(DbKi) :: SeabedCD = 0.0_DbKi - REAL(DbKi) :: TenTol = 0.0001_DbKi + REAL(DbKi) :: Tol = 0.00001_DbKi REAL(DbKi), ALLOCATABLE :: LSNodes(:) REAL(DbKi), ALLOCATABLE :: LNodesX(:) REAL(DbKi), ALLOCATABLE :: LNodesZ(:) @@ -292,7 +293,7 @@ SUBROUTINE Line_Initialize (Line, LineProp, rhoW, ErrStat, ErrMsg) SINPhi = ( Line%r(2,N) - Line%r(2,0) )/XF ENDIF - WetWeight = LineProp%w - 0.25*Pi*LineProp%d*LineProp%d*rhoW + WetWeight = (LineProp%w - 0.25*Pi*LineProp%d*LineProp%d*p%rhoW)*p%g !LineNodes = Line%N + 1 ! number of nodes in line for catenary model to worry about @@ -335,41 +336,54 @@ SUBROUTINE Line_Initialize (Line, LineProp, rhoW, ErrStat, ErrMsg) ! are stored in a module and thus their values are saved from CALL to ! CALL). + IF (XF == 0.0) THEN - CALL Catenary ( XF , ZF , Line%UnstrLen, LineProp%EA , & - WetWeight , SeabedCD, TenTol, (N+1) , & - LSNodes, LNodesX, LNodesZ , ErrStat2, ErrMsg2) + DO J = 0,N ! Loop through all nodes per line where the line position and tension can be output + Line%r(1,J) = Line%r(1,0) + (Line%r(1,N) - Line%r(1,0))*REAL(J, DbKi)/REAL(N, DbKi) + Line%r(2,J) = Line%r(2,0) + (Line%r(2,N) - Line%r(2,0))*REAL(J, DbKi)/REAL(N, DbKi) + Line%r(3,J) = Line%r(3,0) + (Line%r(3,N) - Line%r(3,0))*REAL(J, DbKi)/REAL(N, DbKi) + END DO - IF (ErrStat2 == ErrID_None) THEN ! if it worked, use it - ! Transform the positions of each node on the current line from the local - ! coordinate system of the current line to the inertial frame coordinate - ! system: + CALL WrScr(' Vertical initial profile for Line '//trim(Num2LStr(Line%IdNum))//'.') - DO J = 0,N ! Loop through all nodes per line where the line position and tension can be output - Line%r(1,J) = Line%r(1,0) + LNodesX(J+1)*COSPhi - Line%r(2,J) = Line%r(2,0) + LNodesX(J+1)*SINPhi - Line%r(3,J) = Line%r(3,0) + LNodesZ(J+1) - ENDDO ! J - All nodes per line where the line position and tension can be output + ELSE ! If the line is not vertical, solve for the catenary profile + CALL Catenary ( XF , ZF , Line%UnstrLen, LineProp%EA , & + WetWeight , SeabedCD, Tol, (N+1) , & + LSNodes, LNodesX, LNodesZ , ErrStat2, ErrMsg2) - ELSE ! if there is a problem with the catenary approach, just stretch the nodes linearly between fairlead and anchor + IF (ErrStat2 == ErrID_None) THEN ! if it worked, use it + ! Transform the positions of each node on the current line from the local + ! coordinate system of the current line to the inertial frame coordinate + ! system: - !CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'Line_Initialize') - call WrScr(" Catenary solve of Line "//trim(Num2LStr(Line%IdNum))//" unsuccessful. Initializing as linear.") + DO J = 0,N ! Loop through all nodes per line where the line position and tension can be output + Line%r(1,J) = Line%r(1,0) + LNodesX(J+1)*COSPhi + Line%r(2,J) = Line%r(2,0) + LNodesX(J+1)*SINPhi + Line%r(3,J) = Line%r(3,0) + LNodesZ(J+1) + ENDDO ! J - All nodes per line where the line position and tension can be output -! print *, "Node positions: " + ELSE ! if there is a problem with the catenary approach, just stretch the nodes linearly between fairlead and anchor + ! CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, ' Line_Initialize: Line '//trim(Num2LStr(Line%IdNum))//' ') + CALL WrScr(' Catenary solve of Line '//trim(Num2LStr(Line%IdNum))//' unsuccessful. Initializing as linear.') + IF (wordy == 1) THEN + CALL WrScr(' Message from catenary solver: '//ErrMsg2) + ENDIF + ! print *, "Node positions: " + + DO J = 0,N ! Loop through all nodes per line where the line position and tension can be output + Line%r(1,J) = Line%r(1,0) + (Line%r(1,N) - Line%r(1,0))*REAL(J, DbKi)/REAL(N, DbKi) + Line%r(2,J) = Line%r(2,0) + (Line%r(2,N) - Line%r(2,0))*REAL(J, DbKi)/REAL(N, DbKi) + Line%r(3,J) = Line%r(3,0) + (Line%r(3,N) - Line%r(3,0))*REAL(J, DbKi)/REAL(N, DbKi) + + ! print*, Line%r(:,J) + ENDDO + + ! print*,"FYI line end A and B node coords are" + ! print*, Line%r(:,0) + ! print*, Line%r(:,N) + ENDIF - DO J = 0,N ! Loop through all nodes per line where the line position and tension can be output - Line%r(1,J) = Line%r(1,0) + (Line%r(1,N) - Line%r(1,0))*REAL(J, DbKi)/REAL(N, DbKi) - Line%r(2,J) = Line%r(2,0) + (Line%r(2,N) - Line%r(2,0))*REAL(J, DbKi)/REAL(N, DbKi) - Line%r(3,J) = Line%r(3,0) + (Line%r(3,N) - Line%r(3,0))*REAL(J, DbKi)/REAL(N, DbKi) - -! print*, Line%r(:,J) - ENDDO - -! print*,"FYI line end A and B node coords are" -! print*, Line%r(:,0) -! print*, Line%r(:,N) ENDIF @@ -500,6 +514,7 @@ SUBROUTINE Catenary ( XF_In, ZF_In, L_In , EA_In, & INTEGER(4) :: MaxIter ! Maximum number of Newton-Raphson iterations possible before giving up (-) LOGICAL :: FirstIter ! Flag to determine whether or not this is the first time through the Newton-Raphson interation (flag) + LOGICAL :: reverseFlag ! Flag for when the anchor is above the fairlead ErrStat = ERrId_None @@ -518,9 +533,15 @@ SUBROUTINE Catenary ( XF_In, ZF_In, L_In , EA_In, & W = REAL( W_In , DbKi ) XF = REAL( XF_In , DbKi ) ZF = REAL( ZF_In , DbKi ) + IF ( ZF < 0.0 ) THEN ! .TRUE. if the fairlead has passed below its anchor + ZF = -ZF + reverseFlag = .TRUE. + CALL WrScr(' Warning from catenary: Anchor point is above the fairlead point for Line '//trim(Num2LStr(Line%IdNum))//', consider changing.') + ELSE + reverseFlag = .FALSE. + ENDIF - ! HF and VF cannot be initialized to zero when a portion of the line rests on the seabed and the anchor tension is nonzero ! Generate the initial guess values for the horizontal and vertical tensions @@ -531,9 +552,9 @@ SUBROUTINE Catenary ( XF_In, ZF_In, L_In , EA_In, & XF2 = XF*XF ZF2 = ZF*ZF - IF ( XF == 0.0_DbKi ) THEN ! .TRUE. if the current mooring line is exactly vertical - Lamda0 = 1.0D+06 - ELSEIF ( L <= SQRT( XF2 + ZF2 ) ) THEN ! .TRUE. if the current mooring line is taut + ! IF ( XF == 0.0_DbKi ) THEN ! .TRUE. if the current mooring line is exactly vertical + ! Lamda0 = 1.0D+06 + IF ( L <= SQRT( XF2 + ZF2 ) ) THEN ! .TRUE. if the current mooring line is taut Lamda0 = 0.2_DbKi ELSE ! The current mooring line must be slack and not vertical Lamda0 = SQRT( 3.0_DbKi*( ( L**2 - ZF2 )/XF2 - 1.0_DbKi ) ) @@ -549,33 +570,26 @@ SUBROUTINE Catenary ( XF_In, ZF_In, L_In , EA_In, & IF ( Tol <= EPSILON(TOL) ) THEN ! .TRUE. when the convergence tolerance is specified incorrectly ErrStat = ErrID_Warn ErrMsg = ' Convergence tolerance must be greater than zero in routine Catenary().' - return + RETURN ELSEIF ( XF < 0.0_DbKi ) THEN ! .TRUE. only when the local coordinate system is not computed correctly ErrStat = ErrID_Warn ErrMsg = ' The horizontal distance between an anchor and its'// & ' fairlead must not be less than zero in routine Catenary().' - return - - ELSEIF ( ZF < 0.0_DbKi ) THEN ! .TRUE. if the fairlead has passed below its anchor - ErrStat = ErrID_Warn - ErrMsg = " A line's fairlead is defined as below its anchor. You may need to swap a line's fairlead and anchor end nodes." - return - + RETURN ELSEIF ( L <= 0.0_DbKi ) THEN ! .TRUE. when the unstretched line length is specified incorrectly ErrStat = ErrID_Warn ErrMsg = ' Unstretched length of line must be greater than zero in routine Catenary().' - return + RETURN ELSEIF ( EA <= 0.0_DbKi ) THEN ! .TRUE. when the unstretched line length is specified incorrectly ErrStat = ErrID_Warn ErrMsg = ' Extensional stiffness of line must be greater than zero in routine Catenary().' - return + RETURN ELSEIF ( W == 0.0_DbKi ) THEN ! .TRUE. when the weight of the line in fluid is zero so that catenary solution is ill-conditioned ErrStat = ErrID_Warn - ErrMsg = ' The weight of the line in fluid must not be zero. '// & - ' Routine Catenary() cannot solve quasi-static mooring line solution.' - return + ErrMsg = ' The weight of the line in fluid must not be zero in routine Catenary().' + RETURN ELSEIF ( W > 0.0_DbKi ) THEN ! .TRUE. when the line will sink in fluid @@ -584,9 +598,8 @@ SUBROUTINE Catenary ( XF_In, ZF_In, L_In , EA_In, & IF ( ( L >= LMax ) .AND. ( CB >= 0.0_DbKi ) ) then ! .TRUE. if the line is as long or longer than its maximum possible value with seabed interaction ErrStat = ErrID_Warn - !ErrMsg = ' Unstretched mooring line length too large. '// & - ! ' Routine Catenary() cannot solve quasi-static mooring line solution.' - return + ErrMsg = ' Unstretched mooring line length too large in routine Catenary().' + RETURN END IF ENDIF @@ -612,7 +625,7 @@ SUBROUTINE Catenary ( XF_In, ZF_In, L_In , EA_In, & HF = MAX( HF, Tol ) XF = MAX( XF, Tol ) - ZF = MAX( ZF, TOl ) + ZF = MAX( ZF, Tol ) @@ -717,13 +730,12 @@ SUBROUTINE Catenary ( XF_In, ZF_In, L_In , EA_In, & DET = dXFdHF*dZFdVF - dXFdVF*dZFdHF - if ( EqualRealNos( DET, 0.0_DbKi ) ) then -!bjj: there is a serious problem with the debugger here when DET = 0 + IF ( EqualRealNos( DET, 0.0_DbKi ) ) THEN + !bjj: there is a serious problem with the debugger here when DET = 0 ErrStat = ErrID_Warn - ErrMsg = ' Iteration not convergent (DET is 0). '// & - ' Routine Catenary() cannot solve quasi-static mooring line solution.' - return - endif + ErrMsg = ' Iteration not convergent (DET is 0) in routine Catenary().' + RETURN + ENDIF dHF = ( -dZFdVF*EXF + dXFdVF*EZF )/DET ! This is the incremental change in horizontal tension at the fairlead as predicted by Newton-Raphson @@ -776,8 +788,7 @@ SUBROUTINE Catenary ( XF_In, ZF_In, L_In , EA_In, & ELSEIF ( ( I == MaxIter ) .AND. ( .NOT. FirstIter ) ) THEN ! .TRUE. if we've iterated as much as we can take without finding a solution; Abort ErrStat = ErrID_Warn - ErrMsg = ' Iteration not convergent. '// & - ' Routine Catenary() cannot solve quasi-static mooring line solution.' + ErrMsg = ' Iteration not convergent in routine Catenary().' RETURN @@ -937,6 +948,26 @@ SUBROUTINE Catenary ( XF_In, ZF_In, L_In , EA_In, & ENDIF + IF (reverseFlag) THEN + ! Follows process of MoorPy catenary.py + s = s( size(s):1:-1 ) + X = X( size(X):1:-1 ) + Z = Z( size(Z):1:-1 ) + Te = Te( size(Te):1:-1 ) + DO I = 1,N + s(I) = L - s(I) + X(I) = XF - X(I) + Z(I) = Z(I) - ZF + ENDDO + ZF = -ZF ! Return to orginal value + ENDIF + + IF (abs(Z(N) - ZF) > Tol) THEN + ! Check fairlead node z position is same as z distance between fairlead and anchor + ErrStat2 = ErrID_Warn + ErrMsg2 = ' Wrong catenary initial profile. Fairlead and anchor vertical seperation has changed in routine Catenary().' + RETURN + ENDIF ! The Newton-Raphson iteration is only accurate in double precision, so ! convert the output arguments back into the default precision for real @@ -1005,10 +1036,10 @@ SUBROUTINE Line_GetStateDeriv(Line, Xd, m, p) !, FairFtot, FairMtot, AnchFtot, ! Real(DbKi), INTENT (IN) :: t ! instantaneous time ! TYPE(MD_Line), INTENT (INOUT) :: Line ! label for the current line, for convenience ! TYPE(MD_LineProp), INTENT(IN) :: LineProp ! the single line property set for the line of interest - ! Real(DbKi), INTENT(INOUT) :: FairFtot(:) ! total force on Connect top of line is attached to - ! Real(DbKi), INTENT(INOUT) :: FairMtot(:,:) ! total mass of Connect top of line is attached to - ! Real(DbKi), INTENT(INOUT) :: AnchFtot(:) ! total force on Connect bottom of line is attached to - ! Real(DbKi), INTENT(INOUT) :: AnchMtot(:,:) ! total mass of Connect bottom of line is attached to + ! Real(DbKi), INTENT(INOUT) :: FairFtot(:) ! total force on Point top of line is attached to + ! Real(DbKi), INTENT(INOUT) :: FairMtot(:,:) ! total mass of Point top of line is attached to + ! Real(DbKi), INTENT(INOUT) :: AnchFtot(:) ! total force on Point bottom of line is attached to + ! Real(DbKi), INTENT(INOUT) :: AnchMtot(:,:) ! total mass of Point bottom of line is attached to INTEGER(IntKi) :: i ! index of segments or nodes along line @@ -1070,10 +1101,10 @@ SUBROUTINE Line_GetStateDeriv(Line, Xd, m, p) !, FairFtot, FairMtot, AnchFtot, ! ! set end node positions and velocities from connect objects' states ! DO J = 1, 3 - ! Line%r( J,N) = m%ConnectList(Line%FairConnect)%r(J) - ! Line%r( J,0) = m%ConnectList(Line%AnchConnect)%r(J) - ! Line%rd(J,N) = m%ConnectList(Line%FairConnect)%rd(J) - ! Line%rd(J,0) = m%ConnectList(Line%AnchConnect)%rd(J) + ! Line%r( J,N) = m%PointList(Line%FairPoint)%r(J) + ! Line%r( J,0) = m%PointList(Line%AnchPoint)%r(J) + ! Line%rd(J,N) = m%PointList(Line%FairPoint)%rd(J) + ! Line%rd(J,0) = m%PointList(Line%AnchPoint)%rd(J) ! END DO @@ -1225,10 +1256,10 @@ SUBROUTINE Line_GetStateDeriv(Line, Xd, m, p) !, FairFtot, FairMtot, AnchFtot, ! loop through all nodes to calculate bending forces due to bending stiffness do i=0,N - ! end node A case (only if attached to a Rod, i.e. a cantilever rather than pinned connection) + ! end node A case (only if attached to a Rod, i.e. a cantilever rather than pinned point) if (i==0) then - if (Line%endTypeA > 0) then ! if attached to Rod i.e. cantilever connection + if (Line%endTypeA > 0) then ! if attached to Rod i.e. cantilever point Kurvi = GetCurvature(Line%lstr(1), Line%q(:,0), Line%qs(:,1)) ! curvature (assuming rod angle is node angle which is middle of if there was a segment -1/2) @@ -1248,10 +1279,10 @@ SUBROUTINE Line_GetStateDeriv(Line, Xd, m, p) !, FairFtot, FairMtot, AnchFtot, end if - ! end node A case (only if attached to a Rod, i.e. a cantilever rather than pinned connection) + ! end node A case (only if attached to a Rod, i.e. a cantilever rather than pinned point) else if (i==N) then - if (Line%endTypeB > 0) then ! if attached to Rod i.e. cantilever connection + if (Line%endTypeB > 0) then ! if attached to Rod i.e. cantilever point Kurvi = GetCurvature(Line%lstr(N), Line%qs(:,N), Line%q(:,N)) ! curvature (assuming rod angle is node angle which is middle of if there was a segment -1/2 @@ -1488,7 +1519,7 @@ SUBROUTINE Line_GetStateDeriv(Line, Xd, m, p) !, FairFtot, FairMtot, AnchFtot, END DO - ! ! add force and mass of end nodes to the Connects they correspond to <<<<<<<<<<<< do this from Connection instead now! + ! ! add force and mass of end nodes to the Points they correspond to <<<<<<<<<<<< do this from Point instead now! ! DO J = 1,3 ! FairFtot(J) = FairFtot(J) + Line%F(J,N) ! AnchFtot(J) = AnchFtot(J) + Line%F(J,0) @@ -1516,10 +1547,10 @@ SUBROUTINE Line_SetEndKinematics(Line, r_in, rd_in, t, topOfLine) IF (topOfLine==1) THEN inode = Line%N - Line%endTypeB = 0 ! set as ball rather than rigid connection (unless changed later by SetEndOrientation) + Line%endTypeB = 0 ! set as ball rather than rigid point (unless changed later by SetEndOrientation) ELSE inode = 0 - Line%endTypeA = 0 ! set as ball rather than rigid connection (unless changed later by SetEndOrientation) + Line%endTypeA = 0 ! set as ball rather than rigid point (unless changed later by SetEndOrientation) END IF !Line%r( :,inode) = r_in @@ -1631,5 +1662,94 @@ SUBROUTINE Line_SetEndOrientation(Line, qin, topOfLine, rodEndB) END SUBROUTINE Line_SetEndOrientation !-------------------------------------------------------------- + subroutine VisLinesMesh_Init(p,m,y,ErrStat,ErrMsg) + type(MD_ParameterType), intent(in ) :: p + type(MD_MiscVarType), intent(in ) :: m + type(MD_OutputType), intent(inout) :: y + integer(IntKi), intent( out) :: ErrStat + character(*), intent( out) :: ErrMsg + integer(IntKi) :: ErrStat2 + character(ErrMsgLen) :: ErrMsg2 + integer(IntKi) :: i,l + character(*), parameter :: RoutineName = 'VisLinesMesh_Init' + + ErrStat = ErrID_None + ErrMsg = '' + + ! allocate line2 mesh for all lines + allocate (y%VisLinesMesh(p%NLines), STAT=ErrStat2); if (Failed0('visualization mesh for lines')) return + + ! Initialize mesh for each line (line nodes start at 0 index, so N+1 total nodes) + do l=1,p%NLines + CALL MeshCreate( BlankMesh = y%VisLinesMesh(l), & + NNodes = m%LineList(l)%N+1, & + IOS = COMPONENT_OUTPUT, & + TranslationDisp = .true., & + ErrStat=ErrStat2, ErrMess=ErrMsg2) + if (Failed()) return + + ! Internal nodes (line nodes start at 0 index) + do i = 0,m%LineList(l)%N + call MeshPositionNode ( y%VisLinesMesh(l), i+1, real(m%LineList(l)%r(:,I),ReKi), ErrStat2, ErrMsg2 ) + if (Failed()) return + enddo + + ! make elements (line nodes start at 0 index, so N+1 total nodes) + do i = 2,m%LineList(l)%N+1 + call MeshConstructElement ( Mesh = y%VisLinesMesh(l) & + , Xelement = ELEMENT_LINE2 & + , P1 = i-1 & ! node1 number + , P2 = i & ! node2 number + , ErrStat = ErrStat2 & + , ErrMess = ErrMsg2 ) + if (Failed()) return + enddo + + ! Commit mesh + call MeshCommit ( y%VisLinesMesh(l), ErrStat2, ErrMsg2 ) + if (Failed()) return + enddo + contains + logical function Failed() + CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + Failed = ErrStat >= AbortErrLev + end function Failed + + ! check for failed where /= 0 is fatal + logical function Failed0(txt) + character(*), intent(in) :: txt + if (errStat /= 0) then + ErrStat2 = ErrID_Fatal + ErrMsg2 = "Could not allocate "//trim(txt) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + endif + Failed0 = ErrStat >= AbortErrLev + end function Failed0 + end subroutine VisLinesMesh_Init + + + + subroutine VisLinesMesh_Update(p,m,y,ErrStat,ErrMsg) + type(MD_ParameterType), intent(in ) :: p + type(MD_MiscVarType), intent(in ) :: m + type(MD_OutputType), intent(inout) :: y + integer(IntKi), intent( out) :: ErrStat + character(*), intent( out) :: ErrMsg + integer(IntKi) :: i,l + character(*), parameter :: RoutineName = 'VisLinesMesh_Update' + + ErrStat = ErrID_None + ErrMsg = '' + + ! Initialize mesh for each line (line nodes start at 0 index, so N+1 total nodes) + do l=1,p%NLines + ! Update node positions nodes (line nodes start at 0 index) + do i = 0,m%LineList(l)%N + y%VisLinesMesh(l)%TranslationDisp(:,i+1) = real(m%LineList(l)%r(:,I),ReKi) - y%VisLinesMesh(l)%Position(:,i+1) + enddo + enddo + end subroutine VisLinesMesh_Update + + END MODULE MoorDyn_Line diff --git a/modules/moordyn/src/MoorDyn_Point.f90 b/modules/moordyn/src/MoorDyn_Point.f90 index bbfd3b251..f79d86858 100644 --- a/modules/moordyn/src/MoorDyn_Point.f90 +++ b/modules/moordyn/src/MoorDyn_Point.f90 @@ -32,61 +32,61 @@ MODULE MoorDyn_Point INTEGER(IntKi), PARAMETER :: wordy = 0 ! verbosity level. >1 = more console output - PUBLIC :: Connect_Initialize - PUBLIC :: Connect_SetKinematics - PUBLIC :: Connect_SetState - PUBLIC :: Connect_GetStateDeriv - PUBLIC :: Connect_DoRHS - PUBLIC :: Connect_GetCoupledForce - PUBLIC :: Connect_GetNetForceAndMass - PUBLIC :: Connect_AddLine - PUBLIC :: Connect_RemoveLine + PUBLIC :: Point_Initialize + PUBLIC :: Point_SetKinematics + PUBLIC :: Point_SetState + PUBLIC :: Point_GetStateDeriv + PUBLIC :: Point_DoRHS + PUBLIC :: Point_GetCoupledForce + PUBLIC :: Point_GetNetForceAndMass + PUBLIC :: Point_AddLine + PUBLIC :: Point_RemoveLine CONTAINS !-------------------------------------------------------------- - SUBROUTINE Connect_Initialize(Connect, states, m) + SUBROUTINE Point_Initialize(Point, states, m) - Type(MD_Connect), INTENT(INOUT) :: Connect ! the Connection object - Real(DbKi), INTENT(INOUT) :: states(6) ! state vector section for this Connection + Type(MD_Point), INTENT(INOUT) :: Point ! the Point object + Real(DbKi), INTENT(INOUT) :: states(6) ! state vector section for this Point TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects INTEGER(IntKi) :: l - if (Connect%typeNum == 0) then ! error check + if (Point%typeNum == 0) then ! error check ! pass kinematics to any attached lines so they have initial positions at this initialization stage - DO l=1,Connect%nAttached - IF (wordy > 1) print *, "Connect ", Connect%IdNum, " setting end kinematics of line ", Connect%attached(l), " to ", Connect%r - CALL Line_SetEndKinematics(m%LineList(Connect%attached(l)), Connect%r, Connect%rd, 0.0_DbKi, Connect%Top(l)) + DO l=1,Point%nAttached + IF (wordy > 1) print *, "Point ", Point%IdNum, " setting end kinematics of line ", Point%attached(l), " to ", Point%r + CALL Line_SetEndKinematics(m%LineList(Point%attached(l)), Point%r, Point%rd, 0.0_DbKi, Point%Top(l)) END DO ! assign initial node kinematics to state vector - states(4:6) = Connect%r - states(1:3) = Connect%rd + states(4:6) = Point%r + states(1:3) = Point%rd - IF (wordy > 0) print *, "Initialized Connection ", Connect%IdNum + IF (wordy > 0) print *, "Initialized Point ", Point%IdNum else - CALL WrScr(" Error: wrong Point type given to Connect_Initialize for number "//trim(Int2Lstr(Connect%idNum))) + CALL WrScr(" Error: wrong Point type given to Point_Initialize for number "//trim(Int2Lstr(Point%idNum))) end if - END SUBROUTINE Connect_Initialize + END SUBROUTINE Point_Initialize !-------------------------------------------------------------- !-------------------------------------------------------------- - SUBROUTINE Connect_SetKinematics(Connect, r_in, rd_in, a_in, t, m) + SUBROUTINE Point_SetKinematics(Point, r_in, rd_in, a_in, t, m) - Type(MD_Connect), INTENT(INOUT) :: Connect ! the Connection object + Type(MD_Point), INTENT(INOUT) :: Point ! the Point object Real(DbKi), INTENT(IN ) :: r_in( 3) ! position Real(DbKi), INTENT(IN ) :: rd_in(3) ! velocity - Real(DbKi), INTENT(IN ) :: a_in(3) ! acceleration (only used for coupled connects) + Real(DbKi), INTENT(IN ) :: a_in(3) ! acceleration (only used for coupled points) Real(DbKi), INTENT(IN ) :: t ! instantaneous time TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects @@ -94,35 +94,35 @@ SUBROUTINE Connect_SetKinematics(Connect, r_in, rd_in, a_in, t, m) INTEGER(IntKi) :: l ! store current time - Connect%time = t + Point%time = t - ! if (Connect%typeNum==0) THEN ! anchor ( <<< to be changed/expanded) ... in MoorDyn F also used for coupled connections + ! if (Point%typeNum==0) THEN ! anchor ( <<< to be changed/expanded) ... in MoorDyn F also used for coupled points ! set position and velocity - Connect%r = r_in - Connect%rd = rd_in - Connect%a = a_in + Point%r = r_in + Point%rd = rd_in + Point%a = a_in ! pass latest kinematics to any attached lines - DO l=1,Connect%nAttached - CALL Line_SetEndKinematics(m%LineList(Connect%attached(l)), Connect%r, Connect%rd, t, Connect%Top(l)) + DO l=1,Point%nAttached + CALL Line_SetEndKinematics(m%LineList(Point%attached(l)), Point%r, Point%rd, t, Point%Top(l)) END DO ! else ! - ! PRINT*,"Error: setKinematics called for wrong Connection type. Connection ", Connect%IdNum, " type ", Connect%typeNum + ! PRINT*,"Error: setKinematics called for wrong Point type. Point ", Point%IdNum, " type ", Point%typeNum ! END IF - END SUBROUTINE Connect_SetKinematics + END SUBROUTINE Point_SetKinematics !-------------------------------------------------------------- !-------------------------------------------------------------- - SUBROUTINE Connect_SetState(Connect, X, t, m) + SUBROUTINE Point_SetState(Point, X, t, m) - Type(MD_Connect), INTENT(INOUT) :: Connect ! the Connection object + Type(MD_Point), INTENT(INOUT) :: Point ! the Point object Real(DbKi), INTENT(IN ) :: X(:) ! state vector section for this line Real(DbKi), INTENT(IN ) :: t ! instantaneous time TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects @@ -132,26 +132,26 @@ SUBROUTINE Connect_SetState(Connect, X, t, m) ! store current time - Connect%time = t + Point%time = t ! from state values, get r and rdot values DO J=1,3 - Connect%r( J) = X(3 + J) ! get positions - Connect%rd(J) = X( J) ! get velocities + Point%r( J) = X(3 + J) ! get positions + Point%rd(J) = X( J) ! get velocities END DO ! pass latest kinematics to any attached lines - DO l=1,Connect%nAttached - CALL Line_SetEndKinematics(m%LineList(Connect%attached(l)), Connect%r, Connect%rd, t, Connect%Top(l)) + DO l=1,Point%nAttached + CALL Line_SetEndKinematics(m%LineList(Point%attached(l)), Point%r, Point%rd, t, Point%Top(l)) END DO - END SUBROUTINE Connect_SetState + END SUBROUTINE Point_SetState !-------------------------------------------------------------- !-------------------------------------------------------------- - SUBROUTINE Connect_GetStateDeriv(Connect, Xd, m, p) + SUBROUTINE Point_GetStateDeriv(Point, Xd, m, p) - Type(MD_Connect), INTENT(INOUT) :: Connect ! the Connection object + Type(MD_Point), INTENT(INOUT) :: Point ! the Point object Real(DbKi), INTENT(INOUT) :: Xd(:) ! state derivative vector section for this line TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects @@ -167,7 +167,7 @@ SUBROUTINE Connect_GetStateDeriv(Connect, Xd, m, p) Real(DbKi) :: S(3,3) ! inverse mass matrix - CALL Connect_DoRHS(Connect, m, p) + CALL Point_DoRHS(Point, m, p) ! // solve for accelerations in [M]{a}={f} using LU decomposition ! double M_tot[9]; // serialize total mass matrix for easy processing @@ -182,33 +182,33 @@ SUBROUTINE Connect_GetStateDeriv(Connect, Xd, m, p) ! invert node mass matrix - CALL Inverse3by3(S, Connect%M) + CALL Inverse3by3(S, Point%M) ! accelerations - Connect%a = MATMUL(S, Connect%Fnet) + Point%a = MATMUL(S, Point%Fnet) ! fill in state derivatives - Xd(4:6) = Connect%rd ! dxdt = V (velocities) - Xd(1:3) = Connect%a ! dVdt = RHS * A (accelerations) + Xd(4:6) = Point%rd ! dxdt = V (velocities) + Xd(1:3) = Point%a ! dVdt = RHS * A (accelerations) ! check for NaNs DO J = 1, 6 IF (Is_NaN(Xd(J))) THEN - CALL WrScr("NaN detected at time "//trim(Num2LStr(Connect%time))//" in Point "//trim(Int2LStr(Connect%IdNum))//" in MoorDyn.") + CALL WrScr("NaN detected at time "//trim(Num2LStr(Point%time))//" in Point "//trim(Int2LStr(Point%IdNum))//" in MoorDyn.") IF (wordy > 1) print *, "state derivatives:" IF (wordy > 1) print *, Xd EXIT END IF END DO - END SUBROUTINE Connect_GetStateDeriv + END SUBROUTINE Point_GetStateDeriv !-------------------------------------------------------------- !-------------------------------------------------------------- - SUBROUTINE Connect_DoRHS(Connect, m, p) + SUBROUTINE Point_DoRHS(Point, m, p) - Type(MD_Connect), INTENT(INOUT) :: Connect ! the Connection object + Type(MD_Point), INTENT(INOUT) :: Point ! the Point object TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects TYPE(MD_ParameterType),INTENT(IN ) :: p ! Parameters @@ -224,47 +224,47 @@ SUBROUTINE Connect_DoRHS(Connect, m, p) Real(DbKi) :: M_i(3,3) ! mass from an attached line - ! start with the Connection's own forces including buoyancy and weight, and its own mass - Connect%Fnet(1) = Connect%conFX - Connect%Fnet(2) = Connect%conFY - Connect%Fnet(3) = Connect%conFZ + Connect%conV*p%rhoW*p%g - Connect%conM*p%g + ! start with the Point's own forces including buoyancy and weight, and its own mass + Point%Fnet(1) = Point%pointFX + Point%Fnet(2) = Point%pointFY + Point%Fnet(3) = Point%pointFZ + Point%pointV*p%rhoW*p%g - Point%pointM*p%g - Connect%M = 0.0_DbKi ! clear (zero) the connect mass matrix + Point%M = 0.0_DbKi ! clear (zero) the point mass matrix DO J = 1,3 - Connect%M (J,J) = Connect%conM ! set the diagonals to the self-mass (to start with) + Point%M (J,J) = Point%pointM ! set the diagonals to the self-mass (to start with) END DO - ! print *, "connection number", Connect%IdNum - ! print *, "attached lines: ", Connect%attached + ! print *, "point number", Point%IdNum + ! print *, "attached lines: ", Point%attached ! print *, "size of line list" , size(m%LineList) ! loop through attached lines, adding force and mass contributions - DO l=1,Connect%nAttached + DO l=1,Point%nAttached ! print *, " l", l - ! print *, Connect%attached(l) - ! print *, m%LineList(Connect%attached(l))%Fnet + ! print *, Point%attached(l) + ! print *, m%LineList(Point%attached(l))%Fnet ! ! - ! print *, " attached line ID", m%LineList(Connect%attached(l))%IdNum + ! print *, " attached line ID", m%LineList(Point%attached(l))%IdNum - CALL Line_GetEndStuff(m%LineList(Connect%attached(l)), Fnet_i, Moment_dummy, M_i, Connect%Top(l)) + CALL Line_GetEndStuff(m%LineList(Point%attached(l)), Fnet_i, Moment_dummy, M_i, Point%Top(l)) ! sum quantitites - Connect%Fnet = Connect%Fnet + Fnet_i - Connect%M = Connect%M + M_i + Point%Fnet = Point%Fnet + Fnet_i + Point%M = Point%M + M_i END DO ! XXXWhen this sub is called, any self weight, buoyancy, or external forcing should have already been - ! added by the calling subroutine. The only thing left is any added mass or drag forces from the connection (e.g. float) + ! added by the calling subroutine. The only thing left is any added mass or drag forces from the point (e.g. float) ! itself, which will be added below.XXX - ! IF (EqualRealNos(t, 0.0_DbKi)) THEN ! this is old: with current IC gen approach, we skip the first call to the line objects, because they're set AFTER the call to the connects + ! IF (EqualRealNos(t, 0.0_DbKi)) THEN ! this is old: with current IC gen approach, we skip the first call to the line objects, because they're set AFTER the call to the points ! ! DO J = 1,3 ! Xd(3+J) = X(J) ! velocities - these are unused in integration @@ -273,106 +273,106 @@ SUBROUTINE Connect_DoRHS(Connect, m, p) ! ELSE ! ! from state values, get r and rdot values ! DO J = 1,3 - ! Connect%r(J) = X(3 + J) ! get positions - ! Connect%rd(J) = X(J) ! get velocities + ! Point%r(J) = X(3 + J) ! get positions + ! Point%rd(J) = X(J) ! get velocities ! END DO ! END IF - ! add any added mass and drag forces from the Connect body itself + ! add any added mass and drag forces from the Point body itself DO J = 1,3 - Connect%Fnet(J) = Connect%Fnet(J) - 0.5 * p%rhoW * Connect%rd(J) * abs(Connect%rd(J)) * Connect%conCdA; ! add drag forces - corrected Nov 24 - Connect%M (J,J) = Connect%M (J,J) + Connect%conV*p%rhoW*Connect%conCa; ! add added mass + Point%Fnet(J) = Point%Fnet(J) - 0.5 * p%rhoW * Point%rd(J) * abs(Point%rd(J)) * Point%pointCdA; ! add drag forces - corrected Nov 24 + Point%M (J,J) = Point%M (J,J) + Point%pointV*p%rhoW*Point%pointCa; ! add added mass END DO - ! would this sub ever need to include the m*a inertial term? Is it ever called for coupled connects? <<< + ! would this sub ever need to include the m*a inertial term? Is it ever called for coupled points? <<< - END SUBROUTINE Connect_DoRHS + END SUBROUTINE Point_DoRHS !===================================================================== - ! calculate the force including inertial loads on connect that is coupled + ! calculate the force including inertial loads on point that is coupled !-------------------------------------------------------------- - SUBROUTINE Connect_GetCoupledForce(Connect, Fnet_out, m, p) + SUBROUTINE Point_GetCoupledForce(Point, Fnet_out, m, p) - Type(MD_Connect), INTENT(INOUT) :: Connect ! the Connect object + Type(MD_Point), INTENT(INOUT) :: Point ! the Point object Real(DbKi), INTENT( OUT) :: Fnet_out(3) ! force and moment vector about rRef TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects TYPE(MD_ParameterType),INTENT(IN ) :: p ! Parameters Real(DbKi) :: F_iner(3) ! inertial force - IF (Connect%typeNum == -1) then - ! calculate forces and masses of connect - CALL Connect_DoRHS(Connect, m, p) + IF (Point%typeNum == -1) then + ! calculate forces and masses of point + CALL Point_DoRHS(Point, m, p) ! add inertial loads as appropriate - F_iner = -MATMUL(Connect%M, Connect%a) ! inertial loads - Fnet_out = Connect%Fnet + F_iner ! add inertial loads + F_iner = -MATMUL(Point%M, Point%a) ! inertial loads + Fnet_out = Point%Fnet + F_iner ! add inertial loads ELSE - CALL WrScr("Connect_GetCoupledForce called for wrong (uncoupled) Point type in MoorDyn!") + CALL WrScr("Point_GetCoupledForce called for wrong (uncoupled) Point type in MoorDyn!") END IF - END SUBROUTINE Connect_GetCoupledForce + END SUBROUTINE Point_GetCoupledForce - ! calculate the force and mass contributions of the connect on the parent body (only for type 3 connects?) + ! calculate the force and mass contributions of the point on the parent body (only for type 3 points?) !-------------------------------------------------------------- - SUBROUTINE Connect_GetNetForceAndMass(Connect, rRef, Fnet_out, M_out, m, p) + SUBROUTINE Point_GetNetForceAndMass(Point, rRef, Fnet_out, M_out, m, p) - Type(MD_Connect), INTENT(INOUT) :: Connect ! the Connect object + Type(MD_Point), INTENT(INOUT) :: Point ! the Point object Real(DbKi), INTENT(IN ) :: rRef(3) ! global coordinates of reference point (i.e. the parent body) Real(DbKi), INTENT( OUT) :: Fnet_out(6) ! force and moment vector about rRef Real(DbKi), INTENT( OUT) :: M_out(6,6) ! mass and inertia matrix about rRef TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects TYPE(MD_ParameterType),INTENT(IN ) :: p ! Parameters - Real(DbKi) :: rRel( 3) ! position of connection relative to the body reference point (global orientation frame) + Real(DbKi) :: rRel( 3) ! position of point relative to the body reference point (global orientation frame) - CALL Connect_DoRHS(Connect, m, p) + CALL Point_DoRHS(Point, m, p) - rRel = Connect%r - rRef ! vector from body reference point to node + rRel = Point%r - rRef ! vector from body reference point to node ! convert net force into 6dof force about body ref point - CALL translateForce3to6DOF(rRel, Connect%Fnet, Fnet_out) + CALL translateForce3to6DOF(rRel, Point%Fnet, Fnet_out) ! convert mass matrix to 6by6 mass matrix about body ref point - CALL translateMass3to6DOF(rRel, Connect%M, M_out) + CALL translateMass3to6DOF(rRel, Point%M, M_out) - END SUBROUTINE Connect_GetNetForceAndMass + END SUBROUTINE Point_GetNetForceAndMass ! this function handles assigning a line to a connection node !-------------------------------------------------------------- - SUBROUTINE Connect_AddLine(Connect, lineID, TopOfLine) + SUBROUTINE Point_AddLine(Point, lineID, TopOfLine) - Type(MD_Connect), INTENT (INOUT) :: Connect ! the Connection object + Type(MD_Point), INTENT (INOUT) :: Point ! the Point object Integer(IntKi), INTENT( IN ) :: lineID Integer(IntKi), INTENT( IN ) :: TopOfLine - IF (wordy > 0) Print*, "L", lineID, "->C", Connect%IdNum + IF (wordy > 0) Print*, "L", lineID, "->C", Point%IdNum - IF (Connect%nAttached <10) THEN ! this is currently just a maximum imposed by a fixed array size. could be improved. - Connect%nAttached = Connect%nAttached + 1 ! add the line to the number connected - Connect%Attached(Connect%nAttached) = lineID - Connect%Top(Connect%nAttached) = TopOfLine ! attached to line ... 1 = top/fairlead(end B), 0 = bottom/anchor(end A) + IF (Point%nAttached <10) THEN ! this is currently just a maximum imposed by a fixed array size. could be improved. + Point%nAttached = Point%nAttached + 1 ! add the line to the number connected + Point%Attached(Point%nAttached) = lineID + Point%Top(Point%nAttached) = TopOfLine ! attached to line ... 1 = top/fairlead(end B), 0 = bottom/anchor(end A) ELSE - Print*, "Too many lines connected to Point ", Connect%IdNum, " in MoorDyn!" + Print*, "Too many lines connected to Point ", Point%IdNum, " in MoorDyn!" END IF - END SUBROUTINE Connect_AddLine + END SUBROUTINE Point_AddLine ! this function handles removing a line from a connection node !-------------------------------------------------------------- - SUBROUTINE Connect_RemoveLine(Connect, lineID, TopOfLine, rEnd, rdEnd) + SUBROUTINE Point_RemoveLine(Point, lineID, TopOfLine, rEnd, rdEnd) - Type(MD_Connect), INTENT (INOUT) :: Connect ! the Connection object + Type(MD_Point), INTENT (INOUT) :: Point ! the Point object Integer(IntKi), INTENT( IN ) :: lineID Integer(IntKi), INTENT( OUT) :: TopOfLine REAL(DbKi), INTENT(INOUT) :: rEnd(3) @@ -380,39 +380,39 @@ SUBROUTINE Connect_RemoveLine(Connect, lineID, TopOfLine, rEnd, rdEnd) Integer(IntKi) :: l,m,J - DO l = 1,Connect%nAttached ! look through attached lines + DO l = 1,Point%nAttached ! look through attached lines - IF (Connect%Attached(l) == lineID) THEN ! if this is the line's entry in the attachment list + IF (Point%Attached(l) == lineID) THEN ! if this is the line's entry in the attachment list - TopOfLine = Connect%Top(l); ! record which end of the line was attached + TopOfLine = Point%Top(l); ! record which end of the line was attached - DO m = l,Connect%nAttached-1 + DO m = l,Point%nAttached-1 - Connect%Attached(m) = Connect%Attached(m+1) ! move subsequent line links forward one spot in the list to eliminate this line link - Connect%Top( m) = Connect%Top(m+1) + Point%Attached(m) = Point%Attached(m+1) ! move subsequent line links forward one spot in the list to eliminate this line link + Point%Top( m) = Point%Top(m+1) - Connect%nAttached = Connect%nAttached - 1 ! reduce attached line counter by 1 + Point%nAttached = Point%nAttached - 1 ! reduce attached line counter by 1 ! also pass back the kinematics at the end DO J = 1,3 - rEnd( J) = Connect%r( J) - rdEnd(J) = Connect%rd(J) + rEnd( J) = Point%r( J) + rdEnd(J) = Point%rd(J) END DO - print*, "Detached line ", lineID, " from Connection ", Connect%IdNum + print*, "Detached line ", lineID, " from Point ", Point%IdNum EXIT END DO - IF (l == Connect%nAttached) THEN ! detect if line not found - print *, "Error: failed to find line to remove during removeLineFromConnect call to connection ", Connect%IdNum, ". Line ", lineID + IF (l == Point%nAttached) THEN ! detect if line not found + print *, "Error: failed to find line to remove during removeLineFromPoint call to point ", Point%IdNum, ". Line ", lineID END IF END IF END DO - END SUBROUTINE Connect_RemoveLine + END SUBROUTINE Point_RemoveLine diff --git a/modules/moordyn/src/MoorDyn_Registry.txt b/modules/moordyn/src/MoorDyn_Registry.txt index 35f154365..afe061313 100644 --- a/modules/moordyn/src/MoorDyn_Registry.txt +++ b/modules/moordyn/src/MoorDyn_Registry.txt @@ -34,6 +34,7 @@ typedef ^ ^ FileInfoType PassedPrimaryInputData typedef ^ ^ LOGICAL Echo - "" - "echo parameter - do we want to echo the header line describing the input file?" typedef ^ ^ CHARACTER(ChanLen) OutList {:} "" - "string containing list of output channels requested in input file" typedef ^ ^ Logical Linearize - .FALSE. - "Flag that tells this module if the glue code wants to linearize." - +typedef ^ ^ Logical VisMeshes - .FALSE. - "Glue code requesting visualization meshes" - #typedef ^ ^ DbKi UGrid {:}{:}{:} - - "water velocities time series at each grid point" - #typedef ^ ^ DbKi UdGrid {:}{:}{:} - - "water accelerations time series at each grid point" - @@ -44,7 +45,7 @@ typedef ^ ^ Logical Linearize - .FA # nvm typedef ^ ^ MeshType FarmCoupledKinematics {:} - - "array of input kinematics meshes from each of the turbine-level MoorDyn instances" "[m, m/s]" # nvm typedef ^ ^ IntKi FarmNCpldBodies {:} - - "" "" # nvm typedef ^ ^ IntKi FarmNCpldRods {:} - - "" "" -# nvm typedef ^ ^ IntKi FarmNCpldCons {:} - - "number of Fairlead Connections" "" +# nvm typedef ^ ^ IntKi FarmNCpldPoints {:} - - "number of Fairlead Points" "" # ====================================== Internal data types ======================================================================== # line properties from line dictionary input @@ -85,19 +86,19 @@ typedef ^ ^ DbKi CdEnd - typedef ^ ^ DbKi CaEnd - - - "added mass coefficient for rod end" "[-]" # this is the Body type, which holds data for each body object -typedef ^ MD_Body IntKi IdNum - - - "integer identifier of this Connection" -typedef ^ ^ IntKi typeNum - - - "integer identifying the type. 0=fixed, 1=vessel, 2=connect" -typedef ^ ^ IntKi AttachedC {30} - - "list of IdNums of connections attached to this body" +typedef ^ MD_Body IntKi IdNum - - - "integer identifier of this Point" +typedef ^ ^ IntKi typeNum - - - "integer identifying the type. 0=free, 1=fixed, -1=vessel" +typedef ^ ^ IntKi AttachedC {30} - - "list of IdNums of points attached to this body" typedef ^ ^ IntKi AttachedR {30} - - "list of IdNums of rods attached to this body" -typedef ^ ^ IntKi nAttachedC - 0 - "number of attached connections" +typedef ^ ^ IntKi nAttachedC - 0 - "number of attached points" typedef ^ ^ IntKi nAttachedR - 0 - "number of attached rods" -typedef ^ ^ DbKi rConnectRel {3}{30} - - "relative position of connection on body" +typedef ^ ^ DbKi rPointRel {3}{30} - - "relative position of point on body" typedef ^ ^ DbKi r6RodRel {6}{30} - - "relative position and orientation of rod on body" -typedef ^ ^ DbKi bodyM - - - "" -typedef ^ ^ DbKi bodyV - - - "" -typedef ^ ^ DbKi bodyI {3} - - "" -typedef ^ ^ DbKi bodyCdA {6} - - "product of drag force and frontal area of connection point" "[m^2]" -typedef ^ ^ DbKi bodyCa {6} - - "added mass coefficient of connection point" "-" +typedef ^ ^ DbKi bodyM - - - "body mass (seperate from attached objects)" "[kg]" +typedef ^ ^ DbKi bodyV - - - "body volume (for buoyancy calculation)" "[m^3]" +typedef ^ ^ DbKi bodyI {3} - - "body 3x3 inertia matrix diagonals" "[kg-m^2]" +typedef ^ ^ DbKi bodyCdA {6} - - "product of drag force and frontal area of body" "[m^2]" +typedef ^ ^ DbKi bodyCa {6} - - "added mass coefficient of body" "-" typedef ^ ^ DbKi time - - - "current time" "[s]" typedef ^ ^ DbKi r6 {6} - - "position" typedef ^ ^ DbKi v6 {6} - - "velocity" @@ -112,20 +113,20 @@ typedef ^ ^ DbKi M0 {6}{6} typedef ^ ^ DbKi OrMat {3}{3} - - "DCM for body orientation" typedef ^ ^ DbKi rCG {3} - - "vector in body frame from ref point to CG (before rods etc..)" -# this is the Connection type, which holds data for each connection object -typedef ^ MD_Connect IntKi IdNum - - - "integer identifier of this Connection" -typedef ^ ^ CHARACTER(10) type - - - "type of Connect: fix, vessel, connect" -typedef ^ ^ IntKi typeNum - - - "integer identifying the type. 0=fixed, 1=vessel, 2=connect" -typedef ^ ^ IntKi Attached {10} - - "list of IdNums of lines attached to this connection node" +# this is the Point type, which holds data for each point object +typedef ^ MD_Point IntKi IdNum - - - "integer identifier of this point" +typedef ^ ^ CHARACTER(10) type - - - "type of point: fix, vessel, point" +typedef ^ ^ IntKi typeNum - - - "integer identifying the type. 1=fixed, -1=vessel, 0=free" +typedef ^ ^ IntKi Attached {10} - - "list of IdNums of lines attached to this point node" typedef ^ ^ IntKi Top {10} - - "list of ints specifying whether each line is attached at 1 = top/fairlead(end B), 0 = bottom/anchor(end A)" typedef ^ ^ IntKi nAttached - 0 - "number of attached lines" -typedef ^ ^ DbKi conM - - - "" -typedef ^ ^ DbKi conV - - - "" -typedef ^ ^ DbKi conFX - - - "" -typedef ^ ^ DbKi conFY - - - "" -typedef ^ ^ DbKi conFZ - - - "" -typedef ^ ^ DbKi conCa - - - "added mass coefficient of connection point" "-" -typedef ^ ^ DbKi conCdA - - - "product of drag force and frontal area of connection point" "[m^2]" +typedef ^ ^ DbKi pointM - - - "point mass" "[kg]" +typedef ^ ^ DbKi pointV - - - "point volume" "[m^3]" +typedef ^ ^ DbKi pointFX - - - "" +typedef ^ ^ DbKi pointFY - - - "" +typedef ^ ^ DbKi pointFZ - - - "" +typedef ^ ^ DbKi pointCa - - - "added mass coefficient of point" "-" +typedef ^ ^ DbKi pointCdA - - - "product of drag force and frontal area of point" "[m^2]" typedef ^ ^ DbKi time - - - "current time" "[s]" typedef ^ ^ DbKi r {3} - - "position" typedef ^ ^ DbKi rd {3} - - "velocity" @@ -141,7 +142,7 @@ typedef ^ ^ DbKi M {3}{3} typedef ^ MD_Rod IntKi IdNum - - - "integer identifier of this Line" typedef ^ ^ CHARACTER(10) type - - - "type of Rod. should match one of RodProp names" typedef ^ ^ IntKi PropsIdNum - - - "the IdNum of the associated rod properties" - -typedef ^ ^ IntKi typeNum - - - "integer identifying the type. 0=fixed, 1=vessel, 2=connect" +typedef ^ ^ IntKi typeNum - - - "integer identifying the type. 0=fixed, 1=vessel, 2=point" typedef ^ ^ IntKi AttachedA {10} - - "list of IdNums of lines attached to end A" typedef ^ ^ IntKi AttachedB {10} - - "list of IdNums of lines attached to end B" typedef ^ ^ IntKi TopA {10} - - "list of ints specifying whether each line is attached at 1 = top/fairlead(end B), 0 = bottom/anchor(end A)" @@ -150,8 +151,8 @@ typedef ^ ^ IntKi nAttachedA - typedef ^ ^ IntKi nAttachedB - 0 - "number of attached lines to Rod end B" typedef ^ ^ IntKi OutFlagList {20} - - "array specifying what line quantities should be output (1 vs 0)" - typedef ^ ^ IntKi N - - - "The number of elements in the line" - -typedef ^ ^ IntKi endTypeA - - - "type of connection at end A: 0=pinned to Connection, 1=cantilevered to Rod." - -typedef ^ ^ IntKi endTypeB - - - "type of connection at end B: 0=pinned to Connection, 1=cantilevered to Rod." - +typedef ^ ^ IntKi endTypeA - - - "type of point at end A: 0=pinned to Point, 1=cantilevered to Rod." - +typedef ^ ^ IntKi endTypeB - - - "type of point at end B: 0=pinned to Point, 1=cantilevered to Rod." - typedef ^ ^ DbKi UnstrLen - - - "length of the rod" "[m]" typedef ^ ^ DbKi mass - - - "mass of the rod" "[kg]" typedef ^ ^ DbKi rho - - - "density" "[kg/m3]" @@ -163,8 +164,8 @@ typedef ^ ^ DbKi Cdt - typedef ^ ^ DbKi CdEnd - - - "drag coefficient for rod end" "[-]" typedef ^ ^ DbKi CaEnd - - - "added mass coefficient for rod end" "[-]" typedef ^ ^ DbKi time - - - "current time" "[s]" -typedef ^ ^ DbKi roll - - - "roll relative to vertical" "deg" -typedef ^ ^ DbKi pitch - - - "pitch relative to vertical" "deg" +typedef ^ ^ DbKi roll - - - "roll relative to vertical" "[rad]" +typedef ^ ^ DbKi pitch - - - "pitch relative to vertical" "[rad]" typedef ^ ^ DbKi h0 - - - "submerged length of rod axis, distance along rod centerline from end A to the waterplane (0 <= h0 <= L)" "m" typedef ^ ^ DbKi r {:}{:} - - "node positions" - typedef ^ ^ DbKi rd {:}{:} - - "node velocities" - @@ -205,11 +206,11 @@ typedef ^ ^ IntKi PropsIdNum - typedef ^ ^ IntKi ElasticMod - - - "Which elasticity model to use: {0 basic, 1 viscoelastic, 2 future SYCOM} " - typedef ^ ^ IntKi OutFlagList {20} - - "array specifying what line quantities should be output (1 vs 0)" - typedef ^ ^ IntKi CtrlChan - 0 - "index of control channel that will drive line active tensioning (0 for none)" - -typedef ^ ^ IntKi FairConnect - - - "IdNum of Connection at fairlead" -typedef ^ ^ IntKi AnchConnect - - - "IdNum of Connection at anchor" +typedef ^ ^ IntKi FairPoint - - - "IdNum of Point at fairlead" +typedef ^ ^ IntKi AnchPoint - - - "IdNum of Point at anchor" typedef ^ ^ IntKi N - - - "The number of elements in the line" - -typedef ^ ^ IntKi endTypeA - - - "type of connection at end A: 0=pinned to Connection, 1=cantilevered to Rod." - -typedef ^ ^ IntKi endTypeB - - - "type of connection at end B: 0=pinned to Connection, 1=cantilevered to Rod." - +typedef ^ ^ IntKi endTypeA - - - "type of connection at end A: 0=pinned to Point, 1=cantilevered to Rod." - +typedef ^ ^ IntKi endTypeB - - - "type of connection at end B: 0=pinned to Point, 1=cantilevered to Rod." - typedef ^ ^ DbKi UnstrLen - - - "unstretched length of the line" - typedef ^ ^ DbKi rho - - - "density" "[kg/m3]" typedef ^ ^ DbKi d - - - "volume-equivalent diameter" "[m]" @@ -272,10 +273,12 @@ typedef ^ MD_Fail IntKi IdNum - typedef ^ MD_OutParmType CHARACTER(10) Name - - - "name of output channel" typedef ^ ^ CHARACTER(10) Units - - - "units string" typedef ^ ^ IntKi QType - - - "type of quantity - 0=tension, 1=x, 2=y, 3=z..." -typedef ^ ^ IntKi OType - - - "type of object - 0=line, 1=connect" -typedef ^ ^ IntKi NodeID - - - "node number if OType=0. 0=anchor, -1=N=Fairlead" -typedef ^ ^ IntKi ObjID - - - "number of Connect or Line object" +typedef ^ ^ IntKi OType - - - "type of object - 0=line, 1=point" +typedef ^ ^ IntKi NodeID - - - "node number if OType=0. 0=anchor, -1=whole object" +typedef ^ ^ IntKi ObjID - - - "number of Point or Line object" +## ============================== Visualization data storage for diameter ============================================================================================================================ +typedef ^ VisDiam SiKi Diam {:} - - "Diameter for visualization" - ## ============================== Define Initialization outputs here: ================================================================================================================================ typedef ^ InitOutputType CHARACTER(ChanLen) writeOutputHdr {:} "" - "first line output file contents: output variable names" @@ -309,22 +312,22 @@ typedef ^ OtherStateType SiKi dummy - ## ============================== Define Misc variables here: ===================================================================================================================================== typedef ^ MiscVarType MD_LineProp LineTypeList {:} - - "array of properties for each line type" - typedef ^ ^ MD_RodProp RodTypeList {:} - - "array of properties for each rod type" - -typedef ^ ^ MD_Body GroundBody - - - "the single ground body which is the parent of all stationary connections" - +typedef ^ ^ MD_Body GroundBody - - - "the single ground body which is the parent of all stationary points" - typedef ^ ^ MD_Body BodyList {:} - - "array of body objects" - typedef ^ ^ MD_Rod RodList {:} - - "array of rod objects" - -typedef ^ ^ MD_Connect ConnectList {:} - - "array of connection objects" - +typedef ^ ^ MD_Point PointList {:} - - "array of point objects" - typedef ^ ^ MD_Line LineList {:} - - "array of line objects" - typedef ^ ^ MD_Fail FailList {:} - - "array of line objects" - -typedef ^ ^ IntKi FreeConIs {:} - - "array of free connection indices in ConnectList vector" "" -typedef ^ ^ IntKi CpldConIs {:}{:} - - "array of coupled/fairlead connection indices in ConnectList vector" "" +typedef ^ ^ IntKi FreePointIs {:} - - "array of free point indices in PointList vector" "" +typedef ^ ^ IntKi CpldPointIs {:}{:} - - "array of coupled/fairlead point indices in PointList vector" "" typedef ^ ^ IntKi FreeRodIs {:} - - "array of free rod indices in RodList vector" "" typedef ^ ^ IntKi CpldRodIs {:}{:} - - "array of coupled/fairlead rod indices in RodList vector" "" typedef ^ ^ IntKi FreeBodyIs {:} - - "array of free body indices in BodyList vector" "" typedef ^ ^ IntKi CpldBodyIs {:}{:} - - "array of coupled body indices in BodyList vector" "" typedef ^ ^ IntKi LineStateIs1 {:} - - "starting index of each line's states in state vector" "" typedef ^ ^ IntKi LineStateIsN {:} - - "ending index of each line's states in state vector" "" -typedef ^ ^ IntKi ConStateIs1 {:} - - "starting index of each line's states in state vector" "" -typedef ^ ^ IntKi ConStateIsN {:} - - "ending index of each line's states in state vector" "" +typedef ^ ^ IntKi PointStateIs1 {:} - - "starting index of each point's states in state vector" "" +typedef ^ ^ IntKi PointStateIsN {:} - - "ending index of each point's states in state vector" "" typedef ^ ^ IntKi RodStateIs1 {:} - - "starting index of each rod's states in state vector" "" typedef ^ ^ IntKi RodStateIsN {:} - - "ending index of each rod's states in state vector" "" typedef ^ ^ IntKi BodyStateIs1 {:} - - "starting index of each body's states in state vector" "" @@ -346,8 +349,8 @@ typedef ^ ^ IntKi BathGrid_npoints {:} ## ============================== Parameters ============================================================================================================================================ typedef ^ ParameterType IntKi nLineTypes - 0 - "number of line types" "" typedef ^ ^ IntKi nRodTypes - 0 - "number of rod types" "" -typedef ^ ^ IntKi nConnects - 0 - "number of Connection objects" "" -typedef ^ ^ IntKi nConnectsExtra - 0 - "number of Connection objects including space for extra ones that could arise from line failures" "" +typedef ^ ^ IntKi nPoints - 0 - "number of Point objects" "" +typedef ^ ^ IntKi nPointsExtra - 0 - "number of Point objects including space for extra ones that could arise from line failures" "" typedef ^ ^ IntKi nBodies - 0 - "number of Body objects" "" typedef ^ ^ IntKi nRods - 0 - "number of Rod objects" "" typedef ^ ^ IntKi nLines - 0 - "number of Line objects" "" @@ -355,12 +358,12 @@ typedef ^ ^ IntKi nCtrlChans - typedef ^ ^ IntKi nFails - 0 - "number of failure conditions" "" typedef ^ ^ IntKi nFreeBodies - 0 - "" "" typedef ^ ^ IntKi nFreeRods - 0 - "" "" -typedef ^ ^ IntKi nFreeCons - 0 - "" "" +typedef ^ ^ IntKi nFreePoints - 0 - "" "" typedef ^ ^ IntKi nCpldBodies {:} - - "number of coupled bodies (for FAST.Farm, size>1 with an entry for each turbine)" "" typedef ^ ^ IntKi nCpldRods {:} - - "number of coupled rods (for FAST.Farm, size>1 with an entry for each turbine)" "" -typedef ^ ^ IntKi nCpldCons {:} - - "number of coupled points (for FAST.Farm, size>1 with an entry for each turbine)" "" -typedef ^ ^ IntKi NConns - 0 - "number of Connect type Connections - not to be confused with NConnects" "" -typedef ^ ^ IntKi NAnchs - 0 - "number of Anchor type Connections" "" +typedef ^ ^ IntKi nCpldPoints {:} - - "number of coupled points (for FAST.Farm, size>1 with an entry for each turbine)" "" +typedef ^ ^ IntKi NConns - 0 - "number of Connect type Points - not to be confused with NPoints" "" +typedef ^ ^ IntKi NAnchs - 0 - "number of Anchor type Points" "" typedef ^ ^ DbKi Tmax - - - "simulation duration" "[s]" typedef ^ ^ DbKi g - 9.81 - "gravitational constant (positive)" "[m/s^2]" typedef ^ ^ DbKi rhoW - 1025 - "density of seawater" "[kg/m^3]" @@ -416,6 +419,8 @@ typedef ^ ^ R8Ki dx {:} typedef ^ ^ Integer Jac_ny - - - "number of outputs in jacobian matrix" - typedef ^ ^ Integer Jac_nx - - - "number of continuous states in jacobian matrix" - typedef ^ ^ Integer dxIdx_map2_xStateIdx {:} - - "Mapping array from index of dX array to corresponding state index" - +typedef ^ ^ Logical VisMeshes - - - "Using visualization meshes as requested by glue code" - +typedef ^ ^ VisDiam VisRodsDiam {:} - - "Diameters for visualization of rods" - # ============================== Inputs ============================================================================================================================================ @@ -433,3 +438,7 @@ typedef ^ OutputType MeshType CoupledLoads {:} typedef ^ ^ ReKi WriteOutput {:} - - "output vector returned to glue code" "" # should CoupledLoads be an array? #typedef ^ ^ DbKi rAll {:}{:} - - "Mesh of all point positions: bodies, rods, points, line internal nodes" - +typedef ^ ^ MeshType VisLinesMesh {:} - - "Line2 mesh for visualizing mooring lines" - +typedef ^ ^ MeshType VisRodsMesh {:} - - "Line2 mesh for visualizing mooring rods" - +typedef ^ ^ MeshType VisBodiesMesh {:} - - "Point mesh for visualizing mooring bodies" - +typedef ^ ^ MeshType VisAnchsMesh {:} - - "Point mesh for visualizing mooring anchors" - diff --git a/modules/moordyn/src/MoorDyn_Rod.f90 b/modules/moordyn/src/MoorDyn_Rod.f90 index 1e85e92c7..f186891eb 100644 --- a/modules/moordyn/src/MoorDyn_Rod.f90 +++ b/modules/moordyn/src/MoorDyn_Rod.f90 @@ -42,9 +42,11 @@ MODULE MoorDyn_Rod PUBLIC :: Rod_GetNetForceAndMass PUBLIC :: Rod_AddLine PUBLIC :: Rod_RemoveLine + public :: VisRodsMesh_Init + public :: VisRodsMesh_Update + - CONTAINS @@ -207,7 +209,7 @@ SUBROUTINE Rod_Initialize(Rod, states, m) ! r and rd of ends have already been set by setup function or by parent object <<<<< right? <<<<< - ! Pass kinematics to any attached lines (this is just like what a Connection does, except for both ends) + ! Pass kinematics to any attached lines (this is just like what a Point does, except for both ends) ! so that they have the correct initial positions at this initialization stage. if (Rod%typeNum >- 2) CALL Rod_SetDependentKin(Rod, 0.0_DbKi, m, .TRUE.) ! don't call this for type -2 coupled Rods as it's already been called @@ -357,7 +359,7 @@ SUBROUTINE Rod_SetDependentKin(Rod, t, m, initial) Type(MD_Rod), INTENT(INOUT) :: Rod ! the Rod object Real(DbKi), INTENT(IN ) :: t ! instantaneous time - TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects (for simplicity, since Bodies deal with Rods and Connections) + TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects (for simplicity, since Bodies deal with Rods and Points) LOGICAL, INTENT(IN ) :: initial ! true if this is the call during initialization (in which case avoid calling any Lines yet) INTEGER(IntKi) :: l ! index of segments or nodes along line @@ -390,7 +392,7 @@ SUBROUTINE Rod_SetDependentKin(Rod, t, m, initial) CALL transformKinematicsAtoB(Rod%r6(1:3), Rod%r6(4:6), Rod%UnstrLen, Rod%v6, Rod%r(:,N), Rod%rd(:,N)) ! end B end if - ! pass end node kinematics to any attached lines (this is just like what a Connection does, except for both ends) + ! pass end node kinematics to any attached lines (this is just like what a Point does, except for both ends) DO l=1,Rod%nAttachedA CALL Line_SetEndKinematics(m%LineList(Rod%attachedA(l)), Rod%r(:,0), Rod%rd(:,0), t, Rod%TopA(l)) END DO @@ -424,7 +426,7 @@ SUBROUTINE Rod_SetDependentKin(Rod, t, m, initial) Rod%r6(4:6) = Rod%q ! set orientation angles END IF - ! pass Rod orientation to any attached lines (this is just like what a Connection does, except for both ends) + ! pass Rod orientation to any attached lines (this is just like what a Point does, except for both ends) DO l=1,Rod%nAttachedA CALL Line_SetEndOrientation(m%LineList(Rod%attachedA(l)), Rod%q, Rod%TopA(l), 0) END DO @@ -440,7 +442,7 @@ SUBROUTINE Rod_GetStateDeriv(Rod, Xd, m, p) Type(MD_Rod), INTENT(INOUT) :: Rod ! the Rod object Real(DbKi), INTENT(INOUT) :: Xd(:) ! state derivative vector section for this line - TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects (for simplicity, since Bodies deal with Rods and Connections) + TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! passing along all mooring objects (for simplicity, since Bodies deal with Rods and Points) TYPE(MD_ParameterType),INTENT(IN ) :: p ! Parameters !TYPE(MD_MiscVarType), INTENT(INOUT) :: m ! misc/optimization variables @@ -481,7 +483,7 @@ SUBROUTINE Rod_GetStateDeriv(Rod, Xd, m, p) ! rate of change of unit vector components!! CHECK! <<<<< Xd(10) = - Rod%v6(6)*Rod%r6(5) + Rod%v6(5)*Rod%r6(6) ! i.e. u_dot_x = -omega_z*u_y + omega_y*u_z Xd(11) = Rod%v6(6)*Rod%r6(4) - Rod%v6(4)*Rod%r6(6) ! i.e. u_dot_y = omega_z*u_x - omega_x*u_z - Xd(12) = -Rod%v6(5)*Rod%r6(4) + Rod%v6(4)*Rod%r6(5) ! i.e. u_dot_z = -omega_y*u_x - omega_x*u_y + Xd(12) = -Rod%v6(5)*Rod%r6(4) + Rod%v6(4)*Rod%r6(5) ! i.e. u_dot_z = -omega_y*u_x + omega_x*u_y ! store accelerations in case they're useful as output Rod%a6 = acc @@ -502,7 +504,7 @@ SUBROUTINE Rod_GetStateDeriv(Rod, Xd, m, p) ! rate of change of unit vector components!! CHECK! <<<<< Xd(4) = - Rod%v6(6)*Rod%r6(5) + Rod%v6(5)*Rod%r6(6) ! i.e. u_dot_x = -omega_z*u_y + omega_y*u_z Xd(5) = Rod%v6(6)*Rod%r6(4) - Rod%v6(4)*Rod%r6(6) ! i.e. u_dot_y = omega_z*u_x - omega_x*u_z - Xd(6) = -Rod%v6(5)*Rod%r6(4) + Rod%v6(4)*Rod%r6(5) ! i.e. u_dot_z = -omega_y*u_x - omega_x*u_y + Xd(6) = -Rod%v6(5)*Rod%r6(4) + Rod%v6(4)*Rod%r6(5) ! i.e. u_dot_z = -omega_y*u_x + omega_x*u_y ! store angular accelerations in case they're useful as output Rod%a6(4:6) = acc(4:6) @@ -776,7 +778,7 @@ SUBROUTINE Rod_DoRHS(Rod, m, p) ! fluid acceleration components for current node aq = DOT_PRODUCT(Rod%Ud(:,I), Rod%q) * Rod%q ! tangential component of fluid acceleration ap = Rod%Ud(:,I) - aq ! normal component of fluid acceleration - ! transverse and axial Froude-Krylov force + ! transverse and axial fluid inertia force Rod%Ap(:,I) = VOF * p%rhoW*(1.0+Rod%Can)* v_i * ap ! Rod%Aq(:,I) = 0.0_DbKi ! p%rhoW*(1.0+Rod%Cat)* v_i * aq ! <<< just put a taper-based term here eventually? @@ -827,14 +829,14 @@ SUBROUTINE Rod_DoRHS(Rod, m, p) Rod%Mext = Rod%Mext + (/ Mtemp*sinBeta, -Mtemp*cosBeta, 0.0_DbKi /) ! axial drag - Rod%Dq(:,I) = Rod%Dq(:,I) + VOF * 0.25* Pi*Rod%d*Rod%d * p%rhoW*Rod%CdEnd * MagVq * Vq + Rod%Dq(:,I) = Rod%Dq(:,I) + 0.5 * VOF * 0.25* Pi*Rod%d*Rod%d * p%rhoW*Rod%CdEnd * MagVq * Vq ! >>> what about rotational drag?? <<< eqn will be Pi* Rod%d**4/16.0 omega_rel?^2... *0.5 * Cd... - ! Froud-Krylov force - Rod%Aq(:,I) = Rod%Aq(:,I) + VOF * p%rhoW*(1.0+Rod%CaEnd)* (2.0/3.0*Pi*Rod%d**3 /8.0) * aq + ! long-wave diffraction force + Rod%Aq(:,I) = Rod%Aq(:,I) + VOF * p%rhoW* Rod%CaEnd * (2.0/3.0*Pi*Rod%d**3 /8.0) * aq - ! dynamic pressure force + ! Froude-Krylov force Rod%Pd(:,I) = Rod%Pd(:,I) + VOF * 0.25* Pi*Rod%d*Rod%d * Rod%PDyn(I) * Rod%q ! added mass @@ -857,12 +859,12 @@ SUBROUTINE Rod_DoRHS(Rod, m, p) Rod%Mext = Rod%Mext + (/ Mtemp*sinBeta, -Mtemp*cosBeta, 0.0_DbKi /) ! axial drag - Rod%Dq(:,I) = Rod%Dq(:,I) + VOF * 0.25* Pi*Rod%d*Rod%d * p%rhoW*Rod%CdEnd * MagVq * Vq + Rod%Dq(:,I) = Rod%Dq(:,I) + 0.5 * VOF * 0.25* Pi*Rod%d*Rod%d * p%rhoW*Rod%CdEnd * MagVq * Vq - ! Froud-Krylov force - Rod%Aq(:,I) = Rod%Aq(:,I) + VOF * p%rhoW*(1.0+Rod%CaEnd)* (2.0/3.0*Pi*Rod%d**3 /8.0) * aq + ! long-wave diffraction force + Rod%Aq(:,I) = Rod%Aq(:,I) + VOF * p%rhoW* Rod%CaEnd * (2.0/3.0*Pi*Rod%d**3 /8.0) * aq - ! dynamic pressure force + ! Froud-Krylov force Rod%Pd(:,I) = Rod%Pd(:,I) - VOF * 0.25* Pi*Rod%d*Rod%d * Rod%PDyn(I) * Rod%q ! added mass @@ -958,7 +960,7 @@ SUBROUTINE Rod_DoRHS(Rod, m, p) Imat_l = 0.0_DbKi if (Rod%N > 0) then I_l = 0.125*Rod%mass * Rod%d*Rod%d ! axial moment of inertia - I_r = Rod%mass/12 * (0.75*Rod%d*Rod%d + (Rod%UnstrLen/Rod%N)**2 ) * Rod%N ! summed radial moment of inertia for each segment individually + I_r = Rod%mass * ((Rod%d**2) / 16 - (Rod%UnstrLen**2) / (6 * Rod%N**2)); ! moment of inertia correction term for lumped mass approach Imat_l(1,1) = I_r ! inertia about CG in local orientations (as if Rod is vertical) Imat_l(2,2) = I_r @@ -1069,10 +1071,10 @@ END SUBROUTINE Rod_GetNetForceAndMass !-------------------------------------------------------------- - ! this function handles assigning a line to a connection node + ! this function handles assigning a line to a point node SUBROUTINE Rod_AddLine(Rod, lineID, TopOfLine, endB) - Type(MD_Rod), INTENT (INOUT) :: Rod ! the Connection object + Type(MD_Rod), INTENT (INOUT) :: Rod ! the Point object Integer(IntKi), INTENT( IN ) :: lineID Integer(IntKi), INTENT( IN ) :: TopOfLine @@ -1107,10 +1109,10 @@ SUBROUTINE Rod_AddLine(Rod, lineID, TopOfLine, endB) END SUBROUTINE Rod_AddLine - ! this function handles removing a line from a connection node + ! this function handles removing a line from a point node SUBROUTINE Rod_RemoveLine(Rod, lineID, TopOfLine, endB, rEnd, rdEnd) - Type(MD_Rod), INTENT (INOUT) :: Rod ! the Connection object + Type(MD_Rod), INTENT (INOUT) :: Rod ! the Point object Integer(IntKi), INTENT( IN ) :: lineID Integer(IntKi), INTENT( OUT) :: TopOfLine @@ -1190,5 +1192,102 @@ END SUBROUTINE Rod_RemoveLine + subroutine VisRodsMesh_Init(p,m,y,ErrStat,ErrMsg) + type(MD_ParameterType), intent(inout) :: p + type(MD_MiscVarType), intent(in ) :: m + type(MD_OutputType), intent(inout) :: y + integer(IntKi), intent( out) :: ErrStat + character(*), intent( out) :: ErrMsg + integer(IntKi) :: ErrStat2 + character(ErrMsgLen) :: ErrMsg2 + integer(IntKi) :: i,l + character(*), parameter :: RoutineName = 'VisRodsMesh_Init' + + ErrStat = ErrID_None + ErrMsg = '' + + ! allocate line2 mesh for all lines + allocate (y%VisRodsMesh(p%NRods), STAT=ErrStat2); if (Failed0('visualization mesh for lines')) return + allocate (p%VisRodsDiam(p%NRods), STAT=ErrStat2); if (Failed0('visualization mesh for lines')) return + + ! Initialize mesh for each line (line nodes start at 0 index, so N+1 total nodes) + do l=1,p%NRods + CALL MeshCreate( BlankMesh = y%VisRodsMesh(l), & + NNodes = m%RodList(l)%N+1, & + IOS = COMPONENT_OUTPUT, & + TranslationDisp = .true., & + Orientation = .true., & + ErrStat=ErrStat2, ErrMess=ErrMsg2) + if (Failed()) return + + ! Internal nodes (line nodes start at 0 index) + do i = 0,m%RodList(l)%N + call MeshPositionNode ( y%VisRodsMesh(l), i+1, real(m%RodList(l)%r(:,I),ReKi), ErrStat2, ErrMsg2, Orient=real(m%RodList(l)%OrMat,R8Ki)) + if (Failed()) return + enddo + + ! make elements (line nodes start at 0 index, so N+1 total nodes) + do i = 2,m%RodList(l)%N+1 + call MeshConstructElement ( Mesh = y%VisRodsMesh(l) & + , Xelement = ELEMENT_LINE2 & + , P1 = i-1 & ! node1 number + , P2 = i & ! node2 number + , ErrStat = ErrStat2 & + , ErrMess = ErrMsg2 ) + if (Failed()) return + enddo + + ! Commit mesh + call MeshCommit ( y%VisRodsMesh(l), ErrStat2, ErrMsg2 ) + if (Failed()) return + + ! Set rod diameter for visualization + call AllocAry(p%VisRodsDiam(l)%Diam,m%RodList(l)%N+1,'',ErrStat2,ErrMsg2) + if (Failed()) return + p%VisRodsDiam(l)%Diam=real(m%RodTypeList(m%RodList(l)%PropsIdNum)%d,SiKi) + enddo + contains + logical function Failed() + CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + Failed = ErrStat >= AbortErrLev + end function Failed + + ! check for failed where /= 0 is fatal + logical function Failed0(txt) + character(*), intent(in) :: txt + if (errStat /= 0) then + ErrStat2 = ErrID_Fatal + ErrMsg2 = "Could not allocate "//trim(txt) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + endif + Failed0 = ErrStat >= AbortErrLev + end function Failed0 + end subroutine VisRodsMesh_Init + + + + subroutine VisRodsMesh_Update(p,m,y,ErrStat,ErrMsg) + type(MD_ParameterType), intent(in ) :: p + type(MD_MiscVarType), intent(in ) :: m + type(MD_OutputType), intent(inout) :: y + integer(IntKi), intent( out) :: ErrStat + character(*), intent( out) :: ErrMsg + integer(IntKi) :: i,l + character(*), parameter :: RoutineName = 'VisRodsMesh_Update' + + ErrStat = ErrID_None + ErrMsg = '' + + do l=1,p%NRods + ! Update rod positions/orientations + do i = 0,m%RodList(l)%N + y%VisRodsMesh(l)%TranslationDisp(:,i+1) = real(m%RodList(l)%r(:,I),ReKi) - y%VisRodsMesh(l)%Position(:,i+1) + y%VisRodsMesh(l)%Orientation(:,:,i+1) = real(m%RodList(l)%OrMat,R8Ki) + enddo + enddo + end subroutine VisRodsMesh_Update + + + END MODULE MoorDyn_Rod diff --git a/modules/moordyn/src/MoorDyn_Types.f90 b/modules/moordyn/src/MoorDyn_Types.f90 index aabdec7d8..dc15971c8 100644 --- a/modules/moordyn/src/MoorDyn_Types.f90 +++ b/modules/moordyn/src/MoorDyn_Types.f90 @@ -57,6 +57,7 @@ MODULE MoorDyn_Types LOGICAL :: Echo = .false. !< echo parameter - do we want to echo the header line describing the input file? [-] CHARACTER(ChanLen) , DIMENSION(:), ALLOCATABLE :: OutList !< string containing list of output channels requested in input file [-] LOGICAL :: Linearize = .FALSE. !< Flag that tells this module if the glue code wants to linearize. [-] + LOGICAL :: VisMeshes = .FALSE. !< Glue code requesting visualization meshes [-] END TYPE MD_InitInputType ! ======================= ! ========= MD_LineProp ======= @@ -102,19 +103,19 @@ MODULE MoorDyn_Types ! ======================= ! ========= MD_Body ======= TYPE, PUBLIC :: MD_Body - INTEGER(IntKi) :: IdNum = 0_IntKi !< integer identifier of this Connection [-] - INTEGER(IntKi) :: typeNum = 0_IntKi !< integer identifying the type. 0=fixed, 1=vessel, 2=connect [-] - INTEGER(IntKi) , DIMENSION(1:30) :: AttachedC = 0_IntKi !< list of IdNums of connections attached to this body [-] + INTEGER(IntKi) :: IdNum = 0_IntKi !< integer identifier of this Point [-] + INTEGER(IntKi) :: typeNum = 0_IntKi !< integer identifying the type. 0=free, 1=fixed, -1=vessel [-] + INTEGER(IntKi) , DIMENSION(1:30) :: AttachedC = 0_IntKi !< list of IdNums of points attached to this body [-] INTEGER(IntKi) , DIMENSION(1:30) :: AttachedR = 0_IntKi !< list of IdNums of rods attached to this body [-] - INTEGER(IntKi) :: nAttachedC = 0 !< number of attached connections [-] + INTEGER(IntKi) :: nAttachedC = 0 !< number of attached points [-] INTEGER(IntKi) :: nAttachedR = 0 !< number of attached rods [-] - REAL(DbKi) , DIMENSION(1:3,1:30) :: rConnectRel = 0.0_R8Ki !< relative position of connection on body [-] + REAL(DbKi) , DIMENSION(1:3,1:30) :: rPointRel = 0.0_R8Ki !< relative position of point on body [-] REAL(DbKi) , DIMENSION(1:6,1:30) :: r6RodRel = 0.0_R8Ki !< relative position and orientation of rod on body [-] - REAL(DbKi) :: bodyM = 0.0_R8Ki !< [-] - REAL(DbKi) :: bodyV = 0.0_R8Ki !< [-] - REAL(DbKi) , DIMENSION(1:3) :: bodyI = 0.0_R8Ki !< [-] - REAL(DbKi) , DIMENSION(1:6) :: bodyCdA = 0.0_R8Ki !< product of drag force and frontal area of connection point [[m^2]] - REAL(DbKi) , DIMENSION(1:6) :: bodyCa = 0.0_R8Ki !< added mass coefficient of connection point [-] + REAL(DbKi) :: bodyM = 0.0_R8Ki !< body mass (seperate from attached objects) [[kg]] + REAL(DbKi) :: bodyV = 0.0_R8Ki !< body volume (for buoyancy calculation) [[m^3]] + REAL(DbKi) , DIMENSION(1:3) :: bodyI = 0.0_R8Ki !< body 3x3 inertia matrix diagonals [[kg-m^2]] + REAL(DbKi) , DIMENSION(1:6) :: bodyCdA = 0.0_R8Ki !< product of drag force and frontal area of body [[m^2]] + REAL(DbKi) , DIMENSION(1:6) :: bodyCa = 0.0_R8Ki !< added mass coefficient of body [-] REAL(DbKi) :: time = 0.0_R8Ki !< current time [[s]] REAL(DbKi) , DIMENSION(1:6) :: r6 = 0.0_R8Ki !< position [-] REAL(DbKi) , DIMENSION(1:6) :: v6 = 0.0_R8Ki !< velocity [-] @@ -130,21 +131,21 @@ MODULE MoorDyn_Types REAL(DbKi) , DIMENSION(1:3) :: rCG = 0.0_R8Ki !< vector in body frame from ref point to CG (before rods etc..) [-] END TYPE MD_Body ! ======================= -! ========= MD_Connect ======= - TYPE, PUBLIC :: MD_Connect - INTEGER(IntKi) :: IdNum = 0_IntKi !< integer identifier of this Connection [-] - CHARACTER(10) :: type !< type of Connect: fix, vessel, connect [-] - INTEGER(IntKi) :: typeNum = 0_IntKi !< integer identifying the type. 0=fixed, 1=vessel, 2=connect [-] - INTEGER(IntKi) , DIMENSION(1:10) :: Attached = 0_IntKi !< list of IdNums of lines attached to this connection node [-] +! ========= MD_Point ======= + TYPE, PUBLIC :: MD_Point + INTEGER(IntKi) :: IdNum = 0_IntKi !< integer identifier of this point [-] + CHARACTER(10) :: type !< type of point: fix, vessel, point [-] + INTEGER(IntKi) :: typeNum = 0_IntKi !< integer identifying the type. 1=fixed, -1=vessel, 0=free [-] + INTEGER(IntKi) , DIMENSION(1:10) :: Attached = 0_IntKi !< list of IdNums of lines attached to this point node [-] INTEGER(IntKi) , DIMENSION(1:10) :: Top = 0_IntKi !< list of ints specifying whether each line is attached at 1 = top/fairlead(end B), 0 = bottom/anchor(end A) [-] INTEGER(IntKi) :: nAttached = 0 !< number of attached lines [-] - REAL(DbKi) :: conM = 0.0_R8Ki !< [-] - REAL(DbKi) :: conV = 0.0_R8Ki !< [-] - REAL(DbKi) :: conFX = 0.0_R8Ki !< [-] - REAL(DbKi) :: conFY = 0.0_R8Ki !< [-] - REAL(DbKi) :: conFZ = 0.0_R8Ki !< [-] - REAL(DbKi) :: conCa = 0.0_R8Ki !< added mass coefficient of connection point [-] - REAL(DbKi) :: conCdA = 0.0_R8Ki !< product of drag force and frontal area of connection point [[m^2]] + REAL(DbKi) :: pointM = 0.0_R8Ki !< point mass [[kg]] + REAL(DbKi) :: pointV = 0.0_R8Ki !< point volume [[m^3]] + REAL(DbKi) :: pointFX = 0.0_R8Ki !< [-] + REAL(DbKi) :: pointFY = 0.0_R8Ki !< [-] + REAL(DbKi) :: pointFZ = 0.0_R8Ki !< [-] + REAL(DbKi) :: pointCa = 0.0_R8Ki !< added mass coefficient of point [-] + REAL(DbKi) :: pointCdA = 0.0_R8Ki !< product of drag force and frontal area of point [[m^2]] REAL(DbKi) :: time = 0.0_R8Ki !< current time [[s]] REAL(DbKi) , DIMENSION(1:3) :: r = 0.0_R8Ki !< position [-] REAL(DbKi) , DIMENSION(1:3) :: rd = 0.0_R8Ki !< velocity [-] @@ -155,14 +156,14 @@ MODULE MoorDyn_Types REAL(DbKi) , DIMENSION(:), ALLOCATABLE :: PDyn !< water dynamic pressure at node [[Pa]] REAL(DbKi) , DIMENSION(1:3) :: Fnet = 0.0_R8Ki !< total force on node (excluding inertial loads) [-] REAL(DbKi) , DIMENSION(1:3,1:3) :: M = 0.0_R8Ki !< node mass matrix, from attached lines [-] - END TYPE MD_Connect + END TYPE MD_Point ! ======================= ! ========= MD_Rod ======= TYPE, PUBLIC :: MD_Rod INTEGER(IntKi) :: IdNum = 0_IntKi !< integer identifier of this Line [-] CHARACTER(10) :: type !< type of Rod. should match one of RodProp names [-] INTEGER(IntKi) :: PropsIdNum = 0_IntKi !< the IdNum of the associated rod properties [-] - INTEGER(IntKi) :: typeNum = 0_IntKi !< integer identifying the type. 0=fixed, 1=vessel, 2=connect [-] + INTEGER(IntKi) :: typeNum = 0_IntKi !< integer identifying the type. 0=fixed, 1=vessel, 2=point [-] INTEGER(IntKi) , DIMENSION(1:10) :: AttachedA = 0_IntKi !< list of IdNums of lines attached to end A [-] INTEGER(IntKi) , DIMENSION(1:10) :: AttachedB = 0_IntKi !< list of IdNums of lines attached to end B [-] INTEGER(IntKi) , DIMENSION(1:10) :: TopA = 0_IntKi !< list of ints specifying whether each line is attached at 1 = top/fairlead(end B), 0 = bottom/anchor(end A) [-] @@ -171,8 +172,8 @@ MODULE MoorDyn_Types INTEGER(IntKi) :: nAttachedB = 0 !< number of attached lines to Rod end B [-] INTEGER(IntKi) , DIMENSION(1:20) :: OutFlagList = 0_IntKi !< array specifying what line quantities should be output (1 vs 0) [-] INTEGER(IntKi) :: N = 0_IntKi !< The number of elements in the line [-] - INTEGER(IntKi) :: endTypeA = 0_IntKi !< type of connection at end A: 0=pinned to Connection, 1=cantilevered to Rod. [-] - INTEGER(IntKi) :: endTypeB = 0_IntKi !< type of connection at end B: 0=pinned to Connection, 1=cantilevered to Rod. [-] + INTEGER(IntKi) :: endTypeA = 0_IntKi !< type of point at end A: 0=pinned to Point, 1=cantilevered to Rod. [-] + INTEGER(IntKi) :: endTypeB = 0_IntKi !< type of point at end B: 0=pinned to Point, 1=cantilevered to Rod. [-] REAL(DbKi) :: UnstrLen = 0.0_R8Ki !< length of the rod [[m]] REAL(DbKi) :: mass = 0.0_R8Ki !< mass of the rod [[kg]] REAL(DbKi) :: rho = 0.0_R8Ki !< density [[kg/m3]] @@ -184,8 +185,8 @@ MODULE MoorDyn_Types REAL(DbKi) :: CdEnd = 0.0_R8Ki !< drag coefficient for rod end [[-]] REAL(DbKi) :: CaEnd = 0.0_R8Ki !< added mass coefficient for rod end [[-]] REAL(DbKi) :: time = 0.0_R8Ki !< current time [[s]] - REAL(DbKi) :: roll = 0.0_R8Ki !< roll relative to vertical [deg] - REAL(DbKi) :: pitch = 0.0_R8Ki !< pitch relative to vertical [deg] + REAL(DbKi) :: roll = 0.0_R8Ki !< roll relative to vertical [[rad]] + REAL(DbKi) :: pitch = 0.0_R8Ki !< pitch relative to vertical [[rad]] REAL(DbKi) :: h0 = 0.0_R8Ki !< submerged length of rod axis, distance along rod centerline from end A to the waterplane (0 <= h0 <= L) [m] REAL(DbKi) , DIMENSION(:,:), ALLOCATABLE :: r !< node positions [-] REAL(DbKi) , DIMENSION(:,:), ALLOCATABLE :: rd !< node velocities [-] @@ -226,11 +227,11 @@ MODULE MoorDyn_Types INTEGER(IntKi) :: ElasticMod = 0_IntKi !< Which elasticity model to use: {0 basic, 1 viscoelastic, 2 future SYCOM} [-] INTEGER(IntKi) , DIMENSION(1:20) :: OutFlagList = 0_IntKi !< array specifying what line quantities should be output (1 vs 0) [-] INTEGER(IntKi) :: CtrlChan = 0 !< index of control channel that will drive line active tensioning (0 for none) [-] - INTEGER(IntKi) :: FairConnect = 0_IntKi !< IdNum of Connection at fairlead [-] - INTEGER(IntKi) :: AnchConnect = 0_IntKi !< IdNum of Connection at anchor [-] + INTEGER(IntKi) :: FairPoint = 0_IntKi !< IdNum of Point at fairlead [-] + INTEGER(IntKi) :: AnchPoint = 0_IntKi !< IdNum of Point at anchor [-] INTEGER(IntKi) :: N = 0_IntKi !< The number of elements in the line [-] - INTEGER(IntKi) :: endTypeA = 0_IntKi !< type of connection at end A: 0=pinned to Connection, 1=cantilevered to Rod. [-] - INTEGER(IntKi) :: endTypeB = 0_IntKi !< type of connection at end B: 0=pinned to Connection, 1=cantilevered to Rod. [-] + INTEGER(IntKi) :: endTypeA = 0_IntKi !< type of connection at end A: 0=pinned to Point, 1=cantilevered to Rod. [-] + INTEGER(IntKi) :: endTypeB = 0_IntKi !< type of connection at end B: 0=pinned to Point, 1=cantilevered to Rod. [-] REAL(DbKi) :: UnstrLen = 0.0_R8Ki !< unstretched length of the line [-] REAL(DbKi) :: rho = 0.0_R8Ki !< density [[kg/m3]] REAL(DbKi) :: d = 0.0_R8Ki !< volume-equivalent diameter [[m]] @@ -296,11 +297,16 @@ MODULE MoorDyn_Types CHARACTER(10) :: Name !< name of output channel [-] CHARACTER(10) :: Units !< units string [-] INTEGER(IntKi) :: QType = 0_IntKi !< type of quantity - 0=tension, 1=x, 2=y, 3=z... [-] - INTEGER(IntKi) :: OType = 0_IntKi !< type of object - 0=line, 1=connect [-] - INTEGER(IntKi) :: NodeID = 0_IntKi !< node number if OType=0. 0=anchor, -1=N=Fairlead [-] - INTEGER(IntKi) :: ObjID = 0_IntKi !< number of Connect or Line object [-] + INTEGER(IntKi) :: OType = 0_IntKi !< type of object - 0=line, 1=point [-] + INTEGER(IntKi) :: NodeID = 0_IntKi !< node number if OType=0. 0=anchor, -1=whole object [-] + INTEGER(IntKi) :: ObjID = 0_IntKi !< number of Point or Line object [-] END TYPE MD_OutParmType ! ======================= +! ========= VisDiam ======= + TYPE, PUBLIC :: VisDiam + REAL(SiKi) , DIMENSION(:), ALLOCATABLE :: Diam !< Diameter for visualization [-] + END TYPE VisDiam +! ======================= ! ========= MD_InitOutputType ======= TYPE, PUBLIC :: MD_InitOutputType CHARACTER(ChanLen) , DIMENSION(:), ALLOCATABLE :: writeOutputHdr !< first line output file contents: output variable names [-] @@ -341,22 +347,22 @@ MODULE MoorDyn_Types TYPE, PUBLIC :: MD_MiscVarType TYPE(MD_LineProp) , DIMENSION(:), ALLOCATABLE :: LineTypeList !< array of properties for each line type [-] TYPE(MD_RodProp) , DIMENSION(:), ALLOCATABLE :: RodTypeList !< array of properties for each rod type [-] - TYPE(MD_Body) :: GroundBody !< the single ground body which is the parent of all stationary connections [-] + TYPE(MD_Body) :: GroundBody !< the single ground body which is the parent of all stationary points [-] TYPE(MD_Body) , DIMENSION(:), ALLOCATABLE :: BodyList !< array of body objects [-] TYPE(MD_Rod) , DIMENSION(:), ALLOCATABLE :: RodList !< array of rod objects [-] - TYPE(MD_Connect) , DIMENSION(:), ALLOCATABLE :: ConnectList !< array of connection objects [-] + TYPE(MD_Point) , DIMENSION(:), ALLOCATABLE :: PointList !< array of point objects [-] TYPE(MD_Line) , DIMENSION(:), ALLOCATABLE :: LineList !< array of line objects [-] TYPE(MD_Fail) , DIMENSION(:), ALLOCATABLE :: FailList !< array of line objects [-] - INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: FreeConIs !< array of free connection indices in ConnectList vector [] - INTEGER(IntKi) , DIMENSION(:,:), ALLOCATABLE :: CpldConIs !< array of coupled/fairlead connection indices in ConnectList vector [] + INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: FreePointIs !< array of free point indices in PointList vector [] + INTEGER(IntKi) , DIMENSION(:,:), ALLOCATABLE :: CpldPointIs !< array of coupled/fairlead point indices in PointList vector [] INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: FreeRodIs !< array of free rod indices in RodList vector [] INTEGER(IntKi) , DIMENSION(:,:), ALLOCATABLE :: CpldRodIs !< array of coupled/fairlead rod indices in RodList vector [] INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: FreeBodyIs !< array of free body indices in BodyList vector [] INTEGER(IntKi) , DIMENSION(:,:), ALLOCATABLE :: CpldBodyIs !< array of coupled body indices in BodyList vector [] INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: LineStateIs1 !< starting index of each line's states in state vector [] INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: LineStateIsN !< ending index of each line's states in state vector [] - INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: ConStateIs1 !< starting index of each line's states in state vector [] - INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: ConStateIsN !< ending index of each line's states in state vector [] + INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: PointStateIs1 !< starting index of each point's states in state vector [] + INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: PointStateIsN !< ending index of each point's states in state vector [] INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: RodStateIs1 !< starting index of each rod's states in state vector [] INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: RodStateIsN !< ending index of each rod's states in state vector [] INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: BodyStateIs1 !< starting index of each body's states in state vector [] @@ -379,8 +385,8 @@ MODULE MoorDyn_Types TYPE, PUBLIC :: MD_ParameterType INTEGER(IntKi) :: nLineTypes = 0 !< number of line types [] INTEGER(IntKi) :: nRodTypes = 0 !< number of rod types [] - INTEGER(IntKi) :: nConnects = 0 !< number of Connection objects [] - INTEGER(IntKi) :: nConnectsExtra = 0 !< number of Connection objects including space for extra ones that could arise from line failures [] + INTEGER(IntKi) :: nPoints = 0 !< number of Point objects [] + INTEGER(IntKi) :: nPointsExtra = 0 !< number of Point objects including space for extra ones that could arise from line failures [] INTEGER(IntKi) :: nBodies = 0 !< number of Body objects [] INTEGER(IntKi) :: nRods = 0 !< number of Rod objects [] INTEGER(IntKi) :: nLines = 0 !< number of Line objects [] @@ -388,12 +394,12 @@ MODULE MoorDyn_Types INTEGER(IntKi) :: nFails = 0 !< number of failure conditions [] INTEGER(IntKi) :: nFreeBodies = 0 !< [] INTEGER(IntKi) :: nFreeRods = 0 !< [] - INTEGER(IntKi) :: nFreeCons = 0 !< [] + INTEGER(IntKi) :: nFreePoints = 0 !< [] INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: nCpldBodies !< number of coupled bodies (for FAST.Farm, size>1 with an entry for each turbine) [] INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: nCpldRods !< number of coupled rods (for FAST.Farm, size>1 with an entry for each turbine) [] - INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: nCpldCons !< number of coupled points (for FAST.Farm, size>1 with an entry for each turbine) [] - INTEGER(IntKi) :: NConns = 0 !< number of Connect type Connections - not to be confused with NConnects [] - INTEGER(IntKi) :: NAnchs = 0 !< number of Anchor type Connections [] + INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: nCpldPoints !< number of coupled points (for FAST.Farm, size>1 with an entry for each turbine) [] + INTEGER(IntKi) :: NConns = 0 !< number of Connect type Points - not to be confused with NPoints [] + INTEGER(IntKi) :: NAnchs = 0 !< number of Anchor type Points [] REAL(DbKi) :: Tmax = 0.0_R8Ki !< simulation duration [[s]] REAL(DbKi) :: g = 9.81 !< gravitational constant (positive) [[m/s^2]] REAL(DbKi) :: rhoW = 1025 !< density of seawater [[kg/m^3]] @@ -446,6 +452,8 @@ MODULE MoorDyn_Types INTEGER(IntKi) :: Jac_ny = 0_IntKi !< number of outputs in jacobian matrix [-] INTEGER(IntKi) :: Jac_nx = 0_IntKi !< number of continuous states in jacobian matrix [-] INTEGER(IntKi) , DIMENSION(:), ALLOCATABLE :: dxIdx_map2_xStateIdx !< Mapping array from index of dX array to corresponding state index [-] + LOGICAL :: VisMeshes = .false. !< Using visualization meshes as requested by glue code [-] + TYPE(VisDiam) , DIMENSION(:), ALLOCATABLE :: VisRodsDiam !< Diameters for visualization of rods [-] END TYPE MD_ParameterType ! ======================= ! ========= MD_InputType ======= @@ -459,6 +467,10 @@ MODULE MoorDyn_Types TYPE, PUBLIC :: MD_OutputType TYPE(MeshType) , DIMENSION(:), ALLOCATABLE :: CoupledLoads !< array of point meshes for mooring reaction forces (and moments) at coupling points [[N]] REAL(ReKi) , DIMENSION(:), ALLOCATABLE :: WriteOutput !< output vector returned to glue code [] + TYPE(MeshType) , DIMENSION(:), ALLOCATABLE :: VisLinesMesh !< Line2 mesh for visualizing mooring lines [-] + TYPE(MeshType) , DIMENSION(:), ALLOCATABLE :: VisRodsMesh !< Line2 mesh for visualizing mooring rods [-] + TYPE(MeshType) , DIMENSION(:), ALLOCATABLE :: VisBodiesMesh !< Point mesh for visualizing mooring bodies [-] + TYPE(MeshType) , DIMENSION(:), ALLOCATABLE :: VisAnchsMesh !< Point mesh for visualizing mooring anchors [-] END TYPE MD_OutputType ! ======================= CONTAINS @@ -575,6 +587,7 @@ subroutine MD_CopyInitInput(SrcInitInputData, DstInitInputData, CtrlCode, ErrSta DstInitInputData%OutList = SrcInitInputData%OutList end if DstInitInputData%Linearize = SrcInitInputData%Linearize + DstInitInputData%VisMeshes = SrcInitInputData%VisMeshes end subroutine subroutine MD_DestroyInitInput(InitInputData, ErrStat, ErrMsg) @@ -630,6 +643,7 @@ subroutine MD_PackInitInput(Buf, Indata) call RegPack(Buf, InData%OutList) end if call RegPack(Buf, InData%Linearize) + call RegPack(Buf, InData%VisMeshes) if (RegCheckErr(Buf, RoutineName)) return end subroutine @@ -704,6 +718,8 @@ subroutine MD_UnPackInitInput(Buf, OutData) end if call RegUnpack(Buf, OutData%Linearize) if (RegCheckErr(Buf, RoutineName)) return + call RegUnpack(Buf, OutData%VisMeshes) + if (RegCheckErr(Buf, RoutineName)) return end subroutine subroutine MD_CopyLineProp(SrcLinePropData, DstLinePropData, CtrlCode, ErrStat, ErrMsg) @@ -923,7 +939,7 @@ subroutine MD_CopyBody(SrcBodyData, DstBodyData, CtrlCode, ErrStat, ErrMsg) DstBodyData%AttachedR = SrcBodyData%AttachedR DstBodyData%nAttachedC = SrcBodyData%nAttachedC DstBodyData%nAttachedR = SrcBodyData%nAttachedR - DstBodyData%rConnectRel = SrcBodyData%rConnectRel + DstBodyData%rPointRel = SrcBodyData%rPointRel DstBodyData%r6RodRel = SrcBodyData%r6RodRel DstBodyData%bodyM = SrcBodyData%bodyM DstBodyData%bodyV = SrcBodyData%bodyV @@ -965,7 +981,7 @@ subroutine MD_PackBody(Buf, Indata) call RegPack(Buf, InData%AttachedR) call RegPack(Buf, InData%nAttachedC) call RegPack(Buf, InData%nAttachedR) - call RegPack(Buf, InData%rConnectRel) + call RegPack(Buf, InData%rPointRel) call RegPack(Buf, InData%r6RodRel) call RegPack(Buf, InData%bodyM) call RegPack(Buf, InData%bodyV) @@ -1005,7 +1021,7 @@ subroutine MD_UnPackBody(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%nAttachedR) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%rConnectRel) + call RegUnpack(Buf, OutData%rPointRel) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%r6RodRel) if (RegCheckErr(Buf, RoutineName)) return @@ -1047,69 +1063,69 @@ subroutine MD_UnPackBody(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return end subroutine -subroutine MD_CopyConnect(SrcConnectData, DstConnectData, CtrlCode, ErrStat, ErrMsg) - type(MD_Connect), intent(in) :: SrcConnectData - type(MD_Connect), intent(inout) :: DstConnectData +subroutine MD_CopyPoint(SrcPointData, DstPointData, CtrlCode, ErrStat, ErrMsg) + type(MD_Point), intent(in) :: SrcPointData + type(MD_Point), intent(inout) :: DstPointData integer(IntKi), intent(in ) :: CtrlCode integer(IntKi), intent( out) :: ErrStat character(*), intent( out) :: ErrMsg integer(IntKi) :: LB(2), UB(2) integer(IntKi) :: ErrStat2 - character(*), parameter :: RoutineName = 'MD_CopyConnect' + character(*), parameter :: RoutineName = 'MD_CopyPoint' ErrStat = ErrID_None ErrMsg = '' - DstConnectData%IdNum = SrcConnectData%IdNum - DstConnectData%type = SrcConnectData%type - DstConnectData%typeNum = SrcConnectData%typeNum - DstConnectData%Attached = SrcConnectData%Attached - DstConnectData%Top = SrcConnectData%Top - DstConnectData%nAttached = SrcConnectData%nAttached - DstConnectData%conM = SrcConnectData%conM - DstConnectData%conV = SrcConnectData%conV - DstConnectData%conFX = SrcConnectData%conFX - DstConnectData%conFY = SrcConnectData%conFY - DstConnectData%conFZ = SrcConnectData%conFZ - DstConnectData%conCa = SrcConnectData%conCa - DstConnectData%conCdA = SrcConnectData%conCdA - DstConnectData%time = SrcConnectData%time - DstConnectData%r = SrcConnectData%r - DstConnectData%rd = SrcConnectData%rd - DstConnectData%a = SrcConnectData%a - DstConnectData%U = SrcConnectData%U - DstConnectData%Ud = SrcConnectData%Ud - DstConnectData%zeta = SrcConnectData%zeta - if (allocated(SrcConnectData%PDyn)) then - LB(1:1) = lbound(SrcConnectData%PDyn) - UB(1:1) = ubound(SrcConnectData%PDyn) - if (.not. allocated(DstConnectData%PDyn)) then - allocate(DstConnectData%PDyn(LB(1):UB(1)), stat=ErrStat2) + DstPointData%IdNum = SrcPointData%IdNum + DstPointData%type = SrcPointData%type + DstPointData%typeNum = SrcPointData%typeNum + DstPointData%Attached = SrcPointData%Attached + DstPointData%Top = SrcPointData%Top + DstPointData%nAttached = SrcPointData%nAttached + DstPointData%pointM = SrcPointData%pointM + DstPointData%pointV = SrcPointData%pointV + DstPointData%pointFX = SrcPointData%pointFX + DstPointData%pointFY = SrcPointData%pointFY + DstPointData%pointFZ = SrcPointData%pointFZ + DstPointData%pointCa = SrcPointData%pointCa + DstPointData%pointCdA = SrcPointData%pointCdA + DstPointData%time = SrcPointData%time + DstPointData%r = SrcPointData%r + DstPointData%rd = SrcPointData%rd + DstPointData%a = SrcPointData%a + DstPointData%U = SrcPointData%U + DstPointData%Ud = SrcPointData%Ud + DstPointData%zeta = SrcPointData%zeta + if (allocated(SrcPointData%PDyn)) then + LB(1:1) = lbound(SrcPointData%PDyn) + UB(1:1) = ubound(SrcPointData%PDyn) + if (.not. allocated(DstPointData%PDyn)) then + allocate(DstPointData%PDyn(LB(1):UB(1)), stat=ErrStat2) if (ErrStat2 /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating DstConnectData%PDyn.', ErrStat, ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating DstPointData%PDyn.', ErrStat, ErrMsg, RoutineName) return end if end if - DstConnectData%PDyn = SrcConnectData%PDyn + DstPointData%PDyn = SrcPointData%PDyn end if - DstConnectData%Fnet = SrcConnectData%Fnet - DstConnectData%M = SrcConnectData%M + DstPointData%Fnet = SrcPointData%Fnet + DstPointData%M = SrcPointData%M end subroutine -subroutine MD_DestroyConnect(ConnectData, ErrStat, ErrMsg) - type(MD_Connect), intent(inout) :: ConnectData +subroutine MD_DestroyPoint(PointData, ErrStat, ErrMsg) + type(MD_Point), intent(inout) :: PointData integer(IntKi), intent( out) :: ErrStat character(*), intent( out) :: ErrMsg - character(*), parameter :: RoutineName = 'MD_DestroyConnect' + character(*), parameter :: RoutineName = 'MD_DestroyPoint' ErrStat = ErrID_None ErrMsg = '' - if (allocated(ConnectData%PDyn)) then - deallocate(ConnectData%PDyn) + if (allocated(PointData%PDyn)) then + deallocate(PointData%PDyn) end if end subroutine -subroutine MD_PackConnect(Buf, Indata) +subroutine MD_PackPoint(Buf, Indata) type(PackBuffer), intent(inout) :: Buf - type(MD_Connect), intent(in) :: InData - character(*), parameter :: RoutineName = 'MD_PackConnect' + type(MD_Point), intent(in) :: InData + character(*), parameter :: RoutineName = 'MD_PackPoint' if (Buf%ErrStat >= AbortErrLev) return call RegPack(Buf, InData%IdNum) call RegPack(Buf, InData%type) @@ -1117,13 +1133,13 @@ subroutine MD_PackConnect(Buf, Indata) call RegPack(Buf, InData%Attached) call RegPack(Buf, InData%Top) call RegPack(Buf, InData%nAttached) - call RegPack(Buf, InData%conM) - call RegPack(Buf, InData%conV) - call RegPack(Buf, InData%conFX) - call RegPack(Buf, InData%conFY) - call RegPack(Buf, InData%conFZ) - call RegPack(Buf, InData%conCa) - call RegPack(Buf, InData%conCdA) + call RegPack(Buf, InData%pointM) + call RegPack(Buf, InData%pointV) + call RegPack(Buf, InData%pointFX) + call RegPack(Buf, InData%pointFY) + call RegPack(Buf, InData%pointFZ) + call RegPack(Buf, InData%pointCa) + call RegPack(Buf, InData%pointCdA) call RegPack(Buf, InData%time) call RegPack(Buf, InData%r) call RegPack(Buf, InData%rd) @@ -1141,10 +1157,10 @@ subroutine MD_PackConnect(Buf, Indata) if (RegCheckErr(Buf, RoutineName)) return end subroutine -subroutine MD_UnPackConnect(Buf, OutData) +subroutine MD_UnPackPoint(Buf, OutData) type(PackBuffer), intent(inout) :: Buf - type(MD_Connect), intent(inout) :: OutData - character(*), parameter :: RoutineName = 'MD_UnPackConnect' + type(MD_Point), intent(inout) :: OutData + character(*), parameter :: RoutineName = 'MD_UnPackPoint' integer(IntKi) :: LB(2), UB(2) integer(IntKi) :: stat logical :: IsAllocAssoc @@ -1161,19 +1177,19 @@ subroutine MD_UnPackConnect(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%nAttached) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%conM) + call RegUnpack(Buf, OutData%pointM) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%conV) + call RegUnpack(Buf, OutData%pointV) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%conFX) + call RegUnpack(Buf, OutData%pointFX) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%conFY) + call RegUnpack(Buf, OutData%pointFY) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%conFZ) + call RegUnpack(Buf, OutData%pointFZ) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%conCa) + call RegUnpack(Buf, OutData%pointCa) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%conCdA) + call RegUnpack(Buf, OutData%pointCdA) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%time) if (RegCheckErr(Buf, RoutineName)) return @@ -2067,8 +2083,8 @@ subroutine MD_CopyLine(SrcLineData, DstLineData, CtrlCode, ErrStat, ErrMsg) DstLineData%ElasticMod = SrcLineData%ElasticMod DstLineData%OutFlagList = SrcLineData%OutFlagList DstLineData%CtrlChan = SrcLineData%CtrlChan - DstLineData%FairConnect = SrcLineData%FairConnect - DstLineData%AnchConnect = SrcLineData%AnchConnect + DstLineData%FairPoint = SrcLineData%FairPoint + DstLineData%AnchPoint = SrcLineData%AnchPoint DstLineData%N = SrcLineData%N DstLineData%endTypeA = SrcLineData%endTypeA DstLineData%endTypeB = SrcLineData%endTypeB @@ -2538,8 +2554,8 @@ subroutine MD_PackLine(Buf, Indata) call RegPack(Buf, InData%ElasticMod) call RegPack(Buf, InData%OutFlagList) call RegPack(Buf, InData%CtrlChan) - call RegPack(Buf, InData%FairConnect) - call RegPack(Buf, InData%AnchConnect) + call RegPack(Buf, InData%FairPoint) + call RegPack(Buf, InData%AnchPoint) call RegPack(Buf, InData%N) call RegPack(Buf, InData%endTypeA) call RegPack(Buf, InData%endTypeB) @@ -2729,9 +2745,9 @@ subroutine MD_UnPackLine(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%CtrlChan) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%FairConnect) + call RegUnpack(Buf, OutData%FairPoint) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%AnchConnect) + call RegUnpack(Buf, OutData%AnchPoint) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%N) if (RegCheckErr(Buf, RoutineName)) return @@ -3281,6 +3297,80 @@ subroutine MD_UnPackOutParmType(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return end subroutine +subroutine MD_CopyVisDiam(SrcVisDiamData, DstVisDiamData, CtrlCode, ErrStat, ErrMsg) + type(VisDiam), intent(in) :: SrcVisDiamData + type(VisDiam), intent(inout) :: DstVisDiamData + integer(IntKi), intent(in ) :: CtrlCode + integer(IntKi), intent( out) :: ErrStat + character(*), intent( out) :: ErrMsg + integer(IntKi) :: LB(1), UB(1) + integer(IntKi) :: ErrStat2 + character(*), parameter :: RoutineName = 'MD_CopyVisDiam' + ErrStat = ErrID_None + ErrMsg = '' + if (allocated(SrcVisDiamData%Diam)) then + LB(1:1) = lbound(SrcVisDiamData%Diam) + UB(1:1) = ubound(SrcVisDiamData%Diam) + if (.not. allocated(DstVisDiamData%Diam)) then + allocate(DstVisDiamData%Diam(LB(1):UB(1)), stat=ErrStat2) + if (ErrStat2 /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating DstVisDiamData%Diam.', ErrStat, ErrMsg, RoutineName) + return + end if + end if + DstVisDiamData%Diam = SrcVisDiamData%Diam + end if +end subroutine + +subroutine MD_DestroyVisDiam(VisDiamData, ErrStat, ErrMsg) + type(VisDiam), intent(inout) :: VisDiamData + integer(IntKi), intent( out) :: ErrStat + character(*), intent( out) :: ErrMsg + character(*), parameter :: RoutineName = 'MD_DestroyVisDiam' + ErrStat = ErrID_None + ErrMsg = '' + if (allocated(VisDiamData%Diam)) then + deallocate(VisDiamData%Diam) + end if +end subroutine + +subroutine MD_PackVisDiam(Buf, Indata) + type(PackBuffer), intent(inout) :: Buf + type(VisDiam), intent(in) :: InData + character(*), parameter :: RoutineName = 'MD_PackVisDiam' + if (Buf%ErrStat >= AbortErrLev) return + call RegPack(Buf, allocated(InData%Diam)) + if (allocated(InData%Diam)) then + call RegPackBounds(Buf, 1, lbound(InData%Diam), ubound(InData%Diam)) + call RegPack(Buf, InData%Diam) + end if + if (RegCheckErr(Buf, RoutineName)) return +end subroutine + +subroutine MD_UnPackVisDiam(Buf, OutData) + type(PackBuffer), intent(inout) :: Buf + type(VisDiam), intent(inout) :: OutData + character(*), parameter :: RoutineName = 'MD_UnPackVisDiam' + integer(IntKi) :: LB(1), UB(1) + integer(IntKi) :: stat + logical :: IsAllocAssoc + if (Buf%ErrStat /= ErrID_None) return + if (allocated(OutData%Diam)) deallocate(OutData%Diam) + call RegUnpack(Buf, IsAllocAssoc) + if (RegCheckErr(Buf, RoutineName)) return + if (IsAllocAssoc) then + call RegUnpackBounds(Buf, 1, LB, UB) + if (RegCheckErr(Buf, RoutineName)) return + allocate(OutData%Diam(LB(1):UB(1)),stat=stat) + if (stat /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%Diam.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + return + end if + call RegUnpack(Buf, OutData%Diam) + if (RegCheckErr(Buf, RoutineName)) return + end if +end subroutine + subroutine MD_CopyInitOutput(SrcInitOutputData, DstInitOutputData, CtrlCode, ErrStat, ErrMsg) type(MD_InitOutputType), intent(in) :: SrcInitOutputData type(MD_InitOutputType), intent(inout) :: DstInitOutputData @@ -3976,18 +4066,18 @@ subroutine MD_CopyMisc(SrcMiscData, DstMiscData, CtrlCode, ErrStat, ErrMsg) if (ErrStat >= AbortErrLev) return end do end if - if (allocated(SrcMiscData%ConnectList)) then - LB(1:1) = lbound(SrcMiscData%ConnectList) - UB(1:1) = ubound(SrcMiscData%ConnectList) - if (.not. allocated(DstMiscData%ConnectList)) then - allocate(DstMiscData%ConnectList(LB(1):UB(1)), stat=ErrStat2) + if (allocated(SrcMiscData%PointList)) then + LB(1:1) = lbound(SrcMiscData%PointList) + UB(1:1) = ubound(SrcMiscData%PointList) + if (.not. allocated(DstMiscData%PointList)) then + allocate(DstMiscData%PointList(LB(1):UB(1)), stat=ErrStat2) if (ErrStat2 /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating DstMiscData%ConnectList.', ErrStat, ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating DstMiscData%PointList.', ErrStat, ErrMsg, RoutineName) return end if end if do i1 = LB(1), UB(1) - call MD_CopyConnect(SrcMiscData%ConnectList(i1), DstMiscData%ConnectList(i1), CtrlCode, ErrStat2, ErrMsg2) + call MD_CopyPoint(SrcMiscData%PointList(i1), DstMiscData%PointList(i1), CtrlCode, ErrStat2, ErrMsg2) call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) if (ErrStat >= AbortErrLev) return end do @@ -4024,29 +4114,29 @@ subroutine MD_CopyMisc(SrcMiscData, DstMiscData, CtrlCode, ErrStat, ErrMsg) if (ErrStat >= AbortErrLev) return end do end if - if (allocated(SrcMiscData%FreeConIs)) then - LB(1:1) = lbound(SrcMiscData%FreeConIs) - UB(1:1) = ubound(SrcMiscData%FreeConIs) - if (.not. allocated(DstMiscData%FreeConIs)) then - allocate(DstMiscData%FreeConIs(LB(1):UB(1)), stat=ErrStat2) + if (allocated(SrcMiscData%FreePointIs)) then + LB(1:1) = lbound(SrcMiscData%FreePointIs) + UB(1:1) = ubound(SrcMiscData%FreePointIs) + if (.not. allocated(DstMiscData%FreePointIs)) then + allocate(DstMiscData%FreePointIs(LB(1):UB(1)), stat=ErrStat2) if (ErrStat2 /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating DstMiscData%FreeConIs.', ErrStat, ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating DstMiscData%FreePointIs.', ErrStat, ErrMsg, RoutineName) return end if end if - DstMiscData%FreeConIs = SrcMiscData%FreeConIs + DstMiscData%FreePointIs = SrcMiscData%FreePointIs end if - if (allocated(SrcMiscData%CpldConIs)) then - LB(1:2) = lbound(SrcMiscData%CpldConIs) - UB(1:2) = ubound(SrcMiscData%CpldConIs) - if (.not. allocated(DstMiscData%CpldConIs)) then - allocate(DstMiscData%CpldConIs(LB(1):UB(1),LB(2):UB(2)), stat=ErrStat2) + if (allocated(SrcMiscData%CpldPointIs)) then + LB(1:2) = lbound(SrcMiscData%CpldPointIs) + UB(1:2) = ubound(SrcMiscData%CpldPointIs) + if (.not. allocated(DstMiscData%CpldPointIs)) then + allocate(DstMiscData%CpldPointIs(LB(1):UB(1),LB(2):UB(2)), stat=ErrStat2) if (ErrStat2 /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating DstMiscData%CpldConIs.', ErrStat, ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating DstMiscData%CpldPointIs.', ErrStat, ErrMsg, RoutineName) return end if end if - DstMiscData%CpldConIs = SrcMiscData%CpldConIs + DstMiscData%CpldPointIs = SrcMiscData%CpldPointIs end if if (allocated(SrcMiscData%FreeRodIs)) then LB(1:1) = lbound(SrcMiscData%FreeRodIs) @@ -4120,29 +4210,29 @@ subroutine MD_CopyMisc(SrcMiscData, DstMiscData, CtrlCode, ErrStat, ErrMsg) end if DstMiscData%LineStateIsN = SrcMiscData%LineStateIsN end if - if (allocated(SrcMiscData%ConStateIs1)) then - LB(1:1) = lbound(SrcMiscData%ConStateIs1) - UB(1:1) = ubound(SrcMiscData%ConStateIs1) - if (.not. allocated(DstMiscData%ConStateIs1)) then - allocate(DstMiscData%ConStateIs1(LB(1):UB(1)), stat=ErrStat2) + if (allocated(SrcMiscData%PointStateIs1)) then + LB(1:1) = lbound(SrcMiscData%PointStateIs1) + UB(1:1) = ubound(SrcMiscData%PointStateIs1) + if (.not. allocated(DstMiscData%PointStateIs1)) then + allocate(DstMiscData%PointStateIs1(LB(1):UB(1)), stat=ErrStat2) if (ErrStat2 /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating DstMiscData%ConStateIs1.', ErrStat, ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating DstMiscData%PointStateIs1.', ErrStat, ErrMsg, RoutineName) return end if end if - DstMiscData%ConStateIs1 = SrcMiscData%ConStateIs1 + DstMiscData%PointStateIs1 = SrcMiscData%PointStateIs1 end if - if (allocated(SrcMiscData%ConStateIsN)) then - LB(1:1) = lbound(SrcMiscData%ConStateIsN) - UB(1:1) = ubound(SrcMiscData%ConStateIsN) - if (.not. allocated(DstMiscData%ConStateIsN)) then - allocate(DstMiscData%ConStateIsN(LB(1):UB(1)), stat=ErrStat2) + if (allocated(SrcMiscData%PointStateIsN)) then + LB(1:1) = lbound(SrcMiscData%PointStateIsN) + UB(1:1) = ubound(SrcMiscData%PointStateIsN) + if (.not. allocated(DstMiscData%PointStateIsN)) then + allocate(DstMiscData%PointStateIsN(LB(1):UB(1)), stat=ErrStat2) if (ErrStat2 /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating DstMiscData%ConStateIsN.', ErrStat, ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating DstMiscData%PointStateIsN.', ErrStat, ErrMsg, RoutineName) return end if end if - DstMiscData%ConStateIsN = SrcMiscData%ConStateIsN + DstMiscData%PointStateIsN = SrcMiscData%PointStateIsN end if if (allocated(SrcMiscData%RodStateIs1)) then LB(1:1) = lbound(SrcMiscData%RodStateIs1) @@ -4314,14 +4404,14 @@ subroutine MD_DestroyMisc(MiscData, ErrStat, ErrMsg) end do deallocate(MiscData%RodList) end if - if (allocated(MiscData%ConnectList)) then - LB(1:1) = lbound(MiscData%ConnectList) - UB(1:1) = ubound(MiscData%ConnectList) + if (allocated(MiscData%PointList)) then + LB(1:1) = lbound(MiscData%PointList) + UB(1:1) = ubound(MiscData%PointList) do i1 = LB(1), UB(1) - call MD_DestroyConnect(MiscData%ConnectList(i1), ErrStat2, ErrMsg2) + call MD_DestroyPoint(MiscData%PointList(i1), ErrStat2, ErrMsg2) call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) end do - deallocate(MiscData%ConnectList) + deallocate(MiscData%PointList) end if if (allocated(MiscData%LineList)) then LB(1:1) = lbound(MiscData%LineList) @@ -4341,11 +4431,11 @@ subroutine MD_DestroyMisc(MiscData, ErrStat, ErrMsg) end do deallocate(MiscData%FailList) end if - if (allocated(MiscData%FreeConIs)) then - deallocate(MiscData%FreeConIs) + if (allocated(MiscData%FreePointIs)) then + deallocate(MiscData%FreePointIs) end if - if (allocated(MiscData%CpldConIs)) then - deallocate(MiscData%CpldConIs) + if (allocated(MiscData%CpldPointIs)) then + deallocate(MiscData%CpldPointIs) end if if (allocated(MiscData%FreeRodIs)) then deallocate(MiscData%FreeRodIs) @@ -4365,11 +4455,11 @@ subroutine MD_DestroyMisc(MiscData, ErrStat, ErrMsg) if (allocated(MiscData%LineStateIsN)) then deallocate(MiscData%LineStateIsN) end if - if (allocated(MiscData%ConStateIs1)) then - deallocate(MiscData%ConStateIs1) + if (allocated(MiscData%PointStateIs1)) then + deallocate(MiscData%PointStateIs1) end if - if (allocated(MiscData%ConStateIsN)) then - deallocate(MiscData%ConStateIsN) + if (allocated(MiscData%PointStateIsN)) then + deallocate(MiscData%PointStateIsN) end if if (allocated(MiscData%RodStateIs1)) then deallocate(MiscData%RodStateIs1) @@ -4448,13 +4538,13 @@ subroutine MD_PackMisc(Buf, Indata) call MD_PackRod(Buf, InData%RodList(i1)) end do end if - call RegPack(Buf, allocated(InData%ConnectList)) - if (allocated(InData%ConnectList)) then - call RegPackBounds(Buf, 1, lbound(InData%ConnectList), ubound(InData%ConnectList)) - LB(1:1) = lbound(InData%ConnectList) - UB(1:1) = ubound(InData%ConnectList) + call RegPack(Buf, allocated(InData%PointList)) + if (allocated(InData%PointList)) then + call RegPackBounds(Buf, 1, lbound(InData%PointList), ubound(InData%PointList)) + LB(1:1) = lbound(InData%PointList) + UB(1:1) = ubound(InData%PointList) do i1 = LB(1), UB(1) - call MD_PackConnect(Buf, InData%ConnectList(i1)) + call MD_PackPoint(Buf, InData%PointList(i1)) end do end if call RegPack(Buf, allocated(InData%LineList)) @@ -4475,15 +4565,15 @@ subroutine MD_PackMisc(Buf, Indata) call MD_PackFail(Buf, InData%FailList(i1)) end do end if - call RegPack(Buf, allocated(InData%FreeConIs)) - if (allocated(InData%FreeConIs)) then - call RegPackBounds(Buf, 1, lbound(InData%FreeConIs), ubound(InData%FreeConIs)) - call RegPack(Buf, InData%FreeConIs) + call RegPack(Buf, allocated(InData%FreePointIs)) + if (allocated(InData%FreePointIs)) then + call RegPackBounds(Buf, 1, lbound(InData%FreePointIs), ubound(InData%FreePointIs)) + call RegPack(Buf, InData%FreePointIs) end if - call RegPack(Buf, allocated(InData%CpldConIs)) - if (allocated(InData%CpldConIs)) then - call RegPackBounds(Buf, 2, lbound(InData%CpldConIs), ubound(InData%CpldConIs)) - call RegPack(Buf, InData%CpldConIs) + call RegPack(Buf, allocated(InData%CpldPointIs)) + if (allocated(InData%CpldPointIs)) then + call RegPackBounds(Buf, 2, lbound(InData%CpldPointIs), ubound(InData%CpldPointIs)) + call RegPack(Buf, InData%CpldPointIs) end if call RegPack(Buf, allocated(InData%FreeRodIs)) if (allocated(InData%FreeRodIs)) then @@ -4515,15 +4605,15 @@ subroutine MD_PackMisc(Buf, Indata) call RegPackBounds(Buf, 1, lbound(InData%LineStateIsN), ubound(InData%LineStateIsN)) call RegPack(Buf, InData%LineStateIsN) end if - call RegPack(Buf, allocated(InData%ConStateIs1)) - if (allocated(InData%ConStateIs1)) then - call RegPackBounds(Buf, 1, lbound(InData%ConStateIs1), ubound(InData%ConStateIs1)) - call RegPack(Buf, InData%ConStateIs1) + call RegPack(Buf, allocated(InData%PointStateIs1)) + if (allocated(InData%PointStateIs1)) then + call RegPackBounds(Buf, 1, lbound(InData%PointStateIs1), ubound(InData%PointStateIs1)) + call RegPack(Buf, InData%PointStateIs1) end if - call RegPack(Buf, allocated(InData%ConStateIsN)) - if (allocated(InData%ConStateIsN)) then - call RegPackBounds(Buf, 1, lbound(InData%ConStateIsN), ubound(InData%ConStateIsN)) - call RegPack(Buf, InData%ConStateIsN) + call RegPack(Buf, allocated(InData%PointStateIsN)) + if (allocated(InData%PointStateIsN)) then + call RegPackBounds(Buf, 1, lbound(InData%PointStateIsN), ubound(InData%PointStateIsN)) + call RegPack(Buf, InData%PointStateIsN) end if call RegPack(Buf, allocated(InData%RodStateIs1)) if (allocated(InData%RodStateIs1)) then @@ -4650,19 +4740,19 @@ subroutine MD_UnPackMisc(Buf, OutData) call MD_UnpackRod(Buf, OutData%RodList(i1)) ! RodList end do end if - if (allocated(OutData%ConnectList)) deallocate(OutData%ConnectList) + if (allocated(OutData%PointList)) deallocate(OutData%PointList) call RegUnpack(Buf, IsAllocAssoc) if (RegCheckErr(Buf, RoutineName)) return if (IsAllocAssoc) then call RegUnpackBounds(Buf, 1, LB, UB) if (RegCheckErr(Buf, RoutineName)) return - allocate(OutData%ConnectList(LB(1):UB(1)),stat=stat) + allocate(OutData%PointList(LB(1):UB(1)),stat=stat) if (stat /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating OutData%ConnectList.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%PointList.', Buf%ErrStat, Buf%ErrMsg, RoutineName) return end if do i1 = LB(1), UB(1) - call MD_UnpackConnect(Buf, OutData%ConnectList(i1)) ! ConnectList + call MD_UnpackPoint(Buf, OutData%PointList(i1)) ! PointList end do end if if (allocated(OutData%LineList)) deallocate(OutData%LineList) @@ -4695,32 +4785,32 @@ subroutine MD_UnPackMisc(Buf, OutData) call MD_UnpackFail(Buf, OutData%FailList(i1)) ! FailList end do end if - if (allocated(OutData%FreeConIs)) deallocate(OutData%FreeConIs) + if (allocated(OutData%FreePointIs)) deallocate(OutData%FreePointIs) call RegUnpack(Buf, IsAllocAssoc) if (RegCheckErr(Buf, RoutineName)) return if (IsAllocAssoc) then call RegUnpackBounds(Buf, 1, LB, UB) if (RegCheckErr(Buf, RoutineName)) return - allocate(OutData%FreeConIs(LB(1):UB(1)),stat=stat) + allocate(OutData%FreePointIs(LB(1):UB(1)),stat=stat) if (stat /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating OutData%FreeConIs.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%FreePointIs.', Buf%ErrStat, Buf%ErrMsg, RoutineName) return end if - call RegUnpack(Buf, OutData%FreeConIs) + call RegUnpack(Buf, OutData%FreePointIs) if (RegCheckErr(Buf, RoutineName)) return end if - if (allocated(OutData%CpldConIs)) deallocate(OutData%CpldConIs) + if (allocated(OutData%CpldPointIs)) deallocate(OutData%CpldPointIs) call RegUnpack(Buf, IsAllocAssoc) if (RegCheckErr(Buf, RoutineName)) return if (IsAllocAssoc) then call RegUnpackBounds(Buf, 2, LB, UB) if (RegCheckErr(Buf, RoutineName)) return - allocate(OutData%CpldConIs(LB(1):UB(1),LB(2):UB(2)),stat=stat) + allocate(OutData%CpldPointIs(LB(1):UB(1),LB(2):UB(2)),stat=stat) if (stat /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating OutData%CpldConIs.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%CpldPointIs.', Buf%ErrStat, Buf%ErrMsg, RoutineName) return end if - call RegUnpack(Buf, OutData%CpldConIs) + call RegUnpack(Buf, OutData%CpldPointIs) if (RegCheckErr(Buf, RoutineName)) return end if if (allocated(OutData%FreeRodIs)) deallocate(OutData%FreeRodIs) @@ -4807,32 +4897,32 @@ subroutine MD_UnPackMisc(Buf, OutData) call RegUnpack(Buf, OutData%LineStateIsN) if (RegCheckErr(Buf, RoutineName)) return end if - if (allocated(OutData%ConStateIs1)) deallocate(OutData%ConStateIs1) + if (allocated(OutData%PointStateIs1)) deallocate(OutData%PointStateIs1) call RegUnpack(Buf, IsAllocAssoc) if (RegCheckErr(Buf, RoutineName)) return if (IsAllocAssoc) then call RegUnpackBounds(Buf, 1, LB, UB) if (RegCheckErr(Buf, RoutineName)) return - allocate(OutData%ConStateIs1(LB(1):UB(1)),stat=stat) + allocate(OutData%PointStateIs1(LB(1):UB(1)),stat=stat) if (stat /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating OutData%ConStateIs1.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%PointStateIs1.', Buf%ErrStat, Buf%ErrMsg, RoutineName) return end if - call RegUnpack(Buf, OutData%ConStateIs1) + call RegUnpack(Buf, OutData%PointStateIs1) if (RegCheckErr(Buf, RoutineName)) return end if - if (allocated(OutData%ConStateIsN)) deallocate(OutData%ConStateIsN) + if (allocated(OutData%PointStateIsN)) deallocate(OutData%PointStateIsN) call RegUnpack(Buf, IsAllocAssoc) if (RegCheckErr(Buf, RoutineName)) return if (IsAllocAssoc) then call RegUnpackBounds(Buf, 1, LB, UB) if (RegCheckErr(Buf, RoutineName)) return - allocate(OutData%ConStateIsN(LB(1):UB(1)),stat=stat) + allocate(OutData%PointStateIsN(LB(1):UB(1)),stat=stat) if (stat /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating OutData%ConStateIsN.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%PointStateIsN.', Buf%ErrStat, Buf%ErrMsg, RoutineName) return end if - call RegUnpack(Buf, OutData%ConStateIsN) + call RegUnpack(Buf, OutData%PointStateIsN) if (RegCheckErr(Buf, RoutineName)) return end if if (allocated(OutData%RodStateIs1)) deallocate(OutData%RodStateIs1) @@ -4990,8 +5080,8 @@ subroutine MD_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg) ErrMsg = '' DstParamData%nLineTypes = SrcParamData%nLineTypes DstParamData%nRodTypes = SrcParamData%nRodTypes - DstParamData%nConnects = SrcParamData%nConnects - DstParamData%nConnectsExtra = SrcParamData%nConnectsExtra + DstParamData%nPoints = SrcParamData%nPoints + DstParamData%nPointsExtra = SrcParamData%nPointsExtra DstParamData%nBodies = SrcParamData%nBodies DstParamData%nRods = SrcParamData%nRods DstParamData%nLines = SrcParamData%nLines @@ -4999,7 +5089,7 @@ subroutine MD_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg) DstParamData%nFails = SrcParamData%nFails DstParamData%nFreeBodies = SrcParamData%nFreeBodies DstParamData%nFreeRods = SrcParamData%nFreeRods - DstParamData%nFreeCons = SrcParamData%nFreeCons + DstParamData%nFreePoints = SrcParamData%nFreePoints if (allocated(SrcParamData%nCpldBodies)) then LB(1:1) = lbound(SrcParamData%nCpldBodies) UB(1:1) = ubound(SrcParamData%nCpldBodies) @@ -5024,17 +5114,17 @@ subroutine MD_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg) end if DstParamData%nCpldRods = SrcParamData%nCpldRods end if - if (allocated(SrcParamData%nCpldCons)) then - LB(1:1) = lbound(SrcParamData%nCpldCons) - UB(1:1) = ubound(SrcParamData%nCpldCons) - if (.not. allocated(DstParamData%nCpldCons)) then - allocate(DstParamData%nCpldCons(LB(1):UB(1)), stat=ErrStat2) + if (allocated(SrcParamData%nCpldPoints)) then + LB(1:1) = lbound(SrcParamData%nCpldPoints) + UB(1:1) = ubound(SrcParamData%nCpldPoints) + if (.not. allocated(DstParamData%nCpldPoints)) then + allocate(DstParamData%nCpldPoints(LB(1):UB(1)), stat=ErrStat2) if (ErrStat2 /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating DstParamData%nCpldCons.', ErrStat, ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating DstParamData%nCpldPoints.', ErrStat, ErrMsg, RoutineName) return end if end if - DstParamData%nCpldCons = SrcParamData%nCpldCons + DstParamData%nCpldPoints = SrcParamData%nCpldPoints end if DstParamData%NConns = SrcParamData%NConns DstParamData%NAnchs = SrcParamData%NAnchs @@ -5314,6 +5404,23 @@ subroutine MD_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg) end if DstParamData%dxIdx_map2_xStateIdx = SrcParamData%dxIdx_map2_xStateIdx end if + DstParamData%VisMeshes = SrcParamData%VisMeshes + if (allocated(SrcParamData%VisRodsDiam)) then + LB(1:1) = lbound(SrcParamData%VisRodsDiam) + UB(1:1) = ubound(SrcParamData%VisRodsDiam) + if (.not. allocated(DstParamData%VisRodsDiam)) then + allocate(DstParamData%VisRodsDiam(LB(1):UB(1)), stat=ErrStat2) + if (ErrStat2 /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating DstParamData%VisRodsDiam.', ErrStat, ErrMsg, RoutineName) + return + end if + end if + do i1 = LB(1), UB(1) + call MD_CopyVisDiam(SrcParamData%VisRodsDiam(i1), DstParamData%VisRodsDiam(i1), CtrlCode, ErrStat2, ErrMsg2) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + if (ErrStat >= AbortErrLev) return + end do + end if end subroutine subroutine MD_DestroyParam(ParamData, ErrStat, ErrMsg) @@ -5333,8 +5440,8 @@ subroutine MD_DestroyParam(ParamData, ErrStat, ErrMsg) if (allocated(ParamData%nCpldRods)) then deallocate(ParamData%nCpldRods) end if - if (allocated(ParamData%nCpldCons)) then - deallocate(ParamData%nCpldCons) + if (allocated(ParamData%nCpldPoints)) then + deallocate(ParamData%nCpldPoints) end if if (allocated(ParamData%OutParam)) then LB(1:1) = lbound(ParamData%OutParam) @@ -5402,6 +5509,15 @@ subroutine MD_DestroyParam(ParamData, ErrStat, ErrMsg) if (allocated(ParamData%dxIdx_map2_xStateIdx)) then deallocate(ParamData%dxIdx_map2_xStateIdx) end if + if (allocated(ParamData%VisRodsDiam)) then + LB(1:1) = lbound(ParamData%VisRodsDiam) + UB(1:1) = ubound(ParamData%VisRodsDiam) + do i1 = LB(1), UB(1) + call MD_DestroyVisDiam(ParamData%VisRodsDiam(i1), ErrStat2, ErrMsg2) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + end do + deallocate(ParamData%VisRodsDiam) + end if end subroutine subroutine MD_PackParam(Buf, Indata) @@ -5413,8 +5529,8 @@ subroutine MD_PackParam(Buf, Indata) if (Buf%ErrStat >= AbortErrLev) return call RegPack(Buf, InData%nLineTypes) call RegPack(Buf, InData%nRodTypes) - call RegPack(Buf, InData%nConnects) - call RegPack(Buf, InData%nConnectsExtra) + call RegPack(Buf, InData%nPoints) + call RegPack(Buf, InData%nPointsExtra) call RegPack(Buf, InData%nBodies) call RegPack(Buf, InData%nRods) call RegPack(Buf, InData%nLines) @@ -5422,7 +5538,7 @@ subroutine MD_PackParam(Buf, Indata) call RegPack(Buf, InData%nFails) call RegPack(Buf, InData%nFreeBodies) call RegPack(Buf, InData%nFreeRods) - call RegPack(Buf, InData%nFreeCons) + call RegPack(Buf, InData%nFreePoints) call RegPack(Buf, allocated(InData%nCpldBodies)) if (allocated(InData%nCpldBodies)) then call RegPackBounds(Buf, 1, lbound(InData%nCpldBodies), ubound(InData%nCpldBodies)) @@ -5433,10 +5549,10 @@ subroutine MD_PackParam(Buf, Indata) call RegPackBounds(Buf, 1, lbound(InData%nCpldRods), ubound(InData%nCpldRods)) call RegPack(Buf, InData%nCpldRods) end if - call RegPack(Buf, allocated(InData%nCpldCons)) - if (allocated(InData%nCpldCons)) then - call RegPackBounds(Buf, 1, lbound(InData%nCpldCons), ubound(InData%nCpldCons)) - call RegPack(Buf, InData%nCpldCons) + call RegPack(Buf, allocated(InData%nCpldPoints)) + if (allocated(InData%nCpldPoints)) then + call RegPackBounds(Buf, 1, lbound(InData%nCpldPoints), ubound(InData%nCpldPoints)) + call RegPack(Buf, InData%nCpldPoints) end if call RegPack(Buf, InData%NConns) call RegPack(Buf, InData%NAnchs) @@ -5576,6 +5692,16 @@ subroutine MD_PackParam(Buf, Indata) call RegPackBounds(Buf, 1, lbound(InData%dxIdx_map2_xStateIdx), ubound(InData%dxIdx_map2_xStateIdx)) call RegPack(Buf, InData%dxIdx_map2_xStateIdx) end if + call RegPack(Buf, InData%VisMeshes) + call RegPack(Buf, allocated(InData%VisRodsDiam)) + if (allocated(InData%VisRodsDiam)) then + call RegPackBounds(Buf, 1, lbound(InData%VisRodsDiam), ubound(InData%VisRodsDiam)) + LB(1:1) = lbound(InData%VisRodsDiam) + UB(1:1) = ubound(InData%VisRodsDiam) + do i1 = LB(1), UB(1) + call MD_PackVisDiam(Buf, InData%VisRodsDiam(i1)) + end do + end if if (RegCheckErr(Buf, RoutineName)) return end subroutine @@ -5592,9 +5718,9 @@ subroutine MD_UnPackParam(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%nRodTypes) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%nConnects) + call RegUnpack(Buf, OutData%nPoints) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%nConnectsExtra) + call RegUnpack(Buf, OutData%nPointsExtra) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%nBodies) if (RegCheckErr(Buf, RoutineName)) return @@ -5610,7 +5736,7 @@ subroutine MD_UnPackParam(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%nFreeRods) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%nFreeCons) + call RegUnpack(Buf, OutData%nFreePoints) if (RegCheckErr(Buf, RoutineName)) return if (allocated(OutData%nCpldBodies)) deallocate(OutData%nCpldBodies) call RegUnpack(Buf, IsAllocAssoc) @@ -5640,18 +5766,18 @@ subroutine MD_UnPackParam(Buf, OutData) call RegUnpack(Buf, OutData%nCpldRods) if (RegCheckErr(Buf, RoutineName)) return end if - if (allocated(OutData%nCpldCons)) deallocate(OutData%nCpldCons) + if (allocated(OutData%nCpldPoints)) deallocate(OutData%nCpldPoints) call RegUnpack(Buf, IsAllocAssoc) if (RegCheckErr(Buf, RoutineName)) return if (IsAllocAssoc) then call RegUnpackBounds(Buf, 1, LB, UB) if (RegCheckErr(Buf, RoutineName)) return - allocate(OutData%nCpldCons(LB(1):UB(1)),stat=stat) + allocate(OutData%nCpldPoints(LB(1):UB(1)),stat=stat) if (stat /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating OutData%nCpldCons.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%nCpldPoints.', Buf%ErrStat, Buf%ErrMsg, RoutineName) return end if - call RegUnpack(Buf, OutData%nCpldCons) + call RegUnpack(Buf, OutData%nCpldPoints) if (RegCheckErr(Buf, RoutineName)) return end if call RegUnpack(Buf, OutData%NConns) @@ -6003,6 +6129,23 @@ subroutine MD_UnPackParam(Buf, OutData) call RegUnpack(Buf, OutData%dxIdx_map2_xStateIdx) if (RegCheckErr(Buf, RoutineName)) return end if + call RegUnpack(Buf, OutData%VisMeshes) + if (RegCheckErr(Buf, RoutineName)) return + if (allocated(OutData%VisRodsDiam)) deallocate(OutData%VisRodsDiam) + call RegUnpack(Buf, IsAllocAssoc) + if (RegCheckErr(Buf, RoutineName)) return + if (IsAllocAssoc) then + call RegUnpackBounds(Buf, 1, LB, UB) + if (RegCheckErr(Buf, RoutineName)) return + allocate(OutData%VisRodsDiam(LB(1):UB(1)),stat=stat) + if (stat /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%VisRodsDiam.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + return + end if + do i1 = LB(1), UB(1) + call MD_UnpackVisDiam(Buf, OutData%VisRodsDiam(i1)) ! VisRodsDiam + end do + end if end subroutine subroutine MD_CopyInput(SrcInputData, DstInputData, CtrlCode, ErrStat, ErrMsg) @@ -6212,6 +6355,70 @@ subroutine MD_CopyOutput(SrcOutputData, DstOutputData, CtrlCode, ErrStat, ErrMsg end if DstOutputData%WriteOutput = SrcOutputData%WriteOutput end if + if (allocated(SrcOutputData%VisLinesMesh)) then + LB(1:1) = lbound(SrcOutputData%VisLinesMesh) + UB(1:1) = ubound(SrcOutputData%VisLinesMesh) + if (.not. allocated(DstOutputData%VisLinesMesh)) then + allocate(DstOutputData%VisLinesMesh(LB(1):UB(1)), stat=ErrStat2) + if (ErrStat2 /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating DstOutputData%VisLinesMesh.', ErrStat, ErrMsg, RoutineName) + return + end if + end if + do i1 = LB(1), UB(1) + call MeshCopy(SrcOutputData%VisLinesMesh(i1), DstOutputData%VisLinesMesh(i1), CtrlCode, ErrStat2, ErrMsg2 ) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + if (ErrStat >= AbortErrLev) return + end do + end if + if (allocated(SrcOutputData%VisRodsMesh)) then + LB(1:1) = lbound(SrcOutputData%VisRodsMesh) + UB(1:1) = ubound(SrcOutputData%VisRodsMesh) + if (.not. allocated(DstOutputData%VisRodsMesh)) then + allocate(DstOutputData%VisRodsMesh(LB(1):UB(1)), stat=ErrStat2) + if (ErrStat2 /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating DstOutputData%VisRodsMesh.', ErrStat, ErrMsg, RoutineName) + return + end if + end if + do i1 = LB(1), UB(1) + call MeshCopy(SrcOutputData%VisRodsMesh(i1), DstOutputData%VisRodsMesh(i1), CtrlCode, ErrStat2, ErrMsg2 ) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + if (ErrStat >= AbortErrLev) return + end do + end if + if (allocated(SrcOutputData%VisBodiesMesh)) then + LB(1:1) = lbound(SrcOutputData%VisBodiesMesh) + UB(1:1) = ubound(SrcOutputData%VisBodiesMesh) + if (.not. allocated(DstOutputData%VisBodiesMesh)) then + allocate(DstOutputData%VisBodiesMesh(LB(1):UB(1)), stat=ErrStat2) + if (ErrStat2 /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating DstOutputData%VisBodiesMesh.', ErrStat, ErrMsg, RoutineName) + return + end if + end if + do i1 = LB(1), UB(1) + call MeshCopy(SrcOutputData%VisBodiesMesh(i1), DstOutputData%VisBodiesMesh(i1), CtrlCode, ErrStat2, ErrMsg2 ) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + if (ErrStat >= AbortErrLev) return + end do + end if + if (allocated(SrcOutputData%VisAnchsMesh)) then + LB(1:1) = lbound(SrcOutputData%VisAnchsMesh) + UB(1:1) = ubound(SrcOutputData%VisAnchsMesh) + if (.not. allocated(DstOutputData%VisAnchsMesh)) then + allocate(DstOutputData%VisAnchsMesh(LB(1):UB(1)), stat=ErrStat2) + if (ErrStat2 /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating DstOutputData%VisAnchsMesh.', ErrStat, ErrMsg, RoutineName) + return + end if + end if + do i1 = LB(1), UB(1) + call MeshCopy(SrcOutputData%VisAnchsMesh(i1), DstOutputData%VisAnchsMesh(i1), CtrlCode, ErrStat2, ErrMsg2 ) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + if (ErrStat >= AbortErrLev) return + end do + end if end subroutine subroutine MD_DestroyOutput(OutputData, ErrStat, ErrMsg) @@ -6237,6 +6444,42 @@ subroutine MD_DestroyOutput(OutputData, ErrStat, ErrMsg) if (allocated(OutputData%WriteOutput)) then deallocate(OutputData%WriteOutput) end if + if (allocated(OutputData%VisLinesMesh)) then + LB(1:1) = lbound(OutputData%VisLinesMesh) + UB(1:1) = ubound(OutputData%VisLinesMesh) + do i1 = LB(1), UB(1) + call MeshDestroy( OutputData%VisLinesMesh(i1), ErrStat2, ErrMsg2) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + end do + deallocate(OutputData%VisLinesMesh) + end if + if (allocated(OutputData%VisRodsMesh)) then + LB(1:1) = lbound(OutputData%VisRodsMesh) + UB(1:1) = ubound(OutputData%VisRodsMesh) + do i1 = LB(1), UB(1) + call MeshDestroy( OutputData%VisRodsMesh(i1), ErrStat2, ErrMsg2) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + end do + deallocate(OutputData%VisRodsMesh) + end if + if (allocated(OutputData%VisBodiesMesh)) then + LB(1:1) = lbound(OutputData%VisBodiesMesh) + UB(1:1) = ubound(OutputData%VisBodiesMesh) + do i1 = LB(1), UB(1) + call MeshDestroy( OutputData%VisBodiesMesh(i1), ErrStat2, ErrMsg2) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + end do + deallocate(OutputData%VisBodiesMesh) + end if + if (allocated(OutputData%VisAnchsMesh)) then + LB(1:1) = lbound(OutputData%VisAnchsMesh) + UB(1:1) = ubound(OutputData%VisAnchsMesh) + do i1 = LB(1), UB(1) + call MeshDestroy( OutputData%VisAnchsMesh(i1), ErrStat2, ErrMsg2) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + end do + deallocate(OutputData%VisAnchsMesh) + end if end subroutine subroutine MD_PackOutput(Buf, Indata) @@ -6260,6 +6503,42 @@ subroutine MD_PackOutput(Buf, Indata) call RegPackBounds(Buf, 1, lbound(InData%WriteOutput), ubound(InData%WriteOutput)) call RegPack(Buf, InData%WriteOutput) end if + call RegPack(Buf, allocated(InData%VisLinesMesh)) + if (allocated(InData%VisLinesMesh)) then + call RegPackBounds(Buf, 1, lbound(InData%VisLinesMesh), ubound(InData%VisLinesMesh)) + LB(1:1) = lbound(InData%VisLinesMesh) + UB(1:1) = ubound(InData%VisLinesMesh) + do i1 = LB(1), UB(1) + call MeshPack(Buf, InData%VisLinesMesh(i1)) + end do + end if + call RegPack(Buf, allocated(InData%VisRodsMesh)) + if (allocated(InData%VisRodsMesh)) then + call RegPackBounds(Buf, 1, lbound(InData%VisRodsMesh), ubound(InData%VisRodsMesh)) + LB(1:1) = lbound(InData%VisRodsMesh) + UB(1:1) = ubound(InData%VisRodsMesh) + do i1 = LB(1), UB(1) + call MeshPack(Buf, InData%VisRodsMesh(i1)) + end do + end if + call RegPack(Buf, allocated(InData%VisBodiesMesh)) + if (allocated(InData%VisBodiesMesh)) then + call RegPackBounds(Buf, 1, lbound(InData%VisBodiesMesh), ubound(InData%VisBodiesMesh)) + LB(1:1) = lbound(InData%VisBodiesMesh) + UB(1:1) = ubound(InData%VisBodiesMesh) + do i1 = LB(1), UB(1) + call MeshPack(Buf, InData%VisBodiesMesh(i1)) + end do + end if + call RegPack(Buf, allocated(InData%VisAnchsMesh)) + if (allocated(InData%VisAnchsMesh)) then + call RegPackBounds(Buf, 1, lbound(InData%VisAnchsMesh), ubound(InData%VisAnchsMesh)) + LB(1:1) = lbound(InData%VisAnchsMesh) + UB(1:1) = ubound(InData%VisAnchsMesh) + do i1 = LB(1), UB(1) + call MeshPack(Buf, InData%VisAnchsMesh(i1)) + end do + end if if (RegCheckErr(Buf, RoutineName)) return end subroutine @@ -6301,6 +6580,66 @@ subroutine MD_UnPackOutput(Buf, OutData) call RegUnpack(Buf, OutData%WriteOutput) if (RegCheckErr(Buf, RoutineName)) return end if + if (allocated(OutData%VisLinesMesh)) deallocate(OutData%VisLinesMesh) + call RegUnpack(Buf, IsAllocAssoc) + if (RegCheckErr(Buf, RoutineName)) return + if (IsAllocAssoc) then + call RegUnpackBounds(Buf, 1, LB, UB) + if (RegCheckErr(Buf, RoutineName)) return + allocate(OutData%VisLinesMesh(LB(1):UB(1)),stat=stat) + if (stat /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%VisLinesMesh.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + return + end if + do i1 = LB(1), UB(1) + call MeshUnpack(Buf, OutData%VisLinesMesh(i1)) ! VisLinesMesh + end do + end if + if (allocated(OutData%VisRodsMesh)) deallocate(OutData%VisRodsMesh) + call RegUnpack(Buf, IsAllocAssoc) + if (RegCheckErr(Buf, RoutineName)) return + if (IsAllocAssoc) then + call RegUnpackBounds(Buf, 1, LB, UB) + if (RegCheckErr(Buf, RoutineName)) return + allocate(OutData%VisRodsMesh(LB(1):UB(1)),stat=stat) + if (stat /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%VisRodsMesh.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + return + end if + do i1 = LB(1), UB(1) + call MeshUnpack(Buf, OutData%VisRodsMesh(i1)) ! VisRodsMesh + end do + end if + if (allocated(OutData%VisBodiesMesh)) deallocate(OutData%VisBodiesMesh) + call RegUnpack(Buf, IsAllocAssoc) + if (RegCheckErr(Buf, RoutineName)) return + if (IsAllocAssoc) then + call RegUnpackBounds(Buf, 1, LB, UB) + if (RegCheckErr(Buf, RoutineName)) return + allocate(OutData%VisBodiesMesh(LB(1):UB(1)),stat=stat) + if (stat /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%VisBodiesMesh.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + return + end if + do i1 = LB(1), UB(1) + call MeshUnpack(Buf, OutData%VisBodiesMesh(i1)) ! VisBodiesMesh + end do + end if + if (allocated(OutData%VisAnchsMesh)) deallocate(OutData%VisAnchsMesh) + call RegUnpack(Buf, IsAllocAssoc) + if (RegCheckErr(Buf, RoutineName)) return + if (IsAllocAssoc) then + call RegUnpackBounds(Buf, 1, LB, UB) + if (RegCheckErr(Buf, RoutineName)) return + allocate(OutData%VisAnchsMesh(LB(1):UB(1)),stat=stat) + if (stat /= 0) then + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%VisAnchsMesh.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + return + end if + do i1 = LB(1), UB(1) + call MeshUnpack(Buf, OutData%VisAnchsMesh(i1)) ! VisAnchsMesh + end do + end if end subroutine subroutine MD_Input_ExtrapInterp(u, t, u_out, t_out, ErrStat, ErrMsg) @@ -6589,6 +6928,30 @@ SUBROUTINE MD_Output_ExtrapInterp1(y1, y2, tin, y_out, tin_out, ErrStat, ErrMsg IF (ALLOCATED(y_out%WriteOutput) .AND. ALLOCATED(y1%WriteOutput)) THEN y_out%WriteOutput = a1*y1%WriteOutput + a2*y2%WriteOutput END IF ! check if allocated + IF (ALLOCATED(y_out%VisLinesMesh) .AND. ALLOCATED(y1%VisLinesMesh)) THEN + DO i1 = LBOUND(y_out%VisLinesMesh,1),UBOUND(y_out%VisLinesMesh,1) + CALL MeshExtrapInterp1(y1%VisLinesMesh(i1), y2%VisLinesMesh(i1), tin, y_out%VisLinesMesh(i1), tin_out, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) + END DO + END IF ! check if allocated + IF (ALLOCATED(y_out%VisRodsMesh) .AND. ALLOCATED(y1%VisRodsMesh)) THEN + DO i1 = LBOUND(y_out%VisRodsMesh,1),UBOUND(y_out%VisRodsMesh,1) + CALL MeshExtrapInterp1(y1%VisRodsMesh(i1), y2%VisRodsMesh(i1), tin, y_out%VisRodsMesh(i1), tin_out, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) + END DO + END IF ! check if allocated + IF (ALLOCATED(y_out%VisBodiesMesh) .AND. ALLOCATED(y1%VisBodiesMesh)) THEN + DO i1 = LBOUND(y_out%VisBodiesMesh,1),UBOUND(y_out%VisBodiesMesh,1) + CALL MeshExtrapInterp1(y1%VisBodiesMesh(i1), y2%VisBodiesMesh(i1), tin, y_out%VisBodiesMesh(i1), tin_out, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) + END DO + END IF ! check if allocated + IF (ALLOCATED(y_out%VisAnchsMesh) .AND. ALLOCATED(y1%VisAnchsMesh)) THEN + DO i1 = LBOUND(y_out%VisAnchsMesh,1),UBOUND(y_out%VisAnchsMesh,1) + CALL MeshExtrapInterp1(y1%VisAnchsMesh(i1), y2%VisAnchsMesh(i1), tin, y_out%VisAnchsMesh(i1), tin_out, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) + END DO + END IF ! check if allocated END SUBROUTINE SUBROUTINE MD_Output_ExtrapInterp2(y1, y2, y3, tin, y_out, tin_out, ErrStat, ErrMsg ) @@ -6655,6 +7018,30 @@ SUBROUTINE MD_Output_ExtrapInterp2(y1, y2, y3, tin, y_out, tin_out, ErrStat, Err IF (ALLOCATED(y_out%WriteOutput) .AND. ALLOCATED(y1%WriteOutput)) THEN y_out%WriteOutput = a1*y1%WriteOutput + a2*y2%WriteOutput + a3*y3%WriteOutput END IF ! check if allocated + IF (ALLOCATED(y_out%VisLinesMesh) .AND. ALLOCATED(y1%VisLinesMesh)) THEN + DO i1 = LBOUND(y_out%VisLinesMesh,1),UBOUND(y_out%VisLinesMesh,1) + CALL MeshExtrapInterp2(y1%VisLinesMesh(i1), y2%VisLinesMesh(i1), y3%VisLinesMesh(i1), tin, y_out%VisLinesMesh(i1), tin_out, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) + END DO + END IF ! check if allocated + IF (ALLOCATED(y_out%VisRodsMesh) .AND. ALLOCATED(y1%VisRodsMesh)) THEN + DO i1 = LBOUND(y_out%VisRodsMesh,1),UBOUND(y_out%VisRodsMesh,1) + CALL MeshExtrapInterp2(y1%VisRodsMesh(i1), y2%VisRodsMesh(i1), y3%VisRodsMesh(i1), tin, y_out%VisRodsMesh(i1), tin_out, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) + END DO + END IF ! check if allocated + IF (ALLOCATED(y_out%VisBodiesMesh) .AND. ALLOCATED(y1%VisBodiesMesh)) THEN + DO i1 = LBOUND(y_out%VisBodiesMesh,1),UBOUND(y_out%VisBodiesMesh,1) + CALL MeshExtrapInterp2(y1%VisBodiesMesh(i1), y2%VisBodiesMesh(i1), y3%VisBodiesMesh(i1), tin, y_out%VisBodiesMesh(i1), tin_out, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) + END DO + END IF ! check if allocated + IF (ALLOCATED(y_out%VisAnchsMesh) .AND. ALLOCATED(y1%VisAnchsMesh)) THEN + DO i1 = LBOUND(y_out%VisAnchsMesh,1),UBOUND(y_out%VisAnchsMesh,1) + CALL MeshExtrapInterp2(y1%VisAnchsMesh(i1), y2%VisAnchsMesh(i1), y3%VisAnchsMesh(i1), tin, y_out%VisAnchsMesh(i1), tin_out, ErrStat2, ErrMsg2) + CALL SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg,RoutineName) + END DO + END IF ! check if allocated END SUBROUTINE END MODULE MoorDyn_Types !ENDOFREGISTRYGENERATEDFILE diff --git a/modules/openfast-library/src/FAST_Registry.txt b/modules/openfast-library/src/FAST_Registry.txt index c599fd074..e11ad319c 100644 --- a/modules/openfast-library/src/FAST_Registry.txt +++ b/modules/openfast-library/src/FAST_Registry.txt @@ -79,7 +79,7 @@ typedef ^ FAST_VTK_SurfaceType IntKi NWaveElevPts {2} - - "number of points for typedef ^ FAST_VTK_SurfaceType SiKi WaveElevXY {:}{:} - - "X-Y locations for WaveElev output (for visualization). First dimension is the X (1) and Y (2) coordinate. Second dimension is the point number." "m,-" typedef ^ FAST_VTK_SurfaceType SiKi WaveElev {:}{:} - - "wave elevation at WaveElevXY; first dimension is time step; second dimension is point number" "m,-" typedef ^ FAST_VTK_SurfaceType FAST_VTK_BLSurfaceType BladeShape {:} - - "AirfoilCoords for each blade" m -typedef ^ FAST_VTK_SurfaceType SiKi MorisonRad {:} - - "radius of each Morison node" m +typedef ^ FAST_VTK_SurfaceType SiKi MorisonVisRad {:} - - "radius of each Morison node" m typedef ^ FAST_VTK_ModeShapeType CHARACTER(1024) CheckpointRoot - - - "name of the checkpoint file written by FAST when linearization data was produced" diff --git a/modules/openfast-library/src/FAST_Subs.f90 b/modules/openfast-library/src/FAST_Subs.f90 index 76b383989..8da17998e 100644 --- a/modules/openfast-library/src/FAST_Subs.f90 +++ b/modules/openfast-library/src/FAST_Subs.f90 @@ -882,6 +882,7 @@ SUBROUTINE FAST_InitializeAll( t_initial, p_FAST, y_FAST, m_FAST, ED, BD, SrvD, Init%InData_HD%OutRootName = TRIM(p_FAST%OutFileRoot)//'.'//TRIM(y_FAST%Module_Abrev(Module_HD)) Init%InData_HD%TMax = p_FAST%TMax Init%InData_HD%Linearize = p_FAST%Linearize + if (p_FAST%WrVTK /= VTK_None) Init%InData_HD%VisMeshes=.true. CALL HydroDyn_Init( Init%InData_HD, HD%Input(1), HD%p, HD%x(STATE_CURR), HD%xd(STATE_CURR), HD%z(STATE_CURR), & HD%OtherSt(STATE_CURR), HD%y, HD%m, p_FAST%dt_module( MODULE_HD ), Init%OutData_HD, ErrStat2, ErrMsg2 ) @@ -1110,7 +1111,7 @@ SUBROUTINE FAST_InitializeAll( t_initial, p_FAST, y_FAST, m_FAST, ED, BD, SrvD, Init%InData_MD%Tmax = p_FAST%TMax ! expected simulation duration (used by MoorDyn for wave kinematics preprocesing) Init%InData_MD%Linearize = p_FAST%Linearize - + if (p_FAST%WrVTK /= VTK_None) Init%InData_MD%VisMeshes=.true. CALL MD_Init( Init%InData_MD, MD%Input(1), MD%p, MD%x(STATE_CURR), MD%xd(STATE_CURR), MD%z(STATE_CURR), & MD%OtherSt(STATE_CURR), MD%y, MD%m, p_FAST%dt_module( MODULE_MD ), Init%OutData_MD, ErrStat2, ErrMsg2 ) @@ -1526,7 +1527,7 @@ SUBROUTINE FAST_InitializeAll( t_initial, p_FAST, y_FAST, m_FAST, ED, BD, SrvD, ! Initialize data for VTK output ! ------------------------------------------------------------------------- if ( p_FAST%WrVTK > VTK_None ) then - call SetVTKParameters(p_FAST, Init%OutData_ED, Init%OutData_AD, Init%InData_SeaSt, Init%OutData_SeaSt, ED, BD, AD, HD, ErrStat2, ErrMsg2) + call SetVTKParameters(p_FAST, Init%OutData_ED, Init%OutData_AD, Init%InData_SeaSt, Init%OutData_SeaSt, Init%OutData_HD, ED, BD, AD, HD, ErrStat2, ErrMsg2) call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName) end if @@ -3869,6 +3870,7 @@ SUBROUTINE SetVTKParameters_B4SeaSt(p_FAST, InitOutData_ED, InitInData_SeaSt, BD if (ErrStat >= AbortErrLev) return Width = p_FAST%VTK_Surface%GroundRad * VTK_GroundFactor + if (p_FAST%MHK /= MHK_None) Width = Width * 5.0_SiKi dx = Width / (p_FAST%VTK_surface%NWaveElevPts(1) - 1) dy = Width / (p_FAST%VTK_surface%NWaveElevPts(2) - 1) @@ -3888,13 +3890,14 @@ SUBROUTINE SetVTKParameters_B4SeaSt(p_FAST, InitOutData_ED, InitInData_SeaSt, BD END SUBROUTINE SetVTKParameters_B4SeaSt !---------------------------------------------------------------------------------------------------------------------------------- !> This subroutine sets up the information needed for plotting VTK surfaces. -SUBROUTINE SetVTKParameters(p_FAST, InitOutData_ED, InitOutData_AD, InitInData_SeaSt, InitOutData_SeaSt, ED, BD, AD, HD, ErrStat, ErrMsg) +SUBROUTINE SetVTKParameters(p_FAST, InitOutData_ED, InitOutData_AD, InitInData_SeaSt, InitOutData_SeaSt, InitOutData_HD, ED, BD, AD, HD, ErrStat, ErrMsg) TYPE(FAST_ParameterType), INTENT(INOUT) :: p_FAST !< The parameters of the glue code TYPE(ED_InitOutputType), INTENT(IN ) :: InitOutData_ED !< The initialization output from structural dynamics module TYPE(AD_InitOutputType), INTENT(INOUT) :: InitOutData_AD !< The initialization output from AeroDyn TYPE(SeaSt_InitInputType), INTENT(INOUT) :: InitInData_SeaSt !< The initialization input to SeaState TYPE(SeaSt_InitOutputType), INTENT(INOUT) :: InitOutData_SeaSt !< The initialization output from SeaState + TYPE(HydroDyn_InitOutputType),INTENT(INOUT) :: InitOutData_HD !< The initialization output from HydroDyn TYPE(ElastoDyn_Data), INTENT(IN ) :: ED !< ElastoDyn data TYPE(BeamDyn_Data), INTENT(IN ) :: BD !< BeamDyn data TYPE(AeroDyn_Data), INTENT(IN ) :: AD !< AeroDyn data @@ -3950,6 +3953,7 @@ SUBROUTINE SetVTKParameters(p_FAST, InitOutData_ED, InitOutData_AD, InitInData_S RefPoint = p_FAST%TurbinePos if (p_FAST%CompSeaSt == MODULE_SeaSt) then RefLengths = p_FAST%VTK_Surface%GroundRad*VTK_GroundFactor/2.0_SiKi + if (p_FAST%MHK /= MHK_None) RefLengths = RefLengths*4.0_SiKi ! note that p_FAST%TurbinePos(3) must be 0 for offshore turbines RefPoint(3) = p_FAST%TurbinePos(3) - p_FAST%WtrDpth @@ -4081,10 +4085,8 @@ SUBROUTINE SetVTKParameters(p_FAST, InitOutData_ED, InitOutData_AD, InitInData_S ! morison surfaces !....................... - IF ( HD%Input(1)%Morison%Mesh%Committed ) THEN - !TODO: FIX for visualization GJH 4/23/20 - ! call move_alloc(InitOutData_HD%Morison%Morison_Rad, p_FAST%VTK_Surface%MorisonRad) - + IF ( HD%y%Morison%VisMesh%Committed ) THEN + call move_alloc(InitOutData_HD%Morison%MorisonVisRad, p_FAST%VTK_Surface%MorisonVisRad) END IF END SUBROUTINE SetVTKParameters @@ -6129,7 +6131,10 @@ SUBROUTINE WrVTK_AllMeshes(p_FAST, y_FAST, MeshMapData, ED, BD, AD, IfW, ExtInfw IF ( p_FAST%CompHydro == Module_HD .and. allocated(HD%Input)) THEN call MeshWrVTK(p_FAST%TurbinePos, HD%Input(1)%PRPMesh, trim(p_FAST%VTK_OutFileRoot)//'.HD_PRP', y_FAST%VTK_count, p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth ) call MeshWrVTK(p_FAST%TurbinePos, HD%y%WamitMesh, trim(p_FAST%VTK_OutFileRoot)//'.HD_WAMIT', y_FAST%VTK_count, p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth, HD%Input(1)%WAMITMesh ) - call MeshWrVTK(p_FAST%TurbinePos, HD%y%Morison%Mesh, trim(p_FAST%VTK_OutFileRoot)//'.HD_Morison', y_FAST%VTK_count, p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth, HD%Input(1)%Morison%Mesh ) + call MeshWrVTK(p_FAST%TurbinePos, HD%y%Morison%Mesh, trim(p_FAST%VTK_OutFileRoot)//'.HD_MorisonPt', y_FAST%VTK_count, p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth, HD%Input(1)%Morison%Mesh ) + if (HD%y%Morison%VisMesh%Committed) then + call MeshWrVTK(p_FAST%TurbinePos, HD%y%Morison%VisMesh, trim(p_FAST%VTK_OutFileRoot)//'.HD_Morison', y_FAST%VTK_count, p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth, HD%Input(1)%Morison%Mesh ) + endif END IF ! SubDyn @@ -6157,6 +6162,20 @@ SUBROUTINE WrVTK_AllMeshes(p_FAST, y_FAST, MeshMapData, ED, BD, AD, IfW, ExtInfw call MeshWrVTK(p_FAST%TurbinePos, MD%y%CoupledLoads(1), trim(p_FAST%VTK_OutFileRoot)//'.MD_PtFairlead', y_FAST%VTK_count, p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth, MD%Input(1)%CoupledKinematics(1) ) !call MeshWrVTK(p_FAST%TurbinePos, MD%Input(1)%CoupledKinematics, trim(p_FAST%VTK_OutFileRoot)//'.MD_PtFair_motion', y_FAST%VTK_count, p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth ) end if + if (allocated(MD%y%VisLinesMesh)) then + do j=1,size(MD%y%VisLinesMesh) + if (MD%y%VisLinesMesh(j)%Committed) then + call MeshWrVTK(p_FAST%TurbinePos, MD%y%VisLinesMesh(j), trim(p_FAST%VTK_OutFileRoot)//'.MD_Line'//trim(Num2LStr(j)), y_FAST%VTK_count, p_FAST%VTK_fields, ErrSTat2, ErrMsg2, p_FAST%VTK_tWidth ) + endif + enddo + endif + if (allocated(MD%y%VisRodsMesh)) then + do j=1,size(MD%y%VisRodsMesh) + if (MD%y%VisRodsMesh(j)%Committed) then + call MeshWrVTK(p_FAST%TurbinePos, MD%y%VisRodsMesh(j), trim(p_FAST%VTK_OutFileRoot)//'.MD_Rod'//trim(Num2LStr(j)), y_FAST%VTK_count, p_FAST%VTK_fields, ErrSTat2, ErrMsg2, p_FAST%VTK_tWidth ) + endif + enddo + endif ! FEAMooring ELSEIF ( p_FAST%CompMooring == Module_FEAM ) THEN @@ -6219,7 +6238,7 @@ SUBROUTINE WrVTK_BasicMeshes(p_FAST, y_FAST, MeshMapData, ED, BD, AD, IfW, ExtIn TYPE(IceFloe_Data), INTENT(IN ) :: IceF !< IceFloe data TYPE(IceDyn_Data), INTENT(IN ) :: IceD !< All the IceDyn data used in time-step loop - INTEGER(IntKi) :: NumBl, k + INTEGER(IntKi) :: NumBl, k, j INTEGER(IntKi) :: ErrStat2 CHARACTER(ErrMsgLen) :: ErrMSg2 CHARACTER(*), PARAMETER :: RoutineName = 'WrVTK_BasicMeshes' @@ -6279,16 +6298,35 @@ SUBROUTINE WrVTK_BasicMeshes(p_FAST, y_FAST, MeshMapData, ED, BD, AD, IfW, ExtIn IF ( p_FAST%CompHydro == Module_HD .and. ALLOCATED(HD%Input)) THEN call MeshWrVTK(p_FAST%TurbinePos, HD%Input(1)%WAMITMesh, trim(p_FAST%VTK_OutFileRoot)//'.HD_WAMIT', y_FAST%VTK_count, & p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth, HD%y%WAMITMesh ) - call MeshWrVTK(p_FAST%TurbinePos, HD%Input(1)%Morison%Mesh, trim(p_FAST%VTK_OutFileRoot)//'.HD_Morison', y_FAST%VTK_count, & + call MeshWrVTK(p_FAST%TurbinePos, HD%Input(1)%Morison%Mesh, trim(p_FAST%VTK_OutFileRoot)//'.HD_MorisonPt', y_FAST%VTK_count, & p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth, HD%y%Morison%Mesh ) + if (HD%y%Morison%VisMesh%Committed) then + call MeshWrVTK(p_FAST%TurbinePos, HD%y%Morison%VisMesh, trim(p_FAST%VTK_OutFileRoot)//'.HD_Morison', y_FAST%VTK_count, & + p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth, HD%Input(1)%Morison%Mesh ) + endif END IF ! Mooring Lines? ! IF ( p_FAST%CompMooring == Module_MAP ) THEN ! call MeshWrVTK(p_FAST%TurbinePos, MAPp%Input(1)%PtFairDisplacement, trim(p_FAST%VTK_OutFileRoot)//'.MAP_PtFair_motion', y_FAST%VTK_count, p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth ) -! ELSEIF ( p_FAST%CompMooring == Module_MD ) THEN -! call MeshWrVTK(p_FAST%TurbinePos, MD%Input(1)%CoupledKinematics, trim(p_FAST%VTK_OutFileRoot)//'.MD_PtFair_motion', y_FAST%VTK_count, p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth ) + if ( p_FAST%CompMooring == Module_MD ) then + !call MeshWrVTK(p_FAST%TurbinePos, MD%Input(1)%CoupledKinematics, trim(p_FAST%VTK_OutFileRoot)//'.MD_PtFair_motion', y_FAST%VTK_count, p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth ) + if (allocated(MD%y%VisLinesMesh)) then + do j=1,size(MD%y%VisLinesMesh) + if (MD%y%VisLinesMesh(j)%Committed) then + call MeshWrVTK(p_FAST%TurbinePos, MD%y%VisLinesMesh(j), trim(p_FAST%VTK_OutFileRoot)//'.MD_Line'//trim(Num2LStr(j)), y_FAST%VTK_count, p_FAST%VTK_fields, ErrSTat2, ErrMsg2, p_FAST%VTK_tWidth ) + endif + enddo + endif + if (allocated(MD%y%VisRodsMesh)) then + do j=1,size(MD%y%VisRodsMesh) + if (MD%y%VisRodsMesh(j)%Committed) then + call MeshWrVTK(p_FAST%TurbinePos, MD%y%VisRodsMesh(j), trim(p_FAST%VTK_OutFileRoot)//'.MD_Rod'//trim(Num2LStr(j)), y_FAST%VTK_count, p_FAST%VTK_fields, ErrSTat2, ErrMsg2, p_FAST%VTK_tWidth ) + endif + enddo + endif + endif ! ELSEIF ( p_FAST%CompMooring == Module_FEAM ) THEN ! call MeshWrVTK(p_FAST%TurbinePos, FEAM%Input(1)%PtFairleadDisplacement, trim(p_FAST%VTK_OutFileRoot)//'FEAM_PtFair_motion', y_FAST%VTK_count, p_FAST%VTK_fields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth ) ! END IF @@ -6324,7 +6362,7 @@ SUBROUTINE WrVTK_Surfaces(t_global, p_FAST, y_FAST, MeshMapData, ED, BD, AD, IfW logical, parameter :: OutputFields = .FALSE. ! due to confusion about what fields mean on a surface, we are going to just output the basic meshes if people ask for fields - INTEGER(IntKi) :: NumBl, k + INTEGER(IntKi) :: NumBl, k, l INTEGER(IntKi) :: ErrStat2 CHARACTER(ErrMsgLen) :: ErrMSg2 CHARACTER(*), PARAMETER :: RoutineName = 'WrVTK_Surfaces' @@ -6397,26 +6435,38 @@ SUBROUTINE WrVTK_Surfaces(t_global, p_FAST, y_FAST, MeshMapData, ED, BD, AD, IfW ! call MeshWrVTK(p_FAST%TurbinePos, SD%y%y2Mesh, trim(p_FAST%VTK_OutFileRoot)//'.SD_y2Mesh_motion', y_FAST%VTK_count, OutputFields, ErrStat2, ErrMsg2 ) ! call MeshWrVTK(p_FAST%TurbinePos, SD%y%y3Mesh, trim(p_FAST%VTK_OutFileRoot)//'.SD_y3Mesh_motion', y_FAST%VTK_count, OutputFields, ErrStat2, ErrMsg2 ) ! END IF -!TODO: Fix below section for new Morison GJH 4/23/20 - ! - !IF ( HD%Input(1)%Morison%Mesh%Committed ) THEN - ! !if ( p_FAST%CompSub == Module_NONE ) then ! floating - ! ! OutputFields = .false. - ! !else - ! ! OutputFields = p_FAST%VTK_fields - ! !end if - ! - ! call MeshWrVTK_Ln2Surface (p_FAST%TurbinePos, HD%Input(1)%Morison%Mesh, trim(p_FAST%VTK_OutFileRoot)//'.MorisonSurface', & - ! y_FAST%VTK_count, OutputFields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth, p_FAST%VTK_Surface%NumSectors, & - ! p_FAST%VTK_Surface%MorisonRad, Sib=HD%y%Morison%Mesh ) - !END IF + + +! HydroDyn + IF ( HD%y%Morison%VisMesh%Committed ) THEN + call MeshWrVTK_Ln2Surface (p_FAST%TurbinePos, HD%y%Morison%VisMesh, trim(p_FAST%VTK_OutFileRoot)//'.MorisonSurface', & + y_FAST%VTK_count, OutputFields, ErrStat2, ErrMsg2, p_FAST%VTK_tWidth, p_FAST%VTK_Surface%NumSectors, & + p_FAST%VTK_Surface%MorisonVisRad ) + END IF ! Mooring Lines? ! IF ( p_FAST%CompMooring == Module_MAP ) THEN ! call MeshWrVTK(p_FAST%TurbinePos, MAPp%Input(1)%PtFairDisplacement, trim(p_FAST%VTK_OutFileRoot)//'.MAP_PtFair_motion', y_FAST%VTK_count, OutputFields, ErrStat2, ErrMsg2 ) -! ELSEIF ( p_FAST%CompMooring == Module_MD ) THEN -! call MeshWrVTK(p_FAST%TurbinePos, MD%Input(1)%CoupledKinematics, trim(p_FAST%VTK_OutFileRoot)//'.MD_PtFair_motion', y_FAST%VTK_count, OutputFields, ErrStat2, ErrMsg2 ) + if ( p_FAST%CompMooring == Module_MD ) THEN + !call MeshWrVTK(p_FAST%TurbinePos, MD%Input(1)%CoupledKinematics, trim(p_FAST%VTK_OutFileRoot)//'.MD_PtFair_motion', y_FAST%VTK_count, OutputFields, ErrStat2, ErrMsg2 ) + if (allocated(MD%y%VisLinesMesh)) then + do l=1,size(MD%y%VisLinesMesh) + if (MD%y%VisLinesMesh(l)%Committed) then ! No orientation data, so surface representation not possible + call MeshWrVTK(p_FAST%TurbinePos, MD%y%VisLinesMesh(l), trim(p_FAST%VTK_OutFileRoot)//'.MD_Line'//trim(Num2LStr(l)), y_FAST%VTK_count, p_FAST%VTK_fields, & + ErrSTat2, ErrMsg2, p_FAST%VTK_tWidth ) + endif + enddo + endif + if (allocated(MD%y%VisRodsMesh)) then + do l=1,size(MD%y%VisRodsMesh) + if (MD%y%VisRodsMesh(l)%Committed) then ! No orientation data, so surface representation not possible + call MeshWrVTK_Ln2Surface(p_FAST%TurbinePos, MD%y%VisRodsMesh(l), trim(p_FAST%VTK_OutFileRoot)//'.MD_Rod'//trim(Num2LStr(l))//'Surface', y_FAST%VTK_count, p_FAST%VTK_fields, & + ErrSTat2, ErrMsg2, p_FAST%VTK_tWidth, NumSegments=p_FAST%VTK_Surface%NumSectors, Radius=MD%p%VisRodsDiam(l)%Diam ) + endif + enddo + endif + endif ! ELSEIF ( p_FAST%CompMooring == Module_FEAM ) THEN ! call MeshWrVTK(p_FAST%TurbinePos, FEAM%Input(1)%PtFairleadDisplacement, trim(p_FAST%VTK_OutFileRoot)//'FEAM_PtFair_motion', y_FAST%VTK_count, OutputFields, ErrStat2, ErrMsg2 ) ! END IF @@ -6623,8 +6673,8 @@ SUBROUTINE WriteInputMeshesToFile(u_ED, u_AD, u_SD, u_HD, u_MAP, u_BD, FileName, CALL MeshWrBin( unOut, u_ED%PlatformPtMesh, ErrStat, ErrMsg ) CALL MeshWrBin( unOut, u_SD%TPMesh, ErrStat, ErrMsg ) CALL MeshWrBin( unOut, u_SD%LMesh, ErrStat, ErrMsg ) - CALL MeshWrBin( unOut, u_HD%Morison%Mesh, ErrStat, ErrMsg ) - CALL MeshWrBin( unOut, u_HD%WAMITMesh, ErrStat, ErrMsg ) + CALL MeshWrBin( unOut, u_HD%Morison%Mesh, ErrStat, ErrMsg ) + CALL MeshWrBin( unOut, u_HD%WAMITMesh, ErrStat, ErrMsg ) CALL MeshWrBin( unOut, u_MAP%PtFairDisplacement, ErrStat, ErrMsg ) ! Add how many BD blade meshes there are: NumBl = SIZE(u_BD,1) ! Note that NumBl is B4Ki diff --git a/modules/openfast-library/src/FAST_Types.f90 b/modules/openfast-library/src/FAST_Types.f90 index 55e16b222..5b39daed8 100644 --- a/modules/openfast-library/src/FAST_Types.f90 +++ b/modules/openfast-library/src/FAST_Types.f90 @@ -95,7 +95,7 @@ MODULE FAST_Types REAL(SiKi) , DIMENSION(:,:), ALLOCATABLE :: WaveElevXY !< X-Y locations for WaveElev output (for visualization). First dimension is the X (1) and Y (2) coordinate. Second dimension is the point number. [m,-] REAL(SiKi) , DIMENSION(:,:), ALLOCATABLE :: WaveElev !< wave elevation at WaveElevXY; first dimension is time step; second dimension is point number [m,-] TYPE(FAST_VTK_BLSurfaceType) , DIMENSION(:), ALLOCATABLE :: BladeShape !< AirfoilCoords for each blade [m] - REAL(SiKi) , DIMENSION(:), ALLOCATABLE :: MorisonRad !< radius of each Morison node [m] + REAL(SiKi) , DIMENSION(:), ALLOCATABLE :: MorisonVisRad !< radius of each Morison node [m] END TYPE FAST_VTK_SurfaceType ! ======================= ! ========= FAST_VTK_ModeShapeType ======= @@ -977,17 +977,17 @@ subroutine FAST_CopyVTK_SurfaceType(SrcVTK_SurfaceTypeData, DstVTK_SurfaceTypeDa if (ErrStat >= AbortErrLev) return end do end if - if (allocated(SrcVTK_SurfaceTypeData%MorisonRad)) then - LB(1:1) = lbound(SrcVTK_SurfaceTypeData%MorisonRad) - UB(1:1) = ubound(SrcVTK_SurfaceTypeData%MorisonRad) - if (.not. allocated(DstVTK_SurfaceTypeData%MorisonRad)) then - allocate(DstVTK_SurfaceTypeData%MorisonRad(LB(1):UB(1)), stat=ErrStat2) + if (allocated(SrcVTK_SurfaceTypeData%MorisonVisRad)) then + LB(1:1) = lbound(SrcVTK_SurfaceTypeData%MorisonVisRad) + UB(1:1) = ubound(SrcVTK_SurfaceTypeData%MorisonVisRad) + if (.not. allocated(DstVTK_SurfaceTypeData%MorisonVisRad)) then + allocate(DstVTK_SurfaceTypeData%MorisonVisRad(LB(1):UB(1)), stat=ErrStat2) if (ErrStat2 /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating DstVTK_SurfaceTypeData%MorisonRad.', ErrStat, ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating DstVTK_SurfaceTypeData%MorisonVisRad.', ErrStat, ErrMsg, RoutineName) return end if end if - DstVTK_SurfaceTypeData%MorisonRad = SrcVTK_SurfaceTypeData%MorisonRad + DstVTK_SurfaceTypeData%MorisonVisRad = SrcVTK_SurfaceTypeData%MorisonVisRad end if end subroutine @@ -1020,8 +1020,8 @@ subroutine FAST_DestroyVTK_SurfaceType(VTK_SurfaceTypeData, ErrStat, ErrMsg) end do deallocate(VTK_SurfaceTypeData%BladeShape) end if - if (allocated(VTK_SurfaceTypeData%MorisonRad)) then - deallocate(VTK_SurfaceTypeData%MorisonRad) + if (allocated(VTK_SurfaceTypeData%MorisonVisRad)) then + deallocate(VTK_SurfaceTypeData%MorisonVisRad) end if end subroutine @@ -1061,10 +1061,10 @@ subroutine FAST_PackVTK_SurfaceType(Buf, Indata) call FAST_PackVTK_BLSurfaceType(Buf, InData%BladeShape(i1)) end do end if - call RegPack(Buf, allocated(InData%MorisonRad)) - if (allocated(InData%MorisonRad)) then - call RegPackBounds(Buf, 1, lbound(InData%MorisonRad), ubound(InData%MorisonRad)) - call RegPack(Buf, InData%MorisonRad) + call RegPack(Buf, allocated(InData%MorisonVisRad)) + if (allocated(InData%MorisonVisRad)) then + call RegPackBounds(Buf, 1, lbound(InData%MorisonVisRad), ubound(InData%MorisonVisRad)) + call RegPack(Buf, InData%MorisonVisRad) end if if (RegCheckErr(Buf, RoutineName)) return end subroutine @@ -1145,18 +1145,18 @@ subroutine FAST_UnPackVTK_SurfaceType(Buf, OutData) call FAST_UnpackVTK_BLSurfaceType(Buf, OutData%BladeShape(i1)) ! BladeShape end do end if - if (allocated(OutData%MorisonRad)) deallocate(OutData%MorisonRad) + if (allocated(OutData%MorisonVisRad)) deallocate(OutData%MorisonVisRad) call RegUnpack(Buf, IsAllocAssoc) if (RegCheckErr(Buf, RoutineName)) return if (IsAllocAssoc) then call RegUnpackBounds(Buf, 1, LB, UB) if (RegCheckErr(Buf, RoutineName)) return - allocate(OutData%MorisonRad(LB(1):UB(1)),stat=stat) + allocate(OutData%MorisonVisRad(LB(1):UB(1)),stat=stat) if (stat /= 0) then - call SetErrStat(ErrID_Fatal, 'Error allocating OutData%MorisonRad.', Buf%ErrStat, Buf%ErrMsg, RoutineName) + call SetErrStat(ErrID_Fatal, 'Error allocating OutData%MorisonVisRad.', Buf%ErrStat, Buf%ErrMsg, RoutineName) return end if - call RegUnpack(Buf, OutData%MorisonRad) + call RegUnpack(Buf, OutData%MorisonVisRad) if (RegCheckErr(Buf, RoutineName)) return end if end subroutine diff --git a/modules/servodyn/src/BladedInterface_EX.f90 b/modules/servodyn/src/BladedInterface_EX.f90 index 4604a787f..37e77d097 100644 --- a/modules/servodyn/src/BladedInterface_EX.f90 +++ b/modules/servodyn/src/BladedInterface_EX.f90 @@ -405,35 +405,37 @@ subroutine InitLidarMeas() u%MsrPositionsZ = InitInp%MsrPositionsZ endif ! Write summary info to summary file - if (p%SensorType > 0) then ! Set these here rather than overwrite every loop step in SensorType 1 or 3 - J=LidarMsr_StartIdx - call WrSumInfoRcvd( J+0, '','Lidar input: Sensor Type') - call WrSumInfoRcvd( J+1, '','Lidar input: Number of Beams') - call WrSumInfoRcvd( J+2, '','Lidar input: Number of Pulse Gates') - call WrSumInfoRcvd( J+3, '','Lidar input: Reference average wind speed for the lidar') - endif - if (p%SensorType == 1) THEN - do I=1,min(p%NumBeam,(LidarMsr_MaxChan-4)/4) ! Don't overstep the end for the lidar measure group - J=LidarMsr_StartIdx + 4 + (I-1) - call WrSumInfoRcvd( J+0, '','Lidar input: Measured Wind Speeds ('//trim(Num2LStr(I))//')') - call WrSumInfoRcvd( J+p%NumBeam*1, '','Lidar input: Measurement Points X ('//trim(Num2LStr(I))//')') - call WrSumInfoRcvd( J+p%NumBeam*2, '','Lidar input: Measurement Points Y ('//trim(Num2LStr(I))//')') - call WrSumInfoRcvd( J+p%NumBeam*3, '','Lidar input: Measurement Points Z ('//trim(Num2LStr(I))//')') - enddo - elseif (p%SensorType == 2) THEN - J=LidarMsr_StartIdx - call WrSumInfoRcvd( J+4, '','Lidar input: Measured Wind Speeds') - call WrSumInfoRcvd( J+5, '','Lidar input: Measurement Points X') - call WrSumInfoRcvd( J+6, '','Lidar input: Measurement Points Y') - call WrSumInfoRcvd( J+7, '','Lidar input: Measurement Points Z') - elseif (p%SensorType == 3) THEN - do I=1,min(p%NumPulseGate,(LidarMsr_MaxChan-4)/4) ! Don't overstep the end for the lidar measure group - J=LidarMsr_StartIdx + 4 + (I-1) - call WrSumInfoRcvd( J+0, '','Lidar input: Measured Wind Speeds ('//trim(Num2LStr(I))//')') - call WrSumInfoRcvd( J+p%NumPulseGate*1, '','Lidar input: Measurement Points X ('//trim(Num2LStr(I))//')') - call WrSumInfoRcvd( J+p%NumPulseGate*2, '','Lidar input: Measurement Points Y ('//trim(Num2LStr(I))//')') - call WrSumInfoRcvd( J+p%NumPulseGate*3, '','Lidar input: Measurement Points Z ('//trim(Num2LStr(I))//')') - enddo + if (UnSum > 0) then + if (p%SensorType > 0) then ! Set these here rather than overwrite every loop step in SensorType 1 or 3 + J=LidarMsr_StartIdx + call WrSumInfoRcvd( J+0, '','Lidar input: Sensor Type') + call WrSumInfoRcvd( J+1, '','Lidar input: Number of Beams') + call WrSumInfoRcvd( J+2, '','Lidar input: Number of Pulse Gates') + call WrSumInfoRcvd( J+3, '','Lidar input: Reference average wind speed for the lidar') + endif + if (p%SensorType == 1) THEN + do I=1,min(p%NumBeam,(LidarMsr_MaxChan-4)/4) ! Don't overstep the end for the lidar measure group + J=LidarMsr_StartIdx + 4 + (I-1) + call WrSumInfoRcvd( J+0, '','Lidar input: Measured Wind Speeds ('//trim(Num2LStr(I))//')') + call WrSumInfoRcvd( J+p%NumBeam*1, '','Lidar input: Measurement Points X ('//trim(Num2LStr(I))//')') + call WrSumInfoRcvd( J+p%NumBeam*2, '','Lidar input: Measurement Points Y ('//trim(Num2LStr(I))//')') + call WrSumInfoRcvd( J+p%NumBeam*3, '','Lidar input: Measurement Points Z ('//trim(Num2LStr(I))//')') + enddo + elseif (p%SensorType == 2) THEN + J=LidarMsr_StartIdx + call WrSumInfoRcvd( J+4, '','Lidar input: Measured Wind Speeds') + call WrSumInfoRcvd( J+5, '','Lidar input: Measurement Points X') + call WrSumInfoRcvd( J+6, '','Lidar input: Measurement Points Y') + call WrSumInfoRcvd( J+7, '','Lidar input: Measurement Points Z') + elseif (p%SensorType == 3) THEN + do I=1,min(p%NumPulseGate,(LidarMsr_MaxChan-4)/4) ! Don't overstep the end for the lidar measure group + J=LidarMsr_StartIdx + 4 + (I-1) + call WrSumInfoRcvd( J+0, '','Lidar input: Measured Wind Speeds ('//trim(Num2LStr(I))//')') + call WrSumInfoRcvd( J+p%NumPulseGate*1, '','Lidar input: Measurement Points X ('//trim(Num2LStr(I))//')') + call WrSumInfoRcvd( J+p%NumPulseGate*2, '','Lidar input: Measurement Points Y ('//trim(Num2LStr(I))//')') + call WrSumInfoRcvd( J+p%NumPulseGate*3, '','Lidar input: Measurement Points Z ('//trim(Num2LStr(I))//')') + enddo + endif endif end subroutine InitLidarMeas diff --git a/reg_tests/CMakeLists.txt b/reg_tests/CMakeLists.txt index c43aab0cc..156d28e54 100644 --- a/reg_tests/CMakeLists.txt +++ b/reg_tests/CMakeLists.txt @@ -18,7 +18,7 @@ # -- OpenFAST Testing # ----------------------------------------------------------- -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.15) project(OpenFAST_RegressionTest Fortran) include(CTest) @@ -42,7 +42,7 @@ option(CTEST_NO_RUN_FLAG "Complete the regression test comparison but do not ex # Set the OpenFAST executable configuration option and default set(CTEST_OPENFAST_EXECUTABLE "${CMAKE_BINARY_DIR}/glue-codes/openfast/openfast${CMAKE_EXECUTABLE_SUFFIX}" CACHE FILEPATH "Specify the OpenFAST executable to use in testing.") -if(BUILD_OPENFAST_CPP_API) +if(BUILD_OPENFAST_CPP_DRIVER) # Set the OpenFAST executable configuration option and default set(CTEST_OPENFASTCPP_EXECUTABLE "${CMAKE_BINARY_DIR}/glue-codes/openfast-cpp/openfastcpp${CMAKE_EXECUTABLE_SUFFIX}" CACHE FILEPATH "Specify the OpenFAST C++ executable to use in testing.") endif() @@ -161,6 +161,11 @@ add_custom_command( DEPENDS DISCON COMMAND "${CMAKE_COMMAND}" -E copy "${src}/DISCON/build/DISCON.dll" "${ff_dest}/DISCON_WT3.dll" ) +add_custom_command( + OUTPUT "${ff_dest}/DISCON_WT4.dll" + DEPENDS DISCON + COMMAND "${CMAKE_COMMAND}" -E copy "${src}/DISCON/build/DISCON.dll" "${ff_dest}/DISCON_WT4.dll" +) add_custom_target( regression_test_controllers @@ -174,6 +179,7 @@ add_custom_target( "${ff_dest}/DISCON_WT1.dll" "${ff_dest}/DISCON_WT2.dll" "${ff_dest}/DISCON_WT3.dll" + "${ff_dest}/DISCON_WT4.dll" ) add_custom_target( diff --git a/reg_tests/CTestList.cmake b/reg_tests/CTestList.cmake index e4c008514..ba9d67686 100644 --- a/reg_tests/CTestList.cmake +++ b/reg_tests/CTestList.cmake @@ -99,7 +99,7 @@ endfunction(of_aeromap_regression) function(of_fastlib_regression TESTNAME LABEL) set(TEST_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/executeOpenfastRegressionCase.py") - set(OPENFAST_EXECUTABLE "${CMAKE_BINARY_DIR}/glue-codes/openfast/openfast_cpp") + set(OPENFAST_EXECUTABLE "${CMAKE_BINARY_DIR}/glue-codes/openfast/openfast_cpp_driver") set(SOURCE_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/..") set(BUILD_DIRECTORY "${CTEST_BINARY_DIR}/glue-codes/openfast") # extra flag in call to "regression" on next line sets the ${TESTDIR} @@ -312,13 +312,15 @@ of_regression("Tailfin_FreeYaw1DOF_PolarBased" "openfast;elastodyn;aerod of_aeromap_regression("5MW_Land_AeroMap" "aeromap;elastodyn;aerodyn15") # OpenFAST C++ API test -if(BUILD_OPENFAST_CPP_API) +if(BUILD_OPENFAST_CPP_DRIVER) of_cpp_interface_regression("5MW_Land_DLL_WTurb_cpp" "openfast;fastlib;cpp") endif() # OpenFAST C++ Driver test for OpenFAST Library # This tests the FAST Library and FAST_Library.h -of_fastlib_regression("AWT_YFree_WSt" "fastlib;elastodyn;aerodyn15;servodyn") +if(BUILD_OPENFAST_CPP_DRIVER) + of_fastlib_regression("AWT_YFree_WSt" "fastlib;elastodyn;aerodyn15;servodyn") +endif(BUILD_OPENFAST_CPP_DRIVER) # OpenFAST Python API test of_regression_py("5MW_Land_DLL_WTurb_py" "openfast;fastlib;python;elastodyn;aerodyn15;servodyn") @@ -350,6 +352,7 @@ if(BUILD_FASTFARM) ff_regression("LESinflow" "fastfarm") # ff_regression("Uninflow_curl" "fastfarm") ff_regression("TSinflow_curl" "fastfarm") + ff_regression("ModAmb_3" "fastfarm") endif() # AeroDyn regression tests diff --git a/reg_tests/lib/errorPlotting.py b/reg_tests/lib/errorPlotting.py index 8d3d0d6e2..7de955b21 100644 --- a/reg_tests/lib/errorPlotting.py +++ b/reg_tests/lib/errorPlotting.py @@ -102,7 +102,7 @@ def _replace_id_script(html_string, plot): return html_string def _save_plot(script, div, path, attribute): - div_class = ' class="col-sm-12 col-md-12 col-lg-12"' + div_class = '' file_name = "_script".join((attribute, ".txt")) with open(os.path.join(path, file_name), 'w') as f: diff --git a/reg_tests/r-test b/reg_tests/r-test index de5b8f4e4..38d9da89f 160000 --- a/reg_tests/r-test +++ b/reg_tests/r-test @@ -1 +1 @@ -Subproject commit de5b8f4e47207b9589fbd740631ae5bda2bb5b2f +Subproject commit 38d9da89fa93c2790d9257a97205399946359aa9 diff --git a/vs-build/AeroDyn/AeroDyn_Driver.sln b/vs-build/AeroDyn/AeroDyn_Driver.sln index 032b12d2f..2941d4240 100644 --- a/vs-build/AeroDyn/AeroDyn_Driver.sln +++ b/vs-build/AeroDyn/AeroDyn_Driver.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.40629.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33529.622 MinimumVisualStudioVersion = 10.0.40219.1 Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "AeroDyn_Driver", "AeroDyn_Driver.vfproj", "{97CEFEB9-1DCB-470E-A231-E1DA2F21A9CE}" ProjectSection(ProjectDependencies) = postProject @@ -18,6 +18,8 @@ Global Debug|x64 = Debug|x64 Release_Double|Win32 = Release_Double|Win32 Release_Double|x64 = Release_Double|x64 + Release_OpenMP|Win32 = Release_OpenMP|Win32 + Release_OpenMP|x64 = Release_OpenMP|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection @@ -34,6 +36,10 @@ Global {97CEFEB9-1DCB-470E-A231-E1DA2F21A9CE}.Release_Double|Win32.Build.0 = Release_Double|Win32 {97CEFEB9-1DCB-470E-A231-E1DA2F21A9CE}.Release_Double|x64.ActiveCfg = Release_Double|x64 {97CEFEB9-1DCB-470E-A231-E1DA2F21A9CE}.Release_Double|x64.Build.0 = Release_Double|x64 + {97CEFEB9-1DCB-470E-A231-E1DA2F21A9CE}.Release_OpenMP|Win32.ActiveCfg = Release_OpenMP|Win32 + {97CEFEB9-1DCB-470E-A231-E1DA2F21A9CE}.Release_OpenMP|Win32.Build.0 = Release_OpenMP|Win32 + {97CEFEB9-1DCB-470E-A231-E1DA2F21A9CE}.Release_OpenMP|x64.ActiveCfg = Release_OpenMP|x64 + {97CEFEB9-1DCB-470E-A231-E1DA2F21A9CE}.Release_OpenMP|x64.Build.0 = Release_OpenMP|x64 {97CEFEB9-1DCB-470E-A231-E1DA2F21A9CE}.Release|Win32.ActiveCfg = Release|Win32 {97CEFEB9-1DCB-470E-A231-E1DA2F21A9CE}.Release|Win32.Build.0 = Release|Win32 {97CEFEB9-1DCB-470E-A231-E1DA2F21A9CE}.Release|x64.ActiveCfg = Release|x64 @@ -50,6 +56,10 @@ Global {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_Double|Win32.Build.0 = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_Double|x64.ActiveCfg = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_Double|x64.Build.0 = Release|Win32 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|Win32.ActiveCfg = Release|Win32 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|Win32.Build.0 = Release|Win32 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|x64.ActiveCfg = Release|Win32 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|x64.Build.0 = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release|Win32.ActiveCfg = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release|Win32.Build.0 = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release|x64.ActiveCfg = Release|Win32 @@ -58,4 +68,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B3809791-8085-4B91-AC43-EB756F90F448} + EndGlobalSection EndGlobal diff --git a/vs-build/AeroDyn/AeroDyn_Driver.vfproj b/vs-build/AeroDyn/AeroDyn_Driver.vfproj index ee8c50a80..98a04e0a8 100644 --- a/vs-build/AeroDyn/AeroDyn_Driver.vfproj +++ b/vs-build/AeroDyn/AeroDyn_Driver.vfproj @@ -5,7 +5,7 @@ - + @@ -15,7 +15,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -35,7 +35,7 @@ - + @@ -45,7 +45,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -65,7 +65,7 @@ - + @@ -75,7 +75,7 @@ - + @@ -83,6 +83,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -90,9 +110,11 @@ - + + + @@ -101,6 +123,8 @@ + + @@ -124,19 +148,23 @@ - + + + - + - + + + @@ -161,6 +189,8 @@ + + @@ -169,6 +199,8 @@ + + @@ -201,6 +233,8 @@ + + @@ -209,6 +243,8 @@ + + @@ -231,6 +267,8 @@ + + @@ -239,6 +277,8 @@ + + @@ -262,6 +302,8 @@ + + @@ -270,6 +312,8 @@ + + @@ -299,6 +343,8 @@ + + @@ -307,6 +353,8 @@ + + @@ -330,19 +378,23 @@ - + + + - + - + + + @@ -379,6 +431,8 @@ + + @@ -387,6 +441,8 @@ + + @@ -405,6 +461,8 @@ + + @@ -413,6 +471,8 @@ + + @@ -422,6 +482,8 @@ + + @@ -430,6 +492,8 @@ + + @@ -457,6 +521,8 @@ + + @@ -465,6 +531,8 @@ + + @@ -491,6 +559,8 @@ + + @@ -499,6 +569,8 @@ + + @@ -511,6 +583,8 @@ + + @@ -519,6 +593,8 @@ + + @@ -528,6 +604,8 @@ + + @@ -536,6 +614,8 @@ + + @@ -546,6 +626,8 @@ + + @@ -554,6 +636,8 @@ + + @@ -563,6 +647,8 @@ + + @@ -571,6 +657,8 @@ + + @@ -580,6 +668,8 @@ + + @@ -588,6 +678,8 @@ + + @@ -597,6 +689,8 @@ + + @@ -605,6 +699,8 @@ + + @@ -614,6 +710,8 @@ + + @@ -622,6 +720,8 @@ + + @@ -631,6 +731,8 @@ + + @@ -639,6 +741,8 @@ + + @@ -648,6 +752,8 @@ + + @@ -656,6 +762,8 @@ + + @@ -665,6 +773,8 @@ + + @@ -673,6 +783,8 @@ + + @@ -682,6 +794,8 @@ + + @@ -690,6 +804,8 @@ + + @@ -699,6 +815,8 @@ + + @@ -707,6 +825,8 @@ + + @@ -716,6 +836,8 @@ + + @@ -724,15 +846,19 @@ - + - + + + + + @@ -741,15 +867,19 @@ - + - + + + + + @@ -758,11 +888,13 @@ - + - + + + @@ -790,6 +922,10 @@ + + + + @@ -807,6 +943,8 @@ + + @@ -815,6 +953,8 @@ + + diff --git a/vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln b/vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln index 8acc2f447..e9a379063 100644 --- a/vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln +++ b/vs-build/AeroDyn_Inflow_c_binding/AeroDyn_Inflow_c_binding.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.40629.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33529.622 MinimumVisualStudioVersion = 10.0.40219.1 Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "AeroDyn_Inflow_c_binding", "AeroDyn_Inflow_c_binding.vfproj", "{5D991B19-D4F1-4F29-8A9D-FC36DFF07290}" ProjectSection(ProjectDependencies) = postProject @@ -18,8 +18,6 @@ Global Debug|x64 = Debug|x64 Release_Double|Win32 = Release_Double|Win32 Release_Double|x64 = Release_Double|x64 - Release_OpenMP_Double|Win32 = Release_OpenMP_Double|Win32 - Release_OpenMP_Double|x64 = Release_OpenMP_Double|x64 Release_OpenMP|Win32 = Release_OpenMP|Win32 Release_OpenMP|x64 = Release_OpenMP|x64 Release|Win32 = Release|Win32 @@ -38,10 +36,6 @@ Global {5D991B19-D4F1-4F29-8A9D-FC36DFF07290}.Release_Double|Win32.Build.0 = Release_Double|Win32 {5D991B19-D4F1-4F29-8A9D-FC36DFF07290}.Release_Double|x64.ActiveCfg = Release_Double|x64 {5D991B19-D4F1-4F29-8A9D-FC36DFF07290}.Release_Double|x64.Build.0 = Release_Double|x64 - {5D991B19-D4F1-4F29-8A9D-FC36DFF07290}.Release_OpenMP_Double|Win32.ActiveCfg = Release_OpenMP_Double|Win32 - {5D991B19-D4F1-4F29-8A9D-FC36DFF07290}.Release_OpenMP_Double|Win32.Build.0 = Release_OpenMP_Double|Win32 - {5D991B19-D4F1-4F29-8A9D-FC36DFF07290}.Release_OpenMP_Double|x64.ActiveCfg = Release_OpenMP_Double|x64 - {5D991B19-D4F1-4F29-8A9D-FC36DFF07290}.Release_OpenMP_Double|x64.Build.0 = Release_OpenMP_Double|x64 {5D991B19-D4F1-4F29-8A9D-FC36DFF07290}.Release_OpenMP|Win32.ActiveCfg = Release_OpenMP|Win32 {5D991B19-D4F1-4F29-8A9D-FC36DFF07290}.Release_OpenMP|Win32.Build.0 = Release_OpenMP|Win32 {5D991B19-D4F1-4F29-8A9D-FC36DFF07290}.Release_OpenMP|x64.ActiveCfg = Release_OpenMP|x64 @@ -62,14 +56,10 @@ Global {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_Double|Win32.Build.0 = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_Double|x64.ActiveCfg = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_Double|x64.Build.0 = Release|Win32 - {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP_Double|Win32.ActiveCfg = Release_OpenMP_Double|Win32 - {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP_Double|Win32.Build.0 = Release_OpenMP_Double|Win32 - {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP_Double|x64.ActiveCfg = Release_OpenMP_Double|x64 - {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP_Double|x64.Build.0 = Release_OpenMP_Double|x64 - {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|Win32.ActiveCfg = Release_OpenMP|Win32 - {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|Win32.Build.0 = Release_OpenMP|Win32 - {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|x64.ActiveCfg = Release_OpenMP|x64 - {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|x64.Build.0 = Release_OpenMP|x64 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|Win32.ActiveCfg = Release|Win32 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|Win32.Build.0 = Release|Win32 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|x64.ActiveCfg = Release|Win32 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|x64.Build.0 = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release|Win32.ActiveCfg = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release|Win32.Build.0 = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release|x64.ActiveCfg = Release|Win32 diff --git a/vs-build/InflowWind/InflowWind_driver.sln b/vs-build/InflowWind/InflowWind_driver.sln index bb6d88cdf..c1f9d4753 100644 --- a/vs-build/InflowWind/InflowWind_driver.sln +++ b/vs-build/InflowWind/InflowWind_driver.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.40629.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33529.622 MinimumVisualStudioVersion = 10.0.40219.1 Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "InflowWind_driver", "InflowWind_driver.vfproj", "{3BBE2741-5B28-47BC-9E7F-3E1D172838FB}" ProjectSection(ProjectDependencies) = postProject @@ -18,6 +18,8 @@ Global Debug|x64 = Debug|x64 Release_Double|Win32 = Release_Double|Win32 Release_Double|x64 = Release_Double|x64 + Release_OpenMP|Win32 = Release_OpenMP|Win32 + Release_OpenMP|x64 = Release_OpenMP|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection @@ -34,6 +36,10 @@ Global {3BBE2741-5B28-47BC-9E7F-3E1D172838FB}.Release_Double|Win32.Build.0 = Release_Double|Win32 {3BBE2741-5B28-47BC-9E7F-3E1D172838FB}.Release_Double|x64.ActiveCfg = Release_Double|x64 {3BBE2741-5B28-47BC-9E7F-3E1D172838FB}.Release_Double|x64.Build.0 = Release_Double|x64 + {3BBE2741-5B28-47BC-9E7F-3E1D172838FB}.Release_OpenMP|Win32.ActiveCfg = Release_OpenMP|Win32 + {3BBE2741-5B28-47BC-9E7F-3E1D172838FB}.Release_OpenMP|Win32.Build.0 = Release_OpenMP|Win32 + {3BBE2741-5B28-47BC-9E7F-3E1D172838FB}.Release_OpenMP|x64.ActiveCfg = Release_OpenMP|x64 + {3BBE2741-5B28-47BC-9E7F-3E1D172838FB}.Release_OpenMP|x64.Build.0 = Release_OpenMP|x64 {3BBE2741-5B28-47BC-9E7F-3E1D172838FB}.Release|Win32.ActiveCfg = Release|Win32 {3BBE2741-5B28-47BC-9E7F-3E1D172838FB}.Release|Win32.Build.0 = Release|Win32 {3BBE2741-5B28-47BC-9E7F-3E1D172838FB}.Release|x64.ActiveCfg = Release|x64 @@ -50,6 +56,10 @@ Global {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_Double|Win32.Build.0 = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_Double|x64.ActiveCfg = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_Double|x64.Build.0 = Release|Win32 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|Win32.ActiveCfg = Release|Win32 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|Win32.Build.0 = Release|Win32 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|x64.ActiveCfg = Release|Win32 + {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release_OpenMP|x64.Build.0 = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release|Win32.ActiveCfg = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release|Win32.Build.0 = Release|Win32 {DA16A3A6-3297-4628-9E46-C6FA0E3C4D16}.Release|x64.ActiveCfg = Release|Win32 @@ -58,4 +68,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {85ED1246-76D4-47AA-8595-CA41DF479510} + EndGlobalSection EndGlobal diff --git a/vs-build/InflowWind/InflowWind_driver.vfproj b/vs-build/InflowWind/InflowWind_driver.vfproj index ceb7f5b44..35ec74eef 100644 --- a/vs-build/InflowWind/InflowWind_driver.vfproj +++ b/vs-build/InflowWind/InflowWind_driver.vfproj @@ -5,7 +5,7 @@ - + @@ -15,7 +15,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -35,7 +35,7 @@ - + @@ -45,7 +45,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -65,7 +65,7 @@ - + @@ -75,7 +75,7 @@ - + @@ -83,6 +83,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -93,6 +113,8 @@ + + @@ -101,6 +123,8 @@ + + @@ -110,6 +134,8 @@ + + @@ -118,6 +144,8 @@ + + @@ -127,6 +155,8 @@ + + @@ -135,6 +165,8 @@ + + @@ -146,6 +178,8 @@ + + @@ -154,6 +188,8 @@ + +