@@ -6,7 +6,7 @@ class PureFluid:
6
6
def __init__ (self , void_fraction , d_pore , tortuosity , molecular_weight = None ):
7
7
"""
8
8
9
- :param molecular_weight: molecular weight [kg /mol] for each component
9
+ :param molecular_weight: molecular weight [g /mol] for each component
10
10
:param void_fraction: void fraction of porous media
11
11
:param d_pore: nominal pore diameter [meters]
12
12
:param tortuosity: tortuosity of porous media
@@ -29,7 +29,8 @@ def knudsen(self, T):
29
29
:param i: component name
30
30
:return: Knudsen diffusivity m^2/s
31
31
"""
32
- return self .void_fraction * self .d_pore / self .tortuosity / 3. * math .sqrt (8 * self .R * T / math .pi / self .molecular_weight )
32
+ MW = self .molecular_weight / 1000. # convert to kg/mol
33
+ return self .void_fraction * self .d_pore / self .tortuosity / 3. * math .sqrt (8 * self .R * T / math .pi / MW )
33
34
34
35
def write_params (self , file_name ):
35
36
with open (file_name , 'w' ) as f :
@@ -116,34 +117,31 @@ def omega_ij(self, w):
116
117
def molecular_ij (self , i , j , T , P ):
117
118
"""Molecular diffusivites estimated by Chapman-Enskog
118
119
120
+ Units:
121
+ * sqrt term leads to m/s as knudsen
122
+ prefactor:
123
+ m^3*Pa/mol/K*K/Pa/m/m*mol/molec [=] m
124
+
119
125
:param i: sorbate i name
120
126
:param j: sorbate j name
121
127
:param T: temperature in K
122
- :param P: pressure in atm
128
+ :param P: pressure in Pa
123
129
:return: binary diffusion coefficient (m^2/s)
124
130
"""
125
131
126
- # convert molecular weights to g/mol to apply formula
127
- M_i = self .molecular_weight_i [i ]* 1000.
128
- M_j = self .molecular_weight_i [j ]* 1000.
132
+ M_i = self .molecular_weight_i [i ]/ 1000. # convert to kg/mol
133
+ M_j = self .molecular_weight_i [j ]/ 1000. # convert to kg/mol
134
+ o_ij = self .sigma_ij_rule (i , j )* 1e-10
135
+ N_av = 6.022e23
129
136
130
- return 1.858e-3 * math .sqrt (T * T * T * (1. / M_i + 1. / M_j )) / (
131
- P * self .sigma_ij_rule (i , j ) * self .sigma_ij_rule (i , j ) *
132
- self .omega_ij (T / self .epsilon_ij_rule (i , j ))
133
- )/ 100. / 100.
137
+ return 3. * self .R * T / P / 8 / o_ij / o_ij / N_av * math .sqrt (self .R * T / 2. / math .pi * (1. / M_i + 1. / M_j ))
134
138
135
- def effective_macropore_i (self , i , j , temperature , pressure ):
139
+ def effective_macropore_i (self , * args ):
136
140
"""
137
-
138
- :param temperature: temperature in K
139
- :param pressure: pressure in Pa
140
- :param i: component i name
141
- :param j: other_component name
142
141
:return: effective macropore diffusivity m^2/s
143
142
"""
144
- P_atm = pressure / 101325.
145
143
return self .void_fraction / self .tortuosity / (
146
- 1. / self .molecular_ij (i , j , temperature , P_atm ) + 1. / self .knudsen_i (i , j , temperature , pressure )
144
+ 1. / self .molecular_ij (* args ) + 1. / self .knudsen_i (* args )
147
145
)
148
146
149
147
def write_calculations (self , output_file , temperature , pressure ):
0 commit comments