Duplicator#

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

Create a Duplicator object that takes in one inlet stream and duplicates it to all outlet streams.

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

  • outs (Stream], optional) – Duplicated outlet streams.

Examples

Create a Duplicator object with an ID and any number of outlet streams:

>>> from biosteam import settings, Stream, units
>>> settings.set_thermo(['Water', 'Ethanol'], cache=True)
>>> feed = Stream('feed', Water=20, Ethanol=10, T=340)
>>> D1 = units.Duplicator('D1', ins=feed, outs=('out_a', 'out_b', 'out_c'))
>>> D1.simulate()
>>> D1.show()
Duplicator: D1
ins...
[0] feed
    phase: 'l', T: 340 K, P: 101325 Pa
    flow (kmol/hr): Water    20
                    Ethanol  10
outs...
[0] out_a
    phase: 'l', T: 340 K, P: 101325 Pa
    flow (kmol/hr): Water    20
                    Ethanol  10
[1] out_b
    phase: 'l', T: 340 K, P: 101325 Pa
    flow (kmol/hr): Water    20
                    Ethanol  10
[2] out_c
    phase: 'l', T: 340 K, P: 101325 Pa
    flow (kmol/hr): Water    20
                    Ethanol  10
line: str = 'Duplicator'#

class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class

run()#

Run mass and energy balance. This method also runs specifications user defined specifications unless it is being run within a specification (to avoid infinite loops).

See also

_run, specifications, add_specification, add_bounded_numerical_specification