Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface complexation functionality #254

Open
wants to merge 120 commits into
base: main
Choose a base branch
from

Conversation

mtsveta
Copy link
Contributor

@mtsveta mtsveta commented Jul 17, 2022

This PR implements a mechanism of surface complexation on the charged surface. The surface complexation phases are formed by the species collected from the PHREEQC database. The creation of the phases replies to the functionality provided by the class GenericPhase.

The current implementation assumes only the default surface Hfo with two sites Hfo_s and Hfo_w and the species sorbed on them (defined by the PHREEQC databases).

For the activity model of the surface complexation, the no double layer and double layer base on Dzombak and Morel 1990 are implemented.

Tasks:

  • Extend class Phases with DoubleLayerPhase and SurfaceComplexationPhase classes.
  • Implement ComplexationSurface,ComplexationSurfaceSite, and DoubleLayer classes to be used for the activity models used in DoubleLayerPhase and SurfaceComplexationPhase.
  • Implement ActivityModelSurfaceComplexation and ComplexationSurface classes with activity models described above.
  • Implement DoubleLayerProps and ComplexationSurfaceProps classes to output the properties of the double layer and complexion surface, respectively.
  • Implement surface complexation cpp and python tests.
  • Implement python bindings for implemented above functionality.
  • Implement surface complexation cpp and python examples.
  • Add cosmetic and type corrections to other classes.

@mtsveta mtsveta changed the title WIP: Surface complexation functionality Surface complexation functionality Jul 23, 2022
// warning(aqueous_phases.size() > 1,
// "While creating an AqueousProps object, it has been detected ",
// "more than one aqueous phase in the system. The AqueousProps object "
// "created will correspond to the first aqueous phase found.");
const auto idx = system.phases().findWithAggregateState(AggregateState::Aqueous);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's talk about this here. The original convention was to pick the first phase with AggregateState::Aqueous. I think this is more generic than by finding with name "AqueousPhase", which the user may change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. However, is it general enough for the case when there are more then one aqueous phases. Or is this scenario is unlikely?

…ace potential of the ComplexationSurfaceState 3) Output of the Complexation surface
…complexation surface initialisation everywhere
mtsveta and others added 27 commits August 25, 2022 14:23
…on of a single species in the `ComplexationSurfaceProps`.
…e complexation site that works reasonably for "metals sorption"
…tion is considered a phase and leave only those who consider sites as phases
…e surface species `ActivityModelSurfaceComplexationSiteWithDDLOld`.
…update and track the states of the sites and surface in the `extra` field
…rops`, `SurfacePhase`, `ActivityModelSorptionNoDDL`,
…roperties from << function to the update() method, and add python binding for added functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants