Explanation of the Virtual Titrator!

The 'Pure JAVA' Virtual Titrator fuses the many pages and programs of the HTML-based version into one applet using the JAVA programming language.

The basic steps are:

1) User input: The JAVA applet uses a GUI, Graphical User Interface, to both collect and display the user's data. Separate windows contain the acid data, the graph itself, and a text viewer, so that all can be visible at once, or just the graph alone.

2) Solution of numerical equations: The calculations are done within the JAVA applet that has already been downloaded and stored in array to be accessed by the plotting part of the program. An explanation of the equations is given below, and the steps of the "systematic method" used to solve for the titration equation is explained here.

3) Plotting: Plotting of the data is performed by the graph class of the JAVA applet. The graph class reads the array and plots the points. The applet also controls further manipulation, allowing zooming, refreshing, and coming soon saving and overlaying of graphs. Although the graph class itself is the same in the JAVA applet and the HTML-based plot, the JAVA applet has many advantages.


Advantages the JAVA applet has over the HTML-based version

Dynamic control of the acid list

Improved Graphing

Text Viewer

One download

Small size

quick and easy changes

help file - soon to be completed


Solution of equations

Titration Curve
The mathematical equation describing the titration curve can be readily generated using the "systematic method". In this method, one writes equations describing the equilibrium expressions, with additional expressions generated for mass conservation and charge balance (overall electrical neutrality of solution). This results in a single equation, with [H+] as the unknown. However,the equation is a third-order equation for a monoprotic weak acid, fourth order for a diprotic acid, and fifth order for a triprotic acid. This method is explained in detail
here. While these equations have 3, 4, or 5 roots, respectively, most of these roots will be imaginary, complex, or negative real numbers. There can only be one real, positive concentration of hydrogen ion. The complex class that generates the titration curve finds all the roots of the equations, and then picks out the real, positive root. This is repeated for many volumes of added base, generating a complete titration curve. Because no approximations are made in the numerical solution, the resulting curve will be correct for ANY concentration of weak acid, even in the dilute limit. The routines for solving the complex, polynomial equations were taken from "Numerical Recipes in C" and 'translated' into JAVA and changed to return only the real, positive root.

Alpha Plot
The equations describing the alpha plot is much simpler and can be solved directly from the ka values and a given pH, unaffected by concentrations. The alpha plot vs. pH simply feeds pH values and returns alpha values. However, the alpha plot vs. ml base first equates a pH from the addition of base using the titration equations explained above, and then feeds this pH in order to receive the alpha values for the addition of base.

More Explanations

Framed main page

Non-framed main page