Giter Site home page Giter Site logo

titration-curve's Introduction

titration-curve

Perform titration curves of any acid-base pair.

Dependencies

  • python >=3.6
  • numpy
  • matplotlib (optional)
  • For further info check pdm files

Examples

Titration of weak diprotic-acid with strong base

# define the sample and the titrant species
# first argument: concentration
# second argument: list of pK's (pKa's or pKb's) (optional, default assumes strong acid/base)
# third argument: volume (optional)

sample = Acid(0.5, [4, 7])
titrant = Base(0.5)

# calling the titration function. Returns the titrated fraction array (phi) and the pH array
phi, pH = titrate(sample, titrant)

# ploting the result

plt.plot(phi, pH)

plt.title('Titulação legal!')
plt.xlabel('Fração titulada')
plt.ylabel('pH')

Titration of strong base with strong acid

sample = Base(0.3) # inital concentration of 0.3 mol/L
titrant = Acid(0.5) # inital concentration of 0.5 mol/L

phi, pH = titrate(sample, titrant)

plt.plot(phi, pH)

plt.title('Titulação legal!')
plt.xlabel('Fração titulada')
plt.ylabel('pH')

titration-curve's People

Stargazers

 avatar

Watchers

 avatar

Forkers

timhockswender

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.