From ef25438196e57ce360939e7fdac1cda596bc0744 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Mon, 22 Apr 2024 00:16:00 -0500 Subject: [PATCH 1/3] hard_coding priors --- biosteam/units/design_tools/aeration.py | 98 ++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 2 deletions(-) diff --git a/biosteam/units/design_tools/aeration.py b/biosteam/units/design_tools/aeration.py index 95bfd81c..147fd51c 100644 --- a/biosteam/units/design_tools/aeration.py +++ b/biosteam/units/design_tools/aeration.py @@ -184,7 +184,7 @@ def kla_bubcol_Akita_Yoshida(D, mu_l, rho_l, D_l, g, sigma_l, epsilon_g): rho_l: float Density of the liquid, [kg/m^3] D_l: float - Diffusivity ofliquid, [m^2/s] + Diffusivity of liquid, [m^2/s] g: float Gravitational acceleration, [m/s^2] sigma_l: float @@ -558,4 +558,98 @@ def log_mean_driving_force(C_sat_out, C_sat_in, C_out, C_in=None): dC_in = C_sat_in - C_in if dC_out < 1e-9: # This is not theoretically possible, but may be an assumption dC_out = 1e-9 # Assume it near zero - return (dC_out - dC_in) / log(dC_out / dC_in) \ No newline at end of file + return (dC_out - dC_in) / log(dC_out / dC_in) + + +if __name__ == "__main__": + print('hola') + + repeated_names = [ + ('U_g', ('U_G', 'V_G')), + + ] + fermentation_variables_bub_col = { + 'Dashpande': { + 'epsilon_g': (0.5, 1.2), + 'K': (0.016, 0.028), # for coarse bubble diffusers 'K': (0.07, 0.1), # for fine bubble diffusers + 'M_l': 0.018, # kg/mol + 'Rhat': 8.314, # J/mol-K + 'T': 298.15, # K + 'rho_l': 1000, # kg/m^3 + 'U_g': (0.01,0.1), # m/s + }, + 'DeJesus': { + 'Q':(0, 1.6), # vvm + 'mu': (0.001, 0.1), # Pa.s + 'k': (0.1, 100), # Pa.s^n + 'n': (0, 2) # Flow behavior index <1 for pseudoplastic, >1 for dilatant, 1 for Newtonian + }, + 'Akita_Yoshida': { + 'D': 0.15, # m + 'H': 4, # m + 'V_g': (0, 0.33), # m/s + 'mu_l': (0.5, 100), # Cp 1 water, 100 xanthan + 'rho_l': (995, 1043), # kg/m^3 + 'D_l': (1.68 * 10**-9, 3.24 * 10**-9) , # m^2/s + 'g': 9.81, # m/s^2 + 'sigma_l': (0.0348,0.0728), # N/m + 'epsilon_g': (0.01, 1) # m/s + }, + 'Posarac_Tekic': { + 'D': 0.1, # m + 'H': 2.5, # m + 'V_g': (0.008, 0.08), # m/s + 'mu_l': (0.5, 100), # Cp 1 water, 100 xanthan + 'rho_l': (995, 1043), # kg/m^3 + 'D_l': (1.68 * 10**-9, 3.24 * 10**-9), # m^2/s + 'sigma_l': (0.0348,0.0728), # N/m + 'epsilon_g': (0.01, 1) # m/s + }, + 'Seno': { + 'D': 0.0464, # m + 'H': 1.36, # m + 'V_g': (0.005, 0.04), # m/s + 'V_l': (0.005, 0.1), # m/s + 'rho_l': (995, 1043), # kg/m^3 + 'mu_l': (0.653, 1.31), # Cp 1 water, 100 xanthan + 'D_l': (1.68 * 10**-9, 3.24 * 10**-9), # m^2/s + 'g': 9.81, # m/s^2 + 'sigma_l': (0.0348,0.0728), # N/m + 'epsilon_g': (0.01, 1) # m/s + }, + 'Suh': { + 'D': 0.15, # m + 'H': 2.9, # m + 'V_g': (0.005, 0.04), # m/s + 'rho_l': (1001, 1264), # kg/m^3 + 'mu_l': (0.653, 1.31), # Cp 1 water, 100 xanthan + 'D_l': (0.318 * 10**-9, 2.5 * 10**-9) , # m^2/s + 'g': 9.81, # m/s^2 + 'sigma_l': (0.0656,0.0746), # N/m + 'epsilon_g': (0.01, 1) # m/s + }, + 'Shah': { + 'D': 0.29, # m + 'H': 0.2, # m + 'V_g': (0.021, 0.105), # m/s + 'V_l': (0.0005, 0.002), # m/s + 'rho_l': (1, 50), # kg/m^3 + 'mu_l': (1, 50), # Cp 1 water, 100 xanthan + }, + } + + fermentation_variables_stirred = { + 'Labik':{ + 'N': (4.17, 14.17), # s^-1 + 'D':(0.1,0.2), # m + 'v_s': (2.12 * 10^-3, 8.48 * 10^-3) , # m/s + 'P0': (100, 10000), + }, + 'Galaction':{ # look into what is better for the P_a/V and P/V + 'P_a/V' : (30,120), # W/m^3 + 'v_s': (0.8 * 10^-3, 5 * 10^-3), # m/s + 'C_x': (5, 150), # g/l dry weight + 'P/V': (10, 1900), # W/m^3 + + } + } \ No newline at end of file From 67b97a05734d172e6e5fa0192cb606cf78f52184 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Wed, 8 May 2024 14:32:35 -0500 Subject: [PATCH 2/3] co --- biosteam/units/design_tools/aeration.py | 1 - 1 file changed, 1 deletion(-) diff --git a/biosteam/units/design_tools/aeration.py b/biosteam/units/design_tools/aeration.py index 147fd51c..389a0a86 100644 --- a/biosteam/units/design_tools/aeration.py +++ b/biosteam/units/design_tools/aeration.py @@ -633,7 +633,6 @@ def log_mean_driving_force(C_sat_out, C_sat_in, C_out, C_in=None): 'H': 0.2, # m 'V_g': (0.021, 0.105), # m/s 'V_l': (0.0005, 0.002), # m/s - 'rho_l': (1, 50), # kg/m^3 'mu_l': (1, 50), # Cp 1 water, 100 xanthan }, } From e1f63c75ed3c4dc8192a3e184a67e3dcdac19a61 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Thu, 9 May 2024 13:10:58 -0500 Subject: [PATCH 3/3] modifiying functions of aeration because typos in equations --- biosteam/units/design_tools/aeration.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/biosteam/units/design_tools/aeration.py b/biosteam/units/design_tools/aeration.py index 389a0a86..84007e0a 100644 --- a/biosteam/units/design_tools/aeration.py +++ b/biosteam/units/design_tools/aeration.py @@ -115,7 +115,7 @@ def kla_bubcol_Deshpande(K, M_l, Rhat, T, rho_l, U_g): Mass transfer estimation for bubble column scale up. Chemical Engineering Science, 205, 350–357. https://doi.org/10.1016/j.ces.2019.05.011 """ - H_at_T = Henrys_law_constant(T) + H_at_T = 3.9e9 alpha = K * (H_at_T * M_l)/(Rhat * T * rho_l) beta = 1 return alpha * U_g ** beta @@ -269,7 +269,7 @@ def kla_bubcol_Seno(D, mu_l, rho_l, D_l, g, sigma_l, epsilon_g, V_g, V_l): g: float Gravitational acceleration, [m/s^2] sigma_l: float - The surface tension ofliquid [N/m] + The surface tension of liquid [N/m] epsilon_g: float Overall gashold-up V_g: float @@ -297,7 +297,7 @@ def kla_bubcol_Seno(D, mu_l, rho_l, D_l, g, sigma_l, epsilon_g, V_g, V_l): O2- Water, Aqueous Solution of Butanol, Polyoxyethylene sorbitan monolaurate with silicone oil """ - kla = (D_l/(D**2)) * 0.6 * (V_g/(V_g+V_l))**-0.39 *(mu_l/(rho_l * D_l))**(0.5) * ((g * rho_l**2 * D**2)/sigma_l)**(0.62) * ((g * D**3 * rho_l**2)/mu_l**2)**(0.31) * epsilon_g**(1.1) + kla = (D_l/(D**2)) * 0.6 * (V_g/(V_g+V_l))**-0.39 *(mu_l/(rho_l * D_l))**(0.5) * ((g * rho_l**2 * D**2)/mu_l)**(0.62) * ((g * D**3 * rho_l**2)/mu_l**2)**(0.31) * epsilon_g**(1.1) return kla def kla_bubcol_Suh(D, mu_l, rho_l, D_l, g, sigma_l, epsilon_g, V_g, V_l): @@ -346,7 +346,7 @@ def kla_bubcol_Suh(D, mu_l, rho_l, D_l, g, sigma_l, epsilon_g, V_g, V_l): Air-Aqueous Sucrose Solution """ - kla = (D_l/(D**2)) * 0.018 * (mu_l/(rho_l * D_l))**(0.5) * ((g*rho_l*D**2)/sigma_l)**(0.75) * (g*D**3*rho_l**2/(mu_l**2))**(0.39)*(V_g/(sqrt(g*D))) + kla = (D_l/(D**2)) * 0.018 * (mu_l/(rho_l * D_l))**(0.5) * ((g*rho_l*D**2)/sigma_l)**(0.75) * (g*D**3*rho_l**2/(mu_l**2))**(0.39)*(V_g/(sqrt(g*D)))**0.51 return kla @@ -633,6 +633,7 @@ def log_mean_driving_force(C_sat_out, C_sat_in, C_out, C_in=None): 'H': 0.2, # m 'V_g': (0.021, 0.105), # m/s 'V_l': (0.0005, 0.002), # m/s + 'rho_l': (1, 50), # kg/m^3 'mu_l': (1, 50), # Cp 1 water, 100 xanthan }, }