mixing#
- class Mixer(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#
Create a mixer that mixes any number of streams together.
- Parameters:
ins (
Stream
], optional) – Inlet fluids to be mixed.outs (
Stream
], optional) – Mixed outlet fluid.rigorous – Whether to perform vapor-liquid equilibrium.
Notes
When streams at different pressures are mixed, BioSTEAM assumes valves reduce the pressure of the streams being mixed to prevent backflow (pressure needs to decrease in the direction of flow according to Bernoulli’s principle). The outlet pressure will be the minimum pressure of all inlet streams.
Examples
Mix two streams:
>>> from biosteam import units, settings, Stream >>> settings.set_thermo(['Ethanol', 'Water'], cache=True) >>> s1 = Stream('s1', Water=20, T=350) >>> s2 = Stream('s2', Ethanol=30, T=300) >>> M1 = units.Mixer('M1', ins=(s1, s2), outs='s3') >>> M1.simulate() >>> M1.show() Mixer: M1 ins... [0] s1 phase: 'l', T: 350 K, P: 101325 Pa flow (kmol/hr): Water 20 [1] s2 phase: 'l', T: 300 K, P: 101325 Pa flow (kmol/hr): Ethanol 30 outs... [0] s3 phase: 'l', T: 315.14 K, P: 101325 Pa flow (kmol/hr): Ethanol 30 Water 20
- class SteamMixer(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#
Create a mixer that varies the flow of steam to achieve a specified outlet pressure and varies the flow of process water to achieve a specified solids loading (by wt).
- Parameters:
ins (
Stream
], optional) –[0] Feed
[1] Steam
[2] Process water
outs (
Stream
], optional) – Mixed product.P (float) – Outlet pressure.
T (float) – Outlet temperature.
solids_loading (float, optional) – Final solids loading after mixing in process water.
soilds_loading_includes_steam (bool, optional) – Whether to include steam in solids loading calculation.
Examples
>>> import biosteam as bst >>> bst.settings.set_thermo(['Water', 'Glucose']) >>> feed = bst.Stream('feed', Water=10, Glucose=10) >>> M1 = bst.SteamMixer(None, ins=[feed, 'steam', 'process_water'], outs='outlet', T=431.15, P=557287.5, solids_loading=0.3) >>> M1.simulate() >>> M1.show('cwt100') # Note that outlet solids loading is not exactly 0.3 because of the steam requirement. SteamMixer ins... [0] feed phase: 'l', T: 298.15 K, P: 101325 Pa composition (%): Water 9.09 Glucose 90.9 ------- 1.98e+03 kg/hr [1] steam phase: 'g', T: 454.77 K, P: 1.041e+06 Pa composition (%): Water 100 ----- 1.28e+03 kg/hr [2] process_water phase: 'l', T: 298.15 K, P: 101325 Pa composition (%): Water 100 ----- 4.02e+03 kg/hr outs... [0] outlet phase: 'l', T: 431.15 K, P: 557288 Pa composition (%): Water 75.3 Glucose 24.7 ------- 7.29e+03 kg/hr
>>> M1.solids_loading_includes_steam = True >>> M1.simulate() >>> M1.show('cwt100') # Now the outlet solids content is exactly 0.3 SteamMixer ins... [0] feed phase: 'l', T: 298.15 K, P: 101325 Pa composition (%): Water 9.09 Glucose 90.9 ------- 1.98e+03 kg/hr [1] steam phase: 'g', T: 454.77 K, P: 1.041e+06 Pa composition (%): Water 100 ----- 1.02e+03 kg/hr [2] process_water phase: 'l', T: 298.15 K, P: 101325 Pa composition (%): Water 100 ----- 3.01e+03 kg/hr outs... [0] outlet phase: 'l', T: 431.15 K, P: 557288 Pa composition (%): Water 70 Glucose 30 ------- 6.01e+03 kg/hr