Python 3.11.4 | packaged by Anaconda, Inc. | (main, Jul 5 2023, 13:38:37) [MSC v.1916 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 8.12.0 -- An enhanced Interactive Python.
In [1]: >>> import biosteam as bst
...: >>> bst.settings.set_thermo(['Water', 'Ethanol'], cache=True)
...: >>> feed = bst.Stream('feed', Ethanol=80, Water=100, T=80.215 + 273.15)
...: >>> MSE = bst.MultiStageEquilibrium(N_stages=5, ins=[feed], feed_stages=[2],
...: ... outs=['vapor', 'liquid', 'distillate'],
...: ... stage_specifications={0: ('Reflux', float('inf')), -1: ('Boilup', 2.57)},
...: method='excitingmixing',
...: ... bottom_side_draws={0: 0.673 / (1 + 0.673)}
...: ... )
...: >>> MSE.simulate()
...: >>> vapor, liquid, distillate = MSE.outs
...: >>> distillate.imol['Ethanol'] / feed.imol['Ethanol']
...: 0.81
...: >>> distillate.imol['Ethanol'] / distillate.F_mol
Out[1]: 0.6818207779488469
In [2]: MSE.iter
Out[2]: 20
In [3]: >>> import biosteam as bst
...: >>> bst.settings.set_thermo(['Water', 'Ethanol'], cache=True)
...: >>> feed = bst.Stream('feed', Ethanol=80, Water=100, T=80.215 + 273.15)
...: >>> MSE = bst.MultiStageEquilibrium(N_stages=5, ins=[feed], feed_stages=[2],
...: ... outs=['vapor', 'liquid', 'distillate'],
...: ... stage_specifications={0: ('Reflux', float('inf')), -1: ('Boilup', 2.57)},
...: method='excitingmixing',
...: maxiter=100
...: ... bottom_side_draws={0: 0.673 / (1 + 0.673)}
...: ... )
...: >>> MSE.simulate()
...: >>> vapor, liquid, distillate = MSE.outs
...: >>> distillate.imol['Ethanol'] / feed.imol['Ethanol']
...: 0.81
...: >>> distillate.imol['Ethanol'] / distillate.F_mol