A Computer Program for a Trilinear Diagram Plot and Analysis of Water Mixing Systemsa

Abstract
The Piper (1953) trilinear diagram has been widely used to graphically represent the dissolved constituents of natural waters and to test for apparent mixtures of waters from different sources. Because of the time required to plot points and calculate the proportional values of mixing, this treatment of data was often quite tedious, particularly in studies involving large numbers of chemical analyses. The PIPER program was written in BASIC to be run on a Hewlett‐Packard desktop computer with an X‐Y plotter. Data input is in ppm units. The program plots points in all three fields of the trilinear diagram, draws at each point within the central diamond field a circle with a radius correspondent to the concentrations expressed in meq/1, checks for points that fall on a straight line (or within a predetermined tolerance of a straight line) representing postulated mixtures with two end members, and/or within a triangle representing mixtures of three end members. Finally, the program does a numerical analysis of the mixing ratios of the constituents for postulated mixing systems according to the methodology as presented by Piper (1953).