CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Mass fraction of species (Y) in reacting solvers

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By mike.franky
  • 1 Post By mike.franky

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2016, 08:03
Default Mass fraction of species (Y) in reacting solvers
  #1
Member
 
Michael Frank
Join Date: Aug 2012
Posts: 55
Rep Power: 13
mike.franky is on a distinguished road
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 is offline   Reply With Quote

Old   April 16, 2016, 13:27
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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?
__________________
wyldckat is offline   Reply With Quote

Old   April 16, 2016, 14:02
Default
  #3
Member
 
Michael Frank
Join Date: Aug 2012
Posts: 55
Rep Power: 13
mike.franky is on a distinguished road
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
mike.franky is offline   Reply With Quote

Old   April 16, 2016, 14:46
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by mike.franky View Post
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
wyldckat is offline   Reply With Quote

Old   April 16, 2016, 14:59
Default
  #5
Member
 
Michael Frank
Join Date: Aug 2012
Posts: 55
Rep Power: 13
mike.franky is on a distinguished road
Thanks very much bruno. This was very helpful.
wyldckat likes this.
mike.franky is offline   Reply With Quote

Old   May 22, 2016, 16:44
Default
  #6
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
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 View Post
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
openfoammaofnepo is offline   Reply With Quote

Old   May 23, 2016, 06:56
Default
  #7
Member
 
Michael Frank
Join Date: Aug 2012
Posts: 55
Rep Power: 13
mike.franky is on a distinguished road
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 likes this.
mike.franky is offline   Reply With Quote

Old   May 23, 2016, 08:01
Default
  #8
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
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 View Post
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 is offline   Reply With Quote

Old   August 31, 2021, 07:21
Default
  #9
New Member
 
Hosam Alrefaie
Join Date: Jul 2021
Posts: 24
Rep Power: 4
HosamAlrefaie is on a distinguished road
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
HosamAlrefaie is offline   Reply With Quote

Old   February 9, 2023, 06:49
Default
  #10
New Member
 
Xiaobo YAO
Join Date: Oct 2020
Posts: 9
Rep Power: 5
hdotyao is on a distinguished road
Quote:
Originally Posted by HosamAlrefaie View Post
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.
hdotyao is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mass fraction of species Lilly FLUENT 5 March 13, 2022 17:52
reactingFoam species are molar fraction or mass fraction? prasa OpenFOAM Running, Solving & CFD 2 March 17, 2016 02:35
species mass fraction in reacting flow ma Main CFD Forum 8 February 20, 2013 17:06
chemical species mass fraction Green_Horn STAR-CD 0 February 27, 2012 14:57
UDF for Species mass fraction daniel FLUENT 3 June 22, 2005 08:40


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