proteuslib.property_models package

Submodules

proteuslib.property_models.NaCl_prop_pack module

Initial property package for H2O-NaCl system

class proteuslib.property_models.NaCl_prop_pack.NaClParameterBlock(*args, **kwds)

Bases: ProcessBlock

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

  • 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

(NaClParameterBlock) New instance

class proteuslib.property_models.NaCl_prop_pack.NaClParameterData(component)[source]

Bases: PhysicalParameterBlock

build()[source]

Callable method for Block construction.

classmethod define_metadata(obj)[source]

Define properties supported and units.

class proteuslib.property_models.NaCl_prop_pack.NaClStateBlock(*args, **kwds)

Bases: _NaClStateBlock

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

  • 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

(NaClStateBlock) New instance

class proteuslib.property_models.NaCl_prop_pack.NaClStateBlockData(*args, **kwargs)[source]

Bases: StateBlockData

build()[source]

Callable method for Block construction.

define_state_vars()[source]

Define state vars.

get_enthalpy_flow_terms(p)[source]

Create enthalpy flow 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.

proteuslib.property_models.seawater_prop_pack module

Initial property package for seawater system

class proteuslib.property_models.seawater_prop_pack.SeawaterParameterBlock(*args, **kwds)

Bases: ProcessBlock

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

  • 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

(SeawaterParameterBlock) New instance

class proteuslib.property_models.seawater_prop_pack.SeawaterParameterData(component)[source]

Bases: PhysicalParameterBlock

Parameter block for a seawater property package.

build()[source]

Callable method for Block construction.

classmethod define_metadata(obj)[source]

Define properties supported and units.

class proteuslib.property_models.seawater_prop_pack.SeawaterStateBlock(*args, **kwds)

Bases: _SeawaterStateBlock

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

  • 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

(SeawaterStateBlock) New instance

class proteuslib.property_models.seawater_prop_pack.SeawaterStateBlockData(*args, **kwargs)[source]

Bases: StateBlockData

A seawater property package.

build()[source]

Callable method for Block construction.

define_state_vars()[source]

Define state vars.

get_enthalpy_flow_terms(p)[source]

Create enthalpy flow 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.

Module contents