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.

The Haber Process

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

The Haber Process is the industrial process for producing ammonia from hydrogen and nitrogen gases. The reaction is performed at high temperature (400 to 500 oC) and high pressure (300 to 1000 atm).

Step 1. Define all Chemical Species

Use the createChemSpecies method to create the following chemical species:

Chemical Species Label Charge Formula Weight
hydrogen H2 0 2.0159
nitrogen N2 0 28.0134
ammonia NH3 0 17.0306

The relevant JavaScript code to create these chemical species is listed below. Note that the ChemEquilibria applet is given the name "chemEquilibria" in the APPLET tag.

document.chemEquilibria.createChemSpecies("H2",0.0,2.0159);
document.chemEquilibria.createChemSpecies("N2",0.0,28.0134);
document.chemEquilibria.createChemSpecies("NH3",0.0,17.0306);

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.txt, which defines various inorganic species).

Step 2. Create the Phases

This reaction occurs in a single phase, which in this case is a gas phase. The following JavaScript instruction creates a gas phase with the label "g" and a volume of 500.0 L.

document.chemEquilibria.createGasPhase("g",500.0);

Step 3. Add the Species to the Phases

The gas phase, as created, is a vacuum; that is, it contains no chemical species. The three chemical species must thus be added to the gas phase. The addSpecies method adds a certain number of moles of a chemical species (identified by its label) to a phase (identified by its label). The first instruction below, for example, adds 3000.0 moles of the chemical species with label "H2" (that would be hydrogen) to the phase with label "g" (that would be the gas phase).

document.chemEquilibria.addSpecies("H2","g",3000.0);
document.chemEquilibria.addSpecies("N2","g",1000.0);
document.chemEquilibria.addSpecies("NH3","g",0.0);

These JavaScript commands add stoichiometric amounts of hydrogen and nitrogen to the reactor; notice that there is no ammonia in the reactor initially, but provisions are made for the participation of ammonia in the reaction.

Step 4. Define the Chemical Reactions

Now that all chemical species and phases have been created, it is time to define the chemical reaction. The reaction is 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 " + ". When the same chemical species exists in multiple phases, it is necessary to explicitly indicate the phase with the chemical species in the reaction. In this case, however, there is only one phase, so no ambiguity is introduced by omitting the phases from the chemical equation. The equilibrium constant employs pressure to calculate the activity of a gas and molar concentration to calculate the activity of a solute. Thus Kp rather than Kc must be supplied in this case.

document.chemEquilibria.addReaction("rxn","3 H2 + N2 = 2 NH3", 5.4E5);
document.chemEquilibria.setTemperatureDependence("rxn",10035.7527,-3.7214);

In this process, the temperature of the reaction vessel may be varied, which in turn affects the equilibrium constant. A reference temperature is associated with each equilibrium constant; by default this value is 298.15 K. The edu.davidson.chm.equilibria package models the temperature-dependence of an equilibrium constant using the following equation:

ln[K/Kr] = a (1/T - 1/Tr) + b ln[T/Tr]

The reference temperature is denoted by Tr (by default Tr = 298.15 K) and the equilibrium constant at the reference temperature by Kr. The parameters a and b are determined empirically.

One option for managing the effects of a change in temperature is to manually enter the equilibrium constant for the desired temperature. By default a = b = 0, thus a change in system temperature produces no change in equilibrium constants (or standard potentials).

An alternative option is to set the reference temperature and a and b to appropriate values and allow the built-in features of the equilibria package to adjust the value of the equilibrium constant. This option is employed in this example. The value of a and b employed in the above JavaScript code were determined by curve-fitting values of K over the temperature range of 300 to 1000 K. K = 5.4 x 105 applies at 298.15 K.

Step 5. Solve the Equilibrium Problem

Before solving the problem, various parameters describing the properties of the system must be set. In this problem, the system is assumed to behave ideally. The volume of the system is fixed and the pressure may vary as equilibrium is achieved or as other reagents are added; thus the system is not isobaric. Finally one must select the temperature (in this case 400 oC). These three parameters could be set in advance using the PARAM options in the APPLET tag.

document.chemEquilibria.setIsIdeal(true);
document.chemEquilibria.setIsIsobaric(false);
document.chemEquilibria.setTemperature(673.15);
var solveState = document.chemEquilibria.solve();

The solve method first parses the chemical system to ensure certain types of errors do not exist. The problem is then solved. The solve method returns true if the solution was obtained and false if no solution was found. In the event no solution was found, check the Java console for information on the nature of the problem.

Step 6. Access Equilibrium Properties

After the problem has been solved, the equilibrium properties of the various chemical species and phases can be obtained using the appropriate method. Examples are shown below.

JavaScript Code Results
document.chemEquilibria.getPressure("g")
P = atm
document.chemEquilibria.getPressure("H2","g")
PH2 = atm
document.chemEquilibria.getPressure("N2","g")
PN2 = atm
document.chemEquilibria.getPressure("NH3","g")
PNH3 = atm
document.chemEquilibria.getK("rxn",document.chemEquilibria.getTemperature())
K =

To see the effect of the system temperature, enter a new temperature, solve the problem with the new temperature, and then get the properties for the new equilibrium state. In the same manner, the volume of the reactor can be altered.

New Temperature = oC               New Volume = L              



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