|
[Sponsors] |
How to write these time-dependent equation (PEM Fuel Cell) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 10, 2022, 16:53 |
|
#21 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
You mention repository by that do you mean HTPEM? I made an example case for HTPEM, the overall changes necessary are the same for the LTPEM code to my knowledge. Let me know if there are any issues. Do note I don't know if the HTPEM code can handle a cell temperature of 80C.
Let me know when you have downloaded the case so that I can remove it, however, just a short description for any future insterest, change all T boundary fields to 150C instead of 160C and the cell properties file for the temperature fields except of the reference field. https://www.dropbox.com/s/wr8rhsx6dq...se.tar.gz?dl=0 Regards Lasse |
|
January 11, 2022, 15:45 |
Change temperature to pemfcMultiphaseModel-4.0
|
#22 | |
New Member
Jose
Join Date: Dec 2020
Posts: 18
Rep Power: 6 |
Quote:
But I meant this repository: https://unnc.digitalcommonsdata.com/...s/c743sh73j8/1 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. I have no problems building polarization curves at 353 K and changing parameters. But I can't do it at others temperatures. |
||
January 11, 2022, 16:03 |
|
#23 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Hello Jose, alright my bad for misunderstanding, I will have a look at the case and see if I can make it run at a lower temperature in the near future.
Regards Lasse |
|
January 11, 2022, 16:41 |
|
#24 |
New Member
Jose
Join Date: Dec 2020
Posts: 18
Rep Power: 6 |
||
February 3, 2022, 08:20 |
|
#25 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Hello Jose, sorry for the long delay.
I had to update the source code to V6 as its the lowest version I have running, its located here: https://github.com/Swagga5aur/pemfcMultiphaseModel A working case with a 10 degree lower operational temperature is located here: https://www.dropbox.com/s/dtrwcd61jm...LT.tar.gz?dl=0 Do note that its not as simple to run a general polarization curve with a fixed electrolyte temperature, but I'm note sure if that is what you want or if this is enough. Let me know if there are any questions or issues. Regards, Lasse |
|
February 6, 2022, 03:27 |
|
#26 | |
New Member
Jose
Join Date: Dec 2020
Posts: 18
Rep Power: 6 |
Quote:
I have read that this toolbox is very sensitive to temperature and exchange current density. But It would be possible to reach the 40°C (313 K)? How could I argue my response? Thank you very much for your help. Maybe this information will be of help for other users. I will keep working. |
||
February 6, 2022, 17:50 |
|
#27 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Hello Jose,
To help the solver reaching a lower temperature consider changing the residual control or fvSchemes. However, I'm not certain that 40C is realistic for a LT pem from my experience due to high chances of flooding at these low temperatures, I would guess some of the physical or fluid parameters have to be altered to avoid flooding. I ran into issues with lower temperatures (just tried 40C), due to RiddersRoot called in totalCurrent.H. Hope this is of any help. Regards Lasse |
|
February 6, 2022, 17:55 |
|
#28 | |
New Member
Jose
Join Date: Dec 2020
Posts: 18
Rep Power: 6 |
Quote:
|
||
September 24, 2024, 18:46 |
|
#29 | |
New Member
Join Date: Dec 2022
Posts: 15
Rep Power: 4 |
Quote:
How did you master to compile the ‚Kone‘ source code in OF-V4.x, please? I tried with various docker images and various compilers, but didn’t succeed so far. Cheers, Ronny |
||
September 26, 2024, 04:42 |
|
#30 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Hello Ronny,
I sadly weren't able to try and compile the V4.0 source code as I didn't have a Linux distro available to compile the version 4 of the foundation edition code, so I had to update it to V6.0 which is mentioned in a previous post. If you are having trouble first I would secure that it's V4.0 you have and not V4.1 or similar as its indicated by the maker, its compatible with V4.0. Afterwards I would check where the potential compilation errors occur, in the app lib or src lib, if its the src lib then you can try and compare it to the src lib in your openFOAM source code library. Here is the link to the source code I updated to V6 https://github.com/Swagga5aur/pemfcMultiphaseModel hope it's of some help, else feel free to let me know. |
|
September 26, 2024, 05:02 |
|
#31 | |
New Member
Join Date: Dec 2022
Posts: 15
Rep Power: 4 |
Quote:
Hey,Swagga5aur fantastic, and many thanks. I am using V6 in several projects, so it should now be an easy go. Thank you! cheers, Ron |
||
September 26, 2024, 05:10 |
|
#32 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Excellent, let me know if you have any questions or run into some issues and I will try to be of assistance.
I mainly use the HTPEM source code I believe the Kone code is based upon (don't quote me on that), so my user experience is limited, but can most likely update to V7 if needed. I believe I have a single phase LT model available as well, if it's of interest let me know and I can make a Github for it. Regard Lasse |
|
September 26, 2024, 05:23 |
|
#33 | |
New Member
Join Date: Dec 2022
Posts: 15
Rep Power: 4 |
Quote:
In file included from pemfcMultiphaseNonIsothermalSolver.C:105: ../src/patch/createPatchToPatchInterpolation.H: In function ‘int main(int, char**)’: ../src/patch/createPatchToPatchInterpolation.H:10:33: error: missing template arguments before ‘anodeToCathode’ 10 | myPatchToPatchInterpolation anodeToCathode Same then also for the further mentioned in createPatchToPatchInterpolation.H: cathodeToAnode,anodeFluidAnodeToElectrolyteAnode and cathodeFluidCathodeToElectrolyteCathode cheers, Ron |
||
September 26, 2024, 06:11 |
|
#34 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Hello Ron,
There was a naming error in the src library for the myPatch function was mypatch but had to be capital P, let me know if it works now or not, if not I will give it a look tonight. I have updated the of6 branch on github. Regards, Lasse |
|
September 26, 2024, 07:06 |
|
#35 | |
New Member
Join Date: Dec 2022
Posts: 15
Rep Power: 4 |
SOLVED, just change it in createPatchToPatchInterpolation.H as the following, then conduct wclean and wmake:
myPatchToPatchInterpolation<polyPatch, polyPatch> anodeToCathode ( anodePatch, cathodePatch ); Quote:
libMultiphasePEMFC.so (10,3MB) is being built successfully. Thank you But all those misspellings (on several locations, unfortunately) I replaced before. The error is there anyway. I tried this a s countermeasure myPatchToPatchInterpolation< FromPatch, ToPatch >::mypatchToPatchInterpolation anodeToCathode ( anodePatch, cathodePatch ); according to the class description https://cpp.openfoam.org/v7/classFoa...99044f03ff0306 |
||
September 27, 2024, 16:17 |
|
#36 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Hello again Ron,
I have sadly not a compiled V6 anymore, but updated and test compiled the code for V7 and added the branch to the github. https://github.com/Swagga5aur/pemfcM...Model/tree/of7 I believe the issue wasn't the renaming mentioned as the template is with a little mypatchToPatch... There where some issues with the myPatchToPatch directory, remade it with the equivalent files from the source code of openFOAM, and changed some equations in YFuel and YAir from what I remember. If you don't have openFOAM V7 let me know and I will see if I have the time to compile V6 as well. Regards, Lasse |
|
September 28, 2024, 10:13 |
|
#37 | |
New Member
Join Date: Dec 2022
Posts: 15
Rep Power: 4 |
Quote:
it is all fine meanwhile and I can work with OF-6 pretty well. I am not fit enough to judge on V7 benefits, so for the moment no need for further action from my side. But it would be great to have a corrected V6 repo anyways. Thank you Cheers, Ron |
||
September 30, 2024, 12:42 |
|
#38 | |
New Member
Join Date: Dec 2022
Posts: 15
Rep Power: 4 |
Quote:
I also tried with OF-7, but this solver version is not able to run in parallel. I tried with 10 cores on a Linux machine here. Please see the attched log.txt file. But a serial run remains without failure. cheers, Ron |
||
September 30, 2024, 12:48 |
|
#39 |
Senior Member
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11 |
Hello Ron,
Can you attach the case you are having issues with? I know the Jülich HTPEM solver uses a custom decomposition method, which I can test if I get the case. Will look at the log later. Regards, Lasse |
|
September 30, 2024, 13:15 |
|
#40 | |
New Member
Join Date: Dec 2022
Posts: 15
Rep Power: 4 |
Quote:
DecomposePar filterPatches copyUniform cellDist functionality Btw, one can simplify much the so-called parprep process when using collated threads (there will be finally juste only one folder $NPROCS instead of multiple proc*): https://openfoam.org/guides/parallel-io/ tutorials/IO/fileHandler/Allrun https://github.com/OpenFOAM/OpenFOAM...Handler/Allrun For example: decomposePar -allRegions -fileHandler collated -dict system/decomposeParDict. The same argument can be used with solvers and other utilities… Indeed, your run case (of your of7 branch) remains unchanged, just start my bash script after make mesh, to be prepared for the parallel solver run. Cheers, Ron Tutorial 9 demonstrates the manual method of decomposition https://www.fluiddynamics.at/downloa...basic-training Last edited by Ron71; September 30, 2024 at 18:58. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
pressure in incompressible solvers e.g. simpleFoam | chrizzl | OpenFOAM Running, Solving & CFD | 13 | March 28, 2017 06:49 |
[Helyx OS] Helyx-OS (GUI for SnappyHexMesh | elvis | OpenFOAM Community Contributions | 210 | January 30, 2017 19:57 |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 12:08 |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 07:27 |