Separator¶
The IDAES Separator unit model represents operations where a single stream is split into multiple flows. The Separator model supports separation using split fractions, or by ideal separation of flows. The Separator class can be used to create either a stand-alone separator unit, or as part of a unit model where a flow needs to be separated.
Degrees of Freedom¶
Separator units have a number of degrees of freedom based on the separation type chosen.
- If split_basis = ‘phaseFlow’, degrees of freedom are generally \((no. outlets-1) \times no. phases\)
- If split_basis = ‘componentFlow’, degrees of freedom are generally \((no. outlets-1) \times no. components\)
- If split_basis = ‘phaseComponentFlow’, degrees of freedom are generally \((no. outlets-1) \times no. phases \times no. components\)
- If split_basis = ‘totalFlow’, degrees of freedom are generally \((no. outlets-1) \times no. phases \times no. components\)
Typical fixed variables are:
- split fractions.
Model Structure¶
The IDAES Separator unit model does not use ControlVolumes, and instead writes a set of material, energy and momentum balances to split the inlet stream into a number of outlet streams. Separator models have a single inlet Port (named inlet) and a user-defined number of outlet Ports (by default named outlet_1, outlet_2, etc.).
Mixed State Block
If a mixed state block is provided in the construction arguments, the Mixer model will use this as the StateBlock for the mixed stream in the resulting balance equations. This allows a Mixer unit to be used as part of a larger unit operation by linking to an existing StateBlock.
Ideal Separation¶
The IDAES Separator model supports ideal separations, where all of a given subset of the mixed stream is sent to a single outlet (i.e. split fractions are equal to zero or one). In these cases, no Constraints are necessary for performing the separation, as the mixed stream states can be directly partitioned to the outlets.
Ideal separations will not work for all choices of state variables, and thus will not work for all property packages. To use ideal separations, the user must provide a map of what part of the mixed flow should be partitioned to each outlet. The ideal_split_map should be a dict-like object with keys as tuples matching the split_basis argument and values indicating which outlet this subset should be partitioned to.
Variables¶
Separator units have the following variables (\(o\) indicates index by outlet):
Variable Name | Symbol | Notes |
---|---|---|
split_fraction | \(\phi_{t, o, *}\) | Indexing sets depend upon split_basis |
Constraints¶
Separator units have the following Constraints, unless ideal_separation is True.
- If material_balance_type is componentPhase:
material_splitting_eqn(t, o, p, j):
- If material_balance_type is componentTotal:
material_splitting_eqn(t, o, j):
- If material_balance_type is total:
material_splitting_eqn(t, o):
If energy_split_basis is equal_temperature:
temperature_equality_eqn(t, o):
If energy_split_basis is equal_molar_enthalpy:
molar_enthalpy_equality_eqn(t, o):
If energy_split_basis is enthalpy_split:
molar_enthalpy_splitting_eqn(t, o):
pressure_equality_eqn(t, o):
Separator Class¶
-
class
idaes.unit_models.separator.
Separator
(*args, **kwargs)¶ Parameters: - rule (function) – A rule function or None. Default rule calls build().
- concrete (bool) – If True, make this a toplevel model. Default - False.
- ctype (str) – Pyomo ctype of the block. Default - “Block”
- default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
- Indicates whether this model will be dynamic or not, default = False. Product blocks are always steady- state.
- has_holdup
- Product blocks do not contain holdup, thus this must be False.
- property_package
- Property parameter object used to define property calculations, default - useDefault. Valid values: { useDefault - use default package from parent model or flowsheet, PropertyParameterObject - a PropertyParameterBlock object.}
- property_package_args
- A ConfigBlock with arguments to be passed to a property block(s) and used when constructing these, default - None. Valid values: { see property package for documentation.}
- outlet_list
- A list containing names of outlets, default - None. Valid values: { None - use num_outlets argument, list - a list of names to use for outlets.}
- num_outlets
- Argument indicating number (int) of outlets to construct, not used if outlet_list arg is provided, default - None. Valid values: { None - use outlet_list arg instead, or default to 2 if neither argument provided, int - number of outlets to create (will be named with sequential integers from 1 to num_outlets).}
- split_basis
- Argument indicating basis to use for splitting mixed stream, default - SplittingType.totalFlow. Valid values: { SplittingType.totalFlow - split based on total flow (split fraction indexed only by time and outlet), SplittingType.phaseFlow - split based on phase flows (split fraction indexed by time, outlet and phase), SplittingType.componentFlow - split based on component flows (split fraction indexed by time, outlet and components), SplittingType.phaseComponentFlow - split based on phase-component flows ( split fraction indexed by both time, outlet, phase and components).}
- material_balance_type
- Indicates what type of mass balance should be constructed. Only used if ideal_separation = False. default - MaterialBalanceType.componentPhase. Valid values: { MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- has_phase_equilibrium
- Argument indicating whether phase equilibrium should be calculated for the resulting mixed stream, default - False. Valid values: { True - calculate phase equilibrium in mixed stream, False - do not calculate equilibrium in mixed stream.}
- energy_split_basis
- Argument indicating basis to use for splitting energy this is not used for when ideal_separation == True. default - EnergySplittingType.equal_temperature. Valid values: { EnergySplittingType.equal_temperature - outlet temperatures equal inlet EnergySplittingType.equal_molar_enthalpy - oulet molar enthalpies equal inlet, EnergySplittingType.enthalpy_split - apply split fractions to enthalpy flows. Does not work with component or phase-component splitting.}
- ideal_separation
- Argument indicating whether ideal splitting should be used. Ideal splitting assumes perfect spearation of material, and attempts to avoid duplication of StateBlocks by directly partitioning outlet flows to ports, default - True. Valid values: { True - use ideal splitting methods. Cannot be combined with has_phase_equilibrium = True, False - use explicit splitting equations with split fractions.}
- ideal_split_map
- Dictionary containing information on how extensive variables should be partitioned when using ideal splitting (ideal_separation = True). default - None. Valid values: { dict with keys of indexing set members and values indicating which outlet this combination of keys should be partitioned to. E.g. {(“Vap”, “H2”): “outlet_1”}}
- mixed_state_block
- An existing state block to use as the source stream from the Separator block, default - None. Valid values: { None - create a new StateBlock for the mixed stream, StateBlock - a StateBock to use as the source for the mixed stream.}
- construct_ports
- Argument indicating whether model should construct Port objects linked the mixed state and all outlet states, default - True. Valid values: { True - construct Ports for all states, False - do not construct Ports.
- initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.
- idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
Returns: (Separator) New instance
SeparatorData Class¶
-
class
idaes.unit_models.separator.
SeparatorData
(component)[source]¶ This is a general purpose model for a Separator block with the IDAES modeling framework. This block can be used either as a stand-alone Separator unit operation, or as a sub-model within another unit operation.
This model creates a number of StateBlocks to represent the outgoing streams, then writes a set of phase-component material balances, an overall enthalpy balance (2 options), and a momentum balance (2 options) linked to a mixed-state StateBlock. The mixed-state StateBlock can either be specified by the user (allowing use as a sub-model), or created by the Separator.
When being used as a sub-model, Separator should only be used when a set of new StateBlocks are required for the streams to be separated. It should not be used to separate streams to go to mutiple ControlVolumes in a single unit model - in these cases the unit model developer should write their own splitting equations.
-
add_energy_splitting_constraints
(mixed_block)[source]¶ Creates constraints for splitting the energy flows - done by equating temperatures in outlets.
-
add_inlet_port_objects
(mixed_block)[source]¶ Adds inlet Port object if required.
Parameters: mixed state StateBlock object (a) – Returns: None
-
add_material_splitting_constraints
(mixed_block)[source]¶ Creates constraints for splitting the material flows
-
add_mixed_state_block
()[source]¶ Constructs StateBlock to represent mixed stream.
Returns: New StateBlock object
-
add_momentum_splitting_constraints
(mixed_block)[source]¶ Creates constraints for splitting the momentum flows - done by equating pressures in outlets.
-
add_outlet_port_objects
(outlet_list, outlet_blocks)[source]¶ Adds outlet Port objects if required.
Parameters: list of outlet StateBlock objects (a) – Returns: None
-
add_outlet_state_blocks
(outlet_list)[source]¶ Construct StateBlocks for all outlet streams.
Parameters: of strings to use as StateBlock names (list) – Returns: list of StateBlocks
-
add_split_fractions
(outlet_list)[source]¶ Creates outlet Port objects and tries to partiton mixed stream flows between these
Parameters: - representing the mixed flow to be split (StateBlock) –
- list of names for outlets (a) –
Returns: None
-
build
()[source]¶ General build method for SeparatorData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
Parameters: None – Returns: None
-
create_outlet_list
()[source]¶ Create list of outlet stream names based on config arguments.
Returns: list of strings
-
get_mixed_state_block
()[source]¶ Validates StateBlock provided in user arguments for mixed stream.
Returns: The user-provided StateBlock or an Exception
-
initialize
(outlvl=0, optarg={}, solver='ipopt', hold_state=False)[source]¶ Initialisation routine for separator (default solver ipopt)
Keyword Arguments: - outlvl – sets output level of initialisation routine. Valid values: 0 - no output (default), 1 - return solver state for each step in routine, 2 - include solver output infomation (tee=True)
- optarg – solver options dictionary object (default=None)
- solver – str indicating whcih solver to use during initialization (default = ‘ipopt’)
- hold_state – flag indicating whether the initialization routine should unfix any state variables fixed during initialization, default - False. Valid values: True - states variables are not unfixed, and a dict of returned containing flags for which states were fixed during initialization, False - state variables are unfixed after initialization by calling the release_state method.
Returns: If hold_states is True, returns a dict containing flags for which states were fixed during initialization.
-
model_check
()[source]¶ This method executes the model_check methods on the associated state blocks (if they exist). This method is generally called by a unit model as part of the unit’s model_check method.
Parameters: None – Returns: None
-
partition_outlet_flows
(mb, outlet_list)[source]¶ Creates outlet Port objects and tries to partiton mixed stream flows between these
Parameters: - representing the mixed flow to be split (StateBlock) –
- list of names for outlets (a) –
Returns: None
-
release_state
(flags, outlvl=0)[source]¶ Method to release state variables fixed during initialisation.
Keyword Arguments: - flags – dict containing information of which state variables were fixed during initialization, and should now be unfixed. This dict is returned by initialize if hold_state = True.
- outlvl – sets output level of logging
Returns: None
-