Skip to content

Commit

Permalink
Component name changed
Browse files Browse the repository at this point in the history
X_CH -> X_PG, X_LI -> X_TAG, S_F -> S_G, K_F -> K_G
  • Loading branch information
GaYeongKim committed Nov 14, 2024
1 parent e5042b4 commit 93d4173
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
8 changes: 4 additions & 4 deletions exposan/pm2_batch/_batch_may_unit_cali.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
pm2 = pc.PM2(arr_e=6842, K_P=1.0, f_CH_max=0.819, exponent=4, q_CH=1.92792246509906, q_LI=26.1535941900048, V_NH=0.150722549179019, V_P=0.540050768528713,
a_c=0.049, I_n=1500, arr_a=1.8e10, beta_1=2.90,
beta_2=3.50, b_reactor=0.03, I_opt=2000, k_gamma=1e-5,
K_N=0.1, K_A=6.3, K_F=6.3, rho=1.186, K_STO=1.566,
K_N=0.1, K_A=6.3, K_G=6.3, rho=1.186, K_STO=1.566,
f_LI_max=3.249, m_ATP=10,
mu_max=1.969, Q_N_max=0.417, Q_N_min=0.082, Q_P_max=0.092, Q_P_min=0.0163,
V_NO=0.003, n_dark=0.7,
Expand All @@ -43,11 +43,11 @@
init_concs = {
'X_CHL':2.81,
'X_ALG':561.57,
'X_CH':13.74,
'X_LI':62.22,
'X_PG':13.74,
'X_TAG':62.22,
'S_CO2':30.0,
'S_A':5.0,
'S_F':5.0,
'S_G':5.0,
'S_O2':20.36,
'S_NH':25,
'S_NO':9.30,
Expand Down
12 changes: 6 additions & 6 deletions exposan/pm2_batch/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
modified_pm2_kwargs = dict(
a_c=0.049, I_n=1500, arr_a=1.8e10, arr_e=6842, beta_1=2.90,
beta_2=3.50, b_reactor=0.03, I_opt=2000, k_gamma=1e-5,
K_N=0.1, K_P=1.0, K_A=6.3, K_F=6.3, rho=1.186, K_STO=1.566,
K_N=0.1, K_P=1.0, K_A=6.3, K_G=6.3, rho=1.186, K_STO=1.566,
f_CH_max=0.819, f_LI_max=3.249, m_ATP=10,
mu_max=1.969, q_CH=1, q_LI=15,
Q_N_max=0.417, Q_N_min=0.082, Q_P_max=0.092, Q_P_min=0.0163,
Expand All @@ -58,7 +58,7 @@
'K_N': (0.1, 'g N/m^3'), # (0.05, 0.15)
'K_P': (1.0, 'g P/m^3'), # (0.5, 1.5)
'K_A': (6.3, 'g COD/m^3'), # (3.15, 9.45)
'K_F': (6.3, 'g COD/m^3'), # (3.15, 9.45)
'K_G': (6.3, 'g COD/m^3'), # (3.15, 9.45)
'rho': (1.186, ''), # (0.593, 1.779)
'K_STO': (1.566, 'g COD/g COD'), # (0.783, 2.349)
'f_CH_max': (0.819, 'g COD/g COD'), # (0.4095, 1.2285)
Expand Down Expand Up @@ -160,11 +160,11 @@ def create_model(system=None, kind='', analysis=''):

##### Add universal evaluation metrics #####

idx_vss = cmps.indices(['X_ALG', 'X_CH', 'X_LI', 'X_N_ALG', 'X_P_ALG'])
idx_vss = cmps.indices(['X_ALG', 'X_PG', 'X_TAG', 'X_N_ALG', 'X_P_ALG'])
idx_snh = cmps.indices(['S_NH'])
idx_sp = cmps.indices(['S_P'])
idx_ch = cmps.indices(['X_CH'])
idx_li = cmps.indices(['X_LI'])
idx_ch = cmps.indices(['X_PG'])
idx_li = cmps.indices(['X_TAG'])

imass = cmps.i_mass[idx_vss]

Expand All @@ -188,7 +188,7 @@ def NRMSE_VSS():
result_simul_vss = PBR.scope.record[:,idx_vss]

vss = np.sum(result_simul_vss * imass, axis = 1)
# vss = result_simul[:,0] * cmps.X_ALG.i_mass + result_simul[0:,1] * cmps.X_CH.i_mass + result_simul[0:,2] * cmps.X_LI.i_mass + result_simul[0:,3] + result_simul[0:,4]
# vss = result_simul[:,0] * cmps.X_ALG.i_mass + result_simul[0:,1] * cmps.X_PG.i_mass + result_simul[0:,2] * cmps.X_TAG.i_mass + result_simul[0:,3] + result_simul[0:,4]

f = interp1d(t_simul, vss)
vss_simul = f(t_exp_vss)
Expand Down
14 changes: 7 additions & 7 deletions exposan/pm2_batch/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
default_init_conds_inc = {
'X_CHL':2.81,
'X_ALG':561.57,
'X_CH':13.74,
'X_LI':62.22,
'X_PG':13.74,
'X_TAG':62.22,
'S_CO2':30.0,
'S_A':5.0,
'S_F':5.0,
'S_G':5.0,
'S_O2':20.36,
'S_NH':25,
'S_NO':9.30,
Expand All @@ -55,11 +55,11 @@
default_init_conds_exc = {
'X_CHL':3.91,
'X_ALG':782.30,
'X_CH':19.24,
'X_LI':101.06,
'X_PG':19.24,
'X_TAG':101.06,
'S_CO2':30.0,
'S_A':5.0,
'S_F':5.0,
'S_G':5.0,
'S_O2':20.36,
'S_NH':27.84,
'S_NO':10.72,
Expand All @@ -71,7 +71,7 @@
default_pm2_kwargs = dict(
a_c=0.049, I_n=1500, arr_a=1.8e10, arr_e=6842, beta_1=2.90,
beta_2=3.50, b_reactor=0.03, I_opt=2000, k_gamma=1e-5,
K_N=0.1, K_P=1.0, K_A=6.3, K_F=6.3, rho=1.186, K_STO=1.566,
K_N=0.1, K_P=1.0, K_A=6.3, K_G=6.3, rho=1.186, K_STO=1.566,
f_CH_max=0.819, f_LI_max=3.249, m_ATP=15.835,
mu_max=1.969, q_CH=0.594, q_LI=0.910,
Q_N_max=0.417, Q_N_min=0.082, Q_P_max=0.092, Q_P_min=0.0163,
Expand Down
2 changes: 1 addition & 1 deletion exposan/pm2_ecorecover/data/_pm2.tsv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
X_CHL X_ALG X_CH X_LI S_CO2 S_A S_F S_O2 S_NH S_NO S_P X_N_ALG X_P_ALG
X_CHL X_ALG X_PG X_TAG S_CO2 S_A S_G S_O2 S_NH S_NO S_P X_N_ALG X_P_ALG
photoadaptation 1
ammonium_uptake -1 1
phosphorus_uptake -1 1
Expand Down
2 changes: 1 addition & 1 deletion exposan/pm2_ecorecover/data/dynamic_influent_cali.tsv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
t X_CHL X_ALG X_CH X_LI S_CO2 S_A S_F S_O2 S_NH S_NO S_P X_N_ALG X_P_ALG Q
t X_CHL X_ALG X_PG X_TAG S_CO2 S_A S_G S_O2 S_NH S_NO S_P X_N_ALG X_P_ALG Q
0 0 0 0 0 30 5 5 5 35.8 0.7 0.36 0 0 449.06
0.003472222 0 0 0 0 30 5 5 5 35.82 0.7 0.36 0 0 449.06
0.006944444 0 0 0 0 30 5 5 5 35.84 0.7 0.36 0 0 449.06
Expand Down
2 changes: 1 addition & 1 deletion exposan/pm2_ecorecover/data/dynamic_influent_vali.tsv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
t X_CHL X_ALG X_CH X_LI S_CO2 S_A S_F S_O2 S_NH S_NO S_P X_N_ALG X_P_ALG Q
t X_CHL X_ALG X_PG X_TAG S_CO2 S_A S_G S_O2 S_NH S_NO S_P X_N_ALG X_P_ALG Q
0 0 0 0 0 30 5 5 5 33.86 3.46 0.48 0 0 449.06
0.00347222 0 0 0 0 30 5 5 5 33.85 3.46 0.47 0 0 449.06
0.00694444 0 0 0 0 30 5 5 5 33.84 3.46 0.47 0 0 449.06
Expand Down
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions exposan/pm2_ecorecover/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
modified_pm2_kwargs = dict(
a_c=0.049, I_n=1500, arr_a=1.8e10, arr_e=6842, beta_1=2.90,
beta_2=3.50, b_reactor=0.03, I_opt=2000, k_gamma=1e-5,
K_N=0.1, K_P=1.0, K_A=6.3, K_F=6.3, rho=1.186, K_STO=1.566,
K_N=0.1, K_P=1.0, K_A=6.3, K_G=6.3, rho=1.186, K_STO=1.566,
f_CH_max=0.819, f_LI_max=3.249, m_ATP=10,
mu_max=1.969, q_CH=1.928, q_LI=26.154,
Q_N_max=0.417, Q_N_min=0.082, Q_P_max=0.092, Q_P_min=0.0163,
Expand Down Expand Up @@ -97,7 +97,7 @@ def create_model(system=None, flowsheet=None):

##### Add universal evaluation metrics #####

idx_vss = cmps.indices(['X_ALG', 'X_CH', 'X_LI', 'X_N_ALG', 'X_P_ALG'])
idx_vss = cmps.indices(['X_ALG', 'X_PG', 'X_TAG', 'X_N_ALG', 'X_P_ALG'])
idx_snh = cmps.indices(['S_NH'])
idx_sp = cmps.indices(['S_P'])

Expand All @@ -119,7 +119,7 @@ def NRMSE_VSS():
result_simul_vss = RET.scope.record[:,idx_vss]

vss = np.sum(result_simul_vss * imass, axis = 1)
# vss = result_simul[:,0] * cmps.X_ALG.i_mass + result_simul[0:,1] * cmps.X_CH.i_mass + result_simul[0:,2] * cmps.X_LI.i_mass + result_simul[0:,3] + result_simul[0:,4]
# vss = result_simul[:,0] * cmps.X_ALG.i_mass + result_simul[0:,1] * cmps.X_PG.i_mass + result_simul[0:,2] * cmps.X_TAG.i_mass + result_simul[0:,3] + result_simul[0:,4]

f = interp1d(t_simul, vss)
vss_simul = f(t_scada)
Expand Down
14 changes: 7 additions & 7 deletions exposan/pm2_ecorecover/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
default_pm2_kwargs = dict(
a_c=0.049, I_n=1500, arr_a=1.8e10, arr_e=6842, beta_1=2.90,
beta_2=3.50, b_reactor=0.03, I_opt=2000, k_gamma=1e-5,
K_N=0.1, K_P=1.0, K_A=6.3, K_F=6.3, rho=1.186, K_STO=1.566,
K_N=0.1, K_P=1.0, K_A=6.3, K_G=6.3, rho=1.186, K_STO=1.566,
f_CH_max=0.819, f_LI_max=3.249, m_ATP=15.835,
mu_max=1.969, q_CH=0.594, q_LI=0.910,
Q_N_max=0.417, Q_N_min=0.082, Q_P_max=0.092, Q_P_min=0.0163,
Expand All @@ -65,11 +65,11 @@
default_init_conds = {
'X_CHL':2.53,
'X_ALG':505.97,
'X_CH':22.99,
'X_LI':93.78,
'X_PG':22.99,
'X_TAG':93.78,
'S_CO2':30.0,
'S_A':5.0,
'S_F':5.0,
'S_G':5.0,
'S_O2':5.0,
'S_NH':35.80,
'S_NO':0.7,
Expand Down Expand Up @@ -184,11 +184,11 @@ def create_system(flowsheet=None, pm2_kwargs={}, init_conds={}):

CENT = su.Splitter('CENT', POST_MEM-1, outs=[CEN, ALG], split={'X_CHL':0.33,
'X_ALG':0.33,
'X_CH':0.33,
'X_LI':0.33,
'X_PG':0.33,
'X_TAG':0.33,
'S_CO2':0.975,
'S_A':0.975,
'S_F':0.975,
'S_G':0.975,
'S_O2':0.975,
'S_NH':0.975,
'S_NO':0.975,
Expand Down

0 comments on commit 93d4173

Please sign in to comment.