Simulation Core
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

140 lines
4.7 KiB

  1. module CMudPropertiesVariables
  2. use CIActionReference
  3. use CDoubleEventHandlerCollection
  4. implicit none
  5. public
  6. !pointers
  7. procedure (ActionDouble), pointer :: ActiveMudVolumePtr
  8. procedure (ActionDouble), pointer :: ActiveDensityPtr
  9. procedure (ActionDouble), pointer :: ReserveMudVolumePtr
  10. procedure (ActionDouble), pointer :: ReserveDensityPtr
  11. type(DoubleEventHandlerCollection) :: OnActiveMudVolumeChange
  12. type(DoubleEventHandlerCollection) :: OnActiveDensityChange
  13. type(DoubleEventHandlerCollection) :: OnReserveMudVolumeChange
  14. type(DoubleEventHandlerCollection) :: OnReserveDensityChange
  15. !constants
  16. integer, parameter :: WaterBase_MudType = 0
  17. integer, parameter :: OilBase_MudType = 1
  18. integer, parameter :: PowerLaw_RheologyModel = 0
  19. integer, parameter :: Bingham_RheologyModel = 1
  20. integer, parameter :: Newtonian_RheologyModel = 2
  21. INTEGER, PARAMETER :: Herschel_Bulkley_RheologyModel = 3
  22. ! variables
  23. integer :: ActiveMudType
  24. integer :: ActiveRheologyModel
  25. real(8) :: ActiveMudVolume
  26. real(8) :: ActiveMudVolumeGal
  27. real(8) :: ActiveDensity
  28. real(8) :: ActivePlasticViscosity
  29. real(8) :: ActiveYieldPoint
  30. real(8) :: ActiveThetaThreeHundred
  31. real(8) :: ActiveThetaSixHundred
  32. integer :: ReserveMudType
  33. real(8) :: ReserveMudVolume
  34. real(8) :: ReserveMudVolumeGal
  35. real(8) :: ReserveDensity
  36. real(8) :: ReservePlasticViscosity
  37. real(8) :: ReserveYieldPoint
  38. real(8) :: ReserveThetaThreeHundred
  39. real(8) :: ReserveThetaSixHundred
  40. real(8) :: ActiveTotalTankCapacity
  41. real(8) :: ActiveTotalTankCapacityGal
  42. real(8) :: ActiveSettledContents
  43. real(8) :: ActiveSettledContentsGal
  44. real(8) :: ActiveTotalContents
  45. real(8) :: ActiveTotalContentsGal
  46. logical :: ActiveAutoDensity
  47. !real(8) :: ReserveTotalTankCapacity
  48. !real(8) :: ReserveTotalTankCapacityGal
  49. !real(8) :: ReserveSettledContents
  50. !real(8) :: ReserveSettledContentsGal
  51. !real(8) :: ReserveTotalContents
  52. !real(8) :: ReserveTotalContentsGal
  53. real(8) :: InitialTripTankMudVolume
  54. real(8) :: InitialTripTankMudVolumeGal
  55. real(8) :: PedalFlowMeter
  56. contains
  57. subroutine Set_ActiveMudVolume_StudentStation(v)
  58. implicit none
  59. real*8, intent(in) :: v
  60. #ifdef ExcludeExtraChanges
  61. if(ActiveMudVolume == v) return
  62. #endif
  63. ActiveMudVolume = v
  64. if(associated(ActiveMudVolumePtr)) call ActiveMudVolumePtr(ActiveMudVolume)
  65. end subroutine
  66. subroutine Set_ActiveDensity_StudentStation(v)
  67. implicit none
  68. real*8, intent(in) :: v
  69. #ifdef ExcludeExtraChanges
  70. if(ActiveDensity == v) return
  71. #endif
  72. ActiveDensity = v
  73. if(associated(ActiveDensityPtr)) call ActiveDensityPtr(ActiveDensity)
  74. end subroutine
  75. subroutine Set_ReserveMudVolume_StudentStation(v)
  76. implicit none
  77. real*8, intent(in) :: v
  78. #ifdef ExcludeExtraChanges
  79. if(ReserveMudVolume == v) return
  80. #endif
  81. ReserveMudVolume = v
  82. if(associated(ReserveMudVolumePtr)) call ReserveMudVolumePtr(ReserveMudVolume)
  83. end subroutine
  84. subroutine Set_ReserveDensity_StudentStation(v)
  85. implicit none
  86. real*8, intent(in) :: v
  87. #ifdef ExcludeExtraChanges
  88. if(ReserveDensity == v) return
  89. #endif
  90. ReserveDensity = v
  91. if(associated(ReserveDensityPtr)) call ReserveDensityPtr(ReserveDensity)
  92. end subroutine
  93. subroutine SubscribeActiveMudVolume(a)
  94. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeActiveMudVolume
  95. !DEC$ ATTRIBUTES ALIAS: 'SubscribeActiveMudVolume' :: SubscribeActiveMudVolume
  96. implicit none
  97. procedure (ActionDouble) :: a
  98. ActiveMudVolumePtr => a
  99. end subroutine
  100. subroutine SubscribeActiveDensity(a)
  101. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeActiveDensity
  102. !DEC$ ATTRIBUTES ALIAS: 'SubscribeActiveDensity' :: SubscribeActiveDensity
  103. implicit none
  104. procedure (ActionDouble) :: a
  105. ActiveDensityPtr => a
  106. end subroutine
  107. subroutine SubscribeReserveMudVolume(a)
  108. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReserveMudVolume
  109. !DEC$ ATTRIBUTES ALIAS: 'SubscribeReserveMudVolume' :: SubscribeReserveMudVolume
  110. implicit none
  111. procedure (ActionDouble) :: a
  112. ReserveMudVolumePtr => a
  113. end subroutine
  114. subroutine SubscribeReserveDensity(a)
  115. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReserveDensity
  116. !DEC$ ATTRIBUTES ALIAS: 'SubscribeReserveDensity' :: SubscribeReserveDensity
  117. implicit none
  118. procedure (ActionDouble) :: a
  119. ReserveDensityPtr => a
  120. end subroutine
  121. end module CMudPropertiesVariables