WaterElectrolyzer¶
- class flexops.unit_models.electrolyzer.WaterElectrolyzer(*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.
- 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.
- technology
Electrolysis technology; selects the defaults of cell_voltage, operating_temperature and operating_pressure.
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:
(WaterElectrolyzer) 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 |
Constraints
Name |
Description |
|---|---|
faradaic_relation_H2 |
Faraday’s law: production_H2 == faradaic efficiency * electron_flow / 2. |
faradaic_relation_O2 |
Faraday’s law: production_O2 == faradaic efficiency * electron_flow / 4. |
power_electrical_relation |
Electrical draw: N_cells * operating_voltage * current * (1 + bop_fraction). Swapped in place for a fitted polarization curve. |
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 |