pemfcSinglePhaseModel-4.0 on OpenFOAM
1 Attachment(s)
Dear All
I need your comments on compiling the above PEM fuel cell Single Phase model. When I am compiling ./Allwmake its shows fatal error. Please, any can give me solution for this. Thank you Ramakant |
pemfc Model OFv4.0
Hey everyone,
I am currently on working with the pemfc-Model for OFv4.0 which is based on openFuelcell. http://www.mdpi.com/2079-3197/6/2/38 and http://dx.doi.org/10.17632/3gz7pxznzn.1 Does anyone have already experience with it? When I try to compile the model I get the following error: Quote:
Thanks in advance |
Quote:
I am also working/using on the same openfuelcell code and getting the same kind of the compilation (./Allwmake) error. |
Quote:
Same here, I contacted the main author of the paper, unfortunately he could not assist me with the issue. I think that the uploaded code lacks an important detail (it is unfinished, perhaps?). For example, during compilation (before the crash) the first (from many) error is given with the following message: Quote:
Quote:
Quote:
|
pemfcSinglePhaseModel-4.0 with OpenFOAM
1 Attachment(s)
I have installed on my computer the OF4.0 (Ubuntu 16.04 on OS) as per the author instructions and try to compile the pemfcSinglePhaseModel-4.0.While compiling (./Allwclean & ./Allwmake ) the following error is showing on the screen. Please give some comments on the error.
Thank you Ramakant |
Greetings to all,
I've split off from the OpenFuelCell thread, the posts that are referring to the package provided here: http://dx.doi.org/10.17632/3gz7pxznzn.1 Apparently that ZIP file was somehow corrupted by someone in the middle... what I mean is that the file "lib/myPatchToPatchInterpolation/mypatchToPatchInterpolation.H" was replaced by the content from "lib/myPatchToPatchInterpolation/myPatchToPatchInterpolation.H", which is why this problem is occurring. It's possible to recover the broken file, by using the original code "patchToPatchInterpolation.H" from OpenFOAM 4.0 as a basis. After downloading the ZIP file, I've ran the following commands, in order to be able to compile the code with OpenFOAM 4.0, along with the necessary corrections: Code:
unzip pemfcSinglePhaseModel-4.0.zip Code:
... Best regards, Bruno |
Hey Bruno,
worked out really well in my case too. Many thanks for your support! Best, Amadeus |
Quote:
Many thanks for your support! thnak you Ramakant |
Hi!
The model works fine now. Thank you! Best regards, Michal |
Quote:
Thank you |
How to plot graph between Cell Voltage Vs Current Density
Quote:
I need your help regarding the graph. After the simulation is over how to plot a graph between Cell voltage Vs current density. Thank you |
Modification of the pemFC -Model
1 Attachment(s)
Hey Everyone,
recently I modified the "pemfcSinglePhaseNonIsothermal" - Model. New geometry (length, width and hight of the fuel cell, channel number, channel area, thickness of the functional layers), new reaction kinetic parameters (transfer coefficent, exchange current density) and mass transport parameters (effective diffusivity, porosity) have been changed in the test case. According to checkMesh the mesh is OK. No modification of the source code (yet)! However, simulating these new test cases is not successful. Error is always the same. (log.file is attached). By studying the log.file I come to the conclusion, that the O2 concentration tends to zero (1e-15) which causes floating point errors in current density calculation. Increasing the O2 concentration at the inlet does not lead to any improvement. Is there anybody who is familiar with this model and can help me? I would appreciate any kind of recommendation :-) Greeting, Amadeus |
I do not have a solution for this problem, but I am working on the multiphase model of it and tried the singlephase model before.
But what I noticed in your logfile is that in line 271 (Solving air flow) and line 280 (solving fuel flow) you do not get any FOAM Warning like I get Code:
Solving air flow Like I mentioned before I am working on the multiphase model and also changed some parameter of the MEA and changed the geometry (one Inlet & outlet) but I am stuck in another error which may could be solved with that here. |
Hey Hans,
you can change unbounded Gauss div scheme to bounded Gauss in ../system/air/fvSchemes and ../system/fuel/fvSchemes. A detailed OF4.0 installation can be found here: https://openfoamwiki.net/index.php/I...OAM-4.0/Ubuntu Best Regards, Amadeus |
Thanks Amadeus,
the information of the installation of OpenFOAM 4.0 helped me. But the thing with bounded Gauss in the fvSchemes did not work in my test cases. Cases that worked before do not work now (they only get to Time = 4 and then abort, there are also differences noticable on the residuals). So maybe you have some problems with it, too. Kind regards, Hans |
Hey Hans,
yeah the model is quite delicate when changing parameters. Same often happened to me. Check fvSolution and may increase the maxIt or the tolerance. Do you recalculated the inlet velocity for your customized case with the attached formula? In my case I also changed the fuel mass fractions of hydrogen and water. Best regards, Amadeus |
Hi Amadeus,
I tried it with the attached formula (in the single phase paper it is formula 8) but I did not get the same value out of it like in the author´s case. I mean R, T, p and F are known, stoichiometric flow ratio is given, too. For n=2, I=6000A/m2, A_mea= 22*22mm2 and A_ch= 1,5*2mm2 I get completely other values. To get the same result as the author, A_mea would only be 45% of A_ch, which could not be true. So either I used wrong values or my calculator is broken :confused: In my test cases I changed the mass fractions, too, but currently I am trying to change my geometry that it may somehow works. And then I will change other variables. Kind regards, Hans |
Hey Hans,
check out this paper, where the formula actually comes from: https://www.sciencedirect.com/scienc...17931004004685 I also got confused by calculating the velocity using this formula. In your case you have to consider, that in the default test case the fuel cell comprises of 7 channels (your case 2 channels?!). So you can't match because a different flow rate is necessary to achieve the prescribed stoichiometric ratio... Best Regards, Amadeus |
pemfcSinglePhaseModel-4.0 on OpenFOAM
1 Attachment(s)
Hi everyone. I've ran the following commands but still I didn't get the same code as in the log.make2 file.
Quote:
Thanks. Attachment 69507 |
Hi Muhammad,
looks like you are running OpenFOAM 6 and this model only works with OpenFOAM 4. If you have multiple OpenFOAM versions installed you have to use aliases in the bashrc to activate the desired version. But in my case I could not install OF4 on windows so I had to install Ubuntu parallel to windows. Kind regards Hans |
Thanks Hans, it worked!
|
Hello
It seems the last post about this model is almost a year ago. I recently tried to use this pemfc model in openfoam4 and was able to compile it according to the earlier post. However when I tried to run the main script by typing ' make run' in run directory, I got this error. I ran blockMesh command to generate mesh file but I cannot see the 'cellRegionAddressing' file that the error message is referring to. Can you help to fix this issue ? Thanks, ( pemfcSinglephaseNonIsothermalSolver | tee log.run ); /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 4.0 Exec : pemfcSinglephaseNonIsothermalSolver Date : May 19 2020 Time : 08:22:14 Host : "ws-Satellite-L655" PID : 6511 Case : /home/ws/OpenFOAM/ws-4.0/run/pemfcSinglePhaseModel-4.0/run nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading cell properties galvanostatic run V = V [1 2 -3 0 0 -1 0] 0.6 Ibar0 = Ibar0 [0 -2 0 0 0 1 0] 7000 Rhat = Rhat [1 4 -3 0 0 -2 0] 1e-05 Rhat0 = Rhat0 [1 4 -3 0 0 -2 0] 1e-05 CL electronic conductivity(kappaCl) = kappaCl [-1 -2 3 0 0 2 0] 1000 GDL electronic conductivity(kappaGdl) = kappaGdl [-1 -2 3 0 0 2 0] 5000 GDL - BP Contact resistance (rContact)= rContact [1 4 -3 0 0 -2 0] 2e-06 BP electronic conductivity(kappaBp) = kappaBp [-1 -2 3 0 0 2 0] 83000 CL thickness (tCl) = tCl [0 1 0 0 0 0 0] 3.7e-06 GDL thickness (tGdl) = tGdl [0 1 0 0 0 0 0] 0.00041 BP thickness (tBp) = tBp [0 1 0 0 0 0 0] 0.003 concentration overpotential constant = etaConCaConstant [0 0 0 0 0 0 0] 0.25 Tinit = Tinit [0 0 0 1 0 0 0] 353 anodeName = fuel_to_electrolyte fuelInletName = fuelInlet fuelOutletName = fuelOutlet fuelAbpName = fuel_to_abp cathodeName = air_to_electrolyte airInletName = airInlet airOutletName = airOutlet airCbpName = air_to_cbp electrolyteAnodeName = electrolyte_to_fuel electrolyteCathodeName = electrolyte_to_air abpFuelName = abp_to_fuel cbpAirName = cbp_to_air Reading cell field T Reading cell field k --> FOAM FATAL IO ERROR: cannot find file file: /home/ws/OpenFOAM/ws-4.0/run/pemfcSinglePhaseModel-4.0/run/constant/abp/polyMesh/cellRegionAddressing at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 72. FOAM exiting |
Quote:
please follow the steps to run the program and it is working fine for me. My email id:ramakantgadhewal@gmail.com |
I'm also checking this code. I'm new to OpenFoam, I used the Fluent module, but I wanted to check this open source software. My question is, do you upload a geometry? because I can't find it in the files. I am reading about meshing here https://www.cfd.at/downloads/FoamTut...ExampleTwo.pdf
So, if I want to run this code, d I have to make my own geometry? Sorry I was accustomed with Fluent. Thank you in advance with your response. |
Quote:
|
Quote:
Hey everyone, I downloaded the version of OpenFoam 4.0 on ubuntu 16.04. https://openfoamwiki.net/index.php/I...OAM-4.0/Ubuntu I have followed this procedure but it gives me the same error. https://imagizer.imageshack.com/v2/8...922/IvwsdQ.png https://imagizer.imageshack.com/v2/8...924/jgIPFy.png Also during the unzip of the file it asks me: https://imagizer.imageshack.com/v2/8...924/6Z82Qv.png I do yes and it opens correctly. Someone help me? Thanks in advance |
I installed the same and i didn't have any problem compiling. I copied wyldckat instructions line by line and it worked out fine. I got the logs correctly. This is what I did:
1. After instalation I ran mkdir -p $FOAM_RUN 2. I copied the zip to the user4.0/run folder 3. I ran the commands line by line and it compiled just fine. |
Error after compiling on the abp
Do you have any idea why i have this error. I followed instructions, I even installed OF4.0 instead of 4.1 but I got the same error.
Quote:
|
Hi Maricarmen,
It worked! Many thanks for your support! Best regards |
Modification
Has anyone tried to modify the fuel? What happens if I change H2 for CH3OH? I think for Methanol model the cathode remains the same, but the anode equations are modified. Has anyone tried to do so? :D
|
Quote:
|
Quote:
I'm trying to modify it. I know there are other phenomena but I just want to check how this can be done. I saw someone modified the Fluent pem fuel cell module but it didn't say how they did it. |
Quote:
|
Quote:
I changed the geometry and I have the same error as you. https://imagizer.imageshack.com/v2/8...924/eVsfmq.png Can someone help me? Thank you. |
Compiling error pemfcSinglePhaseModel-4.0
Quote:
Code:
+ cd lib |
Request pemfcSinglePhaseModel-4.0.zip
Someone could upload the pemfcSinglePhaseModel-4.0 fixed to downloand it?
|
parallel running
Did anyone try running this code in parallel ?
|
All times are GMT -4. The time now is 19:43. |