CADETProcess.modelBuilder.CompartmentBuilder.add_tracer

CADETProcess.modelBuilder.CompartmentBuilder.add_tracer#

CompartmentBuilder.add_tracer(compartment_index: int, c: list, t_inj: float, flow_rate: float | None, t_start: float | None = 0, flow_rate_filter: bool | None = True) None[source]#

Add tracer injection to compartment model.

For this purpose, a new inlet source is instantiated and connected to the corresponding compartment. Then, an Event is added which modifies the flow rate of the inlet.

Parameters:
compartment_indexint

Compartment to which tracer is injected.

clist

Tracer concentration.

t_injfloat

Length of injection.

flow_ratefloat

flow rate during injection.

t_startfloat, optional

Time at which injection starts. The default is 0.

flow_rate_filterbool, optional

If True, the compartment volume is kept constant by adding a flow rate filter. The default is True.

Raises:
CADETProcessError

If compartment is not a real compartment.