Skip to content

Add option for MixDiffCoeffsMass in 1D flames #195

@g3bk47

Description

@g3bk47

Currently, running 1D flames with the mixture-averaged diffusion model computes the species diffusive fluxes (neglecting the correction flux for the sake of brevity) from
$$j_k=-\rho D_k \frac{W_k}{\bar{W}} \frac{\partial X_k}{\partial z},$$
where $D_k$ is computed from the mix_diff_coeffs function. In many 3D simulation codes, governing equations are solved in terms of species mass fractions and the diffusive flux is computed with respect to the species mass fraction gradients
$$j_k=-\rho D_k^{\rm mass} \frac{\partial Y_k}{\partial z},$$
where $D_k^{\rm mass}$ is computed from the mix_diff_coeffs_mass function. While both formulations yield similar results, they are not the same. Therefore, I implemented a switch to choose between both formulations (see my branch here: https://github.com/g3bk47/cantera/tree/flame_mix_diff_mass).

There are two reasons why I think this would be a valuable addition to Cantera:

  1. Running 1D flames with the mass fraction gradient-based fluxes can be used to generate better validation data for those simulation tools that use the second flux formulation above.
  2. There are arguments in the literature why the current flux formulation is more accurate than the mass fraction-based approach, which is why I left the current formulation as the default. However, I recently did a few tests comparing hydrogen-air flames from multicomponent and mixture-averaged solutions. Surprisingly (at least to me), the mass fraction-based mixture-averaged solution matches the multicomponent solution much more closely than the mole fraction gradient one (but maybe this is just a fluke...)
    flamespeeds
    The script for generating this plot is: flamespeeds.txt

The code changes for adding the option of using the mass fraction-based gradient fluxes are quite minimal (https://github.com/g3bk47/cantera/tree/flame_mix_diff_mass). However, I am not too happy with the names of the new functions/properties, as they are not very intuitive (use_mix_diff_coeffs_mass). Any other name I can think of is quite verbose, like flame.switch_to_mass_fraction_gradient_based_fluxes. Let me know if you have any better ideas or if you have any other comments regarding the code before I open a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions