|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- # 1 "/home/admin/SimulationCore2/Equipments/Drawworks/Drawworks_Direction.f90"
- subroutine Drawworks_Direction
-
- use CDrillingConsoleVariables
- use SimulationVariables
- use SimulationVariables
- use CDataDisplayConsole
- use SimulationVariables
- use SimulationVariables !@
-
- IMPLICIT NONE
-
- ! ! if (data%State%Drawworks%Switch==1) then !Up
- ! if (data%State%Drawworks%Throttle >= 0.d0) then !Up
- ! data%State%Drawworks%motion = +1
- ! data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ?
- ! data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s]
- ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height+(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m]
- ! ! else if (data%State%Drawworks%Switch==-1) then !Down
- ! else if (data%State%Drawworks%Throttle < 0.d0) then !Down
- ! data%State%Drawworks%motion = -1
- ! data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ?
- ! data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s]
- ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height-(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m]
- ! !else if (data%State%Drawworks%Switch==0) then !Off
- ! ! data%State%Drawworks%motion = 0
- ! ! data%State%Drawworks%w_old_drum = 0.d0
- ! ! data%State%Drawworks%w_drum = 0.d0
- ! ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height
- ! end if
-
-
- if ((data%State%Drawworks%Throttle>0.d0) .or. (data%State%Drawworks%Throttle==0.d0 .and. data%State%Drawworks%Speed/=0.d0 .and. data%State%Drawworks%motion==+1)) then !Up
- data%State%Drawworks%motion = +1
- data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ?
- data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s]
- !data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height+(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m]
- data%State%Drawworks%HookLinearVelocity = (((data%State%Drawworks%Diameter/2.0)*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum))/data%State%Drawworks%NumberOfLine) ![m/s]
- else if ((data%State%Drawworks%Throttle<0.d0) .or. (data%State%Drawworks%Throttle==0.d0 .and. data%State%Drawworks%Speed/=0.d0 .and. data%State%Drawworks%motion==-1)) then !Down
- data%State%Drawworks%motion = -1
- data%State%Drawworks%w_old_drum = data%State%Drawworks%w_drum !(pi*(data%State%Drawworks%N_old/data%State%Drawworks%Conv_Ratio)/30.d0) ?
- data%State%Drawworks%w_drum = (pi*(data%State%Drawworks%Speed/data%State%Drawworks%Conv_Ratio)/30.d0) ![rad/s]
- !data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height-(((data%State%Drawworks%Diameter/2.0)*(data%State%Drawworks%time_step*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum)))/data%State%Drawworks%NumberOfLine) ![m]
- data%State%Drawworks%HookLinearVelocity = -(((data%State%Drawworks%Diameter/2.0)*0.5d0*(data%State%Drawworks%w_drum+data%State%Drawworks%w_old_drum))/data%State%Drawworks%NumberOfLine) ![m/s]
- else !fixed
- data%State%Drawworks%motion = 0
- data%State%Drawworks%w_old_drum = 0.d0
- data%State%Drawworks%w_drum = 0.d0
- data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height
- !data%State%Drawworks%HookLinearVelocity = 0.d0 ![m/s]
- end if
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- !if (data%State%Drawworks%Conv_Ratio==1.d0) then
- !
- !
- ! IF (data%State%Drawworks%motion==+1) THEN
- ! Call Drawworks_Free_Traction_motor_Dir
- ! if (data%State%Drawworks%w_drum_Dir<=0.) then
- ! data%State%Drawworks%motion = 0
- ! else
- ! data%State%Drawworks%motion = +1
- ! Call Drawworks_Free_Traction_motor
- ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
- ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
- ! end if
- ! ELSE
- ! if (((data%State%Drawworks%F_fastline*(data%State%Drawworks%Diameter/2.0d0))-(((data%State%Drawworks%Diameter/2.0d0)*data%State%Drawworks%BreakLoad)*(data%State%Drawworks%ManualBreak/100.0d0)))<=0.) then
- ! data%State%Drawworks%motion = 0
- ! data%State%Drawworks%w_drum = 0.0d0
- ! data%State%Drawworks%w_old_drum = 0.0d0
- ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
- ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
- ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height
- !
- ! data%State%Drawworks%ia = 0.
- ! data%State%Drawworks%ia_old = 0.
- ! data%State%Drawworks%x = 0.
- ! data%State%Drawworks%x_old = 0.
- ! data%State%Drawworks%y = 0.
- ! data%State%Drawworks%y_old = 0.
- ! else
- ! data%State%Drawworks%motion = -1
- ! Call Drawworks_Free_Traction_motor_dawn_motion
- ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
- ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
- ! end if
- !
- ! END IF
- !
- !
- !else
- !
- ! IF (data%State%Drawworks%motion==-1) THEN
- ! data%State%Drawworks%w = -data%State%Drawworks%w
- ! data%State%Drawworks%w_old = -data%State%Drawworks%w_old
- ! data%State%Drawworks%w_drum = -data%State%Drawworks%w_drum
- ! data%State%Drawworks%w_old_drum = -data%State%Drawworks%w_old_drum
- ! END IF
- ! Call Drawworks_Traction_motor_ClutchMode_Dir
- ! IF (data%State%Drawworks%w_Dir>0.d0) then
- !
- ! data%State%Drawworks%motion = +1
- ! Call Drawworks_Traction_motor_ClutchMode
- ! data%State%Drawworks%w_drum = data%State%Drawworks%w/data%State%Drawworks%Conv_Ratio
- ! data%State%Drawworks%w_old_drum = data%State%Drawworks%w_old/data%State%Drawworks%Conv_Ratio
- ! ELSE
- ! data%State%Drawworks%EddyTorque = (1.039d5*exp(4.343d-4*(30.0d0*(data%State%Drawworks%w/data%State%Drawworks%Conv_Ratio)/pi)))+(-1.036d5*exp(-.047920d0*(30.0d0*(data%State%Drawworks%w/data%State%Drawworks%Conv_Ratio)/pi))) !Lbf.ft
- ! if (data%State%Drawworks%EddyTorque>115000.) then
- ! data%State%Drawworks%EddyTorque = 115000.0d0
- ! end if
- ! data%State%Drawworks%EddyTorque = 1.355817948*data%State%Drawworks%EddyTorque ![N.m]
- ! if ((data%State%Drawworks%F_fastline*(data%State%Drawworks%Diameter/2.0d0))>((((data%State%Drawworks%Diameter/2.0d0)*data%State%Drawworks%BreakLoad)*(data%State%Drawworks%ManualBreak/100.0d0))+(data%State%Drawworks%EddyTorque*(data%State%Drawworks%EddyBreak/100.0d0)))) then
- ! data%State%Drawworks%motion = -1
- !
- ! IF (data%State%Drawworks%w_drum<0.) THEN
- ! data%State%Drawworks%w = -data%State%Drawworks%w
- ! data%State%Drawworks%w_old = -data%State%Drawworks%w_old
- ! !data%State%Drawworks%w = 0. !???????????????
- ! !data%State%Drawworks%w_old = 0. !???????????????
- ! data%State%Drawworks%w_drum = -data%State%Drawworks%w_drum
- ! data%State%Drawworks%w_old_drum = -data%State%Drawworks%w_old_drum
- ! END IF
- !
- ! data%State%Drawworks%Conv_Ratio = 1.
- ! Call Drawworks_Free_Traction_motor_dawn_motion
- ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
- ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
- ! !data%State%Drawworks%w_drum = data%State%Drawworks%w/data%State%Drawworks%Conv_Ratio
- ! !data%State%Drawworks%w_old_drum = data%State%Drawworks%w_old/data%State%Drawworks%Conv_Ratio
- ! else
- ! data%State%Drawworks%motion = 0
- ! data%State%Drawworks%w_drum = 0.0d0
- ! data%State%Drawworks%w_old_drum = 0.0d0
- ! data%State%Drawworks%w = data%State%Drawworks%w_drum*data%State%Drawworks%Conv_Ratio
- ! data%State%Drawworks%w_old = data%State%Drawworks%w_old_drum*data%State%Drawworks%Conv_Ratio
- ! data%State%Drawworks%Hook_Height = data%State%Drawworks%Hook_Height
- !
- ! data%State%Drawworks%ia = 0.
- ! data%State%Drawworks%ia_old = 0.
- ! data%State%Drawworks%x = 0.
- ! data%State%Drawworks%x_old = 0.
- ! data%State%Drawworks%y = 0.
- ! data%State%Drawworks%y_old = 0.
- ! end if
- !
- ! END IF
- !
- !end if
-
-
-
- !Call DWBrakeSound
-
-
-
- end subroutine Drawworks_Direction
|