porereax.regions

Module for defining regions in the simulation box.

Attributes

Functions

get_region_function(...)

Retrieve the region function based on the provided region identifier.

box_region(→ numpy.typing.NDArray[numpy.bool_])

Region function that includes all coordinates within the simulation box.

reservoir_region(→ numpy.typing.NDArray[numpy.bool_])

Region function that defines a reservoir region outside the pore.

pore_region(→ numpy.typing.NDArray[numpy.bool_])

Region function that defines a pore region inside the pore.

wall_region(→ numpy.typing.NDArray[numpy.bool_])

Region function that defines a wall region around the pore.

Module Contents

porereax.regions.entry = 3
porereax.regions.get_region_function(region: str, box: numpy.typing.NDArray[numpy.float64], system_properties: dict | None = None) collections.abc.Callable[[numpy.typing.NDArray[numpy.float64]], numpy.typing.NDArray[numpy.bool_]][source]

Retrieve the region function based on the provided region identifier.

Parameters:
  • region (str) – The region identifier defining the region.

  • box (np.ndarray) – Simulation box dimensions.

  • system_properties (dict or None) – System properties for defining regions, if applicable.

Returns:

A function that takes coordinates and returns a boolean mask.

Return type:

callable

porereax.regions.box_region(coords: numpy.typing.NDArray[numpy.float64]) numpy.typing.NDArray[numpy.bool_][source]

Region function that includes all coordinates within the simulation box.

Parameters:

coords (np.ndarray) – Array of coordinates to check.

Returns:

Boolean mask indicating which coordinates are inside the box.

Return type:

np.ndarray

porereax.regions.reservoir_region(coords: numpy.typing.NDArray[numpy.float64], system_properties: dict) numpy.typing.NDArray[numpy.bool_][source]

Region function that defines a reservoir region outside the pore.

Parameters:
  • coords (np.ndarray) – Array of coordinates to check.

  • system_properties (dict) – System properties containing pore range, center, and radius.

Returns:

Boolean mask indicating which coordinates are within the reservoir region.

Return type:

np.ndarray

porereax.regions.pore_region(coords: numpy.typing.NDArray[numpy.float64], system_properties: dict) numpy.typing.NDArray[numpy.bool_][source]

Region function that defines a pore region inside the pore.

Parameters:
  • coords (np.ndarray) – Array of coordinates to check.

  • system_properties (dict) – System properties containing pore range, center, and radius.

Returns:

Boolean mask indicating which coordinates are within the pore region.

Return type:

np.ndarray

porereax.regions.wall_region(coords: numpy.typing.NDArray[numpy.float64], system_properties: dict, layer_thickness: float) numpy.typing.NDArray[numpy.bool_][source]

Region function that defines a wall region around the pore.

Parameters:
  • coords (np.ndarray) – Array of coordinates to check.

  • system_properties (dict) – System properties containing pore range, center, and radius.

  • layer_thickness (float) – Thickness of the wall layer.

Returns:

Boolean mask indicating which coordinates are within the wall region.

Return type:

np.ndarray