Hello,
I have been facing issues with Phreeqpy that I do not know how to solve, any help is more than wellcome. The issue that I have is that I can not access to the SOLN_VOL (l of dissolution) command to use in user punch and also more commands like VM (specific volume) or for example rho_0 report values 0.
It is strange, because if I use the same database (Pitzer) in the Phreeqc and I can obtain this values.Moreover I also can pull out information from Phreeqpy with user punch like rho or totemole("water"), so it doesn´t look like a wrong implementation. Please find the code below:
# path for .dat files
datpath = r"C:\XXX"
# Seleccion de Database
def selected_array(db_path, input_string):
#print(db_path)
phreeqc = phreeqc_mod.IPhreeqc()
phreeqc.load_database(db_path)
phreeqc.run_string(input_string)
return phreeqc.get_selected_output_array()
input_string = """
SOLUTION 0
temp 20
pH 7.7
pe 4
redox pe
units mg/L
#density 1.0
B 25
Ca 100
Cl 3500
K 250
Mg 200
Na 2500
S(6) 750
Br 10
water 1
EQUILIBRIUM_PHASES 1
# CO2(g) -3.5 10
Calcite 0 0
Gypsum 0 0
Halite 0 0)
Carnallite 0 0
save solution 1
REACTION 1
H2O -1
20
save solution 2
USER_PUNCH 1
-start
10 punch rho
20 punch Totmole("water")
30 punch Tot("water")
40 punch SOLN_VOL
50 punch RHO_0
60 punch VM("H2O")
-end
SELECTED_OUTPUT
-high_precision true
-step true
-time false
-pe false
-solution false
-distance false
-pH true
-water true
-total B Ca Cl K Na S(6) Mg Br
-user_pu true
END"""
pitzer_result = selected_array(os.path.join(datpath, 'pitzer.dat'), input_string)