db = PhreeqcDatabase("minteq.v4.dat")which is a new functionality from the reaktoro v.2. May I ask if you intend to use the reaktoro v1 or v2?
reaktoropython package in the yml-file.
Hi @mtsveta Appreciate you quick response. I need to use following code. Which version is recommended?
db = PhreeqcDatabase("minteq.v4.dat")
solution = AqueousPhase(speciate("H O Ca Mg Na K C P S Cl N"))
system = ChemicalSystem(db, solution)
specs = EquilibriumSpecs(system)
solver = EquilibriumSolver(specs)
state = ChemicalState(system)
I have listed reaktoro 2.0.0rc22 version in dependencies now. I am getting some errors like:
PhreeqcDatabase is not defined
speciate is not defined
EquilibriumSpecs is not defined
I need to use following code. Which version is recommended?
This looks like Reaktoro v2. The snippet of code you shared above runs for me on the 2.0.0rc22 version.
Phreeqc("minteq.v4.dat") is the functionality of the version 1.2. I think, you have to make sure that you activate the environment with Reaktoro v2.
Could you include this lines of code in the
try.py script so that I understand better what is going on?
import sys print(sys.path)
In the command line, it would be
python -c 'import sys; print(sys.path)'
Hello to all:
I hope you had a good summer
I tried creating a new environment
But since then I get the same errors as @bgvinayk
It seems like it weren't importing libraries from Reaktoro
import reaktoro as rkt
and then import all
But it won't be recognized later on the code
I tried changing the environment and activating it
reaktoroand then run the script in the screenshot. It worked without any issues (the results on the right-hand side). Could you please double check? This is the script I executed:
from reaktoro import * db = PhreeqcDatabase("phreeqc.dat") solution = AqueousPhase(speciate("H O C Na Cl")) solution.setActivityModel(chain( ActivityModelHKF(), ActivityModelDrummond("CO2") )) gases = GaseousPhase("CO2(g)") gases.setActivityModel(ActivityModelPengRobinson()) system = ChemicalSystem(db, solution, gases) T = 25.0 # temperature in celsius P = 1.0 # pressure in bar state = ChemicalState(system) state.temperature(T, "celsius") state.pressure(P, "bar") state.set("H2O" , 1.0 , "kg") state.set("CO2(g)", 10.0, "mol") state.set("Na+" , 4.00, "mol") state.set("Cl-" , 4.00, "mol") solver = EquilibriumSolver(system) solver.solve(state) props = ChemicalProps(state) props.output("props.txt") aprops = AqueousProps(state) aprops.output("aprops.txt") print("Success! Check outputted files `props.txt` and `aprops.txt`.")
OK, after chatting one-on-one with Allan it might be the case that I am not working on the right conda environment
I also had to create a new environment and seems like Reaktoro isn't updated in whichever environment that has been loaded by default on Jupyter Notebook
I am learning how to change the environment in whichever Python app that I use
Microsoft Visual Studio Code (Community)
Anaconda Jupyter Notebook
Yes, thank you. I have been doing my best. Seems that I will need to invest a couple of days into getting all done with it
I have been able to fix it with Anaconda
The issue was indeed with the environment
I fixed it by launching Spyder from Anaconda Navigator after choosing my environment in the very same GUI
So, my advice for @bgvinayk would be to choose the right environment, in Anaconda distribution or Visual Studio Code
I find Anaconda easier for me. Visual Code Studio has a more abstract GUI
Calcium salts are strange when heating, this is true
Calcium hardness tends to precipitate on the walls of dishwashers as a reaction of the temperature increase
I would analyze the combined effects of enthalpy and entropy
They key is to see the trend of DG with the increasing temperature for an intuitive set up
3Ca+2 + 2PO43- -> Ca3(PO4)2 (prec)
k = exp(-DG/(RT))
DG = DH - TDS
If DG is increasing, then k is decreasing with T
If DG is decreasing, then k is increasing with T
Hi @HeewonJung_CNU_twitter , the ODML algorithm (as well as chemical kinetics solver) has been recently (late September) implemented for Reaktoro v2, but it is currently available only through my personal GitHub repo in the
See these classes:
I need to merge that
kinetics branch above into
main and then produce conda packages for it. However, I'm currently very busy with another project that ends on Nov 15th, so this work will only happen after that.