CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   XiFoam solver: changes needed to switch from air-combustion to oxy-combustion? (https://www.cfd-online.com/Forums/openfoam-solving/83025-xifoam-solver-changes-needed-switch-air-combustion-oxy-combustion.html)

usergk December 11, 2010 21:09

XiFoam solver: changes needed to switch from air-combustion to oxy-combustion?
 
Hi

Does anyone know what changes are required to the XiFoam solver (if any), to go from air-combustion to oxy-combustion?
Any information would be useful.

Thank you,
gk

nakul December 13, 2010 03:52

Hi,

As far as I know the solvers in OF are quite general. So you can easily use Xi-Foam for oxy-combustion by just specifying thermophysical properties of oxygen in the thermophysicalProperties file in place of air.

I don't thnk code is specifically written for air-combustion only. However if you have some specific expectations in mind regarding the solver then you may mention them here.

usergk December 13, 2010 17:47

Hi nakul,

Thanks a lot for your reply.

When we change to oxy-combustion, we would expect the diffusivities as well as the reaction rates to change. Would this be correctly modeled by making the necessary changes in the thermophysical properties file?

I was also wondering if we can include multi-step chemistry for pre-mixed combustion calculations here. I believe that the XiFoam solver uses a flamelet approach and hence is based on a single step reaction. Is there a way to incorporate multi-step reactions?

Thanks
gk

nakul December 14, 2010 04:31

Hi,

Actually I have never used Xi-Foam solver, so I don't know much about it. I have experience of using reactingFOAM and it can incorporate multi-step reactions and may also take care of variable diffusivity with a little bit tweaking of the code.

But I don't know whether the chemistry model in reactingFoam is suitable for oxy-combustion. It uses PaSR approach but since I don't know the mechanisms of oxy-combustion I can't tell if PaSR is suitable for it or not.

usergk December 14, 2010 10:54

Hi nakul,

No problem. Thanks anyway for your replies!

Actually, I am also looking at implementing other combustion models, and have come across PaSR approach also.
Can you please point me to some relevant papers that you may have studied? Also, which file in OpenFOAM includes the corresponding code for PaSR model?

Thanks again,
Regards,
gk

nakul December 22, 2010 07:24

Hi,

To know about the implementation of PaSR in OF you may go through the phd thesis of Fabian Peng.

http://powerlab.fsb.hr/ped/kturbo/Op...olmPhD2008.pdf

You may go through the chemistry.H file and Yeqn.H file in reactingFoam's source code to understand the implementation of PaSR.

usergk December 22, 2010 10:08

Thanks a lot, nakul !!

Regards,
gk

nakul December 22, 2010 12:27

Hi gk,

Can you please tell me what models you are trying to implement and refer me to their details?

usergk December 22, 2010 15:07

Hi nakul,

I am looking at some of the flamelet models that have been studied in literature.
I referred to this paper among others:
- A comparison of flamelet models for premixed turbulent combustion; JM Duclos, D Veynante, T Poinsot.

Also looking at thickened flame models:
- A thickened flame model for large eddy simulations of turbulent premixed combustion; O Colin, F Ducros, D Veynante, T Poinsot.

Best,
gk

nakul December 23, 2010 09:05

Hi,

Have you gone through this post?
http://www.cfd-online.com/Forums/ope...meletfoam.html

This person is also trying to implement flamelet model. Infact I am also interested in implementing such models but I have never done it before.

You may have a look at what this person is trying to do. Also can you post a link from where I can get these papers.

ehsanyasari January 3, 2011 05:48

Hi Nakul and Gk

I also works on XiFoam solver and implementing some combustion model. But now I have some problem in understanding how temperature and density are calcualted in the code. Do you have any idea how and where they are calculateed and implemented?

I supposed that in combustion, temperatuire must be calculated based on the following equation:
T = b*Tu + (1-b)*Tb
where Tu and Tb are unburnt and burnt remperature and b is the regress variable.
but I am not sure how this code is implemented. I found the implementation of this code in :
src » thermophysicalModels » reactionThermo » mixtures » homogeneousMixture
but I did not underfstand how this code works.

00061 const ThermoType& Foam::homogeneousMixture<ThermoType>::mixture
00062 (
00063 const scalar b
00064 ) const
00065 {
00066 if (b > 0.999)
00067 {
00068 return reactants_;
00069 }
00070 else if (b < 0.001)
00071 {
00072 return products_;
00073 }
00074 else
00075 {
00076 mixture_ = b/reactants_.W()*reactants_;
00077 mixture_ += (1 - b)/products_.W()*products_;
00078
00079 return mixture_;
00080 }
00081 }

mixture_ is calcularted based on "b" and reactants_ and products_.
reactants_ and products_ are janaf coefficient and are input data in thermoPhysicalProperties file.

But I do not know how those coefficient for mixture is calculated.

Any suggestion is appreciated.

Thanks
Ehsan

nakul January 3, 2011 06:59

Hi,

I don't have much experience of working on Xi-Foam. All I can suggest is that you may have a look at the Xi-Foam's source code in "applications/solvers".

You may find the solution to your problem there.

ehsanyasari January 3, 2011 07:31

Thanks for your reply. I already check all the files in this solver, but I cannot find the answers. You said that you have experience using reactingFOAM solver. If you take a look at
applications » solvers » combustion » reactingFoam -hsEqn.H
you will see that temperature is calculated by:
thermo.correct();

I think the method which temperature is calculated is the same for both XiFoam and reactingFOAM.
So if you know how temperature is calculated in reactingFOAM it might be the same in XiFoam.

Any idea?

Thanks

nakul January 5, 2011 05:31

Hi,

thermo is an object of class hsCombustionThermo declared in createfields.H.

http://foam.sourceforge.net/docs/cpp..._8H_source.php (0008).

The details of this class can be found in src/thermophysicalModels.
But to understand the coding there you need a good background in C++.

What I have presumed is that once "hs" is known over the mesh then it is simply divided by the specified "Cp" to get "T", in reactingFoam. However, if you find something different then do mention it here.

As for your specific question regarding evaluation of "b", I don't have any answer.

Please note that code of thermoPhysical models is highly evolved. To understand the "hsCombustionThermo" class you may have to look at several other classes, as it is derived from 3 or 4 classes. The classes from which it inherits(C++ terminology) can be found in class' documentation online.

ehsanyasari January 10, 2011 08:49

I checked your solver. I presume that "T" is calcualted according to the "hs" and "Cp", but in a little bit more complex way. Because "Cp" is also dependent to temperature.
What I found is that:
1-in "hsEqn.H": thermo.correct(); is implemented in :
src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C
in online version in line 00136.

2- in "correct()" function you can find another function called "calcualte()" which also implemented in the same file as previous one and in line 00068.

3-in this function you also can find function "THs".


The function "THs" which calculate the temperature based on "Hs" and "Cp" ,in a iterative method, is implemented in :

src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H

Please let me know if you think it is correct ?

nakul January 11, 2011 06:21

Hi

Thanx for your hint. Based upon this I have framed the following answer to your question on evaluation of temperature. Point out if you find any thing inconsistent:

1) Firstly as you said the values of hs and T defined over the mesh (i.e, in each cell) are sent as arguments to function THs() at line 83.
http://foam.sourceforge.net/docs/cpp..._8C_source.php

2) The declaration of THs() is at line 283.
http://foam.sourceforge.net/docs/cpp..._8H_source.php
As you can see this function takes two arguments hs and T0 and send it to function T(), which is a private member function of that class.

3) The function T() takes 4 arguments hs and T taken from mesh and Hs and Cp. Hs and Cp are defined at lines 157 and 136 respectively.
http://foam.sourceforge.net/docs/cpp..._8H_source.php

4) Based upon these 4 arguments T() calculates new temp and returns it to THs() which updates the value of temperature in TCells.

Same procedure is used for boundary values also. I have tried to put the entire procedure in words and I hope this helps. There is however one doubt that in definition of Hs and Cp there is a variable W whose definition I was unable to find.

If you come across its definition do post it here and I hope that you may find the method to evaluate "b" based upon this knowledge.

ehsanyasari January 11, 2011 07:19

Hi,
Thanks, you define the procedure in a straight forward way.
Regarding the W you mentioned, it is the molecular weight which is defined in :
http://foam.sourceforge.net/docs/cpp..._8H_source.php
line 00085.

nakul January 12, 2011 03:22

Thanks Ehsaan for clearing the doubt and completing the procedure.

usergk January 17, 2011 11:42

Hi Nakul

Sorry for the delayed response.

The papers should be available here:
linkinghub.elsevier.com/retrieve/pii/0010218093900558

link.aip.org/link/?PHFLE6/12/1843/1


Let me know if this helps, and in case you don't have access, you could message me your email ID.

Best,
gk

nakul January 20, 2011 04:35

Hi usergk,

Thanks for the links, but unfortunately I haven't been able to access those papers. My email id is nakulthemaster@gmail.com

It would be very nice of you if you could mail me them to me.

Thanx


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