ResSimpy 2.3.9__tar.gz → 2.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. {ressimpy-2.3.9 → ressimpy-2.4.0}/PKG-INFO +8 -7
  2. ressimpy-2.4.0/ResSimpy/DataModelBaseClasses/Ftrans.py +32 -0
  3. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Grid.py +4 -1
  4. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Over.py +2 -0
  5. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/FcsFile.py +3 -1
  6. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusWellhead.py +1 -1
  7. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusFile.py +23 -0
  8. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusPVTMethod.py +1 -1
  9. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusRockMethod.py +1 -1
  10. ressimpy-2.4.0/ResSimpy/Nexus/DataModels/StructuredGrid/NexusFtrans.py +32 -0
  11. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/StructuredGrid/NexusGrid.py +170 -7
  12. ressimpy-2.4.0/ResSimpy/Nexus/DataModels/StructuredGrid/NexusTOver.py +33 -0
  13. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusSimulator.py +2 -1
  14. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/load_wells.py +4 -1
  15. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/structured_grid_operations.py +104 -33
  16. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/__init__.py +1 -1
  17. {ressimpy-2.3.9 → ressimpy-2.4.0}/pyproject.toml +7 -6
  18. {ressimpy-2.3.9 → ressimpy-2.4.0}/LICENSE.MD +0 -0
  19. {ressimpy-2.3.9 → ressimpy-2.4.0}/README.md +0 -0
  20. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Aquifer.py +0 -0
  21. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Completion.py +0 -0
  22. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Constraint.py +0 -0
  23. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/DataObjectMixin.py +0 -0
  24. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/DynamicProperty.py +0 -0
  25. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Equilibration.py +0 -0
  26. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Gaslift.py +0 -0
  27. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/GridArrayDefinition.py +0 -0
  28. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/GridArrayFunction.py +0 -0
  29. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/LGR.py +0 -0
  30. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Multir.py +0 -0
  31. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Network.py +0 -0
  32. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/NetworkList.py +0 -0
  33. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/NetworkObject.py +0 -0
  34. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Node.py +0 -0
  35. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/NodeConnection.py +0 -0
  36. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/OperationsMixin.py +0 -0
  37. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/PVT.py +0 -0
  38. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/RelPerm.py +0 -0
  39. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/RelPermEndPoint.py +0 -0
  40. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Reporting.py +0 -0
  41. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Rock.py +0 -0
  42. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Separator.py +0 -0
  43. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Simulator.py +0 -0
  44. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/SolverParameter.py +0 -0
  45. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Target.py +0 -0
  46. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Valve.py +0 -0
  47. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Water.py +0 -0
  48. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Well.py +0 -0
  49. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/WellConnection.py +0 -0
  50. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Wellbore.py +0 -0
  51. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/Wellhead.py +0 -0
  52. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/__init__.py +0 -0
  53. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/DataModelBaseClasses/output_request.py +0 -0
  54. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Enums/FluidTypeEnums.py +0 -0
  55. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Enums/FrequencyEnum.py +0 -0
  56. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Enums/GridFunctionTypes.py +0 -0
  57. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Enums/HowEnum.py +0 -0
  58. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Enums/OutputType.py +0 -0
  59. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Enums/PenetrationDirectionEnum.py +0 -0
  60. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Enums/TimeSteppingMethodEnum.py +0 -0
  61. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Enums/UnitsEnum.py +0 -0
  62. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Enums/WellTypeEnum.py +0 -0
  63. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Enums/__init__.py +0 -0
  64. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/FileOperations/File.py +0 -0
  65. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/FileOperations/FileBase.py +0 -0
  66. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/FileOperations/__init__.py +0 -0
  67. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/FileOperations/file_operations.py +0 -0
  68. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/Constraints.py +0 -0
  69. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/Grids.py +0 -0
  70. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/Hydraulics.py +0 -0
  71. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/LGRs.py +0 -0
  72. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/NetworkLists.py +0 -0
  73. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/NodeConnections.py +0 -0
  74. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/Nodes.py +0 -0
  75. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/SolverParameters.py +0 -0
  76. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/Targets.py +0 -0
  77. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/WellConnections.py +0 -0
  78. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/Wellbores.py +0 -0
  79. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/Wellheads.py +0 -0
  80. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/Wells.py +0 -0
  81. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/GenericContainerClasses/__init__.py +0 -0
  82. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/FcsConfig.py +0 -0
  83. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusAction.py +0 -0
  84. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusActions.py +0 -0
  85. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusActivationChange.py +0 -0
  86. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusActivationChanges.py +0 -0
  87. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusConList.py +0 -0
  88. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusConLists.py +0 -0
  89. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusConstraint.py +0 -0
  90. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusConstraints.py +0 -0
  91. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusNode.py +0 -0
  92. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusNodeConnection.py +0 -0
  93. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusNodeConnections.py +0 -0
  94. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusNodes.py +0 -0
  95. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusProc.py +0 -0
  96. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusProcs.py +0 -0
  97. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusTarget.py +0 -0
  98. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusTargets.py +0 -0
  99. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusWellConnection.py +0 -0
  100. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusWellConnections.py +0 -0
  101. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusWellLists.py +0 -0
  102. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusWellbore.py +0 -0
  103. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusWellbores.py +0 -0
  104. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/NexusWellheads.py +0 -0
  105. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/Network/__init__.py +0 -0
  106. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusAquiferMethod.py +0 -0
  107. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusCompletion.py +0 -0
  108. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusEquilMethod.py +0 -0
  109. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusGasliftMethod.py +0 -0
  110. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusHydraulicsMethod.py +0 -0
  111. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusOptions.py +0 -0
  112. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusRelPermEndPoint.py +0 -0
  113. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusRelPermMethod.py +0 -0
  114. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusReportingRequests.py +0 -0
  115. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusSeparatorMethod.py +0 -0
  116. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusSolverParameter.py +0 -0
  117. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusValveMethod.py +0 -0
  118. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusWaterMethod.py +0 -0
  119. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusWell.py +0 -0
  120. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusWellList.py +0 -0
  121. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/NexusWellMod.py +0 -0
  122. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/StructuredGrid/NexusGridArrayFunction.py +0 -0
  123. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/StructuredGrid/NexusLGR.py +0 -0
  124. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/StructuredGrid/NexusLGRs.py +0 -0
  125. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/StructuredGrid/NexusMultir.py +0 -0
  126. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/StructuredGrid/NexusOver.py +0 -0
  127. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/StructuredGrid/__init__.py +0 -0
  128. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/DataModels/__init__.py +0 -0
  129. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusAquiferMethods.py +0 -0
  130. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusEnums/ActivationChangeEnum.py +0 -0
  131. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusEnums/DateFormatEnum.py +0 -0
  132. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusEnums/__init__.py +0 -0
  133. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusEquilMethods.py +0 -0
  134. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusGasliftMethods.py +0 -0
  135. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusGrids.py +0 -0
  136. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusHydraulicsMethods.py +0 -0
  137. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/__init__.py +0 -0
  138. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/adsorption_keywords.py +0 -0
  139. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/alphaf_keywords.py +0 -0
  140. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/aquifer_keywords.py +0 -0
  141. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/choke_keywords.py +0 -0
  142. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/compressor_keywords.py +0 -0
  143. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/eos_defaults_keywords.py +0 -0
  144. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/equil_keywords.py +0 -0
  145. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/esp_keywords.py +0 -0
  146. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/fcs_keywords.py +0 -0
  147. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/fluxin_keywords.py +0 -0
  148. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/gaslift_keywords.py +0 -0
  149. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/hyd_keywords.py +0 -0
  150. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/icd_keywords.py +0 -0
  151. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/ipr_keywords.py +0 -0
  152. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/nexus_keywords.py +0 -0
  153. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/options_keywords.py +0 -0
  154. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/polymer_keywords.py +0 -0
  155. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/proc_keywords.py +0 -0
  156. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/pump_keywords.py +0 -0
  157. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/pvt_keywords.py +0 -0
  158. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/relpm_keywords.py +0 -0
  159. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/rock_keywords.py +0 -0
  160. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/runcontrol_keywords.py +0 -0
  161. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/separator_keywords.py +0 -0
  162. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/structured_grid_keywords.py +0 -0
  163. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/surface_keywords.py +0 -0
  164. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/tracer_init_keywords.py +0 -0
  165. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/valve_keywords.py +0 -0
  166. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/water_keywords.py +0 -0
  167. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusKeywords/wells_keywords.py +0 -0
  168. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusNetwork.py +0 -0
  169. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusPVTMethods.py +0 -0
  170. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusRelPermMethods.py +0 -0
  171. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusReporting.py +0 -0
  172. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusRockMethods.py +0 -0
  173. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusSeparatorMethods.py +0 -0
  174. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusSolverParameters.py +0 -0
  175. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusValveMethods.py +0 -0
  176. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusWaterMethods.py +0 -0
  177. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/NexusWells.py +0 -0
  178. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/__init__.py +0 -0
  179. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/array_function_operations.py +0 -0
  180. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/constants.py +0 -0
  181. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/logfile_operations.py +0 -0
  182. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/nexus_add_new_object_to_file.py +0 -0
  183. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/nexus_collect_tables.py +0 -0
  184. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/nexus_constraint_operations.py +0 -0
  185. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/nexus_file_operations.py +0 -0
  186. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/nexus_load_list_table.py +0 -0
  187. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/nexus_modify_object_in_file.py +0 -0
  188. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/nexus_remove_object_from_file.py +0 -0
  189. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/rel_perm_operations.py +0 -0
  190. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Nexus/runcontrol_operations.py +0 -0
  191. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/DataModels/Network/__init__.py +0 -0
  192. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/DataModels/OpenGoSimCompletion.py +0 -0
  193. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/DataModels/OpenGoSimWell.py +0 -0
  194. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/DataModels/__init__.py +0 -0
  195. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/Enums/SimulationTypeEnum.py +0 -0
  196. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/Enums/__init__.py +0 -0
  197. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/Model_Parts/OpenGoSimNetwork.py +0 -0
  198. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/Model_Parts/__init__.py +0 -0
  199. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/OpenGoSimKeywords/OpenGoSimKeywords.py +0 -0
  200. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/OpenGoSimKeywords/__init__.py +0 -0
  201. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/OpenGoSimSimulator.py +0 -0
  202. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/OpenGoSimWells.py +0 -0
  203. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/OpenGoSim/__init__.py +0 -0
  204. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Time/ISODateTime.py +0 -0
  205. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Time/__init__.py +0 -0
  206. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Units/AttributeMapping.py +0 -0
  207. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Units/AttributeMappings/BaseUnitMapping.py +0 -0
  208. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Units/AttributeMappings/CompletionUnitMapping.py +0 -0
  209. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Units/AttributeMappings/ConstraintUnitMapping.py +0 -0
  210. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Units/AttributeMappings/DynamicPropertyUnitMapping.py +0 -0
  211. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Units/AttributeMappings/NetworkUnitMapping.py +0 -0
  212. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Units/AttributeMappings/__init__.py +0 -0
  213. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Units/Units.py +0 -0
  214. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Units/__init__.py +0 -0
  215. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Utils/__init__.py +0 -0
  216. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Utils/factory_methods.py +0 -0
  217. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Utils/general_utilities.py +0 -0
  218. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Utils/generic_repr.py +0 -0
  219. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Utils/grid_filtering_functions.py +0 -0
  220. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Utils/invert_nexus_map.py +0 -0
  221. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Utils/obj_to_dataframe.py +0 -0
  222. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Utils/obj_to_table_string.py +0 -0
  223. {ressimpy-2.3.9 → ressimpy-2.4.0}/ResSimpy/Utils/to_dict_generic.py +0 -0
@@ -1,24 +1,25 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: ResSimpy
3
- Version: 2.3.9
3
+ Version: 2.4.0
4
4
  Summary: A Python library for working with Reservoir Simulator Models.
5
5
  License: Apache-2.0
6
6
  Keywords: ResSimpy,Reservoir Engineering
7
7
  Author: BP
8
- Requires-Python: >=3.10,<3.12
8
+ Requires-Python: >=3.10,<3.13
9
9
  Classifier: Development Status :: 5 - Production/Stable
10
10
  Classifier: License :: OSI Approved :: Apache Software License
11
11
  Classifier: Operating System :: OS Independent
12
12
  Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
15
16
  Classifier: Topic :: Scientific/Engineering
16
17
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
17
18
  Classifier: Topic :: System :: Filesystems
18
- Requires-Dist: numpy (>=1.25,<2.0)
19
- Requires-Dist: pandas (>=1.5,<2.0)
20
- Requires-Dist: resqpy (>=4.12,<5.0)
21
- Requires-Dist: typing-extensions (>=4.8,<5.0)
19
+ Requires-Dist: numpy (>=1.26,<2.0)
20
+ Requires-Dist: pandas (>=2.2,<3.0)
21
+ Requires-Dist: resqpy (>=5.1,<6.0)
22
+ Requires-Dist: typing-extensions (>=4.12,<5.0)
22
23
  Description-Content-Type: text/markdown
23
24
 
24
25
  # ResSimpy: Python API for working with Reservoir Simulator models
@@ -0,0 +1,32 @@
1
+ from abc import ABC
2
+ from dataclasses import dataclass
3
+ from typing import Optional
4
+
5
+ from ResSimpy.Enums.UnitsEnum import UnitSystem
6
+
7
+
8
+ @dataclass
9
+ class Ftrans(ABC):
10
+ """Used to represent an abstract base of Ftrans for transmissibility modification by cell.
11
+
12
+ Attributes:
13
+ i1 (int): i coordinate of the first cell
14
+ i2 (int): i coordinate of the second cell
15
+ j1 (int): j coordinate of the first cell
16
+ j2 (int): j coordinate of the second cell
17
+ k1 (int): k coordinate of the first cell
18
+ k2 (int): k coordinate of the second cell
19
+ value (float): The value to be assigned to the range.
20
+ grid (Optional[str]): The grid that the Over function relates to.
21
+ fault_name (Optional[str]): The named fault that the Over function relates to.
22
+ """
23
+ i1: int
24
+ i2: int
25
+ j1: int
26
+ j2: int
27
+ k1: int
28
+ k2: int
29
+ value: float
30
+ unit_system: UnitSystem
31
+ grid: Optional[str] = None
32
+ fault_name: Optional[str] = None
@@ -11,6 +11,7 @@ import numpy as np
11
11
  from ResSimpy.DataModelBaseClasses.GridArrayDefinition import GridArrayDefinition
12
12
  from ResSimpy.DataModelBaseClasses.GridArrayFunction import GridArrayFunction
13
13
  from ResSimpy.DataModelBaseClasses.Over import Over
14
+ from ResSimpy.Enums.UnitsEnum import UnitSystem
14
15
  from ResSimpy.FileOperations.File import File
15
16
  from ResSimpy.GenericContainerClasses.LGRs import LGRs
16
17
 
@@ -169,7 +170,8 @@ class Grid(ABC):
169
170
  return self._lgrs
170
171
 
171
172
  @abstractmethod
172
- def load_structured_grid_file(self, structure_grid_file: File, lazy_loading: bool) -> Grid:
173
+ def load_structured_grid_file(self, structure_grid_file: File,
174
+ model_unit_system: UnitSystem, lazy_loading: bool) -> Grid:
173
175
  """Loads in a structured grid file with all grid properties, and the array functions defined with 'FUNCTION'.
174
176
 
175
177
  Args:
@@ -177,6 +179,7 @@ class Grid(ABC):
177
179
  converting into a structured grid file class.
178
180
  lazy_loading(bool): If set to True, parts of the grid will only be loaded in
179
181
  when requested via properties on the object.
182
+ model_unit_system(UnitSystem): The default unit system used in the model.
180
183
  """
181
184
  raise NotImplementedError("Implement this in the derived class")
182
185
 
@@ -33,3 +33,5 @@ class Over(ABC):
33
33
  threshold: Optional[float] = None
34
34
  grid: Optional[str] = None
35
35
  fault_name: Optional[str] = None
36
+ array_values: Optional[list[float]] = None
37
+ include_file: Optional[str] = None
@@ -275,8 +275,10 @@ class FcsNexusFile(NexusFile):
275
275
  nexus_file.last_modified))
276
276
  elif key in cls.fcs_keyword_map_single():
277
277
  full_file_path = nfo.get_full_file_path(value, origin_path)
278
+ skip_arrays = True if key == 'STRUCTURED_GRID' else False
278
279
  nexus_file = NexusFile.generate_file_include_structure(
279
- file_path=value, origin=fcs_file_path, recursive=recursive, top_level_file=True)
280
+ file_path=value, origin=fcs_file_path, recursive=recursive, top_level_file=True,
281
+ skip_arrays=skip_arrays)
280
282
  setattr(fcs_file, cls.fcs_keyword_map_single()[key], nexus_file)
281
283
  fcs_file.include_objects.append(nexus_file)
282
284
  fcs_file.include_locations.append(full_file_path)
@@ -33,7 +33,7 @@ class NexusWellhead(Wellhead):
33
33
  temperature (float): The temperature of the fluid in the well (TEMP)
34
34
  elevation_profile (str): The well elevation profile. (ELEVPR)
35
35
  temperature_profile (str): The well temperature profile. (TEMPPR)
36
- dp_add (float): The additional pressure drop across the well (DPADD)
36
+ dp_add (float): The additional pressure drop across the well (DPADD)
37
37
  rate_mult (float): The rate multiplier for the well. (RATEMULT)
38
38
  delta_depth (float): The depth difference between the two points in the connection (DDEPTH)
39
39
  heat_transfer_coeff (float): The heat transfer coefficient for the well (HTC)
@@ -223,6 +223,29 @@ class NexusFile(File):
223
223
  inc_full_path = nfo.get_full_file_path(inc_file_path, origin=full_file_path)
224
224
  # store the included files as files inside the object
225
225
  inc_file_list.append(inc_full_path)
226
+
227
+ # test the include to see if the first few lines have only array data
228
+ # limit number of lines loaded here in future?
229
+ if skip_arrays:
230
+ try:
231
+ inc_file_as_list = nfo.load_file_as_list(inc_full_path)
232
+ except FileNotFoundError:
233
+ # handle files not found - this is handled in an exception in the main loop
234
+ pass
235
+ else:
236
+ all_numeric = False
237
+ for inc_file_line in inc_file_as_list[0:50]:
238
+ split_line = nfo.split_line(inc_file_line, upper=False)
239
+ # check if it is numeric data
240
+ # this won't work if the array has scientific notation.
241
+ if any(not x.lstrip('-+').replace('.', '', 1).isnumeric() for x in split_line):
242
+ # don't set skip_next_include if the line is not entirely numeric
243
+ all_numeric = False
244
+ break
245
+ all_numeric = True
246
+ if all_numeric:
247
+ skip_next_include = True
248
+
226
249
  if not recursive:
227
250
  continue
228
251
  elif skip_arrays and skip_next_include:
@@ -181,7 +181,7 @@ class NexusPVTMethod(DynamicProperty):
181
181
  printable_str += '\n'
182
182
  elif isinstance(value, dict):
183
183
  for subkey in value.keys():
184
- printable_str += f"{key.replace('_',' ')} {subkey}\n"
184
+ printable_str += f"{key.replace('_', ' ')} {subkey}\n"
185
185
  df = value[subkey]
186
186
  if isinstance(df, pd.DataFrame):
187
187
  printable_str += df.to_string(na_rep='', index=False,
@@ -86,7 +86,7 @@ class NexusRockMethod(DynamicProperty):
86
86
  printable_str += f'{key}\n'
87
87
  printable_str += value.to_string(na_rep='', index=False) + '\n\n'
88
88
  elif isinstance(value, dict):
89
- printable_str += f"{key.replace('_',' ')}\n"
89
+ printable_str += f"{key.replace('_', ' ')}\n"
90
90
  for subkey in value.keys():
91
91
  printable_str += f"SWINIT {subkey}\n"
92
92
  df = value[subkey]
@@ -0,0 +1,32 @@
1
+ from dataclasses import dataclass
2
+ from typing import Optional
3
+
4
+ from ResSimpy.DataModelBaseClasses.Ftrans import Ftrans
5
+ from ResSimpy.Enums.UnitsEnum import UnitSystem
6
+
7
+
8
+ @dataclass
9
+ class NexusFtrans(Ftrans):
10
+ """Used to represent an abstract base of Ftrans for transmissibility modification by cell.
11
+
12
+ Attributes:
13
+ i1 (int): i coordinate of the first cell
14
+ i2 (int): i coordinate of the second cell
15
+ j1 (int): j coordinate of the first cell
16
+ j2 (int): j coordinate of the second cell
17
+ k1 (int): k coordinate of the first cell
18
+ k2 (int): k coordinate of the second cell
19
+ value (float): The value to be assigned to the range.
20
+ grid (Optional[str]): The grid that the Over function relates to.
21
+ fault_name (Optional[str]): The named fault that the Over function relates to.
22
+ """
23
+ i1: int
24
+ i2: int
25
+ j1: int
26
+ j2: int
27
+ k1: int
28
+ k2: int
29
+ value: float
30
+ unit_system: UnitSystem
31
+ grid: Optional[str] = None
32
+ fault_name: Optional[str] = None
@@ -8,14 +8,17 @@ from dataclasses import dataclass, field
8
8
  from typing import Optional, TYPE_CHECKING, Any, Final
9
9
  import warnings
10
10
 
11
+ from ResSimpy.Enums.UnitsEnum import UnitSystem
11
12
  from ResSimpy.FileOperations.File import File
12
13
  from ResSimpy.DataModelBaseClasses.Grid import Grid
13
14
  from ResSimpy.DataModelBaseClasses.GridArrayDefinition import GridArrayDefinition
14
15
  from ResSimpy.Nexus.DataModels.NexusFile import NexusFile
16
+ from ResSimpy.Nexus.DataModels.StructuredGrid.NexusFtrans import NexusFtrans
15
17
  from ResSimpy.Nexus.DataModels.StructuredGrid.NexusGridArrayFunction import NexusGridArrayFunction
16
18
  from ResSimpy.Nexus.DataModels.StructuredGrid.NexusLGRs import NexusLGRs
17
19
  from ResSimpy.Nexus.DataModels.StructuredGrid.NexusMultir import NexusMultir
18
20
  from ResSimpy.Nexus.DataModels.StructuredGrid.NexusOver import NexusOver
21
+ from ResSimpy.Nexus.DataModels.StructuredGrid.NexusTOver import NexusTOver
19
22
  from ResSimpy.Nexus.NexusKeywords.nexus_keywords import VALID_NEXUS_KEYWORDS
20
23
  from ResSimpy.Nexus.NexusKeywords.structured_grid_keywords import GRID_ARRAY_FORMAT_KEYWORDS
21
24
  from ResSimpy.Nexus.structured_grid_operations import StructuredGridOperations
@@ -122,11 +125,17 @@ class NexusGrid(Grid):
122
125
  __multir: Optional[list[NexusMultir]] = None
123
126
  __lgrs: NexusLGRs
124
127
  __overs: list[NexusOver] = field(default_factory=list)
128
+ __tovers: list[NexusTOver] = field(default_factory=list)
129
+ __ftrans: list[NexusFtrans] = field(default_factory=list)
130
+ __model_unit_system: UnitSystem
125
131
 
126
- def __init__(self, grid_nexus_file: Optional[NexusFile] = None, assume_loaded: bool = False) -> None:
132
+ def __init__(self, model_unit_system: UnitSystem, grid_nexus_file: Optional[NexusFile] = None,
133
+ assume_loaded: bool = False,
134
+ ) -> None:
127
135
  """Initialises the NexusGrid class.
128
136
 
129
137
  Args:
138
+ model_unit_system (UnitSystem): the default unit system to use for the model.
130
139
  grid_nexus_file (Optional[NexusFile]): the NexusFile representation of a structured grid file for \
131
140
  reading and interpreting the grid properties from.
132
141
  assume_loaded (bool): Create the object assuming the grid has already been loaded into memory.
@@ -218,6 +227,9 @@ class NexusGrid(Grid):
218
227
 
219
228
  self.__lgrs: NexusLGRs = NexusLGRs(grid_file_as_list=self.__grid_file_contents, parent_grid=self)
220
229
  self.__overs: list[NexusOver] = []
230
+ self.__tovers: list[NexusTOver] = []
231
+ self.__ftrans: list[NexusFtrans] = []
232
+ self.__model_unit_system: UnitSystem = model_unit_system
221
233
 
222
234
  def __wrap(self, value: Any) -> Any:
223
235
  if isinstance(value, tuple | list | set | frozenset):
@@ -512,6 +524,8 @@ class NexusGrid(Grid):
512
524
 
513
525
  ignore_line = False
514
526
  array_name = 'ROOT'
527
+ property_dict: dict = {}
528
+ unit_system = self.__model_unit_system
515
529
 
516
530
  for idx, (original_line_location, line) in enumerate(file_as_list_with_original_line_numbers):
517
531
 
@@ -531,6 +545,9 @@ class NexusGrid(Grid):
531
545
  if ignore_line:
532
546
  continue
533
547
 
548
+ nfo.check_property_in_line(line, property_dict, file_as_list)
549
+ unit_system = property_dict.get('UNIT_SYSTEM', self.__model_unit_system)
550
+
534
551
  if nfo.check_token('ARRAYS', line):
535
552
  temp_array_name = fo.get_token_value('ARRAYS', line, [line])
536
553
  if temp_array_name is None:
@@ -583,12 +600,17 @@ class NexusGrid(Grid):
583
600
  # load the overs:
584
601
  if fo.value_in_file('OVER', file_as_list):
585
602
  self.__overs = NexusGrid.load_nexus_overs(file_as_list)
603
+ if fo.value_in_file('FTRANS', file_as_list):
604
+ self.__ftrans = NexusGrid.load_nexus_ftrans(file_as_list, unit_system)
605
+ if fo.value_in_file('TOVER', file_as_list):
606
+ self.__tovers = NexusGrid.load_nexus_tovers(file_as_list)
586
607
 
587
608
  self._grid_properties_loaded = True
588
609
 
589
610
  @classmethod
590
611
  def load_structured_grid_file(cls: type[NexusGrid], structured_grid_file: File,
591
- lazy_loading: bool = True) -> NexusGrid:
612
+ model_unit_system: UnitSystem, lazy_loading: bool = True,
613
+ ) -> NexusGrid:
592
614
  """Loads in a structured grid file with all grid properties, and the array functions defined with 'FUNCTION'.
593
615
 
594
616
  Other grid modifiers are currently not supported.
@@ -596,6 +618,7 @@ class NexusGrid(Grid):
596
618
  Args:
597
619
  structured_grid_file (NexusFile): the NexusFile representation of a structured grid file for converting \
598
620
  into a structured grid file class
621
+ model_unit_system (UnitSystem): the default unit system to use for the model
599
622
  lazy_loading (bool): If set to True, parts of the grid will only be loaded in when requested via \
600
623
  properties on the object.
601
624
 
@@ -611,7 +634,7 @@ class NexusGrid(Grid):
611
634
  if not isinstance(structured_grid_file, NexusFile):
612
635
  raise ValueError(f"Cannot load file of type {type(structured_grid_file)}.")
613
636
 
614
- loaded_structured_grid_file = cls(grid_nexus_file=structured_grid_file)
637
+ loaded_structured_grid_file = cls(grid_nexus_file=structured_grid_file, model_unit_system=model_unit_system)
615
638
 
616
639
  if not lazy_loading:
617
640
  loaded_structured_grid_file.load_grid_properties_if_not_loaded()
@@ -1465,16 +1488,27 @@ class NexusGrid(Grid):
1465
1488
  for array in arrays:
1466
1489
  operator_value = split_line[0]
1467
1490
  operator_matches = [x for x in potential_operators if x == operator_value[0]]
1468
- if not operator_matches:
1491
+ if not operator_matches and ('GE' in split_line or 'LE' in split_line):
1469
1492
  # if the operator is not found then it is GE or LE
1470
1493
  value = float(split_line[0])
1471
1494
  operator = split_line[1]
1472
1495
  threshold_value = float(split_line[2])
1473
1496
  split_line_position = 3
1474
- else:
1497
+ elif operator_matches:
1475
1498
  operator = operator_matches[0]
1476
1499
  # remove the operator and the remaining string is the value
1477
- value = float(split_line[0][1:])
1500
+ trimmed_value = split_line[0].replace(operator, '')
1501
+ if trimmed_value == '':
1502
+ # then the value is in the next element of split_line
1503
+ value = float(split_line[1])
1504
+ split_line_position = 2
1505
+ else:
1506
+ value = float(split_line[0][1:])
1507
+ split_line_position = 1
1508
+ else:
1509
+ # no operator match and not GE or LE then it is implicitly '*'
1510
+ value = float(split_line[0])
1511
+ operator = '*'
1478
1512
  split_line_position = 1
1479
1513
  overs_list.append(NexusOver(array=array, grid=grid, fault_name=fname,
1480
1514
  i1=i1, i2=i2, j1=j1, j2=j2, k1=k1, k2=k2, operator=operator,
@@ -1485,7 +1519,7 @@ class NexusGrid(Grid):
1485
1519
  if nfo.check_token('OVER', line):
1486
1520
  reading_over = True
1487
1521
  over_split_line = nfo.split_line(line)
1488
- arrays = over_split_line[over_split_line.index('OVER')+1:]
1522
+ arrays = over_split_line[over_split_line.index('OVER') + 1:]
1489
1523
 
1490
1524
  return overs_list
1491
1525
 
@@ -1495,3 +1529,132 @@ class NexusGrid(Grid):
1495
1529
  if not self._grid_properties_loaded:
1496
1530
  self.load_grid_properties_if_not_loaded()
1497
1531
  return self.__overs
1532
+
1533
+ @property
1534
+ def tovers(self) -> list[NexusTOver]:
1535
+ """Returns the TOVER table as a list of NexusTOver objects."""
1536
+ if not self._grid_properties_loaded:
1537
+ self.load_grid_properties_if_not_loaded()
1538
+ return self.__tovers
1539
+
1540
+ @staticmethod
1541
+ def load_nexus_tovers(file_content_as_list: list[str]) -> list[NexusTOver]:
1542
+ """Loads the Nexus TOVER tables to a list of objects.
1543
+
1544
+ Args:
1545
+ file_content_as_list (list[str]): list of strings representing the file contents.
1546
+
1547
+ Returns:
1548
+ list[NexusOver]: list of NexusTOver objects representing the TOVER table.
1549
+ """
1550
+ ignore_list = ['OVER', 'TX', 'TY', 'TZ', 'GRID', 'ROOT', 'TOVER',
1551
+ 'TX+', 'TX-', 'TZ+', 'TZ-', 'TY+', 'TY-',
1552
+ 'TXF+', 'TXF-', 'TYF+', 'TYF-', 'TZF+', 'TZF-', 'INCLUDE',
1553
+ 'ADD', 'SUB', 'DIV', 'EQ', 'MULT']
1554
+ valid_end_tokens = [x for x in VALID_NEXUS_KEYWORDS if x not in ignore_list]
1555
+ tovers_list: list[NexusTOver] = []
1556
+ reading_tover = False
1557
+ grid = 'ROOT'
1558
+ array = ''
1559
+ potential_operators: Final = ['ADD', 'SUB', 'DIV', 'MULT', 'EQ']
1560
+ i1, i2, j1, j2, k1, k2 = 0, 0, 0, 0, 0, 0
1561
+ operator = ''
1562
+ for i, line in enumerate(file_content_as_list):
1563
+ if nfo.check_token('TOVER', line.upper()):
1564
+ array = nfo.get_expected_token_value(token='TOVER', token_line=line,
1565
+ file_list=file_content_as_list[i:])
1566
+ reading_tover = True
1567
+
1568
+ if not reading_tover:
1569
+ continue
1570
+ if nfo.nexus_token_found(line, valid_end_tokens):
1571
+ # reset reading after another token found
1572
+ reading_tover = False
1573
+ grid = 'ROOT'
1574
+ array = ''
1575
+ operator = ''
1576
+ i1, i2, j1, j2, k1, k2 = 0, 0, 0, 0, 0, 0
1577
+ continue
1578
+
1579
+ if any(nfo.check_token(x, line.upper()) for x in potential_operators):
1580
+ split_line = nfo.split_line(line)
1581
+ i1, i2, j1, j2, k1, k2 = (int(x) for x in split_line[0:6])
1582
+ operator = split_line[-1]
1583
+ continue
1584
+ if nfo.check_token('INCLUDE', line.upper()):
1585
+ include_file = nfo.get_expected_token_value(token='INCLUDE', token_line=line,
1586
+ file_list=file_content_as_list[i:])
1587
+ new_tover = NexusTOver(i1=i1, i2=i2, j1=j1, j2=j2, k1=k1, k2=k2,
1588
+ include_file=include_file, array=array, grid=grid, operator=operator,
1589
+ value=0)
1590
+ tovers_list.append(new_tover)
1591
+ i1, i2, j1, j2, k1, k2 = 0, 0, 0, 0, 0, 0
1592
+ operator = ''
1593
+
1594
+ elif i1 and i2 and j1 and j2 and k1 and k2 and operator and nfo.get_next_value(0, [line]):
1595
+ # not an include file, so it must be a value or array of values
1596
+ number_of_values = (i2 - i1 + 1) * (j2 - j1 + 1) * (k2 - k1 + 1)
1597
+ array_values = fo.get_multiple_expected_sequential_values(file_content_as_list[i:],
1598
+ number_tokens=number_of_values,
1599
+ ignore_values=[])
1600
+ new_tover = NexusTOver(i1=i1, i2=i2, j1=j1, j2=j2, k1=k1, k2=k2,
1601
+ include_file=None, array=array, grid=grid, operator=operator,
1602
+ value=0, array_values=[float(x) for x in array_values])
1603
+ i1, i2, j1, j2, k1, k2 = 0, 0, 0, 0, 0, 0
1604
+ operator = ''
1605
+ tovers_list.append(new_tover)
1606
+
1607
+ return tovers_list
1608
+
1609
+ @staticmethod
1610
+ def load_nexus_ftrans(file_content_as_list: list[str], unit_system: UnitSystem) -> list[NexusFtrans]:
1611
+ """Function to read in FTRANS tables from a file.
1612
+
1613
+ Args:
1614
+ file_content_as_list (list[str]): list of strings representing the file contents.
1615
+ unit_system (UnitSystem): the unit system used in the grid file.
1616
+
1617
+ Returns:
1618
+ list[NexusFtrans]: list of NexusFtrans objects representing the FTRANS table.
1619
+ """
1620
+ ignore_list = ['FTRANS', 'GRID', 'FNAME', 'ROOT']
1621
+ valid_end_tokens = [x for x in VALID_NEXUS_KEYWORDS if x not in ignore_list]
1622
+ ftrans_list: list[NexusFtrans] = []
1623
+ reading = False
1624
+ grid = 'ROOT'
1625
+ fname = None
1626
+ for line in file_content_as_list:
1627
+ if nfo.nexus_token_found(line, valid_end_tokens):
1628
+ reading = False
1629
+ grid = 'ROOT'
1630
+ fname = None
1631
+ continue
1632
+
1633
+ if reading:
1634
+ split_line = nfo.split_line(line)
1635
+ if nfo.check_token('GRID', line):
1636
+ grid = nfo.get_expected_token_value('GRID', line, file_content_as_list)
1637
+ if nfo.check_token('FNAME', line):
1638
+ fname = nfo.get_expected_token_value('FNAME', line, file_content_as_list)
1639
+ if len(split_line) == 7:
1640
+ i1, j1, k1, i2, j2, k2 = (int(x) for x in split_line[0:6])
1641
+ value = float(split_line[-1])
1642
+ # cut out the ranges
1643
+ ftrans_list.append(NexusFtrans(grid=grid, fault_name=fname,
1644
+ i1=i1, i2=i2, j1=j1, j2=j2, k1=k1, k2=k2,
1645
+ value=value, unit_system=unit_system))
1646
+
1647
+ if nfo.check_token('FTRANS', line):
1648
+ # reset the default values if another FTRANS call is found
1649
+ grid = 'ROOT'
1650
+ fname = None
1651
+ reading = True
1652
+
1653
+ return ftrans_list
1654
+
1655
+ @property
1656
+ def ftrans(self) -> list[NexusFtrans]:
1657
+ """Returns the OVER table as a list of NexusOver objects."""
1658
+ if not self._grid_properties_loaded:
1659
+ self.load_grid_properties_if_not_loaded()
1660
+ return self.__ftrans
@@ -0,0 +1,33 @@
1
+ from dataclasses import dataclass
2
+ from typing import Optional
3
+
4
+ from ResSimpy.DataModelBaseClasses.Over import Over
5
+
6
+
7
+ @dataclass(kw_only=True)
8
+ class NexusTOver(Over):
9
+ """Used to represent an Override for transmissibility arrays using values per cell.
10
+
11
+ Attributes:
12
+ array (str): The array to be modified by the over.
13
+ i1 (int): The start of the i range.
14
+ i2 (int): The end of the i range.
15
+ j1 (int): The start of the j range.
16
+ j2 (int): The end of the j range.
17
+ k1 (int): The start of the k range.
18
+ k2 (int): The end of the k range.
19
+ operator (str): The operator to be assigned to the range.
20
+ grid (Optional[str]): The grid that the Over function relates to.
21
+ include_file (str): The include file that the TOver function reads values from.
22
+ """
23
+ array: str
24
+ i1: int
25
+ i2: int
26
+ j1: int
27
+ j2: int
28
+ k1: int
29
+ k2: int
30
+ operator: str
31
+ include_file: Optional[str]
32
+ grid: Optional[str] = None
33
+ array_values: Optional[list[float]] = None
@@ -629,7 +629,8 @@ class NexusSimulator(Simulator):
629
629
 
630
630
  if self.model_files.structured_grid_file is not None:
631
631
  self._grid = NexusGrid.load_structured_grid_file(self.model_files.structured_grid_file,
632
- lazy_loading=self.__lazy_loading)
632
+ lazy_loading=self.__lazy_loading,
633
+ model_unit_system=self.default_units)
633
634
 
634
635
  # Load in wellspec files
635
636
  if self.model_files.well_files is not None and \
@@ -147,7 +147,9 @@ def load_wells(nexus_file: NexusFile, start_date: str, default_units: UnitSystem
147
147
 
148
148
  trimmed_line = line.strip()
149
149
 
150
- # Exclude block comments
150
+ if trimmed_line.startswith('!'):
151
+ continue
152
+
151
153
  if len(trimmed_line) > 0 and trimmed_line[0] == '[':
152
154
  exclude_section = True
153
155
 
@@ -252,6 +254,7 @@ def load_wells(nexus_file: NexusFile, start_date: str, default_units: UnitSystem
252
254
  well_name_list.append(well_name.upper())
253
255
  wells.append(new_well)
254
256
  wellspec_found = False
257
+ header_index = -1
255
258
  return wells, date_format
256
259
 
257
260