Simulation Core
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

CDrillStemProblems.f90 5.3 KiB

1 yıl önce
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. module CDrillStemProblems
  2. use SimulationVariables
  3. implicit none
  4. public
  5. contains
  6. subroutine DrillStemProblemsToJson(parent)
  7. type(json_value),pointer :: parent
  8. type(json_core) :: json
  9. type(json_value),pointer :: p
  10. ! 1. create new node
  11. call json%create_object(p,'DrillStemsProblems')
  12. ! 2. add member of data type to new node
  13. call ProblemToJson(p,"StringDragIncrease",data%problems%DrillStemProblems%StringDragIncrease)
  14. call ProblemToJson(p,"StringTorqueIncrease",data%problems%DrillStemProblems%StringTorqueIncrease)
  15. call ProblemToJson(p,"StringTorqueFluctuation",data%problems%DrillStemProblems%StringTorqueFluctuation)
  16. call json%add(p,"StringDragIncreaseTime",data%problems%DrillStemProblems%StringDragIncreaseTime)
  17. call json%add(p,"StringTorqueIncreaseTime",data%problems%DrillStemProblems%StringTorqueIncreaseTime)
  18. ! 3. add new node to parent
  19. call json%add(parent,p)
  20. end subroutine
  21. subroutine ProcessDrillStemProblemsDueTime(time)
  22. implicit none
  23. integer :: time
  24. if(data%problems%DrillStemProblems%StringDragIncrease%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, time)
  25. if(data%problems%DrillStemProblems%StringTorqueIncrease%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, time)
  26. if(data%problems%DrillStemProblems%StringTorqueFluctuation%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, time)
  27. end subroutine
  28. subroutine ProcessDrillStemProblemsDuePumpStrokes(strokes)
  29. implicit none
  30. integer :: strokes
  31. if(data%problems%DrillStemProblems%StringDragIncrease%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, strokes)
  32. if(data%problems%DrillStemProblems%StringTorqueIncrease%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, strokes)
  33. if(data%problems%DrillStemProblems%StringTorqueFluctuation%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, strokes)
  34. end subroutine
  35. subroutine ProcessDrillStemProblemsDueVolumePumped(volume)
  36. implicit none
  37. real(8) :: volume
  38. if(data%problems%DrillStemProblems%StringDragIncrease%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, volume)
  39. if(data%problems%DrillStemProblems%StringTorqueIncrease%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, volume)
  40. if(data%problems%DrillStemProblems%StringTorqueFluctuation%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, volume)
  41. end subroutine
  42. subroutine ProcessDrillStemProblemsDueDistanceDrilled(distance)
  43. implicit none
  44. real(8) :: distance
  45. if(data%problems%DrillStemProblems%StringDragIncrease%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%DrillStemProblems%StringDragIncrease, ChangeStringDragIncrease, distance)
  46. if(data%problems%DrillStemProblems%StringTorqueIncrease%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%DrillStemProblems%StringTorqueIncrease, ChangeStringTorqueIncrease, distance)
  47. if(data%problems%DrillStemProblems%StringTorqueFluctuation%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%DrillStemProblems%StringTorqueFluctuation, ChangeStringTorqueFluctuation, distance)
  48. end subroutine
  49. subroutine ChangeStringDragIncrease(status)
  50. implicit none
  51. integer, intent (in) :: status
  52. ! if(associated(StringDragIncreasePtr)) call StringDragIncreasePtr(status)
  53. !if(status == Clear_StatusType) print*,'On_StringDragIncrease_Clear'
  54. !if(status == Executed_StatusType) print*,'On_StringDragIncrease_Execute'
  55. endsubroutine
  56. subroutine ChangeStringTorqueIncrease(status)
  57. implicit none
  58. integer, intent (in) :: status
  59. ! if(associated(StringTorqueIncreasePtr)) call StringTorqueIncreasePtr(status)
  60. !if(status == Clear_StatusType) print*,'On_StringTorqueIncrease_Clear'
  61. !if(status == Executed_StatusType) print*,'On_StringTorqueIncrease_Execute'
  62. endsubroutine
  63. subroutine ChangeStringTorqueFluctuation(status)
  64. implicit none
  65. integer, intent (in) :: status
  66. ! if(associated(StringTorqueFluctuationPtr)) call StringTorqueFluctuationPtr(status)
  67. !if(status == Clear_StatusType) print*,'On_StringTorqueFluctuation_Clear'
  68. !if(status == Executed_StatusType) print*,'On_StringTorqueFluctuation_Execute'
  69. endsubroutine
  70. end module CDrillStemProblems