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.
 
 
 
 
 
 

81 lines
2.8 KiB

  1. <<<<<<< HEAD
  2. module CTanks
  3. use SimulationVariables
  4. use CManifolds
  5. implicit none
  6. public
  7. contains
  8. subroutine Set_ManualPumpPower(v)
  9. use CManifolds, only:ChangeValve
  10. implicit none
  11. logical, intent(in) :: v
  12. data%EquipmentControl%Tank%ManualPumpPower = v
  13. call ChangeValve(43, v)
  14. #ifdef deb
  15. print*, 'ManualPumpPower=', data%EquipmentControl%Tank%ManualPumpPower
  16. #endif
  17. end subroutine
  18. =======
  19. module CTanks
  20. use SimulationVariables
  21. use CManifolds
  22. implicit none
  23. public
  24. contains
  25. subroutine CTankToJson(parent)
  26. type(json_value),pointer :: parent
  27. type(json_core) :: json
  28. type(json_value),pointer :: p,pform
  29. integer :: i
  30. call json%create_array(p,'CTank')
  31. do i=1,data%Equipments%Tanks%CTank%Count
  32. call json%create_object(pform,'')
  33. call json%add(pform,"WaterRate",data%Equipments%Tanks%CTanks%WaterRate)
  34. call json%add(pform,"CementTankVolume",data%Equipments%Tanks%CTanks%CementTankVolume)
  35. call json%add(pform,"CementTankDensity",data%Equipments%Tanks%CTanks%CementTankDensity)
  36. call json%add(pform,"TripTankVolume",data%Equipments%Tanks%CTanks%TripTankVolume)
  37. call json%add(pform,"TripTankDensity",data%Equipments%Tanks%CTanks%TripTankDensity)
  38. call json%add(pform,"ManualPumpPower",data%Equipments%Tanks%CTanks%ManualPumpPower)
  39. call json%add(pform,"Valve1",data%Equipments%Tanks%CTanks%Valve1)
  40. call json%add(pform,"Valve2",data%Equipments%Tanks%CTanks%Valve2)
  41. call json%add(pform,"Valve3",data%Equipments%Tanks%CTanks%Valve3)
  42. call json%add(pform,"Valve4",data%Equipments%Tanks%CTanks%Valve4)
  43. call json%add(pform,"Valve5",data%Equipments%Tanks%CTanks%Valve5)
  44. call json%add(pform,"Valve6",data%Equipments%Tanks%CTanks%Valve6)
  45. call json%add(pform,"Valve7",data%Equipments%Tanks%CTanks%Valve7)
  46. call json%add(pform,"Valve8",data%Equipments%Tanks%CTanks%Valve8)
  47. call json%add(pform,"Valve9",data%Equipments%Tanks%CTanks%Valve9)
  48. call json%add(pform,"Valve10",data%Equipments%Tanks%CTanks%Valve10)
  49. call json%add(pform,"Valve11",data%Equipments%Tanks%CTanks%Valve11)
  50. call json%add(p,pform)
  51. end do
  52. call json%add(parent,p)
  53. end subroutine
  54. subroutine Set_ManualPumpPower(v)
  55. use CManifolds, only:ChangeValve
  56. implicit none
  57. logical, intent(in) :: v
  58. data%EquipmentControl%Tank%ManualPumpPower = v
  59. call ChangeValve(43, v)
  60. #ifdef deb
  61. print*, 'ManualPumpPower=', data%EquipmentControl%Tank%ManualPumpPower
  62. #endif
  63. end subroutine
  64. >>>>>>> 12c8e5ea51ec0ab746d971224588f794381f80d2
  65. end module CTanks