CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[openFuelCell] Multiphase PEM Fuel cell code for Counter flow

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree9Likes
  • 1 Post By wyldckat
  • 2 Post By wyldckat
  • 1 Post By hansihans
  • 1 Post By mat16
  • 1 Post By mat16
  • 1 Post By ramakant
  • 1 Post By mat16
  • 1 Post By jose.ceballos

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2019, 07:41
Default Multiphase PEM Fuel cell code for Counter flow
  #1
Senior Member
 
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 129
Rep Power: 14
ramakant is on a distinguished road
Dear All

I have a Multiphase PEM Fuel Cell code that is written for co-flow (parallel flow). That code is working fine for co-flow. However, I need to run a simulation for counterflow also. What is the parameters in the PEM fuel cell code that should be modified for counterflow?

Please give me a suggestion for it. I already changed the boundary condition in the config folder(faceSetCathodefluid.topoSetDict) for cathode flow.

Thank you
Regards
Ramakant
Attached Images
File Type: jpg Mesh4.jpg (80.7 KB, 39 views)
ramakant is offline   Reply With Quote

Old   January 20, 2019, 16:41
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,969
Blog Entries: 45
Rep Power: 127
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: I received the PM you sent me, but I don't understand what exactly you are asking about.
If it's just a matter of changing the direction of the flow, you should change it if the boundary conditions files, either in the folder "0" or in the file "system/changeDictionary" if there is one.
__________________
wyldckat is offline   Reply With Quote

Old   January 23, 2019, 07:41
Default
  #3
Senior Member
 
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 129
Rep Power: 14
ramakant is on a distinguished road
Yes i want to change the direction of flow
ramakant is offline   Reply With Quote

Old   January 24, 2019, 21:22
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,969
Blog Entries: 45
Rep Power: 127
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by ramakant View Post
Yes i want to change the direction of flow
Then it's just a matter of changing the vector direction...

I'm not familiar with the openFuelCell example cases, therefore if you can provide the inlet boundary condition that the example you are using as a reference, then it's easier for me or anyone else to show you how to change the direction... but it should be nearly as simple as changing from "(1.35 0 0)" to "(-1.35 0 0)"...

Although this does beg the question: should this really be the way your cell works? Or should you be changing the outlets into inlets and inlets to outlets?
ramakant likes this.
wyldckat is offline   Reply With Quote

Old   January 31, 2019, 02:11
Default
  #5
Senior Member
 
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 129
Rep Power: 14
ramakant is on a distinguished road
this is the error for counter flow
Attached Images
File Type: jpg Screenshot from 2019-01-31 11-35-32.jpg (100.2 KB, 46 views)
ramakant is offline   Reply With Quote

Old   February 2, 2019, 14:08
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,969
Blog Entries: 45
Rep Power: 127
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by ramakant View Post
this is the error for counter flow
It is somewhat indicating that the flow became non-physical. You will have to look at the results with caution and figure out what is going on wrong with the flow.

You can see what is happening, by reducing the write interval to a smaller value, so that you can see the results with more detail. That is what I or anyone else would have to do, to try and diagnose what is wrong.
ramakant and Daniel_Khazaei like this.
wyldckat is offline   Reply With Quote

Old   February 9, 2019, 08:33
Default
  #7
Senior Member
 
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 129
Rep Power: 14
ramakant is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
It is somewhat indicating that the flow became non-physical. You will have to look at the results with caution and figure out what is going on wrong with the flow.

You can see what is happening, by reducing the write interval to a smaller value, so that you can see the results with more detail. That is what I or anyone else would have to do, to try and diagnose what is wrong.
Dear Bruno Santos

I want to change the inlet composition of air (mole fraction).For air 0.2, 0.15 and 0.1 (mole fraction) the pemfcSinglePhase-4.0 is running ,but when i am changing the mole fraction 0.01 (oxygen).Floating point exception (core dumped) error is showing?. Any solution for this kind of error?

Thank you
ramakant is offline   Reply With Quote

Old   March 29, 2019, 12:18
Default
  #8
New Member
 
Hans Xaver
Join Date: Dec 2018
Location: Germany
Posts: 8
Rep Power: 6
hansihans is on a distinguished road
Hi Ramakant,

As far as I can see you are using the pemfcMultiPhaseNonIsothermalSolver by Jean-Paul-Kone, arenīt you?

So I am working on this model, too. I also changed the molar fraction of air and fuel (and one or two small changes on the MEA).

For using
YH2fuel = 0.8 , YH2Ofuel = 0.2 and
YH2Oair = 0.1 , YN2air = 0.1, YO2air = 0.8

I managed to get no errors. But I did not change any direction of the flow.

for this I would change the boundary conditions like mentioned before. And change the inlets and outlets, which must be done in the /config folder.
ramakant likes this.
hansihans is offline   Reply With Quote

Old   March 29, 2019, 13:14
Default
  #9
Senior Member
 
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 129
Rep Power: 14
ramakant is on a distinguished road
Quote:
Originally Posted by hansihans View Post
Hi Ramakant,

As far as I can see you are using the pemfcMultiPhaseNonIsothermalSolver by Jean-Paul-Kone, arenīt you?

So I am working on this model, too. I also changed the molar fraction of air and fuel (and one or two small changes on the MEA).

For using
YH2fuel = 0.8 , YH2Ofuel = 0.2 and
YH2Oair = 0.1 , YN2air = 0.1, YO2air = 0.8

I managed to get no errors. But I did not change any direction of the flow.

for this I would change the boundary conditions like mentioned before. And change the inlets and outlets, which must be done in the /config folder.
Yes I am working on OF with pemfcsmultiphase.I want to check for lowest mass fraction of water vapor.
ramakant is offline   Reply With Quote

Old   August 30, 2019, 06:33
Default
  #10
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 529
Rep Power: 19
bastil is on a distinguished road
Quote:
Originally Posted by ramakant View Post
Yes I am working on OF with pemfcsmultiphase
Just wondering where this solver can be found? Thanks.
bastil is offline   Reply With Quote

Old   January 11, 2021, 09:47
Default
  #11
New Member
 
Mattia
Join Date: Nov 2020
Posts: 7
Rep Power: 4
mat16 is on a distinguished road
Quote:
Originally Posted by ramakant View Post
this is the error for counter flow
Hi Ramakant,

I'm working on multiphase fuel cell, pemfcMultiPhaseNonIsothermalSolver by Jean-Paul-Kone, and I have the same problem in calculating the overpotentials.

--> FOAM FATAL ERROR:
Root is not bracketed. f(x0) = -0.07406399 f(x1) = -2.00275

From function Foam::scalar Foam::RiddersRoot<Func>::root
(
const scalar x0,
const scalar x1
) const
in file ../src/tools/RiddersRoot/RiddersRoot.C at line 190.

FOAM aborting

min,mean,max (RiMem) = 7.430817e-06 1.864376e-05 3.46878e-05
min,mean,max (ASR)= 1.181346e-05 2.302641e-05 3.907044e-05
min,mean,max (cathodeT) = 359.4382 376.1965 385.5225
min,mean,max (i0Ca) = 0.02150183 0.06645341 0.1128227
min,mean,max (iLCa) = 9.024553e-11 11511.19 39336.9
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 ? at ~/OpenFOAM/mattia-4.0/run/Modelli_Esempio/pemfcMultiphaseModel-4.0/pemfcMultiPhaseNonIsothermalSolver/applications/../src/tools/RiddersRoot/RiddersRoot.C:196
#3 ? at ~/OpenFOAM/mattia-4.0/run/Modelli_Esempio/pemfcMultiphaseModel-4.0/pemfcMultiPhaseNonIsothermalSolver/applications/../src/electrochemistry/totalCurrent.H:24 (discriminator 49)
#4 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#5 ? at ??:?

The flow direction is the same for the reagents (coflow) but I changed the geometry by increasing the size (22x22 --> 100x100) and inserting five serpentine channels. The reason for this error is perhaps not the same but can you give me some input on how you solved it? Or can someone else help me?

Thank you
ramakant likes this.
mat16 is offline   Reply With Quote

Old   January 12, 2021, 12:47
Default
  #12
Senior Member
 
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 129
Rep Power: 14
ramakant is on a distinguished road
Quote:
Originally Posted by mat16 View Post
Hi Ramakant,

I'm working on multiphase fuel cell, pemfcMultiPhaseNonIsothermalSolver by Jean-Paul-Kone, and I have the same problem in calculating the overpotentials.

--> FOAM FATAL ERROR:
Root is not bracketed. f(x0) = -0.07406399 f(x1) = -2.00275

From function Foam::scalar Foam::RiddersRoot<Func>::root
(
const scalar x0,
const scalar x1
) const
in file ../src/tools/RiddersRoot/RiddersRoot.C at line 190.

FOAM aborting

min,mean,max (RiMem) = 7.430817e-06 1.864376e-05 3.46878e-05
min,mean,max (ASR)= 1.181346e-05 2.302641e-05 3.907044e-05
min,mean,max (cathodeT) = 359.4382 376.1965 385.5225
min,mean,max (i0Ca) = 0.02150183 0.06645341 0.1128227
min,mean,max (iLCa) = 9.024553e-11 11511.19 39336.9
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 ? at ~/OpenFOAM/mattia-4.0/run/Modelli_Esempio/pemfcMultiphaseModel-4.0/pemfcMultiPhaseNonIsothermalSolver/applications/../src/tools/RiddersRoot/RiddersRoot.C:196
#3 ? at ~/OpenFOAM/mattia-4.0/run/Modelli_Esempio/pemfcMultiphaseModel-4.0/pemfcMultiPhaseNonIsothermalSolver/applications/../src/electrochemistry/totalCurrent.H:24 (discriminator 49)
#4 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#5 ? at ??:?

The flow direction is the same for the reagents (coflow) but I changed the geometry by increasing the size (22x22 --> 100x100) and inserting five serpentine channels. The reason for this error is perhaps not the same but can you give me some input on how you solved it? Or can someone else help me?

Thank you
What is the mass flow rate for anode and cathode inlet? How you have calculated?
ramakant is offline   Reply With Quote

Old   January 12, 2021, 13:51
Default
  #13
New Member
 
Mattia
Join Date: Nov 2020
Posts: 7
Rep Power: 4
mat16 is on a distinguished road
Quote:
Originally Posted by ramakant View Post
What is the mass flow rate for anode and cathode inlet? How you have calculated?
Hi Ramakant,

No, I have left the mass flow rates of the base model to see what was happening and it gives me this error. Since the geometry is larger I expected the reagents to wear out immediately, in fact this error gives me it after 0.1 s. I have not calculated the new flow rates but I have increased the input speeds but it stops immediately even in this way even if I increase the speeds a lot.
ramakant likes this.
mat16 is offline   Reply With Quote

Old   January 13, 2021, 01:26
Default
  #14
Senior Member
 
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 129
Rep Power: 14
ramakant is on a distinguished road
Quote:
Originally Posted by mat16 View Post
Hi Ramakant,

No, I have left the mass flow rates of the base model to see what was happening and it gives me this error. Since the geometry is larger I expected the reagents to wear out immediately, in fact this error gives me it after 0.1 s. I have not calculated the new flow rates but I have increased the input speeds but it stops immediately even in this way even if I increase the speeds a lot.
Please assign the correct all inlet boundary condition values properly to run the code.

Thank you
mat16 likes this.
ramakant is offline   Reply With Quote

Old   January 13, 2021, 05:57
Default
  #15
New Member
 
Mattia
Join Date: Nov 2020
Posts: 7
Rep Power: 4
mat16 is on a distinguished road
Quote:
Originally Posted by ramakant View Post
Please assign the correct all inlet boundary condition values properly to run the code.

Thank you
Hi Ramakant,

First of all thanks for your answers.

Maybe I didn't quite understand how to change the initial data so I'll tell you what I did. I want to increase the mass flow rate because it gives me this error with the values ​​of the basic model (m_anode_model = 5.29e-06; m_cathode_model = 4.25e-05; stoichiometric ratio ζ = 8; U_anode_model=1; U_cathode_model=2.1134; Ach=2,20e-05)
I increased it by imposing a higher value (m_anode = 3.00e-04; m_cathode = 2.41e-03 keeping the same ζ = 8) and I calculated the new U_inlet that the model wants to input as:

U_inlet = m / (Ach * rho)

(U_inlet_anode = 2.320 ; U_inlet_cathode= 4.902)

with Ach the area of ​​the face in contact with the GDL

1) Is this procedure correct?

2) Changing the mass flow rate and therefore the speed, the only boundary condition that I have to change in this new case is the U in "0 / folder"?

Thank you
ramakant likes this.
mat16 is offline   Reply With Quote

Old   March 31, 2021, 02:19
Default
  #16
Senior Member
 
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 129
Rep Power: 14
ramakant is on a distinguished road
Quote:
Originally Posted by mat16 View Post
Hi Ramakant,

First of all thanks for your answers.

Maybe I didn't quite understand how to change the initial data so I'll tell you what I did. I want to increase the mass flow rate because it gives me this error with the values ​​of the basic model (m_anode_model = 5.29e-06; m_cathode_model = 4.25e-05; stoichiometric ratio ζ = 8; U_anode_model=1; U_cathode_model=2.1134; Ach=2,20e-05)
I increased it by imposing a higher value (m_anode = 3.00e-04; m_cathode = 2.41e-03 keeping the same ζ = 8) and I calculated the new U_inlet that the model wants to input as:

U_inlet = m / (Ach * rho)

(U_inlet_anode = 2.320 ; U_inlet_cathode= 4.902)

with Ach the area of ​​the face in contact with the GDL

1) Is this procedure correct?

2) Changing the mass flow rate and therefore the speed, the only boundary condition that I have to change in this new case is the U in "0 / folder"?

Thank you
Dear
You need to change the formula for velocity calculation ?
ramakant is offline   Reply With Quote

Old   January 7, 2022, 17:32
Default
  #17
New Member
 
Jose
Join Date: Dec 2020
Posts: 15
Rep Power: 4
jose.ceballos is on a distinguished road
Hello guys;

I want to run simulations applying different temperatures (equal cell operating and reactant gases temperature). The code is set to work with 353 K, I would like to know how can I run it with different temperatures. I have tried changing different parameters related to T, but I can't pass time 1.


Thanks,
ramakant likes this.
jose.ceballos is offline   Reply With Quote

Old   January 11, 2022, 09:09
Default
  #18
Senior Member
 
Ramakant Gadhewal
Join Date: Apr 2010
Location: Chemical Engineering,National Institute of Technology,Warangal (T.S.),India
Posts: 129
Rep Power: 14
ramakant is on a distinguished road
Quote:
Originally Posted by jose.ceballos View Post
Hello guys;

I want to run simulations applying different temperatures (equal cell operating and reactant gases temperature). The code is set to work with 353 K, I would like to know how can I run it with different temperatures. I have tried changing different parameters related to T, but I can't pass time 1.


Thanks,
Dear

You need to calculate temperature-based transport properties like density, thermal conductivity, viscosity, etc.
All the best.
ramakant is offline   Reply With Quote

Old   January 11, 2022, 15:35
Default Change temperature to pemfcMultiphaseModel-4.0
  #19
New Member
 
Jose
Join Date: Dec 2020
Posts: 15
Rep Power: 4
jose.ceballos is on a distinguished road
Quote:
Originally Posted by ramakant View Post
Dear

You need to calculate temperature-based transport properties like density, thermal conductivity, viscosity, etc.
All the best.
I did it, but still can't find convergence. pemfcMultiphaseModel-4.0 is set to 353 K and I want to run it at 313, 323, 333 and 343 K. I calculated all properties and also used values obtained from tables (I have different cases/folders for calculated and table values); but still no convergence, stops at time 1. I suppose, that I have changed all the parameters and properties affected by temperature. Stops at time 1 with bracketing error.
jose.ceballos is offline   Reply With Quote

Old   February 23, 2023, 04:59
Default
  #20
NKH
New Member
 
Hoan
Join Date: Sep 2021
Location: Korea
Posts: 1
Rep Power: 0
NKH is on a distinguished road
Quote:
Originally Posted by ramakant View Post
this is the error for counter flow
Hi,
I make the same problems when I try to solve the serpentine geometry. I faced this in the first step. I had checked the boundary condition but I have no idea what I was wrong.
NKH is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pem fuel cell simulation using ansys fluent engrarif FLUENT 3 September 7, 2018 02:55
problem with PEM fuel cell modeling and I-V curve AmiN.D FLUENT 3 July 24, 2017 02:39
two phase flow in microchannel fuel cell Anju Kachhap Fluent Multiphase 0 May 25, 2015 02:32
how turn off Energy solver in PEM fuel cell AmiN.D FLUENT 0 January 7, 2015 07:03
PEM Fuel Cell 2D Model shamsnoor FLUENT 0 August 21, 2009 12:29


All times are GMT -4. The time now is 11:33.