# Electrolyzer

**Libraries:**

Simscape /
Electrical /
Sources

## Description

The Electrolyzer block represents the electric load associated with an electrolyzer. An electrolyzer consists of an anode and a cathode separated by an electrolyte. The block calculates the amount of produced hydrogen based on the electrical energy provided and the water temperature in the tank.

In polymer electrolyte membrane (PEM) electrolyzers, these chemical reactions define the anode and cathode conversions:

$$2{H}_{2}O\to {O}_{2}+4{H}^{+}+4{e}^{-}$$

$$4{H}^{+}+4{e}^{-}\to 2{H}_{2}$$

An electrolysis stack comprises several series-connected individual
electrolyzer cells. Specify the **Assumption pH** parameter to model
this block either in a pH-dependent state or in an ideal state with constant pH.

### Equations

The Electrolyzer block calculates the electrical power by using

$${P}_{E}=\frac{{v}^{2}}{{R}_{T}},$$

where *v* is the voltage and
*R _{T}* is the total resistance. The
total resistance,

*R*, is defined by

_{T}$$\frac{1}{{R}_{T}}=\frac{1}{{R}_{el}}+\frac{1}{R},$$

where:

*R*is the external resistance.$${R}_{el}=\frac{\rho \left(pH\right)x}{A}.$$ This value is a resistive term obtained from the cross-sectional transport area,

*A*, the distance anode-cathode,*x*, and the electrical resistivity of the solution,*ρ(pH)*.

The molar energy stored across the electrical load enables the process of water electrolysis and is calculated by this equation:

$${G}_{E}=\frac{{P}_{E}}{1\text{\hspace{0.17em}}mol/s}.$$

To accomplish electrolysis, the electrolyzer requires a minimum amount of energy

$${G}_{\mathrm{min}}=\Delta H-\frac{T}{{T}_{0}}{T}_{\Delta S},$$

where:

*ΔH*is the water enthalpy.*T*is the reaction entropy._{ΔS}*T*is the water temperature.*T*is the reference temperature._{0}

If the electrical energy is not sufficient to dissociate the water, the
electrolyzer does not produce hydrogen. Therefore, the Electrolyzer block calculates
the mole rate of electron, *mol _{e}*, and the
mole rate of hydrogen,

*mol*

_{H2}$$mo{l}_{e}=\{\begin{array}{cc}\frac{\mu \left({G}_{E}-{G}_{\mathrm{min}}\right)}{{e}_{V}{N}_{A}}& {G}_{E}>{G}_{\mathrm{min}}\\ 0& {G}_{E}\le {G}_{\mathrm{min}}\end{array}$$

$$mo{l}_{H2}=\{\begin{array}{cc}\frac{{N}_{c}mo{l}_{e}}{2},& {G}_{E}>{G}_{\mathrm{min}}\\ 0,& {G}_{E}\le {G}_{\mathrm{min}}\end{array}$$

where:

*N*is the Avogadro constant._{A}*e*is the energy per electron._{V}*N*is the number of cells._{c}*μ*is the temperature-dependent efficiency of the electrolysis.

The current that flows through the electrolyzer tank is then obtained as

$$i=mo{l}_{e}F,$$

where *F* is the Faraday constant.

The Electrolyzer block calculates the mass rates of consumed water and generated hydrogen by using these equations:

$$\begin{array}{l}{\dot{m}}_{H2\text{\hspace{0.17em}}O}=mo{l}_{H2}{M}_{H2\text{\hspace{0.17em}}O}\\ {\dot{m}}_{H2}=mo{l}_{H2}{M}_{H2}\end{array}$$

where *M _{H2O}* is the molar
mass of water and

*M*is the molar mass of hydrogen.

_{H2}To compute the pH of the water in the tank, the block uses

$$pH=-\mathrm{ln}\left(\frac{{x}_{hp}}{mo{l}_{H2\_acc}}\right),$$

where:

$${x}_{hp}=\{\begin{array}{cc}{\displaystyle \int mo{l}_{e},}& pH\text{\hspace{0.17em}}assumed\text{\hspace{0.17em}}constant\\ {\displaystyle \int \left(1-purge\right)mo{l}_{e},}& pH\text{\hspace{0.17em}}assumed\text{\hspace{0.17em}}dynamic\end{array}$$ captures the floating hydrons (H+) in the solution.

$$mo{l}_{H2\_acc}=\frac{V{\rho}_{H2\text{\hspace{0.17em}}O}\left(T\right)}{{M}_{H2\text{\hspace{0.17em}}O}}$$ is the number of moles of water.

*V*is the volume.*ρ*is the density of the water in the tank._{H2O}(T)

The residual protons in the solution inside the electrolyzer naturally increases the pH and conductivity of the water in the tank over time. The increase in conductivity leads to a run-away phenomenon. To prevent the run-away, you must purge the water in the tank by taking out the volume of the tank and fill it with clean water.

## Examples

## Ports

### Conserving

### Input

### Output

## Parameters

## References

[1] Maximilian Schalenbach et al.
“A Perspective on Low-Temperature Water Electrolysis - Challenges in Alkaline and
Acidic Technology”. *International Journal of Electrochemical
Science* 13, (2018): 1173-1226.

## Extended Capabilities

## Version History

**Introduced in R2022a**