phrRunAccumulated: Runs the accumulated input.

View source: R/phreeqc.R

phrRunAccumulatedR Documentation

Runs the accumulated input.

Description

Runs the input buffer as defined by calls to phrAccumulateLine.

Usage

phrRunAccumulated()

Details

After calling phrRunAccumulated phrGetAccumulatedLines can be used in case of errors. The accumulated lines will be cleared on the next call to phrAccumulateLine.

The phrAccumulateLine method cannot be called until a database has been successfully loaded by calls to either phrLoadDatabase or phrLoadDatabaseString.

Value

This function returns NULL on success.

References

https://water.usgs.gov/water-resources/software/PHREEQC/IPhreeqc.pdf

See Also

Other Accumulate: phrAccumulateLine(), phrClearAccumulatedLines(), phrGetAccumulatedLines()

Other Run: phrRunFile(), phrRunString()

Examples


# turn on the output file
phrSetOutputFileOn(TRUE)
phrSetOutputFileName(file.path(tempdir(), "ex2.out"))

# load the phreeqc.dat database
phrLoadDatabaseString(phreeqc.dat)

# accumulate the input
phrAccumulateLine("TITLE Example 2.--Temperature dependence of solubility")
phrAccumulateLine("                  of gypsum and anhydrite")
phrAccumulateLine("SOLUTION 1 Pure water")
phrAccumulateLine("        pH      7.0")
phrAccumulateLine("        temp    25.0")
phrAccumulateLine("EQUILIBRIUM_PHASES 1")
phrAccumulateLine("        Gypsum          0.0     1.0")
phrAccumulateLine("        Anhydrite       0.0     1.0")
phrAccumulateLine("REACTION_TEMPERATURE 1")
phrAccumulateLine("        25.0 75.0 in 51 steps")
phrAccumulateLine("SELECTED_OUTPUT")
phrAccumulateLine("        -file   ex2.sel")
phrAccumulateLine("        -temperature")
phrAccumulateLine("        -si     anhydrite  gypsum")
phrAccumulateLine("END")

# run it and echo the name of the output file
if (is.null(phrRunAccumulated())) {
  cat(paste("see ", phrGetOutputFileName(), ".\n", sep = ""))
}

phreeqc documentation built on Sept. 11, 2024, 8:33 p.m.