Soln_vol, vm, rho_0 with Pitzer database issues

70 views
Skip to first unread message

Beni

unread,
Jan 21, 2020, 5:31:26 AM1/21/20
to phreeqpy-users
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)


Beni

unread,
Apr 14, 2020, 5:20:06 AM4/14/20
to phreeqpy-users

After some tries, I think the issue is related with the database format. Although all the calculations are done perfectly, phreeqpy pitzer database doesn´t work with other volume different than millero and hence it can not report the volumen of disolution in any case.

Some kind of light in this topic is really apreciated


Reply all
Reply to author
Forward
0 new messages