prommis.leaching.leach_reactions#

Simple leaching model for West Kentucky No. 13 coal refuse in H2SO4.

Authors: Andrew Lee

This is an example of how to write a custom heterogeneous reaction package for use with the LeachTrain unit model.

class prommis.leaching.leach_reactions.CoalRefuseLeachingReactionBlock(*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

    parameters

    A reference to an instance of the Heterogeneous Reaction Parameter Block associated with this property package.

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

(CoalRefuseLeachingReactionBlock) New instance

class prommis.leaching.leach_reactions.CoalRefuseLeachingReactionData(component)[source]#
build()[source]#

Reaction block for leaching of West Kentucky No. 13 coal refuse in H2SO4.

default_scaler#

alias of LeachReactionScaler

class prommis.leaching.leach_reactions.CoalRefuseLeachingReactionParameterBlock(*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

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

(CoalRefuseLeachingReactionParameterBlock) New instance

class prommis.leaching.leach_reactions.CoalRefuseLeachingReactionParameterData(component)[source]#

Reaction package for heterogeneous reactions involved in leaching REEs from solid West Kentucky No. 13 coal refuse using H2SO4.

This reaction package is designed to be used with the LeachTrain or MSContactor unit models and assumed two streams named ‘liquid’ and ‘solid’.

Reaction parameters fitted to a shrinking core model using data from:

RESEARCH PERFORMANCE FINAL REPORT, Pilot-Scale Testing of an Integrated Circuit for the Extraction of Rare Earth Minerals and Elements from Coal and Coal Byproducts Using Advanced Separation Technologies, Honaker, R.Q., et al., DE-FE0027035

Includes reactions for the following components with H2SO4:

  • Rare Earth Oxides: Sc2O3, Y2O3, La2O3, Ce2O3, Pr2O3, Nd2O3, Sm2O3, Gd2O3, Dy2O3

  • Impurities: Al2O3, CaO, Fe2O3

All reactions use the following form:

rate[j] = eps*B*[H+]^A*(1-X[j])^(2/3)

where X[j] is the solid phase conversion (i.e., recovery) of species j, eps is the mass-based pulp density and A and B are fitted parameters.

build()[source]#

The build method is called by the default ProcessBlock rule. If a rule is specified other than the default it is important to call ProcessBlockData’s build method to put information from the “default” and “initialize” arguments to a ProcessBlock derived class into the BlockData object’s ConfigBlock.

The build method should usually be overloaded in a subclass derived from ProcessBlockData. This method would generally add Pyomo components such as variables, expressions, and constraints to the object. It is important for build() methods implemented in derived classes to call build() from the super class.

Parameters:

None

Returns:

None

build_reaction_block(*args, **kwargs)[source]#

Methods to construct a ReactionBlock associated with this ReactionParameterBlock. This will automatically set the parameters construction argument for the ReactionBlock.

Returns:

ReactionBlock

classmethod define_metadata(obj)[source]#

Set all the metadata for properties and units.

This method should be implemented by subclasses. In the implementation, they should set information into the object provided as an argument.

Parameters:

pcm (PropertyClassMetadata) – Add metadata to this object.

Returns:

None

class prommis.leaching.leach_reactions.LeachReactionScaler(**kwargs)[source]#

Scaler for the leach reaction package. No variables or constraints, so no need for scaling.

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.

Derived classes must overload this method.

Parameters:
  • model – model to be scaled

  • overwrite – whether to overwrite existing scaling factors

  • submodel_scalers – ComponentMap of Scalers to use for sub-models

Returns:

None

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

Routine to apply scaling factors to variables in model.

Derived classes must overload this method.

Parameters:
  • model – model to be scaled

  • overwrite – whether to overwrite existing scaling factors

  • submodel_scalers – ComponentMap of Scalers to use for sub-models

Returns:

None