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):
If energy_split_basis is none, no energy balance constraint is written.
If momentum_balance_type is pressureTotal:
pressure_equality_eqn(t, o):
If momentum_balance_type is none, no momentum balance constraint is written.
Separators do not support momentum balances using the pressurePhase, momentumTotal or momentumPhase options.
Initialization#
- class idaes.models.unit_models.separator.SeparatorInitializer(**kwargs)[source]#
Initializer for Separator blocks.
- constraint_tolerance
Tolerance for checking constraint convergence
- output_level
Set output level for logging messages
- solver
Solver to use for initialization
- solver_options
Dict of options to pass to solver
- writer_config
Dict of writer_config arguments to pass to solver
- default_submodel_initializer
Default Initializer object to use for sub-models. Only used if no Initializer defined in submodel_initializers.
- initialization_routine(model)[source]#
Initialization routine for Separator Blocks.
This routine starts by initializing the feed stream followed by solving for all split fractions. Next, states for each outlet are estimated using the following rules:
Intensive states remain unchanged
- Extensive states are multiplied by split fractions if index matches, or
average of split fractions for outlet otherwise
Each outlet state block is then initialized, and finally the full model is solved.
- Parameters:
model (Block) – model to be initialized
- Returns:
None
Separator Class#
- class idaes.models.unit_models.separator.Separator(*args, **kwds)#
- Parameters:
rule (function) – A rule function or None. Default rule calls build().
concrete (bool) – If True, make this a toplevel model. Default - False.
ctype (class) –
Pyomo ctype of the block. Default - pyomo.environ.Block
Config args
- 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, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **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.}
- momentum_balance_type
Indicates what type of momentum balance should be constructed, default - MomentumBalanceType.pressureTotal. Valid values: { MomentumBalanceType.none - exclude momentum balances, MomentumBalanceType.pressureTotal - pressure in all outlets is equal, MomentumBalanceType.pressurePhase - not yet supported, MomentumBalanceType.momentumTotal - not yet supported, MomentumBalanceType.momentumPhase - not yet supported.}
- 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.none - no energy balance constraints, EnergySplittingType.equal_temperature - outlet temperatures equal inlet, EnergySplittingType.equal_molar_enthalpy - outlet 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 - False. 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 with config arguments as keys.
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 override the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns:
(Separator) New instance
SeparatorData Class#
- class idaes.models.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 multiple 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.
- add_inlet_port_objects(mixed_block)[source]#
Adds inlet Port object if required.
- Parameters:
object (a mixed state StateBlock)
- 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:
objects (a list of outlet StateBlock)
- Returns:
None
- add_outlet_state_blocks(outlet_list)[source]#
Construct StateBlocks for all outlet streams.
- Parameters:
names (list of strings to use as StateBlock)
- Returns:
list of StateBlocks
- add_split_fractions(outlet_list, mixed_block)[source]#
Creates outlet Port objects and tries to partition mixed stream flows between these
- Parameters:
split (StateBlock representing the mixed flow to be)
outlets (a list of names for)
- 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
- default_initializer#
alias of
SeparatorInitializer
- get_mixed_state_block()[source]#
Validates StateBlock provided in user arguments for mixed stream.
- Returns:
The user-provided StateBlock or an Exception
- initialize_build(outlvl=0, optarg=None, solver=None, hold_state=False)[source]#
Initialization routine for separator
- Keyword Arguments:
outlvl – sets output level of initialization routine
optarg – solver options dictionary object (default=None, use default solver options)
solver – str indicating which solver to use during initialization (default = None, use default solver)
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 partition mixed stream flows between these
- Parameters:
split (StateBlock representing the mixed flow to be)
outlets (a list of names for)
- Returns:
None
- release_state(flags, outlvl=0)[source]#
Method to release state variables fixed during initialization.
- 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