Exchanger

class flexops.unit_models.exchanger.Exchanger(*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

    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

    Property (parameter) block carrying flow between units; None for units that need no fluid properties.

    flexops_config

    Optional already-validated UnitConfig for this unit (never a raw dict).

    unit_commitment

    Per-unit unit-commitment sub-config.

    external_dispatch

    Optional external (DERMS) dispatch source consumed by set_external_dispatch.

    relaxation

    Discrete-structure relaxation policy.

    allow_pass_through

    Whether add_bypass_constraints() builds inlet-to-outlet pass-through equalities for this unit’s non-excluded state variables. SISOBlock (and its subclasses Pump/Tank) override the base default to True so the flow-topology units are well-posed out of the box; the base OpsBlock default stays False.

    costing_package

    Optional FlexCosting block this unit associates with: register_power forwards the unit’s power draw to it. None for standalone units; the forwarding is strictly conditional.

    transfer_fraction

    Fraction of stream a’s inlet flow that crosses into stream b (a fixed, regressable Var once built). 0.0 leaves the two streams independent.

    energy_intensity

    Electrical energy per unit volume delivered at outlet a (a fixed, regressable Var once built), kWh/m^3.

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

(Exchanger) New instance

Variables

Name

Index

Units

Role

Description

flow_vol_phase

time

m**3/h

input

Volumetric flowrate by time and phase

flow_vol_phase

time

m**3/h

input

Volumetric flowrate by time and phase

flow_vol_phase

time

m**3/h

output

Volumetric flowrate by time and phase

flow_vol_phase

time

m**3/h

output

Volumetric flowrate by time and phase

power_electrical

time

kW

output

Electrical draw of the unit

Constraints

Name

Description

mass_balance_a

Stream a balance: outlet_a == (1 - transfer_fraction) * inlet_a.

mass_balance_b

Stream b balance: outlet_b == inlet_b + transfer_fraction * inlet_a.

power_electrical_relation

power_electrical_relation: power == energy_intensity * flow. kWh/m^3 * m^3/hr = kW exactly, no fudge factor. FlexParameterize swaps this Constraint in place when it fits a richer relationship.

Degrees of Freedom

Name

Units

Description

flow_vol_phase

m**3/h

Volumetric flowrate by time and phase

flow_vol_phase

m**3/h

Volumetric flowrate by time and phase