dcmri.flux_plug#
- dcmri.flux_plug(J, T, t=None, dt=1.0, solver='interp')[source]#
Indicator flux out of a plug flow system.
See section Plug flow for more detail.
- Parameters:
J (array_like) – the indicator flux entering the system.
T (float) – mean transit time of the system. Any non-negative value is allowed, including \(T=0\) and \(T=\infty\), in which case the system is a trap.
t (array_like, optional) – the time points of the indicator flux J, in the same units as T. If t=None, the time points are assumed to be uniformly spaced with spacing dt. Defaults to None.
dt (float, optional) – spacing between time points for uniformly spaced time points, in the same units as T. This parameter is ignored if t is explicity provided. Defaults to 1.0.
solver (str, optional) – solver for the system, either ‘conv’ for explicit convolution with a discrete impulse response (slow) or ‘interp’ for interpolation (fast). Defaults to ‘interp’.
- Returns:
outflux as a 1D array.
- Return type:
Example
>>> import dcmri as dc >>> t = [0,5,15,30,60] >>> J = [1,2,3,3,2] >>> dc.flux_plug(J, 5, t) array([0. , 0.44444444, 23.0555556, 3. , 2.22222222])