Sure, feel free to keep this thread open for further discussion.
The source only stamps voxel_fuel_methane, voxel_gas_oxygen and voxel_gas_nitrogen inside the source itself, not in the entire domain. You can verify this with the attached scene file where I have placed a second fuel source that does not ignite and the fuel inside that remains constant. However, the combustion system itself does normalize the mass fractions of all the gases (fuel, oxygen, nitrogen etc) to sum to 1. That could explain what you're seeing (unless there's a bug in the version you're using).
You're right that values inside the source are being set/stamped into the domain. You can use any mode you like: add, set, max etc, but the combustion system will again normalize them in order to be able to perform physics based combustion calculations. The motivation behind using the set mode by default is that the source acts as an area where the pre-mixed fuel and oxidizer enters the simulation in its pure form. This is similar to how in the real world pre-mixed fuel enters a combustion chamber in pure form after which it ignites and mixes. Furthermore it allows us to emit a given mixture of fuel and oxidizer in an area and then have a flame propagate through it.
I understand the confusion our representation of oxygen, fuel etc can lead to. Particularly if you're used to and know the details of the combustion models used in other packages where typically you can add any amount of fuel which will then burn at some linear rate producing heat under the assumption that enough oxygen is always present.
In Bifrost we adopted a physics-based combustion model. The goal is that you would not necessarily need to know
anything about how we represent fuel, oxygen etc internally. Rather, using the burn rate and oxygen percentage
parameters, you can specify any mixture of fuel and oxidizer that can possibly exist in the real world. In particular the burn rate lets you specify from fuel rich flames in the range [0;1) over stoichiometric conditions at 1 to lean flames in the range (1;2], see image here https://en.wikipedia.org/wiki/Premixed_flame#/media/File:Bunsen_burner_flame_types.jpg
The oxygen percentage determines the fraction of oxygen in the oxidizer. So with an oxygen fraction at roughly 0.2 the oxidizer would be air, and at 1 it would be pure oxygen. With a burn rate at 1 and oxygen percentage at 1 you get the hottest most explosive flame.
With the compound I provided you can vary burn rate and oxygen percentage in time and space so it should be possible to inject more fuel at specific locations and vary it over time. If you can't model the effect you're trying to achieve with this setup, please let us know what's missing.
Sorry that the voxelization up front led to confusion. I have made a new version that performs the voxelization inside instead. The solver itself can take a mesh, signed distance or fog volume as inputs, but for the compound I made I needed the signed distance in order to know where to evaluate the fields that determine the burn rate and oxygen percentage. The core solver cannot at the moment evaluate fields directly during emission.
Using fields to evaluate the burn rate and oxygen percentage has the advantage that these can vary arbitrarily throughout the volume of the source. If on the other hand you specify the burn rate and oxygen percentage
per vertex of the input mesh they can only vary along the surface and are then extrapolated into the volume of the source so the variation of these inside the source volume will be more uniform.
I have however extended the vary_source_fuel compound and attached to this post such that you can also vary the burn rate and oxygen percentage per vertex on the mesh. In particular, if the mesh being input to the vary_source_fuel has properties point_burn_rate and point_oxygen_percentage it will just use those properties and compute the equivalent fuel, oxygen and nitrogen percentages. If the input mesh has no such properties, it will
use the input burn rate and oxygen percentage fields to vary the fuel, oxygen and nitrogen. There's no need for a subsequent source_fuel node: as you have already noticed, the source_fuel will overwrite some of the varying properties.
Cheers,
Michael
Michael Nielsen
Principal Engineer