Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various bug fixes and features #27

Merged
merged 80 commits into from
May 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
5bcbe35
updated codebase with Bonnie's FAST.farm updates and the AeroDyn bug …
Jan 12, 2017
0f7fe5c
Merge branch 'dev' of ../OpenFAST-dev/OpenFAST into f/fast-farm
Mar 2, 2017
a5717b6
Updated AD14/DWM with links for new IfW module
Mar 6, 2017
e358d64
Per bjonkman:
Mar 6, 2017
9814683
per bjonkman: fixed some comment typos
Mar 6, 2017
d4afd28
per bjonkman: updated version to v2.11.01
Mar 6, 2017
491beed
per bjonkman: Added optional argument to RunTimes & SimStatus - allo…
Mar 6, 2017
b6e46bd
added vtk file read/write for structured_points data, added fast.farm…
Mar 15, 2017
45d332b
bjonkman: Added simStatus/RunTimes to FAST.Farm. FAST instances do n…
Mar 15, 2017
4b6b17a
bjonkman: Changed n_TMax_m1 to n_TMax, updated to FAST.Farm plan rev 9
Mar 15, 2017
175ceb6
bug fixes, chagned V_high_dist to Vdist_High, added AWAE CalcOutput, …
Mar 15, 2017
49054e4
changed V_high_dist to Vdist_high
Mar 15, 2017
2ee373b
Added ability not to display status/run times with FAST.Farm
Mar 15, 2017
bf255df
Added ability not to display status/run times
Mar 15, 2017
35b0950
Fixed bug in line2-to-point loads mapping, fixed typos and removed so…
Mar 15, 2017
55ad51c
fixed bug in binary file constant channels
Mar 15, 2017
e2f91b1
changed finite-difference scheme for the continuity equation, fixed W…
Mar 15, 2017
ffbd630
fix index which was incorrect
Mar 15, 2017
8d2f333
Added visualization output handling in AWAE module, needed to alter F…
Mar 20, 2017
08b966a
bug fix: was doing an extra time increment loop
Mar 20, 2017
53016a7
bug fix: errors in initialization could cause seg fault. If using the…
Mar 20, 2017
11b4514
Modified ReadVTK_SP_vectors to read data which is not separated with …
Mar 21, 2017
97ca437
Added support for ChanLenFF and OutParamFFType which allows the FAST.…
Mar 21, 2017
5286ed3
Attaching low-res grid info to the InitOut structure for use by FAST.…
Mar 21, 2017
e0708e2
Changed OutParmType to OutParmFFType to allow for more characters in …
Mar 21, 2017
23aef04
-Added TrilinearInterpRegGrid to interpolate the regular wind velocit…
Mar 21, 2017
254a140
-Added group arrays of channel labels/indices to be used when attachi…
Mar 21, 2017
f12d70c
Added Farm_WriteOutput() subroutine and this is now called by Farm_In…
Mar 22, 2017
ef58c9f
draft of CMakeLists.txt for fast-farm
Mar 22, 2017
27beee8
p%WrDisWind wasn't being set during Init
Mar 22, 2017
36fe1f7
Fixed file indexing for the High-res wind files
Mar 22, 2017
631e4b5
fixed bug now check ErrStat >= AbortErrLev
Mar 22, 2017
2aa53b8
-properly reshaped the output channel lookup arrays
Mar 22, 2017
80058c5
removed Mask6 for the 6D arrays
Apr 3, 2017
71e2e83
changed version to v0.01.00
Apr 4, 2017
b046655
added support for passing fast.farm input file root name to AWAE modu…
Apr 4, 2017
b757472
added support for input file root name, OutFileRoot, to be passed fro…
Apr 4, 2017
02e89cf
changed vtk file naming so that they can all live in the same folder …
Apr 4, 2017
648fe98
fixed bug with indexing off be one errors in the 2D ExtractSlice routine
Apr 4, 2017
78867fc
fixed problem with characters causing build errors under gfortran
Apr 4, 2017
2e80832
added IfW_4Dext support
Apr 4, 2017
78548bc
Added more debug output channels
Apr 10, 2017
90305db
removed temporary code to open and and generate debug output file
Apr 10, 2017
721a936
Draft of Visual Studio Build files - not all modules are included
Apr 10, 2017
f73d808
fixed non standard format statements
Apr 11, 2017
99e0a7a
replaced call to ProgWarn with errStat/ErrMsg
Apr 11, 2017
3350205
fixed 4Dext types for double-precision compile -bjonkman
Apr 11, 2017
28c9f04
Tower strike is now a fatal error - bjonkman
Apr 11, 2017
d3ce7bc
bug fix: number of trap quadrature points
Apr 11, 2017
3330fad
fixed another place where trap points used key points, should have be…
Apr 11, 2017
12ce1a8
AWAE_Registry.txt: changed WrDisSkp to WrDisDT, added NumDT as a para…
Apr 13, 2017
2c75d4c
Updated the FAST.Farm VS solution to not make 64-bit or debug registry
jjonkman Apr 14, 2017
39458a7
Fixed BeamDyn Tip and Nodal Rotation Output
jjonkman Apr 17, 2017
9e6eb17
Moved WrDisDT and Added New Debug Output
jjonkman Apr 17, 2017
e97995b
Removed WrVTK_SP_vectors2D() from NWTC_IO library, and then modified …
May 2, 2017
909035d
Fixed INDEX-related checks in ReadVTK_SP_info() to force the ASCII an…
May 2, 2017
7a18ad9
Changed vtk outputs to be based on WrDisDT parameter which must be an…
May 2, 2017
5861dd8
Fixed typo with comment on file naming of low res disturbed wind vtk …
May 2, 2017
6bb7ab6
Added error check that all user-requested downstream output distances…
May 2, 2017
b5abd47
Changed TI_amb output to be as a percentage
May 2, 2017
6bd9c58
Changed i_turb to nt and i_plane to np
May 2, 2017
2e8c273
Added code to interpolate outputs
May 2, 2017
d98d667
Updated equations for WD and AWAE to use plan Rev 11/12 updates for i…
May 2, 2017
e97371b
Merge remote-tracking branch 'ghayman/f/fast-farm2' into f/fast-farm
jjonkman May 2, 2017
186744e
Added placeholder SumPrint input file parameter and moved the WrDisDT…
May 2, 2017
e59a2c6
Merge remote-tracking branch 'ghayman/f/fast-farm2' into f/fast-farm
jjonkman May 2, 2017
33312e5
Fixed minor issues with Greg's latest commit based on Rev. 11 plan
jjonkman May 2, 2017
698b714
Added some temp debug outputs. Fixed bug with p_plane and xhat_plane …
May 3, 2017
f8f16c7
Merge remote-tracking branch 'Jason/f/fast-farm' into f/fast-farm2
May 4, 2017
d21d34f
Merge remote-tracking branch 'ghayman/f/fast-farm2' into f/fast-farm
jjonkman May 4, 2017
a72f48a
Changed calculation of V_Plane to be based on both adjacent wake volumes
jjonkman May 4, 2017
38fe0fd
Merge remote-tracking branch 'OpenFAST/dev' into f/fast-farm2
May 5, 2017
8112840
Resolved ASCII/Unicode issue for the units array
May 8, 2017
db2b8ac
Merge remote-tracking branch 'Jason/f/fast-farm' into f/fast-farm2
May 8, 2017
4d239ad
Merge remote-tracking branch 'OpenFAST/dev' into f/fast-farm2
May 8, 2017
53b1670
Merge remote-tracking branch 'OpenFAST/dev' into f/fast-farm2
May 8, 2017
802f7ba
Removed FAST.Farm related files
May 8, 2017
c33c89e
Removed FAST.Farm related vs-build files
May 8, 2017
c416ea7
Added AeroDyn driver vs-build project
May 8, 2017
9d56f7b
Merge remote-tracking branch 'OpenFAST/dev' into gregpull
May 11, 2017
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
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@
# CMake specific files
build/**/*

# Visual Studio specific files
vs-build
build
build
22 changes: 20 additions & 2 deletions glue-codes/fast/src/FAST_Prog.f90
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,27 @@ PROGRAM FAST
CHARACTER(1024) :: CheckpointRoot ! Rootname of the checkpoint file
CHARACTER(20) :: FlagArg ! flag argument from command line
INTEGER(IntKi) :: Restart_step ! step to start on (for restart)

INTEGER(IntKi) :: UnErrLog ! File unit for error log file

!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! determine if this is a restart from checkpoint
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
CALL NWTC_Init() ! open console for writing
ProgName = 'FAST'
CheckpointRoot = ""

!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! BEGIN: Draft Code for generating parsable error reporting for automated testing
!
! Open error report log file
UnErrLog = -1
CALL GetNewUnit( UnErrLog, ErrStat, ErrMsg )
CALL OpenFOutfile ( UnErrLog, 'OpenFastErr.log', ErrStat, ErrMsg )
WRITE (UnErrLog,'(A)') ''
!
! END : Draft Code for generating parsable error reporting for automated testing
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

CALL CheckArgs( CheckpointRoot, ErrStat, Flag=FlagArg ) ! if ErrStat /= ErrID_None, we'll ignore and deal with the problem when we try to read the input file

IF ( TRIM(FlagArg) == 'RESTART' ) THEN ! Restart from checkpoint file
Expand Down Expand Up @@ -144,6 +157,7 @@ PROGRAM FAST

END DO ! n_t_global

IF (UnErrLog > 0) CLOSE(UnErrLog)

!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! Write simulation times and stop
Expand Down Expand Up @@ -171,8 +185,12 @@ SUBROUTINE CheckError(ErrID,Msg,ErrLocMsg)

IF ( ErrID /= ErrID_None ) THEN
CALL WrScr( NewLine//TRIM(Msg)//NewLine )
IF (UnErrLog > 0) THEN
WRITE (UnErrLog,'(/,A)') TRIM(Num2LStr(ErrID))//': '//Msg
END IF

IF ( ErrID >= AbortErrLev ) THEN

IF (UnErrLog > 0) CLOSE(UnErrLog)
IF (PRESENT(ErrLocMsg)) THEN
SimMsg = ErrLocMsg
ELSE
Expand Down
4 changes: 3 additions & 1 deletion modules-local/aerodyn/src/AeroDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,8 @@ subroutine SetInputsForBEMT(p, u, m, indx, errStat, errMsg)
m%AllOuts( BPitch( k) ) = -theta(3)*R2D ! save this value of pitch for potential output
#endif
theta(3) = 0.0_ReKi
m%hub_theta_x_root(k) = theta(1) ! save this value for FAST.Farm

orientation = EulerConstruct( theta )
orientation_nopitch = matmul( orientation, u%HubMotion%Orientation(:,:,1) ) ! withoutPitch_theta_Root(k)

Expand Down Expand Up @@ -2114,7 +2116,7 @@ SUBROUTINE getLocalTowerProps(p, u, BladeNodePosition, theta_tower_trans, W_towe

TwrClrnc = TwoNorm(r_TowerBlade) - 0.5_ReKi*TwrDiam
if ( TwrClrnc <= 0.0_ReKi ) then
call SetErrStat(ErrID_Severe, "Tower strike.", ErrStat, ErrMsg, RoutineName)
call SetErrStat(ErrID_Fatal, "Tower strike.", ErrStat, ErrMsg, RoutineName)
end if


Expand Down
1 change: 1 addition & 0 deletions modules-local/aerodyn/src/AeroDyn_Registry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ typedef ^ MiscVarType ReKi X {:}{:} - - "normal force per unit length (normal to
typedef ^ MiscVarType ReKi Y {:}{:} - - "tangential force per unit length (tangential to the plane, not chord) of the jth node in the kth blade" N/m
typedef ^ MiscVarType ReKi M {:}{:} - - "pitching moment per unit length of the jth node in the kth blade" Nm/m
typedef ^ MiscVarType ReKi V_DiskAvg {3} - - "disk-average relative wind speed" m/s
typedef ^ MiscVarType ReKi hub_theta_x_root {3} - - "angles saved for FAST.Farm" rad
typedef ^ MiscVarType ReKi V_dot_x - - -
typedef ^ MiscVarType MeshType HubLoad - - - "mesh at hub; used to compute an integral for mapping the output blade loads to a single point (for writing to file only)" -
typedef ^ MiscVarType MeshMapType B_L_2_H_P {:} - - "mapping data structure to map each bladeLoad output mesh to the MiscVar%HubLoad mesh"
Expand Down
1 change: 1 addition & 0 deletions modules-local/aerodyn14/src/DWM.f90
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ SUBROUTINE DWM_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, InitOu
InitInp%IfW%UseInputFile = .TRUE.
InitInp%IfW%NumWindPoints = 1
InitInp%IfW%lidar%SensorType = SensorType_None
InitInp%IfW%Use4Dext = .false.

CALL InflowWind_Init( InitInp%IfW, u%IfW, p%IfW, x%IfW, xd%IfW, z%IfW, OtherState%IfW, y%IfW, m%IfW, &
Interval, InitOut%IfW, ErrStat, ErrMess )
Expand Down
5 changes: 4 additions & 1 deletion modules-local/beamdyn/src/BeamDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ subroutine InitializeNodalLocations(InputFileData,p,SP_Coef,GLL_nodes,ErrStat, E
character(ErrMsgLen) :: ErrMsg2 ! temporary Error message
character(*), parameter :: RoutineName = 'InitGaussPoints'

ErrStat = ErrID_None
ErrMsg = ""

!-------------------------------------------------
! p%uuN0 contains the initial (physical) positions and orientations of the (output) GLL nodes
!-------------------------------------------------
Expand Down Expand Up @@ -711,7 +714,7 @@ subroutine SetParameters(InitInp, InputFileData, SP_Coef, p, ErrStat, ErrMsg)
p%ngp = p%node_elem !- 1
ELSEIF(p%quadrature .EQ. TRAP_QUADRATURE) THEN
p%refine = InputFileData%refine
p%ngp = (InputFileData%kp_member(1) - 1)*p%refine + 1
p%ngp = (InputFileData%InpBl%station_total - 1)*p%refine + 1
ENDIF

! Degree-of-freedom (DoF) per node
Expand Down
2 changes: 1 addition & 1 deletion modules-local/beamdyn/src/BeamDyn_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ SUBROUTINE BD_TrapezoidalPointWeight(p, InputFileData)


! compute the trapezoidal quadrature weights, p%GLw:
id1 = InputFileData%kp_member(1) !adp: Why is this only checking the first member (size(kp_member) will be number of GL points)????
id1 = InputFileData%InpBl%station_total
temp_id0 = (id0 - 1)*p%refine + 1 ! Starting index in GL --> always going to be 1
temp_id1 = (id1 - 1)*p%refine + 1 ! ending index in GL --> will be size(p%GL)
denom = p%GL(temp_id1) - p%GL(temp_id0) ! This is the range of GL --> for single member, is always == 2
Expand Down
12 changes: 9 additions & 3 deletions modules-local/elastodyn/src/ElastoDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3510,8 +3510,14 @@ SUBROUTINE SetPrimaryParameters( p, InputFileData, ErrStat, ErrMsg )

p%CosPreC = COS( InputFileData%Precone(1:p%NumBl) )
p%SinPreC = SIN( InputFileData%Precone(1:p%NumBl) )
p%CosDel3 = COS( InputFileData%Delta3 )
p%SinDel3 = SIN( InputFileData%Delta3 )

IF ( p%NumBl == 2 ) THEN
p%CosDel3 = COS( InputFileData%Delta3 )
p%SinDel3 = SIN( InputFileData%Delta3 )
ELSE
p%CosDel3 = 1.0_ReKi
p%SinDel3 = 0.0_ReKi
END IF

!...............................................................................................................................

Expand Down Expand Up @@ -8706,7 +8712,7 @@ SUBROUTINE ED_AllocOutput( p, m, u, y, ErrStat, ErrMsg )
!.......................................................

CALL MeshCreate( BlankMesh = y%TowerLn2Mesh &
, IOS = COMPONENT_OUTPUT &
, IOS = COMPONENT_OUTPUT &
, NNodes = p%TwrNodes + 2 &
, TranslationDisp = .TRUE. &
, Orientation = .TRUE. &
Expand Down
9 changes: 8 additions & 1 deletion modules-local/fast-library/src/FAST_Registry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ typedef ^ FAST_ParameterType CHARACTER(1024) IceFile - - - "Name of file contain
#typedef ^ FAST_ParameterType DbKi SttsTime - - - "Amount of time between screen status messages" s
typedef ^ FAST_ParameterType DbKi TStart - - - "Time to begin tabular output" s
typedef ^ FAST_ParameterType DbKi DT_Out - - - "Time step for tabular output" s
typedef ^ FAST_ParameterType LOGICAL WrSttsTime - - - "Whether we should write the status times to the screen" -
typedef ^ FAST_ParameterType INTEGER n_SttsTime - - - "Number of time steps between screen status messages" -
typedef ^ FAST_ParameterType INTEGER n_ChkptTime - - - "Number of time steps between writing checkpoint files" -
typedef ^ FAST_ParameterType INTEGER n_VTKTime - - - "Number of time steps between writing VTK files" -
Expand Down Expand Up @@ -140,6 +141,7 @@ typedef ^ FAST_ParameterType IntKi SizeLin {NumModules+1}{3} - - "dimension 1 is
typedef ^ FAST_ParameterType IntKi LinStartIndx {NumModules}{3} - - "dimension 1 is the module ID: dimension 2 is the starting index in combined matrices of (1) the module's inputs, (2) the module's linearized outputs, and (3) the module's continuous states" -
typedef ^ FAST_ParameterType IntKi Lin_NumMods - - - "number of modules in the linearization"
typedef ^ FAST_ParameterType Integer Lin_ModOrder {NumModules} - - "indices that determine which order the modules are in the glue-code linearization matrix"
typedef ^ FAST_ParameterType CHARACTER(4) Tdesc - - - "description of turbine ID (for FAST.Farm) screen printing"

# ..... FAST_LinType data .......................................................................................................
typedef FAST FAST_LinType CHARACTER(LinChanLen) Names_u {:} - - "Names of the linearized inputs"
Expand Down Expand Up @@ -477,10 +479,15 @@ typedef ^ FAST_MiscVarType INTEGER NextLinTimeIndx - - - "index for next time in
typedef ^ FAST_ExternInitType DbKi Tmax - -1 - "External code specified Tmax" s
typedef ^ FAST_ExternInitType IntKi SensorType - SensorType_None - "lidar sensor type, which should not be pulsed at the moment; this input should be replaced with a section in the InflowWind input file" -
typedef ^ FAST_ExternInitType LOGICAL LidRadialVel - - - "TRUE => return radial component, FALSE => return 'x' direction estimate" -
typedef ^ FAST_ExternInitType IntKi TurbineID - - - "ID number for turbine (used to create output file naming convention)" -
typedef ^ FAST_ExternInitType IntKi TurbineID - 0 - "ID number for turbine (used to create output file naming convention)" -
typedef ^ FAST_ExternInitType ReKi TurbinePos {3} - - "Initial position of turbine base (origin used in future for graphics)" m
typedef ^ FAST_ExternInitType IntKi NumSC2Ctrl - - - "number of controller inputs [from supercontroller]" -
typedef ^ FAST_ExternInitType IntKi NumCtrl2SC - - - "number of controller outputs [to supercontroller]" -
typedef ^ FAST_ExternInitType logical FarmIntegration - .false. - "whether this is called from FAST.Farm (or another program that doesn't want FAST to call all of the init stuff first)" -
typedef ^ FAST_ExternInitType IntKi windGrid_n 4 - - "number of grid points in the x, y, z, and t directions for IfW" -
typedef ^ FAST_ExternInitType ReKi windGrid_delta 4 - - "size between 2 consecutive grid points in each grid direction for IfW" "m,m,m,s"
typedef ^ FAST_ExternInitType ReKi windGrid_pZero 3 - - "fixed position of the XYZ grid (i.e., XYZ coordinates of IfW m%V(:,1,1,1,:))" m
typedef ^ FAST_ExternInitType CHARACTER(1024) RootName - - - "Root name of FAST output files (overrides normal operation)" -
typedef ^ FAST_ExternInitType IntKi NumActForcePtsBlade - - - "number of actuator line force points in blade" -
typedef ^ FAST_ExternInitType IntKi NumActForcePtsTower - - - "number of actuator line force points in tower" -

Expand Down
4 changes: 2 additions & 2 deletions modules-local/fast-library/src/FAST_Solver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ SUBROUTINE BD_InputSolve( p_FAST, BD, y_AD, u_AD, MeshMapData, ErrStat, ErrMsg )
TYPE(FAST_ParameterType), INTENT(IN ) :: p_FAST !< Glue-code simulation parameters
TYPE(BeamDyn_Data), INTENT(INOUT) :: BD !< BD Inputs at t
TYPE(AD_OutputType), INTENT(IN ) :: y_AD !< AeroDyn outputs
TYPE(AD_InputType), INTENT(INOUT) :: u_AD !< AD inputs (for AD-BD load transfer)
TYPE(AD_InputType), INTENT(IN ) :: u_AD !< AD inputs (for AD-BD load transfer)

TYPE(FAST_ModuleMapType), INTENT(INOUT) :: MeshMapData !< Data for mapping between modules
INTEGER(IntKi), INTENT( OUT) :: ErrStat !< Error status
Expand Down Expand Up @@ -123,7 +123,7 @@ SUBROUTINE ED_InputSolve( p_FAST, u_ED, y_ED, p_AD14, y_AD14, y_AD, y_SrvD, u_AD
TYPE(AD14_ParameterType), INTENT(IN ) :: p_AD14 !< AeroDyn14 parameters (a hack because the AD14 meshes aren't set up properly)
TYPE(AD14_OutputType), INTENT(IN ) :: y_AD14 !< AeroDyn14 outputs
TYPE(AD_OutputType), INTENT(IN ) :: y_AD !< AeroDyn outputs
TYPE(AD_InputType), INTENT(INOUT) :: u_AD !< AD inputs (for AD-ED load transfer)
TYPE(AD_InputType), INTENT(IN ) :: u_AD !< AD inputs (for AD-ED load transfer)
TYPE(SrvD_OutputType), INTENT(IN ) :: y_SrvD !< ServoDyn outputs
TYPE(SrvD_InputType), INTENT(IN ) :: u_SrvD !< ServoDyn inputs

Expand Down
Loading