idaes.examples.workshops.Module_2_Flowsheet package

Submodules

idaes.examples.workshops.Module_2_Flowsheet.Module_2_HDA module

Demonstration of HDA flowsheet with optimization.

idaes.examples.workshops.Module_2_Flowsheet.hda_ideal_VLE module

Example ideal parameter block for the VLE calucations for a Benzene-Toluene-o-Xylene system.

class idaes.examples.workshops.Module_2_Flowsheet.hda_ideal_VLE.HDAParameterBlock(*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
    default_arguments
    Default arguments to use with Property Package
  • 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:

(HDAParameterBlock) New instance

class idaes.examples.workshops.Module_2_Flowsheet.hda_ideal_VLE.HDAParameterData(component)[source]
build()[source]

Callable method for Block construction.

classmethod define_metadata(obj)[source]

Define properties supported and units.

class idaes.examples.workshops.Module_2_Flowsheet.hda_ideal_VLE.IdealStateBlock(*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
    parameters
    A reference to an instance of the Property Parameter Block associated with this property package.
    defined_state
    Flag indicating whether the state should be considered fully defined, and thus whether constraints such as sum of mass/mole fractions should be included, default - False. Valid values: { True - state variables will be fully defined, False - state variables will not be fully defined.}
    has_phase_equilibrium
    Flag indicating whether phase equilibrium constraints should be constructed in this state block, default - True. Valid values: { True - StateBlock should calculate phase equilibrium, False - StateBlock should not calculate phase equilibrium.}
  • 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:

(IdealStateBlock) New instance

class idaes.examples.workshops.Module_2_Flowsheet.hda_ideal_VLE.IdealStateBlockData(component)[source]

An example property package for ideal VLE.

build()[source]

Callable method for Block construction.

calculate_bubble_point_pressure(clear_components=True)[source]

“To compute the bubble point pressure of the mixture.

calculate_bubble_point_temperature(clear_components=True)[source]

“To compute the bubble point temperature of the mixture.

calculate_dew_point_pressure(clear_components=True)[source]

“To compute the dew point pressure of the mixture.

calculate_dew_point_temperature(clear_components=True)[source]

“To compute the dew point temperature of the mixture.

define_state_vars()[source]

Define state vars.

get_enthalpy_density_terms(p)[source]

Create enthalpy density terms.

get_enthalpy_flow_terms(p)[source]

Create enthalpy flow terms.

get_material_density_terms(p, j)[source]

Create material density terms.

get_material_flow_basis()[source]

Method which returns an Enum indicating the basis of the material flow term.

get_material_flow_terms(p, j)[source]

Create material flow terms for control volume.

idaes.examples.workshops.Module_2_Flowsheet.hda_reaction module

Property package for the hydrodealkylation of toluene to form benzene

class idaes.examples.workshops.Module_2_Flowsheet.hda_reaction.HDAReactionBlock(*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
    parameters
    A reference to an instance of the Reaction Parameter Block associated with this property package.
    state_block
    A reference to an instance of a StateBlock with which this reaction block should be associated.
    has_equilibrium
    Flag indicating whether equilibrium constraints should be constructed in this reaction block, default - True. Valid values: { True - ReactionBlock should enforce equilibrium constraints, False - ReactionBlock should not enforce equilibrium constraints.}
  • 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:

(HDAReactionBlock) New instance

class idaes.examples.workshops.Module_2_Flowsheet.hda_reaction.HDAReactionBlockData(component)[source]

An example reaction package for saponification of ethyl acetate

build()[source]

Callable method for Block construction

get_reaction_rate_basis()[source]

Method which returns an Enum indicating the basis of the reaction rate term.

class idaes.examples.workshops.Module_2_Flowsheet.hda_reaction.HDAReactionParameterBlock(*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
    property_package
    Reference to associated PropertyPackageParameter object
    default_arguments
    Default arguments to use with Property Package
  • 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:

(HDAReactionParameterBlock) New instance

class idaes.examples.workshops.Module_2_Flowsheet.hda_reaction.HDAReactionParameterData(component)[source]

Property Parameter Block Class

Contains parameters and indexing sets associated with properties for superheated steam.

build()[source]

Callable method for Block construction.

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 idaes.examples.workshops.Module_2_Flowsheet.hda_reaction.ReactionBlock(*args, **kwargs)[source]

This Class contains methods which should be applied to Reaction Blocks as a whole, rather than individual elements of indexed Reaction Blocks.

initialize(outlvl=0, **kwargs)[source]

Initialisation routine for reaction package.

Keyword Arguments:
 outlvl

sets output level of initialisation routine

  • 0 = no output (default)
  • 1 = report after each step
Returns:None

idaes.examples.workshops.Module_2_Flowsheet.workshoptools module