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

143 行
5.1 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. Type::MudPropertiesType
  24. integer :: ActiveMudType
  25. integer :: ActiveRheologyModel
  26. real(8) :: ActiveMudVolume
  27. real(8) :: ActiveMudVolumeGal
  28. real(8) :: ActiveDensity
  29. real(8) :: ActivePlasticViscosity
  30. real(8) :: ActiveYieldPoint
  31. real(8) :: ActiveThetaThreeHundred
  32. real(8) :: ActiveThetaSixHundred
  33. integer :: ReserveMudType
  34. real(8) :: ReserveMudVolume
  35. real(8) :: ReserveMudVolumeGal
  36. real(8) :: ReserveDensity
  37. real(8) :: ReservePlasticViscosity
  38. real(8) :: ReserveYieldPoint
  39. real(8) :: ReserveThetaThreeHundred
  40. real(8) :: ReserveThetaSixHundred
  41. real(8) :: ActiveTotalTankCapacity
  42. real(8) :: ActiveTotalTankCapacityGal
  43. real(8) :: ActiveSettledContents
  44. real(8) :: ActiveSettledContentsGal
  45. real(8) :: ActiveTotalContents
  46. real(8) :: ActiveTotalContentsGal
  47. logical :: ActiveAutoDensity
  48. !real(8) :: ReserveTotalTankCapacity
  49. !real(8) :: ReserveTotalTankCapacityGal
  50. !real(8) :: ReserveSettledContents
  51. !real(8) :: ReserveSettledContentsGal
  52. !real(8) :: ReserveTotalContents
  53. !real(8) :: ReserveTotalContentsGal
  54. real(8) :: InitialTripTankMudVolume
  55. real(8) :: InitialTripTankMudVolumeGal
  56. real(8) :: PedalFlowMeter
  57. End type MudPropertiesType
  58. Type(MudPropertiesType)::MudProperties
  59. contains
  60. subroutine Set_ActiveMudVolume_StudentStation(v)
  61. implicit none
  62. real*8, intent(in) :: v
  63. #ifdef ExcludeExtraChanges
  64. if(MudProperties%ActiveMudVolume == v) return
  65. #endif
  66. MudProperties%ActiveMudVolume = v
  67. if(associated(ActiveMudVolumePtr)) call ActiveMudVolumePtr(MudProperties%ActiveMudVolume)
  68. end subroutine
  69. subroutine Set_ActiveDensity_StudentStation(v)
  70. implicit none
  71. real*8, intent(in) :: v
  72. #ifdef ExcludeExtraChanges
  73. if(MudProperties%ActiveDensity == v) return
  74. #endif
  75. MudProperties%ActiveDensity = v
  76. if(associated(ActiveDensityPtr)) call ActiveDensityPtr(MudProperties%ActiveDensity)
  77. end subroutine
  78. subroutine Set_ReserveMudVolume_StudentStation(v)
  79. implicit none
  80. real*8, intent(in) :: v
  81. #ifdef ExcludeExtraChanges
  82. if(MudProperties%ReserveMudVolume == v) return
  83. #endif
  84. MudProperties%ReserveMudVolume = v
  85. if(associated(ReserveMudVolumePtr)) call ReserveMudVolumePtr(MudProperties%ReserveMudVolume)
  86. end subroutine
  87. subroutine Set_ReserveDensity_StudentStation(v)
  88. implicit none
  89. real*8, intent(in) :: v
  90. #ifdef ExcludeExtraChanges
  91. if(MudProperties%ReserveDensity == v) return
  92. #endif
  93. MudProperties%ReserveDensity = v
  94. if(associated(ReserveDensityPtr)) call ReserveDensityPtr(MudProperties%ReserveDensity)
  95. end subroutine
  96. subroutine SubscribeActiveMudVolume(a)
  97. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeActiveMudVolume
  98. !DEC$ ATTRIBUTES ALIAS: 'SubscribeActiveMudVolume' :: SubscribeActiveMudVolume
  99. implicit none
  100. procedure (ActionDouble) :: a
  101. ActiveMudVolumePtr => a
  102. end subroutine
  103. subroutine SubscribeActiveDensity(a)
  104. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeActiveDensity
  105. !DEC$ ATTRIBUTES ALIAS: 'SubscribeActiveDensity' :: SubscribeActiveDensity
  106. implicit none
  107. procedure (ActionDouble) :: a
  108. ActiveDensityPtr => a
  109. end subroutine
  110. subroutine SubscribeReserveMudVolume(a)
  111. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReserveMudVolume
  112. !DEC$ ATTRIBUTES ALIAS: 'SubscribeReserveMudVolume' :: SubscribeReserveMudVolume
  113. implicit none
  114. procedure (ActionDouble) :: a
  115. ReserveMudVolumePtr => a
  116. end subroutine
  117. subroutine SubscribeReserveDensity(a)
  118. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeReserveDensity
  119. !DEC$ ATTRIBUTES ALIAS: 'SubscribeReserveDensity' :: SubscribeReserveDensity
  120. implicit none
  121. procedure (ActionDouble) :: a
  122. ReserveDensityPtr => a
  123. end subroutine
  124. end module CMudPropertiesVariables