FaceCenteredCubic#
- class FaceCenteredCubic(*args, **kwargs)[source]#
Face-Centered Cubic lattice which is a simple cubic lattice with additional pores located on each face of the cubic unit cells. These pores are connected to each other and their diagonal neighbors.
- Parameters:
shape (array_like) – The number of pores forming the corners of the unit cell in each direction
spacing (array_like (optional)) – The spacing between pores that form the corners of the unit cells
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
settings
attribute of the object.name (str, optional) – A unique name to assign to the object for easier identification. If not given one will be generated.
See also
Notes
The pores are labelled as beloning to ‘corner_sites’ and ‘face_sites’ Throats are labelled by the which type of pores they connect, e.g. ‘throat.corner_to_body’.
- Attributes:
Np
Shortcut to retrieve the number of pores in the domain
Nt
Shortcut to retrieve the number of throats in the domain
Ps
Shortcut to retrieve the indices of all pores
Ts
Shortcut to retrieve the indices of all throats
am
Adjacency matrix in the specified sparse format, with throat IDs indicating the non-zero values.
conns
Returns the connectivity matrix of the network.
coords
Returns the list of pore coordinates of the network.
im
Incidence matrix in the specified sparse format, with pore IDs indicating the non-zero values.
- info
- name
network
Shortcut to retrieve a handle to the network object associated with the
params
This attribute stores ‘scalar’ data that can be used by pore-scale models.
- project
- settings
Methods
add_boundary_pores
(labels, spacing)Add boundary pores to the specified faces of the network
add_model
(propname, model[, domain, regen_mode])Add a pore-scale model to the object, along with the desired arguments
add_model_collection
(models[, domain, ...])Add a
collection
of several models at oncecreate_adjacency_matrix
([weights, fmt, ...])Generates a weighted adjacency matrix in the desired sparse format
create_incidence_matrix
([weights, fmt, ...])Creates a weighted incidence matrix in the desired sparse format
filter_by_label
([pores, throats, labels, mode])Returns which of the supplied pores (or throats) has the specified label(s)
find_connected_pores
([throats, flatten, mode])Return a list of pores connected to the given list of throats
find_connecting_throat
(P1, P2)Return the throat index connecting pairs of pores.
find_nearby_pores
(pores, r[, flatten, ...])Find all pores within a given radial distance of the input pore(s) regardless of whether or not they are toplogically connected.
find_neighbor_pores
(pores[, mode, flatten, ...])Returns a list of pores that are direct neighbors to the given pore(s)
find_neighbor_throats
(pores[, mode, ...])Returns a list of throats neighboring the given pore(s)
get_adjacency_matrix
([fmt])Adjacency matrix in the specified sparse format, with throat IDs indicating the non-zero values.
get_conduit_data
(propname)Fetches an Nt-by-3 array of the requested property
get_incidence_matrix
([fmt])Incidence matrix in the specified sparse format, with pore IDs indicating the non-zero values.
interpolate_data
(propname[, mode])Generates an array of the requested pore/throat data by interpolating the neighboring throat/pore data.
labels
([pores, throats, element, mode])Returns a list of labels present on the object
num_neighbors
(pores[, mode, flatten])Returns the number of neigbhoring pores for each given input pore
num_pores
([labels, mode])Returns the number of pores of the specified labels
num_throats
([labels, mode])Return the number of throats of the specified labels
pores
([labels, mode, asmask])Returns pore indicies where given labels exist, according to the logic specified by the
mode
argument.props
([element])Retrieves a list of keys that contain numerical data (i.e. "properties").
regenerate_models
([propnames, exclude])Runs all the models stored in the object's
models
attributerun_model
(propname[, domain])Runs the requested model and places the result into the correct locations
set_label
(label[, pores, throats, mode])Creates or updates a label array
throats
([labels, mode, asmask])Returns throat locations where given labels exist, according to the logic specified by the
mode
argument.to_indices
(mask)Converts a boolean mask to pore or throat indices
to_mask
([pores, throats])Generates a boolean mask with True values in the given locations