- class openpnm.core.Base(*args, **kwargs)¶
Contains methods for working with the data in the OpenPNM dict objects
network (OpenPNM network object) – The network to which this object is associated
settings (dataclass-like or dict, optional) – User defined settings for the object to override defaults. Can be a dataclass-type object with settings stored as attributes or a python dicionary of key-value pairs. Settings are stored in the
settingsattribute of the object.
name (string, optional) – A unique name to assign to the object for easier identification. If not given one will be generated.
Np (int, default is 0) – The total number of pores to be assigned to the object
Nt (int, default is 0) – The total number of throats to be assigned to the object
Baseclass is used as the template for all other OpenPNM objects, including Networks, Geometries, Phases, Physics, and Algorithms. This class is a subclass of the standard
dictso has the usual methods such as
keys, and has extra methods for working specifically with OpenPNM data.
A shortcut to query the total number of pores on the object
A shortcut to query the total number of throats on the object
A shortcut to get a list of all pores on the object
A shortcut to get a list of all throats on the object
String representing the name of the object
A shortcut to get a handle to the associated network.
A shortcut to get a handle to the associated project.
Dictionary containing object settings.
get_conduit_data(poreprop[, throatprop, mode])
Combines requested data into a single 3-column array.
Retrieves requested property from associated objects, to produce a full Np or Nt length array.
Determines a pore (or throat) property as the average of it's neighboring throats (or pores)
props([element, mode, deep])
Returns a list containing the names of all defined pore or throat properties.
show_hist([props, bins, fontsize])
Shows a quick plot of key property distributions.
Converts a boolean mask to a list of pore or throat indices.
Convert a list of pore or throat indices into a boolean mask of the correct length.