heat_exchange#

This module contains heat exchanger unit operations.

class HX(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Abstract class for counter current heat exchanger.

Abstract methods

get_streams()

Should return two inlet streams and two outlet streams that exchange heat.

class HXutility(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Create a heat exchanger that changes temperature of the outlet stream using a heat utility.

Parameters:
  • ins (Stream], optional) – Inlet.

  • outs (Stream], optional) – Outlet.

  • T=None (float) – Temperature of outlet stream [K].

  • V=None (float) – Vapor fraction of outlet stream.

  • rigorous=False (bool) – If true, calculate vapor liquid equilibrium

  • U=None (float, optional) – Enforced overall heat transfer coefficent [kW/m^2/K].

  • heat_exchanger_type (str, optional) – Heat exchanger type. Defaults to “Floating head”.

  • N_shells (int, optional) – Number of shells. Defaults to 2.

  • ft (float, optional) – User imposed correction factor.

  • heat_only (bool, optional) – If True, heat exchanger can only heat.

  • cool_only (bool, optional) – If True, heat exchanger can only cool.

  • heat_transfer_efficiency (bool, optional) – User enforced heat transfer efficiency. A value less than 1 means that a fraction of heat transfered is lost to the environment. Defaults to the heat transfer efficiency of the utility agent.

Notes

Must specify either T or V when creating a HXutility object.

Examples

Run heat exchanger by temperature:

>>> from biosteam.units import HXutility
>>> from biosteam import Stream, settings
>>> settings.set_thermo(['Water', 'Ethanol'], cache=True)
>>> feed = Stream('feed', Water=200, Ethanol=200)
>>> hx = HXutility('hx', ins=feed, outs='product', T=50+273.15,
...                rigorous=False) # Ignore VLE
>>> hx.simulate()
>>> hx.show()
HXutility: hx
ins...
[0] feed
    phase: 'l', T: 298.15 K, P: 101325 Pa
    flow (kmol/hr): Water    200
                    Ethanol  200
outs...
[0] product
    phase: 'l', T: 323.15 K, P: 101325 Pa
    flow (kmol/hr): Water    200
                    Ethanol  200
>>> hx.results()
Heat exchanger                                            Units       hx
Low pressure steam  Duty                                  kJ/hr 1.01e+06
                    Flow                                kmol/hr     26.2
                    Cost                                 USD/hr     6.22
Design              Area                                   ft^2     59.9
                    Overall heat transfer coefficient  kW/m^2/K      0.5
                    Log-mean temperature difference           K      101
                    Fouling correction factor                          1
                    Tube side pressure drop                 psi      1.5
                    Shell side pressure drop                psi        5
                    Operating pressure                      psi       50
                    Total tube length                        ft       20
Purchase cost       Double pipe                             USD 4.78e+03
Total purchase cost                                         USD 4.78e+03
Utility cost                                             USD/hr     6.22

Run heat exchanger by vapor fraction:

>>> feed = Stream('feed', Water=200, Ethanol=200)
>>> hx = HXutility('hx', ins=feed, outs='product', V=1,
...                rigorous=True) # Include VLE
>>> hx.simulate()
>>> hx.show()
HXutility: hx
ins...
[0] feed
    phase: 'l', T: 298.15 K, P: 101325 Pa
    flow (kmol/hr): Water    200
                    Ethanol  200
outs...
[0] product
    phase: 'g', T: 357.44 K, P: 101325 Pa
    flow (kmol/hr): Water    200
                    Ethanol  200
>>> hx.results()
Heat exchanger                                            Units       hx
Low pressure steam  Duty                                  kJ/hr 1.94e+07
                    Flow                                kmol/hr      500
                    Cost                                 USD/hr      119
Design              Area                                   ft^2      716
                    Overall heat transfer coefficient  kW/m^2/K        1
                    Log-mean temperature difference           K     80.8
                    Fouling correction factor                          1
                    Tube side pressure drop                 psi      1.5
                    Shell side pressure drop                psi      1.5
                    Operating pressure                      psi       50
                    Total tube length                        ft       20
Purchase cost       Floating head                           USD 2.65e+04
Total purchase cost                                         USD 2.65e+04
Utility cost                                             USD/hr      119

We can also specify the heat transfer efficiency of the heat exchanger:

>>> hx.heat_transfer_efficiency = 1. # Originally 0.95 for low pressure steam
>>> hx.simulate()
>>> hx.results() # Notice how the duty, utility cost, and capital cost decreased
Heat exchanger                                            Units       hx
Low pressure steam  Duty                                  kJ/hr 1.84e+07
                    Flow                                kmol/hr      475
                    Cost                                 USD/hr      113
Design              Area                                   ft^2      680
                    Overall heat transfer coefficient  kW/m^2/K        1
                    Log-mean temperature difference           K     80.8
                    Fouling correction factor                          1
                    Tube side pressure drop                 psi      1.5
                    Shell side pressure drop                psi      1.5
                    Operating pressure                      psi       50
                    Total tube length                        ft       20
Purchase cost       Floating head                           USD 2.61e+04
Total purchase cost                                         USD 2.61e+04
Utility cost                                             USD/hr      113

Run heat exchanger by vapor fraction:

>>> feed = Stream('feed', Water=200, Ethanol=200)
>>> hx = HXutility('hx', ins=feed, outs='product', V=1,
...                rigorous=True) # Include VLE
>>> hx.simulate()
>>> hx.show()
HXutility: hx
ins...
[0] feed
    phase: 'l', T: 298.15 K, P: 101325 Pa
    flow (kmol/hr): Water    200
                    Ethanol  200
outs...
[0] product
    phase: 'g', T: 357.44 K, P: 101325 Pa
    flow (kmol/hr): Water    200
                    Ethanol  200
>>> hx.results()
Heat exchanger                                            Units       hx
Low pressure steam  Duty                                  kJ/hr 1.94e+07
                    Flow                                kmol/hr      500
                    Cost                                 USD/hr      119
Design              Area                                   ft^2      716
                    Overall heat transfer coefficient  kW/m^2/K        1
                    Log-mean temperature difference           K     80.8
                    Fouling correction factor                          1
                    Tube side pressure drop                 psi      1.5
                    Shell side pressure drop                psi      1.5
                    Operating pressure                      psi       50
                    Total tube length                        ft       20
Purchase cost       Floating head                           USD 2.65e+04
Total purchase cost                                         USD 2.65e+04
Utility cost                                             USD/hr      119

We can also specify the heat transfer efficiency of the heat exchanger:

>>> hx.heat_transfer_efficiency = 1. # Originally 0.95 for low pressure steam
>>> hx.simulate()
>>> hx.results() # Notice how the duty, utility cost, and capital cost decreased
Heat exchanger                                            Units       hx
Low pressure steam  Duty                                  kJ/hr 1.84e+07
                    Flow                                kmol/hr      475
                    Cost                                 USD/hr      113
Design              Area                                   ft^2      680
                    Overall heat transfer coefficient  kW/m^2/K        1
                    Log-mean temperature difference           K     80.8
                    Fouling correction factor                          1
                    Tube side pressure drop                 psi      1.5
                    Shell side pressure drop                psi      1.5
                    Operating pressure                      psi       50
                    Total tube length                        ft       20
Purchase cost       Floating head                           USD 2.61e+04
Total purchase cost                                         USD 2.61e+04
Utility cost                                             USD/hr      113
class HXprocess(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Counter current heat exchanger for process fluids. Rigorously transfers heat until the pinch temperature or a user set temperature limit is reached.

Parameters:
  • ins (Stream], optional) –

    • [0] Inlet process fluid a

    • [1] Inlet process fluid b

  • outs (Stream], optional) –

    • [0] Outlet process fluid a

    • [1] Outlet process fluid b

  • U=None (float, optional) – Enforced overall heat transfer coefficent [kW/m^2/K].

  • dT=5. (float) – Pinch temperature difference (i.e. dT = abs(outs[0].T - outs[1].T)).

  • T_lim0 (float, optional) – Temperature limit of outlet stream at index 0.

  • T_lim1 (float, optional) – Temperature limit of outlet stream at index 1.

  • heat_exchanger_type (str, optional) – Heat exchanger type. Defaults to ‘Floating head’.

  • N_shells=2 (int, optional) – Number of shells.

  • ft=None (float, optional) – User enforced correction factor.

  • phase0=None ('l' or 'g', optional) – User enforced phase of outlet stream at index 0.

  • phase1=None ('l' or 'g', optional) – User enforced phase of outlet stream at index 1.

  • H_lim0 (float, optional) – Enthalpy limit of outlet stream at index 0.

  • H_lim1 (float, optional) – Enthalpy limit of outlet stream at index 1.

Examples

Rigorous heat exchange until pinch temperature is reached:

>>> from biosteam.units import HXprocess
>>> from biosteam import Stream, settings
>>> settings.set_thermo(['Water', 'Ethanol'])
>>> in_a = Stream('in_a', Ethanol=50, T=351.43, phase='g')
>>> in_b = Stream('in_b', Water=200)
>>> hx = HXprocess('hx', ins=(in_a, in_b), outs=('out_a', 'out_b'))
>>> hx.simulate()
>>> hx.show(T='degC:.2g')
HXprocess: hx
ins...
[0] in_a
    phase: 'g', T: 78 degC, P: 101325 Pa
    flow (kmol/hr): Ethanol  50
[1] in_b
    phase: 'l', T: 25 degC, P: 101325 Pa
    flow (kmol/hr): Water  200
outs...
[0] out_a
    phases: ('g', 'l'), T: 78 degC, P: 101325 Pa
    flow (kmol/hr): (g) Ethanol  31.4
                    (l) Ethanol  18.6
[1] out_b
    phase: 'l', T: 73 degC, P: 101325 Pa
    flow (kmol/hr): Water  200
>>> hx.results()
Heat exchanger                                            Units       hx
Design              Area                                   ft^2      213
                    Overall heat transfer coefficient  kW/m^2/K      0.5
                    Log-mean temperature difference           K     20.4
                    Fouling correction factor                          1
                    Tube side pressure drop                 psi      1.5
                    Shell side pressure drop                psi        5
                    Operating pressure                      psi     14.7
                    Total tube length                        ft       20
Purchase cost       Floating head                           USD 2.06e+04
Total purchase cost                                         USD 2.06e+04
Utility cost                                             USD/hr        0

Sensible fluids case with user enfored outlet phases (more computationally efficient):

>>> from biosteam.units import HXprocess
>>> from biosteam import Stream, settings
>>> settings.set_thermo(['Water', 'Ethanol'])
>>> in_a = Stream('in_a', Water=200, T=350)
>>> in_b = Stream('in_b', Ethanol=200)
>>> hx = HXprocess('hx', ins=(in_a, in_b), outs=('out_a', 'out_b'),
...                phase0='l', phase1='l')
>>> hx.simulate()
>>> hx.show()
HXprocess: hx
ins...
[0] in_a
    phase: 'l', T: 350 K, P: 101325 Pa
    flow (kmol/hr): Water  200
[1] in_b
    phase: 'l', T: 298.15 K, P: 101325 Pa
    flow (kmol/hr): Ethanol  200
outs...
[0] out_a
    phase: 'l', T: 303.15 K, P: 101325 Pa
    flow (kmol/hr): Water  200
[1] out_b
    phase: 'l', T: 328.09 K, P: 101325 Pa
    flow (kmol/hr): Ethanol  200
>>> hx.results()
Heat exchanger                                            Units       hx
Design              Area                                   ft^2      369
                    Overall heat transfer coefficient  kW/m^2/K      0.5
                    Log-mean temperature difference           K     11.4
                    Fouling correction factor                          1
                    Tube side pressure drop                 psi        5
                    Shell side pressure drop                psi        5
                    Operating pressure                      psi     14.7
                    Total tube length                        ft       20
Purchase cost       Floating head                           USD 2.23e+04
Total purchase cost                                         USD 2.23e+04
Utility cost                                             USD/hr        0
>>> hx.results()
Heat exchanger                                            Units       hx
Design              Area                                   ft^2      369
                    Overall heat transfer coefficient  kW/m^2/K      0.5
                    Log-mean temperature difference           K     11.4
                    Fouling correction factor                          1
                    Tube side pressure drop                 psi        5
                    Shell side pressure drop                psi        5
                    Operating pressure                      psi     14.7
                    Total tube length                        ft       20
Purchase cost       Floating head                           USD 2.23e+04
Total purchase cost                                         USD 2.23e+04
Utility cost                                             USD/hr        0