Transport#
- class Transport(*args, **kwargs)[source]#
This class implements steady-state linear transport calculations.
- Parameters:
network (dict) – An OpenPNM Network object, which is a subclass of a dict
- Attributes:
A
The coefficient matrix, A (in Ax = b)
- Np
- Nt
- Ps
- Ts
b
The right-hand-side (RHS) vector, b (in Ax = b)
iterative_props
Finds and returns properties that need to be iterated while running the algorithm.
- name
- network
- params
- project
- settings
x
Shortcut to the solution currently stored on the algorithm.
Methods
clear_BCs
([bctype])Clear all BCs of the given type(s)
Clears all rate BCs
Clears all value BCs.
filter_by_label
([pores, throats, labels, mode])Returns which of the supplied pores (or throats) has the specified label(s)
get_conduit_data
(propname)Fetches an Nt-by-3 array of the requested property
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_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.
rate
([pores, throats, mode])Calculates the net rate of material moving into a given set of pores or throats
run
([solver, x0, verbose])Builds the A and b matrices, and calls the solver specified in the
settings
attribute.set_BC
([pores, bctype, bcvalues, mode])The main method for setting and adjusting boundary conditions.
set_label
(label[, pores, throats, mode])Creates or updates a label array
set_rate_BC
([pores, rates, mode])Apply constant rate boundary conditons to the specified locations.
set_value_BC
([pores, values, mode])Applies constant value boundary conditons to the specified pores.
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