Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions antoine.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import numpy as np
# change number 1

def antoine( a, T):
# Ps = antoine( a, T)
#
Expand All @@ -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
4 changes: 2 additions & 2 deletions raoult_law_kvalue.py
Original file line number Diff line number Diff line change
@@ -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:
#
Expand Down Expand Up @@ -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:
Expand Down