Fluids

Fluids

Issue with conversion to mole fraction on domain boundary [Ansys Fluent]

    • toon.demeester
      Subscriber

      I have encountered an issue (or possible bug) in ANSYS Fluent 2022R2 (and also in older versions, e.g. 2021R2).

      When the species transport model is used (with humid air as fluid), there seems to be an error in the conversion from mass fractions to mole fractions on domain boundaries. Internally in the domain, the conversion seems to be correct, but not on boundaries.

      I discovered this issue as follows. At my inlet, I had constant H2O, O2 and N2 mass fractions, so consequently the mole fractions should also be constant; this was however not the case. This resulted a.o. in a wrong computation of the relative humidity (RH) at that inlet (error up to 6%RH in contour plots).

      When googling for this issue, I found this forum post from 2014 which describes the same issue.

      Is this a known bug? Is there something I'm missing? Thanks for your feedback. If you need more information, please let me know.

    • Rob
      Ansys Employee

      Please can you post images. Post with node values off, and local range selected. Depending on your mesh and flow field (plus convergence) it's possible you're misreading the plot. 

    • toon.demeester
      Subscriber

      As you can see, all the mass fractions on the inlet are constant (figures shown for h2o and o2, hence n2 is also constant). All mole fractions should therefore also be constant. However, the figure shows there's a 10% change in mole fraction on the boundary. 

      Convergence for that case was good (steady-state). Also, I think convergence shouldn't play a role here? As mole fraction is a post-processing variable (mass fractions are use in the transport equations), and the mass fractions on the inlet boundary are fixed. 

      Mass fractions of h2o and o2: 

      Mole fractions of h2o and o2: 

    • Rob
      Ansys Employee

      What's the material density? 

    • toon.demeester
      Subscriber

      At the inlet the density is varying between 1.1819 and 1.1828 kg/m^3, the variation is caused by small changes in pressure on the inlet. For the fluid, I used the incompressible ideal gas law and the default mixture-template (o2, h2o, n2). 

    • Rob
      Ansys Employee

      Does the material density vary as a mixture or components? I'm trying to remember the conversion maths.... 

    • toon.demeester
      Subscriber

      I think so, yes: as the mixture fractions change, the average molecular weight will change, and therefore also the density.

      I think the issue might be related to the fact that for mole fractions, I cannot plot contours of boundary values. See screenshots below. 


      Image 1: boundary values of mass fractions: constant mass fractions

      Image 2: cell values of mass fractions, not constant anymore!

      Image 3: mole fractions of cell values, not constant, and cannot select boundary values

      Is there a way to plot the actual face values and not cell values for variables such as mole fraction or relative humidity? I always assumed that on boundaries, the cell values would be interpolated to face values, but that seems not to be the case in contour plots. 

      The strange thing is: if I define the mole fraction using an expression (image below), I also cannot select "boundary values". However, when I make the contour plot, Fluent does give a constant value, so that shows what I expected on the faces... 

      Image 4: mole fractions from expression, gives constant values!

    • Rob
      Ansys Employee

      I think that depends on whether it's a set or calculated value and whether the solver needs the facet value.  All data is held on cell centres, some data is also held on the boundary facets for post processing and other functions. 

      Interesting that there is no boundary value option for Expressions, I still use Custom Field Functions for post processing....

    • toon.demeester
      Subscriber

      Actually, the Expression seems to plot the boundary value (which is costant), and not the cell value (which would not be constant), even though I cannot select "boundary value". So not sure what is happening there.

      Is there a way to show face values for e.g. relative humidity? That was my original issue. The cell value is misleading in my case.

    • Rob
      Ansys Employee

      I don't think so, the cell and boundary value should be near enough the same, and some of the data will be from the cell. 

    • toon.demeester
      Subscriber

      I don't agree: there is a ~5% difference in mole fraction between cell and face, which gives a ~6% difference in relative humidity. Now it's not clear what the software actually shows in the different scenarios, which is an issue.

    • Rob
      Ansys Employee

      How much does the pressure, velocity, temperature and density vary from the inlet facet to the first cell? What is RH as a value? How well converged is the solution, and are you running double precision? 

Viewing 11 reply threads
  • You must be logged in to reply to this topic.