Code Monkey home page Code Monkey logo

phcalc's People

Contributors

mhvwerts avatar rnelsonchem avatar zsewa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

phcalc's Issues

Sulfuric Acid

Can you provide example calculations for Na2SO4/Sulfuric acid in the documentation?

pKa of carbonic acid

In the carbonic acid example of the README, the pKa values of H2CO3 are given as [3.6, 10.32] and the pH of 0.01 M is computed to be 2.834.

According to this list the pKa values should be [6.35, 10.33].
Using these values gives a pH of 4.176 which is consistent with the value of 4.18 for 10 mM given here.

Is it just a typo?

Add temperature and concentration pKa correction constants

Since pKa will vary with both the concentration of a species, as well as the temperature of the solution, I think it will be worthwhile to introduce a method to calculate a more precise pKa value for a species given one or more constants defining the relationship between a species' dissociation constant and temperature and concentration.

I will hopefully find some time to implement and create a PR in the next week or two.

Reference to your module

Hey Ryan, I am using a slightly rewritten version of your pHcalc in my RTM framework and planning to add the framework as a chapter of my PhD thesis or supplemental information. Thus, I was wondering how should I cite your work? do you have a reference or DOI? At the moment I have only your name and link to the GitHub repository. Looking forward to your reply.

RTM framework:
https://github.com/biogeochemistry/PorousMediaLab

New object class names

Looking for feedback on new object class names. Here's the proposed nomenclature:

  • AcidAq -- Used to define aqueous species that have known Ka/pKa values
  • IonAq -- Used to define an aqueous ion. These are assumed to not participate in any aqueous equilibria, but their charge will affect the overall charge balance
  • SystemAirEquilibrated -- A subclass of System to equilibrate the solution with atmospheric CO2. See PR-6
  • AcidGas -- Used to define a gas in equilibrium with the solution. In solution, the gas participates in acid/base equilibria. I.e. NH3 and CO2/H2CO3. See PR-7

pH Calc slow inside PDEs solver

Hi,

I would like to use your “pH Calc” algorithm in my Reactive-Transport-Toolbox.

This reaction toolbox solves advection-diffusion-reaction PDE for saturated (at the moment) and not saturated (will be added soon) flow.
The problem that I encounter at the moment that I solve the pH for vectors and I am iterating across indexes of concentrations. In this implementation of pHcalc it takes very long time to solve for each time step in PDE. Thus, I was wondering if it is possible to accelerate the estimation of pH in your toolbox? One of the solution would be to provide a jacobian. Would it be possible to make?

Thanks.

Looking forward to your reply.

My toolbox is here:
https://github.com/biogeochemistry/PorousMediaLab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.