Simulation Core
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

108 wiersze
5.9 KiB

  1. module CMudTreatmentProblems
  2. use SimulationVariables
  3. implicit none
  4. public
  5. contains
  6. subroutine MudTreatmentProblemsToJson(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,'MudTreatmentProblems')
  12. ! 2. add member of data type to new node
  13. call ProblemToJson(p,"Degasser",data%problems%MudTreatmentProblems%Degasser)
  14. call ProblemToJson(p,"ShaleShaker",data%problems%MudTreatmentProblems%ShaleShaker)
  15. call ProblemToJson(p,"Desander",data%problems%MudTreatmentProblems%Desander)
  16. call ProblemToJson(p,"Desilter",data%problems%MudTreatmentProblems%Desilter)
  17. ! 3. add new node to parent
  18. call json%add(parent,p)
  19. end subroutine
  20. subroutine ProcessMudTreatmentProblemsDueTime(time)
  21. implicit none
  22. integer :: time
  23. if(data%problems%MudTreatmentProblems%Degasser%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%MudTreatmentProblems%Degasser, ChangeDegasser, time)
  24. if(data%problems%MudTreatmentProblems%ShaleShaker%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%MudTreatmentProblems%ShaleShaker, ChangeShaleShaker, time)
  25. if(data%problems%MudTreatmentProblems%Desander%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%MudTreatmentProblems%Desander, ChangeDesander, time)
  26. if(data%problems%MudTreatmentProblems%Desilter%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%MudTreatmentProblems%Desilter, ChangeDesilter, time)
  27. end subroutine
  28. subroutine ProcessMudTreatmentProblemsDuePumpStrokes(strokes)
  29. implicit none
  30. integer :: strokes
  31. if(data%problems%MudTreatmentProblems%Degasser%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%MudTreatmentProblems%Degasser, ChangeDegasser, strokes)
  32. if(data%problems%MudTreatmentProblems%ShaleShaker%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%MudTreatmentProblems%ShaleShaker, ChangeShaleShaker, strokes)
  33. if(data%problems%MudTreatmentProblems%Desander%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%MudTreatmentProblems%Desander, ChangeDesander, strokes)
  34. if(data%problems%MudTreatmentProblems%Desilter%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%MudTreatmentProblems%Desilter, ChangeDesilter, strokes)
  35. end subroutine
  36. subroutine ProcessMudTreatmentProblemsDueVolumePumped(volume)
  37. implicit none
  38. real(8) :: volume
  39. if(data%problems%MudTreatmentProblems%Degasser%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%MudTreatmentProblems%Degasser, ChangeDegasser, volume)
  40. if(data%problems%MudTreatmentProblems%ShaleShaker%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%MudTreatmentProblems%ShaleShaker, ChangeShaleShaker, volume)
  41. if(data%problems%MudTreatmentProblems%Desander%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%MudTreatmentProblems%Desander, ChangeDesander, volume)
  42. if(data%problems%MudTreatmentProblems%Desilter%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%MudTreatmentProblems%Desilter, ChangeDesilter, volume)
  43. end subroutine
  44. subroutine ProcessMudTreatmentProblemsDueDistanceDrilled(distance)
  45. implicit none
  46. real(8) :: distance
  47. if(data%problems%MudTreatmentProblems%Degasser%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%MudTreatmentProblems%Degasser, ChangeDegasser, distance)
  48. if(data%problems%MudTreatmentProblems%ShaleShaker%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%MudTreatmentProblems%ShaleShaker, ChangeShaleShaker, distance)
  49. if(data%problems%MudTreatmentProblems%Desander%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%MudTreatmentProblems%Desander, ChangeDesander, distance)
  50. if(data%problems%MudTreatmentProblems%Desilter%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%MudTreatmentProblems%Desilter, ChangeDesilter, distance)
  51. end subroutine
  52. subroutine ChangeDegasser(status)
  53. implicit none
  54. integer, intent (in) :: status
  55. !if(associated(DegasserPtr)) call DegasserPtr(status)
  56. !if(status == Clear_StatusType) print*,'On_Degasser_Clear'
  57. !if(status == Executed_StatusType) print*,'On_Degasser_Execute'
  58. endsubroutine
  59. subroutine ChangeShaleShaker(status)
  60. implicit none
  61. integer, intent (in) :: status
  62. !if(associated(ShaleShakerPtr)) call ShaleShakerPtr(status)
  63. !if(status == Clear_StatusType) print*,'On_ShaleShaker_Clear'
  64. !if(status == Executed_StatusType) print*,'On_ShaleShaker_Execute'
  65. endsubroutine
  66. subroutine ChangeDesander(status)
  67. implicit none
  68. integer, intent (in) :: status
  69. !if(associated(DesanderPtr)) call DesanderPtr(status)
  70. !if(status == Clear_StatusType) print*,'On_Desander_Clear'
  71. !if(status == Executed_StatusType) print*,'On_Desander_Execute'
  72. endsubroutine
  73. subroutine ChangeDesilter(status)
  74. implicit none
  75. integer, intent (in) :: status
  76. !if(associated(DesilterPtr)) call DesilterPtr(status)
  77. !if(status == Clear_StatusType) print*,'On_Desilter_Clear'
  78. !if(status == Executed_StatusType) print*,'On_Desilter_Execute'
  79. endsubroutine
  80. end module CMudTreatmentProblems