Keywords

Line 0:INVERSE_MODELING1 Line 1:-solutions1 2 5 Line 2:-uncertainty0.02 Line 3:-phasesLine 4a: Calcite precipitate Line 4b: Dolomite dis Line 4c: CaX2 Line 4d: NaX Line 5:-balancesLine 6a pH 0.1 Line 6b: Ca 0.01 -0.005 Line 6c: Alkalinity 0.5 Line 6d: Fe 0.05 0.1 0.2 Line 7:-range10000 Line 8:-minimalLine 9:-tolerance1e-9

**INVERSE_MODELING**is the keyword for the data block.*number--*positive number to designate this inverse-modeling definition. Default is 1.*description*--optional character field that describes the mixture.

**-solutions**--identifier that indicates a list of solution numbers follows on the same line. Optionally,**sol**, or**-s**[**olutions**]. Note,**solution**(without a preceding hyphen) is not acceptable because it will be interpreted as the keyword**SOLUTION**.*list of solution numbers--*list of solution numbers to use in mole-balance calculations. At least two solution numbers are required and these solutions must be defined by**SOLUTION**input or by**SAVE**after a reaction calculation in the current or previous simulations. The final solution number is listed last, all but the final solution are termed "initial solutions". If more than one initial solution is listed, the initial solutions are assumed to mix to form the final solution. The mixing proportions of the initial solutions are calculated in the modeling process. In the example (line 1), solution 5 is to be made by mixing solutions 1 and 2 in combination with phase mass transfers.

**-uncertainty**--identifier that indicates a list of default uncertainties for each solution follows on the same line. Optionally,**uncertainties**,**-u**[**ncertainties**], or**-u**[**ncertainty**]. The uncertainties defined with**-uncertainty**do not apply to pH; default for pH is 0.05 pH units and may be changed with the**-balances**identifier. In this example, the default uncertainty is set to 0.02, which indicates that an uncertainty of 2 percent will be applied to each element and valence state in each aqueous solution. If**-uncertainty**is not entered, the program uses 0.05. The default uncertainties can be overridden for individual elements or element valence states using**-balances**identifier.*list of uncertainties--*list of default uncertainties that are applied to each solution in the order given by**-solutions**. The first uncertainty in the list is applied to all the element and element valence states in the first solution listed in**-solutions**. The second uncertainty in the list is applied to all the element and element valence states in the second solution listed in**-solutions**and so on. A default uncertainty may be entered for each solution used in inverse modeling. If fewer uncertainties are entered than the number of solutions, the final uncertainty in the list is used for the remaining solutions. Thus, if only one uncertainty is entered, it is applied to all solutions. The uncertainty may have two forms: (1) if the uncertainty is positive, it is interpreted as a fraction to be used to calculate the uncertainties for each element or element valence state. A value of 0.02 indicates an uncertainty of 2 percent of the number of moles of each element in solution will be used; and (2) if the uncertainty is negative, it is interpreted as an absolute value in moles to use for each mole-balance constraint. The second form is rarely used in**-uncertainty**input.

**-phases**--identifier that indicates a list of phases to be used in inverse modeling follows on succeeding lines. Optionally,**phase_data**,**-p**[**hases**],**-p**[**hase_data**]. Note,**phases**(without a preceding hyphen) is not acceptable because it will be interpreted as the keyword**PHASES**.

*phase name*--name of a phase to be used in inverse modeling. The phase must be defined in**PHASES**input or it must be a charge-balanced exchange species defined in**EXCHANGE_SPECIES**input. Any phases and exchange species defined in the database file or in the current or previous simulations are available for inverse modeling. Only the chemical reaction in**PHASES**or**EXCHANGE_SPECIES**input is important; the log K is not used in inverse-modeling calculations.*constraint--*The phase may be constrained only to enter the aqueous phase, "**dissolve**", or leave the aqueous phase, "**precipitate**". Any set of initial letters from these words are sufficient to define these constraints.

**-balances**--identifier that indicates a list of element or element-valence-state constraints and, if other than the default, associated uncertainties follow on succeeding lines. Optionally,**balances**,**balance**,**bal**, or**-b**[**alances**].

*element or valence state name*--name of an element or element valence state to be included as a mole-balance constraint in inverse modeling. Mole-balance equations for all elements that are found in the phases of**-phases**input are automatically included in inverse modeling; mole-balance equations for all valence states of redox elements are included. Elements, element valences states, or pH may be listed in**-balances**input to override the default uncertainties or the uncertainties defined with**-uncertainty**. The identifier**-balances**may also be used to include mole-balance equations for elements not contained in any of the phases (**-phases**).*list of uncertainties--*list of uncertainties for the specified element or element valence-state constraint. It is possible to input an uncertainty for*element*for each solution used in inverse modeling (as defined by**-solutions**). If fewer uncertainties are entered than the number of solutions, the final uncertainty in the list is used for the remaining solutions. Thus, if only one uncertainty is entered, it is used for the given element or element valence state for all solutions. The uncertainty for pH must be given in standard units. Thus, the uncertainty in pH given on line 6a is 0.1 pH units for all solutions. The uncertainties for elements and element valence states (but not for pH) may have two forms: (1) if the uncertainty is positive, it is interpreted as a fraction that when multiplied times the number of moles in solution gives the uncertainty in moles. A value of 0.02 would indicate an uncertainty of 2 percent in the number of moles in solution; and (2) if the uncertainty is negative, it is interpreted as an absolute value in moles to use for the solution in the mole-balance equation for*element*. In the example, line 6b, the uncertainty for calcium in solution 1 is 1 percent of the moles of calcium in solution 1. The uncertainty for calcium in solution 2 and 5 is 0.005 moles. The uncertainty for iron (line 6d) is 5 percent in solution 1, 10 percent in solution 2, and 20 percent in solution 5.

**-range**--identifier that specifies that ranges in mole transfer (minimum and maximum mole transfers that are consistent with the uncertainties) for each phase in each model should be calculated. Optionally,**ranges**,**range**, or**-r**[**anges**]. The calculation of these ranges is time consuming, but provides valuable information. In the interest of expediency, it is suggested that models are first identified without using the**-range**identifier, checked for adequacy and geochemical consistency, and then rerun with the**-range**identifier.*maximum*--Default 1000. The maximum value for the range is calculated by minimizing the difference between the value of*maximum*and the calculated mole transfer of the phase or the solution fraction. The minimum value of the range is calculated by minimizing the difference between the negative of the value of*maximum*and the calculated mole transfer of the phase or the solution fraction. In some evaporation problems, the solution fraction could be greater than 1000 (over 1000-fold evaporative concentration). In these problems, the default value is not large enough and a larger value of maximum should be entered.

**-minimal**--identifier that specifies that models be reduced to the minimum number of phases that can satisfy all of the constraints within the specified uncertainties. Optionally,**minimal**,**minimum**,**-m**[**inimal**], or**-m**[**inimum**]. Note that two minimal models may have different numbers of phases; minimal models imply that every one of the phases included is necessary to satisfy the constraints. The**-minimal**identifier minimizes the number of calculations that will be performed and produces the models that contain the most essential geochemical reactions. However, models that are not minimal may also be of interest, so the use of this option is left to the discretion of the user. In the interest of expediency, it is suggested that models are first identified using the**-minimal**identifier, checked for adequacy and geochemical consistency, and then rerun without the**-minimal**identifier.

**-tolerance**--identifier that indicates a tolerance for the optimizing solver is to be given.*tol*--Tolerance used by the optimizing solver. Default 1e-10. The value of*tol*should be greater than the greatest calculated mole transfer or solution fraction multiplied by 1e-15. The default value is adequate unless very large mole transfers (greater than 1000 moles) or solution fractions (greater than 1000-fold evaporative concentration) occur. In these cases, a larger value of*tol*is needed. Essentially, a value less than*tol*is treated as zero. Thus, the value of*tol*should not be too large or significantly different concentrations will be treated as equal.

If **-uncertainty** is not included, a default uncertainty of 0.05 (5 percent) is used for elements and 0.05 for pH. Default uncertainties, specified by **-uncertainty**, will almost always be specified as positive numbers, indicating fractional uncertainties. A default uncertainty specified by a negative number, indicating a fixed molal uncertainty for all elements in solution, is not reasonable because of wide ranges in concentrations among elements present in solution.

No mole-balance equation is used for pH. The uncertainty in pH only affects the mole-balance on carbon. Total carbon is assumed to co-vary with pH and alkalinity and an equation relating the uncertainty in carbon and the uncertainties of pH and alkalinity is included in the inverse model. See Equations and Numerical Method for Inverse Modeling.

All phase names must be defined through **PHASES** or **EXCHANGE_SPECIES** input. Line 4c and 4d are included to allow ion-exchange reactions in the inverse model. Exchange species with the names CaX_{2} and NaX are defined in the default database and are thus available for use in inverse modeling.

By default, mole-balance equations for every element that occurs in the phases listed in **-phases** input are included in the inverse-modeling formulation. If an element is redox active, then mole-balance equations for all valence states of that element are included. The **-balances** identifier is necessary only to define uncertainties for pH, elements, or element valence states that are different than the default uncertainties or to define mole-balance equations for elements not included in the phases. Mole-balance equations for alkalinity and electrons are always included in the inverse model. In some artificial solutions, such as pure water or pure sodium chloride solutions, the alkalinity may be very small (less than 1e-7) in both initial and final solutions. In this case, it may be necessary to use large (relative to 1e-7 equivalents) uncertainties (+1.0 or -1e-6) to obtain a mole balance on alkalinity. For most natural waters, alkalinity will not be small in both solutions and special handling of the alkalinity uncertainty will not be necessary (note alkalinity is a negative number in acid solutions). Uncertainties for electrons are never used because it is always assumed that no free electrons exist in an aqueous solution.

The options **-minimal** and **-range** affect the speed of the calculations. The fastest calculation is one that includes the **-minimal** identifier and does not include **-range**. The slowest calculation is one that does not include **-minimal** and does include **-range**.

- Example
- Explanation
- Notes
- Example problems
- Related keywords

User's Guide to PHREEQC - 07 MAY 96 [Next] [Previous] [Up] [Top]