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.
 
 
 
 
 
 

72 lines
3.2 KiB

  1. # 1 "/home/admin/SimulationCore2/CSharp/BasicInputs/Geology/CReservoir.f90"
  2. module CReservoir
  3. use SimulationVariables
  4. use json_module
  5. implicit none
  6. contains
  7. subroutine ReservoirFromJson(parent)
  8. type(json_value),pointer :: parent
  9. type(json_core) :: json
  10. type(json_value),pointer :: p,pval
  11. call json%get(parent,'Reservoir',p)
  12. call json%get(p,'FormationNo',pval)
  13. call json%get(pval,data%Configuration%Reservoir%FormationNo)
  14. call json%get(p,'FormationTop',pval)
  15. call json%get(pval,data%Configuration%Reservoir%FormationTop)
  16. ! call json%get(p,'PressureGradient',pval)
  17. ! call json%get(pval,data%Configuration%Reservoir%PressureGradient)
  18. call json%get(p,'FormationPermeability',pval)
  19. call json%get(pval,data%Configuration%Reservoir%FormationPermeability)
  20. ! call json%get(p,'GeothermalGradient',pval)
  21. ! call json%get(pval,data%Configuration%Reservoir%GeothermalGradient)
  22. ! call json%get(p,'FluidType',pval)
  23. ! call json%get(pval,data%Configuration%Reservoir%FluidType)
  24. ! call json%get(p,'FluidGradient',pval)
  25. ! call json%get(pval,data%Configuration%Reservoir%FluidGradient)
  26. ! call json%get(p,'FluidViscosity',pval)
  27. ! call json%get(pval,data%Configuration%Reservoir%FluidViscosity)
  28. ! call json%get(p,'InactiveInflux',pval)
  29. ! call json%get(pval,data%Configuration%Reservoir%InactiveInflux)
  30. call json%get(p,'IsAutoMigrationRateSelected',pval)
  31. call json%get(pval,data%Configuration%Reservoir%IsAutoMigrationRateSelected)
  32. call json%get(p,'AutoMigrationRate',pval)
  33. call json%get(pval,data%Configuration%Reservoir%AutoMigrationRate)
  34. call json%get(p,'MakeKickSinglePacket',pval)
  35. call json%get(pval,data%Configuration%Reservoir%MakeKickSinglePacket)
  36. end subroutine
  37. ! subroutine ReservoirToJson(parent)
  38. ! type(json_value),pointer :: parent
  39. ! type(json_core) :: json
  40. ! type(json_value),pointer :: p
  41. ! ! 1. create new node
  42. ! call json%create_object(p,'Reservoir')
  43. ! ! 2. add member of data type to new node
  44. ! ! call StringConfigurationToJson(p)
  45. ! ! call FormationToJson(p)
  46. ! call json%add(p,"AutoMigrationRate",data%Configuration%Reservoir%AutoMigrationRate)
  47. ! ! call json%add(p,"FluidGradient",data%Configuration%Reservoir%FluidGradient)
  48. ! ! call json%add(p,"FluidType",data%Configuration%Reservoir%FluidType)
  49. ! ! call json%add(p,"FluidViscosity",data%Configuration%Reservoir%FluidViscosity)
  50. ! call json%add(p,"FormationNo",data%Configuration%Reservoir%FormationNo)
  51. ! call json%add(p,"FormationPermeability",data%Configuration%Reservoir%FormationPermeability)
  52. ! call json%add(p,"FormationTop",data%Configuration%Reservoir%FormationTop)
  53. ! call json%add(p,"GeothermalGradient",data%Configuration%Reservoir%GeothermalGradient)
  54. ! call json%add(p,"InactiveInflux",data%Configuration%Reservoir%InactiveInflux)
  55. ! call json%add(p,"IsAutoMigrationRateSelected",data%Configuration%Reservoir%IsAutoMigrationRateSelected)
  56. ! call json%add(p,"MakeKickSinglePacket",data%Configuration%Reservoir%MakeKickSinglePacket)
  57. ! call json%add(p,"PressureGradient",data%Configuration%Reservoir%PressureGradient)
  58. ! ! 3. add new node to parent
  59. ! call json%add(parent,p)
  60. ! end subroutine
  61. end module CReservoir