Simulation Core
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

CRotaryProblems.f90 3.0 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. module CRotaryProblems
  2. use SimulationVariables
  3. implicit none
  4. public
  5. contains
  6. subroutine ProcessRotaryProblemsDueTime(time)
  7. implicit none
  8. integer :: time
  9. if(data%problems%RotaryProblems%MotorFail%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%RotaryProblems%MotorFail, ChangeMotorFail, time)
  10. if(data%problems%RotaryProblems%OverideTorqueLimit%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, time)
  11. end subroutine
  12. subroutine ProcessRotaryProblemsDuePumpStrokes(strokes)
  13. implicit none
  14. integer :: strokes
  15. if(data%problems%RotaryProblems%MotorFail%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%RotaryProblems%MotorFail, ChangeMotorFail, strokes)
  16. if(data%problems%RotaryProblems%OverideTorqueLimit%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, strokes)
  17. end subroutine
  18. subroutine ProcessRotaryProblemsDueVolumePumped(volume)
  19. implicit none
  20. real(8) :: volume
  21. if(data%problems%RotaryProblems%MotorFail%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%RotaryProblems%MotorFail, ChangeMotorFail, volume)
  22. if(data%problems%RotaryProblems%OverideTorqueLimit%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, volume)
  23. end subroutine
  24. subroutine ProcessRotaryProblemsDueDistanceDrilled(distance)
  25. implicit none
  26. real(8) :: distance
  27. if(data%problems%RotaryProblems%MotorFail%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%RotaryProblems%MotorFail, ChangeMotorFail, distance)
  28. if(data%problems%RotaryProblems%OverideTorqueLimit%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%RotaryProblems%OverideTorqueLimit, ChangeOverideTorqueLimit, distance)
  29. end subroutine
  30. subroutine ChangeMotorFail(status)
  31. use SimulationVariables !@
  32. implicit none
  33. integer, intent (in) :: status
  34. !if(associated(MotorFailPtr)) call MotorFailPtr(status)
  35. if(status == Clear_StatusType) data%State%RTable%MotorFaileMalf=0
  36. if(status == Executed_StatusType) data%State%RTable%MotorFaileMalf=1
  37. endsubroutine
  38. subroutine ChangeOverideTorqueLimit(status)
  39. use SimulationVariables !@
  40. implicit none
  41. integer, intent (in) :: status
  42. !if(associated(OverideTorqueLimitPtr)) call OverideTorqueLimitPtr(status)
  43. if(status == Clear_StatusType) data%State%RTable%OverideTorqueLimitMalf=0
  44. if(status == Executed_StatusType) data%State%RTable%OverideTorqueLimitMalf=1
  45. endsubroutine
  46. end module CRotaryProblems