TEA¶
Note: This class was originally named SimpleTEA, but it has been deprecated as the TEA algorithms have been enhanced and no longer “simple” :).
- class qsdsan.TEA(system, discount_rate=0.05, income_tax=0.0, CEPCI=None, start_year=2026, lifetime=10, uptime_ratio=1.0, CAPEX=0.0, lang_factor=None, annual_maintenance=0.0, annual_labor=0.0, system_add_OPEX={}, depreciation='SL', construction_schedule=(0, 1), accumulate_interest_during_construction=False, simulate_system=True, simulate_kwargs={}, **tea_kwargs)¶
Techno-economic analysis (TEA) with a simplified capital cost structure, unit-level operating cost components, and annualized cost metrics. Discounted cash flow is also included for net present value (NPV) and internal rate of return (IRR) calculations.
Key design choices:
Uses
start_year+lifetimeto indicate project duration.Uses
uptime_ratio(fraction in [0, 1]) to indicate operating time.Collapses the capital cost hierarchy so DPI (direct permanent investment) = TDC (total depreciable capital) = FCI (fixed capital investment) = installed equipment cost by default (no indirect cost adders applied unless
_DPI/_TDC/_FCIare overridden in a subclass).Exposes
CAPEXas a direct override for installed equipment cost, andlang_factoras an alternative to bare-module factors.Decomposes fixed operating cost (FOC) into
annual_maintenance(fraction of FCI),annual_labor, and additional operating expenditures from individual units (unit_add_OPEX) and at the system level (system_add_OPEX).Adds annualized cost properties:
annualized_NPV,annualized_CAPEX,annualized_equipment_cost, andEAC(equivalent annual cost).Defaults to 100% equity financing, though loan financing is still available via
finance_interest,finance_years, andfinance_fraction.
- Parameters:
system (obj) – The system this TEA is conducted for.
discount_rate (float) –
Discount rate used in the discounted cash flow analysis.
Note
Herein
discount_rateequalsIRR(internal rate of return). Technically, IRR equals the discount rate only when NPV is 0.income_tax (float) – Combined tax rate (e.g., sum of national, state, and local levels) applied to net earnings.
start_year (int) – Calendar year in which the system begins operation.
lifetime (int) –
Total operating lifetime of the system, [yr].
Note
The depreciation schedule must fit within the lifetime (its length must be <=
lifetime). The default'SL'(straight line) spans the whole lifetime and always fits, so there is no minimum. MACRS schedules run one year longer than their name (IRS half-year convention), e.g.'MACRS5'is a 6-year schedule (needslifetime >= 6) and'MACRS7'needslifetime >= 8. Seedepreciation.uptime_ratio (float) –
Fraction of time the system is operating, in [0, 1]. A continuously operating system has
uptime_ratio = 1.Note
If a unit has a different
uptime_ratiothan the system, the unit’s value is used only when scaling itsadd_OPEX. Utility and material costs are always scaled to the system’s operating hours. Flows that do not match the systemuptime_ratioshould be normalized before being assigned to the unit (e.g., a pump that runs 50% of the time at 50 kW should havepower_utilityset to 25 kW).CEPCI (float, optional) – Chemical Engineering Plant Cost Index used for equipment cost scaling. If None (default), the current
qsdsan.CEPCI(i.e.,biosteam.CE) is left unchanged; pass a value (e.g.,qsdsan.CEPCI_by_year[2023]) to set it.CAPEX (float) – Total capital expenditure. When provided, overrides
installed_equipment_cost.lang_factor (float or None) – Multiplier applied to total equipment purchase cost to estimate installed cost. Mutually exclusive with
CAPEX; leave asNonewhenCAPEXis provided. If neither is given, installed cost is summed from each unit’s bare-module factors.annual_maintenance (float) – Annual maintenance cost as a fraction of fixed capital investment (FCI).
annual_labor (float) – Annual labor cost [USD/yr].
system_add_OPEX (float or dict) – Additional annual operating expenditure at the system level, on top of the
add_OPEXof individual units. A float is automatically converted to a dict keyed"System additional OPEX".depreciation (str) – Depreciation schedule:
'SL'(straight line, default),'DDB'(double-declining balance),'SYD'(sum-of-years-digits), or a MACRS schedule ('MACRS3','MACRS5','MACRS7','MACRS10', …). The schedule length must be <=lifetime. Depreciation only affects results when there is taxable income to shield (i.e.income_tax> 0 and positive net earnings).construction_schedule (tuple) – Fraction of total capital invested in each year prior to start-up; must sum to 1. Use the default
(0, 1)if no staged construction is needed.accumulate_interest_during_construction (bool) – If
False(default), loan interest accrued during construction is paid from equity and not rolled into the loan principal. IfTrue, accrued interest is capitalized onto the loan principal. See https://github.com/BioSTEAMDevelopmentGroup/biosteam/issues/180 for details.simulate_system (bool) – Whether to simulate the system before creating the TEA object.
simulate_kwargs (dict) – Keyword arguments passed to
system.simulate()whensimulate_systemisTrue.tea_kwargs – Additional keyword arguments for the underlying cash flow model. Defaults (in parentheses):
startup_months(0),startup_FOCfrac(1),startup_VOCfrac(1),startup_salesfrac(1),WC_over_FCI(0),finance_interest(0),finance_years(0),finance_fraction(0).
Examples
A system should be constructed prior to TEA, here we import a pre-constructed one.
>>> import qsdsan as qs >>> from qsdsan.utils import create_example_system >>> sys = create_example_system() >>> # Uncomment the line below to see the system diagram >>> # sys.diagram() >>> sys.simulate() >>> sys.show() System: sys ins... [0] salt_water... phase: 'l', T: 298.15 K, P: 101325 Pa flow (kmol/hr): H2O 111 NaCl 0.856 [1] methanol... phase: 'l', T: 298.15 K, P: 101325 Pa flow...Methanol [2] ethanol... phase: 'l', T: 298.15 K, P: 101325 Pa flow...Ethanol outs... [0] alcohols... phase: 'l', T: 298.15 K, P: 101325 Pa flow (kmol/hr): Methanol 0.624 Ethanol 0.217 [1] waste_brine... phase: 'l', T: 350 K, P: 101325 Pa flow (kmol/hr): H2O 88.8 NaCl 0.684 >>> tea = qs.TEA(system=sys, discount_rate=0.05, start_year=2021, ... lifetime=10, uptime_ratio=0.9, ... system_add_OPEX=0.03) >>> # Your results maybe slightly different depending on the version of >>> # QSDsan's dependent packages (e.g., thermo) >>> tea.show() TEA: sys NPV : -259,...
See also
- property CAPEX¶
[float] Capital expenditure, if not provided, is set to be the same as self.TCI.
- property CEPCI¶
[float] Chemical Engineering Plant Cost Index.
- property CEPCI_by_year¶
[dict] Chemical Engineering Plant Cost Index with key being the year and values being the index. Same as
qsdsan.CEPCI_by_year.
- property DPI¶
[float] Direct permanent investment, calculated using self._DPI as a function of installed_equipment_cost.
- property EAC¶
[float] Equivalent annual cost calculated as the sum of annualized_CAPEX and AOC (annual operating cost).
Note
Sales are not included.
- property FCI¶
[float] Fixed capital investment, calculated using self._FCI as a function of self.TDC.
- property FOC¶
[float] Fixed operating cost, including maintenance, labor, and any additional operating expenditure other than chemical inputs and utilities.
- IRR: float¶
Internal rate of return (fraction).
- property TCI¶
[float] Total capital investment, calculated as self._FCI*(1+self.WC_over_FCI) (WC for working capital).
- property TDC¶
[float] Total depreciable capital, calculated using self._TDC as a function of self.DPI.
- WC_over_FCI: float¶
Working capital as a fraction of fixed capital investment.
- accumulate_interest_during_construction¶
Whether to immediately pay interest before operation or to accumulate interest during construction
- property annual_labor¶
[float] Annual labor cost.
- property annual_maintenance¶
[float] Annual maintenance cost as a fraction of fixed capital investment.
- property annualized_CAPEX¶
[float] Annualized capital expenditure calculated through annualized NPV as:
\[annualized\ capital\ cost = annual\ net\ earning - annualized\ NPV\]Note
Read the tutorial about the difference between annualized_CAPEX and annualized_equipment_cost.
- property annualized_NPV¶
[float] Annualized NPV calculated as:
\[annualized\ NPV = \frac{NPV*r}{(1-(1+r)^{-lifetime})}\]
- property annualized_equipment_cost¶
[float] Annualized equipment cost representing the sum of the annualized cost of each equipment, calculated using
get_unit_annualized_equipment_cost.
- property currency¶
[str] TEA currency, same with qsdsan.currency.
- property discount_rate¶
[float] Interest rate used in discounting, same as IRR in
biosteam.TEA.
- property duration¶
[int] Duration of the system based on start_year and lifetime.
- property feeds¶
[
qsdsan.WasteStream] System feed streams.
- finance_fraction: float¶
Fraction of capital cost that needs to be financed.
- finance_interest: float¶
Yearly interest of capital cost financing as a fraction.
- finance_years: int¶
Number of years the loan is paid for.
- get_unit_annualized_equipment_cost(units=None)¶
Annualized equipment cost representing the sum of the annualized cost of each equipment, which is calculated as:
\[annualized\ equipment\ cost = \frac{equipment\ installed\ cost}{(1-(1+r)^{-lifetime})}\]Note
Read the tutorial about the difference between annualized_CAPEX and annualized_equipment_cost.
- income_tax: float¶
Combined federal and state income tax rate (fraction).
- property installed_equipment_cost¶
[float] Sum of installed cost of all units in the system, is the same as CAPEX if CAPEX is provided.
- property lang_factor¶
[float] A factor to estimate the total installation cost based on equipment purchase cost.
- property lifetime¶
[int] Total lifetime of the system, [yr]. Currently biosteam only supports int.
- property operating_days¶
[float] Equivalent operating days calculated based on uptime_ratio.
- property operating_hours¶
[float] Equivalent operating hours calculated based on uptime_ratio.
- property products¶
[
qsdsan.WasteStream] System product streams.
- show()¶
Prints information on unit.
- property start_year¶
[int] Start year of the system.
- startup_FOCfrac: float¶
Fraction of fixed operating costs incurred during startup.
- startup_VOCfrac: float¶
Fraction of variable operating costs incurred during startup.
- startup_salesfrac: float¶
Fraction of sales achieved during startup.
- property system¶
[
biosteam.System] The system this TEA is conducted for.
- property system_add_OPEX¶
[dict] Annual additional system-wise operating expenditure (on top of the add_OPEX of each unit). Float input will be automatically converted to a dict with the key being “System additional OPEX”.
- property total_add_OPEX¶
[float] Sum of unit_add_OPEX and system_add_OPEX.
- property unit_add_OPEX¶
[float] Sum of add_OPEX for all units in the system.
- property units¶
[
qsdsan.SanUnit] Units in the system.
- property uptime_ratio¶
[float] Fraction of time that the system is operating.