CADETProcess.modelBuilder.CompartmentBuilder.add_tracer#
- CompartmentBuilder.add_tracer(compartment_index, c, t_inj, flow_rate, t_start=0, flow_rate_filter=True)[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.