ResSimpy.Nexus.NexusNetwork.NexusNetwork

class ResSimpy.Nexus.NexusNetwork.NexusNetwork(model: 'NexusSimulator')[source]

Bases: Network

Public Data Attributes:

model

nodes

connections

well_connections

wellheads

wellbores

constraints

targets

Inherited from Network

nodes

connections

constraints

targets

Methods:

__init__(model)

get_load_status()

Checks load status and loads the network if it hasn't already been loaded.

get_network_file([method_number])

Gets a specific network file object from the method number.

load()

Loads all the objects from the surface files in the Simulator class.

get_unique_names_in_network()

Extracts all names from a network including all the nodes, wells and connections.

find_network_element_with_dict(name, ...)

Finds a uniquely matching constraint from a given set of properties in a dictionary of attributes.

__repr__()

Return repr(self).

__eq__(other)

Return self==value.

Inherited from Network

load()

__repr__()

Return repr(self).

__eq__(other)

Return self==value.


__init__(model: NexusSimulator) None[source]
get_load_status() bool[source]

Checks load status and loads the network if it hasn’t already been loaded.

get_network_file(method_number: int = 1) NexusFile[source]

Gets a specific network file object from the method number.

Args:

method_number (int): Method number for selection of a specific surface file.

If None then returns a dictionary of method, surface file object

Returns:

NexusFile: returns a specific surface file object of surface files keyed by method number

load() None[source]

Loads all the objects from the surface files in the Simulator class. Table headers with None next to their name are currently skipped awaiting development.

get_unique_names_in_network() list[str][source]

Extracts all names from a network including all the nodes, wells and connections.

Returns:

list[str] – list of all the unique names from the network including nodes, wells and connections

find_network_element_with_dict(name: str, search_dict: dict[str, None | float | str | int], network_element_type: Literal['nodes', 'connections', 'well_connections', 'wellheads', 'wellbores', 'constraints', 'targets']) Any[source]

Finds a uniquely matching constraint from a given set of properties in a dictionary of attributes.

Parameters:
  • name (str) – name of the node/connection to find

  • search_dict (dict[str, float | str | int]) – dictionary of attributes to match on. Allows for partial matches if it finds a unique object.

  • network_element_type (Literal[str]) – one of nodes, connections, well_connections, wellheads, wellbores, constraints

Returns:

NexusConstraint of an existing constraint in the model that uniquely matches the provided constraint_dict constraint