Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CPumps.f90 5.2 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. module CPumps
  2. use CPumpsVariables
  3. ! use CPumps
  4. use CManifolds
  5. use CLog4
  6. implicit none
  7. public
  8. contains
  9. subroutine OpenPump1()
  10. use CManifolds
  11. implicit none
  12. call ChangeValve(16, .true.)
  13. end subroutine
  14. subroutine ClosePump1()
  15. use CManifolds
  16. implicit none
  17. call ChangeValve(16, .false.)
  18. end subroutine
  19. subroutine OpenPump2()
  20. use CManifolds
  21. implicit none
  22. call ChangeValve(17, .true.)
  23. end subroutine
  24. subroutine ClosePump2()
  25. use CManifolds
  26. implicit none
  27. call ChangeValve(17, .false.)
  28. end subroutine
  29. subroutine OpenCementPump()
  30. use CManifolds
  31. implicit none
  32. call ChangeValve(18, .true.)
  33. end subroutine
  34. subroutine CloseCementPump()
  35. use CManifolds
  36. implicit none
  37. call ChangeValve(18, .false.)
  38. end subroutine
  39. subroutine SetMudPump1LinerDiameterN(a)
  40. implicit none
  41. real(8) :: a
  42. if(associated(MudPump1LinerDiameterPtr)) call MudPump1LinerDiameterPtr(a)
  43. end subroutine
  44. subroutine SetMudPump2LinerDiameterN(a)
  45. implicit none
  46. real(8) :: a
  47. if(associated(MudPump2LinerDiameterPtr)) call MudPump2LinerDiameterPtr(a)
  48. end subroutine
  49. subroutine SetMudPump3LinerDiameterN(a)
  50. implicit none
  51. real(8) :: a
  52. if(associated(MudPump3LinerDiameterPtr)) call MudPump3LinerDiameterPtr(a)
  53. end subroutine
  54. subroutine SetMudPump1OutputBblStrokeN(a)
  55. implicit none
  56. real(8) :: a
  57. if(associated(MudPump1OutputBblStrokePtr)) call MudPump1OutputBblStrokePtr(a)
  58. end subroutine
  59. subroutine SetMudPump2OutputBblStrokeN(a)
  60. implicit none
  61. real(8) :: a
  62. if(associated(MudPump2OutputBblStrokePtr)) call MudPump2OutputBblStrokePtr(a)
  63. end subroutine
  64. subroutine SetMudPump3OutputBblStrokeN(a)
  65. implicit none
  66. real(8) :: a
  67. if(associated(MudPump3OutputBblStrokePtr)) call MudPump3OutputBblStrokePtr(a)
  68. end subroutine
  69. subroutine CalcMudPump1LinerDiameter()
  70. use, intrinsic :: IEEE_ARITHMETIC
  71. implicit none
  72. real(8) :: a
  73. a = (MathPI / 4.d0) * PumpsSpecification%MudPump1Stroke * 3.0d0 * PumpsSpecification%MudPump1VolumetricEfficiency / 9702.03d0
  74. a = dsqrt(PumpsSpecification%MudPump1OutputBblStroke / a)
  75. if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then
  76. PumpsSpecification%MudPump1LinerDiameter = 0.0
  77. else
  78. PumpsSpecification%MudPump1LinerDiameter = a
  79. endif
  80. call SetMudPump1LinerDiameterN(PumpsSpecification%MudPump1LinerDiameter)
  81. end subroutine
  82. subroutine CalcMudPump2LinerDiameter()
  83. use, intrinsic :: IEEE_ARITHMETIC
  84. implicit none
  85. real(8) :: a
  86. a = (MathPI / 4.d0) * PumpsSpecification%MudPump2Stroke * 3.0d0 * PumpsSpecification%MudPump2VolumetricEfficiency / 9702.03d0
  87. a = dsqrt(PumpsSpecification%MudPump2OutputBblStroke / a)
  88. if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then
  89. PumpsSpecification%MudPump2LinerDiameter = 0.0
  90. else
  91. PumpsSpecification%MudPump2LinerDiameter = a
  92. endif
  93. call SetMudPump2LinerDiameterN(PumpsSpecification%MudPump2LinerDiameter)
  94. end subroutine
  95. subroutine CalcMudPump3LinerDiameter()
  96. use, intrinsic :: IEEE_ARITHMETIC
  97. implicit none
  98. real(8) :: a
  99. a = (MathPI / 4.d0) * PumpsSpecification%CementPumpStroke * 3.0d0 * PumpsSpecification%CementPumpVolumetricEfficiency / 9702.03d0
  100. a = dsqrt(PumpsSpecification%CementPumpOutputBblStroke / a)
  101. if (.not.IEEE_IS_FINITE(a) .or. IEEE_IS_NAN(a)) then
  102. PumpsSpecification%CementPumpLinerDiameter = 0.0
  103. else
  104. PumpsSpecification%CementPumpLinerDiameter = a
  105. endif
  106. call SetMudPump3LinerDiameterN(PumpsSpecification%CementPumpLinerDiameter)
  107. end subroutine
  108. subroutine CalcPump1OutputBblStroke()
  109. implicit none
  110. PumpsSpecification%MudPump1OutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%MudPump1LinerDiameter**2) * PumpsSpecification%MudPump1Stroke * 3.0d0 * PumpsSpecification%MudPump1VolumetricEfficiency / 9702.03d0
  111. call SetMudPump1OutputBblStrokeN(PumpsSpecification%MudPump1OutputBblStroke)
  112. end subroutine
  113. subroutine CalcPump2OutputBblStroke()
  114. implicit none
  115. PumpsSpecification%MudPump2OutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%MudPump2LinerDiameter**2) * PumpsSpecification%MudPump2Stroke * 3.0d0 * PumpsSpecification%MudPump2VolumetricEfficiency / 9702.03d0
  116. call SetMudPump2OutputBblStrokeN(PumpsSpecification%MudPump2OutputBblStroke)
  117. end subroutine
  118. subroutine CalcPump3OutputBblStroke()
  119. implicit none
  120. PumpsSpecification%CementPumpOutputBblStroke = (MathPI / 4.d0) * (PumpsSpecification%CementPumpLinerDiameter**2) * PumpsSpecification%CementPumpStroke * 3.0d0 * PumpsSpecification%CementPumpVolumetricEfficiency / 9702.03d0
  121. call SetMudPump3OutputBblStrokeN(PumpsSpecification%CementPumpOutputBblStroke)
  122. end subroutine
  123. end module CPumps