h2integrate.finances.profast_base

Contents

h2integrate.finances.profast_base#

Functions

check_parameter_inputs(finance_params, ...)

Validate and format financing parameter inputs for ProFAST.

format_params_for_profast_config(param_dict)

Format a parameter dictionary for BasicProFASTParameterConfig.

Classes

BasicProFASTParameterConfig(*, plant_life, ...)

Configuration class for financial parameters used in ProFAST models.

ProFASTDefaultCapitalItem(*, depr_period, ...)

Default configuration for ProFAST capital cost items.

ProFASTDefaultCoproduct(*, escalation, unit)

Default configuration for ProFAST coproduct settings.

ProFASTDefaultFixedCost(*, escalation[, ...])

Default configuration for ProFAST fixed operating costs.

ProFASTDefaultIncentive(*, decay[, ...])

Default configuration for ProFAST production-based incentives.

ProFASTDefaultVariableCost(*, escalation, unit)

Default configuration for ProFAST variable costs.

ProFastBase(**kwargs)

Base component for using the ProFAST financial model within OpenMDAO.

h2integrate.finances.profast_base.format_params_for_profast_config(param_dict)#

Format a parameter dictionary for BasicProFASTParameterConfig.

This function standardizes dictionary key names so that top-level keys use underscores instead of spaces, while nested dictionary keys use spaces.

Parameters:

param_dict (dict) -- Input dictionary of financing parameters.

Returns:

dict -- Reformatted dictionary compatible with BasicProFASTParameterConfig.

h2integrate.finances.profast_base.check_parameter_inputs(finance_params, plant_config)#

Validate and format financing parameter inputs for ProFAST.

This function:
  1. Detects duplicated keys that differ only by spaces or underscores.

  2. Ensures that synonymous parameters (e.g., "installation time" and "installation months") do not have conflicting values.

  3. Reformats the parameters for compatibility with ProFAST.

Parameters:
  • finance_params (dict) -- Financing parameters provided by the user.

  • plant_config (dict) -- Plant configuration dictionary.

Raises:
  • ValueError -- If duplicated keys are input.

  • ValueError -- If two equivalent keys have different values.

Returns:

dict -- Validated and reformatted financing parameters for ProFAST.

class h2integrate.finances.profast_base.BasicProFASTParameterConfig(*, plant_life, analysis_start_year, installation_time, discount_rate, debt_equity_ratio, property_tax_and_insurance, total_income_tax_rate, capital_gains_tax_rate, sales_tax_rate, debt_interest_rate, inflation_rate, cash_onhand_months, admin_expense, non_depr_assets=0.0, end_of_proj_sale_non_depr_assets=0.0, tax_loss_carry_forward_years=0, tax_losses_monetized=True, sell_undepreciated_cap=True, credit_card_fees=0.0, demand_rampup=0.0, debt_type='Revolving debt', loan_period_if_used=0, commodity={'escalation': 0.0, 'initial price': 100, 'name': None, 'unit': None}, installation_cost={'depr period': 4, 'depr type': 'Straight line', 'depreciable': False, 'value': 0.0}, topc={'decay': 0.0, 'sunset years': 0, 'support utilization': 0.0, 'unit price': 0.0}, annual_operating_incentive={'decay': 0.0, 'sunset years': 0, 'taxable': True, 'value': 0.0}, incidental_revenue={'escalation': 0.0, 'value': 0.0}, road_tax={'escalation': 0.0, 'value': 0.0}, labor={'escalation': 0.0, 'rate': 0.0, 'value': 0.0}, maintenance={'escalation': 0.0, 'value': 0.0}, rent={'escalation': 0.0, 'value': 0.0}, license_and_permit={'escalation': 0.0, 'value': 0.0}, one_time_cap_inct={'depr period': 3, 'depr type': 'MACRS', 'depreciable': False, 'value': 0.0})#

Configuration class for financial parameters used in ProFAST models.

This class defines default financing parameters, including discount rate, tax structure, inflation, and cost categories. Values are validated using range and type constraints.

Parameters:
  • plant_life (int)

  • analysis_start_year (int)

  • installation_time (int)

  • discount_rate (float)

  • debt_equity_ratio (float)

  • property_tax_and_insurance (float)

  • total_income_tax_rate (float)

  • capital_gains_tax_rate (float)

  • sales_tax_rate (float)

  • debt_interest_rate (float)

  • inflation_rate (float)

  • cash_onhand_months (int)

  • admin_expense (float)

  • non_depr_assets (float)

  • end_of_proj_sale_non_depr_assets (float)

  • tax_loss_carry_forward_years (int)

  • tax_losses_monetized (bool)

  • sell_undepreciated_cap (bool)

  • credit_card_fees (float)

  • demand_rampup (float)

  • debt_type (str)

  • loan_period_if_used (int)

  • commodity (dict)

  • installation_cost (dict)

  • topc (dict)

  • annual_operating_incentive (dict)

  • incidental_revenue (dict)

  • road_tax (dict)

  • labor (dict)

  • maintenance (dict)

  • rent (dict)

  • license_and_permit (dict)

  • one_time_cap_inct (dict)

plant_life#

operating life of plant in years

Type:

int

analysis_start_year#

calendar year to start financial analysis

Type:

int

installation_time#

time between analysis_start_year and operation start in months

Type:

int

discount_rate#

leverage after tax nominal discount rate

Type:

float

debt_equity_ratio#

debt to equity ratio of initial financing.

Type:

float

property_tax_and_insurance#

property tax and insurance

Type:

float

total_income_tax_rate#

income tax rate

Type:

float

capital_gains_tax_rate#

tax rate fraction on capital gains

Type:

float

sales_tax_rate#

sales tax fraction

Type:

float

debt_interest_rate#

interest rate on debt

Type:

float

inflation_rate#

escalation rate. Set to zero for a nominal analysis.

Type:

float

cash_onhand_months#

number of months with cash onhand.

Type:

int

admin_expense#

administrative expense as a fraction of sales

Type:

float

non_depr_assets#

cost (in $) of nondepreciable assets, such as land. Defaults to 0.

Type:

float, optional

end_of_proj_sale_non_depr_assets#

cost (in $) of nondepreciable assets that are sold at the end of the project. Defaults to 0.

Type:

float, optional

tax_loss_carry_forward_years#

Defaults to 0.

Type:

int, optional

tax_losses_monetized#

Defaults to True.

Type:

bool, optional

sell_undepreciated_cap#

Defaults to True.

Type:

bool, optional

credit_card_fees#

credit card fees as a fraction.

Type:

float, optional

demand_rampup#

Defaults to 0.

Type:

float, optional

debt_type#

must be either "Revolving debt" or "One time loan". Defaults to "Revolving debt".

Type:

str, optional

loan_period_if_used#

Loan period in years. Only used if debt_type is "One time loan". Defaults to 0.

Type:

int, optional

commodity#
Type:

dict, optional

installation_cost#
  • value (float): installation cost in USD. Defaults to 0.

  • depr type (str): either "Straight line" or "MACRS". Defaults to "Straight line"

  • depr period (int): depreciation period in years. Defaults to 4.

  • depreciable (bool): True if cost depreciates. Defaults to False.

Type:

dict, optional

topc#

take or pay contract.

Type:

dict, optional

annual_operating_incentive#
Type:

dict, optional

incidental_revenue#
Type:

dict, optional

road_tax#
Type:

dict, optional

labor#
Type:

dict, optional

maintenance#
Type:

dict, optional

rent#
Type:

dict, optional

license_and_permit#
Type:

dict, optional

one_time_cap_inct#

investment tax credit.

Type:

dict, optional

plant_life: int#
analysis_start_year: int#
installation_time: int#
discount_rate: float#
debt_equity_ratio: float#
property_tax_and_insurance: float#
total_income_tax_rate: float#
capital_gains_tax_rate: float#
sales_tax_rate: float#
debt_interest_rate: float#
inflation_rate: float#
cash_onhand_months: int#
admin_expense: float#
non_depr_assets: float#
end_of_proj_sale_non_depr_assets: float#
tax_loss_carry_forward_years: int#
tax_losses_monetized: bool#
sell_undepreciated_cap: bool#
credit_card_fees: float#
demand_rampup: float#
debt_type: str#
loan_period_if_used: int#
commodity: dict#
installation_cost: dict#
topc: dict#
annual_operating_incentive: dict#
incidental_revenue: dict#
road_tax: dict#
labor: dict#
maintenance: dict#
rent: dict#
license_and_permit: dict#
one_time_cap_inct: dict#
as_dict()#

Return a dictionary formatted for ProFAST initialization.

Converts the configuration to a ProFAST-compatible dictionary, replacing underscores with spaces, applying inflation defaults, and mapping keys to internal ProFAST parameter names.

Returns:

dict -- Formatted parameter dictionary.

Return type:

dict

class h2integrate.finances.profast_base.ProFASTDefaultCapitalItem(*, depr_period, depr_type, refurb=[0.0], replacement_cost_percent=0.0)#

Default configuration for ProFAST capital cost items.

Represents capital investment items such as equipment or infrastructure, with associated cost, depreciation, and sales tax options.

Parameters:
  • depr_period (int)

  • depr_type (str)

  • refurb (int | float | list[float])

  • replacement_cost_percent (int | float)

depr_period#

depreciation period in years if using MACRS depreciation. Must be either 3, 5, 7, 10, 15 or 20.

Type:

int

depr_type#

depreciation "MACRS" or "Straight line". Defaults to 'MACRS'.

Type:

str, optional

refurb#

Replacement schedule as a fraction of the capital cost. Defaults to [0.].

Type:

list[float], optional

replacement_cost_percent#

Replacement cost as a fraction of CapEx. Defaults to 0.0

Type:

float | int, optional

depr_period: int#
depr_type: str#
refurb: int | float | list[float]#
replacement_cost_percent: int | float#
create_dict()#

Create a ProFAST-compatible dictionary of attributes.

Excludes attributes not used by the ProFAST configuration file.

Returns:

dict -- Dictionary containing ProFAST-compatible fields.

class h2integrate.finances.profast_base.ProFASTDefaultFixedCost(*, escalation, unit='$/year', usage=1.0)#

Default configuration for ProFAST fixed operating costs.

Represents recurring annual costs such as maintenance, rent, or insurance that do not vary with production level.

Parameters:
  • escalation (float | int)

  • unit (str)

  • usage (float | int)

escalation#

annual escalation of price. Defaults to 0.

Type:

float | int, optional

unit#

unit of the cost. Defaults to $/year.

Type:

str

usage#

Usage multiplier, likely should be set to 1. Defaults to 1.0.

Type:

float, optional

escalation: float | int#
unit: str#
usage: float | int#
create_dict()#

Return a dictionary representation for ProFAST.

Returns:

dict -- Dictionary of fixed cost attributes.

class h2integrate.finances.profast_base.ProFASTDefaultVariableCost(*, escalation, unit, usage=1.0)#

Default configuration for ProFAST variable costs.

Represents costs that scale with production or feedstock usage. The total cost is calculated as usage * cost.

Parameters:
  • escalation (float | int)

  • unit (str)

  • usage (float | int)

escalation#

annual escalation of price. Defaults to 0.

Type:

float | int, optional

unit#

unit of the cost, only used for reporting. The cost should be input in USD/unit of commodity.

Type:

str

usage#

Usage of feedstock per unit of commodity. Defaults to 1.0.

Type:

float, optional

escalation: float | int#
unit: str#
usage: float | int#
create_dict()#

Return a dictionary representation for ProFAST.

Returns:

dict -- Dictionary of variable cost attributes.

class h2integrate.finances.profast_base.ProFASTDefaultCoproduct(*, escalation, unit, usage=1.0)#

Default configuration for ProFAST coproduct settings.

Represents additional revenue sources or byproducts associated with the primary process. The total value is calculated as usage * cost.

Parameters:
  • escalation (float | int)

  • unit (str)

  • usage (float | int)

escalation#

annual escalation of price. Defaults to 0.

Type:

float | int, optional

unit#

unit of the cost, only used for reporting. The cost should be input in USD/unit of commodity.

Type:

str

usage#

Usage of feedstock per unit of commodity. Defaults to 1.0.

Type:

float, optional

escalation: float | int#
unit: str#
usage: float | int#
create_dict()#

Return a dictionary representation for ProFAST.

Returns:

dict -- Dictionary of coproduct attributes.

class h2integrate.finances.profast_base.ProFASTDefaultIncentive(*, decay, sunset_years=10, tax_credit=True)#

Default configuration for ProFAST production-based incentives.

Represents financial incentives (e.g., tax credits or subsidies) applied per unit of production over a defined period.

Parameters:
  • decay (float | int)

  • sunset_years (int)

  • tax_credit (bool)

decay#

rate of decay of incentive value. Recommended to set as -1*general inflation rate.

Type:

float

sunset_years#

number of years incentive is active. Defaults to 10.

Type:

int, optional

tax_credit#

Whether the incentive is a tax credit. Defaults to True.

Type:

bool, optional

decay: float | int#
sunset_years: int#
tax_credit: bool#
create_dict()#

Return a dictionary representation for ProFAST.

Returns:

dict -- Dictionary of incentive attributes.

class h2integrate.finances.profast_base.ProFastBase(**kwargs)#

Base component for using the ProFAST financial model within OpenMDAO.

This component aggregates capital, fixed, variable, and coproduct costs from user-defined technologies to compute financial metrics using ProFAST.

Reference:

ProFAST Documentation: https://www.nrel.gov/hydrogen/profast-access

tech_config#

Technology-specific model configurations included in the financial calculation.

Type:

dict

plant_config#

Plant configuration and financial parameter settings.

Type:

dict

driver_config#

Driver configuration parameters (not directly used in calculations).

Type:

dict

commodity_type#

Type of commodity analyzed. Supported: 'hydrogen', 'electricity', 'ammonia', 'nitrogen', and 'co2'.

Type:

str

params#

Financial parameters used in the ProFAST analysis.

Type:

BasicProFASTParameterConfig

capital_item_settings#

Default capital cost parameters.

Type:

ProFASTDefaultCapitalItem

fixed_cost_settings#

Default fixed operating cost parameters.

Type:

ProFASTDefaultFixedCost

variable_cost_settings#

Default variable operating cost parameters.

Type:

ProFASTDefaultVariableCost

coproduct_cost_settings#

Default coproduct cost parameters.

Type:

ProFASTDefaultCoproduct

Inputs:
capex_adjusted_{tech} (float): Adjusted capital expenditure for each

user-defined technology, in USD.

opex_adjusted_{tech} (float): Adjusted operational expenditure for each

user-defined technology, in USD/year.

total_{commodity}_produced (float): Total annual production of the selected commodity

(units depend on commodity type).

{tech}_time_until_replacement (float): Time until technology is replaced, in hours

(currently only supported if "electrolyzer" is in tech_config).

co2_capture_kgpy (float): Total annual CO2 captured, in kg/year

(only for commodity_type "co2").

initialize()#

Declares component options.

setup()#

Defines inputs/outputs and initializes ProFAST configuration.

populate_profast(inputs)#

Builds a ProFAST input dictionary based on user inputs.

compute(inputs, outputs, ...)#

Must be implemented in a subclass.

initialize()#

Declare OpenMDAO component options.

add_model_specific_outputs()#

Placeholder for subclass-defined outputs.

setup()#

Set up component inputs and outputs based on plant and technology configurations.

populate_profast(inputs)#

Populate and configure the ProFAST financial model for analysis.

This is called during the compute method of the inheriting class.

Parameters:

inputs (dict) -- OpenMDAO input values for technology CapEx, OpEx, and production levels.

Returns:

ProFAST -- A fully configured ProFAST financial model object ready for execution.

compute(inputs, outputs, discrete_inputs, discrete_outputs)#

Placeholder for the OpenMDAO compute step.