prommis.solvent_extraction.solvent_extraction#

Solvent Extraction Model


Author: Arkoprabho Dasgupta

The Solvent Extraction unit model is used to perform the solvent extraction unit operation. It represents a series of tanks, referred to as stages, through which the aqueous and organic phases are passed, and the desired components are extracted subsequently.

Configuration Arguments#

The user must specify the following configurations in a solvent extraction model to be able to use it.

The user must specify the aqueous feed input in the aqueous_stream configuration, with a configuration that describes the aqueous feed’s properties.

The user must specify the organic feed input in the organic_stream configuration, with a configuration that describes the organic feed’s properties.

The number of stages in the solvent extraction process has to be specified by the user through the number_of_finite_elements configuration. It takes an integer value.

The user must give a heterogeneous reaction package in the heterogeneous_reaction_package argument for the extraction reaction between the two phases, and any additional arguments can be given in the heterogeneous_reaction_package_args argument.

Stream configurations#

Each of the feed streams has to have a dictionary that specifies the property packages and other details as mentioned below.

The property_package configuration is the property package that describes the state conditions and properties of a particular stream.

The property_package_args configuration is any specific set of arguments that has to be passed to the property block for the unit operation.

The user can specify the direction of the flow of the stream through the stages through the configuration flow_direction. This is a configuration, that uses FlowDirection Enum, which can have two possible values.

The stream has two more arguments, has_energy_balance and has_pressure_balance in accordance with the base MSContactor model. However, our model does not consider energy balance and pressure balance yet, so the default arguments will be has_energy_balance = False and has_pressure_balance = False.

Degrees of freedom#

When the solvent extraction model is operated in steady state, the number of degrees of freedom of the model is equal to the number of stages in the model. This happens because of the volume of each tank in the model, which needs to be fixed by the user.

If the model is operated in dynamic state, the number of degrees of freedom of each stage is equal to the sum of all the variables whose values have to be fixed at time=0, and the volume of the tank. Then the total degrees of freedom is the degree of freedom of each tank multiplied by the total number of tanks.

Model structure#

The core model consists of a MSContactor model, with stream names hard coded as ‘aqueous’ and ‘organic’, and the stream dictionaries and number of finite elements are the same as those provided by the user.

This model uses the heterogeneous reaction term defined in the MSContactor to calculate the amount of material transferred between the phases for each of the rare earth elements. The distribution coefficients used for this quantification are defined in the reaction package, and the constraint pertaining to the distribution coefficient is defined in the solvent extraction model.

The pressure buildup in each of the stages has been defined in the model. For defining the pressure, we need the volume of the phases, so the configuration has_holdup has to be set to True to obtain the pressure of the phases.

Additional Parameters#

In addition to the MSContactor model, the model creates the following parameters.

  1. area_cross_stage = Cross-sectional area of each tank

  2. elevation = Elevation of each tank wrt the valve outlet

Additional Constraints#

In addition to the MSContactor model, the model declares the following constraints.

1. distribution_extent_constraint = This constraint correlates the concentrations in the aqueous and organic phases of a particular element with the distribution coefficient of that element.

2. volume_fraction_constraint = This constraint correlates the volume fractions of the two phases with the corresponding phase outlet volumetric flowrates. This constraint is deactivated at time t=0, since that is the initial point.

  1. organic_pressure_constraint = This constraint calculates the pressure at the end of the organic phase.

4. aqueous_pressure_constraint = This constraint calculates the pressure at the end of the aqueous phase, ie. at the mixer tank outlet point.

class prommis.solvent_extraction.solvent_extraction.SolventExtraction(*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}

    aqueous_stream

    Aqueous stream properties

    aqueous_stream
    property_package

    Property parameter object used to define property calculations for given stream, default - useDefault. Valid values: { useDefault - use default package from parent model or flowsheet, PhysicalParameterObject - a PhysicalParameterBlock object.}

    property_package_args

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

    flow_direction

    Direction of flow for stream

    has_energy_balance

    Bool indicating whether to include energy balance for stream. Default=False.

    has_pressure_balance

    Bool indicating whether to include pressure balance for stream. Default=False.

    organic_stream

    Organic stream properties

    organic_stream
    property_package

    Property parameter object used to define property calculations for given stream, default - useDefault. Valid values: { useDefault - use default package from parent model or flowsheet, PhysicalParameterObject - a PhysicalParameterBlock object.}

    property_package_args

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

    flow_direction

    Direction of flow for stream

    has_energy_balance

    Bool indicating whether to include energy balance for stream. Default=False.

    has_pressure_balance

    Bool indicating whether to include pressure balance for stream. Default=False.

    number_of_finite_elements

    Number of finite elements to use

    heterogeneous_reaction_package

    Heterogeneous reaction package for solvent extraction.

    heterogeneous_reaction_package_args

    Arguments for heterogeneous reaction package for solvent extraction.

    create_hydrostatic_pressure_terms

    Arguments for heterogeneous reaction package for solvent extraction.

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

(SolventExtraction) New instance

class prommis.solvent_extraction.solvent_extraction.SolventExtractionData(component)[source]#
build()[source]#

General build method for UnitModelBlockData. 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

default_initializer#

alias of SolventExtractionInitializer

default_scaler#

alias of SolventExtractionScaler

class prommis.solvent_extraction.solvent_extraction.SolventExtractionInitializer(**kwargs)[source]#

This is a general purpose Initializer for the Solvent Extraction unit model.

This routine calls the initializer for the internal MSContactor model.

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.

ssc_solver_options

Dict of arguments for solver calls by ssc_solver

calculate_variable_options

Dict of options to pass to calc_var_kwds argument in scc_solver method.

initialize_main_model(model: Block)[source]#

Initialization routine for MSContactor Blocks.

Parameters:

model – model to be initialized

Returns:

None

class prommis.solvent_extraction.solvent_extraction.SolventExtractionScaler(**kwargs)[source]#

Scaler for the SolventExtraction 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: dict = None)[source]#

Routine to apply scaling factors to constraints in model.

Parameters:
  • model – model to be scaled

  • overwrite – whether to overwrite existing scaling factors

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

Returns:

None

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

Variable scaling routine for SolventExtraction.

Parameters:
  • model – instance of SolventExraction to be scaled

  • overwrite – whether to overwrite existing scaling factors

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

Returns:

None