CADETProcess.modelBuilder.CarouselBuilder#
- class CADETProcess.modelBuilder.CarouselBuilder(switch_time)[source]#
Bases:
StructureConfigurator for multi-column processes.
- Attributes:
- component_systemAny
The system of components for which the carousel is configured.
- namestr
Name of the carousel system.
- switch_timefloat
Column switch time.
- valve_parametersdict
Additional parameters to setup mixer/splitter valves.
- add_connection(origin: UnitBaseClass, destination: UnitBaseClass, origin_port: str | None = None, destination_port: str | None = None) None#
Add connection between units ‘origin’ and ‘destination’.
- Parameters:
- originUnitBaseClass
UnitBaseClass from which the connection originates.
- destinationUnitBaseClass
UnitBaseClass where the connection terminates.
- origin_portstr, optional
Port from which connection originates.
- destination_portstr, optional
Port where connection terminates.
- Raises:
- CADETProcessError
If origin OR destination do not exist in the current flow sheet. If connection already exists in the current flow sheet.
See also
connectionsremove_connectionoutput_state
- add_unit(unit: UnitBaseClass, feed_inlet: bool = False, eluent_inlet: bool = False, product_outlet: bool = False) None#
Add unit to the flow sheet.
- Parameters:
- unitUnitBaseClass
UnitBaseClass object to be added to the flow sheet.
- feed_inletbool
If True, add unit to feed inlets.
- eluent_inletbool
If True, add unit to eluent inlets.
- product_outletbool
If True, add unit to product outlets.
- Raises:
- TypeError
If unit is no instance of UnitBaseClass.
- CADETProcessError
If unit already exists in flow sheet. If n_comp does not match with FlowSheet.
See also
remove_unit
- build_flow_sheet(own_binding_model: bool = False) FlowSheet[source]#
Assemble the flow sheet.
- Parameters:
- own_binding_modelbool, optional
If True, each column gets its own deep-copied binding model. If False (default), all columns share the same binding model instance.
- Returns:
- FlowSheet
The assembled flow sheet.
- build_process(own_binding_model: bool = False) Process[source]#
Assemble the process object.
- Parameters:
- own_binding_modelbool, optional
If True, each column gets its own deep-copied binding model. If False (default), all columns share the same binding model instance.
- Returns:
- Process
The assembled process object.
- carousel_state(t: float) int[source]#
Return carousel state at given time.
- Parameters:
- t: float
Time
- Returns:
- int:
Carousel state at given time.
- property column: TubularReactorBase#
TubularReactorBase: The column template for all zones.
- column_indices_at_state(carousel_positions: ndarray[tuple[Any, ...], dtype[int]], carousel_state: int) ndarray[int][source]#
Determine index of column unit at given carousel position and state.
- Parameters:
- carousel_positions: np.typing.NDArray[np.int_]
Carousel position indices (e.g. wash position, elute position).
- carousel_stateint
Curent state of the carousel system.
- Returns:
- np.ndarray[int]
Indices of column units at given carousel positions and state.
- column_indices_at_time(t: float, carousel_positions: ndarray[tuple[Any, ...], dtype[int]]) int[source]#
Determine index of column unit at given carousel position and time.
- Parameters:
- t: float
Time
- carousel_positionint
Carousel position.
- Returns:
- np.ndarray[int]
Indices of column units at given carousel positions and time.
- set_output_state(unit: UnitBaseClass, state: int | list[float] | dict, port: str | None = None) None#
Set split ratio of outgoing streams for UnitOperation.
- Parameters:
- unitUnitBaseClass
UnitOperation of flowsheet.
- stateint or list of floats or dict
new output state of the unit.
- portstr
Port for which to set the output state.
- Raises:
- CADETProcessError
If unit not in FlowSheet If state is integer and the state >= the state_length. If the length of the states is unequal the state_length. If the sum of the states is not equal to 1. If port cannot be found in the unit operation.
- switch_time#
Parameter descriptor for unsigned floating-point parameters.