diff --git a/antoine.py b/antoine.py index 68068c4..e2dd90b 100644 --- a/antoine.py +++ b/antoine.py @@ -1,3 +1,6 @@ +import numpy as np +# change number 1 + def antoine( a, T): # Ps = antoine( a, T) # @@ -22,5 +25,9 @@ def antoine( a, T): # Modified by: Tyler R. Josephson # Changed comment + a=np.asarray(a,dtype=int) + T=np.asarray(T, dtype=int) + # change number 2, making a and T into arrays + Ps = 10.0**( a[:,0] - a[:,1] / ( a[:,2] + T ) ) return Ps diff --git a/raoult_law_kvalue.py b/raoult_law_kvalue.py index 4bff56e..cbea295 100644 --- a/raoult_law_kvalue.py +++ b/raoult_law_kvalue.py @@ -1,7 +1,7 @@ from antoine import antoine import numpy as np -def raoult_law_kvalue( T, P, a, *gamma): +def raoult_law_kvalue( T, P, a, * gamma): # Calculates the equilibrium coefficient from Raoult's law # INPUTS: # @@ -31,7 +31,7 @@ def raoult_law_kvalue( T, P, a, *gamma): ns,nc = a.shape # makes np array of zeros - K = np.zeros(ns) + K = np.zeros(ns) # This line initializes K values Ps = antoine(a, T) K = Ps/P if gamma: