-
Notifications
You must be signed in to change notification settings - Fork 6
Description
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
where 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
where 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:
- 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.
- 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...)

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.