tank#

class Tank(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Abstract class for tanks.

vessel_type#

Vessel type.

Type:

str

tau#

Residence time [hr].

Type:

float

V_wf#

Fraction of working volume over total volume.

Type:

float

vessel_material#

Vessel material.

Type:

str

kW_per_m3#

Electricity requirement per unit volume [kW/m^3].

Type:

float

Notes

The total volume [\(m^3\)] is given by:

\(V_{total} = \frac{\tau \cdot Q }{V_{wf}}\)

Where \(\tau\) is the residence time [\(hr\)], \(Q\) is the flow rate [\(\frac{m^3}{hr}\)], and \(V_{wf}\) is the fraction of working volume over total volume.

The number of tanks is given by:

\(N = Ceil \left( \frac{V_{total}}{V_{max}} \right)\)

Where \(V_{max}\) is the maximum volume of a tank depends on the vessel type.

The volume [\(m^3\)] of each tank is given by:

\(V = \frac{V_{total}}{N}\)

The purchase cost will depend on the vessel type.

Child classes should implement the following class attributes and methods:

purchase_cost_algorithmsdict[str: VesselPurchaseCostAlgorithm]

All purchase cost algorithms options for selected vessel types.

class MixTank(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Create a mixing tank with volume based on residence time.

Parameters:
  • ins (Stream], optional) – Inlet fluids to be mixed.

  • outs (Stream], optional) – Outlet.

  • vessel_type (str, optional) – Vessel type. Defaults to ‘Conventional’.

  • tau (float, optional) – Residence time [hr]. Defaults to 1.

  • V_wf (float, optional) – Fraction of working volume over total volume. Defaults to 0.8.

  • vessel_material (str, optional) – Vessel material. Defaults to ‘Stainless steel’.

  • kW_per_m3 (float, optional) – Electricity requirement per unit volume [kW/m^3]. Defaults to 0.0985.

Notes

For a detailed discussion on the design and cost algorithm, please see Tank.

The purchase cost algorithm is based on [1]. The electricity rate is based on [2].

class StorageTank(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Create a storage tank with a purchase cost based on volume as given by residence time.

Parameters:
  • ins (Stream], optional) – Inlet.

  • outs (Stream], optional) – Outlet.

  • vessel_type (str, optional) – Vessel type. Defaults to ‘Field erected’.

  • tau (float, optional) – Residence time [hr]. Defaults to 672.

  • V_wf (float, optional) – Fraction of working volume over total volume. Defaults to 1.

  • vessel_material (str, optional) – Vessel material. Defaults to ‘Stainless steel’.

  • kW_per_m3 (float, optional) – Electricity requirement per unit volume [kW/m^3]. Defaults to 0.

Notes

For a detailed discussion on the design and cost algorithm, please read the Tank documentation.

References to the purchase cost algorithms for each available vessel type are as follows:

  • Field erected: [1]

  • Floating roof: [2]

  • Cone roof: [2]

Examples

Create a carbon steel, floating roof storage tank for the storage of bioethanol:

>>> from biosteam import units, settings, Stream
>>> settings.set_thermo(['Ethanol'], cache=True)
>>> feed = Stream('feed', Ethanol=23e3, units='kg/hr')
>>> effluent = Stream('effluent')
>>> T1 = units.StorageTank('T1', ins=feed, outs=effluent,
...                        tau=7*24, # In hours
...                        vessel_type='Floating roof',
...                        vessel_material='Carbon steel')
>>> T1.simulate()
>>> T1.show(flow='kg/hr')
StorageTank: T1
ins...
[0] feed
    phase: 'l', T: 298.15 K, P: 101325 Pa
    flow (kg/hr): Ethanol  2.3e+04
outs...
[0] effluent
    phase: 'l', T: 298.15 K, P: 101325 Pa
    flow (kg/hr): Ethanol  2.3e+04
>>> T1.results()
Storage tank                         Units       T1
Design              Residence time      hr      168
                    Total volume       m^3 4.92e+03
Purchase cost       Tank (x2)          USD 8.41e+05
Total purchase cost                    USD 8.41e+05
Utility cost                        USD/hr        0

Factories#

tank_factory(name, *, CE, cost, S, tau, n=0.6, kW_per_m3=0.0, V_wf=0.9, V_min=0.0, V_max=1000000.0, V_units='m3', material='Carbon steel', vessel_type='Tank', BM=None, module=None, mixing=False)[source]#

Return a Tank sublcass.

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

  • CE (float) – Chemical plant cost index.

  • cost (float) – Cost of tank.

  • S (float) – Size of tank.

  • tau (float) – Residence time [hr].

  • n (float, optional) – Scale up factor. The default is 0.6.

  • kW_per_m3 (float, optional) – Electricity consumption per volume [kW/m3]. The default is 0..

  • V_wf (float, optional) – Fraction of working volume. The default is 0.9.

  • V_min (float, optional) – Minimum tank volume. The default is 0..

  • V_max (float, optional) – Maximum tank volume. The default is 1e6.

  • V_units (str, optional) – Volume units of measure. The default is ‘m3’.

  • material (str, optional) – Vessel material. The default is ‘Carbon steel’.

  • vessel_type (str, optional) – Name of vessel type. The default is ‘Tank’.

  • BM (float, optional) – Bare module factor. The default is 2.3 for all tanks.

  • module (str, optional) – Module to implement class.

  • mixing (bool, optional) – Whether multiple streams are mixed in the tank.

Examples

>>> import biosteam as bst
>>> Corn = bst.Chemical('Corn', search_db=False, default=True, phase='s')
>>> bst.settings.set_thermo([Corn])
>>> CornStorage = bst.tank_factory('CornStorage',
...     CE=525, cost=979300., S=185400, tau=259.2, n=1.0, V_wf=0.9, V_max=3e5,
...     V_units='m3'
... )
>>> corn = bst.Stream('corn', Corn=46350.72444)
>>> T101 = CornStorage('T101', corn, 'outlet')
>>> T101.simulate()
>>> T101.show()
CornStorage: T101
ins...
[0] corn
    phase: 'l', T: 298.15 K, P: 101325 Pa
    flow (kmol/hr): Corn  4.64e+04
outs...
[0] outlet
    phase: 'l', T: 298.15 K, P: 101325 Pa
    flow (kmol/hr): Corn  4.64e+04
>>> T101.results()
Corn storage                         Units     T101
Design              Residence time      hr      259
                    Total volume       m^3 1.33e+04
Purchase cost       Tank               USD 7.62e+04
Total purchase cost                    USD 7.62e+04
Utility cost                        USD/hr        0

References