bio_rtd.utils.convolution¶
Helper functions for performing convolution on time axis.
time_conv¶
-
bio_rtd.utils.convolution.
time_conv
(dt, c_in, rtd, c_equilibration=None, logger=None)[source]¶ Perform convolution on time axis.
First time-point of c_in and c_rtd is at t == 0 (and not dt).
Convolution is applied to all species of c_in.
- Parameters
dt (
float
) – Time step.c_in (
ndarray
) –Starting concentration profile for each specie.
c_in.shape == [n_species, n_time_steps]
rtd (
ndarray
) – Residence time distribution (= unit impulse response).c_equilibration (
Optional
[ndarray
]) –Initial concentrations inside the unit operation.
E.g.: Composition of equilibration buffer for flow-through chromatography.
logger (
Optional
[RtdLogger
]) – Logger for messaging events.
- Returns
c_out – Final concentration profile for each specie.
c_out.shape == c_in.shape
- Return type
ndarray
piece_wise_time_conv¶
-
bio_rtd.utils.convolution.
piece_wise_time_conv
(dt, f_in, c_in, t_cycle, rt_mean, rtd, c_equilibration=None, c_wash=None, logger=None)[source]¶ Perform convolution on time axis with periodic switching.
First time-point of c_in and c_rtd is at t == 0 (and not dt).
Convolution is applied to all species of c_in.
- Parameters
dt (
float
) – Time step.f_in (
ndarray
) – Flow rate profile. It has to be either constant or box-shaped.c_in (
ndarray
) –Starting concentration profile for each specie.
c_in.shape == [n_species, n_time_steps]
t_cycle (
float
) – Switch cycle duration.rt_mean (
float
) – Delay between inlet and outlet switch times.rtd (
ndarray
) – Residence time distribution (= unit impulse response).c_equilibration (
Optional
[ndarray
]) – Composition of equilibration buffer.c_wash (
Optional
[ndarray
]) – Composition of wash buffer.logger (
Optional
[RtdLogger
]) – Logger for messaging events.
- Returns
c_out – Final concentration profile for each specie.
c_out.shape == c_in.shape
- Return type
ndarray