My apologies for the information dump below - these are the equations being solved and the initial/boundary values. Along with some comments at the end
And here is the model/experimental data we were tuning to at the time:
https://www.sciencedirect.com/science/article/abs/pii/S0009250909000852
Here are our model equations:
The gas phase mole balance
\begin{equation}
m_j\frac{dy_i}{dt} = \dot{m}_{j-1}(y_{j-1} - y_j) - M_{i,j}''A_s + y_{i,j}\sum\limits_{i=1}^{n_c} M_{j,z}''A_s
\end{equation}
The gas phase heat balance:
\begin{equation}
m_j C_{p,j}\frac{dT_g}{dt} = \dot{m}_{j-1}C_{p,j-1}(T_{j-1} - T_j) - q_{g,I,j}A_s
\end{equation}
The bed heat balance:
\begin{equation}
M_sC_{p,s,j}\frac{dT_b}{dt} = q_{I,b,j}A_s
\end{equation}
Solid phase mass balance:
\begin{equation}
\frac{dM_i}{dt} = M_i''A_s
\end{equation}
Mass flow out of a tank:
\begin{equation}
\dot{m}_{j} = \dot{m}_{j-1} + \frac{\rho_m}{T_g}A_C\Delta z\frac{dT}{dt} - \sum\limits_{i=1}^{n_c} M_{i,j}''A_s
\end{equation}
Here are our equations for ##M_{i,j}''##, ##q_{g,I}## and ##q_{I,b}##:
\begin{equation}
M_i'' = \frac{k_i(Py_i - p_{i,T_I})}{RT}
\end{equation}
\begin{equation}
q_{g,I} = -\frac{U_g q^*}{U_g+U_b} + U^*(T_g - T_b)
\end{equation}
\begin{equation}
q_{I,b} = \frac{U_b q^*}{U_g+U_b} + U^*(T_g - T_b)
\end{equation}
We also have correlations from BSL for the mass transfer coefficient ##k_i##, the fluid solid heat transfer coefficient ##h_{f,s}## and the sublimation pressure of CO2 ##p_{sub,co2}##:
\begin{equation}
h_{fs} = (2.19Re^{1/3} + 0.78Re^{0.619})Pr^{1/3}(\frac{k_g}{d_p})(\frac{\mu_{b,T_I}}{\mu_{0,T_I}})^{0.14}(1-\epsilon)
\end{equation}
\begin{equation}
k_{i} = (2.19Re^{1/3} + 0.78Re^{0.619})\frac{Sc^{1/3}}{d_p}D_{ab}(1-\epsilon_g)
\end{equation}
\begin{equation}
ln(\frac{P_{sub}}{P_t}) = \frac{T_t}{T}[a_1(1-\frac{T}{T_t)}+a_2(1-\frac{T}{T_t})^{1.9}+a_3(1-\frac{T}{T_t})^{2.9}]
\end{equation}
I'm not sure why the equation numbers are so high, but anyway -
Right now since the output I'm getting is not as expected, I have set the mass and heat transfer coefficients to be constants. The only other big change is that we are no longer including ##H_2O## in this model, just a stream of Nitrogen and ##CO_2##.
Here are the constants, initial and boundary values as they are currently:
Constants:
U_b = 100
U_g = 50
cp_CO2 = 37
ki_CO2 = 5 * 10 ** -4 # mol/m2.s (I'm actually still not fully sure about this unit)
Initial values:
initial_co2_mole_fraction = 0.00
initial_co2_deposit = 0.0
initial_gas_temperature = 123.15
initial_bed_temperature = 123.15
Boundary Values:
molar_flow_in = 0.002
y_CO2_inlet = 0.2
T_inlet = 300