Open jbreue16 opened 3 months ago
The biggest time difference in the calculation between the two models can be seen in the linear solution functions of the respective units. This concerns the factorize
function of the FactorizableBandMatrix
class and the solve
function of the Gmres
class.
One possible option could therefore be that the linear solver of the LRMP can be optimized. This needs to be investigated further.
Here are the corresponding screenshots (1. GRM, 2. LRMP) :
Doesn't that just mean the time is being spent where it should?
Equation A.4 in Püttmann et al. (2016) explains why the discretized flux becomes zero for $k_f \rightarrow 0$ or $D_p \rightarrow 0$.
I would still like to better understand the root cause of the different runtimes. Does the linear solver need more iterations?
For the GRM we can choose only one cell for the particle discretization. This leads to some modeling edge cases, e.g. when particle diffusion becomes non limiting ($D_p\to1$). The latter case is similar to the LRMP, within some numerical tolerances. When $D_p = 0$, there is no diffusion into the particles, no matter the value for film diffusion. This is a modeling edge case but good for testing, we should add that test.
Interestingly, we also found that the GRM performs better than the LRMP for our standard LWE example with around 25%. This raises the question if this is generally the case and needs an explanation.
Thanks to @ronald-jaepel
TODO