Skip to content

Commit 11281d7

Browse files
R from scipy
1 parent cfa11e0 commit 11281d7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/python/custom_pathsim_blocks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def update(self, t):
410410
from scipy.integrate import solve_bvp
411411
from scipy import constants as const
412412

413-
R = 8.314 # J/(mol·K), Universal gas constant TODO read from const
413+
# R = 8.314 # J/(mol·K), Universal gas constant TODO read from const
414414

415415

416416
def solve(params):
@@ -540,7 +540,7 @@ def boundary_conditions(Sa, Sb):
540540
phi_l = a * h_l * L / u_l # Transfer units parameter, liquid phase (Eq. 8.11)
541541
Bo_g = u_g0 * L / (ε_g * E_g) # Bodenstein number, gas phase (Eq. 8.10)
542542
phi_g = (
543-
0.5 * (R * T * c_T_inlet / P_0) * (a * h_l * L / u_g0)
543+
0.5 * (const.R * T * c_T_inlet / P_0) * (a * h_l * L / u_g0)
544544
) # Transfer units parameter, gas phase (Eq. 8.12)
545545

546546
y_T2_in = P_T2_in / P_0 # Inlet tritium molar fraction in gas phase
@@ -583,13 +583,13 @@ def boundary_conditions(Sa, Sb):
583583
n_T_out_liquid = c_T_outlet * Q_l * N_A # Tritons/s
584584

585585
# Tritium molar flow rate into the column via gas
586-
n_T2_in_gas = (P_T2_in * Q_g / (R * T)) * N_A # T2/s
586+
n_T2_in_gas = (P_T2_in * Q_g / (const.R * T)) * N_A # T2/s
587587
n_T_in_gas = n_T2_in_gas * 2 # Triton/s
588588

589589
# Calculate outlet gas volumetric flow rate (gas expands as pressure drops)
590590
Q_g_out = (P_0 * Q_g) / P_outlet
591591
# Tritium molar flow rate out of the column via gas
592-
n_T2_out_gas = (P_T2_out * Q_g_out / (R * T)) * N_A # T2/s
592+
n_T2_out_gas = (P_T2_out * Q_g_out / (const.R * T)) * N_A # T2/s
593593
n_T_out_gas = n_T2_out_gas * 2 # Triton/s
594594

595595
results = {

0 commit comments

Comments
 (0)