Package: opem
Table of ContentsWhat is PEM?OverviewInstallationUsageExecutableLibraryTelegram BotTry OPEM in Your Browser!MATLABIssues & Bug ReportsContributionTodoOutputsDependenciesThanksReferenceCiteAuthorsLicenseShow Your SupportChangelogCode of ConductOverviewModeling and simulation of proton-exchange membrane fuel cells (PEMFC) may work as a powerful tool in the research & development of renewable energy sources. The Open-Source PEMFC Simulation Tool (OPEM) is a modeling tool for evaluating the performance of proton exchange membrane fuel cells. This package is a combination of models (static/dynamic) that predict the optimum operating parameters of PEMFC. OPEM contained generic models that will accept as input, not only values of the operating variables such as anode and cathode feed gas, pressure and compositions, cell temperature and current density, but also cell parameters including the active area and membrane thickness. In addition, some of the different models of PEMFC that have been proposed in the OPEM, just focus on one particular FC stack, and some others take into account a part or all auxiliaries such as reformers. OPEM is a platform for collaborative development of PEMFC models.Fig1. OPEM Block DiagramOpen HubPyPI CounterGithub StarsBranchmasterdevelopCICode QualityUsageExecutableOpenCMD(Windows) orTerminal(UNIX)Runpython -m opemorpython3 -m opem(or runOPEM.exe)Enter PEM cell parameters (or run standard test vectors)Amphlett Static ModelInputDescriptionUnitTCell operation temperatureKPH2Partial pressureatmPO2Partial pressureatmi-startCell operating current start pointAi-stepCell operating current stepAi-stopCell operating current end pointAAActive areacm^2lMembrane thicknesscmlambdaAn adjustable parameter with a min value of 14 and max value of 23--R(*Optional)R-ElectronicohmJMaxMaximum current densityA/(cm^2)NNumber of single cells--* For more information about this model visithereLarminie-Dicks Static ModelInputDescriptionUnitE0Fuel cell reversible no loss voltageVAThe slope of the Tafel lineVTCell operation temperatureKi-startCell operating current start pointAi-stepCell operating current stepAi-stopCell operating current end pointAi_nInternal currentAi_0Exchange current at which the overvoltage begins to move from zeroAi_LLimiting currentARMThe membrane and contact resistancesohmNNumber of single cells--* For more information about this model visithereChamberline-Kim Static ModelInputDescriptionUnitE0Open circuit voltageVbTafel's parameter for the oxygen reductionVRResistanceohm.cm^2i-startCell operating current start pointAi-stepCell operating current stepAi-stopCell operating current end pointAAActive areacm^2mDiffusion's parametersVnDiffusion's parameters(A^-1)(cm^2)NNumber of single cells--* For more information about this model visitherePadulles Dynamic Model IInputDescriptionUnitE0No load voltageVTFuel cell temperatureKKH2Hydrogen valve constantkmol.s^(-1).atm^(-1)KO2Oxygen valve constantkmol.s^(-1).atm^(-1)tH2Hydrogen time constantstO2Oxygen time constantsBActivation voltage constantVCActivation constant parameterA^(-1)RintFuel cell internal resistanceohmrhoHydrogen-Oxygen flow ratio--qH2Molar flow of hydrogenkmol/sN0Number of cells--i-startCell operating current start pointAi-stepCell operating current stepAi-stopCell operating current end pointA* For more information about this model visitherePadulles Dynamic Model IIInputDescriptionUnitE0No load voltageVTFuel cell temperatureKKH2Hydrogen valve constantkmol.s^(-1).atm^(-1)KH2OWater valve constantkmol.s^(-1).atm^(-1)KO2Oxygen valve constantkmol.s^(-1).atm^(-1)tH2Hydrogen time constantstH2OWater time constantstO2Oxygen time constantsBActivation voltage constantVCActivation constant parameterA^(-1)RintFuel cell internal resistanceohmrhoHydrogen-Oxygen flow ratio--qH2Molar flow of hydrogenkmol/sN0Number of cells--i-startCell operating current start pointAi-stepCell operating current stepAi-stopCell operating current end pointA* For more information about this model visitherePadulles-Hauer Dynamic ModelInputDescriptionUnitE0No load voltageVTFuel cell temperatureKKH2Hydrogen valve constantkmol.s^(-1).atm^(-1)KH2OWater valve constantkmol.s^(-1).atm^(-1)KO2Oxygen valve constantkmol.s^(-1).atm^(-1)tH2Hydrogen time constantstH2OWater time constantstO2Oxygen time constantst1Reformer time constantst2Reformer time constantsBActivation voltage constantVCActivation constant parameterA^(-1)CVConversion factor--RintFuel cell internal resistanceohmrhoHydrogen-Oxygen flow ratio--qMethanolMolar flow of methanolkmol/sN0Number of cells--i-startCell operating current start pointAi-stepCell operating current stepAi-stopCell operating current end pointA* For more information about this model visitherePadulles-Amphlett Dynamic ModelInputDescriptionUnitE0No load voltageVTFuel cell temperatureKKH2Hydrogen valve constantkmol.s^(-1).atm^(-1)KH2OWater valve constantkmol.s^(-1).atm^(-1)KO2Oxygen valve constantkmol.s^(-1).atm^(-1)tH2Hydrogen time constantstH2OWater time constantstO2Oxygen time constantst1Reformer time constantst2Reformer time constantsAActive areacm^2lMembrane thicknesscmlambdaAn adjustable parameter with a min value of 14 and max value of 23--R(*Optional)R-ElectronicohmJMaxMaximum current densityA/(cm^2)CVConversion factor--rhoHydrogen-Oxygen flow ratio--qMethanolMolar flow of methanolkmol/sN0Number of cells--i-startCell operating current start pointAi-stepCell operating current stepAi-stopCell operating current end pointA* For more information about this model visithereChakraborty Dynamic ModelInputDescriptionUnitE0No load voltageVTCell operation temperatureKKH2Hydrogen valve constantkmol.s^(-1).atm^(-1)KH2OWater valve constantkmol.s^(-1).atm^(-1)KO2Oxygen valve constantkmol.s^(-1).atm^(-1)rhoHydrogen-Oxygen flow ratio--RintFuel cell internal resistanceohmN0Number of cells--uFuel utilization ratio--i-startCell operating current start pointAi-stepCell operating current stepAi-stopCell operating current end pointA* For more information about this model visithereFind your reports inModel_NamefolderScreen RecordScreen RecordLibraryAmphlett Static Model>>>fromopem.Static.AmphlettimportStatic_Analysis>>>Test_Vector={"T":343.15,"PH2":1,"PO2":1,"i-start":0,"i-stop":75,"i-step":0.1,"A":50.6,"l":0.0178,"lambda":23,"N":1,"R":0,"JMax":1.5,"Name":"Amphlett_Test"}>>>data=Static_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=False)KeyDescriptionTypeStatusSimulation statusBoolPPowerListICell operating currentListVFC voltageListEFFEfficiencyListPhThermal powerListV0Linear-Apx interceptFloatKLinear-Apx slopeFloatEta_ActiveEta activationListEta_ConcEta concentrationListEta_OhmicEta ohmicListVEEstimated FC voltageListFor more information about this model visithereLarminie-Dicks Static Model>>>fromopem.Static.Larminie_DicksimportStatic_Analysis>>>Test_Vector={"A":0.06,"E0":1.178,"T":328.15,"RM":0.0018,"i_0":0.00654,"i_L":100.0,"i_n":0.23,"N":23,"i-start":0.1,"i-stop":98,"i-step":0.1,"Name":"Larminiee_Test"}>>>data=Static_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=False)KeyDescriptionTypeStatusSimulation statusBoolPPowerListICell operating currentListVFC voltageListEFFEfficiencyListPhThermal powerListV0Linear-Apx interceptFloatKLinear-Apx slopeFloatVEEstimated FC voltageListFor more information about this model visithereChamberline-Kim Static Model>>>fromopem.Static.Chamberline_KimimportStatic_Analysis>>>Test_Vector={"A":50.0,"E0":0.982,"b":0.0689,"R":0.328,"m":0.000125,"n":9.45,"N":1,"i-start":1,"i-stop":42.5,"i-step":0.1,"Name":"Chamberline_Test"}>>>data=Static_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=False)KeyDescriptionTypeStatusSimulation statusBoolPPowerListICell operating currentListVFC voltageListEFFEfficiencyListPhThermal powerListV0Linear-Apx interceptFloatKLinear-Apx slopeFloatVEEstimated FC voltageListFor more information about this model visitherePadulles Dynamic Model I>>>fromopem.Dynamic.Padulles1importDynamic_Analysis>>>Test_Vector={"T":343,"E0":0.6,"N0":88,"KO2":0.0000211,"KH2":0.0000422,"tH2":3.37,"tO2":6.74,"B":0.04777,"C":0.0136,"Rint":0.00303,"rho":1.168,"qH2":0.0004,"i-start":0,"i-stop":100,"i-step":0.1,"Name":"PadullesI_Test"}>>>data=Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=False)KeyDescriptionTypeStatusSimulation statusBoolPPowerListICell operating currentListVFC voltageListEFFEfficiencyListPO2Partial pressureListPH2Partial pressureListPhThermal powerListV0Linear-Apx interceptFloatKLinear-Apx slopeFloatVEEstimated FC voltageListFor more information about this model visitherePadulles Dynamic Model II>>>fromopem.Dynamic.Padulles2importDynamic_Analysis>>>Test_Vector={"T":343,"E0":0.6,"N0":5,"KO2":0.0000211,"KH2":0.0000422,"KH2O":0.000007716,"tH2":3.37,"tO2":6.74,"tH2O":18.418,"B":0.04777,"C":0.0136,"Rint":0.00303,"rho":1.168,"qH2":0.0004,"i-start":0.1,"i-stop":100,"i-step":0.1,"Name":"Padulles2_Test"}>>>data=Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=False)KeyDescriptionTypeStatusSimulation statusBoolPPowerListICell operating currentListVFC voltageListEFFEfficiencyListPO2Partial pressureListPH2Partial pressureListPH2OPartial pressureListPhThermal powerListV0Linear-Apx interceptFloatKLinear-Apx slopeFloatVEEstimated FC voltageListFor more information about this model visitherePadulles-Hauer Dynamic Model>>>fromopem.Dynamic.Padulles_HauerimportDynamic_Analysis>>>Test_Vector={"T":343,"E0":0.6,"N0":5,"KO2":0.0000211,"KH2":0.0000422,"KH2O":0.000007716,"tH2":3.37,"tO2":6.74,"t1":2,"t2":2,"tH2O":18.418,"B":0.04777,"C":0.0136,"Rint":0.00303,"rho":1.168,"qMethanol":0.0002,"CV":2,"i-start":0.1,"i-stop":100,"i-step":0.1,"Name":"Padulles_Hauer_Test"}>>>data=Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=False)KeyDescriptionTypeStatusSimulation statusBoolPPowerListICell operating currentListVFC voltageListEFFEfficiencyListPO2Partial pressureListPH2Partial pressureListPH2OPartial pressureListPhThermal powerListV0Linear-Apx interceptFloatKLinear-Apx slopeFloatVEEstimated FC voltageListFor more information about this model visitherePadulles-Amphlett Dynamic Model>>>fromopem.Dynamic.Padulles_AmphlettimportDynamic_Analysis>>>Test_Vector={"A":50.6,"l":0.0178,"lambda":23,"JMax":1.5,"T":343,"N0":5,"KO2":0.0000211,"KH2":0.0000422,"KH2O":0.000007716,"tH2":3.37,"tO2":6.74,"t1":2,"t2":2,"tH2O":18.418,"rho":1.168,"qMethanol":0.0002,"CV":2,"i-start":0.1,"i-stop":75,"i-step":0.1,"Name":"Padulles_Amphlett_Test"}>>>data=Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=False)KeyDescriptionTypeStatusSimulation statusBoolPPowerListICell operating currentListVFC voltageListEFFEfficiencyListPO2Partial pressureListPH2Partial pressureListPH2OPartial pressureListPhThermal powerListV0Linear-Apx interceptFloatKLinear-Apx slopeFloatEta_ActiveEta activationListEta_ConcEta concentrationListEta_OhmicEta ohmicListVEEstimated FC voltageListFor more information about this model visithereChakraborty Dynamic Model>>>fromopem.Dynamic.ChakrabortyimportDynamic_Analysis>>>Test_Vector={"T":1273,"E0":0.6,"u":0.8,"N0":1,"R":3.28125*10**(-3),"KH2O":0.000281,"KH2":0.000843,"KO2":0.00252,"rho":1.145,"i-start":0.1,"i-stop":300,"i-step":0.1,"Name":"Chakraborty_Test"}>>>data=Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=False)KeyDescriptionTypeStatusSimulation statusBoolPPowerListICell operating currentListVFC voltageListEFFEfficiencyListPO2Partial pressureListPH2Partial pressureListPH2OPartial pressureListPhThermal powerListNernst GainNernst GainListOhmic LossOhmic LossListV0Linear-Apx interceptFloatKLinear-Apx slopeFloatVEEstimated FC voltageListFor more information about this model visithereModesTestMode: Active test mode and get/return data asdict, (Default :False)ReportMode: Generate reports(.csv,.opem,.html) and print result in console, (Default :True)PrintMode: Control printing in console, (Default :True)NoteReturn type :dictTelegram BotSend/startcommand toOPEM BOTChoose models from menuSend your test vector according to the templateDownload your resultsTry OPEM in Your Browser!OPEM can be used online in interactive Jupyter Notebooks via the Binder service! Try it out now! :Check.ipynbfiles inDocumentsfolderEdit and execute each part of the notes, step by step from the top panel by run buttonFor executing a complete simulation, you can editTest_VectorinFull RunsectionIssues & Bug ReportsJust fill an issue and describe it. We'll check it ASAP!
or send an email toopem@ecsim.ir.Gitter is another option :OutputsHTMLCSVOPEMDependenciesmasterdevelopThanksChart.jsPyInstallerDraw.ioReference1- J. C. Amphlett, R. M. Baumert, R. F. Mann, B. A. Peppley, and P. R. Roberge. 1995. "Performance Modeling of the Ballard Mark IV Solid Polymer Electrolyte Fuel Cell." J. Electrochem. Soc. (The Electrochemical Society, Inc.) 142 (1): 9-15. doi: 10.1149/1.2043959.2- Jeferson M. Correa, Felix A. Farret, Vladimir A. Popov, Marcelo G. Simoes. 2005. "Sensitivity Analysis of the Modeling Parameters Used in Simulation of Proton Exchange Membrane Fuel Cells." IEEE Transactions on Energy Conversion (IEEE) 20 (1): 211-218. doi:10.1109/TEC.2004.842382.3- Junbom Kim, Seong-Min Lee, Supramaniam Srinivasan, Charles E. Chamberlin. 1995. "Modeling of Proton Exchange Membrane Fuel Cell Performance with an Empirical Equation." Journal of The Electrochemical Society (The Electrochemical Society) 142 (8): 2670-2674. doi:10.1149/1.2050072.4- I. Sadli, P. Thounthong, J.-P. Martin, S. Rael, B. Davat. 2006. "Behaviour of a PEMFC supplying a low voltage static converter." Journal of Power Sources (Elsevier) 156: 119–125. doi:10.1016/j.jpowsour.2005.08.021.5- J. Padulles, G.W. Ault, J.R. McDonald. 2000. "An integrated SOFC plant dynamic model for power systems simulation." Journal of Power Sources (Elsevier) 86 (1-2): 495-500. doi:10.1016/S0378-7753(99)00430-9.6- Hauer, K.-H. 2001. "Analysis tool for fuel cell vehicle hardware and software (controls) with an application to fuel economy comparisons of alternative system designs." Ph.D. dissertation, Transportation Technology
and Policy, University of California Davis.7- A. Saadi, M. Becherif, A. Aboubou, M.Y. Ayad. 2013. "Comparison of proton exchange membrane fuel cell static models." Renewable Energy (Elsevier) 56: 64-71. doi:dx.doi.org/10.1016/j.renene.2012.10.012.8- Diego Feroldi, Marta Basualdo. 2012. "Description of PEM Fuel Cells System." Green Energy and Technology (Springer) 49-72. doi:10.1007/978-1-84996-184-4_29- Gottesfeld, Shimshon. n.d. The Polymer Electrolyte Fuel Cell: Materials Issues in a Hydrogen Fueled Power Source.
 http://physics.oregonstate.edu/~hetheriw/energy/topics/doc/electrochemistry/fc/basic/The_Polymer_Electrolyte_Fuel_Cell.htm10- Mohamed Becherif, Aïcha Saadi, Daniel Hissel, Abdennacer Aboubou, Mohamed Yacine Ayad. 2011.
 "Static and dynamic proton exchange membrane fuel cell models." Journal of Hydrocarbons Mines and Environmental Research 2 (1)11- Larminie, J., Dicks, A., & McDonald, M. S. 2003. Fuel cell systems explained (Vol. 2, pp. 207-225). Chichester, UK: J. Wiley. doi: 10.1002/9781118706992.12- Rho, Y. W., Srinivasan, S., & Kho, Y. T. 1994. ''Mass transport phenomena in proton exchange membrane fuel cells using o 2/he, o 2/ar, and o 2/n 2 mixtures ii. Theoretical analysis.'' Journal of the Electrochemical Society, 141(8), 2089-2096. doi: 10.1149/1.2055066.13- U. Chakraborty, A New Model for Constant Fuel Utilization and Constant Fuel Flow in Fuel Cells, Appl. Sci. 9 (2019) 1066. https://doi.org/10.3390/app9061066.CiteIf you use OPEM in your research , please cite this paper :@article{Haghighi2018,
  doi = {10.21105/joss.00676},
  url = {https://doi.org/10.21105/joss.00676},
  year  = {2018},
  month = {jul},
  publisher = {The Open Journal},
  volume = {3},
  number = {27},
  pages = {676},
  author = {Sepand Haghighi and Kasra Askari and Sarmin Hamidi and Mohammad Mahdi Rahimi},
  title = {{OPEM} : Open Source {PEM} Cell Simulation Tool},
  journal = {Journal of Open Source Software}
}DownloadOPEM.bib(BibTeX Format)JOSSZenodoResearchgateLicenseShow Your SupportStar This RepoGive a ⭐️ if this project helped you!Donate to Our ProjectIf you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .ChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelogand this project adheres toSemantic Versioning.Unreleased1.3- 2021-06-30AddedGitHub actionsChakraborty dynamic modelChangedMenu modifiedTest system modifiedPadulles-Amphlett dynamic model modifiedHTML report modifiedDockerfile updateddescription_printfunction modifieddescription_controlfunction modifiedREADME.mdmodifiedDocument modified1.2- 2020-03-12Added__version__variablecodecov.ymlfileChangedIcon updatedAUTHORS.mdupdatedCONTRIBUTING.mdupdatedTest system modifiedINSTALL.mdmodifiedCLI menu modifiedAmphlett static model modifiedChamberline-Kim static model modifiedLarminie-Dicks static model modifiedCurrent range bug fixed1.1- 2019-07-05AddedMATLAB examplesChangedMenu updatedTest system modifiedDocstrings modifiedDrop Python 3.4 supportdescription_controlfunction modifiedversion_check.pymodifiedREADME.mdmodifiedPadulles-Amphlett model import bug fixeddev-requirements.txtmodifiedWebsite switched to HTTPS1.0- 2019-03-01AddedInteractive notebooks sectionversion_check.pyCODE_OF_CONDUCT.mdISSUE_TEMPLATE.mdPULL_REQUEST_TEMPLATE.mdbuild_exe.batbuild_unix.shAnaconda cloud packageChangedDocument modifiedTest system modifiedREADME.mdmodifieddev-requirements.txtmodifiedrequirements.txtmodifiedCONTRIBUTING.mdmodifiedlinear_plotfunction bug fixedINSTALL.mdmodified0.9- 2018-07-14AddedJOSS paperChangedTest system updatedsetup.pyfile modifiedExceptions modifiedRemovedPEM.md0.8- 2018-04-10AddedOverall parametersLinear approximationThermal power parameterEfficiency vs I plotPH2 vs I plotPO2 vs I plotPower vs Efficiency plotLoss vs I plotPower-Thermal vs I plotmacOS versionChangedSimulation error response0.7- 2018-03-17AddedStandard test vectorsModel descriptionHelp pageWarning systemSystem block diagramChangedHTML report layout0.6- 2018-03-1AddedPadulles-Amphlett dynamic modelcheck_updatefunctionWebpage document sectionChangedGet_Inputfunction default paramsExe-File incompatibility fixed0.5- 2018-02-16AddedPadulles-Hauer dynamic modelSimulation nameInteractive HTML reportChangedqH2O and qH2 in Padulles dynamic model 2 mergedStatic_Analysisfunction outputDynamic_Analysisfunction outputReportMode&PrintModeflags0.4- 2018-02-06AddedTest case of Padulles model 2Padulles dynamic model 2ChangedTravis and Appveyor configsJupyter notebook documentationRemovedRHO in Larmninee model0.3- 2018-01-31AddedPadulles dynamic model 1GUI folderChangedTest cases for static modelsPadulles refactoredJupyter notebook Padulles0.2- 2018-01-05AddedTest case and CIJupyter notebook and documentationExe-VersionBadgesLarminie-Dicks static modelChamberline-Kim static modelpyqt5 to requirmentsRemovedpython2.7 setup for pyqtChangedStyle to PEP8Stack power0.1- 2017-12-25AddedStatic_AnalyzeprototypeAmphlett analyzeCSV output filesDocuments andREADME.md