Junction#
- class Junction(ID='', upstream=None, downstream=None, thermo=None)[source]#
Create a Junction object that copies data from upstream to downstream. This serves to connect streams with different property packages.
- Parameters:
Examples
Create a Junction object and connect streams with different chemicals:
>>> from biosteam import * >>> settings.set_thermo(['Water']) >>> s1 = Stream('s1', Water=20) >>> settings.set_thermo(['Ethanol', 'Water'], cache=True) >>> s2 = Stream('s2') # Note that s2 and s1 have different chemicals defined >>> J1 = units.Junction('J1', s1, s2) >>> J1.simulate() >>> J1.show() Junction: J1 ins... [0] s1 phase: 'l', T: 298.15 K, P: 101325 Pa flow (kmol/hr): Water 20 outs... [0] s2 phase: 'l', T: 298.15 K, P: 101325 Pa flow (kmol/hr): Water 20
-
power_utility(power):
PowerUtility
= PowerUtility(consumption=0.0, production=0.0)# Electric utility associated to unit (including auxiliary requirements).
-
design_results:
dict
[str
, object] = {}# All design requirements excluding utility requirements and detailed auxiliary unit requirements.
-
baseline_purchase_costs:
dict
[str
,float
] = {}# All baseline purchase costs without accounting for design, pressure, and material factors.
-
purchase_costs:
dict
[str
,float
] = {}# Itemized purchase costs (including auxiliary units) accounting for design, pressure, and material factors (i.e.,
F_D
,F_P
,F_M
). Items here are automatically updated at the end of unit simulation.
-
installed_costs:
dict
[str
,float
] = {}# All installed costs accounting for bare module, design, pressure, and material factors. Items here are automatically updated at the end of unit simulation.
-
heat_utilities:
list
[HeatUtility
, ...]# All heat utilities associated to unit. Cooling and heating requirements are stored here (including auxiliary requirements).
- simulate()#
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
-
line:
str
= 'Junction'# class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class
-
F_BM:
dict
[str
,float
]# All bare-module factors for each purchase cost. Defaults to values in the class attribute
_F_BM_default
.
-
equipment_lifetime:
int
|dict
[str
,int
]# Lifetime of equipment. Defaults to values in the class attribute
_default_equipment_lifetime
. Use an integer to specify the lifetime for all items in the unit purchase costs. Use a dictionary to specify the lifetime of each purchase cost item.
-
run_after_specifications:
bool
# Whether to run mass and energy balance after calling specification functions