CADETProcess.modelBuilder.CompartmentBuilder#
- class CADETProcess.modelBuilder.CompartmentBuilder(name, n_compartments)[source]#
Bases:
StructureClass to build complex compartment models of bioreactors.
- Attributes:
- namestr
Name of the CompartmentBuilder.
- n_compartmentsint
Number of compartments in the bioreactor.
- 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.
- property binding_model#
BindingBaseClass: binding model parameters of the unit operation.
- Raises:
- TypeError
If binding_model object is not an instance of BindingBaseClass.
- CADETProcessError
If number of components do not match.
- property bulk_reaction_model#
BulkReactionBase: Reaction in bulk phase.
- Raises:
- TypeError
If bulk_reaction_model is not an instance of ReactionBaseClass.
- CADETProcessError
If unit does not support bulk reaction model. If number of components do not match.
- property init_c: int | float | list | ndarray#
np.array: Initial conditions of compartments.
- Parameters:
- init_cint, float, list, or np.array
Initial concentration of compartments. If type is float or int, same value is used for all components and concentrations. If type is list, same component concentrations are used for all compartments. If np.array, explicit concentrations for components and compartments are set.
- Raises:
- ValueError
If init_c does not contain correct shape.
- n_compartments#
Parameter descriptor for unsigned integer parameters.
- name#
Parameter descriptor constrained to string values.
- property particle_reaction_model#
ParticleReactionBase: Reaction in particle liquid phase.
- Raises:
- TypeError
If particle_reaction_model is not an instance of ReactionBaseClass.
- CADETProcessError
If unit does not support particle reaction model. If number of components do not match.