diff --git a/docs/OtherSupporting/HydroDyn/Breaking_Wave_Modeling_Approach_for_FAST.docx b/docs/OtherSupporting/HydroDyn/Breaking_Wave_Modeling_Approach_for_FAST.docx deleted file mode 100644 index 0a17aeea29..0000000000 Binary files a/docs/OtherSupporting/HydroDyn/Breaking_Wave_Modeling_Approach_for_FAST.docx and /dev/null differ diff --git a/docs/OtherSupporting/OutListParameters.xlsx b/docs/OtherSupporting/OutListParameters.xlsx index ded018604c..4bdee3aa4d 100644 Binary files a/docs/OtherSupporting/OutListParameters.xlsx and b/docs/OtherSupporting/OutListParameters.xlsx differ diff --git a/docs/source/user/aerodyn/examples/NodalOutputs.txt b/docs/source/user/aerodyn/examples/NodalOutputs.txt index 6cbbcea551..e1f3cd1e63 100644 --- a/docs/source/user/aerodyn/examples/NodalOutputs.txt +++ b/docs/source/user/aerodyn/examples/NodalOutputs.txt @@ -41,7 +41,7 @@ END of input file (the word "END" must appear in the first 3 columns of this las "Clrnc" - Tower clearance at each node (based on the absolute distance to the nearest point in the tower from blade node B#N# minus the local tower radius, in the deflected configuration); please note that this clearance is only approximate because the calculation assumes that the blade is a line with no volume (however, the calculation does use the local tower radius); when blade node B#N# is above the tower top (or below the tower base), the absolute distance to the tower top (or base) minus the local tower radius, in the deflected configuration, is output "Vx" - Local axial velocity "Vy" - Local tangential velocity -"GeomPhi" - Geometric phi? If phi was solved using normal BEMT equations, GeomPhi = 1; otherwise, if it was solved geometrically, GeomPhi = 0. +"GeomPhi" - Geometric phi? If phi was solved using normal BEMT equations, GeomPhi = 0; otherwise, if it was solved geometrically, GeomPhi = 1. "Chi" - Skew angle (used in skewed wake correction) -- not available for OLAF "UA_Flag" - Flag indicating if UA is turned on for this node. -- not available for OLAF "CpMin" - Pressure coefficient diff --git a/docs/source/user/api_change.rst b/docs/source/user/api_change.rst index a00a37e1fa..9a2087ff80 100644 --- a/docs/source/user/api_change.rst +++ b/docs/source/user/api_change.rst @@ -29,11 +29,11 @@ the input files specified in the first section. The `MirrorRotor` line sets a fl reverse the direction the rotor is spinning. The first rotor always spins in the typical direction. These lines are specified only if NRotors is greater than 1 and are repeated for subsequent rotors. -============================================= ======== ==================== ======================================================================================================================================================================================================== +============================================= ======== ==================== ========================================================================================================================================================================================================================================================================================================== Added in OpenFAST `5.0.0` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Module Line Flag Name Example Value -============================================= ======== ==================== ======================================================================================================================================================================================================== +============================================= ======== ==================== ========================================================================================================================================================================================================================================================================================================== OpenFAST 8 ModCoupling 3 ModCoupling - Module coupling method (switch) {1=loose; 2=tight with fixed Jacobian updates (DT_UJac); 3=tight with automatic Jacobian updates} OpenFAST 11 RhoInf 1.0 RhoInf - Numerical damping parameter for tight coupling generalized-alpha integrator (-) [0.0 to 1.0] OpenFAST 12 ConvTol 1e-4 ConvTol - Convergence iteration error tolerance for tight coupling generalized alpha integrator (-) @@ -69,6 +69,19 @@ ElastoDyn 79 PBrIner(3) 200 ElastoDyn 80 BlPIner(1) 28578 BlPIner(1) - Pitch inertia of an undeflected blade, blade 1 (kg m^2) ElastoDyn 81 BlPIner(2) 28578 BlPIner(2) - Pitch inertia of an undeflected blade, blade 2 (kg m^2) ElastoDyn 82 BlPIner(3) 28578 BlPIner(3) - Pitch inertia of an undeflected blade, blade 3 (kg m^2) [unused for 2 blades] +ExtPtfm 8 RBMod 0 RBMod - Method for handling rigid-body motion (switch) {0: No special handling for rigid-body motion; 1: Transform to rigid-body frame of reference; 2: Transform to rigid-body frame of reference and add fictitious forces and exact self-weight} +ExtPtfm 16 ---------------------- CONNECTION INPUTS --------------------------------------- +ExtPtfm 17 Connections False Connections - Flag for connection points on the structure (flag) +ExtPtfm 18 Conn_FileName "not_used" Conn_FileName - Path of the file containing connection points (-) +ExtPtfm 19 ---------------------- USER FORCING INPUTS --------------------------------------- +ExtPtfm 20 UserForcing False UserForcing - Flag for user-prescribed modal forcing (flag) +ExtPtfm 21 Force_FileName "not_used" Force_FileName - Path of the file containing user forcing time series (-) +ExtPtfm 22 ConnForcing False ConnForcing - Flag for user-prescribed connection forcing (flag) +ExtPtfm 23 FCOnn_FileName "not_used" FConn_FileName - Path of the file containing user connection force time series (-) +ExtPtfm superelement input file Redesigned input file. See ExtPtfm user documentation. +ExtPtfm connection input file New input file. See ExtPtfm user documentation. +ExtPtfm user modal forcing file New input file. See ExtPtfm user documentation. +ExtPtfm user connection forcing file New input file. See ExtPtfm user documentation. BeamDyn blade file 10 ------ Modal Damping [used only if damp_type=2] -------------------------------- BeamDyn blade file 11 n_modes 3 n_modes - Number of modal damping coefficients (-) BeamDyn blade file 12 zeta 0.1, 0.2, 0.3 zeta - Damping coefficients for mode 1 through n_modes @@ -81,6 +94,16 @@ ServoDyn 14 PitSpr(3) 3.6E ServoDyn 15 PitDamp(1) 1.4E6 PitDamp(1) - Blade 1 pitch damping constant ServoDyn 16 PitDamp(2) 1.4E6 PitDamp(2) - Blade 2 pitch damping constant ServoDyn 17 PitDamp(3) 1.4E6 PitDamp(3) - Blade 3 pitch damping constant *[unused for 2 blades]* +SubDyn driver input file 12 NTPs 3 NTPs - Number of transition pieces +SubDyn driver input file 13 TP_RefPoint_X 0 1 2 TP_RefPoint_X - X location of the TP reference points in global coordinates (m) {require NTPs entries} +SubDyn driver input file 14 TP_RefPoint_Y 0 0 0 TP_RefPoint_Y - Y location of the TP reference points in global coordinates (m) {require NTPs entries} +SubDyn driver input file 15 TP_RefPoint_Z 0 0 0 TP_RefPoint_Z - Z location of the TP reference points in global coordinates (m) {require NTPs entries} +SubDyn \* ------- INITIAL RIGID-BODY POSITION [used only for floating structures with more than one transition pieces] ------- +SubDyn \* RBSurge RBSway RBHeave RBRoll RBPitch RBYaw +SubDyn \* (m) (m) (m) (deg) (deg) (deg) +SubDyn \* 0.0 0.0 0.0 0.0 0.0 0.0 +HydroDyn driver input file 18 NAddDOF 0 NAddDOF - Number of additional generalized DOF of the WAMIT body (-) +HydroDyn 27 NAddDOF 0 NAddDOF - Number of additional generalized DOF of each WAMIT body (-) [1 to NBody] [>=0; =0 if NBody>1; only used when PotMod=1] HydroDyn \* HstMod 1 HstMod - Method of computing hydrostatic loads. (0: Up to the still water level. 1: Up to the instantaneous free surface) *[overwrite to 0 when WaveStMod = 0 in SeaState]* FAST.Farm 35 --- AMBIENT WIND: AMReX MODULE --- [used only for Mod_AmbWind=4] FAST.Farm 36 WindDirPrefix "inflow/ffboxes" WindDirPrefix - Directory prefix of AMReX wind sub-volumes {0=low-res, 1+=high-res} (quoted string) @@ -90,15 +113,15 @@ FAST.Farm 39 DT_High-AMReX 1.0 FAST.Farm 50 NumDFull DEFAULT NumDFull - Distance of full wake propagation, expressed as a multiple of RotorDiamRef [>0.0] or DEFAULT [DEFAULT=15] FAST.Farm 51 NumDBuff DEFAULT NumDBuff - Length of wake propagation buffer region, expressed as a multiple of RotorDiamRef [>=0.0] or DEFAULT [DEFAULT=5] SoilDyn all New module -============================================= ======== ==================== ======================================================================================================================================================================================================== +============================================= ======== ==================== ========================================================================================================================================================================================================================================================================================================== -============================================= ======== ==================== ======================================================================================================================================================================================================== +============================================= ======== ==================== ========================================================================================================================================================================================================================================================================================================== Modified in OpenFAST `5.0.0` ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Module Line Flag Name Example Value -============================================= ======== ==================== ======================================================================================================================================================================================================== +============================================= ======== ==================== ========================================================================================================================================================================================================================================================================================================== AeroDyn blade file 5 BlSpn BlCrvAC BlSwpAC BlCrvAng BlTwist BlChord BlAFID t_c BlCb BlCenBn BlCenBt BlCpn BlCpt BlCan BlCat BlCam AeroDyn blade file 6 (m) (m) (m) (deg) (deg) (m) (-) (-) (-) (m) (m) (-) (-) (-) (-) (-) AeroDyn \* ====== Hub Properties ============================================================================== [used only when MHK=1 or 2] @@ -107,7 +130,16 @@ AeroDyn \* ==== AeroDyn \* NumTwrNds 5 NumTwrNds - Number of tower nodes used in the analysis (-) [used only when TwrPotent/=0, TwrShadow/=0, TwrAero=True, or MHK=1 or 2] AeroDyn \* TwrElev TwrDiam TwrCd TwrTI TwrCb TwrCp TwrCa !TwrTI used only with TwrShadow=2, TwrCb/TwrCp/TwrCa used only with MHK=1 or 2 AeroDyn \* (m) (m) (-) (-) (-) (-) (-) -============================================= ======== ==================== ======================================================================================================================================================================================================== +ServoDyn StC input file 6 StC_DOF_mode 1 StC_DOF_mode - DOF mode (switch) {0: No StC or TLCD DOF; 1: StC_X_DOF, StC_Y_DOF, and/or StC_Z_DOF (three independent StC DOFs); 2: StC_XY_DOF (Omni-Directional StC); 3: StC_XYZ_DOF (Omni-Directional StC); 5: TLCD; 6: Prescribed force/moment time series; 7: Force determined by external DLL} +ServoDyn StC input file 30 StC_Omni_M 100.0 StC_Omni_M - StC omni mass (kg) [used only when StC_DOF_MODE=2 or 3] +ServoDyn StC input file \* StC_CMODE 0 StC_CMODE - Control mode (switch) {0:none; 1: Semi-Active Control Mode; 3: Active Control Mode through user subroutine; 4: Active Control Mode through Simulink (not available); 5: Active Control Mode through Bladed interface} +SubDyn 15 GuyanDampSize 18 GuyanDampSize (6nTP-by-6nTP if fixed bottom or 6(nTP-1)-by-6(nTP-1) if floating) [only if GuyanDampMod=2] +SubDyn \* IJointID TPID ItfTDXss ItfTDYss ItfTDZss ItfRDXss ItfRDYss ItfRDZss ![Global Coordinate System] +SubDyn \* (-) (-) (flag) (flag) (flag) (flag) (flag) (flag) +SubDyn \* 1 1 1 1 1 1 1 1 ! Added TPID +SubDyn \* NPropSetsCyl 1 NPropSetsCyl - Number of structurally unique circular cross-sections (if 0 the following table is ignored) +SubDyn \* NPropSetsRec 1 NPropSetsRec - Number of structurally unique rectangular cross-sections (if 0 the following table is ignored) +============================================= ======== ==================== ========================================================================================================================================================================================================================================================================================================== @@ -124,6 +156,9 @@ BeamDyn \* PitchK 2000 BeamDyn \* PitchC 500000 PitchC - Pitch actuator damping (kg-m^2/s) [used only when UsePitchAct is true] ElastoDyn Blade Input File \* The PitchAxis column has been removed from the DISTRIBUTED BLADE PROPERTIES table. The table should now only have 5 columns: BlFract, StrcTwst, BMassDen, FlpStff, and EdgStff FAST.Farm 50 NumPlanes 140 NumPlanes - Number of wake planes (-) [>=2] +SubDyn driver input file 12 TP_RefPoint 0 0 0 TP_RefPoint - Location (x,y,z) of the TP reference point in global coordinates (m) +ExtPtfm 8 FileFormat 1 FileFormat - File Format {0:Guyan; 1:FlexASCII} (switch) +ExtPtfm 10 RedCst_FileName "NA" RedCst_FileName - Path of the file containing Guyan/Craig-Bampton constant inputs (-) (currently unused) ============================================= ======== ==================== ======================================================================================================================================================================================================== New Modules in v5.0.0 diff --git a/docs/source/user/hydrodyn/index.rst b/docs/source/user/hydrodyn/index.rst index 309e63a72d..421b962dea 100644 --- a/docs/source/user/hydrodyn/index.rst +++ b/docs/source/user/hydrodyn/index.rst @@ -37,7 +37,6 @@ of HydroDyn. - :download:`Implementation Plan - 2nd-order Forces Within HydroDyn <../../../OtherSupporting/HydroDyn/HydroDyn_2ndOrderForces_Plan.pdf>` - :download:`Implementation Plan - 2nd-order Wave Kinematics Within HydroDyn <../../../OtherSupporting/HydroDyn/WAVE2_document.pdf>` - :download:`Plan for Adding Wave Stretching to HydroDyn <../../../OtherSupporting/HydroDyn/HydroDyn_WaveStretching_Plan.docx>` -- :download:`Breaking Wave Modeling Approach for FAST <../../../OtherSupporting/HydroDyn/Breaking_Wave_Modeling_Approach_for_FAST.docx>` HydroDyn allows for multiple approaches for calculating the hydrodynamic diff --git a/docs/source/user/hydrodyn/input_files.rst b/docs/source/user/hydrodyn/input_files.rst index 914d8e914c..aea6e67ff4 100644 --- a/docs/source/user/hydrodyn/input_files.rst +++ b/docs/source/user/hydrodyn/input_files.rst @@ -429,11 +429,12 @@ must match the modes in the 1st-order WAMIT-style input files, i.e., the .1, .3, and .hst files. The convention for the WAMIT-style input files requires the first 6 modes to be rigid-body modes always, and the additional generalized modes are numbered from 7 onward. The total number of modes in the 1st-order -WAMIT-style input files should be **6+NAddDOF** for each body. Currently, only -one potential-flow body is allowed when additional degrees of freedom are used, -requiring **NBody = 1**. In this case, the choice of **NBodyMod** does not -matter. If more than one potential-flow bodies are present, **NAddDOF** should -be populated with **NBody** zeros. This because, internally, HydroDyn supports +WAMIT-style input files should be **6+NAddDOF** for each body. + +Currently, only one potential-flow body is allowed when additional degrees of +freedom are used, requiring **NBody = 1**. In this case, the choice of **NBodyMod** +does not matter. If more than one potential-flow bodies are present, **NAddDOF** +should be populated with **NBody** zeros. This because, internally, HydroDyn supports additional degrees of freedom for an arbitrary number of bodies with any of the **NBodyMod** options. The limitation of one potential-flow body only is due to constraints with coupling to ExtPtfm, the only module that can make use of the @@ -442,6 +443,11 @@ been implemented for 2nd-order loads; therefore, the 2nd-order WAMIT-style input files, if included, should always contain **6NBody** modes irrespective of **NAddDOF**. Finally, when **NAddDOF > 0**, **WAMITULEN** must be 1. +In addition to being limited to one potential-flow body, **NAddDOF > 0** is only +supported when **ExctnMod** = 0 or 1 and **RdtnMod** = 0 or 1. State-space +wave-excitation and wave-radiation models are not supported. **NAddDOF** is not +used when **PotMod** = 0 or 2. + Currently, the HydroDyn loads for the additional degrees of freedom can only be used by the ExtPtfm module of OpenFAST with externally generated structural mass (M), stiffness (K), and damping (C) matrices. This workflow is intended for diff --git a/modules/aerodyn/src/AeroDyn.f90 b/modules/aerodyn/src/AeroDyn.f90 index a96e045792..f78f205523 100644 --- a/modules/aerodyn/src/AeroDyn.f90 +++ b/modules/aerodyn/src/AeroDyn.f90 @@ -1976,18 +1976,27 @@ subroutine AD_CalcWind(t, u, FLowField, p, m, o, Inflow, ErrStat, ErrMsg) ! OLAF points if (allocated(o%WakeLocationPoints) .and. allocated(Inflow%InflowWakeVel)) then ! If rotor is MHK, add water depth to z coordinate - if (p%FVW%MHK > 0) then + if (p%FVW%MHK /= MHK_None) then PosOffset = [0.0_ReKi, 0.0_ReKi, p%FVW%WtrDpth] else PosOffset = 0.0_ReKi end if - call IfW_FlowField_GetVelAcc(FlowField, StartNode, t, & - o%WakeLocationPoints, & - Inflow%InflowWakeVel, & - NoAcc, ErrStat2, ErrMsg2, & - BoxExceedAllow=.true., PosOffset=PosOffset) - if(Failed()) return + if (p%FVW%MHK /= MHK_None .and. p%CompSeaSt) then ! MHK turbines with waves + call WaveField_GetWaveVelAcc_AD(p%WaveField, m%WaveField_m, & + StartNode, t, & + o%WakeLocationPoints, & + Inflow%InflowWakeVel, & + NoAcc, ErrStat2, ErrMsg2) + if(Failed()) return + else + call IfW_FlowField_GetVelAcc(FlowField, StartNode, t, & + o%WakeLocationPoints, & + Inflow%InflowWakeVel, & + NoAcc, ErrStat2, ErrMsg2, & + BoxExceedAllow=.true., PosOffset=PosOffset) + if(Failed()) return + end if StartNode = StartNode + size(o%WakeLocationPoints) end if @@ -2034,7 +2043,7 @@ subroutine AD_CalcWind_Rotor(t, u, FlowField, p, p_AD, m, RotInflow, StartNode, call WaveField_GetWaveVelAcc_AD(p_AD%WaveField, m%WaveField_m, StartNode, t, & real(u%HubMotion%TranslationDisp + u%HubMotion%Position, ReKi), & RotInflow%InflowOnHub, NoAcc, ErrStat2, ErrMsg2) - if(Failed()) return + if(Failed()) return else RotInflow%InflowOnHub = 0.0_ReKi end if @@ -2085,7 +2094,7 @@ subroutine AD_CalcWind_Rotor(t, u, FlowField, p, p_AD, m, RotInflow, StartNode, call IfW_FlowField_GetVelAcc(FlowField, StartNode, t, & real(u%HubMotion%TranslationDisp + u%HubMotion%Position, ReKi), & RotInflow%InflowOnHub, NoAcc, ErrStat2, ErrMsg2, PosOffset=PosOffset) - if(Failed()) return + if(Failed()) return else RotInflow%InflowOnHub = 0.0_ReKi end if @@ -2469,7 +2478,7 @@ subroutine RotCavtCrit(u, p, m, errStat, errMsg) SigmaCavitCrit = ( p%rotors(iR)%Patm + ( p%rotors(iR)%Gravity * ( abs( u%rotors(iR)%BladeMotion(j)%Position(3,i) + u%rotors(iR)%BladeMotion(j)%TranslationDisp(3,i) ) + p%rotors(iR)%MSL2SWL ) * p%rotors(iR)%airDens ) - p%rotors(iR)%Pvap ) / ( 0.5_ReKi * p%rotors(iR)%airDens * Vreltemp**2 ) ! Critical value of Sigma, cavitation occurs if local cavitation number is greater than this if ( ( SigmaCavitCrit < SigmaCavit ) .and. ( .not. ( m%rotors(iR)%CavitWarnSet(i,j) ) ) ) then - call WrScr( NewLine//'Cavitation occurred at blade '//trim(num2lstr(j))//' and node '//trim(num2lstr(i))//'.' ) + call WrScr( NewLine//'Cavitation occurred at rotor '//trim(num2lstr(iR))//', blade '//trim(num2lstr(j))//', and node '//trim(num2lstr(i))//'.' ) m%rotors(iR)%CavitWarnSet(i,j) = .true. end if @@ -3208,7 +3217,7 @@ end subroutine SetDisturbedInflow !! Loop on blade nodes and computed a weighted sector average inflow at each node subroutine SetSectAvgInflow(t, p, p_AD, u, RotInflow, m, errStat, errMsg) real(DbKi), intent(in ) :: t !< Current simulation time in seconds - type(RotParameterType), intent(in ) :: p !< AD parameters + type(RotParameterType), intent(in ) :: p !< Rotor parameters type(AD_ParameterType), intent(in ) :: p_AD !< AD parameters type(RotInputType), intent(in ) :: u !< AD Inputs at Time type(RotInflowType), intent(in ) :: RotInflow !< Rotor inflow at Time @@ -3227,6 +3236,7 @@ subroutine SetSectAvgInflow(t, p, p_AD, u, RotInflow, m, errStat, errMsg) real(ReKi) :: e_t(3) !< Polar unit vector perpendicular to rHA_perp ("e_theta") real(ReKi) :: psi !< Azimuthal offset in the current sector, runs from -psi_bwd to psi_fwd real(ReKi) :: dpsi !< Azimuthal increment + real(ReKi) :: PosOffset(3)!< IfW position offset for MHK turbines real(ReKi), allocatable :: SectPos(:,:)!< Points used to define a given sector (for a given blade node A) real(ReKi), allocatable :: SectVel(:,:)!< Inflow velocity at a given sector (Undisturbed and then disturbed) real(ReKi), allocatable :: SectAcc(:,:)!< Inflow velocity at a given sector (Undisturbed and then disturbed) @@ -3293,7 +3303,21 @@ subroutine SetSectAvgInflow(t, p, p_AD, u, RotInflow, m, errStat, errMsg) ! --- Inflow on sector points ! Undisturbed - call IfW_FlowField_GetVelAcc(p_AD%FlowField, 1, t, SectPos, SectVel, SectAcc, errStat=errStat2, errMsg=errMsg2); if(Failed()) return + if (p%MHK /= MHK_None .and. p_AD%CompSeaSt) then ! MHK turbines with waves + call WaveField_GetWaveVelAcc_AD(p_AD%WaveField, m%WaveField_m, 1_IntKi, t, & + SectPos, SectVel, SectAcc, ErrStat2, ErrMsg2) + if(Failed()) return + else + if (p%MHK /= MHK_None) then + PosOffset = [0.0_ReKi, 0.0_ReKi, p%WtrDpth] + else + PosOffset = 0.0_ReKi + end if + call IfW_FlowField_GetVelAcc(p_AD%FlowField, 1_IntKi, t, & + SectPos, SectVel, SectAcc, errStat=errStat2, errMsg=errMsg2, & + PosOffset=PosOffset); if(Failed()) return + end if + ! --- Option 1 Disturbed inflow Before averaging - SectVel is modified in place !if (p%TwrPotent /= TwrPotent_none .or. p%TwrShadow /= TwrShadow_none) then ! call TwrInflArray(p, u, RotInflow, m, SectPos, SectVel, errStat2, errMsg2); if(Failed()) return diff --git a/modules/aerodyn/src/AeroDyn_Registry.txt b/modules/aerodyn/src/AeroDyn_Registry.txt index d82817278f..1c1f30babf 100644 --- a/modules/aerodyn/src/AeroDyn_Registry.txt +++ b/modules/aerodyn/src/AeroDyn_Registry.txt @@ -517,6 +517,7 @@ typedef ^ RotMiscVarType ReKi TFinVrel_i 3 - - "Relative velocity at the refere typedef ^ RotMiscVarType ReKi TFinSTV_i 3 - - "Structural velocity at the reference point of the fin in the inertial system" typedef ^ RotMiscVarType ReKi TFinF_i 3 - - "Forces at the reference point of the fin in the inertial system" typedef ^ RotMiscVarType ReKi TFinM_i 3 - - "Moments at the reference point of the fin in the inertial system" +typedef ^ RotMiscVarType GridInterp_MiscVarType WaveField_m - - - "misc var information from the GridInterp module" typedef ^ MiscVarType RotMiscVarType rotors {:} - - "MiscVars for each rotor" - typedef ^ MiscVarType FVW_InputType FVW_u : - - "Inputs to the FVW module" - @@ -525,7 +526,7 @@ typedef ^ MiscVarType FVW_MiscVarType FVW - - - "MiscVars from the FVW module" - typedef ^ MiscVarType ReKi WindPos {:}{:} - - "XYZ coordinates to query for wind velocity/acceleration" - typedef ^ MiscVarType ReKi WindVel {:}{:} - - "XYZ components of wind velocity" - typedef ^ MiscVarType ReKi WindAcc {:}{:} - - "XYZ components of wind acceleration" - -typedef ^ MiscVarType GridInterp_MiscVarType WaveField_m - - - "misc var information from the SeaState WaveField module" - +typedef ^ MiscVarType GridInterp_MiscVarType WaveField_m - - - "misc var information from the GridInterp module" - typedef ^ MiscVarType AD_InflowType Inflow {:} - - "Inflow storage (size of u for history of inputs)" - typedef ^ MiscVarType AD_InputType u_perturb - - - "input perturbation for linearization" - typedef ^ MiscVarType AD_OutputType y_lin - - - "output perturbation for linearization" - diff --git a/modules/aerodyn/src/AeroDyn_Types.f90 b/modules/aerodyn/src/AeroDyn_Types.f90 index d7cc9f3738..01447c6f27 100644 --- a/modules/aerodyn/src/AeroDyn_Types.f90 +++ b/modules/aerodyn/src/AeroDyn_Types.f90 @@ -557,6 +557,7 @@ MODULE AeroDyn_Types REAL(ReKi) , DIMENSION(1:3) :: TFinSTV_i = 0.0_ReKi !< Structural velocity at the reference point of the fin in the inertial system [-] REAL(ReKi) , DIMENSION(1:3) :: TFinF_i = 0.0_ReKi !< Forces at the reference point of the fin in the inertial system [-] REAL(ReKi) , DIMENSION(1:3) :: TFinM_i = 0.0_ReKi !< Moments at the reference point of the fin in the inertial system [-] + TYPE(GridInterp_MiscVarType) :: WaveField_m !< misc var information from the GridInterp module [-] END TYPE RotMiscVarType ! ======================= ! ========= AD_MiscVarType ======= @@ -568,7 +569,7 @@ MODULE AeroDyn_Types REAL(ReKi) , DIMENSION(:,:), ALLOCATABLE :: WindPos !< XYZ coordinates to query for wind velocity/acceleration [-] REAL(ReKi) , DIMENSION(:,:), ALLOCATABLE :: WindVel !< XYZ components of wind velocity [-] REAL(ReKi) , DIMENSION(:,:), ALLOCATABLE :: WindAcc !< XYZ components of wind acceleration [-] - TYPE(GridInterp_MiscVarType) :: WaveField_m !< misc var information from the SeaState WaveField module [-] + TYPE(GridInterp_MiscVarType) :: WaveField_m !< misc var information from the GridInterp module [-] TYPE(AD_InflowType) , DIMENSION(:), ALLOCATABLE :: Inflow !< Inflow storage (size of u for history of inputs) [-] TYPE(AD_InputType) :: u_perturb !< input perturbation for linearization [-] TYPE(AD_OutputType) :: y_lin !< output perturbation for linearization [-] @@ -5553,6 +5554,9 @@ subroutine AD_CopyRotMiscVarType(SrcRotMiscVarTypeData, DstRotMiscVarTypeData, C DstRotMiscVarTypeData%TFinSTV_i = SrcRotMiscVarTypeData%TFinSTV_i DstRotMiscVarTypeData%TFinF_i = SrcRotMiscVarTypeData%TFinF_i DstRotMiscVarTypeData%TFinM_i = SrcRotMiscVarTypeData%TFinM_i + call GridInterp_CopyMisc(SrcRotMiscVarTypeData%WaveField_m, DstRotMiscVarTypeData%WaveField_m, CtrlCode, ErrStat2, ErrMsg2) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + if (ErrStat >= AbortErrLev) return end subroutine subroutine AD_DestroyRotMiscVarType(RotMiscVarTypeData, ErrStat, ErrMsg) @@ -5776,6 +5780,8 @@ subroutine AD_DestroyRotMiscVarType(RotMiscVarTypeData, ErrStat, ErrMsg) call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) call NWTC_Library_DestroyMeshMapType(RotMiscVarTypeData%T_P_2_T_L, ErrStat2, ErrMsg2) call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) + call GridInterp_DestroyMisc(RotMiscVarTypeData%WaveField_m, ErrStat2, ErrMsg2) + call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) end subroutine subroutine AD_PackRotMiscVarType(RF, Indata) @@ -5916,6 +5922,7 @@ subroutine AD_PackRotMiscVarType(RF, Indata) call RegPack(RF, InData%TFinSTV_i) call RegPack(RF, InData%TFinF_i) call RegPack(RF, InData%TFinM_i) + call GridInterp_PackMisc(RF, InData%WaveField_m) if (RegCheckErr(RF, RoutineName)) return end subroutine @@ -6083,6 +6090,7 @@ subroutine AD_UnPackRotMiscVarType(RF, OutData) call RegUnpack(RF, OutData%TFinSTV_i); if (RegCheckErr(RF, RoutineName)) return call RegUnpack(RF, OutData%TFinF_i); if (RegCheckErr(RF, RoutineName)) return call RegUnpack(RF, OutData%TFinM_i); if (RegCheckErr(RF, RoutineName)) return + call GridInterp_UnpackMisc(RF, OutData%WaveField_m) ! WaveField_m end subroutine subroutine AD_CopyMisc(SrcMiscData, DstMiscData, CtrlCode, ErrStat, ErrMsg) diff --git a/modules/aerodyn/src/FVW.f90 b/modules/aerodyn/src/FVW.f90 index d2fca5b80c..ab2cd72501 100644 --- a/modules/aerodyn/src/FVW.f90 +++ b/modules/aerodyn/src/FVW.f90 @@ -1489,6 +1489,10 @@ subroutine FVW_CalcOutput(t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg) character(*), intent( out) :: ErrMsg !< Error message if ErrStat /= ErrID_None ! Local variables integer(IntKi) :: nP + integer(IntKi) :: iStepFVW + logical, save :: FirstNotice_FreeNearWake = .true. + logical, save :: FirstNotice_NearWake = .true. + logical, save :: FirstNotice_FullWake = .true. integer(IntKi) :: ErrStat2 character(ErrMsgLen) :: ErrMsg2 character(*), parameter :: RoutineName = 'FVW_CalcOutput' @@ -1514,23 +1518,24 @@ subroutine FVW_CalcOutput(t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg) endif ! Write some info to screen when major milestone achieved - if (m%iStep == p%nNWFree .and. p%nNWFree0 .and. m%iStep== p%nNWMax+p%nFWMax) then + iStepFVW = floor(t/p%DTfvw+1.0E-6_DbKi) + if (FirstNotice_FullWake .and. iStepFVW == p%nNWMax+p%nFWMax) then nP = CountCPs(p, p%nNWMax, p%nFWMax) call WrScr(NewLine//'[INFO] OLAF wake is at full extent - '//trim(num2lstr(t))//'s, '//trim(num2lstr(nP))//' points.') - endif - + FirstNotice_FullWake = .false. + FirstNotice_NearWake = .false. + FirstNotice_FreeNearWake = .false. + elseif (FirstNotice_NearWake .and. iStepFVW == p%nNWMax) then ! implies p%nFWMax > 0 + nP = CountCPs(p, p%nNWMax, 0_IntKi) + call WrScr(NewLine//'[INFO] OLAF near wake is at full extent - '//trim(num2lstr(t))//'s, '//trim(num2lstr(nP))//' points.') + FirstNotice_NearWake = .false. + FirstNotice_FreeNearWake = .false. + elseif (FirstNotice_FreeNearWake .and. iStepFVW == p%nNWFree) then ! implies p%nNWFree p%NodesDOF(iSDNode)%List) ! Alias to shorten notations ! TODO TODO which orientation to give for joints with more than 6 dofs? @@ -894,8 +896,18 @@ SUBROUTINE SD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) y%Y2mesh%RotationAcc (:,iSDNode) = m%U_full_dotdot (DOFList(4:6)) end associate enddo + ! Y3 = Y2 for all nodes (Guyan+CB, no SIM) y%Y3mesh%TranslationDisp = y%Y2mesh%TranslationDisp y%Y3mesh%Orientation = y%Y2mesh%Orientation + ! Overwrite reaction node(s) in Y3 mesh with full elastic displacements including SIM (for SoilDyn) + do i = 1, p%nNodes_C + iSDNode = p%Nodes_C(i,1) + associate(DOFList => p%NodesDOF(iSDNode)%List) ! Alias to shorten notations + CALL SmllRotTrans( 'UR_bar input angles', m%U_full(DOFList(4)), m%U_full(DOFList(5)), m%U_full(DOFList(6)), DCM, '', ErrStat2, ErrMsg2); if(Failed()) return + y%Y3mesh%Orientation (:,:,iSDNode) = DCM + y%Y3mesh%TranslationDisp (:,iSDNode) = m%U_full (DOFList(1:3)) ! Y3: Guyan+CB+SIM displacements + end associate + enddo endif ! --- Y3 mesh and Y2 mesh both have elastic (Guyan+CB) velocities and accelerations y%Y3mesh%TranslationVel = y%Y2mesh%TranslationVel diff --git a/modules/subdyn/src/SubDyn_Output.f90 b/modules/subdyn/src/SubDyn_Output.f90 index 83ac6858a2..7277cdef25 100644 --- a/modules/subdyn/src/SubDyn_Output.f90 +++ b/modules/subdyn/src/SubDyn_Output.f90 @@ -470,7 +470,8 @@ SUBROUTINE SDOut_MapOutputs(u,p,x, y, m, AllOuts, ErrStat, ErrMsg ) ! NEED TO ADD HYDRODYNAMIC FORCES AT THE RESTRAINT NODES iSDNode = p%Nodes_C(I,1) iMeshNode = iSDNode ! input and Y2 mesh nodes are the same as subdyn - Fext = (/ u%LMesh%Force(:,iMeshNode), u%LMesh%Moment(:,iMeshNode) /) + Fext = (/ u%LMesh%Force(:,iMeshNode), u%LMesh%Moment(:,iMeshNode) /) + p%FG(p%NodesDOF(iMeshNode)%List(1:6)) + Fext(1:3) = Fext(1:3) + p%FC(p%NodesDOF(iMeshNode)%List(1:3)) ReactNs((I-1)*6+1:6*I) = FK_elm2 - Fext !Accumulate reactions from all nodes in GLOBAL COORDINATES ENDDO ! Store into AllOuts diff --git a/openfast_io/openfast_io/FAST_vars_out.py b/openfast_io/openfast_io/FAST_vars_out.py index b92a0a2abe..074eb60250 100644 --- a/openfast_io/openfast_io/FAST_vars_out.py +++ b/openfast_io/openfast_io/FAST_vars_out.py @@ -9328,7 +9328,7 @@ AeroDyn_Nodes['Ft'] = False # (N/m); Tangential force (to chord) per unit length at each node - Negative along ya!; airfoil coordinate system AeroDyn_Nodes['Gam'] = False # (m^2/s); Gamma -- circulation on blade; about za, airfoil coordinate system AeroDyn_Nodes['Clrnc'] = False # (m); Tower clearance at each node (based on the absolute distance to the nearest point in the tower from blade node B#N# minus the local tower radius, in the deflected configuration); please note that this clearance is only approximate because the calculation assumes that the blade is a line with no volume (however, the calculation does use the local tower radius); when blade node B#N# is above the tower top (or below the tower base), the absolute distance to the tower top (or base) minus the local tower radius, in the deflected configuration, is output; -AeroDyn_Nodes['GeomPhi'] = False # (1/0); Geometric phi? If phi was solved using normal BEMT equations, GeomPhi = 1; otherwise, if it was solved geometrically, GeomPhi = 0.; +AeroDyn_Nodes['GeomPhi'] = False # (1/0); Geometric phi? If phi was solved using normal BEMT equations, GeomPhi = 0; otherwise, if it was solved geometrically, GeomPhi = 1.; AeroDyn_Nodes['Chi'] = False # (deg); Skew angle (used in skewed wake correction); AeroDyn_Nodes['UA_Flag'] = False # (-); Flag indicating if UA is turned on for this node.; AeroDyn_Nodes['UA_x1'] = False # (rad); time-history of wake vorticity contributing to effective angle of attack; diff --git a/openfast_io/openfast_io/FAST_writer.py b/openfast_io/openfast_io/FAST_writer.py index e9998d6fbf..ec10ed7414 100644 --- a/openfast_io/openfast_io/FAST_writer.py +++ b/openfast_io/openfast_io/FAST_writer.py @@ -290,10 +290,10 @@ def write_MainInput(self): f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['DT'], 'DT', '- Recommended module time step (s)\n')) f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['ModCoupling'], 'ModCoupling', '- Module coupling method (switch) {1=loose; 2=tight with fixed Jacobian updates (DT_UJac); 3=tight with automatic Jacobian updates}\n')) f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['InterpOrder'], 'InterpOrder', '- Interpolation order for input/output time history (-) {1=linear, 2=quadratic}\n')) - f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['NumCrctn'], 'NumCrctn', '- Numerical damping parameter for tight coupling generalized-alpha integrator (-) [0.0 to 1.0]\n')) - f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['RhoInf'], 'RhoInf', '- Convergence iteration error tolerance for tight coupling generalized alpha integrator (-)\n')) - f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['ConvTol'], 'ConvTol', '- Maximum number of convergence iterations for tight coupling generalized alpha integrator (-)\n')) - f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['MaxConvIter'], 'MaxConvIter', '- Number of correction iterations (-) {0=explicit calculation, i.e., no corrections}\n')) + f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['NumCrctn'], 'NumCrctn', '- Number of correction iterations (-) {0=explicit calculation, i.e., no corrections}\n')) + f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['RhoInf'], 'RhoInf', '- Numerical damping parameter for tight coupling generalized-alpha integrator (-) [0.0 to 1.0]\n')) + f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['ConvTol'], 'ConvTol', '- Convergence iteration error tolerance for tight coupling generalized alpha integrator (-)\n')) + f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['MaxConvIter'], 'MaxConvIter', '- Maximum number of convergence iterations for tight coupling generalized alpha integrator (-)\n')) f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['DT_UJac'], 'DT_UJac', '- Time between calls to get Jacobians (s)\n')) f.write('{:<22} {:<11} {:}'.format(self.fst_vt['Fst']['UJacSclFact'], 'UJacSclFact', '- Scaling factor used in Jacobians (-)\n')) f.write('---------------------- FEATURE SWITCHES AND FLAGS ------------------------------\n') diff --git a/openfast_io/openfast_io/StC_defaults.py b/openfast_io/openfast_io/StC_defaults.py index 297461fc78..639e59352d 100644 --- a/openfast_io/openfast_io/StC_defaults.py +++ b/openfast_io/openfast_io/StC_defaults.py @@ -29,7 +29,7 @@ def default_StC_vt(): StC['StC_X_M'] = 0 # - StC X mass (kg) [must equal StC_Y_M for StC_DOF_MODE = 2] StC['StC_Y_M'] = 0 # - StC Y mass (kg) [must equal StC_X_M for StC_DOF_MODE = 2] StC['StC_Z_M'] = 0 # - StC Z mass (kg) [used only when StC_DOF_MODE=1 and StC_Z_DOF=TRUE] - StC['StC_XY_M'] = 0 # - StC Z mass (kg) [used only when StC_DOF_MODE=2] + StC['StC_Omni_M'] = 0 # - StC omni mass (kg) [used only when StC_DOF_MODE=2 or 3] StC['StC_X_K'] = 0 # - StC X stiffness (N/m) StC['StC_Y_K'] = 0 # - StC Y stiffness (N/m) StC['StC_Z_K'] = 0 # - StC Z stiffness (N/m) [used only when StC_DOF_MODE=1 and StC_Z_DOF=TRUE] diff --git a/reg_tests/CTestList.cmake b/reg_tests/CTestList.cmake index 5cd10e4da6..efe0587cab 100644 --- a/reg_tests/CTestList.cmake +++ b/reg_tests/CTestList.cmake @@ -455,7 +455,6 @@ ad_regression("ad_MultipleHAWT" "aerodyn;bem") ad_regression("ad_QuadRotor_OLAF" "aerodyn;bem") ad_regression("ad_VerticalAxis_OLAF" "aerodyn;bem") ad_regression("ad_MHK_RM1_Fixed" "aerodyn;bem;mhk") -ad_regression("ad_MHK_RM1_Fixed_IfW" "aerodyn;bem;mhk") ad_regression("ad_MHK_RM1_Floating" "aerodyn;bem;mhk") ad_regression("ad_BAR_CombinedCases" "aerodyn;bem") # NOTE: doing BAR at the end to avoid copy errors ad_regression("ad_BAR_OLAF" "aerodyn;bem") diff --git a/reg_tests/r-test b/reg_tests/r-test index dd5feaaaa5..325d288573 160000 --- a/reg_tests/r-test +++ b/reg_tests/r-test @@ -1 +1 @@ -Subproject commit dd5feaaaa500ba7283140107806300d551cff0a7 +Subproject commit 325d288573ee4670ec9a1f44151502616cd5319f diff --git a/vs-build/glue-codes/OpenFAST-Simulink.vfproj b/vs-build/glue-codes/OpenFAST-Simulink.vfproj index 12a22420d8..dcf8acf5cb 100644 --- a/vs-build/glue-codes/OpenFAST-Simulink.vfproj +++ b/vs-build/glue-codes/OpenFAST-Simulink.vfproj @@ -15,7 +15,7 @@ - +