|
- subroutine Pump2_OnMode_Solver(Pump_No)
-
- use Pump_VARIABLES
- use CPumpsVariables
- use CDrillingConsoleVariables
- use CDataDisplayConsoleVariables
- use CSimulationVariables
- use CDrillWatchVariables
- use equipments_PowerLimit
- use CSounds
- use CWarningsVariables
-
-
- IMPLICIT NONE
- INTEGER :: Pump_No
-
-
-
-
- Call Pump_INPUTS
-
- ! Torque unit = [in.lbf]
- PUMP(Pump_No)%Torque = (63025./132000.)*(1./PUMP(Pump_No)%Trans_Ratio)*(PUMP(Pump_No)%Piston_Area*PUMP(Pump_No)%Stroke_Length*PUMP(Pump_No)%StandPipe_Pressure/PUMP(Pump_No)%Mech_Efficiency/PUMP(Pump_No)%Vol_Efficiency)
-
-
- !call PowerLimits
-
-
-
- Call Pump_Traction_Motor(Pump_No)
-
- if (PUMP(Pump_No)%N_ref<=0.) then
- PUMP(Pump_No)%w_ref = 0.
- PUMP(Pump_No)%w_old = 0.
- PUMP(Pump_No)%w = 0.
- PUMP(Pump_No)%w_new = 0.
- PUMP(Pump_No)%ia_old = 0.
- PUMP(Pump_No)%ia = 0.
- PUMP(Pump_No)%ia_new = 0.
- PUMP(Pump_No)%x_old = 0.
- PUMP(Pump_No)%x = 0.
- PUMP(Pump_No)%x_new = 0.
- end if
-
-
-
- if (Power_sigma>max_Power_sigma) then
- PUMP(Pump_No)%Vt_old = PUMP(Pump_No)%Vt_old
- else
- PUMP(Pump_No)%Vt_old = PUMP(Pump_No)%x_new+Kpi*(Kpn*((30.*PUMP(Pump_No)%w_ref/pi)-(30.*PUMP(Pump_No)%w_new/pi))-PUMP(Pump_No)%ia_new)
- IF (PUMP(Pump_No)%Vt_old>810.) THEN
- PUMP(Pump_No)%Vt_old = 810.
- ELSE IF (PUMP(Pump_No)%Vt_old<0.) THEN
- PUMP(Pump_No)%Vt_old = 0.
- END IF
- end if
-
-
-
-
- !PUMP(Pump_No)%Vt=PUMP(Pump_No)%x_new+Kpi*(Kpn*((30.*PUMP(Pump_No)%w_ref/pi)-(30.*PUMP(Pump_No)%w_new/pi))-PUMP(Pump_No)%ia_new)
- !IF (PUMP(Pump_No)%Vt>810.) THEN
- ! PUMP(Pump_No)%Vt=810.
- !ELSE IF (PUMP(Pump_No)%Vt<0.) THEN
- ! PUMP(Pump_No)%Vt=0.
- !END IF
-
- PUMP(Pump_No)%Speed = 30.*PUMP(Pump_No)%w_new/pi !Speed [RPM]
-
- if ( Pump2Failure == .true. ) then
- PUMP(2)%Speed = 0.d0
- PUMP(2)%w = 0.d0
- PUMP(2)%w_new = 0.d0
- PUMP(2)%w_old = 0.d0
- end if
-
-
- Call Pump_Solver(Pump_No)
- Call Pump_Total_Counts
-
-
-
- !Call Set_MP1SPMGauge( real((PUMP(1)%Speed/PUMP(1)%Trans_Ratio),8) )
- !SPM1 = MP1SPMGauge
- Call Set_MP2SPMGauge( sngl(1-PUMP(2)%SPMGaugeMalf)*real((PUMP(2)%Speed/PUMP(2)%Trans_Ratio),8) )
- SPM2 = MP2SPMGauge
- PUMP(2)%SoundSPM = INT(PUMP(2)%Speed/PUMP(2)%Trans_Ratio)
- Call SetSoundMP2( PUMP(2)%SoundSPM )
-
-
-
-
- !IF (PUMP(1)%Flow_Rate>0.) Then
- ! Call OpenPump1()
- !Else
- ! Call ClosePump1()
- !End if
-
- IF (PUMP(2)%Flow_Rate>0.) Then
- Call OpenPump2()
- Else
- Call ClosePump2()
- End if
-
-
-
-
- end subroutine Pump2_OnMode_Solver
|