Water Resources Applications Software

Geochemical || Ground Water || Surface Water || Water Quality || General

Summary of BALNINPT

       balninpt - An interactive program for mass-balance calculations

       BALNINPT is an interactive Fortran 77 computer program designed to
       quantify chemical reactions between ground water and minerals and
       (or) gases.  Using (1) the chemical compositions of water samples
       from two points along a flow path and (2) a set of mineral phases
       hypothesized to be the reactive constituents in the system, the
       program calculates the mass transfer of phases necessary to account
       for the observed changes in composition between the two water
       samples.  The program determines every combination of the specified
       minerals that can account for the observed changes.  Additional
       constraints can be included in the problem formulation to account
       for mixing of two end-member waters, redox reactions, and, in a
       simplified form, isotopic composition.  Extensive help facilities
       are provided interactively by the program.

       BALNINPT is largely superseded by the programs NETPATH and PHREEQC.
       All of the capabilities of BALNINPT are included in NETPATH, with
       one exception: mass-balance on any element is possible with
       BALNINPT, but NETPATH is restricted to a fixed set of elements.
       PHREEQC contains the capabilities of BALNINPT with the additional
       capability to account for uncertainties in analytical data.
       However, PHREEQC is not interactive.

       BALNINPT solves a set of linear equations that account for mass
       conservation for each specified element.  The unknowns in these
       equations are the mass transfers of minerals and gases.  In the
       matrix that corresponds to the set of linear equations, the columns
       are the stoichiometries of the hypothesized reactant minerals.  The
       right-hand side of the equations are determined from the analytical
       data for the elements in solution.  If number of mineral and gas
       phases equals the number of elements (and the stoichiometries of the
       phases are linearly independent), the equations can be solved.  If
       the number of phases exceeds the number of elements, the system of
       equations is overspecified.  In this case, BALNINPT exhaustively
       searches for all combinations of minerals that, when used to form
       the left-hand side of the simultaneous equations, result in a
       solution to the equations.  Phases may be constrained to dissolve or
       precipitate; any solutions to the equations that violate these
       constraints are not printed.  It is also possible to limit the
       combinations of minerals that are tested to those that include
       selected minerals.

       Version 1.9 1994/11/14 - Minor bug fixes and code clean-up.

       Version January 1994 - General release for UNIX platform.

       Version BALNINPT - Entirely new program retaining only the basic
          concept of BALANCE.  BALNINPT was written in Fortran 77.  Program
          was designed to be interactive.  The numerical method was
          modified to allow the number of phases to exceed the number of
          elements.  Phases could be constrained to dissolve or
          precipitate.  Phases could be forced to be in every model.

       Version BALANCE, 1982 - Original release of program BALANCE Fortran
          66.  Number of phases was required to equal the number of
          elements.  Program operated only in batch mode.

       Proper use of the program requires adequate knowledge of
       geochemistry and a proper formulation of the problem.  Input
       includes the total element concentrations of two (or three in the
       mixing case) solutions and the stoichiometric compositions of all
       the minerals and gases that are hypothesized to react.  The elements
       and phases included can be entered interactively.  Mineral formulas
       may be selected interactively, edited, or defined from scratch; the
       default data file contains approximately 75 minerals and gases.

       The user may selectively choose to save model files (formatted files
       containing all information necessary to repeat the calculations),
       which can subsequently be retrieved, rerun, and (or) edited.  It is
       also possible to print results of selected models.

       The program is written in Fortran 77 with the following extensions:
       include files and variable names longer than 6 characters.  It
       requires the file FNAMES.FIL that specifies the name of the minerals
       data base (provided).  A simple script program is included to
       facilitate building the FNAMES.FIL file.  Generally, the program is
       easily installed on most computer systems.  The code has been used
       on UNIX-based computers and DOS-based 386 or greater computers
       having a math coprocessor and 2 mb of memory.

       Parkhurst, D.L., Plummer, L.N., and Thorstenson, D.C., 1982,
          BALANCE--a computer program for calculating mass transfer for
          geochemical reactions in ground water: U.S. Geological Survey
          Water-Resources Investigations Report 82-14, 29 p.

       Parkhurst, D.L., 1995, User's guide to PHREEQC--a computer program
          for speciation, reaction-path, advective-transport, and inverse
          geochemical calculations: U.S. Geological Survey Water-Resources
          Investigations Report 95-4227, 143 p.

       Parkhurst, D.L., Thorstenson, D.C., and Plummer, L.N., 1980,
          PHREEQE--a computer program for geochemical calculations: U.S.
          Geological Survey Water-Resources Investigations Report 80-96,
          195 p. (Revised and reprinted, 1990.)

       Plummer, L.N., Parkhurst, D.L., Fleming, G.W., and Dunkle, S.A.,
          1988, A computer program incorporating Pitzer's equations for
          calculation of geochemical reactions in brines: U.S. Geological
          Survey Water-Resources Investigations Report 88-4153, 310 p.

       Plummer, L.N., Prestemon, E.C., and Parkhurst, D.L., 1991, An
          interactive code (NETPATH) for modeling net geochemical reactions
          along a flow path: U.S. Geological Survey Water-Resources
          Investigations Report 91-4078, 227 p.

       Plummer, L.N., Prestemon, E.C., and Parkhurst, D.L., 1994, An
          interactive code (NETPATH) for modeling NET geochemical reactions
          along a flow PATH--version 2.0:  U.S. Geological Survey Water-
          Resources Investigations Report 94-4169, 130 p.

       NETPATH is the mass-balance calculation code taught in Geochemistry
       for Ground-Water Systems (GW3021TC) at the USGS National Training
       Center.  BALNINPT is referenced only for its special capabilities
       that are absent in NETPATH.

          U.S. Geological Survey
          David Parkhurst
          Denver Federal Center, MS 413
          Lakewood, CO  80227

          U.S. Geological Survey
          Hydrologic Analysis Software Support Program
          437 National Center
          Reston, VA 20192

       Official versions of U.S. Geological Survey water-resources analysis
       software are available for electronic retrieval via the World Wide
       Web (WWW) at:


       and via anonymous File Transfer Protocol (FTP) from:

         (path: /pub/software).

       The WWW page and anonymous FTP directory from which the BALNINPT
       software can be retrieved are, respectively:


       netpath(1) - Interactive program for calculating NET
                    geochemical reactions and radiocarbon dating
                    along a flow PATH
       phreeqc(1) - A program for aqueous geochemical calculations
       phreeqe(1) - A program for geochemical calculations
       phrqpitz(1) - A program for geochemical calculations in brines
       wateq4f(1) - A program for calculating speciation of major,
                    trace, and redox elements in natural waters

The URL for this page is:
Send questions or comments to