Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 26 additions & 14 deletions modules/beamdyn/src/BeamDyn_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,11 @@ SUBROUTINE BD_Interp_Pos_CRV(p, eta, POS, CRV, ErrStat, ErrMsg)

INTEGER(IntKi) :: ErrStat2 ! Temporary Error status
CHARACTER(ErrMsgLen) :: ErrMsg2 ! Temporary Error message
character(*), parameter :: RoutineName = 'BD_Interp_Pos_CRV'

ErrStat = ErrID_None
ErrMsg = ""

! find element in which eta resides
eta_right = 0._BDKi
found = 0
Expand All @@ -993,24 +997,32 @@ SUBROUTINE BD_Interp_Pos_CRV(p, eta, POS, CRV, ErrStat, ErrMsg)
eta_local(1) = 2._BDKi * (eta - eta_left)/p%member_eta(element) - 1._BDKi

call AllocAry(gll, p%nodes_per_elem, "local GLL nodes",ErrStat2, ErrMsg2)
call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
call AllocAry(shp, p%nodes_per_elem, 1,"local shape function",ErrStat2, ErrMsg2)
call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
call AllocAry(shpder, p%nodes_per_elem, 1,"local shape deriv function",ErrStat2, ErrMsg2)
call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)

call BD_GenerateGLL(p%nodes_per_elem,gll,ErrStat2,ErrMsg2)
call bd_diffmtc(p%nodes_per_elem, gll, eta_local, 1, shp, shpder) ! evaluate shp and shpder at single point

pos = 0._BDki
crv = 0._BDki
do i = 1, p%nodes_per_elem
do j = 1, 3
pos(j) = pos(j) + p%uuN0(j, i,element) *shp(i,1)
CRV(j) = CRV(j) + p%uuN0(j+3,i,element)*shp(i,1)
enddo
enddo
if (ErrStat < AbortErrLev) then
call BD_GenerateGLL(p%nodes_per_elem,gll,ErrStat2,ErrMsg2)
call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)

call bd_diffmtc(p%nodes_per_elem, gll, eta_local, 1, shp, shpder) ! evaluate shp and shpder at single point

pos = 0._BDki
crv = 0._BDki
do i = 1, p%nodes_per_elem
do j = 1, 3
pos(j) = pos(j) + p%uuN0(j, i,element) *shp(i,1)
CRV(j) = CRV(j) + p%uuN0(j+3,i,element)*shp(i,1)
enddo
enddo

deallocate(gll)
deallocate(shp)
deallocate(shpder)
end if

if (allocated(gll)) deallocate(gll)
if (allocated(shp)) deallocate(shp)
if (allocated(shpder)) deallocate(shpder)

END SUBROUTINE BD_Interp_Pos_CRV
!-----------------------------------------------------------------------------------------------------------------------------------
Expand Down
15 changes: 2 additions & 13 deletions modules/hydrodyn/src/HydroDyn_DriverCode.f90
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@ PROGRAM HydroDynDriver
Time = 0.0
CALL SimStatus_FirstTime( TiLstPrn, PrevClockTime, SimStrtTime, UsrTime2, time, InitInData%TMax )

maxAngle = 0.0

DO n = 1, drvrInitInp%NSteps

Time = (n-1) * drvrInitInp%TimeInterval
Expand Down Expand Up @@ -1234,19 +1236,6 @@ SUBROUTINE WaveElevGrid_Output (drvrInitInp, HDynInitInp, HDynInitOut, HDyn_p, E
CLOSE (WaveElevFileUn)

END SUBROUTINE WaveElevGrid_Output



subroutine print_help()
print '(a)', 'usage: '
print '(a)', ''
print '(a)', 'HydroDyn.exe driverfilename'
print '(a)', ''
print '(a)', 'Where driverfilename is the name of the HydroDyn driver input file.'
print '(a)', ''

end subroutine print_help


!----------------------------------------------------------------------------------------------------------------------------------

Expand Down
371 changes: 139 additions & 232 deletions modules/hydrodyn/src/Morison.f90

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/hydrodyn/src/Waves.f90
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ FUNCTION BoxMuller ( RNGType, NDAmp, Phase )
! Compute intermediate variables:

IF ( NDAmp ) THEN ! Normally-distributed amplitudes
C1 = SQRT( -2.0*LOG(U1(1)) )
C1 = SQRT( -2.0*LOG(U1(1)) )
ELSE ! Constant amplitudes (ignore U1); therefore, C1 = SQRT( 2.0 ) = MEAN( SQRT( -2.0*LOG(U1) ) for a uniform distribution of U1 between 0 and 1
C1 = SQRT( 2.0 )
END IF
Expand Down
6 changes: 3 additions & 3 deletions modules/nwtc-library/src/Generate_NWTC_Library_Types.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@ECHO OFF

SET REG_Loc=C:\Users\bjonkman\Documents\DATA\DesignCodes\miscellaneous\FAST_Registry\bin
SET Registry=%REG_Loc%\Registry_Win32.exe
:: SET Registry=%REG_Loc%\Registry.exe
SET REG_Loc=..\..\..\build\bin
::SET Registry=%REG_Loc%\Registry_Win32.exe
SET Registry=%REG_Loc%\Registry.exe

SET ModuleName=%1

Expand Down
18 changes: 10 additions & 8 deletions modules/nwtc-library/src/NWTC_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ MODULE NWTC_IO
CHARACTER(99) :: ProgVer = ' ' !< The version (including date) of the calling program. DO NOT USE THIS IN NEW PROGRAMS
CHARACTER(1), PARAMETER :: Tab = CHAR( 9 ) !< The tab character.
CHARACTER(*), PARAMETER :: CommChars = '!#%' !< Comment characters that mark the end of useful input
INTEGER(IntKi), PARAMETER :: NWTC_SizeOfNumWord = 200 !< maximum length of the words containing numeric input (for ParseVar routines)


! Parameters for writing to echo files (in this module only)
Expand Down Expand Up @@ -139,7 +140,7 @@ MODULE NWTC_IO
END INTERFACE

!> \copydoc nwtc_io::parsechvarwdefault
INTERFACE ParseVarWDefault ! Parses a boolean variable name and value from a string, potentially sets to a default value if "Default" is parsed.
INTERFACE ParseVarWDefault ! Parses a character variable name and value from a string, potentially sets to a default value if "Default" is parsed.
MODULE PROCEDURE ParseChVarWDefault ! Parses a character string from a string, potentially sets to a default value if "Default" is parsed.
MODULE PROCEDURE ParseDbVarWDefault ! Parses a double-precision REAL from a string, potentially sets to a default value if "Default" is parsed.
MODULE PROCEDURE ParseInVarWDefault ! Parses an INTEGER from a string, potentially sets to a default value if "Default" is parsed.
Expand Down Expand Up @@ -2264,6 +2265,8 @@ SUBROUTINE DispCompileRuntimeInfo()
compiler_version_str = compiler_version()
#elif defined(__INTEL_COMPILER)
compiler_version_str = 'Intel(R) Fortran Compiler '//num2lstr(__INTEL_COMPILER)
#else
compiler_version_str = OS_Desc
#endif

CALL WrScr(trim(name)//'-'//trim(git_commit))
Expand Down Expand Up @@ -3616,7 +3619,7 @@ SUBROUTINE ParseDbVar ( FileInfo, LineNum, ExpVarName, Var, ErrStat, ErrMsg, UnE
INTEGER(IntKi) :: ErrStatLcl ! Error status local to this routine.
INTEGER(IntKi) :: NameIndx ! The index into the Words array that points to the variable name.

CHARACTER(200) :: Words (2) ! The two "words" parsed from the line.
CHARACTER(NWTC_SizeOfNumWord) :: Words (2) ! The two "words" parsed from the line.
CHARACTER(ErrMsgLen) :: ErrMsg2
CHARACTER(*), PARAMETER :: RoutineName = 'ParseDbVar'

Expand Down Expand Up @@ -3912,7 +3915,7 @@ SUBROUTINE ParseInVar ( FileInfo, LineNum, ExpVarName, Var, ErrStat, ErrMsg, UnE
INTEGER(IntKi) :: ErrStatLcl ! Error status local to this routine.
INTEGER(IntKi) :: NameIndx ! The index into the Words array that points to the variable name.

CHARACTER(200) :: Words (2) ! The two "words" parsed from the line.
CHARACTER(NWTC_SizeOfNumWord) :: Words (2) ! The two "words" parsed from the line.
CHARACTER(ErrMsgLen) :: ErrMsg2
CHARACTER(*), PARAMETER :: RoutineName = 'ParseInVar'

Expand Down Expand Up @@ -4097,7 +4100,7 @@ SUBROUTINE ParseLoVar ( FileInfo, LineNum, ExpVarName, Var, ErrStat, ErrMsg, UnE
INTEGER(IntKi) :: ErrStatLcl ! Error status local to this routine.
INTEGER(IntKi) :: NameIndx ! The index into the Words array that points to the variable name.

CHARACTER(200) :: Words (2) ! The two "words" parsed from the line.
CHARACTER(NWTC_SizeOfNumWord) :: Words (2) ! The two "words" parsed from the line.
CHARACTER(ErrMsgLen) :: ErrMsg2
CHARACTER(*), PARAMETER :: RoutineName = 'ParseLoVar'

Expand Down Expand Up @@ -4273,7 +4276,7 @@ SUBROUTINE ParseSiVar ( FileInfo, LineNum, ExpVarName, Var, ErrStat, ErrMsg, UnE
INTEGER(IntKi) :: ErrStatLcl ! Error status local to this routine.
INTEGER(IntKi) :: NameIndx ! The index into the Words array that points to the variable name.

CHARACTER(200) :: Words (2) ! The two "words" parsed from the line.
CHARACTER(NWTC_SizeOfNumWord) :: Words (2) ! The two "words" parsed from the line.
CHARACTER(ErrMsgLen) :: ErrMsg2
CHARACTER(*), PARAMETER :: RoutineName = 'ParseSiVar'

Expand Down Expand Up @@ -4308,7 +4311,7 @@ SUBROUTINE ParseSiVar ( FileInfo, LineNum, ExpVarName, Var, ErrStat, ErrMsg, UnE
CALL CheckRealVar( Var, ExpVarName, ErrStat, ErrMsg)

IF ( PRESENT(UnEc) ) THEN
IF ( UnEc > 0 ) WRITE (UnEc,'(1X,A15," = ",A20)') Words
IF ( UnEc > 0 ) WRITE (UnEc,'(1X,A15," = ",A20)') Words !bjj: not sure this is the best way to echo the number being read (in case of truncation, etc)
END IF

LineNum = LineNum + 1
Expand Down Expand Up @@ -5606,7 +5609,7 @@ SUBROUTINE ReadFASTbin ( UnIn, Init, FASTdata, ErrStat, ErrMsg )

IF ( FileType == FileFmtID_NoCompressWithoutTime ) THEN
DO IRow=1,FASTdata%NumRecs
FASTdata%Data(IRow,2:) = REAL(TmpInArray(IRow,:), ReKi)
FASTdata%Data(IRow,2:) = REAL(TmpR8InArray(IRow,:), ReKi)
END DO ! IRow=1,FASTdata%NumRecs
ELSE
DO IRow=1,FASTdata%NumRecs
Expand Down Expand Up @@ -6285,7 +6288,6 @@ SUBROUTINE ReadR4AryFromStr ( Str, Ary, AryLen, AryName, AryDescr, ErrStat, ErrM
RETURN
END SUBROUTINE ReadR4AryFromStr
!=======================================================================
!=======================================================================
!> \copydoc nwtc_io::readcary
SUBROUTINE ReadR8Ary ( UnIn, Fil, Ary, AryLen, AryName, AryDescr, ErrStat, ErrMsg, UnEc )

Expand Down
Loading