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.

CCasingLinerChoke.i90 4.0 KiB

1 year ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/WellProfile/CCasingLinerChoke.f90"
  2. module CCasingLinerChoke
  3. use SimulationVariables
  4. use json_module
  5. implicit none
  6. public
  7. contains
  8. subroutine CasingLinerChokeToJson(parent)
  9. type(json_value),pointer :: parent
  10. type(json_core) :: json
  11. type(json_value),pointer :: p
  12. ! 1. create new node
  13. call json%create_object(p,'CasingLinerChoke')
  14. ! 2. add member of data type to new node
  15. ! call StringConfigurationToJson(p)
  16. ! call FormationToJson(p)
  17. call json%add(p,"CasingDepth",data%Configuration%CasingLinerChoke%CasingDepth)
  18. call json%add(p,"CasingId",data%Configuration%CasingLinerChoke%CasingId)
  19. call json%add(p,"CasingOd",data%Configuration%CasingLinerChoke%CasingOd)
  20. call json%add(p,"CasingWeight",data%Configuration%CasingLinerChoke%CasingWeight)
  21. call json%add(p,"CasingCollapsePressure",data%Configuration%CasingLinerChoke%CasingCollapsePressure)
  22. call json%add(p,"CasingTensileStrength",data%Configuration%CasingLinerChoke%CasingTensileStrength)
  23. call json%add(p,"LinerTopDepth",data%Configuration%CasingLinerChoke%LinerTopDepth)
  24. call json%add(p,"LinerLength",data%Configuration%CasingLinerChoke%LinerLength)
  25. call json%add(p,"LinerId",data%Configuration%CasingLinerChoke%LinerId)
  26. call json%add(p,"LinerOd",data%Configuration%CasingLinerChoke%LinerOd)
  27. call json%add(p,"LinerWeight",data%Configuration%CasingLinerChoke%LinerWeight)
  28. call json%add(p,"LinerCollapsePressure",data%Configuration%CasingLinerChoke%LinerCollapsePressure)
  29. call json%add(p,"LinerTensileStrength",data%Configuration%CasingLinerChoke%LinerTensileStrength)
  30. call json%add(p,"OpenHoleId",data%Configuration%CasingLinerChoke%OpenHoleId)
  31. call json%add(p,"OpenHoleLength",data%Configuration%CasingLinerChoke%OpenHoleLength)
  32. ! 3. add new node to parent
  33. call json%add(parent,p)
  34. end subroutine
  35. subroutine CasingLinerChokeFromJson(parent)
  36. use json_module,IK =>json_ik
  37. type(json_value),pointer :: parent
  38. type(json_core) :: json
  39. type(json_value),pointer :: p,pitem
  40. call json%get(parent,'CasingLinerChoke',p)
  41. call json%get(p,"CasingDepth",pitem)
  42. call json%get(pitem,data%Configuration%CasingLinerChoke%CasingDepth)
  43. call json%get(p,"CasingId",pitem)
  44. call json%get(pitem,data%Configuration%CasingLinerChoke%CasingId)
  45. call json%get(p,"CasingOd",pitem)
  46. call json%get(pitem,data%Configuration%CasingLinerChoke%CasingOd)
  47. call json%get(p,"CasingWeight",pitem)
  48. call json%get(pitem,data%Configuration%CasingLinerChoke%CasingWeight)
  49. call json%get(p,"CasingCollapsePressure",pitem)
  50. call json%get(pitem,data%Configuration%CasingLinerChoke%CasingCollapsePressure)
  51. call json%get(p,"CasingTensileStrength",pitem)
  52. call json%get(pitem,data%Configuration%CasingLinerChoke%CasingTensileStrength)
  53. call json%get(p,"LinerTopDepth",pitem)
  54. call json%get(pitem,data%Configuration%CasingLinerChoke%LinerTopDepth)
  55. call json%get(p,"LinerLength",pitem)
  56. call json%get(pitem,data%Configuration%CasingLinerChoke%LinerLength)
  57. call json%get(p,"LinerId",pitem)
  58. call json%get(pitem,data%Configuration%CasingLinerChoke%LinerId)
  59. call json%get(p,"LinerOd",pitem)
  60. call json%get(pitem,data%Configuration%CasingLinerChoke%LinerOd)
  61. call json%get(p,"LinerWeight",pitem)
  62. call json%get(pitem,data%Configuration%CasingLinerChoke%LinerWeight)
  63. call json%get(p,"LinerCollapsePressure",pitem)
  64. call json%get(pitem,data%Configuration%CasingLinerChoke%LinerCollapsePressure)
  65. call json%get(p,"LinerTensileStrength",pitem)
  66. call json%get(pitem,data%Configuration%CasingLinerChoke%LinerTensileStrength)
  67. call json%get(p,"OpenHoleId",pitem)
  68. call json%get(pitem,data%Configuration%CasingLinerChoke%OpenHoleId)
  69. call json%get(p,"OpenHoleLength",pitem)
  70. call json%get(pitem,data%Configuration%CasingLinerChoke%OpenHoleLength)
  71. end subroutine
  72. end module CCasingLinerChoke