cadet / CADET-Core

The heart of CADET. A modular, fast, and accurate modeling and simulation framework for biotechnology processes.
GNU General Public License v3.0
70 stars 27 forks source link

Investigate GRM_FV edge cases #266

Open jbreue16 opened 3 months ago

jbreue16 commented 3 months ago

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

AntoniaBerger commented 1 month 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 solvefunction 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) :

grafik

grafik

lieres commented 1 month ago

Doesn't that just mean the time is being spent where it should?

lieres commented 1 week ago

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?