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.
 
 
 
 
 
 

73 satır
2.7 KiB

  1. module CKickProblems
  2. use SimulationVariables
  3. implicit none
  4. public
  5. !constants
  6. ! integer :: Gas_FluidType = 0
  7. ! integer :: Oil_FluidType = 1
  8. ! integer :: Water_FluidType = 2
  9. contains
  10. subroutine KickProblemsToJson(parent)
  11. type(json_value),pointer :: parent
  12. type(json_core) :: json
  13. type(json_value),pointer :: p
  14. ! 1. create new node
  15. call json%create_object(p,'KickProblems')
  16. call ProblemToJson(p,"Kick",data%problems%KickProblems%Kick)
  17. call json%add(p,"FluidType",data%problems%KickProblems%FluidType)
  18. call json%add(p,"FlowRate",data%problems%KickProblems%FlowRate)
  19. call json%add(p,"OverBalancePressure",data%problems%KickProblems%OverBalancePressure)
  20. call json%add(p,"IsAutoMigrationRateSelected",data%problems%KickProblems%IsAutoMigrationRateSelected)
  21. call json%add(p,"AutoMigrationRate",data%problems%KickProblems%AutoMigrationRate) ! 2. add member of data type to new node
  22. ! 3. add new node to parent
  23. call json%add(parent,p)
  24. end subroutine
  25. subroutine ProcessKickProblemsDueTime(time)
  26. implicit none
  27. integer :: time
  28. if(data%problems%KickProblems%Kick%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%KickProblems%Kick, ChangeKick, time)
  29. end subroutine
  30. subroutine ProcessKickProblemsDuePumpStrokes(strokes)
  31. implicit none
  32. integer :: strokes
  33. if(data%problems%KickProblems%Kick%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%KickProblems%Kick, ChangeKick, strokes)
  34. end subroutine
  35. subroutine ProcessKickProblemsDueVolumePumped(volume)
  36. implicit none
  37. real(8) :: volume
  38. if(data%problems%KickProblems%Kick%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%KickProblems%Kick, ChangeKick, volume)
  39. end subroutine
  40. subroutine ProcessKickProblemsDueDistanceDrilled(distance)
  41. implicit none
  42. real(8) :: distance
  43. if(data%problems%KickProblems%Kick%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%KickProblems%Kick, ChangeKick, distance)
  44. end subroutine
  45. subroutine ChangeKick(status)
  46. implicit none
  47. integer, intent (in) :: status
  48. ! if(associated(data%problems%KickProblems%KickPtr)) call data%problems%KickProblems%KickPtr(status)
  49. !if(status == Clear_StatusType) print*,'On_Kick_Clear'
  50. !if(status == Executed_StatusType) print*,'On_Kick_Execute'
  51. endsubroutine
  52. end module CKickProblems