You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While tracking issue #61, I saw a bug in the Nernst Equation in calc_open_circuit_voltage().
The partial pressures inside in the ln() component are backwards.
** See equation 8 of (1).
E = E_rev + (RT/nF) * ln((p_h2) * sqrt(p_o2))
The partial pressures of each gas is calculated by Dalton's Law, in equation 5, 6. p_h2 is the partial pressure of hydrogen and is found with p_cathode and p_h2o_sat because hydrogen exits at the cathode. The partial pressure of oxygen is found with p_anode - p_h2o_sat. The code currently has these two quantities flipped.
To Reproduce
See calc_open_circuit_voltage() in cell.py. Compare General Nernst Equation with equation 8 of the following reference.
(1) Vesa, Ruusskanen et al 2017. PEM Water Electrolyzer model for power hardware-in-the-loop. 10.1016/j.ijhydene.2017.03.046
Electrolyzer Version
0.1.0
System Information (please complete the following information):
OS: Mac
Python version: 3.8
The text was updated successfully, but these errors were encountered:
- added P_STD from scipy physical constants, which is 1 bar in Pascals
- mods to calc_open_circuit_voltage() include updated p_cathode, split up partial pressures for hydrogen/oxygen according to Dalton's law.
Issue NREL#63: Nernst equation was incorrect. This issue only became became apparent when adjusting cathode pressure.
- changed E_cell calculation to use the correct partial pressures and replaced R+T with R*T.
- Updated test_cell.py, test_stack.py, test_run_electrolyzer.py to account for the new model change.
- Incomplete is test_run_lcoh.py. Need assistance to adjust lcoh_breakdown.
While tracking issue #61, I saw a bug in the Nernst Equation in calc_open_circuit_voltage().
The partial pressures inside in the ln() component are backwards.
** See equation 8 of (1).
E = E_rev + (RT/nF) * ln((p_h2) * sqrt(p_o2))
The partial pressures of each gas is calculated by Dalton's Law, in equation 5, 6. p_h2 is the partial pressure of hydrogen and is found with p_cathode and p_h2o_sat because hydrogen exits at the cathode. The partial pressure of oxygen is found with p_anode - p_h2o_sat. The code currently has these two quantities flipped.
To Reproduce
See calc_open_circuit_voltage() in cell.py. Compare General Nernst Equation with equation 8 of the following reference.
(1) Vesa, Ruusskanen et al 2017. PEM Water Electrolyzer model for power hardware-in-the-loop. 10.1016/j.ijhydene.2017.03.046
Electrolyzer Version
0.1.0
System Information (please complete the following information):
The text was updated successfully, but these errors were encountered: