porereax.regions
Module for defining regions in the simulation box.
Functions
box_region(coords)
|
Region function that includes all coordinates within the simulation box. |
get_region_function(region, box[, ...])
|
Retrieve the region function based on the provided region identifier. |
pore_region(coords, system_properties)
|
Region function that defines a pore region inside the pore. |
reservoir_region(coords, system_properties)
|
Region function that defines a reservoir region outside the pore. |
wall_region(coords, system_properties, ...)
|
Region function that defines a wall region around the pore. |
-
type porereax.regions.Region = str | Callable[[NDArray[float64]], NDArray[bool]]
-
porereax.regions.get_region_function(region, box, system_properties=None)[source]
Retrieve the region function based on the provided region identifier.
- Parameters:
region (str) – The region identifier defining the region.
box (NDArray[double]) – Simulation box dimensions.
system_properties (dict | None) – System properties for defining regions, if applicable.
- Returns:
A function that takes coordinates and returns a boolean mask.
- Return type:
Callable[[NDArray[double]], NDArray[bool]]
-
porereax.regions.box_region(coords)[source]
Region function that includes all coordinates within the simulation box.
- Parameters:
coords (NDArray[double]) – Array of coordinates to check.
- Returns:
Boolean mask indicating which coordinates are inside the box.
- Return type:
NDArray[bool]
-
porereax.regions.reservoir_region(coords, system_properties)[source]
Region function that defines a reservoir region outside the pore.
- Parameters:
coords (NDArray[double]) – 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:
NDArray[bool]
-
porereax.regions.pore_region(coords, system_properties)[source]
Region function that defines a pore region inside the pore.
- Parameters:
coords (NDArray[double]) – 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:
NDArray[bool]
-
porereax.regions.wall_region(coords, system_properties, layer_thickness)[source]
Region function that defines a wall region around the pore.
- Parameters:
coords (NDArray[double]) – 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:
NDArray[bool]