feat: Plug in HPCReact Activity Model - #4140
Open
frankfeifan wants to merge 19 commits into
Open
Conversation
…lityConcentration
…lityConcentration
…lityConcentration
…lityConcentration
… it in GEOS rather than HPCReact for now
…lityConcentration
…lityConcentration
…ion' into feat/frankfei/activityModelAPI
frankfeifan
requested review from
OmarDuran,
dkachuma,
herve-gross,
jhuang2601 and
rrsettgast
as code owners
September 5, 2026 05:48
frankfeifan
requested review from
jafranc,
joshua-white and
tjb-ltk
as code owners
September 5, 2026 05:48
frankfeifan
requested review from
MelReyCG,
bd713,
corbett5 and
wrtobin
as code owners
September 6, 2026 19:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes GEOS able to run reactive transport with geochemical activity models available in HPCReact.
Specific changes include:
Plugged the HPCReact activity-model layer into GEOS: added
ReactiveFluidSystemSelector.hpp, which dispatches nine chemical-system plus activity-model combinations, and exposedactivityModelType(identity/bdot) as an optional XML attribute on the reactive fluid model.Extended the HPCReact systems for non-identity activity: added B-dot and speciated ionic-strength parameters drawn from the EQ3/6 database, replaced the ultramafic stoichiometry with a no-solid 21x20 matrix, and made
enforceEquilibrium_Aggregatereturn both its convergence state and the converged secondary concentrations so callers no longer repeat the speciation solve.Fixed the reactive residual norm: the original
max(minNormalizer, aggregateMole_n)discarded the sign of negative aggregate moles, normalizing those cells byminNormalizer(1e-12) and inflating the species residual, which eventually makes the Newton hard to converge. Now usingabs(aggregateMole_n)instead.Added solution scaling to the reactive solver: a
scalingForSystemSolutionoverride with a newSolutionScalingKerneland amaxAbsoluteLogConcentrationChangeinput that bounds the per-iteration change in log primary species concentration.Improved reporting and test coverage: the initial equilibrium enforcement now prints as its own titled log block with a per-region, all-ranks converged status, and B-dot 1D and 2D smoke decks were added as new baselines.
Rebaseline
This PR depends on the molality conversion PR (#3996) and activity model PR in HPCReact (GEOS-DEV/HPCReact#17).