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.
 
 
 
 
 
 

252 lines
6.0 KiB

  1. module CTanks
  2. use CTanksVariables
  3. use CSimulationVariables
  4. use CManifolds
  5. implicit none
  6. public
  7. contains
  8. ! Input routines
  9. subroutine SetWaterRate(v)
  10. !DEC$ ATTRIBUTES DLLEXPORT :: SetWaterRate
  11. !DEC$ ATTRIBUTES ALIAS: 'SetWaterRate' :: SetWaterRate
  12. implicit none
  13. real*8, intent(in) :: v
  14. WaterRate = v
  15. #ifdef deb
  16. print*, 'WaterRate=', WaterRate
  17. #endif
  18. end subroutine
  19. subroutine SetCementTankVolume(v)
  20. !DEC$ ATTRIBUTES DLLEXPORT :: SetCementTankVolume
  21. !DEC$ ATTRIBUTES ALIAS: 'SetCementTankVolume' :: SetCementTankVolume
  22. implicit none
  23. real*8, intent(in) :: v
  24. CementTankVolume = v
  25. #ifdef deb
  26. print*, 'CementTankVolume=', CementTankVolume
  27. #endif
  28. end subroutine
  29. subroutine SetCementTankDensity(v)
  30. !DEC$ ATTRIBUTES DLLEXPORT :: SetCementTankDensity
  31. !DEC$ ATTRIBUTES ALIAS: 'SetCementTankDensity' :: SetCementTankDensity
  32. implicit none
  33. real*8, intent(in) :: v
  34. CementTankDensity = v
  35. #ifdef deb
  36. print*, 'CementTankDensity=', CementTankDensity
  37. #endif
  38. end subroutine
  39. subroutine SetTripTankVolume(v)
  40. !DEC$ ATTRIBUTES DLLEXPORT :: SetTripTankVolume
  41. !DEC$ ATTRIBUTES ALIAS: 'SetTripTankVolume' :: SetTripTankVolume
  42. implicit none
  43. real*8, intent(in) :: v
  44. TripTankVolume = v
  45. #ifdef deb
  46. print*, 'TripTankVolume=', TripTankVolume
  47. #endif
  48. end subroutine
  49. subroutine SetTripTankDensity(v)
  50. !DEC$ ATTRIBUTES DLLEXPORT :: SetTripTankDensity
  51. !DEC$ ATTRIBUTES ALIAS: 'SetTripTankDensity' :: SetTripTankDensity
  52. implicit none
  53. real*8, intent(in) :: v
  54. TripTankDensity = v
  55. #ifdef deb
  56. print*, 'TripTankDensity=', TripTankDensity
  57. #endif
  58. end subroutine
  59. ! subroutine SetManualPumpPowerT(v)
  60. ! !DEC$ ATTRIBUTES DLLEXPORT :: SetManualPumpPowerT
  61. ! !DEC$ ATTRIBUTES ALIAS: 'SetManualPumpPowerT' :: SetManualPumpPowerT
  62. ! implicit none
  63. ! logical, intent(in) :: v
  64. ! ManualPumpPower = v
  65. ! call ChangeValve(43, v)
  66. !#ifdef deb
  67. ! print*, 'ManualPumpPowerT=', ManualPumpPower
  68. !#endif
  69. ! end subroutine
  70. subroutine SetValve1T(v)
  71. !DEC$ ATTRIBUTES DLLEXPORT :: SetValve1T
  72. !DEC$ ATTRIBUTES ALIAS: 'SetValve1T' :: SetValve1T
  73. implicit none
  74. logical, intent(in) :: v
  75. Valve1 = v
  76. call ChangeValve(40, v)
  77. #ifdef deb
  78. print*, 'Valve1T=', Valve1
  79. #endif
  80. end subroutine
  81. subroutine SetValve2T(v)
  82. !DEC$ ATTRIBUTES DLLEXPORT :: SetValve2T
  83. !DEC$ ATTRIBUTES ALIAS: 'SetValve2T' :: SetValve2T
  84. implicit none
  85. logical, intent(in) :: v
  86. Valve2 = v
  87. call ChangeValve(41, v)
  88. #ifdef deb
  89. print*, 'Valve2T=', Valve2
  90. #endif
  91. end subroutine
  92. subroutine SetValve3T(v)
  93. !DEC$ ATTRIBUTES DLLEXPORT :: SetValve3T
  94. !DEC$ ATTRIBUTES ALIAS: 'SetValve3T' :: SetValve3T
  95. implicit none
  96. logical, intent(in) :: v
  97. Valve3 = v
  98. call ChangeValve(45, v)
  99. #ifdef deb
  100. print*, 'Valve3T=', Valve3
  101. #endif
  102. end subroutine
  103. subroutine SetValve4T(v)
  104. !DEC$ ATTRIBUTES DLLEXPORT :: SetValve4T
  105. !DEC$ ATTRIBUTES ALIAS: 'SetValve4T' :: SetValve4T
  106. implicit none
  107. logical, intent(in) :: v
  108. Valve4 = v
  109. call ChangeValve(58, v)
  110. #ifdef deb
  111. print*, 'Valve4T=', Valve4
  112. #endif
  113. end subroutine
  114. subroutine SetValve5T(v)
  115. !DEC$ ATTRIBUTES DLLEXPORT :: SetValve5T
  116. !DEC$ ATTRIBUTES ALIAS: 'SetValve5T' :: SetValve5T
  117. implicit none
  118. logical, intent(in) :: v
  119. Valve5 = v
  120. call ChangeValve(42, v)
  121. #ifdef deb
  122. print*, 'Valve5T=', Valve5
  123. #endif
  124. end subroutine
  125. subroutine SetValve6(v)
  126. !DEC$ ATTRIBUTES DLLEXPORT :: SetValve6
  127. !DEC$ ATTRIBUTES ALIAS: 'SetValve6' :: SetValve6
  128. implicit none
  129. logical, intent(in) :: v
  130. Valve6 = v
  131. call ChangeValve(38, v)
  132. !WRITE (*,*) ' valve 38 ', v
  133. #ifdef deb
  134. print*, 'Valve6=', Valve6
  135. #endif
  136. end subroutine
  137. subroutine SetValve7(v)
  138. !DEC$ ATTRIBUTES DLLEXPORT :: SetValve7
  139. !DEC$ ATTRIBUTES ALIAS: 'SetValve7' :: SetValve7
  140. implicit none
  141. logical, intent(in) :: v
  142. Valve7 = v
  143. call ChangeValve(59, v)
  144. #ifdef deb
  145. print*, 'Valve7=', Valve7
  146. #endif
  147. end subroutine
  148. subroutine SetValve8(v)
  149. !DEC$ ATTRIBUTES DLLEXPORT :: SetValve8
  150. !DEC$ ATTRIBUTES ALIAS: 'SetValve8' :: SetValve8
  151. implicit none
  152. logical, intent(in) :: v
  153. Valve8 = v
  154. call ChangeValve(39, v)
  155. #ifdef deb
  156. print*, 'Valve8=', Valve8
  157. #endif
  158. end subroutine
  159. subroutine SetValve9(v)
  160. !DEC$ ATTRIBUTES DLLEXPORT :: SetValve9
  161. !DEC$ ATTRIBUTES ALIAS: 'SetValve9' :: SetValve9
  162. implicit none
  163. logical, intent(in) :: v
  164. Valve9 = v
  165. call ChangeValve(36, v)
  166. !WRITE (*,*) ' valve 36 ', v
  167. #ifdef deb
  168. print*, 'Valve9=', Valve9
  169. #endif
  170. end subroutine
  171. subroutine SetValve10(v)
  172. !DEC$ ATTRIBUTES DLLEXPORT :: SetValve10
  173. !DEC$ ATTRIBUTES ALIAS: 'SetValve10' :: SetValve10
  174. implicit none
  175. logical, intent(in) :: v
  176. Valve10 = v
  177. call ChangeValve(37, v)
  178. #ifdef deb
  179. print*, 'Valve10=', Valve10
  180. #endif
  181. end subroutine
  182. subroutine SetValve11(v)
  183. !DEC$ ATTRIBUTES DLLEXPORT :: SetValve11
  184. !DEC$ ATTRIBUTES ALIAS: 'SetValve11' :: SetValve11
  185. implicit none
  186. logical, intent(in) :: v
  187. Valve11 = v
  188. call ChangeValve(44, v)
  189. #ifdef deb
  190. print*, 'Valve11=', Valve11
  191. #endif
  192. end subroutine
  193. ! Output routines
  194. real(8) function GetTripTankVolumeT()
  195. !DEC$ ATTRIBUTES DLLEXPORT :: GetTripTankVolumeT
  196. !DEC$ ATTRIBUTES ALIAS: 'GetTripTankVolumeT' :: GetTripTankVolumeT
  197. implicit none
  198. GetTripTankVolumeT = TripTankVolume
  199. !GetTripTankVolumeT = 50.0 + SimulationTime
  200. end function
  201. real(8) function GetTripTankDensity()
  202. !DEC$ ATTRIBUTES DLLEXPORT :: GetTripTankDensity
  203. !DEC$ ATTRIBUTES ALIAS: 'GetTripTankDensity' :: GetTripTankDensity
  204. implicit none
  205. GetTripTankDensity = TripTankDensity
  206. !GetTripTankDensity = 13.0 + SimulationTime
  207. end function
  208. logical function GetManualPumpPowerT()
  209. !DEC$ ATTRIBUTES DLLEXPORT :: GetManualPumpPowerT
  210. !DEC$ ATTRIBUTES ALIAS: 'GetManualPumpPowerT' :: GetManualPumpPowerT
  211. implicit none
  212. GetManualPumpPowerT = ManualPumpPower
  213. !GetManualPumpPowerT = .true.
  214. end function
  215. end module CTanks