Simulation Core
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

100 Zeilen
6.0 KiB

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