Mineral chemistry setup check¶
Configure IPhreeqcCOM as described in the installation guide. MRST owns flow and transport; PHREEQC owns local microbial kinetics and chemistry. This deliberately short setup uses four cells and two injection timesteps.
[ ]:
startupH2sim
comparison = exampleCompositionalBacterial1DPhreeqcMinerals( ...
'gridCells', 4, 'maximumFlowSteps', 2);
state = comparison(2).states{end};
pH = state.phreeqcPH;
elementChecks = state.phreeqcElementBalancePass;
% Redraw accepted states without solving again.
plotPhreeqcMineralComparison(comparison, ...
'outputDirectory', fullfile(pwd, 'build', 'example-figures'));
Read the plots¶
The original MRST case and PHREEQC cases have different kinetic owners. Their differences are not a pure mineral effect. The original case has no PHREEQC pH. Check the elemental audit and evaluated-cell mask before interpreting chemistry output.
comparison(k).states retains the state history. The example uses packed simulation output, allowing accepted results to be replotted.