Hi,
Two issues regarding units.
Unit conversion for ionic species:
The methods: sol.total(), sol.total_element(), sol.activity() all allow to convert the units:
sol.total('C', units='mg')
This works great, but fails for ionic species:
sol.total('CO3-2', 'mg') >> ERROR
It looks like the convert_units() method called, cannot handle the valence at the end.
This works fine, and return the right value:
sol.total('CO3', 'mg')
I would suggest to change the convert_units() so it can handle ionic species as well.
Volume and weight specific units:
PhreeQC calculates with absolute amounts of components (mol) and solution (kg water, kg solution, L solution).
Typically, a solution will have 1.0 kg water (default), unless specified otherwise.
Therefore, sol.total(species) returns unit: mmol. Most likely equal to: mmol/kgw.
To be sure about the concentration units, one would have to do:
m_water = sol.mass >> kg water (not kg solution)
m_sol = sol.density * sol.volume >> kg solution
sol.total(species)/m_water >> unit: mmol/kgw
sol.total(species)/m_sol >> unit: mmol/kgs
sol.total(species)/sol.volume >> unit: mmol/L
Same for other units (umol, mol, mg, g, ... ).
As a user, we typically want the concentration, not the absolute amount.
It would be very handy if the convert_units() method (called by sol.total(species)) could also convert to units like: mmol/kgw, mmol/kgs, mmol/L and the other ones (umol, mg, g, ... ).
Best regards,
Geert
Hi,
Two issues regarding units.
Unit conversion for ionic species:
The methods: sol.total(), sol.total_element(), sol.activity() all allow to convert the units:
sol.total('C', units='mg')This works great, but fails for ionic species:
sol.total('CO3-2', 'mg') >> ERRORIt looks like the convert_units() method called, cannot handle the valence at the end.
This works fine, and return the right value:
sol.total('CO3', 'mg')I would suggest to change the convert_units() so it can handle ionic species as well.
Volume and weight specific units:
PhreeQC calculates with absolute amounts of components (mol) and solution (kg water, kg solution, L solution).
Typically, a solution will have 1.0 kg water (default), unless specified otherwise.
Therefore, sol.total(species) returns unit: mmol. Most likely equal to: mmol/kgw.
To be sure about the concentration units, one would have to do:
Same for other units (umol, mol, mg, g, ... ).
As a user, we typically want the concentration, not the absolute amount.
It would be very handy if the convert_units() method (called by sol.total(species)) could also convert to units like: mmol/kgw, mmol/kgs, mmol/L and the other ones (umol, mg, g, ... ).
Best regards,
Geert