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

122 行
6.3 KiB

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