![]() ![]() ![]() > cl = Neutral ( charge =- 1, conc = 0.01 ) > system = System ( cl ) > system. This implies a single equivalent of H 3O + in order to balance theĬharge of the system. Because H 3O + is adjusted internally, all you need to define > from pHcalc.pHcalc import Acid, Neutral, System > import numpy as np > import matplotlib.pyplot as plt # Optional for plotting below pH of 0.01 M HClįirst of all, HCl completely dissociates in water to give equal amounts of The H 3O + concentration is adjusted internally, and OH - isĬalculated using K W. H 3O + and OH - are never explicitlyĭefined. PHcalc defines three classes - Acid, Neutral, and System - which are used inĬalculating the pH of the system. Solution of NaHCO 3, the additional equivalent of OH - is implied by the A 1:1 combination of Na + and H 2CO 3 would describe a Na + must be offset by an equivalent amount of OH -, which defines a With an appropriate amount of H 3O +, which would define HCl in solution. In this context, any Cl - in solution must be charged balanced These are ions that do not react with water, such as Na +Īnd Cl. Using this methodology bases and strong acids can be described using neutral,Ĭharged species. System, and these concentrations are used to balance the charge. Multiplying this by the concentration ofĪcid in solution provides the concentration of each acidic species in the Of positively charged ions equals the charge for the negatively charged ions.įor (polyprotic) weak acids, the fractional distribution of the speciesĪt a given pH value is determined. To theīest of my knowledge, the source code for this program is no longerīasically, this method finds the optimum pH for the mixture by systematicallyĪdjusting the pH until a charge balance is achieved, i.e. (There is also another, older Pascal programĬalled PHCALC, which uses matrix algebra to accomplish the same task. This method isĭescribed in detail in the Journal of Chemical Education and in thisĬhemWiki article, for example. PHcalc calculates the pH of a complex system of potentially strong and weakĪcids and bases using a systematic equilibrium solution method. Recent, unrelased version from the GitHub repo: $ pip install git+ Background If you have git installed on your system, then you can get the most Installation of the dependencies, the most recent version of pHcalc isĪvailable via pip, either from PyPI (stable) or the GitHub repo (most PHcalc is only a single Python file, so installation is quite simple. If you will be plotting the data, then there is an optionalīug fixes, questions, and update requests are encouraged and can be This package is Python 3.5 compatible with dependencies only on Numpy and PHcalc is a Python library for systematically calculating solution pH,ĭistribution diagrams, and titration curves. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |