Skip to content

Commit

Permalink
IfW: remove FAST_Solver call to IfW UpdateStates
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-platt committed Jan 22, 2024
1 parent dd504f9 commit 74c3514
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions modules/openfast-library/src/FAST_Solver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5434,26 +5434,26 @@ SUBROUTINE FAST_AdvanceStates( t_initial, n_t_global, p_FAST, m_FAST, ED, BD, Sr
CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )


! InflowWind: get predicted states
IF ( p_FAST%CompInflow == Module_IfW ) THEN
CALL InflowWind_CopyContState (IfW%x( STATE_CURR), IfW%x( STATE_PRED), MESH_UPDATECOPY, Errstat2, ErrMsg2)
CALL SetErrStat( Errstat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
CALL InflowWind_CopyDiscState (IfW%xd(STATE_CURR), IfW%xd(STATE_PRED), MESH_UPDATECOPY, Errstat2, ErrMsg2)
CALL SetErrStat( Errstat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
CALL InflowWind_CopyConstrState (IfW%z( STATE_CURR), IfW%z( STATE_PRED), MESH_UPDATECOPY, Errstat2, ErrMsg2)
CALL SetErrStat( Errstat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
CALL InflowWind_CopyOtherState( IfW%OtherSt(STATE_CURR), IfW%OtherSt(STATE_PRED), MESH_UPDATECOPY, Errstat2, ErrMsg2)
CALL SetErrStat( Errstat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )

DO j_ss = 1, p_FAST%n_substeps( MODULE_IfW )
n_t_module = n_t_global*p_FAST%n_substeps( MODULE_IfW ) + j_ss - 1
t_module = n_t_module*p_FAST%dt_module( MODULE_IfW ) + t_initial

CALL InflowWind_UpdateStates( t_module, n_t_module, IfW%Input, IfW%InputTimes, IfW%p, IfW%x(STATE_PRED), IfW%xd(STATE_PRED), &
IfW%z(STATE_PRED), IfW%OtherSt(STATE_PRED), IfW%m, ErrStat2, ErrMsg2 )
CALL SetErrStat( Errstat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
END DO !j_ss
END IF
! InflowWind: get predicted states -- NO STATES
! IF ( p_FAST%CompInflow == Module_IfW ) THEN
! CALL InflowWind_CopyContState (IfW%x( STATE_CURR), IfW%x( STATE_PRED), MESH_UPDATECOPY, Errstat2, ErrMsg2)
! CALL SetErrStat( Errstat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
! CALL InflowWind_CopyDiscState (IfW%xd(STATE_CURR), IfW%xd(STATE_PRED), MESH_UPDATECOPY, Errstat2, ErrMsg2)
! CALL SetErrStat( Errstat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
! CALL InflowWind_CopyConstrState (IfW%z( STATE_CURR), IfW%z( STATE_PRED), MESH_UPDATECOPY, Errstat2, ErrMsg2)
! CALL SetErrStat( Errstat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
! CALL InflowWind_CopyOtherState( IfW%OtherSt(STATE_CURR), IfW%OtherSt(STATE_PRED), MESH_UPDATECOPY, Errstat2, ErrMsg2)
! CALL SetErrStat( Errstat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
!
! DO j_ss = 1, p_FAST%n_substeps( MODULE_IfW )
! n_t_module = n_t_global*p_FAST%n_substeps( MODULE_IfW ) + j_ss - 1
! t_module = n_t_module*p_FAST%dt_module( MODULE_IfW ) + t_initial
!
! CALL InflowWind_UpdateStates( t_module, n_t_module, IfW%Input, IfW%InputTimes, IfW%p, IfW%x(STATE_PRED), IfW%xd(STATE_PRED), &
! IfW%z(STATE_PRED), IfW%OtherSt(STATE_PRED), IfW%m, ErrStat2, ErrMsg2 )
! CALL SetErrStat( Errstat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
! END DO !j_ss
! END IF


! because AeroDyn DBEMT states depend heavily on getting inputs correct, we are overwriting its inputs with updated inflow outputs here
Expand Down

0 comments on commit 74c3514

Please sign in to comment.