Oxygen output from PEM electrolyzer#642
Conversation
jaredthomas68
left a comment
There was a problem hiding this comment.
Looks good to me. I did not check all the test values, but the hourly O2/H2 ratio looks about right. I am also not an expert in PEM, but I did check through the equations and they look right to me. It would not hurt to have someone else look over them as well, but I think this is good to come in from my perspective. Thank you @elenya-grant!
I left a few non-blocking comments.
| power_pr_yr_kWh[i] = np.sum(annual_power_consumed_kWh) | ||
|
|
||
| h2_kg_hr_system = h2_kg_hr_system_init * h2_multiplier | ||
| o2_kg_hr_system = o2_kg_hr_system_init * h2_multiplier |
There was a problem hiding this comment.
Non-blocking, but the name h2_multiplier is confusing since it looks like it is an efficiency and now it is applied to o2 as well the name threw me off.
There was a problem hiding this comment.
I agree - I renamed it to production_multiplier
| float | np.array: oxygen production profile of the cluster in kg/dt | ||
| """ | ||
| n_Tot = self.faradaic_efficiency(stack_current) | ||
| o2_production_rate = n_Tot * ((self.N_cells * stack_current) / (4 * self.F)) # mol/s |
There was a problem hiding this comment.
any citations we can include for this?
There was a problem hiding this comment.
yes - I pushed up the updated doc string
|
|
||
|
|
||
| @pytest.mark.regression | ||
| def test_electrolyzer_results(tech_config, plant_config, subtests): |
There was a problem hiding this comment.
Thanks for the tests!
Oxygen output from PEM electrolyzer
Added oxygen as an output from the PEM electrolyzer model.
Section 1: Type of Contribution
Section 2: Draft PR Checklist
TODO:
h2integrate/converters/hydrogen/test/test_pem_electrolyzer_performance.pyh2integrate/converters/hydrogen/pem_model/PEM_H2_LT_electrolyzer_Clusters.pyType of Reviewer Feedback Requested (on Draft PR)
Structural feedback:
Implementation feedback:
Other feedback:
Section 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.md"A complete thought. [PR XYZ]((https://github.com/NatLabRockies/H2Integrate/pull/XYZ)", where
XYZshould be replaced with the actual number.Section 3: Related Issues
This would resolve issue #628
Section 4: Impacted Areas of the Software
Section 4.1: New Files
N/A
Section 4.2: Modified Files
ECOElectrolyzerPerformanceModelinh2integrate/converters/hydrogen/pem_electrolyzer.pysetup(): added outputs for oxygen, this includes the rated oxygen production, annual oxygen production, and the oxygen_out profile.compute(): populated oxygen related outputsh2integrate/converters/hydrogen/pem_model/PEM_H2_LT_electrolyzer_Clusters.pyPEM_H2_Clustersrun(): updated to calculate oxygen production and capacity factorrated_o2_prod(): new method that calculates the rated oxygen production at BOL (similar torated_h2_prod())o2_production_rate(): new method to calculate the oxygen production rate (similar toh2_production_rate())make_yearly_performance_dict(): updated to estimate lifetime oxygen production over plant lifeh2integrate/converters/hydrogen/pem_model/run_h2_PEM.pyclean_up_final_outputs: added handling for oxygen outputsrun_h2_PEM: added output for oxygen production timeseries at a top-level inH2_Resultsexamples/14_wind_hydrogen_dispatch/inputs/plant_config.yaml: added finance subgroup with oxygen as an outputexamples/test/test_all_examples.py::test_hydrogen_dispatch_example: added subtest for LCOO, functions as an integration test of the oxygen output and finance models.h2integrate/converters/hydrogen/test/test_pem_electrolyzer_performance.py: added regression tests intest_electrolyzer_resultsSection 5: Additional Supporting Information
Section 6: Test Results, if applicable
h2integrate/postprocess/test/test_sql_timeseries_to_csv.py::test_save_csv_all_resultshad a sub-fail on the number of columns (went from 40 to 41). This is expected with the added timeseries output (oxygen_out) from the electrolyzer.Section 7 (Optional): New Model Checklist
docs/developer_guide/coding_guidelines.mdattrsclass to define theConfigto load in attributes for the modelBaseConfigorCostModelBaseConfiginitialize()method,setup()method,compute()methodCostModelBaseClasssupported_models.pycreate_financial_modelinh2integrate_model.pytest_all_examples.pydocs/user_guide/model_overview.mddocs/section<model_name>.mdis added to the_toc.yml