Heat Exchangers (1D)#

Heat Exchanger models represents a unit operation with two material streams which exchange heat. The IDAES 1-D Heat Exchanger model is used for detailed modeling of heat exchanger units with variations in one spatial dimension. For a simpler representation of a heat exchanger unit see Heat Exchanger (0-D).

Degrees of Freedom#

1-D Heat Exchangers generally have 2 + number of finite elements degrees of freedom.

Typical fixed variables are:

  • heat transfer area,

  • heat exchanger length,

  • average heat transfer coefficients (at all spatial points).

For dynamic simulations (and cases where velocities are required), the cross-sectional areas of the hot and cold sides need to be provided as well (unit.hot_side.area and unit.hot_side.area).

Model Structure#

The core 1-D Heat Exchanger Model unit model consists of two ControlVolume1DBlock Blocks named hot_side and cold_side, each with one Inlet Port (named hot_side_inlet and cold_side_inlet) and one Outlet Port (named hot_side_outlet and cold_side_outlet). These names are configurable using the hot_side_name and cold_side_name configuration arguments, in which case aliases are assigned to the control volumes and associated Ports using the names provided (note that hot_side and cold_side will always work).

Construction Arguments#

1-D Heat Exchanger units have construction arguments specific to the hot and cold sides and for the unit as a whole.

Arguments that are applicable to the heat exchanger unit are as follows:

  • flow_type - indicates the flow arrangement within the unit to be modeled. Options are:

    • ‘co-current’ - (default) shell and tube both flow in the same direction (from x=0 to x=1)

    • ‘counter-current’ - shell and tube flow in opposite directions (shell from x=0 to x=1 and tube from x=1 to x=0).

  • finite_elements - sets the number of finite elements to use when discretizing the spatial domains (default = 20). This is used for both shell and tube side domains.

  • collocation_points - sets the number of collocation points to use when discretizing the spatial domains (default = 5, collocation methods only). This is used for both shell and tube side domains.

  • hot_side_name

  • cold_side_name

Arguments that are applicable to the hot and cold sides:

  • property_package - property package to use when constructing shell side Property Blocks (default = ‘use_parent_value’). This is provided as a Physical Parameter Block by the Flowsheet when creating the model. If a value is not provided, the ControlVolume Block will try to use the default property package if one is defined.

  • property_package_args - set of arguments to be passed to the shell side Property Blocks when they are created.

  • transformation_method - argument to specify the DAE transformation method for the shell side; should be compatible with the Pyomo DAE TransformationFactory

  • transformation_scheme - argument to specify the scheme to use for the selected DAE transformation method; should be compatible with the Pyomo DAE TransformationFactory

Additionally, 1-D Heat Exchanger units have the following construction arguments for each side which are passed to the ControlVolume1DBlocks for determining which terms to construct in the balance equations for the hot and cold sides.

Argument

Default Value

dynamic

useDefault

has_holdup

False

material_balance_type

‘componentTotal’

energy_balance_type

‘enthalpyTotal’

momentum_balance_type

‘pressureTotal’

has_phase_equilibrium

False

has_heat_transfer

True

has_pressure_change

False

Variables#

1-D Heat Exchanger units add the following additional Variables beyond those created by the ControlVolume1DBlock Block.

Variable

Name

Notes

\(L\)

length

Reference to hot_side.length

\(A\)

area

Overall heat transfer area

\(U_{t,x}\)

heat_transfer_coefficient

Average heat transfer coefficient

Additional Constraints#

1-D Heat Exchanger models write the following additional Constraints to describe the heat transfer between the two sides of the heat exchanger. Firstly, overall heat transfer is calculated as:

\[Q_{hot,t,x} = -U_{t,x} \times \frac{A}{L_{hot}} \times (T_{hot,t,x}-T_{cold,t,x}))\]

where \(Q_{hot,t,x}\) is the hot-side heat duty at point \(x\) and time \(t\), \(A\) is the total heat transfer area, \(U_{t,x}\) is the average heat transfer coefficient, and \(T_{hot,t,x}\) and \(T_{cold,t,x}\) are the hot and cold side temperatures respectively.

Next, overall heat conservation is enforced by the following constraint:

\[Q_{cold,t,x} = -Q_{hot,t,x}\]

Finally, the following Constraints are written to describe the unit geometry:

\[L_{hot} = L_{cold}\]

where \(L_{hot}\) and \(L_{cold}\) are the length of the hot and cold side respectively.

Initialization#

class idaes.models.unit_models.heat_exchanger_1D.HX1DInitializer(**kwargs)[source]#

Initializer for 1D Heat Exchanger units.

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

default_submodel_initializer

Default Initializer object to use for sub-models. Only used if no Initializer defined in submodel_initializers.

always_estimate_states

Whether initialization routine should estimate values for state variables that already have values. Note that if set to True, this will overwrite any initial guesses provided.

initialization_routine(model, plugin_initializer_args=None, duty=None)[source]#

Common initialization routine for 1D Heat Exchangers.

This routine starts by initializing the hot and cold side properties. Next, the heat transfer between the two sides is fixed to an initial guess for the heat duty (provided by the duty argument), the associated constraints is deactivated, and the model is then solved. Finally, the heat duty is unfixed and the heat transfer constraints reactivated followed by a final solve of the model.

Parameters:
  • model (Block) – Pyomo Block to be initialized

  • plugin_initializer_args (dict) – dict-of-dicts containing arguments to be passed to plug-in Initializers. Keys should be submodel components.

  • duty – initial guess for heat duty to assist with initialization. Can be a Pyomo expression with units. Default is 1/4*U*A*(Thot - Tcold)

Returns:

Pyomo solver results object

HeatExchanger1d Class#

class idaes.models.unit_models.heat_exchanger_1D.HeatExchanger1D(*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}

    hot_side

    hot side config arguments

    hot_side
    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}

    material_balance_type

    Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}

    energy_balance_type

    Indicates what type of energy balance should be constructed, default - EnergyBalanceType.useDefault. Valid values: { EnergyBalanceType.useDefault - refer to property package for default balance type **EnergyBalanceType.none - exclude energy balances, EnergyBalanceType.enthalpyTotal - single enthalpy balance for material, EnergyBalanceType.enthalpyPhase - enthalpy balances for each phase, EnergyBalanceType.energyTotal - single energy balance for material, EnergyBalanceType.energyPhase - energy balances for each phase.}

    momentum_balance_type

    Indicates what type of momentum balance should be constructed, default - MomentumBalanceType.pressureTotal. Valid values: { MomentumBalanceType.none - exclude momentum balances, MomentumBalanceType.pressureTotal - single pressure balance for material, MomentumBalanceType.pressurePhase - pressure balances for each phase, MomentumBalanceType.momentumTotal - single momentum balance for material, MomentumBalanceType.momentumPhase - momentum balances for each phase.}

    has_pressure_change

    Indicates whether terms for pressure change should be constructed, default - False. Valid values: { True - include pressure change terms, False - exclude pressure change terms.}

    has_phase_equilibrium

    Argument to enable phase equilibrium. - True - include phase equilibrium term - False - do not include phase equilibrium term

    property_package

    Property parameter object used to define property calculations (default = ‘use_parent_value’) - ‘use_parent_value’ - get package from parent (default = None) - a ParameterBlock object

    property_package_args

    A dict of arguments to be passed to the PropertyBlockData and used when constructing these (default = ‘use_parent_value’) - ‘use_parent_value’ - get package from parent (default = None) - a dict (see property package for documentation)

    transformation_method

    Discretization method to use for DAE transformation. See Pyomo documentation for supported transformations.

    transformation_scheme

    Discretization scheme to use when transformating domain. See Pyomo documentation for supported schemes.

    cold_side

    cold side config arguments

    cold_side
    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}

    material_balance_type

    Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}

    energy_balance_type

    Indicates what type of energy balance should be constructed, default - EnergyBalanceType.useDefault. Valid values: { EnergyBalanceType.useDefault - refer to property package for default balance type **EnergyBalanceType.none - exclude energy balances, EnergyBalanceType.enthalpyTotal - single enthalpy balance for material, EnergyBalanceType.enthalpyPhase - enthalpy balances for each phase, EnergyBalanceType.energyTotal - single energy balance for material, EnergyBalanceType.energyPhase - energy balances for each phase.}

    momentum_balance_type

    Indicates what type of momentum balance should be constructed, default - MomentumBalanceType.pressureTotal. Valid values: { MomentumBalanceType.none - exclude momentum balances, MomentumBalanceType.pressureTotal - single pressure balance for material, MomentumBalanceType.pressurePhase - pressure balances for each phase, MomentumBalanceType.momentumTotal - single momentum balance for material, MomentumBalanceType.momentumPhase - momentum balances for each phase.}

    has_pressure_change

    Indicates whether terms for pressure change should be constructed, default - False. Valid values: { True - include pressure change terms, False - exclude pressure change terms.}

    has_phase_equilibrium

    Argument to enable phase equilibrium. - True - include phase equilibrium term - False - do not include phase equilibrium term

    property_package

    Property parameter object used to define property calculations (default = ‘use_parent_value’) - ‘use_parent_value’ - get package from parent (default = None) - a ParameterBlock object

    property_package_args

    A dict of arguments to be passed to the PropertyBlockData and used when constructing these (default = ‘use_parent_value’) - ‘use_parent_value’ - get package from parent (default = None) - a dict (see property package for documentation)

    transformation_method

    Discretization method to use for DAE transformation. See Pyomo documentation for supported transformations.

    transformation_scheme

    Discretization scheme to use when transformating domain. See Pyomo documentation for supported schemes.

    finite_elements

    Number of finite elements to use when discretizing length domain (default=20)

    collocation_points

    Number of collocation points to use per finite element when discretizing length domain (default=3)

    flow_type

    Flow configuration of heat exchanger - HeatExchangerFlowPattern.cocurrent: hot and cold flows from 0 to 1 (default) - HeatExchangerFlowPattern.countercurrent: hot side flows from 0 to 1 cold side flows from 1 to 0

    hot_side_name

    Hot side name, sets control volume and inlet and outlet names. Default = None.

    cold_side_name

    Cold side name, sets control volume and inlet and outlet names. Default = None.

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

(HeatExchanger1D) New instance

HeatExchanger1dData Class#

class idaes.models.unit_models.heat_exchanger_1D.HeatExchanger1DData(component)[source]#

Standard Heat Exchanger 1D Unit Model Class.

build()[source]#

Begin building model (pre-DAE transformation).

Parameters:

None

Returns:

None

default_initializer#

alias of HX1DInitializer

initialize_build(hot_side_state_args=None, cold_side_state_args=None, outlvl=0, solver=None, optarg=None, duty=None)[source]#

Initialization routine for the unit.

Keyword Arguments:
  • state_args – a dict of arguments to be passed to the property package(s) to provide an initial state for initialization (see documentation of the specific property package) (default = {}).

  • outlvl – sets output level of initialization routine

  • optarg – solver options dictionary object (default=None, use default solver options)

  • solver – str indicating which solver to use during initialization (default = None, use default solver)

  • duty – an initial guess for the amount of heat transferred. This should be a tuple in the form (value, units). A default value is calculated based on stream temperatures, the overall heat transfer coefficient, and exchanger area

Returns:

None