From 08f44ff59280fa68159691a4d8133203ab0e6888 Mon Sep 17 00:00:00 2001 From: uliw Date: Thu, 8 Dec 2022 16:34:21 -0500 Subject: [PATCH] Added optional unit parameter to kinetics --- phreeqpython/solution.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phreeqpython/solution.py b/phreeqpython/solution.py index e35e077..1933319 100644 --- a/phreeqpython/solution.py +++ b/phreeqpython/solution.py @@ -139,7 +139,7 @@ def forget(self): """ remove this solution from VIPhreeqc memory """ self.pp.remove_solutions([self.number]) - def kinetics(self, element, rate_function, time, m0=0, args=()): + def kinetics(self, element, rate_function, time, m0=0, args=(), unit="mmol"): def calc_rate(y, t, m0, *args): temp = self.copy() @@ -154,7 +154,7 @@ def calc_rate(y, t, m0, *args): for i in range(len(time)): t = time[i] - self.add(element, y[i]) + self.add(element, y[i], unit) yield(t, self) # Magic functions