|
[Sponsors] |
How to add Source term (2) for PYROLYSIS - reactingOneDim |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 11, 2019, 00:10 |
How to add Source term (2) for PYROLYSIS - reactingOneDim
|
#1 | ||||
Senior Member
|
Hello Foamers,
My topic of research is to build the 1D mathematical model for simulating the coal pyrolysis in OpenFOAM. Based on fireFOAM (OF211), I developed own solver for only pyrolysis. The code construction for pyrolysis was built under reactingOneDim (~/OpenFOAM/OpenFOAM-2.1.1/src/regionModels/pyrolysisModels/reactingOneDim). By default, TEqn. in reactingOneDim.C Quote:
Quote:
SOURCE TERM 1 (Pyrolysis) = heat loss due to pyrolysis solved by Arrhenius-like degradation chemistry (SOLVED this source term based on FireFOAM 1D pyrolysis model code- NO ISSUES HERE) SOURCE TERM 2 (Evaporation) = phase change - moisture to vapor (moisture embedded in the wet coal). I have figured out that the source terms can be included inside the pyrolysis solver under "reactingOneDimCoeffs"in case file (~/OpenFOAM/OpenFOAM-2.1.1/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/pyrolysisZones) Quote:
Quote:
REF - Clear details here in this MANUSCRIPT ~https://sci-hub.tw/10.1016/0016-2361(83)90225-9 (ATKINSON, B., & MERRICK, D. (1983). Mathematical models of the thermal decomposition of coal4. Heat transfer and temperature profiles in a coke-oven charge. Fuel, 62(5), 553–561) Have anyone come across such problems in OpenFOAM? Anyone tried coding SOURCE TERM for pyrolysis under reactingOneDim.C file ? Correct me if I'm wrong anywhere please. I'm trying my best to add source term under reactingOneDimCoeffs for pyrolysis solver. Please share your ideas, it will be highly helpful. Thank you. |
|||||
September 15, 2019, 15:57 |
|
#2 |
Member
Atul Kumar
Join Date: Dec 2015
Location: National Centre for Combustion Research and Development
Posts: 48
Rep Power: 10 |
fvScalarMatrix TEqn
( fvm::ddt(rhoCp, T_) //Unsteady term - fvm::laplacian(K_, T_) //Laplacian term == chemistrySh_ //Heat loss rate - Source term moss loss rate*LatentHet // + fvc::div(phiQr) // Radiation diffusion inside solid + fvc::div(phiGas) //Source term 1 // Cpg*(Ts-Tg) // sp. heating due to gas temp + r*cp*dT/dx //Source term 2 // CpsTs // sp capicity of solid ); in setting of control/pyrolysisZoneDict term 1 fvc::div(phiGas) and term 2 fvc::div(phiQr) are optional. fvc::div(phiQr)+fvc::div(phiGas)+chemistrySh_ = m'''Hp, where Hp is total heat of pyrolysis or (CpsTs - L + Cpg*(Tg-Ts)) |
|
September 15, 2019, 23:30 |
|
#3 |
Senior Member
|
Dear Atul Kumar,
I have no words enough to Thank you. ^^ Thank you for your time and response. It helps me a lot to proceed further. |
|
September 17, 2019, 03:57 |
SOURCE TERM 2 - Compilation ERROR
|
#4 | |||
Senior Member
|
Dear Atul Kumar,
I have created the structure for Source TERM 2 shown below, which is created under reactingOneDim.C for the following condition: Quote:
Quote:
Quote:
Line 173 - Temperature loop starts Line 178 - Calculation of mass flux I am not sure how the temperature loop can be applied inside such kind of above structure ? Kindly check the attachments 1 and 2 for understanding about the phenomenon and share your ideas please. Last edited by Kummi; September 17, 2019 at 06:11. |
||||
September 17, 2019, 10:10 |
Modification (1)
|
#5 | ||
Senior Member
|
Dear Atul Kumar,
Thank you for directing. I made some corrections. Quote:
*PS: if-loop is possible inside this structure? not quite sure about alpha[cellI]=0, which indicates the above mentioned condition for moisture content (embedded in coal) is zero when T = 100deg >>rho_ = volScalarField alphap = scalarField Vxp = scalarField, When adding rho_ in line 178, error pops up. Because rho_ is volScalarField, whereas alphap and Vxp are scalarField. Eliminating rho_ in line 178, has no error, however not realistic. I am checking as how to convert the volScalarField rho_ into scalarField function. Quote:
Thank you |
|||
September 19, 2019, 09:24 |
Modification (2)
|
#6 | |
Senior Member
|
Dear Atul Kumar,
Thank you for your help. I have compiled successfully with further modifications. Quote:
However, have a long way to go Thank you |
||
September 19, 2019, 10:49 |
|
#7 | |
Senior Member
|
After compiling case file, I came up with the error while running it.
Quote:
Can anyone tell me what exactly this error is all about? |
||
September 21, 2019, 00:24 |
|
#8 | |
Senior Member
|
Resolved above error by adding appropriate linking files
Quote:
|
||
September 21, 2019, 01:21 |
Compiled successfully
|
#9 | |||
Senior Member
|
Chosen Gauss linear scheme basically,
Quote:
Quote:
I guess the problem is due to alpha (moisture content). Because in my case, alpha has no expression (field operation), alpha is only solved based on the condition that, when T = 100deg, alpha =0 such that H2O(l) = H2O (g) @ T=100deg.Based on the condition, evaporation rate is calculated. As seen in the code, Quote:
If anyone have some ideas about it. Kindly do share. It will be highly helpful. Thank you |
||||
September 21, 2019, 04:00 |
|
#10 | |||
Senior Member
|
Source TERM 2 is created with the following condition:
Quote:
Quote:
Quote:
Attachments 1 and 2 gives clear overview about the phenomenon and condition. Can someone tell me ~ to make this condition work, which FOAM I should check ? Thank you |
||||
April 12, 2021, 22:11 |
|
#11 |
Member
Join Date: Feb 2018
Posts: 91
Rep Power: 8 |
Hi Kunmi,
Did you ever resolve the issue, I am facing a similar issue with my own case. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[swak4Foam] Installation Problem with OF 6 version | Aurel | OpenFOAM Community Contributions | 14 | November 18, 2020 17:18 |
Add different source term in diffusion equation at each time step | Lewis Liang | OpenFOAM Programming & Development | 1 | June 7, 2018 11:10 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |