8000 free electron additions by WilkAndy · Pull Request #9 · cpgr/moose · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

free electron additions #9

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

Open
wants to merge 1 commit into
base: dbreader
Choose a base branch
from
Open

Conversation

WilkAndy
Copy link

free electron added to python convert utilities. GeochemicalDatabaseReader stores this information as a secondary species. moose_testdb.json has free electron in it to enable testing

Complete each of the following items before creating a PR

  • Include any relevant design information for your change
  • Follow Coding Standards
  • Submit one or more Test Cases or modify existing test cases
  • Reference or close a specific issue (refs # or closes #)

…eader stores this information as a secondary species. moose_testdb.json has free electron in it to enable testing
@WilkAndy
Copy link
Author

Sorry that we didn't see this before, @cpgr. But i guess the PR still hasn't been reviewed so it doesn't matter too much....

@WilkAndy
Copy link
Author

Oh my goodness, this free electron is a nightmare. I just realised its "basis species" aren't actually basis species since they include O2(g). For this set of work that's not a problem, BUT, in order to include "e-" in the list of secondary species in real models, we have to either:

  1. manually change the database to O2(aq) instead, and manually change the equilibrium constants (this is my preferred method because its not hiding anything within the Converter or Reader - just like other people can screw around with the database as much as they like)

  2. write some "if (free_electron) and (free_electron contains O2(g))" type of code. Yuck.

@cpgr
Copy link
Owner
cpgr commented Mar 26, 2020

Sorry I didn't see this earlier - I had an afternoon off!

I don't really like the idea of having to manually change entries after converting. It would be so easy to muck something up or forget.

Is this only used to calculated pe or eh or whatever it is called? Can we make sure that O2(g) is added as a secondary species when we add e-, and that O2(aq) is added as a basis species, to allow the reactions to be calculated? Or am I looking at this wrong? I don't really know!

@WilkAndy
Copy link
Author

When figuring out which secondary species to add, you look at their reactions and add all secondaries whose reaction contains only the basis species specified by the user. (There are complications from redox, but that doesn't matter here).
Hence, writing e- = O2(g) + stuff means that it never gets added, because O2(g) is a gas, so O2(g) is never a basis.

I wouldn't be surprised if GWB does something like you suggest, but it's ugly in my opinion. Eg, whenever you add O2(aq) as basis species, O2(g) and e- are automatically added too. What if another database has e- defined in terms of basis species?

But whatever we decide, it doesn't impact this PR, only the stuff that i'm currently doing in another branch.

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.

2 participants
0