prommis.precipitate.precipitator#

Preliminary Precipitator Unit Model#

Authors: Alejandro Garciadiego, Douglas Allan

The Precipitator Unit Model represents an Equilibrium reactor unit model with fixed partition coefficients.

Configuration Arguments#

The precipitator unit model needs an aqueous property package which includes stoichiometric values for solids being created in the precipitator and fixed separation coefficients of the solids.

Model Structure#

The Precitator unit model has hard coded stream names (aqueous and precipitate respectively). The Precipitator model also has one inlet and two outlets named aqueous_inlet, aqueous_outlet and precipitate_outlet respectively.

Additional Constraints#

The Precipitator unit adds two additional constraint to define the stochiometry and separation.

\[n_{t,prec,c} = \frac{n_{t,aq_in,c} - n_{t,aq_out,c}}{S_{comp}}\]

where \(n_{t,prec,c}\) is the outlet precipitation of component c, \(n_{t,aq_in,c}\) is the inlet of component c in the aqueous phase, \(n_{t,aq_in,c}\) is the outlet of component c in the aqueous phase at time \(t\), divided by the stoichiometric parameter of component c \(S_{comp}\)

\[n_{t,aq_out,c} = n_{t,aq_in,c} * (1 - split_{c})\]

where \(split_{c}\) is the fixed recovery fraction of component c; this factor can be a parameter or ideally a variable solved by a surrogate or a model equation.

class prommis.precipitate.precipitator.Precipitator(*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 = useDefault. Valid values: { useDefault - get flag from parent (default = False), True - set as a dynamic model, False - set as a steady-state model.}

    has_holdup

    Indicates whether holdup terms should be constructed or not. Must be True if dynamic = True, default - False. Valid values: { useDefault - get flag from parent (default = False), True - construct holdup terms, False - do not construct holdup terms}

    property_package_aqueous

    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_aqueous

    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.}

    property_package_precipitate

    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_precipitate

    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.}

    has_equilibrium_reactions

    Indicates whether terms for equilibrium controlled reactions should be constructed, default - True. Valid values: { True - include equilibrium reaction terms, False - exclude equilibrium reaction terms.}

    has_phase_equilibrium

    Indicates whether terms for phase equilibrium should be constructed, default = False. Valid values: { True - include phase equilibrium terms False - exclude phase equilibrium terms.}

    has_heat_of_reaction

    Indicates whether terms for heat of reaction terms should be constructed, default - False. Valid values: { True - include heat of reaction terms, False - exclude heat of reaction terms.}

    reaction_package

    Reaction parameter object used to define reaction calculations, default - None. Valid values: { None - no reaction package, ReactionParameterBlock - a ReactionParameterBlock object.}

    reaction_package_args

    A ConfigBlock with arguments to be passed to a reaction block(s) and used when constructing these, default - None. Valid values: { see reaction package for documentation.}

    make_volume_balance_constraint

    Flag whether to create legacy volume balance constraint

  • 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:

(Precipitator) New instance

class prommis.precipitate.precipitator.PrecipitatorScaler(**kwargs)[source]#

Scaler for the Precipitator unit model.

zero_tolerance

Value at which a variable will be considered equal to zero for scaling.

max_variable_scaling_factor

Maximum value for variable scaling factors.

min_variable_scaling_factor

Minimum value for variable scaling factors.

max_constraint_scaling_factor

Maximum value for constraint scaling factors.

min_constraint_scaling_factor

Minimum value for constraint scaling factors.

max_expression_scaling_hint

Maximum value for expression scaling hints.

min_expression_scaling_hint

Minimum value for constraint scaling hints.

overwrite

Whether to overwrite existing scaling factors.

constraint_scaling_routine(model, overwrite: bool = False, submodel_scalers: ComponentMap = None)[source]#

Constraint scaling routine for Precipitator.

Parameters:
  • model – instance of Precipitator to be scaled

  • overwrite – whether to overwrite existing scaling factors

  • submodel_scalers – ComponentMap of Scalers to use for sub-models, keyed by submodel local name

Returns:

None

variable_scaling_routine(model, overwrite: bool = False, submodel_scalers: ComponentMap = None)[source]#

Variable scaling routine for Precipitator.

Parameters:
  • model – instance of Precipitator to be scaled

  • overwrite – whether to overwrite existing scaling factors

  • submodel_scalers – ComponentMap of Scalers to use for sub-models, keyed by submodel local name

Returns:

None