Java Security Settings:
      This web page employs Java, which requires specific security settings for correct operation.
      If the applets on this page do not run correctly, consult the Virtual Chemistry Experiments FAQ
      or the Physlet Physics web site for establishing the correct security settings.

Demonstration of the ChemEquilibria Applet

This page illustrates the use of the Equilibria package and the ChemEquilibria applet in solving equilibrium problems.

The ChemEquilibria applet will be used to calculate points on a titration curve for the titration of Ca+2 with EDTA in a solution containing an ammonia/ammonium ion buffer. Before proceeding, be aware that this problem can be greatly simplified to involve only the free and complexed calcium ion and free and complexed EDTA. This page, however, does not employ these simplifications in order to illustrate how the ChemEquilibria applet and Equilibria package can be employed to solve a complicated problem.

Step 1. Define all Chemical Species

The chemical species include free calcium ion, complexed calcium ion, seven free EDTA species (EDTA is hexaprotic), ammonia, ammonium ion, and any counter ions. Use the createChemSpecies method to create the following chemical species:

Chemical Species Label Charge Formula Weight
calcium ion Ca+2 +2 40.078
H6EDTA+2 H6EDTA+2 +2 294.264
H5EDTA+ H5EDTA+ +1 293.256
H4EDTA H4EDTA 0 292.248
H3EDTA- H3EDTA- -1 291.240
H2EDTA-2 H2EDTA-2 -2 290.232
HEDTA-3 HEDTA-3 -3 289.224
EDTA-4 EDTA-4 -4 288.216
CaEDTA-2 CaEDTA-2 -2 328.294
ammonia NH3 0 17.031
ammonium ion NH4+ +1 18.039
chloride ion Cl- -1 35.453
sodium ion Na+ +1 22.990

The createChemSpecies method can be employed to create a new chemical species. One could explicitly use this method to create each of the free EDTA species; however, a simpler option exists. The addAcidBaseSpecies method automatically creates a series of acid-base chemical species and adds these to a solution. This method, though, requires that the solution phase already exist; thus the use of this method must wait until Step 2.


Bear in mind that the ChemEquilibria applet has no knowledge of which salts are strong electrolytes and which are weak. Thus the user must explicitly indicate this in the creation of the chemical species. In addition, H2O, H+, and OH- exist in the solution. It is not necessary to create these chemical species, because the applet automatically creates them.

In this chemical system, the sodium and chloride ions are simply counter-ions; they do not participate in any reaction but their charge is necessary to maintain electroneutrality. In this example the counter-ions are explicitly added. An alternative is to set the autoChargeBalance property for each solution. When this property is true, the Equilibria object will automatically balance the charge in the solution by adding a generic monovalent counter-ion, X+ or X-. This feature is useful if activity corrections are not being performed or if the actual counter-ions are indeed monovalent. (See the setAutoChargeBalance method for ChemEquilibria in the documentation.)

A useful feature of the ChemEquilibria applet is the ability to read a text file that defines chemical species. (See the loadLibrary method for ChemEquilibria in the documentation.) Such files are easy to create (one such file is inorganic.library, which defines various inorganic species).

Step 2. Create the Phases

Although all species exist in aqueous solution in this system, there are really two different phases: the titrant and the sample solution. Both the titrant and the sample solution are aqueous solutions, but they have different compositions. Thus two different aqueous solutions are created, one is given the label "tr" representing the titrant and the other "sp" representing the sample solution. (Any labels could be used, provided the two labels are different.)


The above instructions create 100 mL of each solution. In creating multiple solutions with the same solvent, it is essential that the same chemical species be used. This issue is automatically managed by the software for aqueous solutions. The createAqueousPhase method automatically sets the analytical amount of water, and the hydrogen and hydroxide ions to the solution, and defines the autodissociation reaction.

Step 3. Add the Species to the Phases

All solutions contain 1 mole/L ammonia and 1 mole/L ammonium chloride to provide a buffer. Each solution has a volume of 0.100 L, thus 0.1 mole of each chemical species is required. The solutions must be electrically neutral, thus the counter-ion for the ammonium ion (chloride in this example) must also be added. (Alternatively, the setAutoChargeBalance method can be used to automatically balance charge, in which case the Equilibria object adds a generic counter-ion, X+ or X-, to achieve electroneutrality.)


The titrant in EDTA titrations is usually prepared using Na2H2EDTA (which is generally a dihydrate) at an analytical concentration of 0.01000 mole/L. The sodium ion and various EDTA species must thus be added to the titrant. At this point the addAcidBaseSpecies method can be employed to create the various uncomplexed EDTA species and to add them to the titrant solution. In the addAcidBaseSpecies method, the first argument is the name for the free base without a charge indication. The second and third arguments are the charge and formula weight of the free base, respectively. The fourth argument is the number of acid-base steps; the six in this case indicates that the parent acid is hexaprotic. The remaining arguments are the label of the phase (must be a solution) to which the acid-base species are added and the moles of each species to be added.

document.chemEquilibria.addAcidBaseSpecies("EDTA", -4.0, 294.264, 6, "tr", 0.0);

Notice that all EDTA species were added (except the complex, because no calcium ion is present in the titrant), but the analytical amounts are all zero except for H2EDTA-2.

The sample solution initially contains only calcium ion (and its counter-ion) in addition to the ammonia/ammonium ion buffer. The sample solution will also eventually contain the calcium-EDTA complex and the various free EDTA species, so those chemical species must also be added (with amounts of zero).

document.chemEquilibria.addAcidBaseSpecies("EDTA", -4.0, 294.264, 6, "sp", 0.0);

Bear in mind that the hydrogen ion and hydroxide ions were automatically defined by the applet.

Step 4. Define the Chemical Reactions

Now that all chemical species and phases have been created, it is time to define the chemical reactions. The reactions are defined by submitting a string containing the chemical equation. " = " represents the equilibrium arrows. Species on the same side of the equilibrium arrows are separated by " + ".

Each aqueous phase is a distinct solution, and each reaction must thus be defined for each solution. So solve the initial equilibrium problem, that is, the problem before any titrant is added to the sample solution, the following chemical reactions must be defined.

document.chemEquilibria.addReaction("buffer sp","NH4+ (sp) = NH3 (sp) + H+ (sp)", 5.70E-10);
document.chemEquilibria.addReaction("buffer tr","NH4+ (tr) = NH3 (tr) + H+ (tr)", 5.70E-10);
document.chemEquilibria.addReaction("EDTA 1 tr","H6EDTA+2 (tr) = H+ (tr) + H5EDTA+ (tr)", 1.0);
document.chemEquilibria.addReaction("EDTA 2 tr","H5EDTA+ (tr) = H+ (tr) + H4EDTA (tr)", 0.032);
document.chemEquilibria.addReaction("EDTA 3 tr","H4EDTA (tr) = H+ (tr) + H3EDTA- (tr)", 0.010);
document.chemEquilibria.addReaction("EDTA 4 tr","H3EDTA- (tr) = H+ (tr) + H2EDTA-2 (tr)", 0.0022);
document.chemEquilibria.addReaction("EDTA 5 tr","H2EDTA-2 (tr) = H+ (tr) + HEDTA-3 (tr)", 6.9E-7);
document.chemEquilibria.addReaction("EDTA 6 tr","HEDTA-3 (tr) = H+ (tr) + EDTA-4 (tr)", 5.8E-11);

Although the titration reaction cannot occur at this point (because neither titrant nor sample solution contains both EDTA and calcium ions), it is convenient to define the titration reaction at this point.

document.chemEquilibria.addReaction("complexation","Ca+2 (sp) + EDTA-4 (sp) = CaEDTA-2 (sp)", 4.9E10);

Prior to solving an equilibrium problem, the solveProblem method determines whether or not it is possible to form each species. If a species cannot be formed, such as CaEDTA-2 before any titrant is added, all reactions involving such species are disregarded in the equilibrium calculation. This feature permits all reactions to be defined at one time.

Step 5. Create the Titration Curve

In this problem, it is assumed that all reactions behave ideally. This obviously is not true owing to the high ionic strength. The ionic strength is constant at 1.0 mole/L, however, so all equilibrium constants should be those applicable at 1.0 mole/L ionic strength and not the thermodynamic values. (Note that the Extended Debye-Huckel Equation does not provide accurate estimates of activity coefficients at this ionic strength.)


The equilibria package permits a Titration object to be defined. In defining a Titration object, it is necessary to designate one solution as the titrant and a second solution as the sample solution. It is also necessary to identify the property of the sample solution that is being monitored during the titration. One can monitor pX (where X is some species in the sample solution) or one can monitor a cell or half-cell potential. In this case the pCa of the solution will be monitored.


Step 6. Calculate the Titration Curve

The calculate method calculates a titration curve for the volume of titrant ranging from zero to the volume (in mL) supplied in the arguement. The instruction below constructs a titration curve where up to 50.0 mL of titrant have been added.


The calculate method automatically determines how much titrant to add at each step in the titration in order to obtain a smooth curve with well-defined equivalence points.

ComplexationTitration.html version 2.1
© 2001-2014 David N. Blauch