mtnlion.deprecated_domain module¶
Domain creation/manipulation.
-
class
mtnlion.deprecated_domain.
ReferenceCell
(mesh: numpy.ndarray, time_mesh: numpy.ndarray, boundaries: Union[numpy.ndarray, List[float]], **kwargs)[source]¶ Bases:
mtnlion.deprecated_engine.Mountain
Reference lithium-ion cell geometry, where the dimensions are normalized.
The x dimension is defined such that the negative electrode exists between [0, 1], the separator exists between [1, 2], and the positive electrode exists between [2, 3]. For convenience the subdomains are added onto engine.Mountain.
-
mtnlion.deprecated_domain.
subdomain
(comparison: numpy.ndarray) → slice[source]¶ Find the indices of the requested subdomain, correcting for internal boundaries.
I.e. if the mesh is defined by
numpy.arange(0, 3, 0.1)
and you wish to find the subdomain0 <= x <= 1
then you would call:subdomain(mesh, x < 1)
Subdomain returns
x <= 1
, the reason for the exclusive less-than is to work around having repeated internal domain problems. I.e. ifx <= 1
had been used on a mesh with repeated boundaries at 1, then the subdomain would exist over both boundaries at 1.- Parameters
comparison – list of boolean values
- Returns
indices of subdomain
-
mtnlion.deprecated_domain.
subdomains
(mesh: numpy.ndarray, regions: List[Tuple[float, float]])[source]¶ Find indices of given subdomains.
For example separating a domain from [0, 3] into [0, 1], [1, 2], and [2, 3] would be:
subdomains(np.arange(0, 3, 0.1), [(0, 1), (1, 2), (2, 3)])
- Parameters
mesh – one-dimensional list of domain values
regions – two dimensional list containing multiple ranges for subdomains
- Returns
tuple of each subdomain indices