Skip to content

Water Electrolyzer

Represents a Water Electrolyser unit operation that splits water into hydrogen and oxygen using electrical energy, modelling cell voltage, current, and thermal losses.

DWSIM.UnitOperations.UnitOperations.WaterElectrolyzer
Assembly DWSIM.UnitOperations.dll · Object ← BaseClass ← UnitOpBaseClass ← CleanEnergyUnitOpBase ← WaterElectrolyzer

At a glance

Water Electrolyzer in the example flowsheet

Port Index Connected in the example
Inlet, material 0 Water
Inlet, energy 1 Power
Outlet, material 0 H2-rich
Outlet, material 1 O2-rich

Example

This code runs on every build of this site, and the output below is what it printed.

fs = (Flowsheet.Create("ElectrolyzerExample")
      .WithCompounds("Water", "Hydrogen", "Oxygen")
      .WithPropertyPackage(PropertyPackages.PengRobinson))

water = (fs.AddMaterialStream("Water")
         .At(Q.Celsius(60.0), Q.Bar(1.0))
         .SetCompoundMolarFlow("Water", 20.0))      # mol/s, in excess to carry the heat
h2_rich = fs.AddMaterialStream("H2-rich")
o2_rich = fs.AddMaterialStream("O2-rich")
power = fs.AddEnergyStream("Power").WithEnergyFlow(Q.Kilowatts(100.0))

el = (fs.AddWaterElectrolyzer("EL-1")
      .WithCellCount(50)
      .WithVoltage(95.0))                    # stack voltage, 1.9 V per cell
el.Object.CreateConnectors()                 # the canvas creates the ports on first draw
el.ConnectFeed(water, 0).ConnectEnergyFeed(power, 1)
el.ConnectProduct(h2_rich, 0).ConnectProduct(o2_rich, 1)

fs.AutoLayout()
fs.Solve()

e = el.Object
h2 = h2_rich.Object.Phases[0].Compounds["Hydrogen"].MolarFlow
print(f"Current            = {e.Current:.1f} A")
print(f"Hydrogen produced  = {h2 * 2.016 * 3.6:.3f} kg/h")
print(f"Thermoneutral V    = {e.ThermoNeutralVoltage:.4f} V per cell")
print(f"Waste heat         = {e.WasteHeat:.2f} kW")
print(f"Efficiency         = {e.Efficiency * 100:.1f} %")
print(f"Outlet T (H2 side) = {h2_rich.TemperatureK - 273.15:.2f} C")

Output

Current            = 1052.6 A
Hydrogen produced  = 1.979 kg/h
Thermoneutral V    = 1.4752 V per cell
Waste heat         = 22.36 kW
Efficiency         = 77.6 %
Outlet T (H2 side) = 60.57 C

DWSIM 10.2.11.0, generated 2026-10-08.

Properties

IDs accepted by GetPropertyValue, SetPropertyValue, the sensitivity analysis, the optimizer, the Adjust block and dynamic events. Units are SI; pass another unit system to GetPropertyValue to get them converted.

ID Name Unit (SI) Input
Voltage V yes
Thermoneutral Voltage V yes
Reversible Voltage V yes
Number of Cells yes
Cell Voltage V yes
Waste Heat kW yes
Current A yes
Electron Transfer mol/s yes
Efficiency yes
Input Efficiency yes

Learn more

API members

Public members declared by this class. Inherited members are documented on the base classes.

Constructors

WaterElectrolyzer(): Initializes a new default instance of the WaterElectrolyzer class.

Initializes a new default instance of the WaterElectrolyzer class.

public WaterElectrolyzer()
Public Sub New()

Properties

CellVoltage: Gets or sets the individual cell voltage (V).

Gets or sets the individual cell voltage (V).

public double CellVoltage { get; set; }
Public Property CellVoltage As Double

Current: Gets or sets the operating current (A).

Gets or sets the operating current (A).

public double Current { get; set; }
Public Property Current As Double

Efficiency: Gets or sets the calculated electrolyser efficiency (fraction, 0 to 1).

Gets or sets the calculated electrolyser efficiency (fraction, 0 to 1).

public double Efficiency { get; set; }
Public Property Efficiency As Double

ElectronTransfer: Gets or sets the number of electrons transferred per mole of water split.

Gets or sets the number of electrons transferred per mole of water split.

public double ElectronTransfer { get; set; }
Public Property ElectronTransfer As Double

EquipmentTypes: Gets the list of equipment sub-types (PEM, Alkaline, Solid Oxide).

Gets the list of equipment sub-types (PEM, Alkaline, Solid Oxide).

public override List<string> EquipmentTypes { get; }
Public Overrides ReadOnly Property EquipmentTypes As List(Of String)

InputEfficiency: Gets or sets the user-specified input efficiency (fraction, 0 to 1); used when no cell voltage is given.

Gets or sets the user-specified input efficiency (fraction, 0 to 1); used when no cell voltage is given.

public double InputEfficiency { get; set; }
Public Property InputEfficiency As Double

NumberOfCells: Gets or sets the number of electrolytic cells in the stack.

Gets or sets the number of electrolytic cells in the stack.

public int NumberOfCells { get; set; }
Public Property NumberOfCells As Integer

Prefix: Gets or sets the default name prefix for this unit operation.

Gets or sets the default name prefix for this unit operation.

public override string Prefix { get; set; }
Public Overrides Property Prefix As String

ReversibleVoltage: Gets or sets the reversible (equilibrium) cell voltage (V).

Gets or sets the reversible (equilibrium) cell voltage (V).

public double ReversibleVoltage { get; set; }
Public Property ReversibleVoltage As Double

ThermoNeutralVoltage: Gets or sets the thermoneutral voltage (V).

Gets or sets the thermoneutral voltage (V).

public double ThermoNeutralVoltage { get; set; }
Public Property ThermoNeutralVoltage As Double

Voltage: Gets or sets the total stack voltage (V).

Gets or sets the total stack voltage (V).

public double Voltage { get; set; }
Public Property Voltage As Double

WasteHeat: Gets or sets the waste heat produced by the electrolyser (kW).

Gets or sets the waste heat produced by the electrolyser (kW).

public double WasteHeat { get; set; }
Public Property WasteHeat As Double

Methods

Calculate(object): Calculates the electrolysis products, voltages, current, waste heat, and efficiency.

Calculates the electrolysis products, voltages, current, waste heat, and efficiency.

Parameter Type Description
args Object
public override void Calculate(object args = null)
Public Overrides Sub Calculate(args As Object = Nothing)

CloneXML(): Creates a deep copy via XML serialization.

Creates a deep copy via XML serialization.

public override object CloneXML()
Public Overrides Function CloneXML() As Object

CloseEditForm(): Closes and disposes the editing form.

Closes and disposes the editing form.

public override void CloseEditForm()
Public Overrides Sub CloseEditForm()

CreateConnectors(): Creates the graphic connector definitions on the flowsheet.

Creates the graphic connector definitions on the flowsheet.

public override void CreateConnectors()
Public Overrides Sub CreateConnectors()

CreateDimensionsList(): Creates the dimensions list (NumberOfCells, MassFlow) for this electrolyser.

Creates the dimensions list (NumberOfCells, MassFlow) for this electrolyser.

public override void CreateDimensionsList()
Public Overrides Sub CreateDimensionsList()

DisplayEditForm(): Opens or activates the editing form.

Opens or activates the editing form.

public override void DisplayEditForm()
Public Overrides Sub DisplayEditForm()

Draw(object): Draws the electrolyser icon on the given SkiaSharp canvas.

Draws the electrolyser icon on the given SkiaSharp canvas.

Parameter Type Description
g Object
public override void Draw(object g)
Public Overrides Sub Draw(g As Object)

GetChartModel(string): Builds an OxyPlot model of the efficiency (left axis) and the hydrogen production (right axis) against the cell...

Builds an OxyPlot model of the efficiency (left axis) and the hydrogen production (right axis) against the cell voltage, from the reversible voltage upwards, by the same balance the calculation uses, with the operating point marked.

Parameter Type Description
name String
public override object GetChartModel(string name)
Public Overrides Function GetChartModel(name As String) As Object

GetChartModelNames(): Chart names the PFD chart object can embed: the model swept over the cell voltage at the energy input of the last...

Chart names the PFD chart object can embed: the model swept over the cell voltage at the energy input of the last calculation.

public override List<string> GetChartModelNames()
Public Overrides Function GetChartModelNames() As List(Of String)

GetDisplayDescription(): Returns the display description for this unit operation.

Returns the display description for this unit operation.

public override string GetDisplayDescription()
Public Overrides Function GetDisplayDescription() As String

GetDisplayName(): Returns the display name for this unit operation.

Returns the display name for this unit operation.

public override string GetDisplayName()
Public Overrides Function GetDisplayName() As String

GetIconBitmapBytes(): Returns the icon bitmap as a byte array.

Returns the icon bitmap as a byte array.

public override byte[] GetIconBitmapBytes()
Public Overrides Function GetIconBitmapBytes() As Byte()

GetProperties(PropertyType): Returns an array of property identifiers for the specified property type.

Returns an array of property identifiers for the specified property type.

Parameter Type Description
proptype PropertyType
public override string[] GetProperties(PropertyType proptype)
Public Overrides Function GetProperties(proptype As PropertyType) As String()

GetPropertyUnit(string, IUnitsOfMeasure): Returns the unit string for the specified property.

Returns the unit string for the specified property.

Parameter Type Description
prop String
su IUnitsOfMeasure
public override string GetPropertyUnit(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyUnit(prop As String, su As IUnitsOfMeasure = Nothing) As String

GetPropertyValue(string, IUnitsOfMeasure): Returns the value of the specified property.

Returns the value of the specified property.

Parameter Type Description
prop String
su IUnitsOfMeasure
public override object GetPropertyValue(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyValue(prop As String, su As IUnitsOfMeasure = Nothing) As Object

GetReport(IUnitsOfMeasure, CultureInfo, string): Generates a plain-text report of the electrolyser results.

Generates a plain-text report of the electrolyser results.

Parameter Type Description
su IUnitsOfMeasure
ci CultureInfo
nf String
public override string GetReport(IUnitsOfMeasure su, CultureInfo ci, string nf)
Public Overrides Function GetReport(su As IUnitsOfMeasure, ci As CultureInfo, nf As String) As String

LoadData(List<XElement>): Restores the electrolyser state from XML.

Restores the electrolyser state from XML.

Parameter Type Description
data List<XElement>
public override bool LoadData(List<XElement> data)
Public Overrides Function LoadData(data As List(Of XElement)) As Boolean

PopulateEditorPanel(object): Populates the cross-platform editor panel with controls.

Populates the cross-platform editor panel with controls.

Parameter Type Description
ctner Object
public override void PopulateEditorPanel(object ctner)
Public Overrides Sub PopulateEditorPanel(ctner As Object)

ReturnInstance(string): Creates and returns a new instance for deserialization.

Creates and returns a new instance for deserialization.

Parameter Type Description
typename String
public override object ReturnInstance(string typename)
Public Overrides Function ReturnInstance(typename As String) As Object

SaveData(): Serializes the electrolyser state to XML.

Serializes the electrolyser state to XML.

public override List<XElement> SaveData()
Public Overrides Function SaveData() As List(Of XElement)

SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of the specified property.

Sets the value of the specified property.

Parameter Type Description
prop String
propval Object
su IUnitsOfMeasure
public override bool SetPropertyValue(string prop, object propval, IUnitsOfMeasure su = null)
Public Overrides Function SetPropertyValue(prop As String, propval As Object, su As IUnitsOfMeasure = Nothing) As Boolean

UpdateDimensionsList(): Updates the dimension values from the current electrolyser properties.

Updates the dimension values from the current electrolyser properties.

public override void UpdateDimensionsList()
Public Overrides Sub UpdateDimensionsList()

UpdateEditForm(): Refreshes the editing form with updated data.

Refreshes the editing form with updated data.

public override void UpdateEditForm()
Public Overrides Sub UpdateEditForm()

Fields

f: The classic (WinForms) editor window open for this unit operation, if any.

The classic (WinForms) editor window open for this unit operation, if any. Not saved with the flowsheet.

public object f
Public f As Object