Skip to content

Commit f55266d

Browse files
more bug fixes
1 parent 9543edb commit f55266d

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

  • src/pathsim_chem/tritium

src/pathsim_chem/tritium/glc.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ def _calculate_dimensionless_groups(params, phys_props):
122122
Bo_g, phi_g, psi, nu).
123123
"""
124124
# Unpack parameters
125-
L, T, P_in, c_T_inlet = (
125+
L, T, P_in, c_T_in = (
126126
params["L"],
127127
params["T"],
128128
params["P_in"],
129-
params["c_T_inlet"],
129+
params["c_T_in"],
130130
)
131131

132132
# Unpack physical properties
@@ -145,11 +145,11 @@ def _calculate_dimensionless_groups(params, phys_props):
145145

146146
# Calculate dimensionless groups
147147
psi = (rho_l * g * epsilon_l * L) / P_in # Hydrostatic pressure ratio
148-
nu = ((c_T_inlet / K_s) ** 2) / P_in # Equilibrium ratio
148+
nu = ((c_T_in / K_s) ** 2) / P_in # Equilibrium ratio
149149
Bo_l = u_l * L / (epsilon_l * E_l) # Bodenstein number, liquid
150150
phi_l = a * h_l * L / u_l # Transfer units, liquid
151151
Bo_g = u_g0 * L / (epsilon_g * E_g) # Bodenstein number, gas
152-
phi_g = 0.5 * (R * T * c_T_inlet / P_in) * (a * h_l * L / u_g0)
152+
phi_g = 0.5 * (R * T * c_T_in / P_in) * (a * h_l * L / u_g0)
153153

154154
return {
155155
"Bo_l": Bo_l,
@@ -246,7 +246,7 @@ def _process_results(solution, params, phys_props, dim_params):
246246
raise RuntimeError("BVP solver failed to converge.")
247247

248248
# Unpack parameters
249-
c_T_inlet, P_in, T = params["c_T_inlet"], params["P_in"], params["T"]
249+
c_T_in, P_in, T = params["c_T_in"], params["P_in"], params["T"]
250250
y_T2_in = params["y_T2_in"]
251251

252252
# Dimensionless results
@@ -256,14 +256,14 @@ def _process_results(solution, params, phys_props, dim_params):
256256
efficiency = 1 - x_T_outlet_dimless
257257

258258
# Dimensional results
259-
c_T_outlet = x_T_outlet_dimless * c_T_inlet
259+
c_T_out = x_T_outlet_dimless * c_T_in
260260
P_out = P_in * (1 - dim_params["psi"])
261261
P_T2_out = y_T2_out * P_out
262262
P_T2_in = y_T2_in * P_in
263263

264264
# Mass balance check
265-
n_T_in_liquid = c_T_inlet * Q_l # mol/s
266-
n_T_out_liquid = c_T_outlet * Q_l # mol/s
265+
n_T_in_liquid = c_T_in * Q_l # mol/s
266+
n_T_out_liquid = c_T_out * Q_l # mol/s
267267
n_T2_in_gas = P_T2_in * Q_g / (R * T) # mol/s
268268
n_T_in_gas = n_T2_in_gas * 2 # mol/s
269269
Q_g_out = Q_g * (P_in / P_out) # m3/s
@@ -281,7 +281,7 @@ def _process_results(solution, params, phys_props, dim_params):
281281
"tritium_out_liquid [mol/s]": n_T_out_liquid,
282282
"tritium_out_gas [mol/s]": n_T_out_gas,
283283
"extraction_efficiency [fraction]": efficiency,
284-
"c_T_outlet [mol/m^3]": c_T_outlet,
284+
"c_T_outlet [mol/m^3]": c_T_out,
285285
"P_T2_inlet_gas [Pa]": P_T2_in,
286286
"P_T2_outlet_gas [Pa]": P_T2_out,
287287
"y_T2_outlet_gas": y_T2_out,
@@ -405,8 +405,8 @@ def func(self, c_T_in, flow_l, y_T2_inlet, flow_g):
405405

406406
res, _ = solve(new_params)
407407

408-
c_T_outlet = res["c_T_outlet [mol/m^3]"]
409-
y_T2_outlet = res["y_T2_outlet_gas"]
408+
c_T_out = res["c_T_outlet [mol/m^3]"]
409+
y_T2_out = res["y_T2_outlet_gas"]
410410
eff = res["extraction_efficiency [fraction]"]
411411
P_total_outlet = res["total_gas_P_outlet [Pa]"]
412412
Q_l = res["liquid_vol_flow [m^3/s]"]
@@ -415,8 +415,8 @@ def func(self, c_T_in, flow_l, y_T2_inlet, flow_g):
415415
n_T_out_gas = res["tritium_out_gas [mol/s]"]
416416

417417
return (
418-
c_T_outlet,
419-
y_T2_outlet,
418+
c_T_out,
419+
y_T2_out,
420420
eff,
421421
P_total_outlet,
422422
Q_l,

0 commit comments

Comments
 (0)