HeatUtility#

HeatUtility objects take care of finding utility requirements.

class HeatUtility(heat_transfer_efficiency=None, unit=None, hxn_ok=False)[source]#

Create an HeatUtility object that can choose a utility stream and calculate utility requirements. It can calculate required flow rate, temperature change, or phase change of utility. Calculations assume counter current flow rate.

Parameters:
  • heat_transfer_efficiency (float, optional) – Enforced fraction of heat transferred from utility (due to losses to environment).

  • unit (Unit, optional) – Parent unit using this heat utility.

  • hxn_ok (bool, optional) – Whether heat utility can be satisfied within a heat exchanger network.

Examples

Create a heat utility:

>>> from biosteam import HeatUtility
>>> hu = HeatUtility()
>>> hu.show()
HeatUtility: None
 duty: 0
 flow: 0
 cost: 0

Calculate utility requirement by calling it with a duty (kJ/hr), and entrance and exit temperature (K):

>>> hu(1000, 300, 350)
>>> hu.show()
HeatUtility: low_pressure_steam
 duty: 1.05e+03 kJ/hr
 flow: 0.0272 kmol/hr
 cost: 0.00647 USD/hr

All results are accessible:

>>> hu.ID, hu.duty, hu.flow, hu.cost
('low_pressure_steam', 1052.6315789473686, 0.02721274387089031, 0.006471190492497716)

All results are accessible:

>>> hu.ID, hu.duty, hu.flow, hu.cost
('low_pressure_steam', 1052.6315789473686, 0.02721274387089031, 0.006471190492497716)
dT: float = 5#

Minimum approach temperature difference. Used to assign the pinch temperature of the utility stream.

display_units: Display:py:class:`~biosteam.Unit`s = DisplayUnits(duty='kJ/hr', flow='kmol/hr', cost='USD/hr')#

Units of measure for IPython display.

thermo_water: Thermo = Thermo(chemicals=CompiledChemicals([Water]), mixture=Mixture(rule='ideal', ..., include_excess_energies=False), Gamma=DortmundActivityCoefficients, Phi=IdealFugacityCoefficients, PCF=MockPoyintingCorrectionFactors)#

Used broadly throughout BioSTEAM utilities.

thermo_propane: Thermo = Thermo(chemicals=CompiledChemicals([Propane]), mixture=Mixture(rule='ideal', ..., include_excess_energies=False), Gamma=DortmundActivityCoefficients, Phi=IdealFugacityCoefficients, PCF=MockPoyintingCorrectionFactors)#

Used for BioSTEAM refrigeration utility.

characterization_factors: dict[tuple[str, str], tuple[float, Absolute:py:class:`~biosteam.Unit`sOfMeasure]] = {}#

Characterization factor data (value and units) by agent ID and impact key.

cooling_agents: list[UtilityAgent] = [<UtilityAgent: cooling_water>, <UtilityAgent: chilled_water>, <UtilityAgent: chilled_brine>, <UtilityAgent: propane>]#

All cooling utilities available.

heating_agents: list[UtilityAgent] = [<UtilityAgent: low_pressure_steam>, <UtilityAgent: medium_pressure_steam>, <UtilityAgent: high_pressure_steam>]#

All heating utilities available.

classmethod set_CF(ID, key, value, basis=None, units=None)[source]#

Set the characterization factor of a utility agent for a given impact key.

Parameters:
  • ID (str) – ID of utility agent.

  • key (str) – Key of impact indicator.

  • value (float) – Characterization factor value.

  • basis (str, optional) – Basis of characterization factor. Valid dimensions include weight, molar, and energy (e.g. ‘kg’, ‘kmol’, ‘kJ’). Defaults to ‘kg’.

  • units (str, optional) – Units of impact indicator. Before using this argument, the default units of the impact indicator should be defined with settings.define_impact_indicator. Units must also be dimensionally consistent with the default units.

Raises:
  • ValueError – When the duty characterization factor for a cooling agent is positive (should be negative).

  • DimensionError – When characterization factor is not given in dimensions of weight, molar, or energy.

Examples

Set the GWP characterization factor for low pressure steam at 88.44 kg CO2e / mmBtu (GREET 2020; Steam Production via Small Boiler from North American Natural Gas):

>>> import biosteam as bst
>>> bst.HeatUtility.set_CF('low_pressure_steam', 'GWP [kg CO2e]', 88.44, basis='MMBtu')

Retrieve the GWP characterization factor for low pressure steam on a Btu basis:

>>> bst.HeatUtility.get_CF('low_pressure_steam', 'GWP [kg CO2e]', basis='Btu')
8.844e-05
classmethod get_CF(ID, key, basis=None, units=None)[source]#

Return the characterization factor of a utility agent for a given impact key.

Parameters:
  • ID (str) – ID of utility agent.

  • key (str) – Key of impact indicator.

  • basis (str, optional) – Basis of characterization factor. Valid dimensions include weight, molar, and energy (e.g. ‘kg’, ‘kmol’, ‘kJ’). Defaults to ‘kg’.

  • units (str, optional) – Units of impact indicator. Before using this argument, the default units of the impact indicator should be defined with settings.define_impact_indicator. Units must also be dimensionally consistent with the default units.

Raises:

DimensionalityError – When the characterization factor cannot be converted to the given basis due to inconsistent dimensions with the original basis.

heat_transfer_efficiency: float#

Enforced fraction of heat transferred from utility (due to losses to environment).

unit: Unit | None#

Parent unit using this heat utility.

hxn_ok: bool#

Whether heat utility can be satisfied within a heat exchanger network.

duty: float#

Total heat transferred from utility to both the process and the environment [kJ/hr].

unit_duty: float#

Effective heat transferred from utility to the unit operation [kJ/hr].

flow: float#

Flow rate of utility [kmol/hr].

cost: float#

Cost of utility [USD/hr].

agent: UtilityAgent | None#

Utility agent being used.

inlet_utility_stream: Stream | None#

Fresh utility stream

outlet_utility_stream: Stream | None#

Used utility stream

property ID: str#

ID of utility agent being used.

classmethod default_agents()[source]#

Reset all agents back to BioSTEAM’s defaults.

classmethod default_heating_agents()[source]#

Reset all heating agents back to BioSTEAM’s defaults.

classmethod default_cooling_agents()[source]#

Reset all cooling agents back to BioSTEAM’s defaults.

copy_like(other)[source]#

Copy all data from another heat utility.

scale(factor)[source]#

Scale utility data.

empty()[source]#

Remove utility requirements.

__call__(unit_duty, T_in, T_out=None, agent=None)[source]#

Calculate utility requirements given the essential parameters.

Parameters:
  • unit_duty (float) – Unit duty requirement [kJ/hr]

  • T_in (float) – Inlet process stream temperature [K]

  • T_out (float, optional) – Outlet process stream temperature [K]

  • agent (UtilityAgent, optional) – Utility agent to use. Defaults to a suitable agent from predefined heating/cooling utility agents.

property inlet_process_stream: Stream#

If a heat exchanger is available, this stream is the inlet process stream to the heat exchanger.

property outlet_process_stream: Stream#

If a heat exchanger is available, this stream is the outlet process stream to the heat exchanger.

static heat_utilities_by_agent(heat_utilities)[source]#

Return a dictionary of heat utilities sorted by agent ID.

classmethod sum(heat_utilities)[source]#

Return a HeatUtility object that reflects the sum of heat utilities.

classmethod sum_by_agent(heat_utilities)[source]#

Return a list of heat utilities that reflect the sum of heat utilities by agent.

classmethod get_agent(ID)[source]#

Return utility agent with given ID.

classmethod get_heating_agent(ID)[source]#

Return heating agent with given ID.

classmethod get_cooling_agent(ID)[source]#

Return cooling agent with given ID.

classmethod get_suitable_heating_agent(T_pinch)[source]#

Return a heating agent that works at the pinch temperature.

Parameters:

T_pinch (float) – Pinch temperature [K].

classmethod get_suitable_cooling_agent(T_pinch)[source]#

Return a cooling agent that works at the pinch temperature.

Parameters:

T_pinch (float) – Pinch temperature [K].

load_agent(agent)[source]#

Initialize utility streams with given agent.

mix_from(heat_utilities)[source]#

Mix all heat utilities to this heat utility.

reverse()[source]#

Reverse direction of utility. If utility is being consumed, the utility is produced instead, and vice-versa.

static get_outlet_temperature(T_pinch, T_limit, iscooling)[source]#

Return outlet temperature of the utility in a counter current heat exchanger

Parameters:
  • T_pinch (float) – Pinch temperature of utility stream [K].

  • iscooling (bool) – True if utility is loosing energy.

classmethod get_inlet_and_outlet_pinch_temperature(iscooling, T_in, T_out)[source]#

Return pinch inlet and outlet temperature of utility.

get_property(name, units=None)#

Return property in requested units.

Parameters:
  • name (str) – Name of property.

  • units (str, optional) – Units of measure. Defaults to the property’s original units of measure.

set_property(name, value, units=None)#

Set property in given units.

Parameters:
  • name (str) – Name of property.

  • value (float) – New value of property.

  • units (str, optional) – Units of measure.

show(duty=None, flow=None, cost=None)[source]#

Print all specifications