@@ -5,56 +5,6 @@ module CPumps | |||
public | |||
contains | |||
! subroutine PumpsToJson(parent) | |||
! type(json_value),pointer :: parent | |||
! type(json_core) :: json | |||
! type(json_value),pointer :: p | |||
! ! 1. create new node | |||
! call json%create_object(p,'Pumps') | |||
! ! 2. add member of data type to new node | |||
! ! call StringConfigurationToJson(p) | |||
! ! call FormationToJson(p) | |||
! call json%add(p,"MudPump1LinerDiameter",data%Configuration%Pumps%MudPump1LinerDiameter) | |||
! call json%add(p,"MudPump1Stroke",data%Configuration%Pumps%MudPump1Stroke) | |||
! call json%add(p,"MudPump1MechanicalEfficiency",data%Configuration%Pumps%MudPump1MechanicalEfficiency) | |||
! call json%add(p,"MudPump1VolumetricEfficiency",data%Configuration%Pumps%MudPump1VolumetricEfficiency) | |||
! call json%add(p,"MudPump1Output",data%Configuration%Pumps%MudPump1Output) | |||
! call json%add(p,"MudPump1OutputBblStroke",data%Configuration%Pumps%MudPump1OutputBblStroke) | |||
! call json%add(p,"MudPump1Maximum",data%Configuration%Pumps%MudPump1Maximum) | |||
! call json%add(p,"MudPump1ReliefValvePressure",data%Configuration%Pumps%MudPump1ReliefValvePressure) | |||
! call json%add(p,"MudPump2LinerDiameter",data%Configuration%Pumps%MudPump2LinerDiameter) | |||
! call json%add(p,"MudPump2Stroke",data%Configuration%Pumps%MudPump2Stroke) | |||
! call json%add(p,"MudPump2MechanicalEfficiency",data%Configuration%Pumps%MudPump2MechanicalEfficiency) | |||
! ! call json%add(p,"MudPump2VolumetricEfficiency",data%Configuration%Pumps%MudPump2VolumetricEfficiency) | |||
! call json%add(p,"MudPump2Output",data%Configuration%Pumps%MudPump2Output) | |||
! call json%add(p,"MudPump2OutputBblStroke",data%Configuration%Pumps%MudPump2OutputBblStroke) | |||
! call json%add(p,"MudPump2Maximum",data%Configuration%Pumps%MudPump2Maximum) | |||
! call json%add(p,"MudPump2ReliefValvePressure",data%Configuration%Pumps%MudPump2ReliefValvePressure) | |||
! call json%add(p,"CementPumpLinerDiameter",data%Configuration%Pumps%CementPumpLinerDiameter) | |||
! call json%add(p,"CementPumpStroke",data%Configuration%Pumps%CementPumpStroke) | |||
! call json%add(p,"CementPumpMechanicalEfficiency",data%Configuration%Pumps%CementPumpMechanicalEfficiency) | |||
! ! call json%add(p,"CementPumpVolumetricEfficiency",data%Configuration%Pumps%CementPumpVolumetricEfficiency) | |||
! call json%add(p,"CementPumpOutput",data%Configuration%Pumps%CementPumpOutput) | |||
! call json%add(p,"CementPumpOutputBblStroke",data%Configuration%Pumps%CementPumpOutputBblStroke) | |||
! call json%add(p,"CementPumpMaximum",data%Configuration%Pumps%CementPumpMaximum) | |||
! call json%add(p,"CementPumpReliefValvePressure ",data%Configuration%Pumps%CementPumpReliefValvePressure ) | |||
! call json%add(p,"MudPump1ReliefValveIsSet",data%Configuration%Pumps%MudPump1ReliefValveIsSet) | |||
! call json%add(p,"MudPump2ReliefValveIsSet",data%Configuration%Pumps%MudPump2ReliefValveIsSet) | |||
! call json%add(p,"CementPumpReliefValveIsSet",data%Configuration%Pumps%CementPumpReliefValveIsSet) | |||
! ! call json%add(p,"ManualPumpPower",data%Configuration%Pumps%ManualPumpPower) | |||
! ! call json%add(p,"Valve1",data%Configuration%Pumps%Valve1) | |||
! ! call json%add(p,"Valve2",data%Configuration%Pumps%Valve2) | |||
! ! call json%add(p,"Valve3",data%Configuration%Pumps%Valve3) | |||
! ! call json%add(p,"Valve4",data%Configuration%Pumps%Valve4) | |||
! ! call json%add(p,"Valve5",data%Configuration%Pumps%Valve5) | |||
! ! 3. add new node to parent | |||
! call json%add(parent,p) | |||
! end subroutine | |||
subroutine PumpsFromJson(parent) | |||
use json_module,IK =>json_ik | |||
type(json_value),pointer :: parent | |||
@@ -69,8 +19,6 @@ module CPumps | |||
call json%get(pitem,data%Configuration%Pumps%MudPump1Stroke) | |||
call json%get(p,"MudPump1MechanicalEfficiency",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump1MechanicalEfficiency) | |||
! call json%get(p,"MudPump1VolumetricEfficiency",pitem) | |||
! call json%get(pitem,data%Configuration%Pumps%MudPump1VolumetricEfficiency) | |||
call json%get(p,"MudPump1Output",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump1Output) | |||
call json%get(p,"MudPump1OutputBblStroke",pitem) | |||
@@ -85,8 +33,6 @@ module CPumps | |||
call json%get(pitem,data%Configuration%Pumps%MudPump2Stroke) | |||
call json%get(p,"MudPump2MechanicalEfficiency",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump2MechanicalEfficiency) | |||
! call json%get(p,"MudPump2VolumetricEfficiency",pitem) | |||
! call json%get(pitem,data%Configuration%Pumps%MudPump2VolumetricEfficiency) | |||
call json%get(p,"MudPump2Output",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump2Output) | |||
call json%get(p,"MudPump2OutputBblStroke",pitem) | |||
@@ -101,8 +47,6 @@ module CPumps | |||
call json%get(pitem,data%Configuration%Pumps%CementPumpStroke) | |||
call json%get(p,"CementPumpMechanicalEfficiency",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%CementPumpMechanicalEfficiency) | |||
! call json%get(p,"CementPumpVolumetricEfficiency",pitem) | |||
! call json%get(pitem,data%Configuration%Pumps%CementPumpVolumetricEfficiency) | |||
call json%get(p,"CementPumpOutput",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%CementPumpOutput) | |||
call json%get(p,"CementPumpOutputBblStroke",pitem) | |||
@@ -118,17 +62,40 @@ module CPumps | |||
call json%get(p,"CementPumpReliefValveIsSet",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%CementPumpReliefValveIsSet) | |||
call json%get(p,"ManualPumpPower",pitem) | |||
! call json%get(pitem,data%Configuration%Pumps%ManualPumpPower) | |||
! call json%get(p,"Valve1",pitem) | |||
! call json%get(pitem,data%Configuration%Pumps%Valve1) | |||
! call json%get(p,"Valve2",pitem) | |||
! call json%get(pitem,data%Configuration%Pumps%Valve2) | |||
! call json%get(p,"Valve3",pitem) | |||
! call json%get(pitem,data%Configuration%Pumps%Valve3) | |||
! call json%get(p,"Valve4",pitem) | |||
! call json%get(pitem,data%Configuration%Pumps%Valve4) | |||
! call json%get(p,"Valve5",pitem) | |||
! call json%get(pitem,data%Configuration%Pumps%Valve5) | |||
! Newly added | |||
call json%get(pitem,data%Configuration%Pumps%MudPump1VolumetricOutput) | |||
call json%get(p,"MudPump1VolumetricOutput",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump2VolumetricOutput) | |||
call json%get(p,"MudPump2VolumetricOutput",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%CementPumpVolumetricOutput) | |||
call json%get(p,"CementPumpVolumetricOutput",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump1MaximumPressure) | |||
call json%get(p,"MudPump1MaximumPressure",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump1PumpRateChange) | |||
call json%get(p,"MudPump1PumpRateChange",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump1SurfaceLineLength) | |||
call json%get(p,"MudPump1SurfaceLineLength",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump1DelayToShutdown) | |||
call json%get(p,"MudPump1DelayToShutdown",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump2MaximumPressure) | |||
call json%get(p,"MudPump2MaximumPressure",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump2PumpRateChange) | |||
call json%get(p,"MudPump2PumpRateChange",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump2SurfaceLineLength) | |||
call json%get(p,"MudPump2SurfaceLineLength",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%MudPump2DelayToShutdown) | |||
call json%get(p,"MudPump2DelayToShutdown",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%CementPumpMaximumPressure) | |||
call json%get(p,"CementPumpMaximumPressure",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%CementPumpPumpRateChange) | |||
call json%get(p,"CementPumpPumpRateChange",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%CementPumpSurfaceLineLength) | |||
call json%get(p,"CementPumpSurfaceLineLength",pitem) | |||
call json%get(pitem,data%Configuration%Pumps%CementPumpDelayToShutdown) | |||
call json%get(p,"CementPumpDelayToShutdown",pitem) | |||
end subroutine | |||
@@ -37,12 +37,13 @@ module CPumpsVariables | |||
logical :: MudPump2ReliefValveIsSet | |||
logical :: CementPumpReliefValveIsSet | |||
real(8) :: MudPump1VolumetricOutput | |||
real(8) :: MudPump1VolumetricOutput,MudPump2VolumetricOutput,CementPumpVolumetricOutput | |||
! Newly added | |||
Real(8) :: MudPump1MaximumPressure,MudPump1PumpRateChange,MudPump1SurfaceLineLength,MudPump1DelayToShutdown | |||
Real(8) :: MudPump2MaximumPressure,MudPump2PumpRateChange,MudPump2SurfaceLineLength,MudPump2DelayToShutdown | |||
Real(8) :: CementPumpMaximumPressure,CementPumpPumpRateChange,CementPumpSurfaceLineLength,CementPumpDelayToShutdown | |||
End type PumpSpecificationType | |||
! Type(PumpSpecificationType)::PumpsSpecification | |||
@@ -19,7 +19,7 @@ subroutine Pump2_MainSolver | |||
!========================== Pump 2 Rate limit ========================== | |||
if (((data%State%Pump(2)%N_new-data%State%Pump(2)%N_old)/data%State%Pump(2)%time_step)>data%State%Pump(2)%RateChange) then | |||
data%State%Pump(2)%Speed =(data%State%Pump(2)%RateChange*data%State%Pump(2)%time_step)+data%State%Pump(2)%N_old | |||
data%State%Pump(2)%Speed =(data%State%Pump(2)%RateChange*data%State%Pump(2)%time_step)+data%State%Pump(2)%N_old ![RPM] | |||
else if (((data%State%Pump(2)%N_old-data%State%Pump(2)%N_new)/data%State%Pump(2)%time_step)>data%State%Pump(2)%RateChange) then | |||
data%State%Pump(2)%Speed = (-data%State%Pump(2)%RateChange*data%State%Pump(2)%time_step)+data%State%Pump(2)%N_old | |||
else | |||
@@ -30,7 +30,7 @@ subroutine Pump_OffMode_Solver(Pump_No) | |||
data%State%Pump(Pump_No)%Speed = ( data%State%Pump(Pump_No)%Flow_Rate/(data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0) )*data%State%Pump(Pump_No)%Trans_Ratio ![rpm] | |||
end if | |||
data%State%Pump(Pump_No)%SoundSPM = INT(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio) | |||
data%State%Pump(Pump_No)%SoundSPM = INT(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio) ![SPM] | |||
If (data%State%Pump(Pump_No)%Flow_Rate>0.d0) Then | |||
data%State%Pump(Pump_No)%Open_Close = 1 | |||
@@ -8,7 +8,7 @@ subroutine Pump_OnMode_Solver(Pump_No) | |||
data%State%Pump(Pump_No)%Flow_Rate = data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0*(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio) ![gpm] | |||
data%State%Pump(Pump_No)%Max_FlowRate = data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0*data%State%Pump(Pump_No)%MaxSPM ![gpm] | |||
data%State%Pump(Pump_No)%Max_FlowRate = data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0*data%State%Pump(Pump_No)%MaxSPM ![gpm] | |||
data%State%Pump(Pump_No)%HorsePower = ((data%State%Pump(Pump_No)%Flow_Rate/0.01d0)*data%State%Pump(Pump_No)%StandPipe_Pressure)/(168067.d0*data%State%Pump(Pump_No)%Mech_Efficiency) ![HHP] | |||
!data%State%Pump(Pump_No)%Max_Horsepower = ((data%State%Pump(Pump_No)%Flow_Rate/0.01d0)*data%State%Pump(Pump_No)%Max_Pressure)/(168067.d0*data%State%Pump(Pump_No)%Mech_Efficiency) ![HHP] | |||
data%State%Pump(Pump_No)%Max_Horsepower = (data%State%Pump(Pump_No)%Flow_Rate*data%State%Pump(Pump_No)%Max_Pressure)/(1714.d0*data%State%Pump(Pump_No)%Mech_Efficiency) | |||
@@ -18,7 +18,7 @@ subroutine Pump_OnMode_Solver(Pump_No) | |||
data%State%Pump(Pump_No)%Speed = ( data%State%Pump(Pump_No)%Flow_Rate/(data%State%Pump(Pump_No)%FlowRatePerSTK*4118.d0*0.01d0) )*data%State%Pump(Pump_No)%Trans_Ratio ![rpm] | |||
end if | |||
data%State%Pump(Pump_No)%SoundSPM = INT(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio) ![spm] | |||
data%State%Pump(Pump_No)%SoundSPM = INT(data%State%Pump(Pump_No)%Speed/data%State%Pump(Pump_No)%Trans_Ratio) ![SPM] ![spm] | |||
If (data%State%Pump(Pump_No)%Flow_Rate>0.d0) Then | |||
data%State%Pump(Pump_No)%Open_Close = 1 | |||
@@ -1,223 +1,223 @@ | |||
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/PumpsMain.f90" | |||
module PumpsMain | |||
use SimulationVariables | |||
implicit none | |||
public | |||
contains | |||
! **************************************** | |||
! ***** subroutine Pump1MainBody ***** | |||
! **************************** | |||
! subroutine Pump1_Setup() | |||
! use CSimulationVariables | |||
! implicit none | |||
! call OnSimulationInitialization%Add(Pump1_Init) | |||
! call OnSimulationStop%Add(Pump1_Init) | |||
! call OnPump1Step%Add(Pump1_Step) | |||
! call OnPump1Output%Add(Pump1_Output) | |||
! call OnPump1Main%Add(Pump1MainBody) | |||
! end subroutine | |||
subroutine Pump1_Init | |||
Call Pumps_StartUp | |||
end subroutine Pump1_Init | |||
subroutine Pump1_Step | |||
Call Pump1_MainSolver | |||
end subroutine Pump1_Step | |||
! subroutine Pump1_Output | |||
! implicit none | |||
! end subroutine Pump1_Output | |||
! subroutine Pump1MainBody | |||
! use ifport | |||
! use ifmt | |||
! implicit none | |||
! Call Pumps_StartUp | |||
! loop1 : do | |||
! Call Pumps_MainSolver | |||
! end do loop1 | |||
! end subroutine Pump1MainBody | |||
! **************************************** | |||
! ***** subroutine Pump2MainBody ***** | |||
! **************************** | |||
! subroutine Pump2_Setup() | |||
! use CSimulationVariables | |||
! implicit none | |||
! call OnSimulationInitialization%Add(Pump2_Init) | |||
! call OnSimulationStop%Add(Pump2_Init) | |||
! call OnPump2Step%Add(Pump2_Step) | |||
! call OnPump2Output%Add(Pump2_Output) | |||
! call OnPump2Main%Add(Pump2MainBody) | |||
! end subroutine | |||
! | |||
! subroutine Pump2_Init | |||
! implicit none | |||
! end subroutine Pump2_Init | |||
! | |||
! subroutine Pump2_Step | |||
! call Pump2_MainSolver | |||
! end subroutine Pump2_Step | |||
! | |||
! subroutine Pump2_Output | |||
! implicit none | |||
! end subroutine Pump2_Output | |||
! | |||
! subroutine Pump2MainBody | |||
! use ifport | |||
! use ifmt | |||
! use CWarnings | |||
! implicit none | |||
! | |||
! integer,dimension(8) :: MP_START_TIME, MP_END_TIME | |||
! INTEGER :: MP_SolDuration | |||
! | |||
! Call Pump_StartUp | |||
! | |||
! loop1 : do | |||
! | |||
! Call DATE_AND_TIME(values=MP_START_TIME) | |||
! | |||
! Call Pump2_MainSolver | |||
! | |||
! Call DATE_AND_TIME(values=MP_END_TIME) | |||
! MP_SolDuration = 100-(MP_END_TIME(5)*3600000+MP_END_TIME(6)*60000+MP_END_TIME(7)*1000+MP_END_TIME(8)-MP_START_TIME(5)*3600000-MP_START_TIME(6)*60000-MP_START_TIME(7)*1000-MP_START_TIME(8)) | |||
! if(MP_SolDuration > 0.0) then | |||
! Call sleepqq(MP_SolDuration) | |||
! end if | |||
! | |||
! if (IsStopped == .true.) then | |||
! exit loop1 | |||
! end if | |||
! | |||
! end do loop1 | |||
! | |||
! | |||
! end subroutine Pump2MainBody | |||
! | |||
! | |||
! | |||
! | |||
!! **************************************** | |||
!! ***** subroutine Pump3MainBody ***** | |||
!! **************************** | |||
! subroutine Pump3_Setup() | |||
! use CSimulationVariables | |||
! implicit none | |||
! call OnSimulationInitialization%Add(Pump3_Init) | |||
! call OnSimulationStop%Add(Pump3_Init) | |||
! call OnPump3Step%Add(Pump3_Step) | |||
! call OnPump3Output%Add(Pump3_Output) | |||
! call OnPump3Main%Add(Pump3MainBody) | |||
! end subroutine | |||
! | |||
! subroutine Pump3_Init | |||
! implicit none | |||
! end subroutine Pump3_Init | |||
! | |||
! subroutine Pump3_Step | |||
! implicit none | |||
! end subroutine Pump3_Step | |||
! | |||
! subroutine Pump3_Output | |||
! implicit none | |||
! end subroutine Pump3_Output | |||
! | |||
! subroutine Pump3MainBody | |||
! use ifport | |||
! use ifmt | |||
! implicit none | |||
! | |||
! | |||
! integer,dimension(8) :: MP_START_TIME, MP_END_TIME | |||
! INTEGER :: MP_SolDuration | |||
! | |||
! !Call Pump_StartUp | |||
! !loop1 : do | |||
! ! | |||
! ! Call sleepqq(10) | |||
! ! | |||
! ! !!! Pump3 Malfunction ----> Power Failure | |||
! ! !!if (data%State%Pump(1)%PowerFailMalf==1) then | |||
! ! !! !MP1BLWR=0 | |||
! ! !! Call Pump3_OffMode_Solver | |||
! ! !! Call ClosePump1() | |||
! ! !!end if | |||
! ! | |||
! ! !if( (MP1CPSwitch==1) .and. (MP1Throttle==0.) .and. (data%State%Pump(3)%PowerFailMalf==0) ) then | |||
! !! | |||
! !! loop2: do | |||
! !! | |||
! !! Call DATE_AND_TIME(values=MP_START_TIME) | |||
! !! | |||
! !!!! ! Pump3 Malfunction ----> Power Failure | |||
! !!!! if (data%State%Pump(1)%PowerFailMalf==1) then | |||
! !!!! !MP1BLWR=0 | |||
! !!!! Pump3_OffMode_Solver | |||
! !!!! Call ClosePump1() | |||
! !!!! exit loop2 | |||
! !!!! end if | |||
! !! | |||
! !! data%State%Pump(3)%N_new = MP1Throttle | |||
! !! if (((data%State%Pump(3)%N_new-data%State%Pump(3)%N_old)/data%State%Pump(3)%time_step)>193.) then | |||
! !! data%State%Pump(3)%N_ref =(193.*data%State%Pump(3)%time_step)+data%State%Pump(3)%N_old | |||
! !! else if (((data%State%Pump(3)%N_old-data%State%Pump(3)%N_new)/data%State%Pump(3)%time_step)>193.) then | |||
! !! data%State%Pump(3)%N_ref = (-193.*data%State%Pump(3)%time_step)+data%State%Pump(3)%N_old | |||
! !! else | |||
! !! data%State%Pump(3)%N_ref = data%State%Pump(3)%N_new | |||
! !! end if | |||
! !! | |||
! !! Call Pump3_OnMode_Solver | |||
! !! | |||
! !! IF (data%State%Pump(3)%Flow_Rate>0.) Then | |||
! !! Call OpenCementPump() | |||
! !! Else | |||
! !! Call CloseCementPump() | |||
! !! End if | |||
! !! | |||
! !! data%State%Pump(3)%N_old = data%State%Pump(3)%N_ref | |||
! !! | |||
! !! Call DATE_AND_TIME(values=MP_END_TIME) | |||
! !! MP_SolDuration = 100-(MP_END_TIME(6)*60000+MP_END_TIME(7)*1000+MP_END_TIME(8)-MP_START_TIME(6)*60000-MP_START_TIME(7)*1000-MP_START_TIME(8)) | |||
! !! !print*, 'MPtime=', MP_SolDuration | |||
! !! if(MP_SolDuration > 0.0) then | |||
! !! Call sleepqq(MP_SolDuration) | |||
! !! end if | |||
! !! | |||
! !! if ((MP1CPSwitch==0) .or. (IsStopped == .true.)) then | |||
! !! Call Pump3_OffMode_Solver | |||
! !! Call CloseCementPump() | |||
! !! exit loop2 | |||
! !! end if | |||
! !! end do loop2 | |||
! ! | |||
! ! else | |||
! ! | |||
! ! !Call Pump3_OffMode_Solver | |||
! ! !Call CloseCementPump() | |||
! ! | |||
! ! end if | |||
! ! | |||
! ! if (IsStopped == .true.) then | |||
! ! exit loop1 | |||
! ! end if | |||
! ! | |||
! !end do loop1 | |||
! | |||
! | |||
! end subroutine Pump3MainBody | |||
end module PumpsMain | |||
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/PumpsMain.f90" | |||
module PumpsMain | |||
use SimulationVariables | |||
implicit none | |||
public | |||
contains | |||
! **************************************** | |||
! ***** subroutine Pump1MainBody ***** | |||
! **************************** | |||
! subroutine Pump1_Setup() | |||
! use CSimulationVariables | |||
! implicit none | |||
! call OnSimulationInitialization%Add(Pump1_Init) | |||
! call OnSimulationStop%Add(Pump1_Init) | |||
! call OnPump1Step%Add(Pump1_Step) | |||
! call OnPump1Output%Add(Pump1_Output) | |||
! call OnPump1Main%Add(Pump1MainBody) | |||
! end subroutine | |||
subroutine Pump1_Init | |||
Call Pumps_StartUp | |||
end subroutine Pump1_Init | |||
subroutine Pump1_Step | |||
Call Pump1_MainSolver | |||
end subroutine Pump1_Step | |||
! subroutine Pump1_Output | |||
! implicit none | |||
! end subroutine Pump1_Output | |||
! subroutine Pump1MainBody | |||
! use ifport | |||
! use ifmt | |||
! implicit none | |||
! Call Pumps_StartUp | |||
! loop1 : do | |||
! Call Pumps_MainSolver | |||
! end do loop1 | |||
! end subroutine Pump1MainBody | |||
! **************************************** | |||
! ***** subroutine Pump2MainBody ***** | |||
! **************************** | |||
! subroutine Pump2_Setup() | |||
! use CSimulationVariables | |||
! implicit none | |||
! call OnSimulationInitialization%Add(Pump2_Init) | |||
! call OnSimulationStop%Add(Pump2_Init) | |||
! call OnPump2Step%Add(Pump2_Step) | |||
! call OnPump2Output%Add(Pump2_Output) | |||
! call OnPump2Main%Add(Pump2MainBody) | |||
! end subroutine | |||
! | |||
! subroutine Pump2_Init | |||
! implicit none | |||
! end subroutine Pump2_Init | |||
! | |||
! subroutine Pump2_Step | |||
! call Pump2_MainSolver | |||
! end subroutine Pump2_Step | |||
! | |||
! subroutine Pump2_Output | |||
! implicit none | |||
! end subroutine Pump2_Output | |||
! | |||
! subroutine Pump2MainBody | |||
! use ifport | |||
! use ifmt | |||
! use CWarnings | |||
! implicit none | |||
! | |||
! integer,dimension(8) :: MP_START_TIME, MP_END_TIME | |||
! INTEGER :: MP_SolDuration | |||
! | |||
! Call Pump_StartUp | |||
! | |||
! loop1 : do | |||
! | |||
! Call DATE_AND_TIME(values=MP_START_TIME) | |||
! | |||
! Call Pump2_MainSolver | |||
! | |||
! Call DATE_AND_TIME(values=MP_END_TIME) | |||
! MP_SolDuration = 100-(MP_END_TIME(5)*3600000+MP_END_TIME(6)*60000+MP_END_TIME(7)*1000+MP_END_TIME(8)-MP_START_TIME(5)*3600000-MP_START_TIME(6)*60000-MP_START_TIME(7)*1000-MP_START_TIME(8)) | |||
! if(MP_SolDuration > 0.0) then | |||
! Call sleepqq(MP_SolDuration) | |||
! end if | |||
! | |||
! if (IsStopped == .true.) then | |||
! exit loop1 | |||
! end if | |||
! | |||
! end do loop1 | |||
! | |||
! | |||
! end subroutine Pump2MainBody | |||
! | |||
! | |||
! | |||
! | |||
!! **************************************** | |||
!! ***** subroutine Pump3MainBody ***** | |||
!! **************************** | |||
! subroutine Pump3_Setup() | |||
! use CSimulationVariables | |||
! implicit none | |||
! call OnSimulationInitialization%Add(Pump3_Init) | |||
! call OnSimulationStop%Add(Pump3_Init) | |||
! call OnPump3Step%Add(Pump3_Step) | |||
! call OnPump3Output%Add(Pump3_Output) | |||
! call OnPump3Main%Add(Pump3MainBody) | |||
! end subroutine | |||
! | |||
! subroutine Pump3_Init | |||
! implicit none | |||
! end subroutine Pump3_Init | |||
! | |||
! subroutine Pump3_Step | |||
! implicit none | |||
! end subroutine Pump3_Step | |||
! | |||
! subroutine Pump3_Output | |||
! implicit none | |||
! end subroutine Pump3_Output | |||
! | |||
! subroutine Pump3MainBody | |||
! use ifport | |||
! use ifmt | |||
! implicit none | |||
! | |||
! | |||
! integer,dimension(8) :: MP_START_TIME, MP_END_TIME | |||
! INTEGER :: MP_SolDuration | |||
! | |||
! !Call Pump_StartUp | |||
! !loop1 : do | |||
! ! | |||
! ! Call sleepqq(10) | |||
! ! | |||
! ! !!! Pump3 Malfunction ----> Power Failure | |||
! ! !!if (data%State%Pump(1)%PowerFailMalf==1) then | |||
! ! !! !MP1BLWR=0 | |||
! ! !! Call Pump3_OffMode_Solver | |||
! ! !! Call ClosePump1() | |||
! ! !!end if | |||
! ! | |||
! ! !if( (MP1CPSwitch==1) .and. (MP1Throttle==0.) .and. (data%State%Pump(3)%PowerFailMalf==0) ) then | |||
! !! | |||
! !! loop2: do | |||
! !! | |||
! !! Call DATE_AND_TIME(values=MP_START_TIME) | |||
! !! | |||
! !!!! ! Pump3 Malfunction ----> Power Failure | |||
! !!!! if (data%State%Pump(1)%PowerFailMalf==1) then | |||
! !!!! !MP1BLWR=0 | |||
! !!!! Pump3_OffMode_Solver | |||
! !!!! Call ClosePump1() | |||
! !!!! exit loop2 | |||
! !!!! end if | |||
! !! | |||
! !! data%State%Pump(3)%N_new = MP1Throttle | |||
! !! if (((data%State%Pump(3)%N_new-data%State%Pump(3)%N_old)/data%State%Pump(3)%time_step)>193.) then | |||
! !! data%State%Pump(3)%N_ref =(193.*data%State%Pump(3)%time_step)+data%State%Pump(3)%N_old | |||
! !! else if (((data%State%Pump(3)%N_old-data%State%Pump(3)%N_new)/data%State%Pump(3)%time_step)>193.) then | |||
! !! data%State%Pump(3)%N_ref = (-193.*data%State%Pump(3)%time_step)+data%State%Pump(3)%N_old | |||
! !! else | |||
! !! data%State%Pump(3)%N_ref = data%State%Pump(3)%N_new | |||
! !! end if | |||
! !! | |||
! !! Call Pump3_OnMode_Solver | |||
! !! | |||
! !! IF (data%State%Pump(3)%Flow_Rate>0.) Then | |||
! !! Call OpenCementPump() | |||
! !! Else | |||
! !! Call CloseCementPump() | |||
! !! End if | |||
! !! | |||
! !! data%State%Pump(3)%N_old = data%State%Pump(3)%N_ref | |||
! !! | |||
! !! Call DATE_AND_TIME(values=MP_END_TIME) | |||
! !! MP_SolDuration = 100-(MP_END_TIME(6)*60000+MP_END_TIME(7)*1000+MP_END_TIME(8)-MP_START_TIME(6)*60000-MP_START_TIME(7)*1000-MP_START_TIME(8)) | |||
! !! !print*, 'MPtime=', MP_SolDuration | |||
! !! if(MP_SolDuration > 0.0) then | |||
! !! Call sleepqq(MP_SolDuration) | |||
! !! end if | |||
! !! | |||
! !! if ((MP1CPSwitch==0) .or. (IsStopped == .true.)) then | |||
! !! Call Pump3_OffMode_Solver | |||
! !! Call CloseCementPump() | |||
! !! exit loop2 | |||
! !! end if | |||
! !! end do loop2 | |||
! ! | |||
! ! else | |||
! ! | |||
! ! !Call Pump3_OffMode_Solver | |||
! ! !Call CloseCementPump() | |||
! ! | |||
! ! end if | |||
! ! | |||
! ! if (IsStopped == .true.) then | |||
! ! exit loop1 | |||
! ! end if | |||
! ! | |||
! !end do loop1 | |||
! | |||
! | |||
! end subroutine Pump3MainBody | |||
end module PumpsMain |
@@ -27,13 +27,13 @@ subroutine Pumps_Inputs | |||
data%State%Pump(1)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch | |||
data%State%Pump(1)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM] | |||
data%State%Pump(1)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM] 0<MP1Throttle<965 rpm | |||
!data%State%Pump(1)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump1 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad | |||
data%State%Pump(1)%Failure = data%Warnings%Pump1Failure !(Pump1 Warning ----> Failure) | |||
data%State%Pump(1)%N_new = data%State%Pump(1)%Throttle | |||
data%State%Pump(1)%N_new = data%State%Pump(1)%Throttle | |||
@@ -58,13 +58,13 @@ subroutine Pumps_Inputs | |||
data%State%Pump(2)%Switch = data%Equipments%DrillingConsole%MP2Switch | |||
data%State%Pump(2)%Throttle = data%Equipments%DrillingConsole%MP2Throttle ![RPM] | |||
data%State%Pump(2)%Throttle = data%Equipments%DrillingConsole%MP2Throttle ![RPM] 0<MP2Throttle<965 rpm | |||
!data%State%Pump(2)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump2 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad | |||
data%State%Pump(2)%Failure = data%Warnings%Pump2Failure !(Pump2 Warning ----> Failure) | |||
data%State%Pump(2)%N_new = data%State%Pump(2)%Throttle | |||
data%State%Pump(2)%N_new = data%State%Pump(2)%Throttle | |||
@@ -87,13 +87,13 @@ subroutine Pumps_Inputs | |||
data%State%Pump(3)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch | |||
data%State%Pump(3)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM] | |||
data%State%Pump(3)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM] 0<MP1Throttle<965 rpm | |||
!data%State%Pump(3)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump3 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad | |||
data%State%Pump(3)%Failure = data%Warnings%Pump3Failure !(Pump1 Warning ----> Failure) | |||
data%State%Pump(3)%N_new = data%State%Pump(3)%Throttle | |||
data%State%Pump(3)%N_new = data%State%Pump(3)%Throttle | |||
@@ -1,113 +1,113 @@ | |||
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_Inputs.f90" | |||
subroutine Pumps_Inputs | |||
use CDrillingConsoleVariables | |||
use SimulationVariables | |||
use SimulationVariables | |||
use SimulationVariables | |||
Use MudSystemModule | |||
IMPLICIT NONE | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
!data%State%Pump(1)%BlowPopOffMalf = 0 !??????? motaghayere voroudi | |||
if ( data%State%Pump(1)%BlowPopOffMalf==1 ) then ! Pump1 Malfunction ----> Blow Pop-offs (Relief Valves) | |||
data%State%Pump(1)%StandPipe_Pressure = 0.d0 | |||
else | |||
data%State%Pump(1)%StandPipe_Pressure = PumpPressure1 ![psi] | |||
if ( data%State%Pump(1)%StandPipe_Pressure<=14.d0 ) then | |||
data%State%Pump(1)%StandPipe_Pressure = 14.d0 | |||
end if | |||
end if | |||
data%State%Pump(1)%AssignmentSwitchh = data%Equipments%DrillingConsole%AssignmentSwitch | |||
data%State%Pump(1)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch | |||
data%State%Pump(1)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM] | |||
!data%State%Pump(1)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump1 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad | |||
data%State%Pump(1)%Failure = data%Warnings%Pump1Failure !(Pump1 Warning ----> Failure) | |||
data%State%Pump(1)%N_new = data%State%Pump(1)%Throttle | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
!data%State%Pump(2)%BlowPopOffMalf = 0 !??????? motaghayere voroudi | |||
if ( data%State%Pump(2)%BlowPopOffMalf==1 ) then ! Pump2 Malfunction ----> Blow Pop-offs (Relief Valves) | |||
data%State%Pump(2)%StandPipe_Pressure = 0.d0 | |||
else | |||
data%State%Pump(2)%StandPipe_Pressure = PumpPressure2 ![psi] | |||
if ( data%State%Pump(2)%StandPipe_Pressure<=14.d0 ) then | |||
data%State%Pump(2)%StandPipe_Pressure = 14.d0 | |||
end if | |||
end if | |||
data%State%Pump(2)%AssignmentSwitchh = data%Equipments%DrillingConsole%AssignmentSwitch | |||
data%State%Pump(2)%Switch = data%Equipments%DrillingConsole%MP2Switch | |||
data%State%Pump(2)%Throttle = data%Equipments%DrillingConsole%MP2Throttle ![RPM] | |||
!data%State%Pump(2)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump2 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad | |||
data%State%Pump(2)%Failure = data%Warnings%Pump2Failure !(Pump2 Warning ----> Failure) | |||
data%State%Pump(2)%N_new = data%State%Pump(2)%Throttle | |||
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
!data%State%Pump(3)%BlowPopOffMalf = 0 !??????? motaghayere voroudi | |||
if ( data%State%Pump(3)%BlowPopOffMalf==1 ) then ! Pump3 Malfunction ----> Blow Pop-offs (Relief Valves) | |||
data%State%Pump(3)%StandPipe_Pressure = 0.d0 | |||
else | |||
data%State%Pump(3)%StandPipe_Pressure = PumpPressure3 ![psi] | |||
if ( data%State%Pump(3)%StandPipe_Pressure<=14.d0 ) then | |||
data%State%Pump(3)%StandPipe_Pressure = 14.d0 | |||
end if | |||
end if | |||
data%State%Pump(3)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch | |||
data%State%Pump(3)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM] | |||
!data%State%Pump(3)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump3 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad | |||
data%State%Pump(3)%Failure = data%Warnings%Pump3Failure !(Pump1 Warning ----> Failure) | |||
data%State%Pump(3)%N_new = data%State%Pump(3)%Throttle | |||
!>>>>>>>>>>>>>>>>>>>>>>> Total Pumps <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
end subroutine Pumps_Inputs | |||
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_Inputs.f90" | |||
subroutine Pumps_Inputs | |||
use CDrillingConsoleVariables | |||
use SimulationVariables | |||
use SimulationVariables | |||
use SimulationVariables | |||
Use MudSystemModule | |||
IMPLICIT NONE | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
!data%State%Pump(1)%BlowPopOffMalf = 0 !??????? motaghayere voroudi | |||
if ( data%State%Pump(1)%BlowPopOffMalf==1 ) then ! Pump1 Malfunction ----> Blow Pop-offs (Relief Valves) | |||
data%State%Pump(1)%StandPipe_Pressure = 0.d0 | |||
else | |||
data%State%Pump(1)%StandPipe_Pressure = PumpPressure1 ![psi] | |||
if ( data%State%Pump(1)%StandPipe_Pressure<=14.d0 ) then | |||
data%State%Pump(1)%StandPipe_Pressure = 14.d0 | |||
end if | |||
end if | |||
data%State%Pump(1)%AssignmentSwitchh = data%Equipments%DrillingConsole%AssignmentSwitch | |||
data%State%Pump(1)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch | |||
data%State%Pump(1)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM] | |||
!data%State%Pump(1)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump1 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad | |||
data%State%Pump(1)%Failure = data%Warnings%Pump1Failure !(Pump1 Warning ----> Failure) | |||
data%State%Pump(1)%N_new = data%State%Pump(1)%Throttle | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
!data%State%Pump(2)%BlowPopOffMalf = 0 !??????? motaghayere voroudi | |||
if ( data%State%Pump(2)%BlowPopOffMalf==1 ) then ! Pump2 Malfunction ----> Blow Pop-offs (Relief Valves) | |||
data%State%Pump(2)%StandPipe_Pressure = 0.d0 | |||
else | |||
data%State%Pump(2)%StandPipe_Pressure = PumpPressure2 ![psi] | |||
if ( data%State%Pump(2)%StandPipe_Pressure<=14.d0 ) then | |||
data%State%Pump(2)%StandPipe_Pressure = 14.d0 | |||
end if | |||
end if | |||
data%State%Pump(2)%AssignmentSwitchh = data%Equipments%DrillingConsole%AssignmentSwitch | |||
data%State%Pump(2)%Switch = data%Equipments%DrillingConsole%MP2Switch | |||
data%State%Pump(2)%Throttle = data%Equipments%DrillingConsole%MP2Throttle ![RPM] | |||
!data%State%Pump(2)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump2 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad | |||
data%State%Pump(2)%Failure = data%Warnings%Pump2Failure !(Pump2 Warning ----> Failure) | |||
data%State%Pump(2)%N_new = data%State%Pump(2)%Throttle | |||
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
!data%State%Pump(3)%BlowPopOffMalf = 0 !??????? motaghayere voroudi | |||
if ( data%State%Pump(3)%BlowPopOffMalf==1 ) then ! Pump3 Malfunction ----> Blow Pop-offs (Relief Valves) | |||
data%State%Pump(3)%StandPipe_Pressure = 0.d0 | |||
else | |||
data%State%Pump(3)%StandPipe_Pressure = PumpPressure3 ![psi] | |||
if ( data%State%Pump(3)%StandPipe_Pressure<=14.d0 ) then | |||
data%State%Pump(3)%StandPipe_Pressure = 14.d0 | |||
end if | |||
end if | |||
data%State%Pump(3)%Switch = data%Equipments%DrillingConsole%MP1CPSwitch | |||
data%State%Pump(3)%Throttle = data%Equipments%DrillingConsole%MP1Throttle ![RPM] | |||
!data%State%Pump(3)%PowerFailMalf = 0 !??????? motaghayere voroudi (Pump3 Malfunction ----> Power Failure) !dar CPumpProblemsVariables meghdardehi mishavad | |||
data%State%Pump(3)%Failure = data%Warnings%Pump3Failure !(Pump1 Warning ----> Failure) | |||
data%State%Pump(3)%N_new = data%State%Pump(3)%Throttle | |||
!>>>>>>>>>>>>>>>>>>>>>>> Total Pumps <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
end subroutine Pumps_Inputs |
@@ -23,7 +23,7 @@ subroutine Pumps_Outputs | |||
data%Equipments%DrillingConsole%MP1BLWR = data%State%Pump(1)%BLWR | |||
Call SetSoundBlowerMP1( data%State%Pump(1)%SoundBlower ) !.true. or .false. | |||
Call SetSoundMP1( data%State%Pump(1)%SoundSPM ) ![spm] , integer | |||
Call SetSoundMP1( data%State%Pump(1)%SoundSPM ) ![SPM] , integer | |||
if ((data%State%Pump(1)%Switch==-1) .or. (data%State%Pump(1)%Switch==0)) then | |||
Call Set_MP1SPMGauge( sngl(1-data%State%Pump(1)%SPMGaugeMalf)*real((data%State%Pump(1)%Speed/data%State%Pump(1)%Trans_Ratio),8) ) ![spm] , real | |||
@@ -49,9 +49,9 @@ subroutine Pumps_Outputs | |||
data%Equipments%DrillingConsole%MP2BLWR = data%State%Pump(2)%BLWR | |||
Call SetSoundBlowerMP2( data%State%Pump(2)%SoundBlower ) | |||
Call SetSoundMP2( data%State%Pump(2)%SoundSPM ) | |||
Call SetSoundMP2( data%State%Pump(2)%SoundSPM ) ![SPM] | |||
Call Set_MP2SPMGauge( sngl(1-data%State%Pump(2)%SPMGaugeMalf)*real((data%State%Pump(2)%Speed/data%State%Pump(2)%Trans_Ratio),8) ) | |||
Call Set_MP2SPMGauge( sngl(1-data%State%Pump(2)%SPMGaugeMalf)*real((data%State%Pump(2)%Speed/data%State%Pump(2)%Trans_Ratio),8) ) ![SPM] | |||
data%Equipments%DrillingWatch%SPM2 = data%Equipments%DataDisplayConsole%MP2SPMGauge | |||
!data%State%Pump(2)%Flow_Rate !to other modules | |||
@@ -72,7 +72,7 @@ subroutine Pumps_Outputs | |||
Call SetSoundMP3( data%State%Pump(3)%SoundSPM ) | |||
if (data%State%Pump(3)%Switch==1) then | |||
Call Set_MP1SPMGauge( real((data%State%Pump(3)%Speed/data%State%Pump(3)%Trans_Ratio),8) ) | |||
Call Set_MP1SPMGauge( real((data%State%Pump(3)%Speed/data%State%Pump(3)%Trans_Ratio),8) ) ![SPM] SPMGaugeMalf Malf nadarad???? | |||
data%Equipments%DrillingWatch%SPM1 = data%Equipments%DataDisplayConsole%MP1SPMGauge | |||
end if | |||
@@ -1,97 +1,97 @@ | |||
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_Outputs.f90" | |||
subroutine Pumps_Outputs | |||
use CDataDisplayConsole | |||
use SimulationVariables | |||
! Use CSimulationVariables | |||
use SimulationVariables | |||
Use MudSystemModule | |||
use SimulationVariables !@ | |||
Use CSounds | |||
IMPLICIT NONE | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
If (data%State%Pump(1)%Open_Close==1) then | |||
Call OpenPump1() | |||
Else if (data%State%Pump(1)%Open_Close==0) then | |||
Call ClosePump1() | |||
End if | |||
data%Equipments%DrillingConsole%MP1BLWR = data%State%Pump(1)%BLWR | |||
Call SetSoundBlowerMP1( data%State%Pump(1)%SoundBlower ) !.true. or .false. | |||
Call SetSoundMP1( data%State%Pump(1)%SoundSPM ) ![spm] , integer | |||
if ((data%State%Pump(1)%Switch==-1) .or. (data%State%Pump(1)%Switch==0)) then | |||
Call Set_MP1SPMGauge( sngl(1-data%State%Pump(1)%SPMGaugeMalf)*real((data%State%Pump(1)%Speed/data%State%Pump(1)%Trans_Ratio),8) ) ![spm] , real | |||
data%Equipments%DrillingWatch%SPM1 = data%Equipments%DataDisplayConsole%MP1SPMGauge | |||
end if | |||
!data%State%Pump(1)%Flow_Rate !to other modules , [gpm] | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
If (data%State%Pump(2)%Open_Close==1) then | |||
Call OpenPump2() | |||
Else if (data%State%Pump(2)%Open_Close==0) then | |||
Call ClosePump2() | |||
End if | |||
data%Equipments%DrillingConsole%MP2BLWR = data%State%Pump(2)%BLWR | |||
Call SetSoundBlowerMP2( data%State%Pump(2)%SoundBlower ) | |||
Call SetSoundMP2( data%State%Pump(2)%SoundSPM ) | |||
Call Set_MP2SPMGauge( sngl(1-data%State%Pump(2)%SPMGaugeMalf)*real((data%State%Pump(2)%Speed/data%State%Pump(2)%Trans_Ratio),8) ) | |||
data%Equipments%DrillingWatch%SPM2 = data%Equipments%DataDisplayConsole%MP2SPMGauge | |||
!data%State%Pump(2)%Flow_Rate !to other modules | |||
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
If (data%State%Pump(3)%Open_Close==1) then | |||
Call OpenCementPump() | |||
Else if (data%State%Pump(3)%Open_Close==0) then | |||
Call CloseCementPump() | |||
End if | |||
Call SetSoundMP3( data%State%Pump(3)%SoundSPM ) | |||
if (data%State%Pump(3)%Switch==1) then | |||
Call Set_MP1SPMGauge( real((data%State%Pump(3)%Speed/data%State%Pump(3)%Trans_Ratio),8) ) | |||
data%Equipments%DrillingWatch%SPM1 = data%Equipments%DataDisplayConsole%MP1SPMGauge | |||
end if | |||
!data%State%Pump(3)%Flow_Rate !to other modules | |||
!>>>>>>>>>>>>>>>>>>>>>>> Total Pumps <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
!data%State%MPumps%Total_Pump_Gpm = 100.d0 !??????????? | |||
!data%State%MPumps%Total_Pump_SPM = 1000.d0 !????????????? | |||
!SCR1LED=1 | |||
!SCR2LED=1 | |||
!SCR3LED=1 | |||
!SCR4LED=1 | |||
end subroutine Pumps_Outputs | |||
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_Outputs.f90" | |||
subroutine Pumps_Outputs | |||
use CDataDisplayConsole | |||
use SimulationVariables | |||
! Use CSimulationVariables | |||
use SimulationVariables | |||
Use MudSystemModule | |||
use SimulationVariables !@ | |||
Use CSounds | |||
IMPLICIT NONE | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
If (data%State%Pump(1)%Open_Close==1) then | |||
Call OpenPump1() | |||
Else if (data%State%Pump(1)%Open_Close==0) then | |||
Call ClosePump1() | |||
End if | |||
data%Equipments%DrillingConsole%MP1BLWR = data%State%Pump(1)%BLWR | |||
Call SetSoundBlowerMP1( data%State%Pump(1)%SoundBlower ) !.true. or .false. | |||
Call SetSoundMP1( data%State%Pump(1)%SoundSPM ) ![spm] , integer | |||
if ((data%State%Pump(1)%Switch==-1) .or. (data%State%Pump(1)%Switch==0)) then | |||
Call Set_MP1SPMGauge( sngl(1-data%State%Pump(1)%SPMGaugeMalf)*real((data%State%Pump(1)%Speed/data%State%Pump(1)%Trans_Ratio),8) ) ![spm] , real | |||
data%Equipments%DrillingWatch%SPM1 = data%Equipments%DataDisplayConsole%MP1SPMGauge | |||
end if | |||
!data%State%Pump(1)%Flow_Rate !to other modules , [gpm] | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
If (data%State%Pump(2)%Open_Close==1) then | |||
Call OpenPump2() | |||
Else if (data%State%Pump(2)%Open_Close==0) then | |||
Call ClosePump2() | |||
End if | |||
data%Equipments%DrillingConsole%MP2BLWR = data%State%Pump(2)%BLWR | |||
Call SetSoundBlowerMP2( data%State%Pump(2)%SoundBlower ) | |||
Call SetSoundMP2( data%State%Pump(2)%SoundSPM ) | |||
Call Set_MP2SPMGauge( sngl(1-data%State%Pump(2)%SPMGaugeMalf)*real((data%State%Pump(2)%Speed/data%State%Pump(2)%Trans_Ratio),8) ) | |||
data%Equipments%DrillingWatch%SPM2 = data%Equipments%DataDisplayConsole%MP2SPMGauge | |||
!data%State%Pump(2)%Flow_Rate !to other modules | |||
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
If (data%State%Pump(3)%Open_Close==1) then | |||
Call OpenCementPump() | |||
Else if (data%State%Pump(3)%Open_Close==0) then | |||
Call CloseCementPump() | |||
End if | |||
Call SetSoundMP3( data%State%Pump(3)%SoundSPM ) | |||
if (data%State%Pump(3)%Switch==1) then | |||
Call Set_MP1SPMGauge( real((data%State%Pump(3)%Speed/data%State%Pump(3)%Trans_Ratio),8) ) | |||
data%Equipments%DrillingWatch%SPM1 = data%Equipments%DataDisplayConsole%MP1SPMGauge | |||
end if | |||
!data%State%Pump(3)%Flow_Rate !to other modules | |||
!>>>>>>>>>>>>>>>>>>>>>>> Total Pumps <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
!data%State%MPumps%Total_Pump_Gpm = 100.d0 !??????????? | |||
!data%State%MPumps%Total_Pump_SPM = 1000.d0 !????????????? | |||
!SCR1LED=1 | |||
!SCR2LED=1 | |||
!SCR3LED=1 | |||
!SCR4LED=1 | |||
end subroutine Pumps_Outputs |
@@ -3,47 +3,60 @@ subroutine Pumps_StartUp | |||
use CPumps | |||
use SimulationVariables | |||
IMPLICIT NONE | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
data%State%Pump(1)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi | |||
!data%State%Pump(1)%FlowRatePerSTK = data%State%Pump(1)%FlowRatePerSTK*0.0292d0 ![gpm] | |||
data%State%Pump(1)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi | |||
data%State%Pump(1)%Mech_Efficiency = data%Configuration%Pumps%MudPump1MechanicalEfficiency ![dimensionless] | |||
data%State%Pump(1)%FlowRatePerSTK = data%Configuration%Pumps%MudPump1VolumetricOutput !.1d0 ![bbl/stk] | |||
data%State%Pump(1)%RateChange = data%Configuration%Pumps%MudPump1PumpRateChange ![stk/min2 ??] | |||
data%State%Pump(1)%DelayToShutdown = data%Configuration%Pumps%MudPump1DelayToShutdown ![min] | |||
data%State%Pump(1)%Mech_Efficiency = data%Configuration%Pumps%MudPump1MechanicalEfficiency ![dimensionless] | |||
!data%State%Pump(1)%Vol_Efficiency = MudPump1VolumetricEfficiency !bayad hazf beshe ? | |||
data%State%Pump(1)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi | |||
data%State%Pump(1)%MaxSPM = data%Configuration%Pumps%MudPump1Maximum ![spm] | |||
data%State%Pump(1)%Max_Pressure = data%Configuration%Pumps%MudPump1MaximumPressure !6000.d0 ![psi] | |||
data%State%Pump(1)%MaxSPM = data%Configuration%Pumps%MudPump1Maximum ![spm] | |||
data%State%Pump(1)%Trans_Ratio = 965.d0/data%State%Pump(1)%MaxSPM | |||
data%State%Pump(1)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(1)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(1)%RateChange = 193.d0!data%State%Pump(1)%RateChange*data%State%Pump(1)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s | |||
data%State%Pump(1)%RateChange = (data%State%Pump(1)%RateChange*data%State%Pump(1)%Trans_Ratio)/60.d0 ![rpm/s ??] 24/60 | |||
data%State%Pump(1)%DelayToShutdown = data%State%Pump(1)%DelayToShutdown/60.d0 ![s] | |||
data%State%Pump(1)%K_throttle = 0 | |||
data%State%Pump(1)%N_old = 0.d0 | |||
Call Pump_OffMode_Solver(1) | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
data%State%Pump(2)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi | |||
!data%State%Pump(2)%FlowRatePerSTK = data%State%Pump(2)%FlowRatePerSTK*0.0292d0 ![gpm] | |||
data%State%Pump(2)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi | |||
data%State%Pump(2)%Mech_Efficiency = data%Configuration%Pumps%MudPump2MechanicalEfficiency ![dimensionless] | |||
data%State%Pump(2)%FlowRatePerSTK = data%Configuration%Pumps%MudPump2VolumetricOutput !.1d0 ![bbl/stk] | |||
data%State%Pump(2)%RateChange = data%Configuration%Pumps%MudPump2PumpRateChange ![stk/min2 ??] | |||
data%State%Pump(2)%DelayToShutdown = data%Configuration%Pumps%MudPump2DelayToShutdown ![min] | |||
data%State%Pump(2)%Mech_Efficiency = data%Configuration%Pumps%MudPump2MechanicalEfficiency ![dimensionless] | |||
!data%State%Pump(2)%Vol_Efficiency = MudPump2VolumetricEfficiency !bayad hazf beshe ? | |||
data%State%Pump(2)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi | |||
data%State%Pump(2)%MaxSPM = data%Configuration%Pumps%MudPump2Maximum ![spm] | |||
data%State%Pump(2)%Max_Pressure = data%Configuration%Pumps%MudPump2MaximumPressure !6000.d0 ![psi] | |||
data%State%Pump(2)%MaxSPM = data%Configuration%Pumps%MudPump2Maximum ![spm] | |||
data%State%Pump(2)%Trans_Ratio = 965.d0/data%State%Pump(2)%MaxSPM | |||
data%State%Pump(2)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(2)%RateChange = 193.d0!data%State%Pump(2)%RateChange*data%State%Pump(2)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s | |||
data%State%Pump(2)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(2)%RateChange = (data%State%Pump(2)%RateChange*data%State%Pump(2)%Trans_Ratio)/60.d0 ![rpm/s ??] | |||
data%State%Pump(2)%DelayToShutdown = data%State%Pump(2)%DelayToShutdown/60.d0 ![s] | |||
data%State%Pump(2)%K_throttle = 0 | |||
data%State%Pump(2)%N_old = 0.d0 | |||
Call Pump_OffMode_Solver(2) | |||
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
data%State%Pump(3)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi | |||
!data%State%Pump(3)%FlowRatePerSTK = data%State%Pump(3)%FlowRatePerSTK*0.0292d0 ![gpm] | |||
data%State%Pump(3)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi | |||
data%State%Pump(3)%Mech_Efficiency = data%Configuration%Pumps%CementPumpMechanicalEfficiency ![dimensionless] | |||
data%State%Pump(3)%FlowRatePerSTK = data%Configuration%Pumps%CementPumpVolumetricOutput !.1d0 ![bbl/stk] | |||
data%State%Pump(3)%RateChange = data%Configuration%Pumps%CementPumpPumpRateChange ![stk/min2 ??] | |||
data%State%Pump(3)%DelayToShutdown = data%Configuration%Pumps%CementPumpDelayToShutdown ![min] | |||
data%State%Pump(3)%Mech_Efficiency = data%Configuration%Pumps%CementPumpMechanicalEfficiency ![dimensionless] | |||
!data%State%Pump(3)%Vol_Efficiency = CementPumpVolumetricEfficiency !bayad hazf beshe ? | |||
data%State%Pump(3)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi | |||
data%State%Pump(3)%MaxSPM = data%Configuration%Pumps%CementPumpMaximum ![spm] | |||
data%State%Pump(3)%Max_Pressure = data%Configuration%Pumps%CementPumpMaximumPressure !6000.d0 ![psi] | |||
data%State%Pump(3)%MaxSPM = data%Configuration%Pumps%CementPumpMaximum ![spm] | |||
data%State%Pump(3)%Trans_Ratio = 965.d0/data%State%Pump(3)%MaxSPM | |||
data%State%Pump(3)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(3)%RateChange = 193.d0!data%State%Pump(3)%RateChange*data%State%Pump(3)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s | |||
data%State%Pump(3)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(3)%RateChange = (data%State%Pump(3)%RateChange*data%State%Pump(3)%Trans_Ratio)/60.d0 ![rpm/s ??] | |||
data%State%Pump(3)%DelayToShutdown = data%State%Pump(3)%DelayToShutdown/60.d0 ![s] | |||
data%State%Pump(3)%K_throttle = 0 | |||
data%State%Pump(3)%N_old = 0.d0 | |||
Call Pump_OffMode_Solver(3) | |||
end subroutine Pumps_StartUp |
@@ -1,50 +1,50 @@ | |||
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_StartUp.f90" | |||
subroutine Pumps_StartUp | |||
use CPumpsVariables | |||
use CPumps | |||
use SimulationVariables | |||
IMPLICIT NONE | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
data%State%Pump(1)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi | |||
!data%State%Pump(1)%FlowRatePerSTK = data%State%Pump(1)%FlowRatePerSTK*0.0292d0 ![gpm] | |||
data%State%Pump(1)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi | |||
data%State%Pump(1)%Mech_Efficiency = data%Configuration%Pumps%MudPump1MechanicalEfficiency ![dimensionless] | |||
!data%State%Pump(1)%Vol_Efficiency = MudPump1VolumetricEfficiency !bayad hazf beshe ? | |||
data%State%Pump(1)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi | |||
data%State%Pump(1)%MaxSPM = data%Configuration%Pumps%MudPump1Maximum ![spm] | |||
data%State%Pump(1)%Trans_Ratio = 965.d0/data%State%Pump(1)%MaxSPM | |||
data%State%Pump(1)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(1)%RateChange = 193.d0!data%State%Pump(1)%RateChange*data%State%Pump(1)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s | |||
data%State%Pump(1)%K_throttle = 0 | |||
data%State%Pump(1)%N_old = 0.d0 | |||
Call Pump_OffMode_Solver(1) | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
data%State%Pump(2)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi | |||
!data%State%Pump(2)%FlowRatePerSTK = data%State%Pump(2)%FlowRatePerSTK*0.0292d0 ![gpm] | |||
data%State%Pump(2)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi | |||
data%State%Pump(2)%Mech_Efficiency = data%Configuration%Pumps%MudPump2MechanicalEfficiency ![dimensionless] | |||
!data%State%Pump(2)%Vol_Efficiency = MudPump2VolumetricEfficiency !bayad hazf beshe ? | |||
data%State%Pump(2)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi | |||
data%State%Pump(2)%MaxSPM = data%Configuration%Pumps%MudPump2Maximum ![spm] | |||
data%State%Pump(2)%Trans_Ratio = 965.d0/data%State%Pump(2)%MaxSPM | |||
data%State%Pump(2)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(2)%RateChange = 193.d0!data%State%Pump(2)%RateChange*data%State%Pump(2)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s | |||
data%State%Pump(2)%K_throttle = 0 | |||
data%State%Pump(2)%N_old = 0.d0 | |||
Call Pump_OffMode_Solver(2) | |||
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
data%State%Pump(3)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi | |||
!data%State%Pump(3)%FlowRatePerSTK = data%State%Pump(3)%FlowRatePerSTK*0.0292d0 ![gpm] | |||
data%State%Pump(3)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi | |||
data%State%Pump(3)%Mech_Efficiency = data%Configuration%Pumps%CementPumpMechanicalEfficiency ![dimensionless] | |||
!data%State%Pump(3)%Vol_Efficiency = CementPumpVolumetricEfficiency !bayad hazf beshe ? | |||
data%State%Pump(3)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi | |||
data%State%Pump(3)%MaxSPM = data%Configuration%Pumps%CementPumpMaximum ![spm] | |||
data%State%Pump(3)%Trans_Ratio = 965.d0/data%State%Pump(3)%MaxSPM | |||
data%State%Pump(3)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(3)%RateChange = 193.d0!data%State%Pump(3)%RateChange*data%State%Pump(3)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s | |||
data%State%Pump(3)%K_throttle = 0 | |||
data%State%Pump(3)%N_old = 0.d0 | |||
Call Pump_OffMode_Solver(3) | |||
end subroutine Pumps_StartUp | |||
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_StartUp.f90" | |||
subroutine Pumps_StartUp | |||
use CPumpsVariables | |||
use CPumps | |||
use SimulationVariables | |||
IMPLICIT NONE | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 1 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
data%State%Pump(1)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi | |||
!data%State%Pump(1)%FlowRatePerSTK = data%State%Pump(1)%FlowRatePerSTK*0.0292d0 ![gpm] | |||
data%State%Pump(1)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi | |||
data%State%Pump(1)%Mech_Efficiency = data%Configuration%Pumps%MudPump1MechanicalEfficiency ![dimensionless] | |||
!data%State%Pump(1)%Vol_Efficiency = MudPump1VolumetricEfficiency !bayad hazf beshe ? | |||
data%State%Pump(1)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi | |||
data%State%Pump(1)%MaxSPM = data%Configuration%Pumps%MudPump1Maximum ![spm] | |||
data%State%Pump(1)%Trans_Ratio = 965.d0/data%State%Pump(1)%MaxSPM | |||
data%State%Pump(1)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(1)%RateChange = 193.d0!data%State%Pump(1)%RateChange*data%State%Pump(1)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s | |||
data%State%Pump(1)%K_throttle = 0 | |||
data%State%Pump(1)%N_old = 0.d0 | |||
Call Pump_OffMode_Solver(1) | |||
!>>>>>>>>>>>>>>>>>>>>>>> PUMP 2 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
data%State%Pump(2)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi | |||
!data%State%Pump(2)%FlowRatePerSTK = data%State%Pump(2)%FlowRatePerSTK*0.0292d0 ![gpm] | |||
data%State%Pump(2)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi | |||
data%State%Pump(2)%Mech_Efficiency = data%Configuration%Pumps%MudPump2MechanicalEfficiency ![dimensionless] | |||
!data%State%Pump(2)%Vol_Efficiency = MudPump2VolumetricEfficiency !bayad hazf beshe ? | |||
data%State%Pump(2)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi | |||
data%State%Pump(2)%MaxSPM = data%Configuration%Pumps%MudPump2Maximum ![spm] | |||
data%State%Pump(2)%Trans_Ratio = 965.d0/data%State%Pump(2)%MaxSPM | |||
data%State%Pump(2)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(2)%RateChange = 193.d0!data%State%Pump(2)%RateChange*data%State%Pump(2)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s | |||
data%State%Pump(2)%K_throttle = 0 | |||
data%State%Pump(2)%N_old = 0.d0 | |||
Call Pump_OffMode_Solver(2) | |||
!!>>>>>>>>>>>>>>>>>>>>>>> PUMP 3 <<<<<<<<<<<<<<<<<<<<<<<<<<< | |||
data%State%Pump(3)%FlowRatePerSTK = .04d0 ![bbl] !??????? motaghayere voroudi | |||
!data%State%Pump(3)%FlowRatePerSTK = data%State%Pump(3)%FlowRatePerSTK*0.0292d0 ![gpm] | |||
data%State%Pump(3)%RateChange = 4.d0 ![stk/min2 ??] !??????? motaghayere voroudi | |||
data%State%Pump(3)%Mech_Efficiency = data%Configuration%Pumps%CementPumpMechanicalEfficiency ![dimensionless] | |||
!data%State%Pump(3)%Vol_Efficiency = CementPumpVolumetricEfficiency !bayad hazf beshe ? | |||
data%State%Pump(3)%Max_Pressure = 6000.d0 ![psi] !??????? motaghayere voroudi | |||
data%State%Pump(3)%MaxSPM = data%Configuration%Pumps%CementPumpMaximum ![spm] | |||
data%State%Pump(3)%Trans_Ratio = 965.d0/data%State%Pump(3)%MaxSPM | |||
data%State%Pump(3)%time_step = 0.1d0 !?????? niaz hast ya na?? | |||
data%State%Pump(3)%RateChange = 193.d0!data%State%Pump(3)%RateChange*data%State%Pump(3)%Trans_Ratio ! [rpm/min ??] ??????????????? rpm/s | |||
data%State%Pump(3)%K_throttle = 0 | |||
data%State%Pump(3)%N_old = 0.d0 | |||
Call Pump_OffMode_Solver(3) | |||
end subroutine Pumps_StartUp |
@@ -6,7 +6,7 @@ subroutine Pumps_TotalSolver | |||
data%State%MPumps%Total_Pump_Gpm = data%State%Pump(1)%Flow_Rate+data%State%Pump(2)%Flow_Rate+data%State%Pump(3)%Flow_Rate ![gpm] | |||
data%State%MPumps%Total_Pump_Gpm = data%State%Pump(1)%Flow_Rate+data%State%Pump(2)%Flow_Rate+data%State%Pump(3)%Flow_Rate ![gpm] | |||
data%State%MPumps%Total_Pump_SPM = (data%State%Pump(1)%Speed/data%State%Pump(1)%Trans_Ratio)+(data%State%Pump(2)%Speed/data%State%Pump(2)%Trans_Ratio)+(data%State%Pump(3)%Speed/data%State%Pump(3)%Trans_Ratio) ![stk/min] | |||
@@ -24,7 +24,7 @@ MODULE Pumps_VARIABLES | |||
INTEGER :: AssignmentSwitchh, Switch, K_throttle | |||
INTEGER :: PowerFailMalf , BlowPopOffMalf , SPMGaugeMalf , Failure | |||
REAL :: Throttle, RateChange | |||
REAL :: Throttle, RateChange, DelayToShutdown | |||
REAL :: Mech_Efficiency, Vol_Efficiency, Trans_Ratio | |||
REAL :: StandPipe_Pressure , Max_Pressure | |||
REAL :: Speed, N_new, N_old, MaxSPM | |||
@@ -41,7 +41,7 @@ MODULE Pumps_VARIABLES | |||
Logical :: SoundBlower | |||
END TYPE Pump_Var | |||
!*********************************************************************************************** | |||
!*********************************************************************************************** | |||
@@ -1,49 +1,49 @@ | |||
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_VARIABLES.f90" | |||
MODULE Pumps_VARIABLES | |||
IMPLICIT NONE | |||
PUBLIC | |||
! REAL , PARAMETER :: pi=3.14159265d0 | |||
Type, public:: Pumps_Var | |||
REAL :: Total_Pump_GPM, Total_Pump_SPM, Total_Stroke_Counter_For_Plot | |||
end Type Pumps_Var | |||
Type(Pumps_Var) :: MPumps | |||
!**************************************************************************************************** | |||
!**************** Define PUMP Array ************************************************************ | |||
TYPE, PUBLIC :: Pump_Var | |||
!***** Pump_VARIABLES *************************** | |||
INTEGER :: AssignmentSwitchh, Switch, K_throttle | |||
INTEGER :: PowerFailMalf , BlowPopOffMalf , SPMGaugeMalf , Failure | |||
REAL :: Throttle, RateChange | |||
REAL :: Mech_Efficiency, Vol_Efficiency, Trans_Ratio | |||
REAL :: StandPipe_Pressure , Max_Pressure | |||
REAL :: Speed, N_new, N_old, MaxSPM | |||
REAL :: Flow_Rate, Hydraulic_HorsePower, Max_Horsepower, FlowRatePerSTK, Max_FlowRate, HorsePower | |||
REAL :: time_step | |||
INTEGER :: BLWR ! 1=On , 0=Off | |||
INTEGER :: Open_Close ! 1=Open , 0=Close | |||
!************* Sound_VARIABLES ********************** | |||
INTEGER :: SoundSPM | |||
Logical :: SoundBlower | |||
END TYPE Pump_Var | |||
!*********************************************************************************************** | |||
!*********************************************************************************************** | |||
END MODULE Pumps_VARIABLES | |||
# 1 "/home/admin/SimulationCore2/Equipments/Pumps/Pumps_VARIABLES.f90" | |||
MODULE Pumps_VARIABLES | |||
IMPLICIT NONE | |||
PUBLIC | |||
! REAL , PARAMETER :: pi=3.14159265d0 | |||
Type, public:: Pumps_Var | |||
REAL :: Total_Pump_GPM, Total_Pump_SPM, Total_Stroke_Counter_For_Plot | |||
end Type Pumps_Var | |||
Type(Pumps_Var) :: MPumps | |||
!**************************************************************************************************** | |||
!**************** Define PUMP Array ************************************************************ | |||
TYPE, PUBLIC :: Pump_Var | |||
!***** Pump_VARIABLES *************************** | |||
INTEGER :: AssignmentSwitchh, Switch, K_throttle | |||
INTEGER :: PowerFailMalf , BlowPopOffMalf , SPMGaugeMalf , Failure | |||
REAL :: Throttle, RateChange | |||
REAL :: Mech_Efficiency, Vol_Efficiency, Trans_Ratio | |||
REAL :: StandPipe_Pressure , Max_Pressure | |||
REAL :: Speed, N_new, N_old, MaxSPM | |||
REAL :: Flow_Rate, Hydraulic_HorsePower, Max_Horsepower, FlowRatePerSTK, Max_FlowRate, HorsePower | |||
REAL :: time_step | |||
INTEGER :: BLWR ! 1=On , 0=Off | |||
INTEGER :: Open_Close ! 1=Open , 0=Close | |||
!************* Sound_VARIABLES ********************** | |||
INTEGER :: SoundSPM | |||
Logical :: SoundBlower | |||
END TYPE Pump_Var | |||
!*********************************************************************************************** | |||
!*********************************************************************************************** | |||
END MODULE Pumps_VARIABLES |
@@ -2,12 +2,15 @@ subroutine RTable_INPUTS | |||
use CDrillingConsoleVariables | |||
use SimulationVariables | |||
use SimulationVariables | |||
! use CSimulationVariables | |||
use UnitySignalsModule | |||
! use CTdsElevatorModesEnumVariables | |||
use CHoistingVariables | |||
use SimulationVariables | |||
use SimulationVariables !@ | |||
use TD_DrillStemComponents | |||
use UnityModule | |||
use CUnityInputs | |||
use CWarnings | |||
use UnitySignalVariables | |||
use UnitySignalsModule | |||
@@ -17,10 +20,10 @@ subroutine RTable_INPUTS | |||
data%State%RTable%AssignmentSwitch = data%Equipments%DrillingConsole%AssignmentSwitch | |||
data%State%RTable%Switch = data%Equipments%DrillingConsole%RTSwitch | |||
data%State%RTable%AssignmentSwitch = data%EquipmentControl%DrillingConsole%AssignmentSwitch | |||
data%State%RTable%Switch = data%EquipmentControl%DrillingConsole%RTSwitch | |||
!data%State%RTable%GearsAbuse = RotaryGearsAbuse | |||
data%State%RTable%Throttle = data%Equipments%DrillingConsole%RTThrottle ![RPM] | |||
data%State%RTable%Throttle = data%EquipmentControl%DrillingConsole%RTThrottle ![RPM] | |||
data%State%RTable%String_Torque = data%State%TD_String%StringTorque*12.d0 ![lb.ft]*12 ---> [lb.in] ????????? | |||
!data%State%RTable%RpmGaugeMalf !:dar module haye C meghdardehi mishe | |||
@@ -1,78 +1,78 @@ | |||
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_INPUTS.f90" | |||
subroutine RTable_INPUTS | |||
use CDrillingConsoleVariables | |||
use SimulationVariables | |||
! use CSimulationVariables | |||
use UnitySignalsModule | |||
! use CTdsElevatorModesEnumVariables | |||
use CHoistingVariables | |||
use TD_DrillStemComponents | |||
use UnityModule | |||
use CWarnings | |||
use UnitySignalVariables | |||
use UnitySignalsModule | |||
IMPLICIT NONE | |||
integer :: i | |||
data%State%RTable%AssignmentSwitch = data%Equipments%DrillingConsole%AssignmentSwitch | |||
data%State%RTable%Switch = data%Equipments%DrillingConsole%RTSwitch | |||
!data%State%RTable%GearsAbuse = RotaryGearsAbuse | |||
data%State%RTable%Throttle = data%Equipments%DrillingConsole%RTThrottle ![RPM] | |||
data%State%RTable%String_Torque = data%State%TD_String%StringTorque*12.d0 ![lb.ft]*12 ---> [lb.in] ????????? | |||
!data%State%RTable%RpmGaugeMalf !:dar module haye C meghdardehi mishe | |||
data%State%RTable%N_new = data%State%RTable%Throttle | |||
if ( data%State%RTable%MotorFaileMalf==1 ) then | |||
data%State%RTable%N_new = 0.d0 | |||
end if | |||
data%State%RTable%String_Torque = 0.112984d0*data%State%RTable%String_Torque ![N.m] | |||
!===> String_JCoef Calculation | |||
if ( data%Configuration%Hoisting%DriveType==0 ) then | |||
if ( Get_TdsConnectionModes()==TDS_CONNECTION_NOTHING .and. Get_TdsElevatorModes()==TDS_ELEVATOR_CONNECTION_NOTHING ) then | |||
data%State%RTable%RotaryMode = 1 | |||
data%State%RTable%String_JCoef = 0.d0 | |||
Do i = 1,data%State%TD_String%StringConfigurationCount | |||
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef+( (data%State%TD_DrillStem(i)%TotalWeight*((data%State%TD_DrillStem(i)%Id**2.d0)+(data%State%TD_DrillStem(i)%Od**2.d0)))/8.d0 ) ![lb.ft^2] , Jz=(1/2)*m*(r1^2+r2^2) | |||
End Do | |||
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef*0.0421401d0 ![kg.m^2] | |||
else if ( Get_Slips() /= SLIPS_SET_END ) then | |||
data%State%RTable%RotaryMode = 2 | |||
data%State%RTable%String_JCoef = 0.d0 | |||
data%State%RTable%String_Torque = 0.d0 | |||
else | |||
data%State%RTable%RotaryMode = 3 | |||
data%State%RTable%String_JCoef = 0.d0 | |||
data%State%RTable%String_Torque = 0.d0 | |||
end if | |||
else if ( data%Configuration%Hoisting%DriveType==1 ) then | |||
if ( Get_IsKellyBushingSetInTable() .or. Get_Slips() == SLIPS_SET_END ) then !if rotary connected to string | |||
data%State%RTable%RotaryMode = 4 | |||
data%State%RTable%String_JCoef = 0.d0 | |||
Do i = 1,data%State%TD_String%StringConfigurationCount | |||
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef+( (data%State%TD_DrillStem(i)%TotalWeight*((data%State%TD_DrillStem(i)%Id**2.d0)+(data%State%TD_DrillStem(i)%Od**2.d0)))/8.d0 ) ![lb.ft^2] , Jz=(1/2)*m*(r1^2+r2^2) | |||
End Do | |||
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef*0.0421401e0 ![kg.m^2] | |||
else | |||
data%State%RTable%RotaryMode = 5 | |||
data%State%RTable%String_JCoef = 0.d0 | |||
data%State%RTable%String_Torque = 0.d0 | |||
end if | |||
end if | |||
!===> Transmission Mode | |||
data%State%RTable%Conv_Ratio = data%State%RTable%High_Conv_Ratio | |||
end subroutine RTable_INPUTS | |||
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_Inputs.f90" | |||
subroutine RTable_INPUTS | |||
use CDrillingConsoleVariables | |||
use SimulationVariables | |||
! use CSimulationVariables | |||
use UnitySignalsModule | |||
! use CTdsElevatorModesEnumVariables | |||
use CHoistingVariables | |||
use TD_DrillStemComponents | |||
use UnityModule | |||
use CWarnings | |||
use UnitySignalVariables | |||
use UnitySignalsModule | |||
IMPLICIT NONE | |||
integer :: i | |||
data%State%RTable%AssignmentSwitch = data%Equipments%DrillingConsole%AssignmentSwitch | |||
data%State%RTable%Switch = data%Equipments%DrillingConsole%RTSwitch | |||
!data%State%RTable%GearsAbuse = RotaryGearsAbuse | |||
data%State%RTable%Throttle = data%Equipments%DrillingConsole%RTThrottle ![RPM] | |||
data%State%RTable%String_Torque = data%State%TD_String%StringTorque*12.d0 ![lb.ft]*12 ---> [lb.in] ????????? | |||
!data%State%RTable%RpmGaugeMalf !:dar module haye C meghdardehi mishe | |||
data%State%RTable%N_new = data%State%RTable%Throttle | |||
if ( data%State%RTable%MotorFaileMalf==1 ) then | |||
data%State%RTable%N_new = 0.d0 | |||
end if | |||
data%State%RTable%String_Torque = 0.112984d0*data%State%RTable%String_Torque ![N.m] | |||
!===> String_JCoef Calculation | |||
if ( data%Configuration%Hoisting%DriveType==0 ) then | |||
if ( Get_TdsConnectionModes()==TDS_CONNECTION_NOTHING .and. Get_TdsElevatorModes()==TDS_ELEVATOR_CONNECTION_NOTHING ) then | |||
data%State%RTable%RotaryMode = 1 | |||
data%State%RTable%String_JCoef = 0.d0 | |||
Do i = 1,data%State%TD_String%StringConfigurationCount | |||
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef+( (data%State%TD_DrillStem(i)%TotalWeight*((data%State%TD_DrillStem(i)%Id**2.d0)+(data%State%TD_DrillStem(i)%Od**2.d0)))/8.d0 ) ![lb.ft^2] , Jz=(1/2)*m*(r1^2+r2^2) | |||
End Do | |||
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef*0.0421401d0 ![kg.m^2] | |||
else if ( Get_Slips() /= SLIPS_SET_END ) then | |||
data%State%RTable%RotaryMode = 2 | |||
data%State%RTable%String_JCoef = 0.d0 | |||
data%State%RTable%String_Torque = 0.d0 | |||
else | |||
data%State%RTable%RotaryMode = 3 | |||
data%State%RTable%String_JCoef = 0.d0 | |||
data%State%RTable%String_Torque = 0.d0 | |||
end if | |||
else if ( data%Configuration%Hoisting%DriveType==1 ) then | |||
if ( Get_IsKellyBushingSetInTable() .or. Get_Slips() == SLIPS_SET_END ) then !if rotary connected to string | |||
data%State%RTable%RotaryMode = 4 | |||
data%State%RTable%String_JCoef = 0.d0 | |||
Do i = 1,data%State%TD_String%StringConfigurationCount | |||
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef+( (data%State%TD_DrillStem(i)%TotalWeight*((data%State%TD_DrillStem(i)%Id**2.d0)+(data%State%TD_DrillStem(i)%Od**2.d0)))/8.d0 ) ![lb.ft^2] , Jz=(1/2)*m*(r1^2+r2^2) | |||
End Do | |||
data%State%RTable%String_JCoef = data%State%RTable%String_JCoef*0.0421401e0 ![kg.m^2] | |||
else | |||
data%State%RTable%RotaryMode = 5 | |||
data%State%RTable%String_JCoef = 0.d0 | |||
data%State%RTable%String_Torque = 0.d0 | |||
end if | |||
end if | |||
!===> Transmission Mode | |||
data%State%RTable%Conv_Ratio = data%State%RTable%High_Conv_Ratio | |||
end subroutine RTable_INPUTS |
@@ -1,33 +1,33 @@ | |||
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_Outputs.f90" | |||
subroutine RTable_Outputs | |||
use CDrillingConsoleVariables | |||
use SimulationVariables | |||
use SimulationVariables | |||
use CDataDisplayConsole | |||
use SimulationVariables | |||
use SimulationVariables !@ | |||
use SimulationVariables !@ | |||
Use CSounds | |||
IMPLICIT NONE | |||
data%Equipments%DrillingConsole%RTBLWR = data%State%RTable%BLWR | |||
Call SetSoundBlowerRT(data%State%RTable%SoundBlower) !.true. or .false. | |||
Call SetSoundRT( data%State%RTable%SoundRPM ) ![RPM] , integer | |||
!data%State%RTable%Speed !to other modules | |||
Call Set_RotaryRPMGauge( sngl(1-data%State%RTable%RpmGaugeMalf)*real(data%State%RTable%RpmGaugeOutput,8) ) ![RPM] | |||
data%Equipments%DataDisplayConsole%RotaryTorqueGauge = data%State%RTable%TorqueGaugeOutput ![ft.lbf] | |||
data%Equipments%DrillingWatch%Torque = data%State%RTable%TorqueGaugeOutput | |||
Call Set_RotaryTorque(sngl(1-data%State%RTable%TorqueGaugeMalf)*real(data%State%RTable%TorqueGaugeOutput,8)) ![ft.lbf] | |||
!RT_RPMUnityOutput = sngl(data%State%RTable%Switch)*-1.d0*RotaryRPMGauge | |||
end subroutine RTable_Outputs | |||
# 1 "/home/admin/SimulationCore2/Equipments/RotaryTable/RTable_Outputs.f90" | |||
subroutine RTable_Outputs | |||
use CDrillingConsoleVariables | |||
use SimulationVariables | |||
use SimulationVariables | |||
use CDataDisplayConsole | |||
use SimulationVariables | |||
use SimulationVariables !@ | |||
use SimulationVariables !@ | |||
Use CSounds | |||
IMPLICIT NONE | |||
data%Equipments%DrillingConsole%RTBLWR = data%State%RTable%BLWR | |||
Call SetSoundBlowerRT(data%State%RTable%SoundBlower) !.true. or .false. | |||
Call SetSoundRT( data%State%RTable%SoundRPM ) ![RPM] , integer | |||
!data%State%RTable%Speed !to other modules | |||
Call Set_RotaryRPMGauge( sngl(1-data%State%RTable%RpmGaugeMalf)*real(data%State%RTable%RpmGaugeOutput,8) ) ![RPM] | |||
data%Equipments%DataDisplayConsole%RotaryTorqueGauge = data%State%RTable%TorqueGaugeOutput ![ft.lbf] | |||
data%Equipments%DrillingWatch%Torque = data%State%RTable%TorqueGaugeOutput | |||
Call Set_RotaryTorque(sngl(1-data%State%RTable%TorqueGaugeMalf)*real(data%State%RTable%TorqueGaugeOutput,8)) ![ft.lbf] | |||
!RT_RPMUnityOutput = sngl(data%State%RTable%Switch)*-1.d0*RotaryRPMGauge | |||
end subroutine RTable_Outputs |
@@ -8,7 +8,7 @@ subroutine RTable_StartUp | |||
data%State%RTable%Inertia_Moment = 23.261341d0 ! 23.261341[kg.m^2] = 552[lb.ft^2] | |||
data%State%RTable%Mech_Efficiency = 0.93d0 | |||
data%State%RTable%RateChange = 1.d0 ![Hz/s] !??????? motaghayere voroudi | |||
data%State%RTable%RateChange = 1.d0 ![RPM/min] !??????? motaghayere voroudi | |||
data%State%RTable%High_Conv_Ratio = 4.825d0 | |||
data%State%RTable%Low_Conv_Ratio = 7.31d0 | |||
data%State%RTable%time_step = 0.1d0 ![s] | |||
@@ -17,7 +17,7 @@ subroutine RTable_StartUp | |||
data%State%RTable%RateChange = data%State%RTable%RateChange*60.d0 ![RPM/s] ![cycle/min]=[RPM] !1[Hz]=60[RPM] | |||
data%State%RTable%RateChange = 193.d0 !data%State%RTable%RateChange/60.d0 ![RPM/s] ![cycle/min]=[RPM] !1[Hz]=60[RPM] | |||
data%State%RTable%J_coef = data%State%RTable%Inertia_Moment+(1.d0*(data%State%RTable%Inertia_Moment)) | |||
data%State%RTable%Conv_Ratio = data%State%RTable%Low_Conv_Ratio | |||
data%State%RTable%String_JCoef = 0.d0 | |||
@@ -1,49 +1,49 @@ | |||
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/RotaryTable/RotaryTableMain.f90" | |||
module RotaryTableMain | |||
implicit none | |||
public | |||
contains | |||
subroutine RotaryTable_Setup() | |||
!use CSimulationVariables | |||
!call OnSimulationInitialization%Add(RotaryTable_Init) | |||
!call OnSimulationStop%Add(RotaryTable_Init) | |||
!call OnRotaryTableStep%Add(RotaryTable_Step) | |||
!call OnRotaryTableOutput%Add(RotaryTable_Output) | |||
!call OnRotaryTableMain%Add(RotaryTableMainBody) | |||
end subroutine | |||
subroutine RotaryTable_Init | |||
Call RTable_StartUp | |||
end subroutine RotaryTable_Init | |||
subroutine RotaryTable_Step | |||
Call Rtable_MainSolver | |||
end subroutine RotaryTable_Step | |||
subroutine RotaryTable_Output | |||
implicit none | |||
end subroutine RotaryTable_Output | |||
subroutine RotaryTableMainBody | |||
use SimulationVariables !@ | |||
implicit none | |||
Call RTable_StartUp | |||
loopRtablestart : do | |||
Call RTable_MainSolver | |||
end do loopRtablestart | |||
end subroutine RotaryTableMainBody | |||
end module RotaryTableMain | |||
# 1 "/mnt/c/Projects/VSIM/SimulationCore2/Equipments/RotaryTable/RotaryTableMain.f90" | |||
module RotaryTableMain | |||
implicit none | |||
public | |||
contains | |||
subroutine RotaryTable_Setup() | |||
!use CSimulationVariables | |||
!call OnSimulationInitialization%Add(RotaryTable_Init) | |||
!call OnSimulationStop%Add(RotaryTable_Init) | |||
!call OnRotaryTableStep%Add(RotaryTable_Step) | |||
!call OnRotaryTableOutput%Add(RotaryTable_Output) | |||
!call OnRotaryTableMain%Add(RotaryTableMainBody) | |||
end subroutine | |||
subroutine RotaryTable_Init | |||
Call RTable_StartUp | |||
end subroutine RotaryTable_Init | |||
subroutine RotaryTable_Step | |||
Call Rtable_MainSolver | |||
end subroutine RotaryTable_Step | |||
subroutine RotaryTable_Output | |||
implicit none | |||
end subroutine RotaryTable_Output | |||
subroutine RotaryTableMainBody | |||
use SimulationVariables !@ | |||
implicit none | |||
Call RTable_StartUp | |||
loopRtablestart : do | |||
Call RTable_MainSolver | |||
end do loopRtablestart | |||
end subroutine RotaryTableMainBody | |||
end module RotaryTableMain |
@@ -1,52 +1,4 @@ | |||
integer :: AssignmentSwitch | |||
logical :: EmergencySwitch | |||
real(8) :: RTTorqueLimitKnob | |||
integer :: MP1CPSwitchI = 0 !for not turning on pump1 on simulation start | |||
integer :: MP1CPSwitchT !for not turning on pump1 on simulation start | |||
integer :: MP1CPSwitch | |||
logical :: MP1ThrottleUpdate = .false. | |||
real(8) :: MP1Throttle = -1.0 | |||
integer :: MP2SwitchI = 0 !for not turning on pump2 on simulation start | |||
logical :: MP2SwitchT !for not turning on pump2 on simulation start | |||
logical :: MP2Switch | |||
logical :: MP2ThrottleUpdate = .false. | |||
real(8) :: MP2Throttle = -1.0 | |||
integer :: DWSwitch | |||
real(8) :: DWThrottle | |||
integer :: RTSwitch | |||
real(8) :: RTThrottle | |||
real(8) :: DWBreak | |||
real(8) :: PreviousDWBreak | |||
logical :: ForceBreak = .false. | |||
real(8) :: DWAcceleretor | |||
real(8) :: DWTransmisionLever | |||
real(8) :: DWPowerLever | |||
real(8) :: TongLever | |||
real(8) :: RTTransmissionLever | |||
real(8) :: DWClutchLever | |||
real(8) :: EddyBreakLever | |||
logical :: AutoDW | |||
logical :: GEN1 | |||
logical :: GEN2 | |||
logical :: GEN3 | |||
logical :: GEN4 | |||
logical :: Permission_OpenKellyCock = .false. | |||
logical :: OpenKellyCock | |||
logical :: Permission_CloseKellyCock = .false. | |||
logical :: CloseKellyCock | |||
logical :: Permission_OpenSafetyValve = .false. | |||
logical :: OpenSafetyValve | |||
logical :: Permission_CloseSafetyValve = .false. | |||
logical :: CloseSafetyValve | |||
logical :: Permission_IRSafetyValve = .false. | |||
logical :: IRSafetyValve | |||
logical :: Permission_IRIBop = .false. | |||
logical :: IRIBop | |||
logical :: LatchPipe | |||
logical :: UnlatchPipe | |||
logical :: Swing | |||
logical :: FillMouseHole | |||
logical :: Slips | |||
real :: BrakeLeverCoefficient | |||
logical :: HideDrillingBrake | |||
logical :: ParkingBrakeBtn | |||
real(8) :: MudPump1VolumetricOutput,MudPump2VolumetricOutput,CementPumpVolumetricOutput | |||
Real(8) :: MudPump1MaximumPressure,MudPump1PumpRateChange,MudPump1SurfaceLineLength,MudPump1DelayToShutdown | |||
Real(8) :: MudPump2MaximumPressure,MudPump2PumpRateChange,MudPump2SurfaceLineLength,MudPump2DelayToShutdown | |||
Real(8) :: CementPumpMaximumPressure,CementPumpPumpRateChange,CementPumpSurfaceLineLength,CementPumpDelayToShutdown |
@@ -900,123 +900,52 @@ | |||
}, | |||
{ | |||
"cell_type": "code", | |||
"execution_count": 4, | |||
"execution_count": 3, | |||
"metadata": {}, | |||
"outputs": [ | |||
{ | |||
"name": "stdout", | |||
"output_type": "stream", | |||
"text": [ | |||
"\t\tcall json%get('Equipments.Drilling.AssignmentSwitch',data%Equipments%DrillingConsole%AssignmentSwitch,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: AssignmentSwitch\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.EmergencySwitch',data%Equipments%DrillingConsole%EmergencySwitch,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: EmergencySwitch\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.RTTorqueLimitKnob',data%Equipments%DrillingConsole%RTTorqueLimitKnob,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: RTTorqueLimitKnob\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.MP1CPSwitchI',data%Equipments%DrillingConsole%MP1CPSwitchI,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: MP1CPSwitchI\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.MP1CPSwitchT',data%Equipments%DrillingConsole%MP1CPSwitchT,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: MP1CPSwitchT\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.MP1CPSwitch',data%Equipments%DrillingConsole%MP1CPSwitch,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: MP1CPSwitch\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.MP1ThrottleUpdate',data%Equipments%DrillingConsole%MP1ThrottleUpdate,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: MP1ThrottleUpdate\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.MP1Throttle',data%Equipments%DrillingConsole%MP1Throttle,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: MP1Throttle\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.MP2SwitchI',data%Equipments%DrillingConsole%MP2SwitchI,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: MP2SwitchI\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.MP2SwitchT',data%Equipments%DrillingConsole%MP2SwitchT,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: MP2SwitchT\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.MP2Switch',data%Equipments%DrillingConsole%MP2Switch,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: MP2Switch\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.MP2ThrottleUpdate',data%Equipments%DrillingConsole%MP2ThrottleUpdate,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: MP2ThrottleUpdate\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.MP2Throttle',data%Equipments%DrillingConsole%MP2Throttle,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: MP2Throttle\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.DWSwitch',data%Equipments%DrillingConsole%DWSwitch,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: DWSwitch\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.DWThrottle',data%Equipments%DrillingConsole%DWThrottle,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: DWThrottle\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.RTSwitch',data%Equipments%DrillingConsole%RTSwitch,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: RTSwitch\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.RTThrottle',data%Equipments%DrillingConsole%RTThrottle,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: RTThrottle\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.DWBreak',data%Equipments%DrillingConsole%DWBreak,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: DWBreak\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.PreviousDWBreak',data%Equipments%DrillingConsole%PreviousDWBreak,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: PreviousDWBreak\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.ForceBreak',data%Equipments%DrillingConsole%ForceBreak,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: ForceBreak\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.DWAcceleretor',data%Equipments%DrillingConsole%DWAcceleretor,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: DWAcceleretor\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.DWTransmisionLever',data%Equipments%DrillingConsole%DWTransmisionLever,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: DWTransmisionLever\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.DWPowerLever',data%Equipments%DrillingConsole%DWPowerLever,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: DWPowerLever\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.TongLever',data%Equipments%DrillingConsole%TongLever,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: TongLever\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.RTTransmissionLever',data%Equipments%DrillingConsole%RTTransmissionLever,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: RTTransmissionLever\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.DWClutchLever',data%Equipments%DrillingConsole%DWClutchLever,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: DWClutchLever\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.EddyBreakLever',data%Equipments%DrillingConsole%EddyBreakLever,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: EddyBreakLever\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.AutoDW',data%Equipments%DrillingConsole%AutoDW,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: AutoDW\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.GEN1',data%Equipments%DrillingConsole%GEN1,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: GEN1\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.GEN2',data%Equipments%DrillingConsole%GEN2,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: GEN2\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.GEN3',data%Equipments%DrillingConsole%GEN3,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: GEN3\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.GEN4',data%Equipments%DrillingConsole%GEN4,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: GEN4\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.Permission_OpenKellyCock',data%Equipments%DrillingConsole%Permission_OpenKellyCock,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: Permission_OpenKellyCock\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.OpenKellyCock',data%Equipments%DrillingConsole%OpenKellyCock,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: OpenKellyCock\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.Permission_CloseKellyCock',data%Equipments%DrillingConsole%Permission_CloseKellyCock,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: Permission_CloseKellyCock\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.CloseKellyCock',data%Equipments%DrillingConsole%CloseKellyCock,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: CloseKellyCock\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.Permission_OpenSafetyValve',data%Equipments%DrillingConsole%Permission_OpenSafetyValve,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: Permission_OpenSafetyValve\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.OpenSafetyValve',data%Equipments%DrillingConsole%OpenSafetyValve,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: OpenSafetyValve\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.Permission_CloseSafetyValve',data%Equipments%DrillingConsole%Permission_CloseSafetyValve,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: Permission_CloseSafetyValve\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.CloseSafetyValve',data%Equipments%DrillingConsole%CloseSafetyValve,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: CloseSafetyValve\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.Permission_IRSafetyValve',data%Equipments%DrillingConsole%Permission_IRSafetyValve,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: Permission_IRSafetyValve\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.IRSafetyValve',data%Equipments%DrillingConsole%IRSafetyValve,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: IRSafetyValve\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.Permission_IRIBop',data%Equipments%DrillingConsole%Permission_IRIBop,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: Permission_IRIBop\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.IRIBop',data%Equipments%DrillingConsole%IRIBop,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: IRIBop\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.LatchPipe',data%Equipments%DrillingConsole%LatchPipe,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: LatchPipe\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.UnlatchPipe',data%Equipments%DrillingConsole%UnlatchPipe,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: UnlatchPipe\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.Swing',data%Equipments%DrillingConsole%Swing,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: Swing\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.FillMouseHole',data%Equipments%DrillingConsole%FillMouseHole,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: FillMouseHole\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.Slips',data%Equipments%DrillingConsole%Slips,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: Slips\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.BrakeLeverCoefficient',data%Equipments%DrillingConsole%BrakeLeverCoefficient,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: BrakeLeverCoefficient\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.HideDrillingBrake',data%Equipments%DrillingConsole%HideDrillingBrake,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: HideDrillingBrake\" \n", | |||
"\t\tcall json%get('Equipments.Drilling.ParkingBrakeBtn',data%Equipments%DrillingConsole%ParkingBrakeBtn,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: ParkingBrakeBtn\" \n" | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%MudPump1VolumetricOutput)\n", | |||
" \tcall json%get(p,\"MudPump1VolumetricOutput\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%MudPump2VolumetricOutput)\n", | |||
" \tcall json%get(p,\"MudPump2VolumetricOutput\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%CementPumpVolumetricOutput)\n", | |||
" \tcall json%get(p,\"CementPumpVolumetricOutput\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%MudPump1MaximumPressure)\n", | |||
" \tcall json%get(p,\"MudPump1MaximumPressure\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%MudPump1PumpRateChange)\n", | |||
" \tcall json%get(p,\"MudPump1PumpRateChange\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%MudPump1SurfaceLineLength)\n", | |||
" \tcall json%get(p,\"MudPump1SurfaceLineLength\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%MudPump1DelayToShutdown)\n", | |||
" \tcall json%get(p,\"MudPump1DelayToShutdown\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%MudPump2MaximumPressure)\n", | |||
" \tcall json%get(p,\"MudPump2MaximumPressure\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%MudPump2PumpRateChange)\n", | |||
" \tcall json%get(p,\"MudPump2PumpRateChange\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%MudPump2SurfaceLineLength)\n", | |||
" \tcall json%get(p,\"MudPump2SurfaceLineLength\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%MudPump2DelayToShutdown)\n", | |||
" \tcall json%get(p,\"MudPump2DelayToShutdown\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%CementPumpMaximumPressure)\n", | |||
" \tcall json%get(p,\"CementPumpMaximumPressure\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%CementPumpPumpRateChange)\n", | |||
" \tcall json%get(p,\"CementPumpPumpRateChange\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%CementPumpSurfaceLineLength)\n", | |||
" \tcall json%get(p,\"CementPumpSurfaceLineLength\",pitem)\n", | |||
"\t\tcall json%get(pitem,data%Configuration%Pumps%CementPumpDelayToShutdown)\n", | |||
" \tcall json%get(p,\"CementPumpDelayToShutdown\",pitem)\n" | |||
] | |||
} | |||
], | |||
"source": [ | |||
"pattern=\"\"\"\t\tcall json%get('Equipments.Drilling.@@@',data%Equipments%DrillingConsole%@@@,found)\n", | |||
"\t\tif ( .not. found ) print *,\"Not found: @@@\" \"\"\"\n", | |||
"pattern=\"\"\"\t\tcall json%get(pitem,data%Configuration%Pumps%@@@)\n", | |||
" call json%get(p,\"@@@\",pitem)\"\"\"\n", | |||
"\n", | |||
"# pattern=\"\"\"\t\tcall json%get('Equipments.Drilling.@@@',data%Equipments%DrillingConsole%@@@,found)\n", | |||
"# \t\tif ( .not. found ) print *,\"Not found: @@@\" \"\"\"\n", | |||
"\n", | |||
"input = open(\"Text1.txt\")\n", | |||
"lines = input.readlines()\n", | |||
@@ -1027,8 +956,10 @@ | |||
"\tif len(parts)!=2:\n", | |||
"\t\tcontinue\n", | |||
"\tname = parts[1].split(' ')[1].strip()\n", | |||
"\tnewline = pattern.replace(\"@@@\",name)\n", | |||
"\tprint(newline)\n" | |||
"\tnames = name.split(',')\n", | |||
"\tfor name in names:\n", | |||
"\t\tnewline = pattern.replace(\"@@@\",name)\n", | |||
"\t\tprint(newline)\n" | |||
] | |||
}, | |||
{ | |||
@@ -1600,7 +1531,7 @@ | |||
"name": "python", | |||
"nbconvert_exporter": "python", | |||
"pygments_lexer": "ipython3", | |||
"version": "3.9.12" | |||
"version": "3.10.5" | |||
}, | |||
"orig_nbformat": 4, | |||
"vscode": { | |||