Skip to content

Economics & sizing

Differentiable equipment sizing, purchased- and bare-module costing, utility costs, and profitability metrics (total annual cost, net present value). Because the correlations are differentiable, capital and operating cost can enter an objective directly.

See the optimization, design & economics guide for worked examples.

economics

Differentiable equipment sizing, capital/operating costing, and economics.

To optimize a process you need an objective with units of money, and that means sizing equipment and costing it. This module supplies smooth, differentiable correlations for both, so a total-annual-cost or net-present-value objective plugs straight into the gradient-based optimizers in fugacio.sim.optimize: you can take the derivative of installed cost with respect to a reflux ratio or a heat-exchanger approach temperature.

Sizing

Physically-grounded sizing from process quantities: heat-exchanger area from duty and a log-mean temperature difference, column diameter from the Souders-Brown flooding velocity, vessel volume from a residence time, and so on.

Costing

The Turton correlations (Turton et al., Analysis, Synthesis and Design of Chemical Processes) for purchased and bare-module cost:

  • purchased cost log10 Cp0 = K1 + K2 log10 A + K3 (log10 A)^2 in the size attribute A;
  • a pressure factor log10 F_P = C1 + C2 log10 P + C3 (log10 P)^2;
  • the bare-module cost C_BM = Cp0 (B1 + B2 F_M F_P) with a material factor F_M;
  • escalation from the correlation basis (CEPCI 397, year 2001) to a target CEPCI.

These are smooth in the size and pressure, hence differentiable. The bundled coefficients are representative textbook values for screening-level estimates, not a substitute for a vendor quote.

Operating cost & finance

Utility pricing on an energy basis, the capital-recovery factor, total annual cost, net present value, and discounted payback, all differentiable.

Classes:

Name Description
EquipmentCost

Costed equipment item.

Utility

A priced utility on an energy basis.

Functions:

Name Description
lmtd

Log-mean temperature difference of the two terminal approaches.

heat_exchanger_area

Required heat-transfer area A = |Q| / (U * LMTD) (m^2).

vapor_molar_volume_ideal

Ideal-gas molar volume V = R T / P (m^3/mol), a sizing convenience.

column_diameter

Column (or knock-out drum) diameter from the Souders-Brown flooding velocity.

column_height

Tangent-to-tangent column height from the stage count and tray spacing (m).

vessel_volume

Vessel volume from a volumetric flow and liquid residence time (m^3).

cylinder_volume

Volume of a vertical cylinder (m^3), a column shell from its size.

purchased_cost

Purchased equipment cost Cp0 at the correlation basis (CEPCI 397), in $.

pressure_factor

Turton pressure factor F_P (>= 1) for the equipment at gauge pressure (barg).

bare_module_cost

Installed (bare-module) cost C_BM escalated to the target CEPCI.

utility_cost

Annual cost of a utility duty ($/yr) from its energy price.

capital_recovery_factor

Capital-recovery factor i(1+i)^n / ((1+i)^n - 1) for interest i over n years.

annualized_capital

Annualized capital charge CRF * CAPEX ($/yr).

total_annual_cost

Total annual cost TAC = CRF * CAPEX + OPEX ($/yr), the screening objective.

npv

Net present value of a cash-flow stream (index 0 is now), discounted at rate.

discounted_payback

Discounted payback period (years) for a uniform annual cash inflow.

installed_capital

Total installed capital from a list of costed items (optionally Lang-scaled).

EquipmentCost

Bases: NamedTuple

Costed equipment item.

Attributes:

Name Type Description
kind str

Equipment kind (key into the Turton table).

size Array

The sizing attribute used (area m^2, power kW, or volume m^3).

purchased Array

Purchased cost Cp0 escalated to the target CEPCI ($).

bare_module Array

Installed bare-module cost C_BM ($).

Utility dataclass

Utility(name: str, price_per_gj: float)

A priced utility on an energy basis.

Attributes:

Name Type Description
name str

Utility name.

price_per_gj float

Price ($/GJ of heating or cooling delivered).

lmtd

lmtd(dt1: ArrayLike, dt2: ArrayLike) -> Array

Log-mean temperature difference of the two terminal approaches.

Smooth everywhere for positive approaches: as dt1 -> dt2 the value tends to their common limit, with a series expansion used near equality so the gradient stays finite.

heat_exchanger_area

heat_exchanger_area(
    duty: ArrayLike,
    u: ArrayLike,
    dt_hot: ArrayLike,
    dt_cold: ArrayLike,
) -> Array

Required heat-transfer area A = |Q| / (U * LMTD) (m^2).

Parameters:

Name Type Description Default
duty ArrayLike

Heat duty Q (W); the magnitude is used.

required
u ArrayLike

Overall heat-transfer coefficient (W/m^2/K).

required
dt_hot ArrayLike

Terminal temperature approach at the hot end (K).

required
dt_cold ArrayLike

Terminal temperature approach at the cold end (K).

required

vapor_molar_volume_ideal

vapor_molar_volume_ideal(
    t: ArrayLike, p: ArrayLike
) -> Array

Ideal-gas molar volume V = R T / P (m^3/mol), a sizing convenience.

column_diameter

column_diameter(
    vapor_molar_flow: ArrayLike,
    vapor_density: ArrayLike,
    liquid_density: ArrayLike,
    *,
    molar_mass: ArrayLike = 0.05,
    k_drum: ArrayLike = 0.07,
    flooding: ArrayLike = 0.8,
) -> Array

Column (or knock-out drum) diameter from the Souders-Brown flooding velocity.

The maximum vapour velocity is u_max = k sqrt((rho_L - rho_V)/rho_V); the diameter follows from the volumetric vapour load at the design fraction of flooding.

Parameters:

Name Type Description Default
vapor_molar_flow ArrayLike

Vapour molar flow (mol/s).

required
vapor_density ArrayLike

Vapour mass density (kg/m^3).

required
liquid_density ArrayLike

Liquid mass density (kg/m^3).

required
molar_mass ArrayLike

Vapour molar mass (kg/mol) to convert molar to mass flow.

0.05
k_drum ArrayLike

Souders-Brown coefficient (m/s).

0.07
flooding ArrayLike

Design fraction of the flooding velocity.

0.8

Returns:

Type Description
Array

Diameter (m).

column_height

column_height(
    n_stages: ArrayLike,
    *,
    tray_spacing: ArrayLike = 0.6,
    extra: ArrayLike = 4.0,
) -> Array

Tangent-to-tangent column height from the stage count and tray spacing (m).

vessel_volume

vessel_volume(
    volumetric_flow: ArrayLike,
    *,
    residence_time: ArrayLike = 300.0,
    fill: ArrayLike = 0.5,
) -> Array

Vessel volume from a volumetric flow and liquid residence time (m^3).

cylinder_volume

cylinder_volume(
    diameter: ArrayLike, height: ArrayLike
) -> Array

Volume of a vertical cylinder (m^3), a column shell from its size.

purchased_cost

purchased_cost(kind: str, size: ArrayLike) -> Array

Purchased equipment cost Cp0 at the correlation basis (CEPCI 397), in $.

Uses log10 Cp0 = K1 + K2 log10 A + K3 (log10 A)^2 with A the equipment's capacity attribute (see _TURTON). The size is clipped to the correlation's validity range before the (smooth) evaluation.

pressure_factor

pressure_factor(
    kind: str, pressure_barg: ArrayLike
) -> Array

Turton pressure factor F_P (>= 1) for the equipment at gauge pressure (barg).

bare_module_cost

bare_module_cost(
    kind: str,
    size: ArrayLike,
    *,
    pressure_barg: ArrayLike = 0.0,
    material: str = "CS",
    cepci: ArrayLike = CEPCI_DEFAULT,
) -> EquipmentCost

Installed (bare-module) cost C_BM escalated to the target CEPCI.

C_BM = Cp0 (B1 + B2 F_M F_P) with a material factor F_M and pressure factor F_P, all escalated by cepci / CEPCI_REF.

Parameters:

Name Type Description Default
kind str

Equipment kind (key in the Turton table).

required
size ArrayLike

Capacity attribute (area m^2, power kW, or volume m^3).

required
pressure_barg ArrayLike

Design gauge pressure (barg) for the pressure factor.

0.0
material str

Material-of-construction key ("CS", "SS", ...).

'CS'
cepci ArrayLike

Target cost index.

CEPCI_DEFAULT

Returns:

Type Description
EquipmentCost

An EquipmentCost.

utility_cost

utility_cost(
    duty_w: ArrayLike,
    kind: str,
    *,
    hours_per_year: ArrayLike = HOURS_PER_YEAR,
) -> Array

Annual cost of a utility duty ($/yr) from its energy price.

Parameters:

Name Type Description Default
duty_w ArrayLike

Duty (W); the magnitude is used (heating or cooling alike).

required
kind str

Utility key in UTILITIES.

required
hours_per_year ArrayLike

Operating hours per year.

HOURS_PER_YEAR

capital_recovery_factor

capital_recovery_factor(
    rate: ArrayLike, years: ArrayLike
) -> Array

Capital-recovery factor i(1+i)^n / ((1+i)^n - 1) for interest i over n years.

annualized_capital

annualized_capital(
    capex: ArrayLike,
    *,
    rate: ArrayLike = 0.1,
    years: ArrayLike = 10.0,
) -> Array

Annualized capital charge CRF * CAPEX ($/yr).

total_annual_cost

total_annual_cost(
    capex: ArrayLike,
    opex: ArrayLike,
    *,
    rate: ArrayLike = 0.1,
    years: ArrayLike = 10.0,
) -> Array

Total annual cost TAC = CRF * CAPEX + OPEX ($/yr), the screening objective.

npv

npv(cash_flows: Array, *, rate: ArrayLike = 0.1) -> Array

Net present value of a cash-flow stream (index 0 is now), discounted at rate.

discounted_payback

discounted_payback(
    capex: ArrayLike,
    annual_cash: ArrayLike,
    *,
    rate: ArrayLike = 0.1,
) -> Array

Discounted payback period (years) for a uniform annual cash inflow.

Solves CAPEX = annual_cash * (1 - (1+i)^-n) / i for n in closed form; smooth and differentiable in all arguments.

installed_capital

installed_capital(
    items: list[EquipmentCost],
    *,
    lang_factor: ArrayLike = 1.0,
) -> Array

Total installed capital from a list of costed items (optionally Lang-scaled).