|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- subroutine TopDrive_MainSolver
-
-
- Use TopDrive_VARIABLES
-
- IMPLICIT NONE
-
-
-
- CALL TopDrive_Inputs
-
-
- if ( (TDS%PowerState==-1) ) then !FWD
-
- TDS%SoundBlower = .true.
- TDS%PowerLed = 1
-
- TDS%N_new = (TDS%RpmKnob/250.d0)*965.d0 ! 0<TDS%RpmKnob<250 , 0<TDS%N_ref(truction motor)<965
-
- !===> Top Drive Malfunction ----> Drive Motor Failure
- if ( TDS%MotorFaileMalf==1 ) then
- TDS%N_new = 0.d0
- end if
-
- !========================== Top Drive Rate limit ==========================
- if (((TDS%N_new-TDS%N_old)/TDS%time_step)>TDS%RateChange) then
- TDS%N_ref = (TDS%RateChange*TDS%time_step)+TDS%N_old
- else if (((TDS%N_old-TDS%N_new)/TDS%time_step)>TDS%RateChange) then
- TDS%N_ref = (-TDS%RateChange*TDS%time_step)+TDS%N_old
- else
- TDS%N_ref = TDS%N_new
- end if
- !==========================================================================
-
- CALL TopDrive_Solver
-
- else if ( (TDS%PowerState==1) ) then !REV
-
- TDS%SoundBlower = .true.
- TDS%PowerLed = 1
-
- TDS%N_new = (TDS%RpmKnob/250.d0)*965.d0
-
- !===> Top Drive Malfunction ----> Drive Motor Failure
- if ( TDS%MotorFaileMalf==1 ) then
- TDS%N_new = 0.d0
- end if
-
- !========================== Top Drive Rate limit ==========================
- if (((TDS%N_new-TDS%N_old)/TDS%time_step)>TDS%RateChange) then
- TDS%N_ref =(TDS%RateChange*TDS%time_step)+TDS%N_old
- else if (((TDS%N_old-TDS%N_new)/TDS%time_step)>TDS%RateChange) then
- TDS%N_ref = (-TDS%RateChange*TDS%time_step)+TDS%N_old
- else
- TDS%N_ref = TDS%N_new
- end if
- !==========================================================================
-
- CALL TopDrive_Solver
-
- else
-
- if( (TDS%PowerState /= 0) ) then
- TDS%SoundBlower = .true.
- TDS%PowerLed = 1
- else
- TDS%SoundBlower = .false.
- TDS%PowerLed = 0
- end if
-
- Call TopDrive_OffMode
-
- end if
-
-
- Call TopDrive_Outputs
-
- TDS%N_old = TDS%N_ref
-
-
-
-
- end subroutine TopDrive_MainSolver
|