CO2Electrolyzer

class flexops.unit_models.electrolyzer.CO2Electrolyzer(*args, **kwds)

Bases: ProcessBlock

Parameters:
  • rule (function) – A rule function or None. Default rule calls build().

  • concrete (bool) – If True, make this a toplevel model. Default - False.

  • ctype (class) –

    Pyomo ctype of the block. Default - pyomo.environ.Block

    Config args

    dynamic

    Indicates whether this model will be dynamic or not, default = useDefault. Valid values: { useDefault - get flag from parent (default = False), True - set as a dynamic model, False - set as a steady-state model.}

    has_holdup

    Indicates whether holdup terms should be constructed or not. Must be True if dynamic = True, default - False. Valid values: { useDefault - get flag from parent (default = False), True - construct holdup terms, False - do not construct holdup terms}

    property_package

    Property (parameter) block carrying flow between units; None for units that need no fluid properties.

    flexops_config

    Optional already-validated UnitConfig for this unit (never a raw dict).

    unit_commitment

    Per-unit unit-commitment sub-config.

    external_dispatch

    Optional external (DERMS) dispatch source consumed by set_external_dispatch.

    relaxation

    Discrete-structure relaxation policy.

    allow_pass_through

    Whether add_bypass_constraints() builds inlet-to-outlet pass-through equalities for this unit’s non-excluded state variables. SISOBlock (and its subclasses Pump/Tank) override the base default to True so the flow-topology units are well-posed out of the box; the base OpsBlock default stays False.

    costing_package

    Optional FlexCosting block this unit associates with: register_power forwards the unit’s power draw to it. None for standalone units; the forwarding is strictly conditional.

    liquid_property_package

    Single-phase property package for the liquid make-up inlet and the liquid outlet.

    gas_property_package

    Single-phase property package for every gas port not given its own package below.

    cathode_gas_property_package

    Single-phase property package for the cathode gas outlet; defaults to gas_property_package.

    anode_gas_property_package

    Single-phase property package for the anode gas outlet; defaults to gas_property_package.

    n_cells

    Cells in series.

    electrode_area

    Active electrode area of one cell, cm^2.

    rated_current_density

    Maximum current density, the upper bound on current_density[t], A/cm^2.

    cell_voltage

    Cell voltage before ohmic loss (a fixed, regressable Var once built), V.

    ohmic_loss

    If True, add area_specific_resistance * current_density to cell_voltage, making power quadratic in current density.

    area_specific_resistance

    Area-specific cell resistance, used when ohmic_loss is True (a fixed, regressable Var once built), ohm*cm^2.

    thermoneutral_voltage

    Thermoneutral cell voltage; the voltage above it is released as stack heat (waste_heat), V.

    bop_fraction

    Balance-of-plant electrical draw as a fraction of stack power (a fixed, regressable Var once built).

    operating_temperature

    Separator temperature; the gas outlets leave at it, K.

    operating_pressure

    Separator pressure; the gas outlets leave at it, Pa.

    products

    Cathode products, as ElectrochemicalProduct entries (or dicts of their fields). Faradaic efficiencies may sum to at most 1.

    anode_products

    Anode gas products, as ElectrochemicalProduct entries (or dicts of their fields). Faradaic efficiencies may sum to at most 1.

    balance_product

    Name of the cathode product whose rate closes the charge balance (the electron flow left after the other cathode products); its configured faradaic efficiency is ignored and its relation is not swappable. None gives every product its own Faradaic relation.

    has_liquid_outlet

    Whether to build the liquid outlet, carrying the electrolyte bleed and any liquid products.

    bleed_fraction

    Liquid bled from the loop per unit volume of water consumed (a fixed, regressable Var once built). Requires has_liquid_outlet.

    liquid_density

    Density converting consumed water and liquid products to volume, kg/m^3.

    separator_volume

    Liquid capacity of the separators, m^3.

    initial_liquid_volume

    Liquid inventory at the start of the horizon, before step 0’s flows, m^3 (a rolling-horizon initial state).

    liquid_level_min

    Minimum fill fraction of separator_volume.

    liquid_level_max

    Maximum fill fraction of separator_volume.

    mass_transfer_coefficient

    CO2 mass-transfer coefficient to the cathode, the CO2 diffusivity over the boundary-layer thickness (a fixed, regressable Var once built), m/s. None builds no transport limit.

    co2_bulk_concentration

    CO2 concentration in the bulk electrolyte, used with mass_transfer_coefficient (a fixed, regressable Var once built), mol/m^3.

    single_pass_conversion

    Fraction of the CO2 fed that is consumed or crosses over in one pass, in (0, 1] (a fixed, regressable Var once built).

    co2_crossover_per_electron

    Moles of CO2 carried to the anode as carbonate per mole of electrons (a fixed, regressable Var once built).

    co2_dissolved_fraction

    Fraction of the unreacted CO2 leaving dissolved in the electrolyte rather than with the cathode gas, in [0, 1] (a fixed, regressable Var once built).

    co2_property_package

    Single-phase property package for the CO2 inlet; defaults to gas_property_package.

  • initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries with config arguments as keys.

  • idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to override the default behavior of matching the BlockData index exactly to the index in initialize.

Returns:

(CO2Electrolyzer) New instance

Variables

Name

Index

Units

Role

Description

current_density

time

A/cm**2

input

Current density: the unit’s operating variable, A/cm^2.

flow_vol_phase

time

m**3/h

input

Volumetric flowrate by time and phase

power_electrical

time

kW

output

Electrical draw of the unit

liquid_volume

time

m**3

output

Separator liquid inventory, bounded by the fill window.

flow_vol_phase

time

m**3/h

output

Volumetric flowrate by time and phase

flow_vol_phase

time

m**3/h

output

Volumetric flowrate by time and phase

pressure

time

Pa

input

Pressure

temperature

time

K

input

Pressure

flow_vol_phase

time

m**3/h

output

Volumetric flowrate by time and phase

Constraints

Name

Description

faradaic_relation_CO

Faraday’s law: production_CO == faradaic efficiency * electron_flow / 2.

faradaic_relation_O2

Faraday’s law: production_O2 == faradaic efficiency * electron_flow / 4.

charge_balance_H2

Charge balance: 2 * production_H2 == electron_flow minus the other cathode products’ charge.

power_electrical_relation

Electrical draw: N_cells * operating_voltage * current * (1 + bop_fraction). Swapped in place for a fitted polarization curve.

co2_feed_balance

CO2 feed: (consumption + crossover) / single_pass_conversion.

cathode_gas_balance

Cathode gas volume: gas products plus any unreacted feed, at the operating temperature and pressure.

anode_gas_balance

Anode gas volume: anode products plus any crossover, at the operating temperature and pressure.

liquid_holdup

Separator holdup (backward): liquid_volume[t] = liquid_volume[t-1] + dt * (make-up - (1 + bleed) * consumption), with liquid_volume[-1] = initial_liquid_volume.

Degrees of Freedom

Name

Units

Description

current_density

A/cm**2

Current density: the unit’s operating variable, A/cm^2.

flow_vol_phase

m**3/h

Volumetric flowrate by time and phase

pressure

Pa

Pressure

temperature

K

Pressure