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/)
-   -   Mass fraction of species (Y) in reacting solvers (https://www.cfd-online.com/Forums/openfoam-solving/169154-mass-fraction-species-y-reacting-solvers.html)

mike.franky April 4, 2016 08:03

Mass fraction of species (Y) in reacting solvers
 
Hi,

I am trying to run a multiphase, multicomponent case using the reactingMultiphaseEulerFoam. Each phase is composed of various species. Therefore, in the boundary conditions one has to define the volume fraction of the phase and the mass fraction of the species of each phase for each cell.

In all the tutorials, the mass fraction of the internal field is uniformly set for all the cells, even if some cells have a zero volume fraction (alpha) for the phase itself. Furthermore, if I use setFieldsDict to only set the mass fraction of cells with non-zero values of alpha, the simulation crashes. So what exactly is Y? Is it simply the mass fraction of the species in the phase volume contained in the cell (i.e. zero if the volume fraction is also set to zero)? If so, why does the simulation crash if I don't define the mass fractions in all the cells?

Thanks in advance for any help

Mike

wyldckat April 16, 2016 13:27

Quick answer: As far as I know, Y is a mass fraction scaled to the total mass, which means that the summation of all fractions should be equal to 1.0. Whenever it goes over, the solver will rescale the fractions to the new reference.

The idea is that only X mass can fit inside a volume. If X is made up of several components, then the mass of each component is "Yi*X".

I can only guess that you didn't properly set-up the initial fields for all to add up to 1.0?

mike.franky April 16, 2016 14:02

Hi bruno and thanks for your reply.

Indeed, for each phase that I have, the mass fractions of its constituents add up to 1.0. What confuses me is that, even if the phase is entirely absent from a cell (i.e. the value of alpha.phase is zero for a cell), the solver still requires that the mass fractions of the species of that phase are set and add up to 1. You can see an example of this in the bubbleColumn tutorial for reactingMultiphaseEulerFoam. The liquid phase occupies only part of the domain but the mass fractions of its species are uniformly set for all the cells. So I suppose that the mass fraction of a species in a cell, is the value of Y times the value of the volume fraction in the cell (the value of alpha.phase). Is that the case?

Thanks again
Mike

wyldckat April 16, 2016 14:46

Quote:

Originally Posted by mike.franky (Post 595358)
So I suppose that the mass fraction of a species in a cell, is the value of Y times the value of the volume fraction in the cell (the value of alpha.phase). Is that the case?

Yes, that's correct :) We can't have vacuum in a cell... fluid must always be present!

Sorry that I forgot to emphasize that the mass fraction is for each cell :(

mike.franky April 16, 2016 14:59

Thanks very much bruno. This was very helpful.

openfoammaofnepo May 22, 2016 16:44

Dear Mike,

Which version of reactingMultiphaseEulerFoam are you using? I am also going to simulate a multiphase, multi-component case and would like to use this solver from OpenFOAM 3.0.1. In its tutorials (OpenFOAM/OpenFOAM-3.0.1/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn), there is no any information for species, like in the folder 0/.

I checked the source files for this solver, the species mass fraction governing equations are included - #include "YEqns.H". So I am not sure the version I am using is the right one.

cheers.
OFFO

Quote:

Originally Posted by mike.franky (Post 593279)
Hi,

I am trying to run a multiphase, multicomponent case using the reactingMultiphaseEulerFoam. Each phase is composed of various species. Therefore, in the boundary conditions one has to define the volume fraction of the phase and the mass fraction of the species of each phase for each cell.

In all the tutorials, the mass fraction of the internal field is uniformly set for all the cells, even if some cells have a zero volume fraction (alpha) for the phase itself. Furthermore, if I use setFieldsDict to only set the mass fraction of cells with non-zero values of alpha, the simulation crashes. So what exactly is Y? Is it simply the mass fraction of the species in the phase volume contained in the cell (i.e. zero if the volume fraction is also set to zero)? If so, why does the simulation crash if I don't define the mass fractions in all the cells?

Thanks in advance for any help

Mike


mike.franky May 23, 2016 06:56

Hi OFFO,

Yes. The bubbleColumn tutorial is not very descriptive. I think they just copied the example from the multiphaseEulerFoam. Have a look at the examples of the reactingTwoPhaseFlow. In the laminar folder you can find quite a few good examples. For instance, have a look at the bubbleColumnEvaporating example. In the folder 0/ hey have two phases: liquid and gas. Therefore you have two files alpha.liquid and alpha.gas. Each phase is composed of air and water so you have air.liquid, air.gas, water.liquid, water.gas etc. The components in each phase are specified in constant/thermophysicalproperties.gas/liquid.

Hopefully this will help you.

Kind regards
Mike

openfoammaofnepo May 23, 2016 08:01

Dear Mike,

Thank you so much. I see the tutorial case now. But I still feel strange that even if there is no any information about the species, the reactingMultiphaseEUlerFoam can still run.

BTW, do you know what is the usage for the following entries in phaseProperties:
Code:

blending
{
    default
    {
        type            linear;
        minPartlyContinuousAlpha.gas 0.5;
        minFullyContinuousAlpha.gas 0.7;
        minPartlyContinuousAlpha.liquid 0.5;
        minFullyContinuousAlpha.liquid 0.7;
    }

    heatTransferModel
    {
        type            linear;
        minPartlyContinuousAlpha.gas 0;
        minFullyContinuousAlpha.gas 1;
        minPartlyContinuousAlpha.liquid 0;
        minFullyContinuousAlpha.liquid 1;
    }

    massTransferModel
    {
        type            linear;
        minPartlyContinuousAlpha.gas 0;
        minFullyContinuousAlpha.gas 1;
        minPartlyContinuousAlpha.liquid 0;
        minFullyContinuousAlpha.liquid 1;
    }
}

Thank you so much!

Quote:

Originally Posted by mike.franky (Post 601307)
Hi OFFO,

Yes. The bubbleColumn tutorial is not very descriptive. I think they just copied the example from the multiphaseEulerFoam. Have a look at the examples of the reactingTwoPhaseFlow. In the laminar folder you can find quite a few good examples. For instance, have a look at the bubbleColumnEvaporating example. In the folder 0/ hey have two phases: liquid and gas. Therefore you have two files alpha.liquid and alpha.gas. Each phase is composed of air and water so you have air.liquid, air.gas, water.liquid, water.gas etc. The components in each phase are specified in constant/thermophysicalproperties.gas/liquid.

Hopefully this will help you.

Kind regards
Mike


HosamAlrefaie August 31, 2021 07:21

Can someone please explain how to specify the mass fractions of the species when I use multiComponentMixture ThermoType.

I want to simulate radiation and include a gas mixture to affect the radiation, using buoyantSimpleFoam.

I getting the error:

Sum of mass fractions is zero for species 3

hdotyao February 9, 2023 06:49

Quote:

Originally Posted by HosamAlrefaie (Post 811332)
Can someone please explain how to specify the mass fractions of the species when I use multiComponentMixture ThermoType.

I want to simulate radiation and include a gas mixture to affect the radiation, using buoyantSimpleFoam.

I getting the error:

Sum of mass fractions is zero for species 3

Hi Hosam,
have you solve this problem? I'm encountering the same error.:confused:


All times are GMT -4. The time now is 18:12.