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.

CReservoir.f90 1.7 KiB

1 year ago
123456789101112131415161718192021222324252627282930313233343536
  1. module CReservoir
  2. use SimulationVariables
  3. use json_module
  4. implicit none
  5. contains
  6. subroutine ReservoirToJson(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,'Reservoir')
  12. ! 2. add member of data type to new node
  13. ! call StringConfigurationToJson(p)
  14. ! call FormationToJson(p)
  15. call json%add(p,"AutoMigrationRate",data%Configuration%Reservoir%AutoMigrationRate)
  16. call json%add(p,"FluidGradient",data%Configuration%Reservoir%FluidGradient)
  17. call json%add(p,"FluidType",data%Configuration%Reservoir%FluidType)
  18. call json%add(p,"FluidViscosity",data%Configuration%Reservoir%FluidViscosity)
  19. call json%add(p,"FormationNo",data%Configuration%Reservoir%FormationNo)
  20. call json%add(p,"FormationPermeability",data%Configuration%Reservoir%FormationPermeability)
  21. call json%add(p,"FormationTop",data%Configuration%Reservoir%FormationTop)
  22. call json%add(p,"GeothermalGradient",data%Configuration%Reservoir%GeothermalGradient)
  23. call json%add(p,"InactiveInflux",data%Configuration%Reservoir%InactiveInflux)
  24. call json%add(p,"IsAutoMigrationRateSelected",data%Configuration%Reservoir%IsAutoMigrationRateSelected)
  25. call json%add(p,"MakeKickSinglePacket",data%Configuration%Reservoir%MakeKickSinglePacket)
  26. call json%add(p,"PressureGradient",data%Configuration%Reservoir%PressureGradient)
  27. ! 3. add new node to parent
  28. call json%add(parent,p)
  29. end subroutine
  30. end module CReservoir