utils#
- rename_unit(unit, area)[source]#
Rename unit according to area convention.
- Parameters:
unit (
biosteam.Unit
) – Unit to rename.area (int) – Ending number.
Notes
The area convention follows “{letter}{area + number}” where the letter depends on the unit operation as follows:
C = Centrifuge
D = Distillation column
E = Evaporator
F = Flash tank
H = Heat exchange
K = Compressor
Ʞ = Turbine
M = Mixer
P = Pump (including conveying belt)
R = Reactor
S = Splitter (including solid/liquid separator)
T = Tank or bin for storage
U = Other units
V = Valve
J = Junction, not a physical unit (serves to adjust streams)
PS = Process specificiation, not a physical unit (serves to adjust streams)
Examples
>>> from biosteam import * >>> main_flowsheet.clear() # Remove any previous data >>> settings.set_thermo(['Water', 'Ethanol'], cache=True) >>> M1 = Mixer('M1') >>> rename_unit(M1, 200) >>> print(M1) M201
- rename_units(units, area)[source]#
Rename units according to area convention.
- Parameters:
units (Set[
biosteam.Unit
]) – Units to rename.area (int) – Ending number.
Notes
The area convention follows “{letter}{area + number}” where the letter depends on the unit operation as follows:
C = Centrifuge
D = Distillation column
E = Evaporator
F = Flash tank
H = Heat exchange
K = Compressor
M = Mixer
P = Pump (including conveying belt)
R = Reactor
S = Splitter (including solid/liquid separator)
T = Tank or bin for storage
U = Other units
J = Junction, not a physical unit (serves to adjust streams)
PS = Process specificiation, not a physical unit (serves to adjust streams)
Examples
>>> from biosteam import * >>> main_flowsheet.clear() # Remove any previous data >>> settings.set_thermo(['Water', 'Ethanol'], cache=True) >>> units = [Mixer(), ... Mixer(), ... ShortcutColumn(LHK=['Ethanol', 'Water'], k=1.2, Lr=0.8, Hr=0.9), ... Flash(P=101325, V=0.5), ... Pump(), ... Splitter(split=0.5), ... MixTank(), ... StorageTank(), ... MultiEffectEvaporator(P=[101325, 9e4], V=0.5)] >>> rename_units(units, 200) >>> units [<Mixer: M201>, <Mixer: M202>, <ShortcutColumn: D201>, <Flash: F201>, <Pump: P201>, <Splitter: S201>, <MixTank: T201>, <StorageTank: T202>, <MultiEffectEvaporator: E201>]
>>> # ID conflicts are taken care of internally >>> mixer, *other_units = units >>> rename_units(other_units, 200) >>> units [<Mixer: M201>, <Mixer: M202>, <ShortcutColumn: D201>, <Flash: F201>, <Pump: P201>, <Splitter: S201>, <MixTank: T201>, <StorageTank: T202>, <MultiEffectEvaporator: E201>]
- heat_exchanger_utilities_from_units(units)[source]#
Return a list of heat utilities from all heat exchangers, including the condensers and boilers of distillation columns and flash vessel heat exchangers.
- get_utility_flow(heat_utilities, agent)[source]#
Return the total utility duty of heat utilities for given agent in GJ/hr
- get_utility_duty(heat_utilities, agent)[source]#
Return the total utility duty of heat utilities for given agent in GJ/hr
- get_purchase_cost(units)[source]#
Return the total equipment purchase cost of all units in million USD.
- get_installed_cost(units)[source]#
Return the total installed equipment cost of all units in million USD.
- get_cooling_duty(heat_utilities, filter_savings=True)[source]#
Return the total cooling duty of all heat utilities in GJ/hr.
- get_heating_duty(heat_utilities, filter_savings=True)[source]#
Return the total heating duty of all heat utilities in GJ/hr.
- get_electricity_consumption(power_utilities)[source]#
Return the total electricity consumption of all PowerUtility objects in MW.
- get_electricity_production(power_utilities)[source]#
Return the total electricity production of all PowerUtility objects in MW.
- get_tea_results(tea, product=None, feedstock=None)[source]#
Return a dictionary with general TEA results.
- volume_of_chemical_in_units(units, chemical)[source]#
Return volume of chemical that is occupied in given units [m^3].
- set_construction_material(units, pressure_vessel_material, tray_material, tank_material, heat_exchanger_material, pump_material)[source]#
Set the construction material of all vessels, columns, trays, heat exchangers, and pumps
- Parameters:
units (Iterable[Unit]) – Unit operations to set construction material.
pressure_vessel_material (str) – Construction material for pressure vessels (includes distillation columns and flash vessels).
tray_material (str) – Construction material for column trays.
tank_material (str) – Construction material for tanks.
pump_material (str) – Construction material for pumps.
- set_construction_material_to_stainless_steel(units, kind='304')[source]#
Set the construction material of all vessels, columns, trays, heat exchangers, and pumps to stainless steel.
- Parameters:
kind (str, "304" or "316") – Type of stainless steel.
- set_construction_material_to_carbon_steel(units)[source]#
Set the construction material of all vessels, columns, trays, heat exchangers, and pumps to carbon steel or cast iron.
- get_OSBL(units)[source]#
Return a list of unit operations that would typically be classified as out-of-boundary-limits, just as storage tanks, cooling towers, and other facilities.