2D compositional storage with three reactions¶
Run the existing exampleCompositionalBacterial2DThreeReactions case using its original reservoir geometry and 0.5 m grid spacing. The initial gas contains residual methane. Compare bacterial and abiotic storage over five cycles, using MET, ACE, and SRB with the existing default kinetic parameters.
[ ]:
startupH2sim
results = exampleCompositionalBacterial2DThreeReactions( ...
'numCycles', 5, 'scenarios', {'bacterial','abiotic'}, ...
'molecularDiffusion', false, 'molecularDispersion', false);
plotCompositionalBacterial2DThreeReactions(results, ...
'outputDirectory', fullfile(pwd, 'build', 'bacterial-cycle-figures'));
Gas distributions and cycling¶
Gas maps show H₂, CO₂, and CH₄ after injection in cycle 5, with a shared 0–1 mole-fraction scale. Cells with gas saturation below 0.001 are masked. Well logs compare bacterial and abiotic H₂, CO₂, and CH₄ component mass rates and bottom-hole pressure. Component rates are summed over the perforations; positive denotes injection and negative denotes production. Closed-well rates are zero. BHP has gaps during shut-in because the saved shut-in records retain the preceding active-step values.
The selected comparison disables molecular diffusion, dispersion, bacterial diffusion, chemotaxis, and clogging. PHREEQC is not used. pH is a prescribed EOS parameter, not a calculated speciation history. The original example retains options for molecular transport and a clogging scenario.
Full setups, states, wells, and solver reports are saved using packed simulation output. Reload bacterial_results.mat or abiotic_results.mat to redraw the completed results.
Hydrogen consumption by reaction¶
MET, ACE, and SRB contributions use saved cumulative consumed H₂ moles divided by cumulative injected H₂ moles. The total sums all three. Increasing injection can lower the percentage even as consumed moles increase. Dissolution and unrecovered gas are excluded.
H₂ and microbial population maps¶
After build-up (top) and fifth-cycle injection (bottom). Each column shares a color scale across times. H₂ is masked where gas saturation is below 0.001. The three nbact fields are model population variables, not calibrated cell counts per volume.