IPhreeqcPy Module
- class IPhreeqcPy.IPhreeqc(dll_path=None)[source]
Python wrapper for the compiled IPhreeqc.
- Parameters:
string (dll_path (optional)) – path for the iphreeqc compiled library .dll for windows or .so for linux
Note
IPhreeqc is compiled on installation for Linux GNU compilers are used and for windows visual studio 10 compilers are used. By default these compiled files are used.
- AddError(phc_error_msg)[source]
Appends the given error message and increments the error count. Internally used fo create an error condition
- Parameters:
phc_error_msg (string) – Error message to append
- AddWarning(phc_warn_msg)[source]
Appends the given warning message and increments the warning count. Internally used to create warning condition
- Parameters:
phc_warn_msg (string) – Warning message to append
- ClearAccumulatedLines()[source]
Clear the accumlated input buffer. Input buffer is accumlated from calls to
AccumulateLine()
- GetComponent(index)[source]
Retrieves the given component
- Parameters:
index (integer) – The zero-based index of the component to retrieve
- property GetComponentCount
Retrieves the number of component in the current component list
- GetComponentList()[source]
Get names of all components
- Returns:
list with component names
- Return type:
list
- GetErrorString()[source]
Retrieves the error messages from the last call to
RunAccumulated(),RunFile(),RunString(),LoadDatabase(),LoadDatabaseString()- Returns:
Error string
- Return type:
string
- GetSelectedOutputArray()[source]
Get all values from selected output
- Returns:
All values of the selected output in multi-list form
- Return type:
list
- GetSelectedOutputCol(col)[source]
Get all values for one column from selected output
- Parameters:
col (integer) – column index
- Returns:
list of selected output for a given column
- Return type:
list
- property GetSelectedOutputColumnCount
Retrieves the number of columns in the selected output buffer
- GetSelectedOutputRow(row)[source]
Get all values for one row from selected output
- Parameters:
row (integer) – row index
- Returns:
list of selected output for a given row
- Return type:
list
- property GetSelectedOutputRowCount
Get number of rows in selected output
- GetSelectedOutputValue(row, col)[source]
Get one value from selected output at given row and column
- Parameters:
row (integer) – row index
column (integer) – column index
- Returns:
Selected output value
- Return type:
Real
- LoadDatabase(database_name)[source]
Load a database with given file_name
- Parameters:
database_name (string) –
path to the database. IphreeqcPy comes with all databases of phreeqc and cemdata07.To use one of these database type the relevant filename. Filenames are listed below
alkaline.dat
cemdata07.dat
ex15.dat
llnl.dat
mcatexch.dat
minteq.dat
minteq.V4.dat
phreeqc.dat
phreeqcU.dat
phreeqd.dat
pitzer.dat
wateq4f.dat
- LoadDatabaseString(input_string)[source]
Loads a database from a string
- Parameters:
input_string (string) – input database string
- RunFile(Filename)[source]
run instructions from a file
- Parameters:
Filename (string) – path to file to run instructions from