CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Regarding Ethylene/Air Combustion Simulation in openFoam (https://www.cfd-online.com/Forums/main/251893-regarding-ethylene-air-combustion-simulation-openfoam.html)

niyas September 13, 2023 20:18

Regarding Ethylene/Air Combustion Simulation in openFoam
 
Greetings,

I'm currently engaged in a numerical simulation focused on ethylene/air combustion within openFoam version 6. I have a couple of inquiries that I hope someone can assist with:

Inside the '0/C2H4 folder, I've come across a certain line.

Code:

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0.1111111;

Could someone clarify whether this pertains to mass fraction or mole fraction, or if there's a way to express it as a percentage?

To achieve a 50:50 ratio of C2H4 and H2, is it sufficient to create a new file labeled '0/H2' and specify the H2 content in terms of either mass fraction or mole fraction? Are there any specific considerations or precautions I should be aware of?

Your insights and guidance would be greatly appreciated.

LuckyTran September 14, 2023 00:49

Generally they are mass fractions because transport properties are transported by the mass flux. To be certain, we should look at the particular transport equation being invoked by this solver. And to know what solver it is, you should tell us exactly where you found this dir.

Creating a file called 0/H2 merely creates a file called H2 that may or may not ever be loaded by the solver. Again, tell us the solver.

It is apparent that you are unfamiliar with OpenFOAM, you should be cautious of everything, especially yourself! You do not want to be misguided by your own misunderstanding.

niyas September 14, 2023 01:16

Thanks for your reply.

The solver we use is an in-house-based solver but basically adapted from reactingFoam.

So, I want to use pure ethylene/air combustion in stoichiometric conditions with N2 as inert, is the below values correct?

We'll use the balanced chemical equation for the combustion of C2H4:

C2H4 + 3 O2 → 2 CO2 + 2 H2O

Here are the calculations:

Calculate the Molar Masses:
Molar Mass of C2H4 (ethylene):
Molar Mass = 2 * Atomic Weight of Carbon (C) + 4 * Atomic Weight of Hydrogen (H)
Molar Mass of C2H4 = (2 * 12.01 g/mol) + (4 * 1.01 g/mol) = 28.05 g/mol

Molar Mass of O2 (oxygen):
Molar Mass = 2 * Atomic Weight of Oxygen (O)
Molar Mass of O2 = (2 * 16.00 g/mol) = 32.00 g/mol

Calculate Mass Fractions:
Mass Fraction of C2H4:
Mass Fraction of C2H4 = (Molar Mass of C2H4) / (Molar Mass of C2H4 + 3 * Molar Mass of O2)
Mass Fraction of C2H4 = 28.05 g/mol / (28.05 g/mol + 3 * 32.00 g/mol)
Mass Fraction of C2H4 ≈ 0.348

Mass Fraction of O2:
Mass Fraction of O2 = (3 * Molar Mass of O2) / (Molar Mass of C2H4 + 3 * Molar Mass of O2)
Mass Fraction of O2 = 3 * 32.00 g/mol / (28.05 g/mol + 3 * 32.00 g/mol)
Mass Fraction of O2 ≈ 0.652

The value is C2H4 = 0.348 and O2 = 0.652

LuckyTran September 14, 2023 02:10

So you have an in-house code that you obtained from someone else but they're unable to explain how their code works? Either your name is GPT-4 or you are a thief!


So reacting foam. Is your YEqn.H the same as the one provided with reacting foam? Namely
Code:

fvScalarMatrix YiEqn
(
    fvm::ddt(rho, Yi)
  + mvConvection->fvmDiv(phi, Yi)
  - fvm::laplacian(turbulence->muEff(), Yi)
 ==
    reaction->R(Yi)
  + fvOptions(rho, Yi)
);


ddt(rho,Yi) and Div(phi,Yi)
Yi is your transport variable


Your calculations are of course not correct

niyas September 14, 2023 02:23

There is a slight modification.

Code:

        {
            volScalarField& Yi = Y[i];

            fvScalarMatrix YiEqn
            (
                fvm::ddt(rho, Yi)
              + mvConvection->fvmDiv(rhoPhi, Yi)
            ==
                reaction->R(Yi)
            );



All times are GMT -4. The time now is 20:45.