diff --git a/modules/hydrodyn/src/WAMIT.txt b/modules/hydrodyn/src/WAMIT.txt index a1badff14..93c006e72 100644 --- a/modules/hydrodyn/src/WAMIT.txt +++ b/modules/hydrodyn/src/WAMIT.txt @@ -22,7 +22,7 @@ param WAMIT/WAMIT unused INTEGER typedef ^ InitInputType INTEGER NBody - - - "[>=1; only used when PotMod=1. If NBodyMod=1, the WAMIT data contains a vector of size 6*NBody x 1 and matrices of size 6*NBody x 6*NBody; if NBodyMod>1, there are NBody sets of WAMIT data each with a vector of size 6 x 1 and matrices of size 6 x 6]" - typedef ^ ^ INTEGER NBodyMod - - - "Body coupling model {1: include coupling terms between each body and NBody in HydroDyn equals NBODY in WAMIT, 2: neglect coupling terms between each body and NBODY=1 with XBODY=0 in WAMIT, 3: Neglect coupling terms between each body and NBODY=1 with XBODY=/0 in WAMIT} (switch) [only used when PotMod=1]" - typedef ^ ^ ReKi Gravity - - - "Supplied by Driver: Gravitational acceleration" "(m/s^2)" -typedef ^ ^ SiKi WtrDpth - - - "Water depth (positive-valued)" m +typedef ^ ^ ReKi WtrDpth - - - "Water depth (positive-valued)" m typedef ^ ^ ReKi PtfmVol0 {:} - - "" - typedef ^ ^ LOGICAL HasWAMIT - - - ".TRUE. if using WAMIT model, .FALSE. otherwise" - typedef ^ ^ ReKi WAMITULEN - - - "" - diff --git a/modules/hydrodyn/src/WAMIT2.txt b/modules/hydrodyn/src/WAMIT2.txt index be5642269..a4935b28c 100644 --- a/modules/hydrodyn/src/WAMIT2.txt +++ b/modules/hydrodyn/src/WAMIT2.txt @@ -34,7 +34,7 @@ typedef ^ ^ INTEGER NStepWave2 typedef ^ ^ ReKi WaveDOmega - - - "Frequency step for incident wave calculations" (rad/s) typedef ^ ^ ReKi WtrDens - - - "Water density" (kg/m^3) typedef ^ ^ ReKi Gravity - - - "Supplied by Driver: Gravitational acceleration" (m/s^2) -typedef ^ ^ SiKi WtrDpth - - - "Water depth (positive-valued)" (m) +typedef ^ ^ ReKi WtrDpth - - - "Water depth (positive-valued)" (m) typedef ^ ^ SiKi WaveElevC0 {*}{*} - - "Discrete Fourier transform of the instantaneous elevation of incident waves at the platform reference point. First column is real part, second column is imaginary part" (meters) typedef ^ ^ SiKi WaveDir - - - "Mean incident wave propagation heading direction" (degrees) diff --git a/modules/hydrodyn/src/WAMIT2_Types.f90 b/modules/hydrodyn/src/WAMIT2_Types.f90 index 0aefaede2..105da8692 100644 --- a/modules/hydrodyn/src/WAMIT2_Types.f90 +++ b/modules/hydrodyn/src/WAMIT2_Types.f90 @@ -52,7 +52,7 @@ MODULE WAMIT2_Types REAL(ReKi) :: WaveDOmega !< Frequency step for incident wave calculations [(rad/s)] REAL(ReKi) :: WtrDens !< Water density [(kg/m^3)] REAL(ReKi) :: Gravity !< Supplied by Driver: Gravitational acceleration [(m/s^2)] - REAL(SiKi) :: WtrDpth !< Water depth (positive-valued) [(m)] + REAL(ReKi) :: WtrDpth !< Water depth (positive-valued) [(m)] REAL(SiKi) , DIMENSION(:,:), POINTER :: WaveElevC0 => NULL() !< Discrete Fourier transform of the instantaneous elevation of incident waves at the platform reference point. First column is real part, second column is imaginary part [(meters)] REAL(SiKi) :: WaveDir !< Mean incident wave propagation heading direction [(degrees)] LOGICAL :: WaveMultiDir !< Indicates the waves are multidirectional -- set by HydroDyn_Input [-] @@ -710,7 +710,7 @@ SUBROUTINE WAMIT2_UnPackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, Re_Xferred = Re_Xferred + 1 OutData%Gravity = ReKiBuf(Re_Xferred) Re_Xferred = Re_Xferred + 1 - OutData%WtrDpth = REAL(ReKiBuf(Re_Xferred), SiKi) + OutData%WtrDpth = ReKiBuf(Re_Xferred) Re_Xferred = Re_Xferred + 1 IF ( IntKiBuf( Int_Xferred ) == 0 ) THEN ! WaveElevC0 not allocated Int_Xferred = Int_Xferred + 1 diff --git a/modules/hydrodyn/src/WAMIT_Types.f90 b/modules/hydrodyn/src/WAMIT_Types.f90 index 88e3026b5..acd90952f 100644 --- a/modules/hydrodyn/src/WAMIT_Types.f90 +++ b/modules/hydrodyn/src/WAMIT_Types.f90 @@ -43,7 +43,7 @@ MODULE WAMIT_Types INTEGER(IntKi) :: NBody !< [>=1; only used when PotMod=1. If NBodyMod=1, the WAMIT data contains a vector of size 6*NBody x 1 and matrices of size 6*NBody x 6*NBody; if NBodyMod>1, there are NBody sets of WAMIT data each with a vector of size 6 x 1 and matrices of size 6 x 6] [-] INTEGER(IntKi) :: NBodyMod !< Body coupling model {1: include coupling terms between each body and NBody in HydroDyn equals NBODY in WAMIT, 2: neglect coupling terms between each body and NBODY=1 with XBODY=0 in WAMIT, 3: Neglect coupling terms between each body and NBODY=1 with XBODY=/0 in WAMIT} (switch) [only used when PotMod=1] [-] REAL(ReKi) :: Gravity !< Supplied by Driver: Gravitational acceleration [(m/s^2)] - REAL(SiKi) :: WtrDpth !< Water depth (positive-valued) [m] + REAL(ReKi) :: WtrDpth !< Water depth (positive-valued) [m] REAL(ReKi) , DIMENSION(:), ALLOCATABLE :: PtfmVol0 !< [-] LOGICAL :: HasWAMIT !< .TRUE. if using WAMIT model, .FALSE. otherwise [-] REAL(ReKi) :: WAMITULEN !< [-] @@ -997,7 +997,7 @@ SUBROUTINE WAMIT_UnPackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, Int_Xferred = Int_Xferred + 1 OutData%Gravity = ReKiBuf(Re_Xferred) Re_Xferred = Re_Xferred + 1 - OutData%WtrDpth = REAL(ReKiBuf(Re_Xferred), SiKi) + OutData%WtrDpth = ReKiBuf(Re_Xferred) Re_Xferred = Re_Xferred + 1 IF ( IntKiBuf( Int_Xferred ) == 0 ) THEN ! PtfmVol0 not allocated Int_Xferred = Int_Xferred + 1 diff --git a/modules/seastate/src/Waves.f90 b/modules/seastate/src/Waves.f90 index 92710b389..e8e1d23bf 100644 --- a/modules/seastate/src/Waves.f90 +++ b/modules/seastate/src/Waves.f90 @@ -299,7 +299,7 @@ FUNCTION WaveNumber ( Omega, g, h ) ! Passed Variables: REAL(ReKi), INTENT(IN ) :: g ! Gravitational acceleration (m/s^2) - REAL(SiKi), INTENT(IN ) :: h ! Water depth (meters) + REAL(ReKi), INTENT(IN ) :: h ! Water depth (meters) REAL(SiKi), INTENT(IN ) :: Omega ! Wave frequency (rad/s) REAL(SiKi) :: WaveNumber ! This function = wavenumber, k (1/m) @@ -328,7 +328,7 @@ FUNCTION WaveNumber ( Omega, g, h ) ELSE ! Omega > 0.0; solve for the wavenumber as usual. - C = Omega*Omega*h/REAL(g,SiKi) + C = Omega*Omega*REAL(h,SiKi)/REAL(g,SiKi) CC = C*C @@ -355,11 +355,11 @@ FUNCTION WaveNumber ( Omega, g, h ) A = 1.0/( C - C2 ) B = A*( ( 0.5*LOG( ( X0 + C )/( X0 - C ) ) ) - X0 ) - WaveNumber = ( X0 - ( B*C2*( 1.0 + (A*B*C*X0) ) ) )/h + WaveNumber = ( X0 - ( B*C2*( 1.0 + (A*B*C*X0) ) ) )/REAL(h,SiKi) ELSE - WaveNumber = X0/h + WaveNumber = X0/REAL(h,SiKi) END IF @@ -389,7 +389,7 @@ FUNCTION COSHNumOvrCOSHDen ( k, h, z ) ! Passed Variables: REAL(SiKi) :: COSHNumOvrCOSHDen ! This function = COSH( k*( z + h ) )/COSH( k*h ) (-) - REAL(SiKi), INTENT(IN ) :: h ! Water depth ( h > 0 ) (meters) + REAL(ReKi), INTENT(IN ) :: h ! Water depth ( h > 0 ) (meters) REAL(SiKi), INTENT(IN ) :: k ! Wave number ( k >= 0 ) (1/m) REAL(SiKi), INTENT(IN ) :: z ! Elevation (-h <= z <= 0 ) (meters) @@ -399,11 +399,11 @@ FUNCTION COSHNumOvrCOSHDen ( k, h, z ) IF ( k*h > 89.4_SiKi ) THEN ! When .TRUE., the shallow water formulation will trigger a floating point overflow error; however, COSH( k*( z + h ) )/COSH( k*h ) = EXP( k*z ) + EXP( -k*( z + 2*h ) ) for large k*h. This equals the deep water formulation, EXP( k*z ), except near z = -h, because h > 14.23*wavelength (since k = 2*Pi/wavelength) in this case. - COSHNumOvrCOSHDen = EXP( k*z ) + EXP( -k*( z + 2.0_SiKi*h ) ) + COSHNumOvrCOSHDen = EXP( k*z ) + EXP( -k*( z + 2.0_SiKi*REAL(h,SiKi) ) ) ELSE ! 0 < k*h <= 89.4; use the shallow water formulation. - COSHNumOvrCOSHDen =REAL( COSH( k*( z + h ) ),R8Ki)/COSH( k*h ) + COSHNumOvrCOSHDen =REAL( COSH( k*( z + REAL(h,SiKi) ) ),R8Ki)/COSH( k*REAL(h,SiKi) ) END IF @@ -431,7 +431,7 @@ FUNCTION COSHNumOvrSINHDen ( k, h, z ) ! Passed Variables: REAL(SiKi) :: COSHNumOvrSINHDen ! This function = COSH( k*( z + h ) )/SINH( k*h ) (-) - REAL(SiKi), INTENT(IN ) :: h ! Water depth ( h > 0 ) (meters) + REAL(ReKi), INTENT(IN ) :: h ! Water depth ( h > 0 ) (meters) REAL(SiKi), INTENT(IN ) :: k ! Wave number ( k >= 0 ) (1/m) REAL(SiKi), INTENT(IN ) :: z ! Elevation (-h <= z <= 0 ) (meters) @@ -444,13 +444,13 @@ FUNCTION COSHNumOvrSINHDen ( k, h, z ) COSHNumOvrSINHDen = HUGE( k ) - ELSEIF ( k*h > 89.4_SiKi ) THEN ! When .TRUE., the shallow water formulation will trigger a floating point overflow error; however, COSH( k*( z + h ) )/SINH( k*h ) = EXP( k*z ) + EXP( -k*( z + 2*h ) ) for large k*h. This equals the deep water formulation, EXP( k*z ), except near z = -h, because h > 14.23*wavelength (since k = 2*Pi/wavelength) in this case. + ELSEIF ( k*REAL(h,SiKi) > 89.4_SiKi ) THEN ! When .TRUE., the shallow water formulation will trigger a floating point overflow error; however, COSH( k*( z + h ) )/SINH( k*h ) = EXP( k*z ) + EXP( -k*( z + 2*h ) ) for large k*h. This equals the deep water formulation, EXP( k*z ), except near z = -h, because h > 14.23*wavelength (since k = 2*Pi/wavelength) in this case. - COSHNumOvrSINHDen = EXP( k*z ) + EXP( -k*( z + 2*h ) ) + COSHNumOvrSINHDen = EXP( k*z ) + EXP( -k*( z + 2*REAL(h,SiKi) ) ) ELSE ! 0 < k*h <= 89.4; use the shallow water formulation. - COSHNumOvrSINHDen = COSH( k*( z + h ) )/SINH( k*h ) + COSHNumOvrSINHDen = COSH( k*( z + REAL(h,SiKi) ) )/SINH( k*REAL(h,SiKi) ) END IF @@ -515,7 +515,7 @@ FUNCTION SINHNumOvrSINHDen ( k, h, z ) ! Passed Variables: REAL(SiKi) :: SINHNumOvrSINHDen ! This function = SINH( k*( z + h ) )/SINH( k*h ) (-) - REAL(SiKi), INTENT(IN ) :: h ! Water depth ( h > 0 ) (meters) + REAL(ReKi), INTENT(IN ) :: h ! Water depth ( h > 0 ) (meters) REAL(SiKi), INTENT(IN ) :: k ! Wave number ( k >= 0 ) (1/m) REAL(SiKi), INTENT(IN ) :: z ! Elevation (-h <= z <= 0 ) (meters) @@ -527,13 +527,13 @@ FUNCTION SINHNumOvrSINHDen ( k, h, z ) SINHNumOvrSINHDen = 1.0 - ELSEIF ( k*h > 89.4_SiKi ) THEN ! When .TRUE., the shallow water formulation will trigger a floating point overflow error; however, SINH( k*( z + h ) )/SINH( k*h ) = EXP( k*z ) - EXP( -k*( z + 2*h ) ) for large k*h. This equals the deep water formulation, EXP( k*z ), except near z = -h, because h > 14.23*wavelength (since k = 2*Pi/wavelength) in this case. + ELSEIF ( k*REAL(h,SiKi) > 89.4_SiKi ) THEN ! When .TRUE., the shallow water formulation will trigger a floating point overflow error; however, SINH( k*( z + h ) )/SINH( k*h ) = EXP( k*z ) - EXP( -k*( z + 2*h ) ) for large k*h. This equals the deep water formulation, EXP( k*z ), except near z = -h, because h > 14.23*wavelength (since k = 2*Pi/wavelength) in this case. SINHNumOvrSINHDen = EXP( k*z ) - EXP( -k*( z + 2.0_SiKi*h ) ) ELSE ! 0 < k*h <= 89.4; use the shallow water formulation. - SINHNumOvrSINHDen = SINH( k*( z + h ) )/SINH( k*h ) + SINHNumOvrSINHDen = SINH( k*( z + REAL(h,SiKi) ) )/SINH( k*REAL(h,SiKi) ) END IF @@ -2405,7 +2405,7 @@ FUNCTION WheelerStretching ( zOrzPrime, Zeta, h, ForwardOrBackward, ErrStat, Err ! Passed Variables: - REAL(SiKi), INTENT(IN ) :: h ! Water depth (meters) + REAL(ReKi), INTENT(IN ) :: h ! Water depth (meters) REAL(SiKi) :: WheelerStretching ! This function = zPrime [forward] or z [backward] (meters) REAL(SiKi), INTENT(IN ) :: Zeta ! Instantaneous elevation of incident waves (meters) REAL(SiKi), INTENT(IN ) :: zOrzPrime ! Elevations where the wave kinematics are to be applied using Wheeler stretching, z, [forward] or elevations where the wave kinematics are computed before applying Wheeler stretching, zPrime, [backward] (meters) @@ -2425,12 +2425,12 @@ FUNCTION WheelerStretching ( zOrzPrime, Zeta, h, ForwardOrBackward, ErrStat, Err CASE ( 'F' ) ! Forward - WheelerStretching = ( 1.0 + Zeta/h )*zOrzPrime + Zeta + WheelerStretching = ( 1.0 + Zeta/REAL(h,SiKi) )*zOrzPrime + Zeta CASE ( 'B' ) ! Backward - WheelerStretching = ( zOrzPrime - Zeta )/( 1.0 + Zeta/h ) + WheelerStretching = ( zOrzPrime - Zeta )/( 1.0 + Zeta/REAL(h,SiKi) ) CASE DEFAULT diff --git a/modules/seastate/src/Waves2.txt b/modules/seastate/src/Waves2.txt index 3cf763d74..6b8fa49b9 100644 --- a/modules/seastate/src/Waves2.txt +++ b/modules/seastate/src/Waves2.txt @@ -23,7 +23,7 @@ typedef Waves2/Waves2 InitInputType INTEGER UnSum typedef ^ ^ ReKi Gravity - - - "Gravitational acceleration" (m/s^2) typedef ^ ^ ReKi WtrDens - - - "Water density" (kg/m^3) -typedef ^ ^ SiKi WtrDpth - - - "Water depth" (meters) +typedef ^ ^ ReKi WtrDpth - - - "Water depth" (meters) typedef ^ ^ INTEGER NStepWave - - - "Total number of frequency components = total number of time steps in the incident wave" - typedef ^ ^ INTEGER NStepWave2 - - - "NStepWave / 2" - diff --git a/modules/seastate/src/Waves2_Types.f90 b/modules/seastate/src/Waves2_Types.f90 index 64540db02..15c878c39 100644 --- a/modules/seastate/src/Waves2_Types.f90 +++ b/modules/seastate/src/Waves2_Types.f90 @@ -39,7 +39,7 @@ MODULE Waves2_Types INTEGER(IntKi) :: UnSum !< The unit number for the HydroDyn summary file [-] REAL(ReKi) :: Gravity !< Gravitational acceleration [(m/s^2)] REAL(ReKi) :: WtrDens !< Water density [(kg/m^3)] - REAL(SiKi) :: WtrDpth !< Water depth [(meters)] + REAL(ReKi) :: WtrDpth !< Water depth [(meters)] INTEGER(IntKi) :: NStepWave !< Total number of frequency components = total number of time steps in the incident wave [-] INTEGER(IntKi) :: NStepWave2 !< NStepWave / 2 [-] REAL(SiKi) :: WaveDOmega !< Frequency step for incident wave calculations [(rad/s)] @@ -661,7 +661,7 @@ SUBROUTINE Waves2_UnPackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, Re_Xferred = Re_Xferred + 1 OutData%WtrDens = ReKiBuf(Re_Xferred) Re_Xferred = Re_Xferred + 1 - OutData%WtrDpth = REAL(ReKiBuf(Re_Xferred), SiKi) + OutData%WtrDpth = ReKiBuf(Re_Xferred) Re_Xferred = Re_Xferred + 1 OutData%NStepWave = IntKiBuf(Int_Xferred) Int_Xferred = Int_Xferred + 1