Simulation Core
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

91 righe
4.5 KiB

  1. module MudPropertiesModule
  2. use SimulationVariables
  3. use json_module
  4. implicit none
  5. contains
  6. subroutine MudPropertiesToJson(parent)
  7. type(json_value),pointer :: parent
  8. type(json_core) :: json
  9. type(json_value),pointer :: p
  10. ! 1. create new node
  11. call json%create_object(p,'Mud')
  12. ! 2. add member of data type to new node
  13. call json%add(p,"ActiveMudType",data%Configuration%Mud%ActiveMudType)
  14. call json%add(p,"ActiveRheologyModel",data%Configuration%Mud%ActiveRheologyModel)
  15. call json%add(p,"ActiveMudVolume",data%Configuration%Mud%ActiveMudVolume)
  16. call json%add(p,"ActiveMudVolumeGal",data%Configuration%Mud%ActiveMudVolumeGal)
  17. call json%add(p,"ActiveDensity",data%Configuration%Mud%ActiveDensity)
  18. call json%add(p,"ActivePlasticViscosity",data%Configuration%Mud%ActivePlasticViscosity)
  19. call json%add(p,"ActiveYieldPoint",data%Configuration%Mud%ActiveYieldPoint)
  20. call json%add(p,"ActiveThetaThreeHundred",data%Configuration%Mud%ActiveThetaThreeHundred)
  21. call json%add(p,"ActiveThetaSixHundred",data%Configuration%Mud%ActiveThetaSixHundred)
  22. call json%add(p,"ReserveMudType",data%Configuration%Mud%ReserveMudType)
  23. call json%add(p,"ReserveMudVolume",data%Configuration%Mud%ReserveMudVolume)
  24. call json%add(p,"ReserveMudVolumeGal",data%Configuration%Mud%ReserveMudVolumeGal)
  25. call json%add(p,"ReserveDensity",data%Configuration%Mud%ReserveDensity)
  26. call json%add(p,"ReservePlasticViscosity",data%Configuration%Mud%ReservePlasticViscosity)
  27. call json%add(p,"ReserveYieldPoint",data%Configuration%Mud%ReserveYieldPoint)
  28. call json%add(p,"ReserveThetaThreeHundred",data%Configuration%Mud%ReserveThetaThreeHundred)
  29. call json%add(p,"ReserveThetaSixHundred",data%Configuration%Mud%ReserveThetaSixHundred)
  30. call json%add(p,"ActiveTotalTankCapacity",data%Configuration%Mud%ActiveTotalTankCapacity)
  31. call json%add(p,"ActiveTotalTankCapacityGal",data%Configuration%Mud%ActiveTotalTankCapacityGal)
  32. call json%add(p,"ActiveSettledContents",data%Configuration%Mud%ActiveSettledContents)
  33. call json%add(p,"ActiveSettledContentsGal",data%Configuration%Mud%ActiveSettledContentsGal)
  34. call json%add(p,"ActiveTotalContents",data%Configuration%Mud%ActiveTotalContents)
  35. call json%add(p,"ActiveTotalContentsGal",data%Configuration%Mud%ActiveTotalContentsGal)
  36. call json%add(p,"ActiveAutoDensity",data%Configuration%Mud%ActiveAutoDensity)
  37. call json%add(p,"InitialTripTankMudVolume",data%Configuration%Mud%InitialTripTankMudVolume)
  38. call json%add(p,"InitialTripTankMudVolumeGal",data%Configuration%Mud%InitialTripTankMudVolumeGal)
  39. call json%add(p,"PedalFlowMeter",data%Configuration%Mud%PedalFlowMeter)
  40. ! 3. add new node to parent
  41. call json%add(parent,p)
  42. end subroutine
  43. subroutine Set_ActiveMudVolume_StudentStation(v)
  44. implicit none
  45. real*8, intent(in) :: v
  46. #ifdef ExcludeExtraChanges
  47. if(data%Configuration%Mud%ActiveMudVolume == v) return
  48. #endif
  49. data%Configuration%Mud%ActiveMudVolume = v
  50. ! if(associated(ActiveMudVolumePtr)) call ActiveMudVolumePtr(data%Configuration%Mud%ActiveMudVolume)
  51. end subroutine
  52. subroutine Set_ActiveDensity_StudentStation(v)
  53. implicit none
  54. real*8, intent(in) :: v
  55. #ifdef ExcludeExtraChanges
  56. if(data%Configuration%Mud%ActiveDensity == v) return
  57. #endif
  58. data%Configuration%Mud%ActiveDensity = v
  59. ! if(associated(ActiveDensityPtr)) call ActiveDensityPtr(data%Configuration%Mud%ActiveDensity)
  60. end subroutine
  61. subroutine Set_ReserveMudVolume_StudentStation(v)
  62. implicit none
  63. real*8, intent(in) :: v
  64. #ifdef ExcludeExtraChanges
  65. if(data%Configuration%Mud%ReserveMudVolume == v) return
  66. #endif
  67. data%Configuration%Mud%ReserveMudVolume = v
  68. ! if(associated(ReserveMudVolumePtr)) call ReserveMudVolumePtr(data%Configuration%Mud%ReserveMudVolume)
  69. end subroutine
  70. subroutine Set_ReserveDensity_StudentStation(v)
  71. implicit none
  72. real*8, intent(in) :: v
  73. #ifdef ExcludeExtraChanges
  74. if(data%Configuration%Mud%ReserveDensity == v) return
  75. #endif
  76. data%Configuration%Mud%ReserveDensity = v
  77. ! if(associated(ReserveDensityPtr)) call ReserveDensityPtr(data%Configuration%Mud%ReserveDensity)
  78. end subroutine
  79. end module MudPropertiesModule