I just checked the rate of progress of the interface reactions (1st is dissolution and 2nd is evaporation). The rate of progress for dissolution is always 0, while the rate of progress for evaporation is constant value with time and equal to the rate constant (meaning the code takes the concentration of O2 as constant and equal to 1).
Part of my input file and phase definition are provide in the text below. Could you help me check for problems? Thanks a lot!
phases:
- name: liquid
thermo: ideal-gas
elements: [H, C, O, N, Ar, He]
species: [O2, RH, ... ]
kinetics: gas
state: {T: 300.0, P: 1 atm}
- name: gas
thermo: ideal-gas
elements: [H,C,O]
species: [O2(g), RH]
- name: interface
thermo: ideal-surface
species: [O2, O2(g)]
reactions: [interface-reactions]
kinetics: surface
# Gas-liquid interface: species & reactions
interface-reactions:
- equation: O2(g) => O2 # O2 dissolution
rate-constant: {A: 1.0e-12, b: 0.0, Ea: 0.0}
- equation: O2 => O2(g) # O2 evaporation
rate-constant: {A: 2.823e-12, b: 0.0, Ea: 0.0}
def get_vapor_pressure(T):
A = 4.54436
B = 1738.123
C = 0.394
return 10**( A-(B/(T + C)) )*1e5
# Initial Values
temp_dgC = 160
temp = temp_dgC + 273.15
pres_init = 14*1e5
X_O2_init = 0.0131378
X_RH_init = 1 - X_O2_init
v_liq = 5*1e-6
v_gas = 20*1e-6
rho_liq = 722.8
# Phases
liq, gas = ct.import_phases('liq-toluene_superskl.yaml',['liquid', 'gas'])
itf = ct.Interface('liq-toluene_superskl.yaml', name='interface',adjacent=[liq,gas])
liq.TDX = temp, rho_liq, { 'RH': X_RH_init, 'O2': X_O2_init }
gas.TPX = temp, pres_init, { 'O2(g)': pres_init - get_vapor_pressure(temp), 'RH(g)': get_vapor_pressure(temp) }
itf.TP = temp, pres_init
# Reactors
rliq = ct.Reactor(liq, name='Liquid Reactor', energy='off')
rgas = ct.Reactor(gas, name='Gas Reactor', energy='off')
rliq.volume = v_liq
rgas.volume = v_gas
# Reactors network
sim = ct.ReactorNet([rliq,rgas])
# Start iterating
tstep = 1 # sec
tend = 60*60*1000 # 1000h
tlog = 60*60 # 1h
tot_steps = int(tend/tstep)
log_steps = int(tlog/tstep)
time = 0.0
print("{:6} {:10} {:10} {:10} {:10} {:10}".format('t [h]', '[O2(l)]', 'P_g [bar]', '[O2(g)]', 'rate_sol', 'rate_eva'))
for n in range(tot_steps):
time += tstep
sim.advance(time)
if n%log_steps == 0:
print("{:6.0f} {:10.4g} {:10.2f} {:10.4g} {:10.4g} {:10.4g}".format(time/tlog, liq['O2'].concentrations[0], rgas.thermo.P/1e5, gas['O2(g)'].concentrations[0], itf.forward_rates_of_progress[0], itf.forward_rates_of_progress[1]))
t [h] [O2(l)] P_g [bar] [O2(g)] rate_sol rate_eva
0 0.104 14.00 0.2935 0 2.823e-12
1 0.03182 14.00 0.2935 0 2.823e-12
2 4.829e-07 14.00 0.2935 0 2.823e-12
3 4.827e-07 14.00 0.2935 0 2.823e-12
4 4.826e-07 14.00 0.2935 0 2.823e-12