|
[Sponsors] |
[openFuelCell] pemfcSinglePhaseModel-4.0 on OpenFOAM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 12, 2018, 01:37 |
pemfcSinglePhaseModel-4.0 on OpenFOAM
|
#1 |
Senior Member
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 131
Rep Power: 16 |
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 |
|
September 18, 2018, 12:00 |
pemfc Model OFv4.0
|
#2 | |
New Member
Amadeus Wolf
Join Date: Dec 2017
Location: Germany
Posts: 11
Rep Power: 8 |
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 |
||
September 18, 2018, 13:00 |
|
#3 | |
Senior Member
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 131
Rep Power: 16 |
Quote:
I am also working/using on the same openfuelcell code and getting the same kind of the compilation (./Allwmake) error. |
||
September 19, 2018, 11:04 |
|
#4 | ||||
New Member
Michal
Join Date: Sep 2018
Posts: 2
Rep Power: 0 |
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:
|
|||||
September 23, 2018, 02:02 |
pemfcSinglePhaseModel-4.0 with OpenFOAM
|
#5 |
Senior Member
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 131
Rep Power: 16 |
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 |
|
September 26, 2018, 18:50 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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 cd pemfcSinglePhaseModel-4.0 cd pemfcSinglePhaseNonIsothermalSolver find -name "All*" | xargs chmod +x cp $FOAM_SRC/OpenFOAM/interpolations/patchToPatchInterpolation/patchToPatchInterpolation.H lib/myPatchToPatchInterpolation/mypatchToPatchInterpolation.H sed -i -e 's=patchToPatchInterpolation=mypatchToPatchInterpolation=g' -e 's=PatchToPatchInterpolation=myPatchToPatchInterpolation=g' lib/myPatchToPatchInterpolation/mypatchToPatchInterpolation.H ./Allwmake > log.make 2>&1 ./Allwmake > log.make2 2>&1 Code:
... ..../libSinglephasePEMFC.so' is up to date. ... .../pemfcSinglephaseNonIsothermalSolver' is up to date. Best regards, Bruno
__________________
|
|
September 27, 2018, 04:20 |
|
#7 |
New Member
Amadeus Wolf
Join Date: Dec 2017
Location: Germany
Posts: 11
Rep Power: 8 |
Hey Bruno,
worked out really well in my case too. Many thanks for your support! Best, Amadeus |
|
September 27, 2018, 05:38 |
|
#8 |
Senior Member
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 131
Rep Power: 16 |
||
September 27, 2018, 05:45 |
|
#9 |
New Member
Michal
Join Date: Sep 2018
Posts: 2
Rep Power: 0 |
Hi!
The model works fine now. Thank you! Best regards, Michal |
|
September 27, 2018, 11:13 |
|
#10 |
Senior Member
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 131
Rep Power: 16 |
||
October 1, 2018, 13:27 |
How to plot graph between Cell Voltage Vs Current Density
|
#11 |
Senior Member
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 131
Rep Power: 16 |
||
January 31, 2019, 09:05 |
Modification of the pemFC -Model
|
#12 |
New Member
Amadeus Wolf
Join Date: Dec 2017
Location: Germany
Posts: 11
Rep Power: 8 |
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 |
|
March 29, 2019, 13:16 |
|
#13 |
New Member
Hans Xaver
Join Date: Dec 2018
Location: Germany
Posts: 8
Rep Power: 7 |
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 --> FOAM Warning : From function Foam::fv::gaussConvectionScheme<Type>::gaussConvectionScheme(const Foam::fvMesh&, const surfaceScalarField&, Foam::Istream&) [with Type = Foam::Vector<double>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>] in file finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H at line 124 Reading "/home/hans/OpenFOAM/hans-4.1/run/cases_runned/Kone_PEM-FC_cases/singlephase/case_0/system/air/fvSchemes.divSchemes.div(phi,U)" at line 32 Unbounded 'Gauss' div scheme used in steady-state solver, use 'bounded Gauss' to ensure boundedness. To remove this warning switch off 'warnUnboundedGauss' in "/opt/openfoam4/etc/controlDict" DILUPBiCG: Solving for Ux, Initial residual = 0.9999968, Final residual = 1.5478e-10, No Iterations 4 DILUPBiCG: Solving for Uy, Initial residual = 0.999979, Final residual = 4.87157e-12, No Iterations 5 DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 2.371463e-10, No Iterations 4 DICPCG: Solving for p, Initial residual = 1, Final residual = 7.897306e-10, No Iterations 238 time step continuity errors : sum local = 2.027143e-06, global = -3.367083e-08 DICPCG: Solving for p, Initial residual = 0.0403882, Final residual = 8.410109e-10, No Iterations 215 time step continuity errors : sum local = 2.235446e-06, global = -6.680733e-08 Solving fuel flow --> FOAM Warning : From function Foam::fv::gaussConvectionScheme<Type>::gaussConvectionScheme(const Foam::fvMesh&, const surfaceScalarField&, Foam::Istream&) [with Type = Foam::Vector<double>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>] in file finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H at line 124 Reading "/home/hans/OpenFOAM/hans-4.1/run/cases_runned/Kone_PEM-FC_cases/singlephase/case_0/system/fuel/fvSchemes.divSchemes.div(phi,U)" at line 32 Unbounded 'Gauss' div scheme used in steady-state solver, use 'bounded Gauss' to ensure boundedness. To remove this warning switch off 'warnUnboundedGauss' in "/opt/openfoam4/etc/controlDict" DILUPBiCG: Solving for Ux, Initial residual = 0.9999968, Final residual = 1.317541e-11, No Iterations 3 DILUPBiCG: Solving for Uy, Initial residual = 0.9997891, Final residual = 7.226337e-10, No Iterations 3 DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 2.37403e-10, No Iterations 4 DICPCG: Solving for p, Initial residual = 1, Final residual = 6.313857e-10, No Iterations 231 time step continuity errors : sum local = 9.173014e-07, global = 2.219646e-10 DICPCG: Solving for p, Initial residual = 0.04314282, Final residual = 8.862404e-10, No Iterations 208 time step continuity errors : sum local = 8.865e-07, global = 1.06748e-08 ReFuel = 23.95892 ReAir = 144.5844 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. |
|
March 31, 2019, 18:51 |
|
#14 |
New Member
Amadeus Wolf
Join Date: Dec 2017
Location: Germany
Posts: 11
Rep Power: 8 |
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 |
|
April 4, 2019, 04:49 |
|
#15 |
New Member
Hans Xaver
Join Date: Dec 2018
Location: Germany
Posts: 8
Rep Power: 7 |
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 |
|
April 4, 2019, 08:55 |
|
#16 |
New Member
Amadeus Wolf
Join Date: Dec 2017
Location: Germany
Posts: 11
Rep Power: 8 |
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 |
|
April 8, 2019, 11:51 |
|
#17 |
New Member
Hans Xaver
Join Date: Dec 2018
Location: Germany
Posts: 8
Rep Power: 7 |
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 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 |
|
April 8, 2019, 13:27 |
|
#18 |
New Member
Amadeus Wolf
Join Date: Dec 2017
Location: Germany
Posts: 11
Rep Power: 8 |
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 |
|
April 19, 2019, 23:37 |
pemfcSinglePhaseModel-4.0 on OpenFOAM
|
#19 | |
New Member
Muhammad
Join Date: Jan 2019
Location: Malaysia
Posts: 3
Rep Power: 7 |
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. Screenshot (43).jpg |
||
April 21, 2019, 19:14 |
|
#20 |
New Member
Hans Xaver
Join Date: Dec 2018
Location: Germany
Posts: 8
Rep Power: 7 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin | CFDFoundation | OpenFOAM Announcements from Other Sources | 0 | January 4, 2017 07:15 |
[OpenFOAM.org] OpenFOAM 4.0, bad option -t in zsh | rdbisme | OpenFOAM Installation | 3 | December 30, 2016 13:10 |
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days | joegi.geo | OpenFOAM Announcements from Other Sources | 0 | October 1, 2016 20:20 |
OpenFOAM Training: Programming CFD Course 12-13 and 19-20 April 2016 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | January 14, 2016 11:19 |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 10:04 |